/* Canvas — the project's shared board (canvas.js). Classes are prefixed cv-. */

.cv-root {
  /* paper colours for notes, mixed from the Black Tide tokens */
  --cv-parchment: color-mix(in oklab, var(--bronze-hi) 82%, var(--pearl));
  --cv-tide: color-mix(in oklab, var(--shaft) 70%, var(--pearl));
  --cv-verdigris: color-mix(in oklab, var(--verdigris) 72%, var(--pearl));
  --cv-rose: color-mix(in oklab, var(--blood) 45%, var(--pearl));
  --cv-paper-ink: color-mix(in oklab, var(--abyss) 88%, var(--bronze));
  --cv-glass: rgba(6, 16, 27, .78);

  position: relative; height: 100%; min-height: 420px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 50% 0%, rgba(20, 54, 80, .35), transparent 60%), var(--abyss);
  user-select: none; -webkit-user-select: none;
  /* the HUD's layout depends on the board's own width (the sidebar may be open), not the window's */
  container: cv-root / inline-size;
}
/* a soft lens vignette above the board, below the controls */
.cv-root::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(130% 110% at 50% 45%, transparent 58%, rgba(1, 3, 6, .55));
}

/* ---------- stage + world ---------- */
.cv-stage {
  position: absolute; inset: 0; z-index: 1; overflow: hidden; touch-action: none; cursor: default; outline: none;
  background-color: transparent;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(159, 211, 224, .2) 1.1px, transparent 1.6px),
    radial-gradient(circle at 1px 1px, rgba(159, 211, 224, .085) .9px, transparent 1.4px);
}
.cv-stage:focus-visible { box-shadow: inset 0 0 0 2px rgba(201, 160, 99, .55); }
.cv-stage.is-space { cursor: grab; }
.cv-stage.is-panning, .cv-stage.is-space.is-panning { cursor: grabbing; }
.cv-stage[data-tool="note"], .cv-stage[data-tool="text"], .cv-stage[data-tool="frame"] { cursor: crosshair; }
.cv-stage.is-moving-items { cursor: grabbing; }
.cv-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cv-world.is-moving { will-change: transform; }
.cv-layer { position: absolute; left: 0; top: 0; }
.cv-frames { --cv-inv: 1; }

/* ---------- items ---------- */
.cv-item { position: absolute; left: 0; top: 0; transform-origin: 0 0; contain: layout style; }
.can-edit .cv-items > .cv-item { cursor: grab; }
.cv-stage.is-panning .cv-item, .cv-stage.is-space .cv-item { cursor: inherit; }

/* note — sticky paper */
.cv-note {
  --c: var(--cv-parchment);
  border-radius: 3px 3px 14px 3px; background: linear-gradient(165deg, color-mix(in oklab, var(--c) 92%, white) 0%, var(--c) 55%, color-mix(in oklab, var(--c) 88%, black) 100%);
  color: var(--cv-paper-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 14px 34px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.cv-note::after { /* folded corner */
  content: ""; position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 0 0 14px 0;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, .14) 50%);
}
.cv-note-body { position: absolute; inset: 0; padding: 16px 18px; font: 500 15px/1.45 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); }
.cv-note-body::first-line { font-weight: 650; }
.cv-ph { opacity: .45; font-style: italic; font-weight: 400; }
.cv-note.cv-c-tide { --c: var(--cv-tide); }
.cv-note.cv-c-verdigris { --c: var(--cv-verdigris); }
.cv-note.cv-c-rose { --c: var(--cv-rose); }
.cv-note.cv-c-pearl { --c: var(--pearl); }
.cv-note.cv-c-abyss { --c: var(--tide-2); color: var(--pearl); box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 34px rgba(0, 0, 0, .5); }
.cv-note.cv-c-abyss .cv-note-body { font-family: var(--serif); font-size: 18px; line-height: 1.35; }
.cv-note.cv-c-abyss .cv-note-body::first-line { font: 500 13px/1.6 var(--mono); letter-spacing: .12em; color: var(--bronze-hi); }

