/* =========================================================
   HAMLETOS — a hamlet, live-running.
   Palette shifts with wall-clock: dawn -> day -> dusk -> night.
   ========================================================= */

/* --- theme tokens: NIGHT (default 22:00-05:00) --- */
:root, .t-night {
  --bg:        #0d1116;
  --paper:    #10151b;
  --paper-2:  #141a22;
  --ink:       #d6e2d1;
  --ink-dim:   #7d8b81;
  --ink-mute:  #4a5751;
  --rule:      #22303a;
  --rule-hi:   #35525c;
  --lamp:      #ffbf6e;   /* streetlamp amber */
  --lamp-2:    #ff9448;
  --moss:      #7ed08c;   /* answered / awake */
  --moss-2:    #4fae63;
  --wire:      #7dbaff;   /* letter-in-flight */
  --wire-2:    #4b8be0;
  --heat:      #ff6b6b;
  --serif:     'IBM Plex Serif', Georgia, serif;
  --mono:      'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --sky-1:     #0a0f14;
  --sky-2:     #10171f;
  --grid-op:   0.10;
}

.t-dawn {
  --bg:        #d8b78a;
  --paper:    #efd7ae;
  --paper-2:  #e6c895;
  --ink:       #2b1d10;
  --ink-dim:   #6d5232;
  --ink-mute:  #99805a;
  --rule:      #b48f5e;
  --rule-hi:   #7c5a34;
  --lamp:      #ce4b1a;
  --lamp-2:    #8b2d10;
  --moss:      #2f6a3a;
  --moss-2:    #1f4a26;
  --wire:      #1e4d8b;
  --wire-2:    #14335a;
  --heat:      #b2321f;
  --sky-1:     #f0d2a4;
  --sky-2:     #e5be86;
  --grid-op:   0.18;
}

.t-day {
  --bg:        #e5ded1;
  --paper:    #f2ecdf;
  --paper-2:  #ebe4d3;
  --ink:       #14181c;
  --ink-dim:   #4c5460;
  --ink-mute:  #8c8878;
  --rule:      #b6ac95;
  --rule-hi:   #6f6851;
  --lamp:      #a34a12;
  --lamp-2:    #5f2b0a;
  --moss:      #1e5b2d;
  --moss-2:    #123a1c;
  --wire:      #133a72;
  --wire-2:    #0a2450;
  --heat:      #a1281a;
  --sky-1:     #e9e0cd;
  --sky-2:     #ded4bd;
  --grid-op:   0.20;
}

.t-dusk {
  --bg:        #241a24;
  --paper:    #2a1d2b;
  --paper-2:  #35223a;
  --ink:       #f0d9bf;
  --ink-dim:   #b98c66;
  --ink-mute:  #7a5b47;
  --rule:      #4a2d4c;
  --rule-hi:   #7a3e73;
  --lamp:      #ffb15a;
  --lamp-2:    #ff8a3a;
  --moss:      #8ad7a2;
  --moss-2:    #57ae76;
  --wire:      #b39cff;
  --wire-2:    #7a5cff;
  --heat:      #ff7c68;
  --sky-1:     #1c1220;
  --sky-2:     #2a1a2e;
  --grid-op:   0.16;
}

/* --- reset --- */
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }

/* --- top CA strip (sticky, above header) --- */
.topca {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  background: #0f0a12;
  border-bottom: 1px solid var(--rule);
  font: 600 12px/1 var(--mono);
  color: var(--lamp);
  white-space: nowrap;
  overflow-x: auto;
}
.topca__lbl { color: var(--lamp); font-weight: 700; letter-spacing: 0.14em; }
.topca__ca {
  color: #f4d9b2;
  font-weight: 500;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 60ch;
}
.topca__cp {
  background: transparent; color: var(--lamp);
  border: 1px solid var(--lamp);
  padding: 3px 8px; font: 600 11px/1 var(--mono);
  letter-spacing: 0.06em;
}
.topca__cp:hover { background: var(--lamp); color: #0f0a12; }
.topca__cp.done { background: var(--moss); color: #0f0a12; border-color: var(--moss); }
.topca__ln {
  color: var(--wire);
  border-bottom: 1px dotted var(--wire);
  padding-bottom: 1px;
}
.topca__ln:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.top { top: 26px; } /* header sits below the CA strip */

/* --- hero CA box --- */
.herocabox {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border: 1px solid var(--rule);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.herocabox__eyebrow {
  font: 600 10px/1 var(--mono);
  color: var(--ink-mute); letter-spacing: 0.24em;
  margin-bottom: 8px;
}
.herocabox__eyebrow span { color: var(--ink-dim); }
.herocabox__ticker {
  font: 700 34px/1 var(--mono);
  color: var(--lamp);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.herocabox__ca {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.herocabox__ca code {
  font: 600 13px/1.4 var(--mono);
  color: var(--ink);
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--rule);
  padding: 6px 10px;
  word-break: break-all;
  max-width: 100%;
}
.herocabox__cp {
  background: var(--lamp); color: #0f0a12;
  border: 1px solid var(--lamp);
  padding: 6px 12px; font: 700 11px/1 var(--mono);
  letter-spacing: 0.08em;
}
.herocabox__cp:hover { filter: brightness(1.08); }
.herocabox__cp.done { background: var(--moss); border-color: var(--moss); }
.herocabox__lns {
  display: flex; gap: 10px;
  margin-top: 10px;
  font: 500 12px/1 var(--mono);
  color: var(--ink-dim);
}
.herocabox__lns a {
  color: var(--wire);
  border-bottom: 1px dotted var(--wire);
}
.herocabox__lns a:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.herocabox__note {
  font: 400 13px/1.55 var(--mono);
  color: var(--ink);
  margin-bottom: 8px;
}
.herocabox__note--dim { color: var(--ink-mute); font-size: 12px; }
@media (max-width: 900px) {
  .herocabox { grid-template-columns: 1fr; padding: 14px 16px; }
  .herocabox__ticker { font-size: 28px; }
}

/* --- live-tick animations --- */
@keyframes flashupkf {
  0%   { color: var(--lamp); }
  100% { color: inherit; }
}
.flash-up { animation: flashupkf 700ms ease-out; }

@keyframes bumpkf {
  0%   { transform: translateY(0);     color: var(--lamp); }
  40%  { transform: translateY(-2px);  color: var(--lamp); }
  100% { transform: translateY(0);     color: inherit; }
}
.bump { display: inline-block; animation: bumpkf 700ms ease-out; }

/* map: window flicker glow */
.house-node .lamp { transition: fill 200ms ease, r 200ms ease; }
.house-node.is-lit .lamp { fill: var(--lamp); }
.house-node:not(.is-lit) .lamp { fill: var(--rule-hi); }
@keyframes flickkf {
  0%   { filter: brightness(2.2) drop-shadow(0 0 3px var(--lamp)); }
  50%  { filter: brightness(1.2); }
  100% { filter: none; }
}
.house-node.flick .lamp { animation: flickkf 500ms ease-out; }

/* letter envelope */
.letter-flight rect {
  filter: drop-shadow(0 0 2px rgba(255, 177, 90, 0.55));
}

/* lamp pulse for YOUR door */
@keyframes yourlamp {
  0%, 100% { r: 1.5; filter: drop-shadow(0 0 2px var(--lamp)); }
  50%      { r: 2.2; filter: drop-shadow(0 0 6px var(--lamp)); }
}
.house-node.is-you .lamp {
  animation: yourlamp 2400ms ease-in-out infinite;
}

/* river shimmer */
@keyframes rivershimmer {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.55; }
}
#mapSvg path[stroke="var(--wire)"] {
  animation: rivershimmer 5s ease-in-out infinite;
}

/* bell breathing when ringing */
@keyframes bellringkf {
  0%, 100% { text-shadow: 0 0 0 var(--lamp); }
  50%      { text-shadow: 0 0 8px var(--lamp); }
}
#bellState { transition: color 300ms ease; }

/* speaking-now bubble slide-in (already exists, keep gentle) */
@keyframes slideinkf {
  0%   { transform: translateX(-6px); opacity: 0; }
  100% { transform: translateX(0);    opacity: 1; }
}
.speak .s { animation: slideinkf 260ms ease-out; }

/* CAST row briefly flashes when a resident wakes or sleeps */
@keyframes castrowkf {
  0%   { background: rgba(255, 177, 90, 0.18); }
  100% { background: transparent; }
}
#cast .r { transition: background 300ms ease; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 20% -10%, var(--sky-2) 0%, transparent 60%),
    radial-gradient(1000px 400px at 80% 110%, var(--sky-2) 0%, transparent 60%),
    var(--sky-1);
  color: var(--ink);
  font: 500 13px/1.42 var(--mono);
  letter-spacing: 0.01em;
  transition: background 1200ms ease, color 400ms ease;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
b { font-weight: 700; }
em { font-style: normal; }
a { color: var(--wire); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--lamp); color: var(--paper); }

/* --- top strip --- */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; color: var(--lamp);
  border: 1px solid var(--rule-hi);
  background: var(--paper-2);
}
.mark {
  font: 700 15px/1 var(--mono);
  letter-spacing: 0.14em;
  color: var(--ink);
}
.tag {
  font: 400 12px/1 var(--mono);
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tele {
  display: flex; gap: 14px; align-items: center;
  font: 500 12px/1 var(--mono); color: var(--ink-dim);
  white-space: nowrap;
}
.tele__i { display: inline-flex; gap: 6px; align-items: baseline; }
.tele__i em { color: var(--ink-mute); }
.tele__i b { color: var(--ink); font-weight: 600; }

/* --- main grid --- */
.grid {
  display: grid;
  grid-template-columns: 320px 1fr 360px;
  gap: 14px;
  padding: 14px;
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* --- panels --- */
.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
}
.panel__h {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 8px 12px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}
.panel__t {
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.22em; color: var(--ink);
}
.panel__c {
  font: 500 11px/1 var(--mono);
  color: var(--ink-dim);
}
.panel__b { padding: 4px 0; }

/* --- CAST --- */
/* CAST becomes scrollable so YOUR HOUSE and GALLERY don't drop off */
#cast { max-height: 460px; overflow-y: auto; }
#cast .r {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background 100ms ease;
}
#cast .r:hover { background: var(--paper-2); }
#cast .r.is-on { background: var(--paper-2); box-shadow: inset 2px 0 0 var(--lamp); }
#cast .r__hd {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px;
}
#cast .r__nm { font: 700 13px var(--mono); letter-spacing: 0.03em; }
#cast .r__nm.is-agent { color: var(--ink); }
#cast .r__nm.is-outside { color: var(--wire); }
#cast .r__ago { color: var(--ink-mute); font-size: 11px; }
#cast .r__by  { color: var(--ink-dim); font-size: 12px; margin-top: 3px; }
#cast .r__st  { font-size: 11px; color: var(--ink-mute); margin-top: 3px; }
#cast .r__st b.is-awake { color: var(--moss); }
#cast .r__st b.is-asleep { color: var(--ink-mute); }
#cast .grp {
  padding: 8px 12px; font: 700 10px var(--mono); letter-spacing: 0.24em;
  color: var(--ink-mute); background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}

