* { box-sizing: border-box; margin: 0; padding: 0; }
/* ── Design tokens ──────────────────────────────────────────────────
   One accent (green) for every interactive/active state; neutrals for
   everything else; red reserved strictly for errors/destructive hovers.
   The teal "pinned" and amber "saved" hues that used to diverge now all
   resolve to --accent. */
:root {
  --bg: #111;
  --surface: #1e1e1e;
  --surface-2: #1a1a1a;
  --border: #333;
  --border-2: #444;
  --text: #eee;
  --text-dim: #aaa;
  --text-mute: #888;
  --text-faint: #666;
  --accent: #8ec98e;
  --accent-hi: #ade0ad;
  --accent-border: #4a7a4a;
  --accent-bg: #1a2a1a;
  --accent-bg-hover: #1f321f;
  --accent-contrast: #10210f;
  --accent-text: #6cc06c;
  --danger: #e06c75;
}
body {
  font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #111;
  color: #eee;
  padding: 1rem;
}
h1 { font-size: 1.4rem; margin-bottom: 0.5rem; color: #fff; }
#intro {
  font-size: 0.78rem;
  color: #888;
  margin: 0 0 1rem;
  max-width: 60ch;
  line-height: 1.6;
}
#intro a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-border);
}
#intro a:hover { color: var(--accent-hi); border-bottom-style: solid; }
#other-editors {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin: 0 0 1rem;
  max-width: 60ch;
  line-height: 1.6;
}
#other-editors a {
  color: var(--text-mute);
  text-decoration: none;
  border-bottom: 1px dotted var(--border-2);
}
#other-editors a:hover { color: var(--accent); border-bottom-color: var(--accent-border); }
h2 { font-size: 1rem; margin: 1.5rem 0 0.5rem; color: #aaa; }
#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
#gallery.gallery-mode {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.card {
  background: #1e1e1e;
  border-radius: 6px;
  border: 1px solid #333;
  position: relative;
  container-type: inline-size;
}
.card canvas { display: block; width: 100%; border-radius: 6px 6px 0 0; }
.card .info { padding: 0.5rem 0.75rem; }
.card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.card .label { font-size: 0.85rem; color: #ccc; flex: 1; min-width: 0; }
.card .label.has-detail {
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-color: #555;
  text-underline-offset: 3px;
}
.card .original-badge {
  font-size: 0.7rem;
  background: #444;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 0.4rem;
}
#editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
/* ── Syntax-highlighted editor ─────────────────────────────────────
   A transparent textarea sits on top of a <pre> that shows the same
   text, syntax-highlighted. Both share identical box metrics so the
   caret and highlight line up exactly. */
.editor {
  position: relative;
  width: 100%;
  min-height: 260px;
  display: block;
}
#program-hl,
textarea#program {
  margin: 0;
  padding: 1rem;
  border: 1px solid #333;
  border-radius: 6px;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  letter-spacing: 0;
  tab-size: 2;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100%;
  min-height: 260px;
}
#program-hl {
  position: absolute;
  inset: 0;
  background: #1e1e1e;
  color: #d4d4d4;
  overflow: auto;
  pointer-events: none;
  z-index: 0;
}
#program-hl code { font: inherit; }
textarea#program {
  position: relative;
  z-index: 1;
  background: transparent;
  color: transparent;
  caret-color: #eee;
  resize: vertical;
  outline: none;
}
textarea#program::selection { background: rgba(120, 160, 200, 0.35); }
.editor:focus-within #program-hl { border-color: #555; }
/* Token colors — tuned for jxl-art's line-oriented syntax (header
   KEY value / body `if VAR > NUM` / `- PRED [+ NUM]`). */