/* text — heading set in the display face */
.cv-text { --c: var(--pearl); color: var(--c); font-family: var(--display); font-weight: 500; letter-spacing: .05em; line-height: 1.25; white-space: pre; }
.cv-text-body { white-space: pre; text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.cv-text.cv-c-bronze { --c: var(--bronze-hi); }
.cv-text.cv-c-tide { --c: var(--shaft); }
.cv-text.cv-c-verdigris { --c: var(--verdigris); }
.cv-text.cv-c-rose { --c: color-mix(in oklab, var(--blood) 70%, var(--pearl)); }

/* frame — a labelled region; its inside is open board (pan / marquee), it is grabbed by label or edge */
.cv-frame { --c: var(--shaft); pointer-events: none; }
.cv-frame-box {
  position: absolute; inset: 0; border-radius: 18px;
  border: calc(1.5px * var(--cv-inv)) solid color-mix(in oklab, var(--c) 42%, transparent);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 7%, transparent), color-mix(in oklab, var(--c) 3%, transparent));
}
.cv-frame-label {
  position: absolute; left: 0; bottom: 100%; max-width: 100%; margin-bottom: calc(8px * var(--cv-inv));
  display: flex; align-items: center; height: calc(26px * var(--cv-inv)); padding: 0 calc(11px * var(--cv-inv));
  border-radius: calc(8px * var(--cv-inv)); background: color-mix(in oklab, var(--c) 14%, rgba(2, 5, 9, .8));
  border: calc(1px * var(--cv-inv)) solid color-mix(in oklab, var(--c) 40%, transparent);
  color: color-mix(in oklab, var(--c) 85%, var(--pearl)); font: 500 calc(11.5px * var(--cv-inv))/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  pointer-events: auto; cursor: grab; white-space: nowrap;
}
.cv-frame-edge { position: absolute; pointer-events: auto; cursor: grab; }
.cv-frame-edge.e-n { left: 0; right: 0; top: calc(-6px * var(--cv-inv)); height: calc(12px * var(--cv-inv)); }
.cv-frame-edge.e-s { left: 0; right: 0; bottom: calc(-6px * var(--cv-inv)); height: calc(12px * var(--cv-inv)); }
.cv-frame-edge.e-w { top: 0; bottom: 0; left: calc(-6px * var(--cv-inv)); width: calc(12px * var(--cv-inv)); }
.cv-frame-edge.e-e { top: 0; bottom: 0; right: calc(-6px * var(--cv-inv)); width: calc(12px * var(--cv-inv)); }
.cv-frame.cv-c-bronze { --c: var(--bronze); }
.cv-frame.cv-c-verdigris { --c: var(--verdigris); }
.cv-frame.cv-c-rose { --c: var(--blood); }
.cv-frame.cv-c-pearl { --c: var(--pearl); }
.cv-stage.is-panning .cv-frame-label, .cv-stage.is-panning .cv-frame-edge { cursor: inherit; }

/* element + take cards */
.cv-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface)); border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
}
.cv-card-media { flex: 1 1 auto; min-height: 0; border-radius: 0; }
.cv-card-media::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(2, 5, 9, .45)); pointer-events: none; }
.cv-card-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); background: repeating-linear-gradient(135deg, rgba(159, 211, 224, .03) 0 10px, transparent 10px 20px); }
.cv-card-foot { flex: none; height: 64px; padding: 9px 13px 10px; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-top: 1px solid var(--line); min-width: 0; }
.cv-card-foot .eyebrow { font-size: 9.5px; }
.cv-card-name { font: 600 14px/1.2 var(--sans); color: var(--pearl); }
.cv-card-foot .tagpill { align-self: flex-start; font-size: 11px; cursor: inherit; }
.cv-take .cv-card-foot { justify-content: flex-start; padding-top: 10px; }
.cv-card-prompt { font-size: 12px; line-height: 1.35; color: var(--muted); }
.cv-media-badge { position: absolute; left: 10px; top: 10px; z-index: 1; }

/* images */
.cv-media { position: absolute; inset: 0; border-radius: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35); }
.cv-cap {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 8px; border-radius: 6px;
  background: rgba(2, 5, 9, .72); color: var(--pearl); font: 11px/1.4 var(--mono); opacity: 0; transition: opacity var(--t); pointer-events: none;
}
.cv-image:hover .cv-cap { opacity: 1; }