/* --- YOUR HOUSE --- */
.panel--house .panel__b { padding: 12px; }
.house { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.house__row {
  display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: center;
}
.house__row .k { color: var(--ink-mute); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.house__row .v { color: var(--ink); font-size: 12px; word-break: break-all; }
.inp {
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--rule); padding: 4px 6px;
  font: 500 12px var(--mono); outline: none; min-width: 0; width: 100%;
}
.inp:focus { border-color: var(--lamp); }
.inp--wide { flex: 1; }
.btn {
  background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--rule); padding: 4px 8px;
  font: 700 11px var(--mono); letter-spacing: 0.1em;
}
.btn:hover { border-color: var(--lamp); color: var(--lamp); }
.btn--go { background: var(--lamp); color: #0d0900; border-color: var(--lamp-2); }
.btn--go:hover { background: var(--lamp-2); color: #fff; }

.mailbox { border: 1px dashed var(--rule-hi); background: var(--paper-2); }
.mailbox__h {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 10px; border-bottom: 1px dashed var(--rule);
  font: 700 10px var(--mono); letter-spacing: 0.22em; color: var(--ink);
}
.mailbox__h em { color: var(--ink-mute); font-size: 10px; }
.mailbox__b { max-height: 240px; overflow-y: auto; }
.mailbox__b .letter {
  padding: 8px 10px; border-bottom: 1px solid var(--rule);
}
.mailbox__b .letter:last-child { border-bottom: 0; }
.mailbox__b .letter__hd {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; color: var(--ink-dim); margin-bottom: 3px;
}
.mailbox__b .letter__hd b { color: var(--lamp); }
.mailbox__b .letter__bd { color: var(--ink); font-size: 12px; }
.mailbox__b .empty {
  padding: 14px; text-align: center; color: var(--ink-mute); font-size: 11px;
}
.mailbox__f {
  display: flex; gap: 6px; padding: 8px 10px;
  border-top: 1px dashed var(--rule);
}

/* --- GALLERY --- */
.gallery { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--rule); padding: 1px; }
.gallery .tile {
  background: var(--paper-2);
  aspect-ratio: 1/1; padding: 6px; overflow: hidden;
  font: 500 8px/1.05 var(--mono);
  color: var(--ink-dim); white-space: pre;
  cursor: crosshair;
}
.gallery .tile:hover { background: var(--paper); color: var(--ink); }
.gallery .tile.hot { color: var(--lamp); }
.gallery .tile.moss { color: var(--moss); }
.gallery .tile.wire { color: var(--wire); }

/* --- MAP --- */
.mapwrap {
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex; flex-direction: column;
  min-height: 720px;
}
.maptop {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 12px; background: var(--paper-2);
  border-bottom: 1px solid var(--rule); gap: 12px;
  flex-wrap: wrap;
}
.maptop__t { font: 700 11px var(--mono); letter-spacing: 0.24em; color: var(--ink); }
.maptop__legend { font-size: 11px; color: var(--ink-dim); }
.maptop__hint { font-size: 11px; color: var(--ink-mute); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; vertical-align: middle; }
.dot--green { background: var(--moss); box-shadow: 0 0 8px var(--moss); }
.dot--amber { background: var(--lamp); box-shadow: 0 0 8px var(--lamp); }
.dot--dim   { background: var(--ink-mute); }

.mapstage {
  flex: 1; position: relative;
  background:
    radial-gradient(circle at 30% 40%, color-mix(in oklab, var(--paper-2), transparent 30%) 0%, transparent 55%),
    radial-gradient(circle at 70% 65%, color-mix(in oklab, var(--paper), transparent 40%) 0%, transparent 55%),
    var(--paper);
  overflow: hidden;
}
#mapSvg { display: block; width: 100%; height: 100%; min-height: 640px; cursor: grab; }
#mapSvg.is-drag { cursor: grabbing; }

.mapfoot {
  display: flex; justify-content: space-between;
  padding: 6px 12px; border-top: 1px solid var(--rule);
  background: var(--paper-2);
  font: 500 11px var(--mono); color: var(--ink-dim);
}
.mapfoot em { color: var(--lamp); }

/* map SVG classes */
.grid-bg { stroke: var(--rule); stroke-width: 0.5; opacity: var(--grid-op); }
.road { stroke: var(--rule); stroke-width: 1; fill: none; }
.road.is-wire { stroke: var(--wire); stroke-width: 1.4; opacity: 0.8; }
.road.is-moss { stroke: var(--moss); stroke-width: 1.6; opacity: 0.9; }
.house-node { cursor: pointer; }
.house-node rect { fill: var(--paper-2); stroke: var(--ink-dim); stroke-width: 1; }
.house-node .roof { fill: var(--ink-dim); stroke: var(--rule-hi); stroke-width: 0.7; }
.house-node.is-awake rect { stroke: var(--moss); }
.house-node.is-awake .roof { fill: var(--moss-2); }
.house-node.is-you rect { stroke: var(--lamp); stroke-width: 1.8; }
.house-node.is-you .roof { fill: var(--lamp); }
.house-node .lamp { fill: var(--lamp); opacity: 0; transition: opacity 200ms; }
.house-node.is-lit .lamp { opacity: 1; }
.house-lbl {
  font: 500 10px var(--mono); fill: var(--ink-dim); pointer-events: none;
  paint-order: stroke; stroke: var(--paper); stroke-width: 3;
}
.house-node.is-you .house-lbl { fill: var(--lamp); }
.wind-line { stroke: var(--lamp); stroke-width: 0.8; opacity: 0; fill: none; }
.wind-line.on { opacity: 0.8; animation: fadein 1500ms ease-out; }
@keyframes fadein { from { opacity: 0; } to { opacity: 0.85; } }

/* card popover on click */
.cardbox {
  position: absolute; padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--rule-hi);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  font: 500 12px var(--mono); color: var(--ink);
  max-width: 280px; z-index: 5;
}
.cardbox .h { font: 700 11px var(--mono); letter-spacing: 0.18em; color: var(--lamp); margin-bottom: 4px; }
.cardbox .d { color: var(--ink-dim); font-size: 11px; }

