/* ============================================================
 * THE DECK — Burke's blueprint (2026-09-18)
 * Silver on black. No consoles: the instruments float on the dark and are
 * faint until they have something to say. Colour comes from the video, the
 * portraits, the globe and the category hues — never from chrome.
 * ============================================================ */
.deck {
  --dk-bg: #050507; --dk-bg-2: #0b0b10; --dk-bg-3: #14141b;
  --dk-ink: #e9e9ee; --dk-ink-2: #c9c9d2; --dk-dim: #8b8b98; --dk-faint: #4a4a56; --dk-line: rgba(233,233,238,.12);
  --dk-lit: #fff3cf;
  --dk-person: #e6a3a3; --dk-place: #8fd3c3; --dk-event: #e6c07a; --dk-thing: #a9d19a;
  --vratio: 1.3333;
  position: fixed; inset: 0; z-index: 30;
  background: var(--dk-bg); color: var(--dk-ink); font-family: var(--font-mono);
  display: flex; flex-direction: column; overflow: hidden;
}
.deck[hidden] { display: none; }
/* a very faint trace of distant star-fields, for texture */
.deck::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 8%, rgba(255,255,255,.25) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 72%, rgba(255,255,255,.22) 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 41%, rgba(255,255,255,.28) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 66%, rgba(255,255,255,.2) 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 93%, rgba(255,255,255,.22) 50%, transparent 51%),
    radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,.18) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 88%, rgba(255,255,255,.22) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 36%, rgba(255,255,255,.2) 50%, transparent 51%),
    radial-gradient(1px 1px at 69% 22%, rgba(255,255,255,.18) 50%, transparent 51%);
  background-size: 640px 640px, 720px 720px, 560px 560px, 800px 800px, 660px 660px, 740px 740px, 600px 600px, 700px 700px, 520px 520px, 780px 780px;
}
.deck > * { position: relative; z-index: 1; min-width: 0; min-height: 0; }

/* the desk: every instrument keeps its size; a call only brightens it. ⤢ maximizes one,
   the video shrinks to a picture-in-picture top-right, Esc (or ⤡) restores. */
.inst-max { display: none; position: absolute; top: 6px; right: 8px; z-index: 6; width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--dk-line); background: rgba(5,5,7,.6); color: var(--dk-dim); font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s; }
.inst-max:hover { color: var(--dk-ink); border-color: var(--dk-dim); }
.inst-timeline .inst-max { top: 4px; right: 200px; }
/* the restore button clears the picture-in-picture */