/* inline editing */
.cv-item.is-editing { cursor: text; }
.cv-item.is-editing .cv-note-body, .cv-item.is-editing .cv-text-body { visibility: hidden; }
.cv-edit {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; outline: none; resize: none; overflow: auto;
  background: transparent; color: inherit; font: inherit; letter-spacing: inherit; user-select: text; -webkit-user-select: text; cursor: text;
}
.cv-note .cv-edit { padding: 16px 18px; font: 500 15px/1.45 var(--sans); }
.cv-note.cv-c-abyss .cv-edit { font-family: var(--serif); font-size: 18px; line-height: 1.35; }
.cv-text .cv-edit { padding: 0; line-height: 1.25; white-space: pre; overflow: hidden; caret-color: var(--bronze); }
.cv-note .cv-edit { caret-color: var(--cv-paper-ink); }

/* uploads in progress */
.cv-ghost {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px;
  border-radius: 10px; border: 1.5px dashed rgba(201, 160, 99, .5); background: rgba(6, 16, 27, .7); color: var(--muted); font: 12px var(--mono);
}
.cv-ghost > span { max-width: 100%; }

/* ---------- screen-space overlay ---------- */
.cv-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.cv-outlines > .cv-sel, .cv-groupbox, .cv-marquee, .cv-handle { position: absolute; left: 0; top: 0; }
.cv-sel { border: 1.5px solid var(--bronze); border-radius: 4px; box-shadow: 0 0 0 1px rgba(2, 5, 9, .5), 0 0 24px rgba(201, 160, 99, .18); }
.cv-groupbox { border: 1px dashed rgba(240, 220, 174, .6); border-radius: 6px; margin: -6px 0 0 -6px; padding: 6px; box-sizing: content-box; }
.cv-marquee { border: 1px solid rgba(159, 211, 224, .75); background: rgba(159, 211, 224, .07); border-radius: 3px; }
.cv-marquee.is-frame { border: 1.5px dashed var(--shaft); background: rgba(159, 211, 224, .05); border-radius: 14px; }
.cv-handle {
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 4px; background: var(--pearl); border: 2px solid var(--bronze);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5); pointer-events: auto; touch-action: none;
}
.cv-handle::before { content: ""; position: absolute; inset: -9px; } /* larger touch target */
.cv-handle.h-nw, .cv-handle.h-se { cursor: nwse-resize; }
.cv-handle.h-ne, .cv-handle.h-sw { cursor: nesw-resize; }