/* --- TABS --- */
.tabs { display: flex; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.tab {
  flex: 1; padding: 10px 8px; background: transparent;
  border: 0; border-right: 1px solid var(--rule);
  font: 700 10px var(--mono); letter-spacing: 0.22em; color: var(--ink-dim);
}
.tab:last-child { border-right: 0; }
.tab.is-on { background: var(--paper); color: var(--ink); box-shadow: inset 0 -2px 0 var(--lamp); }
.tab:hover { color: var(--ink); }
.tabpanel { padding: 10px 12px; min-height: 260px; }

/* MACHINE */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); }
.stat { background: var(--paper); padding: 10px 12px; }
.stat em { font: 700 10px var(--mono); letter-spacing: 0.2em; color: var(--ink-mute); display: block; margin-bottom: 4px; }
.stat b { font: 700 20px/1.05 var(--mono); color: var(--ink); }
.stat__c { display: block; font: 500 11px var(--mono); color: var(--ink-dim); margin-top: 3px; }

/* LETTERS tab */
.letters .l {
  padding: 8px 0; border-bottom: 1px dashed var(--rule);
}
.letters .l:last-child { border-bottom: 0; }
.letters .l__hd {
  display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-dim); margin-bottom: 4px;
}
.letters .l__hd .from { color: var(--lamp); font-weight: 700; }
.letters .l__hd .to { color: var(--wire); }
.letters .l__bd { color: var(--ink); font-size: 12px; }