.tk-paren   { color: #7a7a7a; }   /* `>` comparison op */
.tk-kw      { color: #5a9ed6; }   /* header keys, `if`, `-` */
.tk-fn      { color: var(--accent-text, #6cc06c); }   /* predictors + cond vars */
.tk-num     { color: #b5cea8; }
.tk-var     { color: #d6b85a; }   /* x/y/c */
.render-btn {
  align-self: flex-start;
  padding: 0.4rem 1rem;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 4px;
  color: #eee;
  cursor: pointer;
  font-size: 0.85rem;
}
.render-btn:hover { background: #333; }
.render-btn:disabled { opacity: 0.5; cursor: default; }
#random-btn, #gallery-btn, #saved-btn {
  padding: 0.4rem 1rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
}
#random-btn:hover, #gallery-btn:hover, #saved-btn:hover { background: var(--accent-bg-hover); }
#random-btn:disabled, #gallery-btn:disabled, #saved-btn:disabled { opacity: 0.5; cursor: default; }
#help-btn {
  width: 2rem;
  padding: 0.4rem 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
}
#help-btn:hover { background: #2a2a2a; color: var(--text); }
/* ── Footer ─────────────────────────────────────────────────────────── */
#app-footer {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  justify-content: center;
  align-items: baseline;
  font-size: 0.72rem;
  color: var(--text-faint);
  text-align: center;
}
#app-footer .sep { color: var(--border-2); user-select: none; }
#app-footer a {
  color: var(--text-mute);
  text-decoration: none;
  border-bottom: 1px dotted var(--border-2);
}
#app-footer a:hover { color: var(--accent); border-bottom-color: var(--accent-border); }
/* ── Keyboard shortcuts overlay ──────────────────────────────────────── */
#shortcuts-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#shortcuts-modal.open { display: flex; }
#shortcuts-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  width: min(440px, 100%);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
#shortcuts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
#shortcuts-head h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
#shortcuts-close {
  background: none; border: none; color: var(--text-mute);
  cursor: pointer; font-size: 0.9rem; padding: 2px 6px; border-radius: 4px;
}
#shortcuts-close:hover { color: var(--text); background: #2a2a2a; }
#shortcuts-list { padding: 0.5rem 1.1rem; }
#shortcuts-list > div {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #232323;
}
#shortcuts-list > div:last-child { border-bottom: none; }
#shortcuts-list dt {
  flex: 0 0 9.5rem;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
#shortcuts-list dd { color: var(--text-dim); font-size: 0.85rem; }
#shortcuts-list .alt { color: var(--text-faint); font-size: 0.7rem; display: inline-flex; gap: 3px; align-items: center; }
kbd {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  background: #2a2a2a;
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text);
  min-width: 1.1rem;
  text-align: center;
  display: inline-block;
}
#shortcuts-foot {
  padding: 0.6rem 1.1rem 0.9rem;
  font-size: 0.72rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}
/* ── Publish to Discord modal ────────────────────────────────────────── */
#publish-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#publish-modal.open { display: flex; }
#publish-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  width: min(420px, 100%);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
#publish-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
#publish-head h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
#publish-close {
  background: none; border: none; color: var(--text-mute);
  cursor: pointer; font-size: 0.9rem; padding: 2px 6px; border-radius: 4px;
}
#publish-close:hover { color: var(--text); background: #2a2a2a; }
#publish-body { padding: 0.9rem 1.1rem 1.1rem; }
.publish-note { font-size: 0.78rem; color: var(--text-dim); margin: 0 0 0.8rem; }
.publish-note code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  background: #2a2a2a; padding: 0 4px; border-radius: 3px; color: var(--text);
}
#publish-preview {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.85rem;
}
.publish-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--text-mute);
  margin-bottom: 0.7rem;
}
.publish-field input {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  padding: 5px 8px;
  font-family: inherit;
}
.publish-field input:focus { outline: none; border-color: var(--accent-border); }
#publish-status { font-size: 0.78rem; min-height: 1.1em; margin-bottom: 0.3rem; }
#publish-status.ok { color: var(--accent); }
#publish-status.err { color: var(--danger); }
#publish-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
#publish-actions .dl-btn { padding: 5px 14px; font-size: 0.8rem; }
.dl-btn.primary {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-bg);
}
.dl-btn.primary:hover { background: var(--accent-bg-hover); color: var(--accent-hi); }