/* ---------- glass controls ---------- */
.cv-head, .cv-status, .cv-tools, .cv-ctx, .cv-mini, .cv-banner {
  position: absolute; z-index: 10; background: var(--cv-glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: var(--shadow);
}
.cv-head { top: 14px; left: 14px; display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 7px; border-radius: 16px; max-width: calc(100% - 28px); }
.cv-title { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cv-title .eyebrow { color: var(--bronze); font-size: 9.5px; display: flex; max-width: 220px; }
.cv-title h1 { font-size: 17px; line-height: 1; letter-spacing: .14em; }
.cv-tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: rgba(2, 5, 9, .55); border: 1px solid var(--line); margin-left: 4px; }
.cv-tab { height: 26px; padding: 0 11px; display: inline-flex; align-items: center; border-radius: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; transition: background var(--t), color var(--t); }
.cv-tab:hover { color: var(--ink); }
.cv-tab.active { background: var(--tide-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

.cv-status { top: 14px; right: 14px; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 14px; }
.cv-status-pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 9px; font: 500 11.5px var(--mono); color: var(--muted); white-space: nowrap; }
.cv-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px currentColor; color: var(--ok); flex: none; }
.cv-status-pill[data-state="pending"] .cv-status-dot { background: var(--bronze); color: var(--bronze); }
.cv-status-pill[data-state="saving"] .cv-status-dot, .cv-status-pill[data-state="loading"] .cv-status-dot { background: var(--shaft); color: var(--shaft); animation: cv-pulse 1s ease-in-out infinite; }
.cv-status-pill[data-state="error"] { color: #f3b1aa; }
.cv-status-pill[data-state="error"] .cv-status-dot, .cv-status-pill[data-state="conflict"] .cv-status-dot { background: var(--blood); color: var(--blood); }
.cv-status-pill[data-state="conflict"] { color: var(--warn); }
.cv-status-pill[data-state="readonly"] .cv-status-dot { background: var(--faint); color: transparent; }
@keyframes cv-pulse { 50% { opacity: .35; } }

.cv-banner {
  top: 74px; left: 0; right: 0; margin-inline: auto; width: min(640px, calc(100% - 28px)); display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 14px; border-radius: 14px; border-color: rgba(232, 194, 106, .4); color: #f3dca4; animation: rise .25s var(--ease) both;
}
.cv-banner b { display: block; color: var(--warn); font-weight: 600; }
.cv-banner span { font-size: 12.5px; color: var(--muted); }

.cv-tools {
  bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 6px; border-radius: 16px;
  max-width: calc(100% - 24px);
}
.cv-tools::-webkit-scrollbar { display: none; }
.cv-tool {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 0; border-radius: 11px; background: none; color: var(--muted); cursor: pointer;
  transition: background var(--t), color var(--t), box-shadow var(--t);
}
.cv-tool:hover { background: rgba(159, 211, 224, .08); color: var(--ink); }
.cv-tool[aria-pressed="true"] { background: var(--bronze-dim); color: var(--bronze-hi); box-shadow: inset 0 0 0 1px rgba(201, 160, 99, .5); }
.cv-sep { width: 1px; height: 22px; margin: 0 5px; background: var(--line-2); flex: none; }
.cv-zoom-label { min-width: 58px; font: 500 12px var(--mono); color: var(--pearl); }
.cv-viewonly { margin: 0 8px 0 4px; }
/* tooltips inside a scrolling toolbar would be clipped; the toolbar is short enough to fit on desktop */
@media (max-width: 900px) {
  .cv-tools { overflow-x: auto; scrollbar-width: none; }
  .cv-tools [data-tip]:hover::after { display: none; }
}

/* context bar over the selection */
.cv-ctx { left: 0; top: 0; z-index: 12; /* above the minimap and banner it can be clamped next to */ display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 13px; animation: fade .12s ease both; }
.cv-ctx .sep, .cv-ctx .cv-sep { height: 18px; margin: 0 4px; }
.cv-ctx-count { padding: 0 8px; color: var(--muted); font-size: 11.5px; }
.cv-swatches { display: flex; gap: 4px; padding: 0 4px; }
.cv-swatch {
  width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 2px solid rgba(2, 5, 9, .6); cursor: pointer; flex: none;
  box-shadow: 0 0 0 1px var(--line-2); transition: transform var(--t), box-shadow var(--t);
}
.cv-swatch:hover { transform: scale(1.12); }
.cv-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bronze-hi); }
.cv-swatch.cv-c-parchment { background: var(--cv-parchment); }
.cv-swatch.cv-c-tide { background: var(--cv-tide); }
.cv-swatch.cv-c-verdigris { background: var(--cv-verdigris); }
.cv-swatch.cv-c-rose { background: var(--cv-rose); }
.cv-swatch.cv-c-pearl { background: var(--pearl); }
.cv-swatch.cv-c-abyss { background: var(--tide-2); }
.cv-swatch.cv-c-bronze { background: var(--bronze); }

/* minimap */
.cv-mini { right: 14px; bottom: 18px; padding: 6px; border-radius: 14px; }
/* The creator toolbar is ~600 px wide and centred; below ~1100 px of board it would run under the minimap,
   so the minimap steps up above the toolbar's band instead. */
@container cv-root (max-width: 1100px) {
  .cv-mini { bottom: 84px; }
}
.cv-mini-canvas { width: 200px; height: 128px; border-radius: 9px; background: rgba(2, 5, 9, .55); cursor: pointer; touch-action: none; }

/* empty board */
.cv-empty {
  position: absolute; z-index: 4; inset: 0 0 6% 0; margin-inline: auto; width: min(560px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; pointer-events: none; animation: rise .4s var(--ease) both;
}
.cv-empty > * { pointer-events: auto; }
.cv-empty-art {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: var(--bronze); margin-bottom: 6px;
  background: radial-gradient(circle, rgba(201, 160, 99, .2), transparent 70%); border: 1px solid rgba(201, 160, 99, .3);
  box-shadow: 0 0 60px rgba(201, 160, 99, .12);
}
.cv-empty h2 { font-size: 22px; letter-spacing: .14em; }
.cv-empty p.serif-i { font-size: 20px; color: var(--muted); }
.cv-empty-actions { justify-content: center; margin-top: 10px; }
.cv-empty-tip { margin-top: 6px; font-size: 11px; color: var(--faint); letter-spacing: .04em; pointer-events: none; }

/* loading / error */
.cv-loading { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--abyss); }
.cv-loading .empty { max-width: 460px; }