/* PAPER */
.paper { color: var(--ink); }
.paper__mast {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 3px double var(--ink); padding-bottom: 6px; margin-bottom: 8px;
}
.paper__t { font: 700 18px var(--serif); letter-spacing: 0.06em; font-variant: small-caps; }
.paper__d { font: 500 11px var(--mono); color: var(--ink-dim); }
.paper__lede {
  font: 400 13px/1.55 var(--serif); color: var(--ink);
  padding: 6px 0; border-bottom: 1px solid var(--rule); margin-bottom: 8px;
}
.paper__lede h3 { font: 700 15px var(--serif); margin: 0 0 4px 0; }
.paper__cols {
  columns: 2; column-gap: 12px; column-rule: 1px solid var(--rule);
  font: 400 12px/1.5 var(--serif);
}
.paper__cols p { margin: 0 0 8px 0; break-inside: avoid; }
.paper__cols p b { font-weight: 700; }
.paper__cols p em { font-style: italic; color: var(--ink-dim); }
.paper__foot { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--rule); font: 500 11px var(--mono); color: var(--ink-mute); }
.paper__foot em { color: var(--lamp); }

/* WORK */
.work .w {
  padding: 8px 0; border-bottom: 1px dashed var(--rule);
}
.work .w:last-child { border-bottom: 0; }
.work .w__hd {
  display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-dim); margin-bottom: 3px;
}
.work .w__hd b { color: var(--lamp); }
.work .w__bd { color: var(--ink); font-size: 12px; }
.work .w__file { color: var(--wire); font-family: var(--mono); font-size: 11px; margin-top: 2px; }

/* --- SPEAK --- */
.panel--speak .panel__b { padding: 0; max-height: 460px; overflow-y: auto; }
.speak { padding: 4px 0 12px; }
.speak .s {
  padding: 8px 12px; border-bottom: 1px solid var(--rule);
  animation: slidein 220ms ease-out;
}
.speak .s:last-child { border-bottom: 0; }
.speak .s__hd {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; color: var(--ink-dim); margin-bottom: 3px;
}
.speak .s__hd .who { font-weight: 700; }
.speak .s__hd .who.is-agent { color: var(--moss); }
.speak .s__hd .who.is-outside { color: var(--wire); }
.speak .s__hd .who.is-you { color: var(--lamp); }
.speak .s__hd .kind {
  padding: 1px 5px; border: 1px solid var(--rule); font-size: 9px; letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.speak .s__hd .kind.is-agent { color: var(--moss); border-color: var(--moss); }
.speak .s__hd .kind.is-crew  { color: var(--wire); border-color: var(--wire); }
.speak .s__bd { color: var(--ink); font-size: 12px; }
.speak .s__bd .think { color: var(--ink-mute); font-style: italic; }

@keyframes slidein {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* --- bottom strip --- */
.bot {
  position: sticky; bottom: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; background: var(--paper); border-top: 1px solid var(--rule);
  font: 500 11px var(--mono); color: var(--ink-dim); gap: 14px;
}
.bot__l { color: var(--ink-dim); }
.bot__r { display: inline-flex; align-items: center; gap: 10px; }
.spark { display: inline-block; width: 80px; height: 14px; }
.spark svg { display: block; }
.bot__r em { color: var(--lamp); }
.bot__r b { color: var(--ink); }

/* --- responsive --- */
@media (max-width: 1300px) {
  .grid { grid-template-columns: 280px 1fr 320px; }
  .tag { display: none; }
}
@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr; }
  .col--l, .col--r { order: 2; }
  .col--c { order: 1; }
  .mapwrap { min-height: 500px; }
  #mapSvg { min-height: 460px; }
  .tele { gap: 8px; }
  .tele__i em { display: none; }
}