#top-right-btns {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.btn-group {
  display: flex;
  align-items: stretch;
  align-self: flex-start;
}
.btn-group > button:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.preview-btn {
  padding: 0.4rem 0.6rem;
  background: #111;
  border: 1px solid #444;
  border-left: none;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  color: #666;
  cursor: pointer;
  font-size: 0.78rem;
}
.preview-btn:hover { background: #1a1a1a; color: #aaa; }
.preview-btn:disabled { opacity: 0.4; cursor: default; }
#error-msg { color: var(--danger); font-size: 0.8rem; }
.dl-btn {
  padding: 2px 8px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 3px;
  color: #aaa;
  cursor: pointer;
  font-size: 0.75rem;
}
.dl-btn:hover { background: #2a2a2a; color: #eee; }
.dl-btn:disabled { opacity: 0.4; cursor: default; }
.dl-btn.saved {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-bg);
}
.dl-btn.saved:hover { background: var(--accent-bg-hover); color: var(--accent-hi); }
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #888;
  padding: 2.5rem 1rem;
  font-size: 0.9rem;
}
.card.saved-loading .saved-note {
  color: #666;
  font-size: 0.75rem;
  margin-top: 4px;
}
.card.saved-loading .saved-note.failed { color: var(--danger); }
/* ── Card action row + overflow menu ───────────────────────── */
.card .action-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.dl-btn.labeled {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
}
.dl-btn.labeled .icon {
  font-size: 0.95em;
  line-height: 1;
}
/* The Compare button always shows its text (its Pinned state is worth
   the words). Baseline + Save are icon-only on narrow cards and reveal
   their label once the card has room — e.g. single-column mobile, or
   any wide stretch of the grid. Container query keys off card width,
   not viewport, so it's correct regardless of layout. */