/* top */
.deck-top { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 12px; color: var(--dk-dim); }
.deck-back { background: transparent; border: 0; color: var(--dk-dim); font: inherit; font-size: 16px; cursor: pointer; padding: 4px 6px; }
.deck-back:hover { color: var(--dk-ink); }
.deck-title { font-family: var(--font-serif); font-size: 13.5px; color: var(--dk-ink-2); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-title .show { color: var(--dk-dim); } .deck-title .sep { color: var(--dk-faint); margin: 0 6px; } .deck-title .title { font-style: italic; color: var(--dk-ink); }
.deck-studio { color: var(--dk-dim); text-decoration: none; font-size: 11px; letter-spacing: .06em; border: 1px solid var(--dk-line); border-radius: 5px; padding: 3px 8px; }
.deck-studio:hover { color: var(--dk-ink); border-color: var(--dk-dim); }
.deck .studio-tag { color: var(--dk-lit); border-color: rgba(255,243,207,.4); }

/* video */
.deck-video { grid-area: video; position: relative; background: #000; aspect-ratio: var(--vratio); height: 46vh; width: auto; max-width: 100%; justify-self: center; overflow: hidden; border-radius: 0 0 6px 6px; }
.deck-video video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.deck .caption {
  position: absolute; left: 8%; right: 8%; bottom: 8px; text-align: center; pointer-events: none;
  font-family: var(--font-serif); font-size: clamp(13px, 1.6vw, 17px); line-height: 1.35; color: #fff; text-shadow: 0 1px 2px #000, 0 0 10px rgba(0,0,0,.9);
}
.deck .caption:empty { display: none; }
.deck .caption mark { background: none; color: inherit; border-bottom: 1.5px solid var(--dk-lit); padding-bottom: 1px; pointer-events: auto; cursor: pointer; }
.deck .caption mark.cat-person { border-color: var(--dk-person); } .deck .caption mark.cat-place { border-color: var(--dk-place); } .deck .caption mark.cat-thing { border-color: var(--dk-thing); }
.deck .play-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.25); border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.deck .play-overlay[hidden] { display: none; }
.deck .play-ring { width: 76px; height: 76px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center; background: rgba(5,5,7,.4); }
.deck .play-ring svg { width: 40px; height: 40px; fill: #fff; }
/* paused: a proper pause badge (two solid bars in a ring), not two hairlines */
.deck.paused .deck-video::after { content: ''; position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; transform: translate(-50%, -50%); border-radius: 50%; border: 1.5px solid rgba(255,255,255,.85); background: rgba(5,5,7,.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='14' y='12' width='7.500' height='24' rx='2' fill='white'/%3E%3Crect x='26.500' y='12' width='7.500' height='24' rx='2' fill='white'/%3E%3C/svg%3E") center / 40px no-repeat; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: .92; pointer-events: none; transition: opacity .2s; }
.deck.paused .deck-video:has(.play-overlay:not([hidden]))::after, .deck.paused .deck-video:has(.vid-bezel.show)::after, .deck.no-video .deck-video::after, .deck.scrubbing .deck-video::after { display: none; }
/* the bezel: what just happened (play, pause, ±10 s, volume, speed), said once in the middle of the picture */
.vid-bezel { position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px; padding: 10px 14px; border-radius: 40px; background: rgba(5,5,7,.55); color: #fff; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; opacity: 0; pointer-events: none; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.vid-bezel.left { left: 20%; } .vid-bezel.right { left: 80%; }
.vid-bezel svg { display: block; }
.vid-bezel.show { animation: vid-bezel .75s ease-out forwards; }
@keyframes vid-bezel { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.82); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 60% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.06); } }
.deck.no-captions .caption { display: none; }
/* fullscreen: the picture with its seek line and subtitles, nothing else */
.tool-video:fullscreen { width: 100vw; height: 100vh; background: #000; display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 0; }
.tool-video:fullscreen .deck-video { flex: 1 1 auto; min-height: 0; width: 100% !important; height: auto !important; max-width: none !important; max-height: none !important; aspect-ratio: auto; border-radius: 0; }
.tool-video:fullscreen .deck-video video { width: 100%; height: 100%; object-fit: contain; }
.tool-video:fullscreen .seek { flex: 0 0 30px; }
.tool-video:fullscreen .caption { font-size: clamp(18px, 2.500vw, 34px); bottom: 5%; }
.deck .fullscreen-btn { position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(5,5,7,.45); color: #fff; font-size: 14px; cursor: pointer; opacity: .5; }
.deck .fullscreen-btn:hover { opacity: 1; }
.deck.no-video .deck-video { aspect-ratio: auto; height: 120px; background: transparent; }
.deck.no-video .deck-video video { display: none; }
.deck.no-video .time-corner { display: flex; }
.deck.no-video .seek { pointer-events: none; }
.deck.no-video .fullscreen-btn, .deck.no-video .play-overlay { display: none; }
.deck .time-corner { position: absolute; inset: 0; display: none; align-items: baseline; justify-content: center; gap: 10px; }
.deck .paused-overlay { position: absolute; inset: 0; display: none; }
.deck .lost-banner { position: absolute; left: 12px; right: 12px; bottom: 12px; }

/* the seek line: a hairline, the mentions as 1px ticks in their colour */
.seek { grid-area: seek; position: relative; height: 26px; cursor: pointer; touch-action: pan-y; align-self: stretch; }
.seek-track { position: absolute; left: 0; right: 0; top: 13px; height: 1px; background: rgba(233,233,238,.22); }
.seek-fill { position: absolute; left: 0; top: 13px; height: 1px; background: var(--dk-ink); width: 0; }
.seek-knob { position: absolute; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--dk-ink); margin-left: -4.5px; box-shadow: 0 0 0 3px rgba(5,5,7,.8); transition: transform .12s; }
.deck.scrubbing .seek-knob { transform: scale(1.4); }
.seek-ticks { position: absolute; inset: 0; pointer-events: none; }
.seek-ticks .tick { position: absolute; top: 4px; width: 1px; height: 8px; opacity: .45; transform: translateX(-.5px); transition: opacity .3s, height .3s, top .3s; }
.seek-ticks .tick.cat-person { background: var(--dk-person); } .seek-ticks .tick.cat-place { background: var(--dk-place); } .seek-ticks .tick.cat-event { background: var(--dk-event); } .seek-ticks .tick.cat-thing { background: var(--dk-thing); }
.seek-ticks .tick.lit { opacity: 1; top: 1px; height: 12px; background: var(--dk-lit); box-shadow: 0 0 6px var(--dk-lit); }
.seek-ticks .tick.on { opacity: 1; top: 1px; height: 24px; width: 2px; background: var(--dk-lit); }
.seek-hint { position: absolute; bottom: 24px; padding: 3px 8px; border-radius: 4px; background: rgba(5,5,7,.92); border: 1px solid var(--dk-line); font-size: 11px; color: var(--dk-ink-2); white-space: nowrap; pointer-events: none; z-index: 5; }
.seek-hint b { color: var(--dk-ink); font-weight: 400; }
.seek-hint .cat-person { color: var(--dk-person); } .seek-hint .cat-place { color: var(--dk-place); } .seek-hint .cat-event { color: var(--dk-event); } .seek-hint .cat-thing { color: var(--dk-thing); }
.seek-meta { pointer-events: none; display: flex; justify-content: space-between; align-items: center; font-size: 9.5px; color: var(--dk-dim); padding: 0 2px; height: 0; transform: translateY(-1px); }
.seek-time, .seek-dur { background: var(--dk-bg); padding: 0 3px; }
.live-pill { position: absolute; top: 10px; left: 10px; z-index: 4; background: rgba(5,5,7,.8); border: 1px solid rgba(255,243,207,.5); color: var(--dk-lit); border-radius: 12px; padding: 3px 10px; font-family: var(--font-mono); font-size: 10.5px; cursor: pointer; }
.live-pill:hover { background: var(--dk-lit); color: var(--dk-bg); }
.journey-now { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 3; background: rgba(5,5,7,.85); border: 1px solid var(--dk-line); color: var(--dk-ink-2); border-radius: 12px; padding: 3px 12px; font-family: var(--font-mono); font-size: 10.5px; cursor: pointer; }
.journey-now[hidden] { display: none; }
.journey-now:hover { color: var(--dk-lit); border-color: var(--dk-lit); }
.live-pill[hidden] { display: none; }

/* instruments: faint until called */
.inst { position: relative; transition: opacity .5s; }
.inst-head { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dk-faint); padding: 8px 12px 4px; display: flex; justify-content: space-between; align-items: baseline; }
.inst-hint { letter-spacing: .04em; text-transform: none; font-size: 9.5px; opacity: .8; }
.inst-globe { grid-area: globe; display: flex; flex-direction: column; }
.globe-map { flex: 1 1 auto; min-height: 0; }
.globe-map .maplibregl-canvas { outline: none; }
/* map credits: a quiet i in the corner, closed until asked, there only once the map has painted */
.globe-credit { position: absolute; right: 6px; bottom: 6px; z-index: 3; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 12px); opacity: 0; pointer-events: none; transition: opacity .8s; }
.globe-credit.ready { opacity: 1; pointer-events: auto; }
.globe-credit-btn { flex: 0 0 auto; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid rgba(233,233,238,.45); background: rgba(5,5,7,.62); color: var(--dk-ink); font: italic 600 11px/16px Georgia, serif; cursor: pointer; opacity: .6; transition: opacity .2s; }
.globe-credit-btn:hover, .globe-credit.open .globe-credit-btn { opacity: .95; }
.globe-credit-text { font-family: var(--font-mono); font-size: 9px; line-height: 1.45; letter-spacing: .02em; color: var(--dk-dim); background: rgba(5,5,7,.78); border: 1px solid var(--dk-line); border-radius: 4px; padding: 4px 7px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.globe-credit-text[hidden] { display: none; }
.globe-credit-text a { color: var(--dk-ink); text-decoration: none; border-bottom: 1px dotted rgba(233,233,238,.4); }
.inst-line { padding: 6px 12px 8px; font-size: 11px; color: var(--dk-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inst-line b { color: var(--dk-ink); font-weight: 400; }
.deck.no-globe .inst-globe, .deck.no-globe .glyph-globe { display: none; }
.deck.no-web .inst-web, .deck.no-web .glyph-web { display: none; }
.deck.no-time .inst-timeline, .deck.no-time .overview { display: none; }
.inst-web { grid-area: web; display: flex; flex-direction: column; }
.inst-web svg { flex: 1 1 auto; min-height: 0; width: 100%; touch-action: none; cursor: grab; }
.inst-web svg:active { cursor: grabbing; }
.deck .web-edge { stroke: rgba(233,233,238,.28); }
.deck .web-edge-label { fill: var(--dk-dim); paint-order: stroke; stroke: var(--dk-bg); stroke-width: 4px; stroke-linejoin: round; }
.deck .web-edge.ghost { stroke-dasharray: 2 5; opacity: .4; }
.deck .web-edge.lit { stroke: var(--dk-lit); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(255,243,207,.8)); }
.deck .web-edge-label.lit { fill: var(--dk-ink); font-weight: 600; }
.deck .web-node-ring { stroke: var(--dk-faint); }
.deck .web-node.focus .web-node-ring { stroke: var(--dk-lit); }
.deck .web-node.cat-person .web-node-ring { stroke: var(--dk-person); } .deck .web-node.cat-place .web-node-ring { stroke: var(--dk-place); } .deck .web-node.cat-event .web-node-ring { stroke: var(--dk-event); } .deck .web-node.cat-thing .web-node-ring { stroke: var(--dk-thing); }
.deck .web-node.focus .web-node-ring { stroke: var(--dk-lit) !important; }
.deck .web-node-fill { fill: var(--dk-bg-3); }
.deck .web-node-initial { fill: var(--dk-ink-2); }
.deck .web-node-name { fill: var(--dk-ink-2); }
.deck .web-node.focus .web-node-name { fill: var(--dk-ink); }
.deck .web-node.lit .web-node-ring { stroke-width: 3; filter: drop-shadow(0 0 8px var(--dk-lit)); animation: node-said 1.1s ease-out infinite; }
/* the constellation still to come */
.deck .web-node.ghost { opacity: .38; }
.deck .web-node.ghost .web-node-ring { stroke-dasharray: 2 3; stroke-width: 1; }
.deck .web-node.ghost .web-node-name { font-style: italic; }
.deck .web-node.ghost .web-node-initial { font-size: 12px; }
.inst-timeline { grid-area: time; display: flex; flex-direction: column; border-top: 1px solid var(--dk-line); }
.inst-timeline canvas { flex: 1 1 auto; min-height: 0; width: 100%; touch-action: none; cursor: grab; }
.inst-timeline canvas:active { cursor: grabbing; }
.overview { grid-area: over; position: relative; cursor: pointer; }
.overview canvas { width: 100%; height: 100%; display: block; touch-action: none; }

/* the Journey */
.inst-journey { grid-area: journey; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 24px; scroll-behavior: smooth; scrollbar-width: none; }
.inst-journey::-webkit-scrollbar { display: none; }
.journey-head { padding: 10px 0 2px; }
.journey { list-style: none; margin: 0; padding: 8px 0 0; }
.moment { position: relative; padding: 6px 0; opacity: .55; transition: opacity .4s; }
.moment.focus, .moment.lit, .moment.hot, .moment.open { opacity: 1; }
.m-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; cursor: pointer; }
.m-face { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--dk-bg-3); border: 1px solid var(--dk-faint); display: flex; align-items: center; justify-content: center; transition: border-color .3s, box-shadow .3s; }
.m-face img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 50% 40%; }
.m-initial { font-family: var(--font-serif); font-size: 20px; color: var(--dk-ink-2); }
.moment.cat-person .m-face { border-color: var(--dk-person); } .moment.cat-place .m-face { border-color: var(--dk-place); } .moment.cat-event .m-face { border-color: var(--dk-event); } .moment.cat-thing .m-face { border-color: var(--dk-thing); }
.moment.focus .m-face { border-color: var(--dk-lit); box-shadow: 0 0 0 1px var(--dk-lit), 0 0 14px rgba(255,243,207,.35); }
.moment.focus .m-face img { animation: kenburns 14s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.18) translate(3%, -2%); } }
.m-body { min-width: 0; }
.m-tags { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dk-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moment.cat-person .m-tags { color: var(--dk-person); } .moment.cat-place .m-tags { color: var(--dk-place); } .moment.cat-event .m-tags { color: var(--dk-event); } .moment.cat-thing .m-tags { color: var(--dk-thing); }
.moment .m-tags { opacity: .85; }
.m-name { font-family: var(--font-serif); font-size: 17px; line-height: 1.2; color: var(--dk-ink); margin: 1px 0 2px; }
.moment.focus .m-name { color: var(--dk-lit); }
.m-name.linkable:hover { text-decoration: underline; text-decoration-color: var(--dk-dim); }
.m-gloss { font-family: var(--font-serif); font-size: 13px; line-height: 1.4; color: var(--dk-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.moment.open .m-gloss { -webkit-line-clamp: unset; }
.m-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.m-chips:empty { display: none; }
.m-chip { background: transparent; border: 1px solid var(--dk-line); color: var(--dk-dim); border-radius: 10px; padding: 1px 8px; font: inherit; font-size: 10px; cursor: pointer; }
.m-chip:hover { color: var(--dk-ink); border-color: var(--dk-dim); }
.m-chip.lit { color: var(--dk-lit); border-color: rgba(255,243,207,.5); }
.m-more { margin-top: 6px; }
.m-more[hidden] { display: none; }
.moment.open .m-more { display: block; }
.m-extract { font-family: var(--font-serif); font-size: 13px; line-height: 1.45; color: var(--dk-ink-2); margin: 0 0 6px; }
.m-wiki { color: var(--dk-dim); font-size: 11px; text-decoration: none; border-bottom: 1px dotted var(--dk-dim); }
.m-wiki:hover { color: var(--dk-ink); }
.m-alsoin { display: block; margin-top: 6px; font-size: 11px; }
.m-alsoin .alsoin-label { color: var(--dk-dim); } .m-alsoin .alsoin-link { color: var(--dk-place); border-bottom: 1px dotted var(--dk-place); }
.m-t { font-size: 10.5px; color: var(--dk-faint); padding-top: 3px; cursor: pointer; }
.m-t:hover { color: var(--dk-ink); }
.m-link { font-size: 10.5px; color: var(--dk-dim); padding: 2px 0 6px 56px; display: flex; align-items: center; gap: 8px; cursor: pointer; width: fit-content; transition: color .15s; }
.m-link:hover { color: var(--dk-ink); } .m-link:hover .m-link-line { background: var(--dk-dim); }
.m-link[hidden] { display: none; }
.m-link-line { flex: 0 0 22px; height: 1px; background: var(--dk-faint); }
.m-link.lit { color: var(--dk-lit); } .m-link.lit .m-link-line { background: var(--dk-lit); box-shadow: 0 0 6px var(--dk-lit); }

/* glyphs: only on the phone stage */
.deck .diag { display: none; }
.deck.mode-diag .diag { display: block; position: absolute; left: 0; right: 0; bottom: 0; }

/* ---------- the phone: one stage ---------- */
.glyph { background: transparent; border: 0; padding: 0; width: 40px; height: 40px; cursor: pointer; opacity: .6; transition: opacity .3s, transform .3s; }
.glyph canvas { width: 40px; height: 40px; display: block; }
.glyph.on { opacity: 1; transform: scale(1.08); }
.deck[data-call="globe"] .glyph-globe, .deck[data-call="web"] .glyph-web { opacity: 1; }
.glyph.locked { filter: drop-shadow(0 0 4px var(--dk-lit)); }
.nowline { background: transparent; border: 0; color: var(--dk-ink-2); font: inherit; font-size: 12px; text-align: center; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 6px; opacity: .8; }
.nowline b { font-family: var(--font-serif); font-weight: 400; font-size: 14px; color: var(--dk-lit); }
.nowline span { color: var(--dk-dim); }
.nowline.on { opacity: 1; }
/* each instrument grows out of its own corner — the globe from Burke's top-left, the web from the top-right, time from the bottom */


/* the desk with the studio dock open */
body.mode-studio .deck { right: 420px; }
@media (max-width: 1100px) { body.mode-studio .deck { right: 0; } }

/* the studio's marks ride on the deck's seek line */
.seek .studio-strip { position: absolute; inset: 0; height: auto; background: transparent; border: 0; pointer-events: none; }
.seek .studio-strip > * { pointer-events: auto; }
.seek .ss-note { bottom: 0; }
.seek .ss-cue { top: 0; height: 6px; }
body.mode-studio .deck-top .studio-tag { display: inline-block; }

/* the studio on a phone: a floating ✎, the dock slides up as a sheet */
.sd-fab { display: none; position: fixed; right: 14px; bottom: 34px; z-index: 70; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,243,207,.5); background: rgba(5,5,7,.92); color: #fff3cf; font-size: 20px; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
body.mode-studio .sd-fab { display: block; }
@media (min-width: 1101px) { body.mode-studio .sd-fab { display: none; } }
@media (max-width: 1100px) {
  .studio-dock { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 68vh; z-index: 60; border-top: 1px solid var(--border); transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  body.sd-open .studio-dock { transform: none; }
  body.sd-open .sd-fab { bottom: calc(68vh + 12px); }
}

/* ---------- the linking phrase earns its place (web.js) ----------
 * hidden until the connection is spoken, until it belongs to the focus node and the
 * gap can hold it, or until someone touches the node or the filament */
.web-edge-label { opacity: 0; pointer-events: none; transition: opacity .3s, fill .4s; }
.web-edge-label.show:not(.nofit) { opacity: .9; }
.web-edge-label.ghost.show:not(.nofit) { opacity: .35; }
.web-edge-label.lit, .web-edge-label.hover { opacity: 1; }
.web-edge-label.hover { fill: var(--fg); }
.web-edge-hit { stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: help; fill: none; }
.web-edge.hover { stroke: rgba(212,168,106,.8); }
.web-arrow { fill: none; stroke: rgba(157,138,111,.7); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.web-arrow.lit { stroke: var(--gold); stroke-width: 1.6; }
.deck .web-edge.hover { stroke: rgba(233,233,238,.75); }
.deck .web-edge-label.hover { fill: var(--dk-ink); }
.deck .web-arrow { stroke: rgba(233,233,238,.5); }
.deck .web-arrow.lit { stroke: var(--dk-lit); }

/* ---------- the knowledge web, 2D + 3D (kweb.js) ---------- */
.kweb-box { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; touch-action: none; }
.kweb-canvas { position: absolute; inset: 0; overflow: hidden;
  /* the web has no frame: what drifts to the edge dissolves instead of being cut */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%), linear-gradient(to right, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%), linear-gradient(to right, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.kweb-box[data-empty="1"]::after { content: 'the web lights up as the story reaches it'; position: absolute; inset: 0; display: grid; place-items: center; padding: 0 28px; text-align: center; font: italic 13px/1.5 var(--font-serif, Georgia, serif); color: var(--dk-dim); opacity: .55; pointer-events: none; }
.kweb-canvas canvas { display: block; outline: none; }
.inst-dim { display: block; position: absolute; top: 6px; right: 38px; z-index: 6; height: 24px; padding: 0 7px; border-radius: 5px; border: 1px solid var(--dk-line); background: rgba(5,5,7,.6); color: var(--dk-dim); font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; cursor: pointer; opacity: .55; transition: opacity .2s; }
.inst-dim:hover { opacity: 1; color: var(--dk-ink); border-color: var(--dk-dim); }
.inst-dim:disabled { opacity: .25; cursor: wait; }
/* the library's tooltip, in our voice */
.float-tooltip-kap { background: rgba(5,5,7,.92) !important; border: 1px solid var(--dk-line, rgba(233,233,238,.12)); border-radius: 6px !important; padding: 0 !important; color: #e9e9ee !important; font-family: var(--font-mono) !important; max-width: 280px; }
.kweb-tip { padding: 7px 10px; display: flex; flex-direction: column; gap: 3px; }
.kweb-tip b { font-family: var(--font-serif); font-weight: 400; font-size: 14px; color: #fff3cf; }
.kweb-tip span { font-family: var(--font-serif); font-size: 12px; line-height: 1.35; color: #c9c9d2; white-space: normal; }

/* ============================================================
 * THE WORKSPACE — tools in tiles (layout.js)
 * Rows and columns of tiles; hide a tool and its neighbours take the room; drag a
 * splitter to resize, a grip to swap. One tile may be a stage (the whole phone).
 * ============================================================ */
.deck-top { flex: 0 0 34px; }
.deck-body { flex: 1 1 auto; min-height: 0; display: flex; position: relative; }
.overview { flex: 0 0 20px; }
.ws-park { display: none !important; }
.split { display: flex; min-width: 0; min-height: 0; }
.split.row { flex-direction: row; } .split.col { flex-direction: column; }
.deck-body > .split { flex: 1 1 auto; }
.split[hidden], .leaf[hidden], .splitter[hidden] { display: none !important; }
.leaf { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.leaf > .inst, .leaf > .wtool { flex: 1 1 auto; min-height: 0; min-width: 0; }
.splitter { flex: 0 0 7px; position: relative; z-index: 5; cursor: col-resize; touch-action: none; }
.splitter.col { cursor: row-resize; }
.splitter::after { content: ''; position: absolute; background: transparent; transition: background .2s; }
.splitter.row::after { left: 3px; top: 6%; bottom: 6%; width: 1px; }
.splitter.col::after { top: 3px; left: 3%; right: 3%; height: 1px; }
.splitter:hover::after, .splitter.dragging::after { background: var(--dk-lit); box-shadow: 0 0 6px rgba(255,243,207,.5); }
body.ws-resizing, body.ws-resizing * { user-select: none !important; cursor: inherit; }
body.ws-resizing .globe-map, body.ws-resizing .kweb-box { pointer-events: none; }
/* grips: drag a tool onto another tile to swap them (desk and laptop) */
.grip { display: none; position: absolute; top: 6px; left: 8px; z-index: 6; height: 22px; padding: 0 6px; align-items: center; gap: 5px; border-radius: 5px; border: 1px solid var(--dk-line); background: rgba(5,5,7,.6); color: var(--dk-dim); font-family: var(--font-mono); font-size: 12px; line-height: 1; cursor: grab; touch-action: none; opacity: .3; transition: opacity .2s; }
.grip-l { display: none; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
/* always there on a desk (faint), named when the pointer is over its tile */
.deck[data-cls="desk"] .leaf > .grip, .deck[data-cls="laptop"] .leaf > .grip { display: inline-flex; }
.deck[data-cls="desk"] .leaf:hover > .grip, .deck[data-cls="laptop"] .leaf:hover > .grip { opacity: 1; }
.leaf:hover > .grip .grip-l { display: inline; }
.grip:hover { color: var(--dk-ink); border-color: var(--dk-dim); }
/* the picture in a tile that has a size of its own (after a swap): it fits inside, its seek line and times stay with it */
.leaf[data-fit="box"] { container-type: size; justify-content: center; }
.leaf[data-fit="box"] > .tool-video { flex: 0 1 auto; }
.leaf[data-fit="box"] .deck-video { height: auto !important; width: min(100%, calc((100cqh - 32px) * var(--vratio))) !important; }
/* a desk shows the move handles: the tools' headings make room for them */
.deck[data-cls="desk"] .leaf > .inst > .inst-head, .deck[data-cls="laptop"] .leaf > .inst > .inst-head { padding-left: 40px; }
.deck[data-cls="desk"] .leaf > .inst .kweb-trail, .deck[data-cls="laptop"] .leaf > .inst .kweb-trail { left: 12px; }
/* a one-time word on how to arrange the desk */
.ws-hint { position: absolute; left: 50%; top: 40px; z-index: 30; transform: translateX(-50%); max-width: min(720px, 92vw); padding: 8px 14px; border: 1px solid var(--dk-line); border-radius: 6px; background: rgba(5,5,7,.9); color: var(--dk-ink-2); font-size: 11px; line-height: 1.5; letter-spacing: .02em; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: ws-hint-in .5s ease-out; }
.ws-hint b { color: var(--dk-lit); font-weight: 400; }
@keyframes ws-hint-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.leaf.swap-from { outline: 1px dashed var(--dk-dim); outline-offset: -4px; }
.leaf.swap-to { outline: 1px solid var(--dk-lit); outline-offset: -4px; background: rgba(255,243,207,.04); }
body.ws-swapping, body.ws-swapping * { cursor: grabbing !important; user-select: none !important; }

/* the video tool: the picture, its seek line under it. Switched off, the line stays (the sound plays on) */
.tool-video { position: relative; display: flex; flex-direction: column; align-items: center; }
.tool-video .seek { width: 100%; align-self: stretch; flex: 0 0 26px; }
.tool-video .seek-meta { position: absolute; left: 0; right: 0; bottom: 25px; height: 0; display: flex; justify-content: space-between; align-items: center; font-size: 9.5px; color: var(--dk-dim); padding: 0 2px; }
.tool-video.video-off .deck-video { display: none; }
.tool-video.video-off { padding-top: 12px; }
.deck[data-cls="phone-portrait"] .deck-video { height: auto; width: 100%; max-height: 40vh; border-radius: 0; }
/* on a desk the picture fills its tile from edge to edge (no dead space beside it) until it would take more than its share of the height */
.deck[data-cls="desk"] .leaf .deck-video, .deck[data-cls="laptop"] .leaf .deck-video { height: auto; width: min(100%, calc(48vh * var(--vratio))); }
.deck[data-cls="tablet-portrait"] .deck-video { height: auto; width: min(100%, calc(46vh * var(--vratio))); }
.deck[data-cls="tablet-landscape"] .deck-video { height: 44vh; }
/* the phone on its side: the same things in the same order, side by side */
.deck[data-cls="phone-landscape"] .deck-top { flex-basis: 28px; }
.deck[data-cls="phone-landscape"] .deck-video { height: calc(100vh - 74px); height: calc(100dvh - 74px); width: auto; max-width: 58vw; border-radius: 0; }
.deck[data-cls="phone-landscape"] .overview { flex-basis: 16px; }
.deck.no-video .deck-video { width: 100%; }

/* the stage: one tool at a time, the others wait as glyphs in Burke's corners */
.glyphs { display: none; }
.stage-leaf > .glyphs { flex: 0 0 36px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 0 8px; gap: 8px; }
.glyphs .glyph[hidden] { display: block; visibility: hidden; }
.stage-body { position: relative; flex: 1 1 auto; min-height: 0; }
.stage-body > .inst { position: absolute; inset: 0; opacity: 0; pointer-events: none; transform: scale(.985); transition: opacity .35s, transform .45s cubic-bezier(.2,.8,.2,1); }
.stage-body > .inst.ws-off { display: none; }
/* each instrument grows out of its own corner — the globe from Burke's top-left, the web from the top-right, time from the bottom */
.stage-body > .inst-globe { transform: scale(.3); transform-origin: 6% 0; }
.stage-body > .inst-web { transform: scale(.3); transform-origin: 94% 0; }
.stage-body > .inst-timeline { transform: scaleY(.2); transform-origin: 50% 100%; border-top: 0; }
.deck[data-stage="journey"] .stage-body > .inst-journey, .deck[data-stage="globe"] .stage-body > .inst-globe, .deck[data-stage="web"] .stage-body > .inst-web, .deck[data-stage="timeline"] .stage-body > .inst-timeline { opacity: 1; pointer-events: auto; transform: none; z-index: 2; }
.stage-body .inst-head { display: none; }
.stage-body .inst-journey { padding: 0 12px 40px; }
.stage-body .inst-dim { right: 8px; top: 8px; }
.stage-leaf ~ .overview.on canvas, .overview.on canvas { filter: drop-shadow(0 0 3px rgba(255,243,207,.5)); }

/* tiled instruments: faint until the story calls them */
.leaf:not(.stage-leaf) > .inst-globe, .leaf:not(.stage-leaf) > .inst-web, .leaf:not(.stage-leaf) > .inst-timeline { opacity: .74; transition: opacity .5s; }
.deck[data-call="globe"] .leaf > .inst-globe, .deck[data-call="web"] .leaf > .inst-web, .deck[data-call="timeline"] .leaf > .inst-timeline, .leaf > .inst:hover { opacity: 1; }
.leaf:not(.stage-leaf) > .inst .inst-max { display: block; }
.leaf:not(.stage-leaf) > .inst:hover .inst-max { opacity: 1; }
.leaf:not(.stage-leaf) > .inst-journey .inst-max { position: absolute; }
.leaf[data-tool="time"] .inst-max { top: 4px; right: 200px; }

/* the rail: which tools are out */
.rail { display: flex; align-items: center; gap: 2px; margin-left: 0; }
.rail-say { margin-left: auto; padding-right: 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dk-lit); opacity: 0; transition: opacity .25s; white-space: nowrap; pointer-events: none; }
.rail-say.on { opacity: .9; }
.rail-b { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; color: var(--dk-ink-2); height: 26px; padding: 0 6px; border-radius: 5px; cursor: pointer; opacity: .9; transition: opacity .2s, background .2s, color .2s; }
.rail-b svg { display: block; flex: 0 0 auto; }
.rail-b .rail-slash { display: none; }
.rail-l { display: none; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; }
.rail-b:hover { background: var(--dk-bg-3); opacity: 1; color: var(--dk-ink); }
/* switched off: struck through and dim — the state reads without a tooltip */
.rail-b.off { opacity: .42; }
.rail-b.off .rail-slash { display: inline; }
.rail-b.called { color: var(--dk-lit); opacity: 1; animation: rail-call 1.1s ease-in-out infinite; }
@keyframes rail-call { 50% { filter: drop-shadow(0 0 6px var(--dk-lit)); transform: scale(1.12); } }
.rail-reset { color: var(--dk-dim); margin-left: 4px; }
.rail-reset[hidden] { display: none; }
/* a desk has room to say what each one is */
@media (min-width: 1100px) { .rail-l { display: inline; } .rail-b { padding: 0 8px; } }
.deck[data-cls^="phone"] .rail-b { padding: 0 5px; }
.deck[data-cls^="phone"] .deck-title .show, .deck[data-cls^="phone"] .deck-title .sep:first-of-type { display: none; }

/* maximise: one tool fills the desk, the video shrinks to a picture-in-picture (Esc restores) */
.max-slot { position: absolute; left: 0; right: 0; top: 34px; bottom: 20px; z-index: 20; background: var(--dk-bg); display: flex; flex-direction: column; }
.max-slot[hidden], .pip-slot[hidden] { display: none; }
.max-slot > .inst { flex: 1 1 auto; min-height: 0; opacity: 1 !important; border-top: 0; }
.max-slot > .inst-journey { max-width: 760px; width: 100%; align-self: center; }
.max-slot .inst-max { display: block; opacity: 1; top: 8px; right: calc(min(26vw, 420px) + 28px); }
.max-slot .inst-dim { right: calc(min(26vw, 420px) + 62px); top: 8px; }
.max-slot .inst-line { position: absolute; left: 12px; bottom: 10px; z-index: 5; background: rgba(5,5,7,.6); padding: 4px 8px; border-radius: 4px; }
.pip-slot { position: absolute; top: 44px; right: 14px; width: min(26vw, 420px); z-index: 25; border-radius: 6px; overflow: hidden; background: #000; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.pip-slot .deck-video { height: auto; width: 100%; max-height: none; border-radius: 0; }
.pip-slot .caption { font-size: 12px; }
.pip-slot .tool-video { background: var(--dk-bg); }

/* the Journey, compact: face · type · country · dates, the name, one line. The phone gets the smallest cut. */
.deck[data-cls^="phone"] .m-row { grid-template-columns: 38px 1fr auto; gap: 10px; }
.deck[data-cls^="phone"] .m-face { width: 38px; height: 38px; }
.deck[data-cls^="phone"] .m-name { font-size: 16px; }
.deck[data-cls^="phone"] .m-gloss { font-size: 12.5px; -webkit-line-clamp: 2; }
.deck[data-cls^="phone"] .moment:not(.focus):not(.open) .m-chips { display: none; }
.deck[data-cls^="phone"] .moment:not(.focus):not(.open) .m-gloss { -webkit-line-clamp: 1; }
.m-desc { font-family: var(--font-serif); font-size: 12.5px; font-style: italic; color: var(--dk-dim); margin: 0 0 6px; }

/* before the first node is reached the Journey says what it will become */
#journey:empty::after { content: 'the journey writes itself as the story is told'; display: block; padding: 28px 16px; text-align: center; font: italic 13px/1.5 var(--font-serif); color: var(--dk-dim); opacity: .55; }

/* the web's furniture: the trail as a strip of dots (lit as far as the story has come) and a legend for its three lines */
.kweb-trail { position: absolute; left: 12px; right: 84px; top: 8px; z-index: 4; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.kweb-trail-count { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--dk-faint); }
.kweb-trail-dots { display: flex; align-items: center; gap: 0; max-width: 100%; pointer-events: auto; }
.kt { position: relative; flex: 1 1 0; min-width: 0; max-width: 16px; height: 12px; padding: 0; border: 0; background: transparent; cursor: default; }
.kt::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--dk-line); }
.kt:first-child::before { left: 50%; } .kt:last-child::before { right: 50%; }
.kt::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; border: 1px solid var(--dk-faint); background: var(--dk-bg); transition: background .4s, border-color .4s, transform .3s; }
.kt.on { cursor: pointer; }
.kt.on::before { background: #e8cf96; opacity: .75; }
.kt.on::after { background: var(--kt, #e9e9ee); border-color: var(--kt, #e9e9ee); }
.kt.now::after { transform: scale(1.9); background: #fff3cf; border-color: #fff3cf; box-shadow: 0 0 8px rgba(255,243,207,.8); }
.kt.on:hover::after { transform: scale(1.7); }
.kweb-legend { position: absolute; left: 12px; bottom: 8px; z-index: 4; display: flex; gap: 12px; font-size: 9px; letter-spacing: .06em; color: var(--dk-faint); pointer-events: none; opacity: .85; }
.kweb-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lg { display: inline-block; width: 16px; height: 0; border-top: 1px solid #a9a9b6; }
.lg-trail { border-top: 2px solid #e8cf96; }
.lg-wait { border-top: 1px dashed #a9a9b6; opacity: .7; }
.kweb-box[data-empty="1"] .kweb-legend { display: none; }
.stage-body .kweb-trail { top: 10px; right: 60px; }
/* the Journey marks the steps of the trail with a fine warm rule */
.moment.on-trail .m-row { position: relative; }
.moment.on-trail .m-row::before { content: ''; position: absolute; left: -9px; top: 4px; bottom: 4px; width: 2px; border-radius: 1px; background: #e8cf96; opacity: .55; }
.moment.on-trail.focus .m-row::before { opacity: 1; }

/* ============================================================
 * A NODE, OPENED — a sheet over the deck. Never another page, never another episode.
 * ============================================================ */
.node-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 3.5vh 3vw; background: rgba(3,3,5,.72); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); animation: nm-in .22s ease-out; }
.node-modal[hidden] { display: none; }
@keyframes nm-in { from { opacity: 0; } to { opacity: 1; } }
.nm-sheet { position: relative; width: min(1080px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; background: var(--dk-bg); border: 1px solid var(--dk-line); border-radius: 10px; padding: 34px 40px 40px; box-shadow: 0 30px 90px rgba(0,0,0,.7); animation: nm-up .28s cubic-bezier(.2,.7,.2,1); }
@keyframes nm-up { from { transform: translateY(14px); opacity: .4; } to { transform: none; opacity: 1; } }
.nm-close { position: sticky; float: right; top: 0; margin: -14px -18px 0 0; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--dk-line); background: rgba(5,5,7,.8); color: var(--dk-ink-2); font-size: 14px; cursor: pointer; }
.nm-close:hover { color: var(--dk-lit); border-color: var(--dk-dim); }
.nm-cols { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 40px; align-items: start; }
.nm-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 16px; }
.nm-face { aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; border: 2px solid var(--dk-line); background: #101016; }
.nm-face.cat-person { border-color: #e6a3a3; } .nm-face.cat-place { border-color: #8fd3c3; } .nm-face.cat-event { border-color: #e6c07a; } .nm-face.cat-thing { border-color: #a9d19a; }
.nm-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; display: block; }
.nm-initial { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-serif); font-size: 96px; color: var(--dk-dim); }
.nm-facts { display: flex; flex-direction: column; gap: 2px; }
.nm-fact { text-align: left; background: transparent; border: 0; padding: 5px 0; color: var(--dk-dim); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; cursor: pointer; border-bottom: 1px solid transparent; }
.nm-fact:hover { color: var(--dk-lit); }
.nm-tags { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dk-dim); }
.nm-name { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; color: var(--dk-lit); margin: 8px 0 14px; }
.nm-gloss { font-family: var(--font-serif); font-style: italic; font-size: 18px; line-height: 1.5; color: var(--dk-ink); margin: 0 0 16px; max-width: 62ch; }
.nm-extract { font-family: var(--font-serif); font-size: 15.5px; line-height: 1.65; color: var(--dk-ink-2); margin: 0 0 10px; max-width: 68ch; }
.nm-wiki { font-size: 11px; color: var(--dk-dim); text-decoration: none; border-bottom: 1px dotted var(--dk-faint); }
.nm-wiki:hover { color: var(--dk-lit); } .nm-wiki[hidden] { display: none; }
.nm-sec { margin-top: 28px; border-top: 1px solid var(--dk-line); padding-top: 14px; }
.nm-sec[hidden] { display: none; }
.nm-sec h3 { font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dk-faint); margin: 0 0 10px; }
.nm-links { display: flex; flex-direction: column; gap: 2px; }
.nm-link { display: flex; align-items: center; gap: 12px; text-align: left; background: transparent; border: 0; padding: 5px 0; color: var(--dk-ink-2); font-family: var(--font-serif); font-size: 15px; cursor: pointer; }
.nm-link img, .nm-link-i { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--dk-line); display: grid; place-items: center; font-size: 14px; color: var(--dk-dim); }
.nm-link i { font-family: var(--font-mono); font-style: normal; font-size: 11px; color: #e8cf96; letter-spacing: .02em; }
.nm-link b { font-weight: 500; color: var(--dk-ink); }
.nm-link:hover b { color: var(--dk-lit); }
.nm-ahead { font-size: 11px; color: var(--dk-faint); font-style: italic; margin: 8px 0 0; list-style: none; }
.nm-said { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nm-said li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: baseline; }
.nm-when { background: transparent; border: 1px solid var(--dk-line); border-radius: 10px; padding: 1px 0; color: var(--dk-ink-2); font-family: var(--font-mono); font-size: 10.5px; cursor: pointer; }
.nm-when:hover { color: var(--dk-lit); border-color: var(--dk-dim); }
.nm-quote { font-family: var(--font-serif); font-size: 14.5px; line-height: 1.5; color: var(--dk-ink-2); }
.nm-else { font-size: 11.5px; color: var(--dk-dim); }
.alsoin-link.soon { color: var(--dk-faint); cursor: default; text-decoration: none; }
.alsoin-link.soon::after { content: ' · soon'; font-size: .85em; opacity: .7; }
.m-name.linkable { cursor: pointer; } .m-name.linkable:hover { color: var(--dk-lit); }
@media (max-width: 760px) {
  .node-modal { padding: 0; place-items: stretch; }
  .nm-sheet { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; padding: 22px 18px 40px; }
  .nm-cols { grid-template-columns: 1fr; gap: 18px; }
  .nm-side { position: static; flex-direction: row; align-items: center; gap: 16px; }
  .nm-face { flex: 0 0 104px; width: 104px; }
  .nm-close { margin: -8px -6px 0 0; }
  .nm-gloss { font-size: 16.5px; } .nm-extract { font-size: 15px; }
}

/* the web's library could not be loaded: say so, instead of an empty box */
.kweb-box[data-failed="1"]::after { content: 'the web could not load, reload the page to try again'; position: absolute; inset: 0; display: grid; place-items: center; padding: 0 28px; text-align: center; font: italic 13px/1.5 var(--font-serif, Georgia, serif); color: var(--dk-dim); pointer-events: none; }
