/* Ganesha blueprint. Tokens mirror packages/design-system/src/tokens.css so the
   board reads as the same product; the ground is the atelier table from the
   approved daylight illustration, and every piece is a sheet lying on it. */

@font-face { font-family: 'Figtree'; src: url('assets/fonts/figtree-latin.woff2') format('woff2'); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; src: url('assets/fonts/figtree-latin-ext.woff2') format('woff2'); font-weight: 300 900; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --btn: #6C3BEE;
  --purple-hover: #5327d6;
  --ink: #17151F;
  --ink-70: rgba(23, 21, 31, .7);
  --ink-55: rgba(23, 21, 31, .55);
  --ink-40: rgba(23, 21, 31, .4);
  --ink-12: rgba(23, 21, 31, .12);
  --ink-07: rgba(23, 21, 31, .07);
  --table: #F1EEE8;
  --band: #E9E5DD;
  --sheet: #FFFFFF;
  --sheet-2: #FBFAF8;
  --chrome: rgba(255, 255, 255, .92);
  --purple-tint: color-mix(in oklab, var(--btn) 9%, #fff);
  --purple-line: color-mix(in oklab, var(--btn) 30%, transparent);
  --purple-soft: color-mix(in oklab, var(--btn) 45%, #fff);
  --live: #2FA36B;
  --defect: #E8931C;
  --built: #6C3BEE;
  --planned: #8A8794;
  --unverified: #B9B4C2;
  --person: #E8931C;
  --agent: #6C3BEE;
  --auto: #2F7BD6;
  --shadow-sheet: 0 1px 0 rgba(23,21,31,.05), 0 10px 26px -14px rgba(23,21,31,.28);
  --shadow-float: 0 1px 0 rgba(23,21,31,.06), 0 18px 48px -18px rgba(23,21,31,.38);
  --font-ui: 'Figtree', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F2EFF8;
    --ink-70: rgba(242, 239, 248, .74);
    --ink-55: rgba(242, 239, 248, .58);
    --ink-40: rgba(242, 239, 248, .42);
    --ink-12: rgba(242, 239, 248, .14);
    --ink-07: rgba(242, 239, 248, .08);
    --table: #1B1826;
    --band: #221E30;
    --sheet: #2A2539;
    --sheet-2: #302A41;
    --chrome: rgba(36, 32, 50, .92);
    --purple-tint: color-mix(in oklab, var(--btn) 26%, #1B1826);
    --purple-line: color-mix(in oklab, var(--btn) 60%, transparent);
    --purple-soft: color-mix(in oklab, var(--btn) 70%, #fff);
    --btn: #8E66FF;
    --planned: #A7A2B4;
    --unverified: #6F6A7D;
    --shadow-sheet: 0 1px 0 rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.7);
    --shadow-float: 0 1px 0 rgba(0,0,0,.3), 0 22px 54px -18px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"] {
    --ink: #F2EFF8;
    --ink-70: rgba(242, 239, 248, .74);
    --ink-55: rgba(242, 239, 248, .58);
    --ink-40: rgba(242, 239, 248, .42);
    --ink-12: rgba(242, 239, 248, .14);
    --ink-07: rgba(242, 239, 248, .08);
    --table: #1B1826;
    --band: #221E30;
    --sheet: #2A2539;
    --sheet-2: #302A41;
    --chrome: rgba(36, 32, 50, .92);
    --purple-tint: color-mix(in oklab, var(--btn) 26%, #1B1826);
    --purple-line: color-mix(in oklab, var(--btn) 60%, transparent);
    --purple-soft: color-mix(in oklab, var(--btn) 70%, #fff);
    --btn: #8E66FF;
    --planned: #A7A2B4;
    --unverified: #6F6A7D;
    --shadow-sheet: 0 1px 0 rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.7);
    --shadow-float: 0 1px 0 rgba(0,0,0,.3), 0 22px 54px -18px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--font-ui); color: var(--ink); background: var(--table); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
kbd { font: 600 11px var(--font-mono); padding: 1px 6px; border-radius: 6px; background: var(--ink-07); color: var(--ink-55); }

/* ---------- Stage and world ---------- */
#stage { position: fixed; inset: 0; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage.dragging { cursor: grabbing; }
#world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.board { position: absolute; }
.board-head { display: flex; align-items: baseline; gap: 56px; margin-bottom: 70px; }
.board-title { font-size: 230px; font-weight: 800; letter-spacing: -.035em; line-height: 1; margin: 0; }
.board-title em { font-style: normal; color: var(--btn); }
.board-sub { font-size: 52px; color: var(--ink-55); font-weight: 500; max-width: 1800px; line-height: 1.25; }

/* ---------- Journey: the Airbnb-style grid ---------- */
.journey { display: grid; column-gap: 0; row-gap: 0; }
.j-corner, .j-lane, .j-stage, .j-cell { padding: 34px 36px; }
.j-stage { padding-bottom: 26px; display: flex; flex-direction: column; gap: 10px; }
.j-stage .n { font: 600 26px var(--font-mono); color: var(--btn); }
.j-stage .t { font-size: 62px; font-weight: 750; letter-spacing: -.02em; line-height: 1.05; }
.j-stage .s { font-size: 28px; color: var(--ink-55); line-height: 1.3; max-width: 26ch; }
.j-lane { display: flex; flex-direction: column; gap: 14px; padding-left: 0; }
.j-lane .t { font-size: 104px; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.j-lane .s { font-size: 28px; color: var(--ink-55); line-height: 1.3; max-width: 18ch; }
.j-lane .modes { display: flex; flex-direction: column; gap: 8px; font-size: 24px; color: var(--ink-70); margin-top: 6px; }
.j-lane .modes span { display: flex; align-items: center; gap: 12px; }
.j-lane .modes .mode { width: 15px; height: 15px; border-radius: 50%; }
.j-cell { min-height: 120px; display: flex; flex-direction: column; gap: 30px; }
.j-cell.band { background: var(--band); }
.j-cell.first-band { border-radius: 28px 28px 0 0; }
.j-cell.last-band { border-radius: 0 0 28px 28px; }
.j-cell.scene-cell { padding: 14px 18px; background: none; }

.scene { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 3 / 2; background: var(--band); box-shadow: var(--shadow-sheet); cursor: pointer; }
.scene img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 30px 24px; font-size: 30px; font-weight: 600; line-height: 1.25; color: #fff; background: linear-gradient(to top, rgba(23,21,31,.72), transparent); opacity: 0; transition: opacity .18s var(--ease); }
.scene:hover .cap, body[data-lod="near"] .scene .cap { opacity: 1; }
.scene.empty { display: grid; place-items: center; color: var(--ink-40); font-size: 28px; }

.group { display: flex; flex-direction: column; gap: 16px; }
.pill { align-self: flex-start; font-size: 22px; font-weight: 700; padding: 5px 16px 6px; border-radius: 999px; color: #fff; background: var(--ink); letter-spacing: .01em; }
.pill.client { background: #E0446C; }
.pill.team { background: #1F8FA8; }
.pill.ganesha { background: var(--ink); }
.pill.agent { background: var(--btn); }
.pill.machine { background: #5E6B7A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.ganesha { background: #F2EFF8; color: #17151F; } }
:root[data-theme="dark"] .pill.ganesha { background: #F2EFF8; color: #17151F; }

/* ---------- Pieces ---------- */
[data-id] { cursor: pointer; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: var(--sheet); border-radius: 16px; padding: 18px 20px 20px; box-shadow: var(--shadow-sheet); display: flex; flex-direction: column; gap: 8px; transition: transform .16s var(--ease), box-shadow .16s var(--ease); position: relative; }
.card:hover, .chip:hover, .shot:hover, .node:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.card .h { display: flex; align-items: center; gap: 12px; font-size: 27px; font-weight: 700; line-height: 1.15; }
.card .w { font-size: 22px; color: var(--ink-70); line-height: 1.32; }
.card.wide { grid-column: 1 / -1; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.chip { display: flex; align-items: center; gap: 12px; background: var(--sheet); border-radius: 10px; padding: 11px 16px 12px; font-size: 23px; font-weight: 550; line-height: 1.2; box-shadow: 0 1px 0 var(--ink-07); transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
.chip .x { flex: 1; }
.chip .mode { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.mode.person { background: var(--person); } .mode.agent { background: var(--agent); } .mode.auto { background: var(--auto); }

.shots { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.shot { width: 212px; display: flex; flex-direction: column; gap: 10px; transition: transform .16s var(--ease); }
.shot.desk { width: 330px; }
.shot.wide { width: 330px; }
.shot .frame { border-radius: 14px; border: 4px solid var(--ink); background: var(--sheet); overflow: hidden; aspect-ratio: 9 / 16; position: relative; box-shadow: var(--shadow-sheet); }
.shot.desk .frame, .shot.wide .frame { aspect-ratio: 16 / 10.4; border-width: 3px; border-radius: 10px; }
.shot .frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.shot .frame.none { border-style: dashed; border-color: var(--ink-40); box-shadow: none; background: repeating-linear-gradient(135deg, transparent 0 14px, var(--ink-07) 14px 16px); display: flex; flex-direction: column; gap: 9px; padding: 22px 16px; }
.shot .frame.none i { display: block; height: 9px; border-radius: 9px; background: var(--ink-07); }
.shot .frame.none i:nth-child(1) { width: 60%; height: 14px; background: var(--ink-12); } .shot .frame.none i:nth-child(3) { width: 80%; } .shot .frame.none i:nth-child(4) { width: 45%; }
.shot .frame.none b { margin-top: auto; font: 600 15px var(--font-mono); color: var(--ink-40); }
.shot .l { display: flex; gap: 9px; align-items: flex-start; font-size: 20px; font-weight: 650; line-height: 1.2; }
.shot .l .st { margin-top: 5px; }

/* status glyphs: shape and colour both carry the state */
.st { width: 15px; height: 15px; flex: none; display: inline-block; }
.st.live { background: var(--live); border-radius: 50%; }
.st.defect { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 15px solid var(--defect); }
.st.built { background: var(--built); transform: rotate(45deg) scale(.82); border-radius: 2px; }
.st.planned { border: 3px solid var(--planned); border-radius: 50%; }
.st.unverified { border: 3px dashed var(--unverified); border-radius: 50%; }

body[data-filter] [data-status] { opacity: .16; filter: saturate(.3); }
body[data-filter="live"] [data-status="live"], body[data-filter="defect"] [data-status="defect"], body[data-filter="built"] [data-status="built"], body[data-filter="planned"] [data-status="planned"], body[data-filter="unverified"] [data-status="unverified"] { opacity: 1; filter: none; }
.pulse { animation: pulse 1.5s var(--ease) 1; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--btn); } 100% { box-shadow: 0 0 0 46px transparent; } }
.sel { outline: 5px solid var(--btn); outline-offset: 5px; }

/* far away the small text turns into quiet bars, as in the reference film */
body[data-lod="far"] .card .w, body[data-lod="far"] .shot .l, body[data-lod="far"] .node .w { opacity: 0; }
body[data-lod="far"] .chip .x, body[data-lod="far"] .card .h span, body[data-lod="far"] .node .h span, body[data-lod="far"] .deal .h span, body[data-lod="far"] .deal .w { color: transparent; background: var(--ink-12); border-radius: 6px; }
.card .w, .shot .l, .node .w { transition: opacity .18s linear; }

/* ---------- Graph boards ---------- */
.graph { position: relative; }
.layer { display: grid; grid-template-columns: 420px 1fr; align-items: center; padding: 34px 0; }
.layer.boxed { background: var(--band); border-radius: 28px; margin: 12px 0; }
.layer .lt { font-size: 40px; font-weight: 750; letter-spacing: -.01em; line-height: 1.1; padding: 0 36px 0 30px; }
.layer .lt small { display: block; font-size: 24px; font-weight: 500; color: var(--ink-55); margin-top: 8px; line-height: 1.3; }
.layer .ln { display: flex; flex-wrap: wrap; gap: 26px 34px; justify-content: space-around; padding-right: 30px; }
.node { width: 400px; background: var(--sheet); border-radius: 16px; padding: 20px 22px 22px; box-shadow: var(--shadow-sheet); display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 2; transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
.node.person { background: var(--ink); color: var(--table); }
.node.person .w { color: color-mix(in oklab, var(--table) 70%, transparent); }
.node .h { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 700; line-height: 1.15; }
.node .w { font-size: 22px; color: var(--ink-70); line-height: 1.32; }
.edges { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: visible; }
.edges path { fill: none; stroke: var(--purple-soft); stroke-width: 3; opacity: .42; transition: opacity .15s, stroke-width .15s; }
.edges path.hot { stroke: var(--btn); stroke-width: 6; opacity: 1; }
.edges.dim path:not(.hot) { opacity: .1; }
.edges text { font: 600 19px var(--font-ui); fill: var(--btn); opacity: 0; }
.edges text.hot { opacity: 1; }

/* ---------- Flow board (prospecting) ---------- */
.flow { display: flex; flex-direction: column; gap: 46px; }
.lanes { display: grid; grid-template-columns: 1fr; gap: 30px; }
.flane { display: grid; grid-template-columns: 420px 1fr; align-items: stretch; background: var(--band); border-radius: 28px; padding: 34px 30px; }
.flane .lt { font-size: 54px; font-weight: 780; letter-spacing: -.02em; line-height: 1.05; padding-right: 30px; }
.flane .lt small { display: block; font-size: 25px; font-weight: 500; color: var(--ink-55); margin-top: 12px; line-height: 1.3; }
.steps { display: flex; gap: 0; align-items: stretch; flex-wrap: nowrap; }
.step { display: flex; align-items: stretch; flex: 1 1 0; min-width: 0; }
.step .card { flex: 1; }
.step + .step::before { content: ''; width: 54px; align-self: center; height: 3px; background: var(--purple-soft); margin: 0 4px; border-radius: 3px; flex: none; }
.section-t { font-size: 62px; font-weight: 780; letter-spacing: -.02em; margin: 30px 0 0; }
.section-s { font-size: 28px; color: var(--ink-55); margin: -30px 0 0; max-width: 1700px; line-height: 1.3; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 22px; align-items: start; }
.kcol { background: var(--band); border-radius: 22px; padding: 22px 20px 24px; display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.kcol .kt { font-size: 30px; font-weight: 750; display: flex; justify-content: space-between; align-items: baseline; }
.kcol .kt b { font: 600 22px var(--font-mono); color: var(--ink-40); }
.deal { background: var(--sheet); border-radius: 14px; padding: 16px 18px 18px; box-shadow: var(--shadow-sheet); display: flex; flex-direction: column; gap: 7px; transition: transform .16s var(--ease); }
.deal:hover { transform: translateY(-3px); }
.deal .h { font-size: 30px; font-weight: 720; display: flex; gap: 10px; align-items: center; }
.deal .w { font-size: 23px; color: var(--ink-70); line-height: 1.3; }
.deal .via { align-self: flex-start; font-size: 18px; font-weight: 700; padding: 3px 11px 4px; border-radius: 999px; background: var(--purple-tint); color: var(--btn); }
.deal .via.cold { background: color-mix(in oklab, var(--auto) 14%, var(--sheet)); color: var(--auto); }
.todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.todo .card .own { font: 600 18px var(--font-mono); color: var(--btn); }

/* ---------- Inventory board ---------- */
.inv { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 26px; align-items: start; }
.inv .kcol .chips { grid-template-columns: 1fr; }

/* ---------- Chrome ---------- */
#bar { position: fixed; top: 14px; left: 14px; right: 14px; height: 54px; display: flex; align-items: center; gap: 14px; padding: 0 10px 0 16px; background: var(--chrome); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-radius: 18px; box-shadow: var(--shadow-float); z-index: 20; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; flex: none; }
.brand img { border-radius: 8px; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand-sub { font: 500 12px var(--font-mono); color: var(--ink-55); padding-top: 3px; }
#tabs { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
#tabs::-webkit-scrollbar { display: none; }
#tabs button { white-space: nowrap; padding: 8px 14px; border-radius: 12px; font-size: 14.5px; font-weight: 620; color: var(--ink-70); transition: background .15s, color .15s; }
#tabs button:hover { background: var(--ink-07); color: var(--ink); }
#tabs button.on { background: var(--btn); color: #fff; }
#tabs button.focus::after { content: 'hoje'; font: 700 10px var(--font-mono); margin-left: 7px; padding: 2px 6px; border-radius: 6px; background: color-mix(in oklab, var(--defect) 22%, transparent); color: color-mix(in oklab, var(--defect) 75%, var(--ink)); vertical-align: 1px; }
#tabs button.focus.on::after { background: rgba(255,255,255,.24); color: #fff; }
.bar-right { display: flex; gap: 8px; flex: none; }
.ghost, .solid { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 620; transition: background .15s, transform .1s; }
.ghost { background: var(--ink-07); color: var(--ink-70); }
.ghost:hover { background: var(--ink-12); }
.solid { background: var(--ink); color: var(--table); }
.solid:active, .ghost:active { transform: scale(.97); }

#legend { position: fixed; left: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 20; max-width: calc(100vw - 280px); }
#legend button { display: flex; align-items: center; gap: 9px; padding: 8px 13px; border-radius: 12px; background: var(--sheet); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-sheet); font-size: 13.5px; font-weight: 620; transition: transform .1s, background .15s; }
#legend button .st { transform-origin: center; scale: .8; }
#legend button b { font: 600 12px var(--font-mono); color: var(--ink-40); }
#legend button.on { background: var(--ink); color: var(--table); }
#legend button.on b { color: inherit; opacity: .6; }
#legend .stamp { padding: 8px 13px; font: 500 12px var(--font-mono); color: var(--ink-55); align-self: center; }

#crumb { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; background: var(--chrome); box-shadow: var(--shadow-sheet); font-size: 13.5px; font-weight: 650; z-index: 15; opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
#crumb.on { opacity: 1; }
#crumb i { font-style: normal; color: var(--ink-40); margin: 0 7px; }

#controls { position: fixed; right: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 20; }
#mini { border-radius: 14px; background: var(--chrome); box-shadow: var(--shadow-sheet); cursor: pointer; display: block; }
.zoom { display: flex; background: var(--chrome); border-radius: 12px; box-shadow: var(--shadow-sheet); overflow: hidden; }
.zoom button { width: 38px; height: 36px; font-size: 18px; font-weight: 600; }
.zoom button:hover { background: var(--ink-07); }
.zoom .zoom-pct { width: 62px; font: 600 12px var(--font-mono); }

#hint { position: fixed; left: 50%; top: 82px; transform: translateX(-50%); font-size: 13px; color: var(--ink-55); background: var(--chrome); padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow-sheet); z-index: 14; transition: opacity .4s; pointer-events: none; white-space: nowrap; }
#hint.off { opacity: 0; }
#caption { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: min(760px, calc(100vw - 40px)); text-align: center; font-size: clamp(20px, 2.3vw, 30px); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: var(--ink); background: var(--chrome); padding: 14px 24px 16px; border-radius: 20px; box-shadow: var(--shadow-float); z-index: 30; animation: capin .28s var(--ease); }
@keyframes capin { from { opacity: 0; transform: translate(-50%, 10px); } }
body.touring #bar, body.touring #legend, body.touring #controls, body.touring #hint, body.touring #crumb { opacity: 0; pointer-events: none; }
#bar, #legend, #controls { transition: opacity .3s; }

/* ---------- Drawer ---------- */
#drawer { position: fixed; top: 80px; right: 14px; bottom: 14px; width: min(440px, calc(100vw - 28px)); background: var(--chrome); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-radius: 22px; box-shadow: var(--shadow-float); z-index: 25; transform: translateX(calc(100% + 30px)); transition: transform .2s var(--ease); display: flex; flex-direction: column; overflow: hidden; }
#drawer.open { transform: none; }
.drawer-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink-07); z-index: 2; }
#drawer-body { overflow-y: auto; padding: 22px 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.d-kind { font: 600 12px var(--font-mono); color: var(--btn); letter-spacing: .04em; text-transform: uppercase; padding-right: 44px; }
.d-title { font-size: 27px; font-weight: 780; letter-spacing: -.02em; line-height: 1.12; margin: -8px 0 0; padding-right: 30px; }
.d-what { font-size: 16px; line-height: 1.45; color: var(--ink-70); margin: 0; }
.d-img { border-radius: 12px; border: 1px solid var(--ink-12); overflow: hidden; background: var(--sheet); }
.d-img img { width: 100%; display: block; }
.d-stamp { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--ink-07); }
.d-stamp .st { margin-top: 4px; }
.d-stamp b { display: block; font-size: 15px; }
.d-stamp span { display: block; font-size: 13.5px; color: var(--ink-70); line-height: 1.4; margin-top: 2px; }
.d-sec { display: flex; flex-direction: column; gap: 7px; }
.d-sec h4 { margin: 0; font: 600 11.5px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-40); }
.d-sec p { margin: 0; font-size: 15px; line-height: 1.45; }
.d-sec a { color: var(--btn); word-break: break-all; }
.d-src { font: 500 12.5px/1.5 var(--font-mono); color: var(--ink-70); word-break: break-word; }
.d-links { display: flex; flex-wrap: wrap; gap: 6px; }
.d-links button { display: flex; align-items: center; gap: 8px; padding: 6px 11px 7px; border-radius: 10px; background: var(--sheet); box-shadow: 0 0 0 1px var(--ink-12); font-size: 13.5px; font-weight: 600; text-align: left; }
.d-links button:hover { box-shadow: 0 0 0 1.5px var(--btn); }
.d-links .st { scale: .72; }

/* ---------- Palette ---------- */
#palette { position: fixed; inset: 0; background: rgba(23,21,31,.28); z-index: 40; display: grid; justify-items: center; align-items: start; padding-top: 14vh; }
#palette[hidden] { display: none; }
.palette-box { width: min(620px, calc(100vw - 28px)); background: var(--chrome); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 20px; box-shadow: var(--shadow-float); overflow: hidden; }
#q { width: 100%; border: 0; outline: 0; background: none; font: 600 19px var(--font-ui); color: var(--ink); padding: 18px 20px; }
#results { list-style: none; margin: 0; padding: 0 8px 8px; max-height: 52vh; overflow-y: auto; }
#results li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
#results li.on, #results li:hover { background: var(--ink-07); }
#results li .t { font-size: 15.5px; font-weight: 650; }
#results li .k { margin-left: auto; font: 500 11.5px var(--font-mono); color: var(--ink-40); white-space: nowrap; }

@media (max-width: 720px) {
  #bar { height: 48px; top: 8px; left: 8px; right: 8px; gap: 6px; padding: 0 6px 0 10px; }
  .brand-sub, .ghost span, .ghost kbd, .solid span, .brand-name { display: none; }
  #tabs { margin-left: 0; } #tabs button { padding: 7px 10px; font-size: 13.5px; }
  #legend { left: 8px; bottom: 8px; max-width: calc(100vw - 16px); } #legend button span, #legend .stamp { display: none; }
  #controls { right: 8px; bottom: 58px; } #mini { display: none; }
  #hint { display: none; }
  #drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 62vh; transform: translateY(calc(100% + 30px)); }
  #crumb { top: 64px; font-size: 12.5px; }
  #caption { bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

body.touring .scene .cap { opacity: 0 !important; }

.theme { width: 38px; justify-content: center; padding: 8px 0; }
.theme svg { display: block; }
@media (max-width: 720px) { .theme { width: 34px; } }

/* due dates, questions, timeline */
.card .own { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.due { font: 700 17px var(--font-mono); padding: 2px 9px 3px; border-radius: 8px; background: var(--ink-07); color: var(--ink-70); }
.due.late, .via.due.late { background: color-mix(in oklab, #D8394B 16%, var(--sheet)); color: #C22B3D; }
.deal .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.deal .via.due { background: var(--ink-07); color: var(--ink-70); }
#results li.ask { color: var(--btn); }
.answer { color: var(--ink) !important; font-size: 16.5px !important; line-height: 1.55 !important; }
.cite { display: inline; font: 600 12.5px var(--font-ui); color: var(--btn); background: var(--purple-tint); padding: 1px 8px 2px; border-radius: 8px; margin: 0 2px; }
.cite:hover { box-shadow: 0 0 0 1.5px var(--btn); }
.shimmer { display: flex; flex-direction: column; gap: 10px; }
.shimmer i { height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--ink-07) 25%, var(--ink-12) 50%, var(--ink-07) 75%); background-size: 200% 100%; animation: shim 1.1s linear infinite; }
.shimmer i:nth-child(2) { width: 92%; } .shimmer i:nth-child(3) { width: 78%; } .shimmer i:nth-child(4) { width: 55%; }
@keyframes shim { to { background-position: -200% 0; } }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days button { padding: 6px 11px 7px; border-radius: 10px; background: var(--sheet); box-shadow: 0 0 0 1px var(--ink-12); font-size: 13.5px; font-weight: 600; }
.days button.on { background: var(--btn); color: #fff; box-shadow: none; }
.d-links .dd { font: 600 12px var(--font-mono); color: var(--btn); }
.absent { opacity: .12 !important; }
#pastnote { position: fixed; top: 82px; left: 50%; transform: translateX(-50%); z-index: 22; padding: 9px 16px 10px; border-radius: 999px; background: var(--ink); color: var(--table); font-size: 13.5px; font-weight: 650; box-shadow: var(--shadow-float); }
body.past #crumb, body.past #hint { display: none; }