/* dropping files */
.cv-drop { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(2, 5, 9, .55); pointer-events: none; animation: fade .12s ease both; }
.cv-drop::before { content: ""; position: absolute; inset: 14px; border: 2px dashed rgba(201, 160, 99, .6); border-radius: 22px; }
.cv-drop-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 36px; border-radius: 18px; background: var(--cv-glass); border: 1px solid rgba(201, 160, 99, .4); color: var(--bronze-hi); box-shadow: var(--shadow); }
.cv-drop-card b { font: 500 16px var(--display); letter-spacing: .1em; color: var(--pearl); }

/* ---------- pickers (in modals) ---------- */
.cv-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; min-height: 160px; align-content: start; }
.cv-pick-grid.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cv-pick-grid > .empty, .cv-pick-grid > .cv-pick-loading { grid-column: 1 / -1; }
.cv-pick-loading { display: grid; place-items: center; padding: 50px; }
.cv-pick-tile {
  display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; text-align: left; cursor: pointer; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.cv-pick-tile:hover { border-color: var(--line-2); }
.cv-pick-tile:hover .thumb > img { transform: scale(1.03); }
.cv-pick-tile[aria-pressed="true"] { border-color: rgba(201, 160, 99, .8); box-shadow: 0 0 0 2px rgba(201, 160, 99, .35); }
.cv-pick-media { aspect-ratio: 4 / 3; border-radius: 0; }
.cv-pick-check {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(2, 5, 9, .65); border: 1.5px solid rgba(231, 237, 233, .6); color: transparent; transition: all var(--t);
}
.cv-pick-tile[aria-pressed="true"] .cv-pick-check { background: var(--bronze); border-color: var(--bronze-hi); color: #1a1206; }
.cv-pick-text { padding: 8px 10px 10px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cv-pick-title { font-weight: 600; font-size: 12.5px; }
.cv-pick-text .mono { font-size: 11px; }
.cv-pick-count { margin-right: auto; align-self: center; font-size: 12.5px; }

.cv-scenes { display: flex; flex-direction: column; gap: 18px; max-height: min(58vh, 560px); overflow: auto; padding-right: 4px; }
.cv-scene-group { display: flex; flex-direction: column; gap: 6px; }
.cv-scene-group > .eyebrow { color: var(--bronze); padding: 0 2px 2px; }
.cv-scene-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(10, 24, 40, .5); color: var(--ink); transition: background var(--t), border-color var(--t);
}
.cv-scene-row:hover { background: var(--surface-3); border-color: var(--line-2); }
.cv-scene-row b { font-size: 13px; font-weight: 600; }
.cv-scene-row .serif-i { font-size: 15px; line-height: 1.3; }
.cv-scene-num {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; font-size: 13px;
  color: var(--bronze-hi); background: var(--bronze-dim); border: 1px solid rgba(201, 160, 99, .35);
}

.cv-lightbox { display: grid; place-items: center; background: #010306; border-radius: var(--r-lg); min-height: 240px; }
.cv-lightbox-media { max-width: 100%; max-height: calc(100vh - 220px); object-fit: contain; }

.cv-help { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.cv-help section { display: flex; flex-direction: column; gap: 7px; }
.cv-help .eyebrow { color: var(--bronze); margin-bottom: 2px; }
.cv-help-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.cv-help-row > span:last-child { text-align: right; }
.cv-help-keys { display: inline-flex; gap: 4px; flex: none; }
.cv-help-keys kbd { padding: 0 6px; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .cv-head { top: 10px; left: 10px; gap: 8px; padding: 5px 7px 5px 5px; max-width: calc(100% - 20px); }
  .cv-title { display: none; }
  .cv-tabs { margin-left: 0; }
  .cv-status { top: 62px; right: 10px; }
  .cv-mini { display: none; }
  .cv-status [aria-label="Show or hide the minimap"] { display: none; }
  .cv-tools { bottom: 10px; }
  .cv-tool { width: 36px; height: 36px; }
  .cv-help { grid-template-columns: 1fr; }
  .cv-banner { top: 108px; flex-wrap: wrap; }
  .cv-empty p.serif-i { font-size: 17px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .cv-title .eyebrow { max-width: 140px; }
}