.dl-btn.labeled.collapsible .text { display: none; }
@container (min-width: 300px) {
  .dl-btn.labeled.collapsible .text { display: inline; }
}
.dl-btn.active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
}
.dl-btn.active:hover { background: var(--accent-bg-hover); color: var(--accent-hi); }
.overflow-wrap { position: relative; display: inline-block; margin-left: auto; }
.overflow-btn {
  font-size: 1rem;
  line-height: 0.7;
  padding: 2px 8px 6px;
}
.card-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 4px;
  min-width: 210px;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  padding: 4px;
  flex-direction: column;
  gap: 1px;
}
.card-menu.open { display: flex; }
.card-menu-item {
  background: none;
  border: none;
  color: #ccc;
  font-size: 0.8rem;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  border-radius: 3px;
}
.card-menu-item:hover { background: #2a2a2a; color: #eee; }
/* ── Card internals (built by renderCard in app.js) ──────────────── */
.card .jxl-size {
  font-size: 0.72rem;
  color: #666;
  align-self: baseline;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.card .program-pre {
  display: none;
  font-size: 0.7rem;
  color: #9cdcfe;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-x: auto;
  white-space: pre;
  margin-top: 4px;
}
.card .program-pre.show { display: block; }
/* ── Skeleton (streaming placeholder) ─────────────────────────────── */
/* While a render is in flight we drop a placeholder card so the grid's
   footprint is stable — the new card replaces the skeleton in place
   instead of pushing real cards around as each one arrives. */
.card.skeleton {
  background: #1a1a1a;
  border-color: #2a2a2a;
}
.card.skeleton .skeleton-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #242424;
  border-radius: 6px 6px 0 0;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.card.skeleton .skeleton-line {
  display: inline-block;
  width: 55%;
  height: 18px;
  background: #2a2a2a;
  border-radius: 3px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  animation-delay: 0.2s;
}
/* Gallery cards have no label — their head holds only the small byte-size
   chip. Match that so gallery skeletons aren't a few px taller than the
   real cards they replace. */
.card.skeleton .skeleton-line.compact {
  width: 48px;
  height: 14px;
}
/* Mock action row inside the skeleton so its overall height matches a
   fully-rendered card — keeps the grid from settling downward when
   the placeholder is swapped out. Widths approximate the real buttons:
   Compare (labeled) · ↑ icon · ☆ icon · ⋯ overflow. */
.card.skeleton .skeleton-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.card.skeleton .skeleton-btn {
  height: 23px;
  background: #232323;
  border-radius: 3px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  animation-delay: 0.4s;
}
.card.skeleton .skeleton-btn-compare  { width: 78px; }
.card.skeleton .skeleton-btn-icon     { width: 24px; }
.card.skeleton .skeleton-btn-overflow { width: 28px; margin-left: auto; }
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
/* ── Size segmented control ──────────────────────────────────────── */
.picker-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.picker-row .size-picker {
  margin-bottom: 0;
}
.size-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.size-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.picker-tag {
  font-size: 0.6rem;
  color: #666;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}
.size-segments {
  display: inline-flex;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
}
.size-seg {
  background: #1a1a1a;
  border: none;
  border-left: 1px solid #333;
  color: #888;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 10px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.size-seg:first-child { border-left: none; }
.size-seg:hover { background: #222; color: #ccc; }
.size-seg.active {
  background: #2a2a2a;
  color: #eee;
}
.size-seg .native {
  font-size: 0.62rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.size-seg.active .native { color: var(--accent); }
/* ── Comparison bar ──────────────────────────────────────────────────── */
#compare-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #0e0e0e;
  border-top: 1px solid #3a3a3a;
  z-index: 200;
}
/* Collapsed: a small floating pill bottom-left instead of a 45vh drawer.
   The image strip is hidden; the header itself becomes the badge. */
#compare-bar.collapsed {
  left: 16px; right: auto; bottom: 16px;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
#compare-bar.collapsed #compare-images { display: none; }
#compare-bar.collapsed #compare-header { border-bottom: none; padding: 5px 8px 5px 12px; }
#compare-bar.collapsed #compare-clear { display: none; }
#compare-bar.collapsed .cmp-chevron { transform: rotate(0deg); }
#compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: #888;
  border-bottom: 1px solid #2a2a2a;
}
#compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 2px 4px;
}
#compare-toggle .cmp-icon { font-size: 0.95rem; color: var(--accent); }
#compare-count {
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 1.2rem;
  text-align: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.cmp-chevron {
  color: #666;
  font-size: 0.65rem;
  transition: transform 0.15s ease;
  transform: rotate(180deg);
}
#compare-clear {
  background: none; border: none; color: #666;
  cursor: pointer; font-size: 0.78rem;
  padding: 2px 6px;
}
#compare-clear:hover { color: #e06c75; }
/* On phones the side-by-side comparison strip can't show images big
   enough to be useful — comparison fundamentally needs horizontal room.
   Below this width we hide the compare bar and the per-card Compare
   button entirely. (!important so it beats the inline display the JS
   sets when something is pinned, e.g. after resizing down from desktop.) */
@media (max-width: 640px) {
  #compare-bar { display: none !important; }
  .dl-btn.cmp-action { display: none !important; }
}
#compare-images {
  display: flex;
  gap: 10px;
  padding: 10px;
  overflow-x: auto;
  max-height: 45vh;
}
.cmp-item {
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cmp-item canvas {
  display: block;
  max-height: calc(45vh - 40px);
  width: auto;
  cursor: pointer;
  border: 1px solid #333;
  border-radius: 3px;
}
.cmp-item canvas:hover { border-color: var(--danger); }
.cmp-label {
  font-size: 0.7rem; color: #aaa;
  display: flex; justify-content: space-between; align-items: center;
}
.cmp-remove {
  background: none; border: none; color: #555;
  cursor: pointer; font-size: 0.78rem; padding: 0 2px;
}
.cmp-remove:hover { color: var(--danger); }
/* section headers inside the gallery grid */
.gallery-section-header {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  color: #888;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 4px;
  margin-top: 0.75rem;
}
.gallery-credit {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: #888;
  padding: 0.25rem 0 0.5rem;
}
.gallery-credit a { color: var(--accent); text-decoration: none; }
.gallery-credit a:hover { text-decoration: underline; }
/* cursor on gallery canvases */
.card canvas { cursor: zoom-in; }
.card canvas.pinned { outline: 2px solid var(--accent); outline-offset: -2px; }
/* zoom modal */
#zoom-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 300;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#zoom-modal.open { display: flex; }
#zoom-modal canvas {
  max-width: 92vw;
  max-height: 92vh;
  image-rendering: pixelated;
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
  cursor: zoom-out;
}
#zoom-status {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #bbb;
  background: rgba(0,0,0,0.55);
  padding: 4px 10px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
#zoom-status.show { opacity: 1; }
/* ── Wide-screen two-column layout ──────────────────────────────────── */
@media (min-width: 1000px) and (orientation: landscape) {
  body {
    height: 100vh;
    overflow: hidden;
    padding: 0;
  }
  #layout {
    display: grid;
    grid-template-columns: minmax(360px, 32%) 1fr;
    gap: 1rem;
    height: 100vh;
    padding: 1rem;
  }
  #left-pane,
  #right-pane {
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.5rem;
  }
  #left-pane {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  #editor-wrap { flex: 1 1 auto; min-height: 0; }
  .editor {
    flex: 1 1 auto;
    min-height: 200px;
    display: flex;
  }
  #program-hl,
  textarea#program {
    flex: 1 1 auto;
    min-height: 200px;
    height: 100%;
  }
  textarea#program { resize: none; }
}
