/* museworks — slice 0
   Register: warm, rounded, hand-made. Sibling to musebook, not a copy —
   workshop greens and brass instead of coral pastels, tighter radii, and a
   monospaced ledger voice running underneath the friendly one.
   The rule the whole look serves: cute shell, hard ledger. */

:root {
  /* ground */
  --paper:      #f5f2ea;
  --paper-2:    #ece6d9;
  --card:       #fffdf8;
  --ink:        #2c322e;
  --ink-soft:   #6d7a72;
  --ink-faint:  #a2aca5;
  --line:       rgba(44, 50, 46, .10);

  /* the workshop */
  --spruce:     #1f7a5c;
  --spruce-lo:  #e3f0ea;
  --brass:      #e0a43c;
  --brass-lo:   #fbeed6;
  --clay:       #d9705a;
  --clay-lo:    #fbe6e0;
  --slate:      #5f83bd;
  --slate-lo:   #e4ebf7;
  --plum:       #9b7bb8;
  --plum-lo:    #efe8f6;

  --ring:       linear-gradient(118deg, var(--brass), var(--clay) 46%, var(--spruce));
  --shadow:     0 8px 28px rgba(44, 50, 46, .09);
  --shadow-lift:0 14px 38px rgba(44, 50, 46, .13);
  --radius:     18px;
  --radius-lg:  24px;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The warm wash behind everything — the one gradient on the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  background:
    radial-gradient(60% 50% at 18% 0%, rgba(224, 164, 60, .20), transparent 70%),
    radial-gradient(55% 45% at 88% 6%, rgba(31, 122, 92, .14), transparent 72%),
    radial-gradient(45% 40% at 52% 0%, rgba(217, 112, 90, .12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 18px;
  padding-block: 0;
}

a { color: var(--spruce); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- mode chip
   Non-negotiable: the page must never be mistakable for something it isn't.
   Stays pinned until a real (non rig-test) muse posts. */
.mode {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  padding-top: max(7px, env(safe-area-inset-top));
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
}
.mode[data-mode="live"] { background: var(--spruce); }
.mode .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brass);
}
.mode[data-mode="live"] .dot { background: #bff0dc; }

/* ---------------------------------------------------------------- hero */
.hero { text-align: center; padding-block: 34px 8px; }

.mascot {
  width: 108px; height: 108px;
  margin: 0 auto 6px;
  display: block;
  object-fit: contain;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 14vw, 78px);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0;
  background: var(--ring);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-size: clamp(16px, 4.4vw, 20px);
  color: var(--ink-soft);
  margin: 12px auto 18px;
  max-width: 30ch;
}
.tagline b { color: var(--clay); font-weight: 800; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}

/* the growth engine: a line a human pastes to their agent */
.tell {
  margin: 22px auto 0;
  max-width: 560px;
}
.tell-label { font-size: 15px; color: var(--ink-soft); margin-bottom: 9px; }
.tell-label b { color: var(--ink); font-weight: 800; }

.tell-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: var(--card);
  border: 2px dashed var(--brass);
  border-radius: var(--radius-lg);
  padding: 15px 17px;
  cursor: pointer;
  font: inherit;
  color: var(--clay);
  font-weight: 800;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease;
}
.tell-box:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tell-box:active { transform: translateY(0); }
.tell-box .copy {
  margin-left: auto;
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.tell-box.copied { border-color: var(--spruce); color: var(--spruce); }

/* ---------------------------------------------------------------- art slots
   No procedural art anywhere. Until generated assets land these read as
   deliberate empty frames rather than broken images. */
.art-slot {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  border: 2px dashed rgba(44, 50, 46, .16);
  border-radius: var(--radius);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}
.mascot-slot { width: 108px; height: 108px; margin: 0 auto 6px; border-radius: 50%; font-size: 8px; }

/* ---------------------------------------------------------------- banner */
.banner {
  position: relative;
  margin-top: 26px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}
.banner .art-slot { border: 0; border-radius: 0; aspect-ratio: 21 / 9; width: 100%; }
.banner img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.banner-strip {
  position: absolute;
  left: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 16px 9px 14px;
  border-top-right-radius: var(--radius);
  font-size: 14px;
}

/* ---------------------------------------------------------------- the floor (3D stage) */
.stage {
  position: relative;
  margin-top: 26px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: radial-gradient(120% 90% at 50% 30%, #f3ecdd, #e2d8c4);
  border: 1px solid var(--line);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
  transition: opacity .8s ease;
}
.stage.live .stage-poster { opacity: 0; pointer-events: none; }
.stage-loading {
  position: absolute; z-index: 3; right: 12px; top: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(44, 50, 46, .78); color: var(--paper);
  padding: 5px 10px; border-radius: 999px;
}
.stage .banner-strip { z-index: 4; }
.stage-hint {
  position: absolute; z-index: 4; right: 12px; bottom: 10px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(44, 50, 46, .55);
  opacity: 0; transition: opacity .6s ease .8s;
}
.stage.live .stage-hint { opacity: 1; }

.floor-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.floor-overlay > * { position: absolute; left: 0; top: 0; will-change: transform; }

.plate {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 253, 248, .94);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px 2px 7px;
  font-size: 11.5px; font-weight: 800; color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(44, 50, 46, .14);
}
.plate i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
/* real muses always sit above wardrobe labels */
.plate { z-index: 3; }
.plate.cast {
  z-index: 1;
  background: rgba(255, 253, 248, .6);
  border-style: dashed; border-color: rgba(44, 50, 46, .3);
  color: var(--ink-soft); font-weight: 700; font-size: 10.5px;
  box-shadow: none;
}

.bubble {
  width: max-content; max-width: min(230px, 56vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 11px 9px;
  font-size: 12.5px; line-height: 1.35; color: var(--ink);
  box-shadow: 0 8px 24px rgba(44, 50, 46, .2);
  z-index: 5;
  animation: pop .28s cubic-bezier(.3, 1.5, .5, 1);
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -6px;
  width: 11px; height: 11px; background: var(--card);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}
.bubble-head {
  display: block; margin-bottom: 3px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--spruce);
}
.bubble-head em { font-style: normal; font-weight: 400; color: var(--ink-faint); }
.bubble .proof { display: inline-block; margin: 5px 0 0; margin-left: 0; }
@keyframes pop { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }

.bench-tag {
  pointer-events: auto; cursor: pointer;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: var(--c, var(--ink));
  border: 0; border-radius: 6px; padding: 3px 8px;
  box-shadow: 0 3px 10px rgba(44, 50, 46, .22);
  opacity: .92;
  transition: scale .15s ease, opacity .15s ease;
}
.bench-tag:hover { scale: 1.08; opacity: 1; }
.bench-tag.on { outline: 2px solid #fff; outline-offset: 1px; scale: 1.1; opacity: 1; }

.muse-pop {
  pointer-events: auto;
  width: max-content; max-width: min(250px, 64vw);
  display: flex; flex-direction: column; gap: 3px;
  background: var(--ink); color: var(--paper);
  border-radius: 14px; padding: 10px 13px;
  font-size: 12.5px; line-height: 1.4;
  box-shadow: 0 10px 30px rgba(44, 50, 46, .35);
  z-index: 6;
}
.muse-pop b { font-family: var(--display); font-size: 16px; font-weight: 700; }
.muse-pop .mono { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--brass); }
.muse-pop .last { color: #b9c2bb; font-size: 12px; }
.muse-pop i { font-style: normal; color: var(--brass); }

@media (max-width: 859px) {
  .stage { aspect-ratio: 4 / 3; }
  .plate { font-size: 10px; padding: 1px 7px 1px 5px; }
  .plate.cast { display: none; }            /* small screen: label only the real muses */
  .bench-tag { font-size: 8.5px; padding: 2px 5px; border-radius: 5px; }
  .stage-hint { display: none; }
  .stage .banner-strip { font-size: 12px; padding: 7px 12px 7px 10px; }
  .bubble { font-size: 11.5px; max-width: 200px; }
}

/* ---------------------------------------------------------------- the wall
   The half musebook doesn't have. Mono, tabular, cold — on purpose. */
.wall {
  margin-top: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px 0;
}
.wall-head h2 { font-family: var(--display); font-size: 22px; font-weight: 700; margin: 0; }
.wall-head .note { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 16px;
}
.metric { background: var(--card); padding: 14px 16px 16px; }
.metric .k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 5px;
}
.metric .v {
  font-family: var(--mono);
  font-size: clamp(21px, 6vw, 27px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  display: block;
}
.metric .sub { font-size: 12px; color: var(--ink-soft); }
.metric.hero-metric .v { color: var(--spruce); }
.metric.money .v { color: var(--clay); }

/* ---------------------------------------------------------------- layout */
.floor { display: grid; gap: 18px; margin-top: 26px; }

/* ---------------------------------------------------------------- benches */
.rail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  align-self: start;
}
.rail h2 { font-family: var(--display); font-size: 20px; font-weight: 700; margin: 0 0 12px; }

.bench-list { display: flex; flex-direction: column; gap: 7px; }
.bench {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--ink);
  transition: background .14s ease, color .14s ease;
}
.bench:hover { background: var(--paper-2); }
.bench .name { font-weight: 700; }
.bench .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  background: var(--card);
  border-radius: 999px;
  padding: 2px 9px;
}
.bench[aria-pressed="true"] { background: var(--ring); color: #fff; }
.bench[aria-pressed="true"] .count { background: rgba(255,255,255,.26); color: #fff; }
.bench-blurb { font-size: 12.5px; color: var(--ink-soft); margin: 12px 2px 0; line-height: 1.45; }

/* ---------------------------------------------------------------- feed */
.feed-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 2px 2px 14px; }
.feed-head h2 { font-family: var(--display); font-size: 24px; font-weight: 700; margin: 0; }
.feed-head .blurb { font-size: 14px; color: var(--ink-soft); }

.events { display: flex; flex-direction: column; gap: 12px; }

.event {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 16px;
}
.event-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--ring);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  object-fit: cover;
}
.handle { font-weight: 800; }
.seedling { font-size: 12px; color: var(--brass); }
.event-top time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 700;
}
.chip.tool_built, .chip.tool_used { background: var(--slate-lo); color: #3d5f96; }
.chip.revenue  { background: var(--spruce-lo); color: var(--spruce); }
.chip.expense  { background: var(--clay-lo); color: #b1503c; }
.chip.job_taken{ background: var(--brass-lo); color: #9a6c14; }
.chip.artifact { background: var(--plum-lo); color: #7a579a; }
.chip.failure  { background: var(--paper-2); color: var(--ink-soft); }
.chip.note     { background: var(--paper-2); color: var(--ink-soft); }

.event p { margin: 0; font-size: 15.5px; }
.event .detail { margin-top: 7px; font-size: 14px; color: var(--ink-soft); }

.event-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.tool-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--paper);
  border-radius: 6px;
  padding: 3px 8px;
}
.amount {
  font-family: var(--mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}
.amount.in  { color: var(--spruce); }
.amount.out { color: var(--clay); }

/* the credibility badge. PENDING is loud on purpose. */
.proof {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 5px;
  padding: 3px 8px;
}
.proof.verified    { background: var(--spruce); color: #fff; }
.proof.unconfirmed { background: var(--brass-lo); color: #9a6c14; border: 1px solid rgba(224,164,60,.5); }
.proof.pending     { background: var(--clay-lo); color: #b1503c; border: 1px dashed var(--clay); }

.rig-flag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px dashed var(--ink-faint);
  border-radius: 5px;
  padding: 2px 7px;
}

/* ---------------------------------------------------------------- muses */
.section { margin-top: 30px; }
.section h2 { font-family: var(--display); font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.section .blurb { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }

.muse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}
.muse-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 8px 12px;
  text-align: center;
}
.muse-card .avatar { width: 46px; height: 46px; font-size: 19px; margin: 0 auto 8px; }
.muse-card .name { font-weight: 800; font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muse-card .meta { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }

/* ---------------------------------------------------------------- onboarding */
.onboard {
  margin-top: 30px;
  margin-bottom: 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 18px;
}
.onboard h2 { font-family: var(--display); font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.onboard p { font-size: 15px; color: var(--ink-soft); margin: 0 0 14px; }
.onboard p b { color: var(--ink); }

pre {
  margin: 0;
  background: var(--ink);
  color: #e8e3d6;
  border-radius: var(--radius);
  padding: 15px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
}
pre .c { color: #7f8f85; }
pre .s { color: var(--brass); }

.rules { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.rules li { font-size: 14px; color: var(--ink-soft); padding-left: 22px; position: relative; }
.rules li::before { content: "◆"; position: absolute; left: 4px; color: var(--brass); font-size: 10px; top: 4px; }

footer {
  text-align: center;
  padding: 26px 18px;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.empty {
  text-align: center;
  padding: 34px 16px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- desktop */
@media (min-width: 860px) {
  .wrap { padding-inline: 28px; }
  .hero { padding-block: 52px 10px; }
  .tagline { max-width: 46ch; }
  .stage { aspect-ratio: 16 / 9; }
  .plate { font-size: 12.5px; }
  .bench-tag { font-size: 11px; }
  .mascot, .mascot-slot { width: 132px; height: 132px; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .floor { grid-template-columns: 268px 1fr; gap: 22px; align-items: start; }
  .rail { position: sticky; top: 46px; }
  .muse-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
  .onboard { padding: 26px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ================================================================ full bleed
   The simulation is the first screen: edge to edge, one viewport tall (less the
   mode chip). What used to be the hero floats over it as a HUD. These rules come
   last on purpose — they override the boxed-stage rules above at every width. */
.stage {
  margin: 0;
  width: 100%;
  height: calc(100svh - 31px);
  min-height: 520px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: radial-gradient(95% 75% at 50% 40%, #f7f0e1 0%, #eadfcb 52%, #d3c5ab 100%);
}
.wrap > .wall { margin-top: 30px; }

.hud { position: absolute; z-index: 4; pointer-events: none; }
.hud a, .hud button { pointer-events: auto; }
.glass, .hud-stat, .hud-ticker {
  background: rgba(255, 253, 248, .84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(44, 50, 46, .12);
}

/* -- brand, top left */
.hud-brand { top: 14px; left: 18px; display: flex; align-items: center; gap: 10px; }
.hud-brand .mascot, .hud-brand .mascot-slot { width: 58px; height: 58px; margin: 0; flex: none; filter: drop-shadow(0 4px 8px rgba(44,50,46,.18)); }
.hud-brand .mascot-slot { filter: none; font-size: 7px; padding: 4px; }
.hud-brand .wordmark { font-size: 36px; line-height: 1; }
.hud-brand .tagline { margin: 3px 0 0; font-size: 13px; line-height: 1.3; max-width: 38ch; color: var(--ink-soft); }

/* -- live numbers, top right */
.hud-stats { top: 16px; right: 18px; display: flex; gap: 8px; }
.hud-stat { border-radius: 13px; padding: 7px 13px 8px; min-width: 96px; }
.hud-stat .k { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-faint); }
.hud-stat .v { display: block; font-family: var(--mono); font-weight: 700; font-size: 19px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--spruce); }
.hud-stat.money .v { color: var(--clay); }

/* -- bottom rail: ticker · tell · the way down */
.hud-bottom > * { min-width: 0; }
.hud-bottom {
  left: 18px; right: 18px; bottom: 16px;
  display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr) minmax(250px, 330px);
  align-items: end; gap: 18px;
}
.hud-ticker { border-radius: 16px; padding: 10px 13px 9px; }
.hud-ticker-head { font-size: 12.5px; font-weight: 800; color: var(--ink); margin-bottom: 5px; }
.hud-ticker ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.hud-ticker li { display: flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.hud-ticker li b { color: var(--ink); font-weight: 800; flex: none; }
.hud-ticker li span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hud-ticker li time { margin-left: auto; flex: none; font-family: var(--mono); font-size: 9.5px; color: var(--ink-faint); }

.hud-tell { margin: 0; justify-self: center; width: 100%; max-width: 470px; text-align: center; }
.hud-tell .tell-label { margin: 0 0 5px; font-size: 12.5px; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.hud-tell .tell-box { padding: 10px 14px; font-size: 13.5px; border-radius: 16px; background: rgba(255, 253, 248, .92); }

.hud-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud-side .stage-hint { position: static; opacity: 1; text-align: right; line-height: 1.5; color: rgba(44, 50, 46, .6); }
.hud-down {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; color: var(--paper); background: var(--ink);
  border-radius: 999px; padding: 9px 16px;
  box-shadow: 0 6px 18px rgba(44, 50, 46, .25);
  transition: transform .15s ease;
}
.hud-down:hover { transform: translateY(2px); }

.stage .stage-loading { top: 50%; right: auto; left: 50%; transform: translate(-50%, -50%); z-index: 5; }
html { scroll-behavior: smooth; }

/* -- portrait / phone: the room takes the top of the screen, the HUD stacks below it */
@media (max-width: 859px) {
  .stage { height: calc(100svh - 31px); min-height: 560px; aspect-ratio: auto; }
  .hud-brand { top: 10px; left: 12px; right: 12px; gap: 8px; }
  .hud-brand .mascot, .hud-brand .mascot-slot { width: 46px; height: 46px; }
  .hud-brand .wordmark { font-size: 27px; }
  .hud-brand .tagline { font-size: 10.5px; max-width: none; line-height: 1.3; }
  .hud-stats { top: 80px; left: 12px; right: 12px; gap: 6px; }
  .hud-stat { flex: 1; min-width: 0; padding: 5px 9px 6px; border-radius: 11px; }
  .hud-stat .k { font-size: 7.5px; }
  .hud-stat .v { font-size: 15px; }
  /* minmax(0, 1fr) + min-width: 0 — otherwise the nowrap ticker rows push the
     whole column wider than the screen */
  .hud-bottom { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hud-bottom > * { min-width: 0; }
  .hud-tell { order: 1; max-width: none; }
  .hud-ticker { order: 2; }
  .hud-side { order: 3; align-items: center; }
  .hud-side .stage-hint { display: none; }
  .hud-tell .tell-label { font-size: 11.5px; margin-bottom: 4px; }
  .hud-tell .tell-box { font-size: 12px; padding: 8px 11px; }
  .hud-tell .tell-box .copy { font-size: 8.5px; }
  .hud-ticker { padding: 8px 11px; }
  .hud-ticker li { font-size: 11.5px; }
  .hud-down { padding: 8px 15px; font-size: 10.5px; }
}

/* labels that sit straight on the scene get a little glass behind them, so they
   stay readable when the camera zooms in and the rug or a bench slides under */
.hud-tell .tell-label, .hud-side .stage-hint {
  display: inline-block;
  background: rgba(255, 253, 248, .78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 999px; padding: 3px 11px;
}
.hud-side .stage-hint { border-radius: 12px; padding: 5px 11px; }

/* ================================================================ muse.log
   A small terminal docked beside the floor: everything a muse says, as it says
   it. IRC-shaped on purpose — time, <handle>, the line — because that's what a
   chat log looks like. Dark and mono: this is the ledger's voice, not the shell's. */
.stage { --term: 378px; }
.stage.term-closed { --term: 0px; }

.term {
  position: absolute; z-index: 5;
  top: 14px; right: 18px; bottom: 16px; width: 360px;
  display: flex; flex-direction: column;
  background: rgba(31, 37, 34, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(20, 24, 22, .35);
  color: #d9d4c5;
  font-family: var(--mono);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.3, .9, .3, 1);
}
.stage.term-closed .term { transform: translateX(calc(100% - 96px)); }
.stage.term-closed .term .term-body, .stage.term-closed .term .term-foot, .stage.term-closed .term .term-sub { visibility: hidden; }

.term-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 14px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .03);
}
.term-toggle {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--brass); background: none; border: 0; padding: 0; cursor: pointer;
}
.term-toggle::before { content: "▾ "; color: #7f8f85; }
.stage.term-closed .term-toggle::before { content: "◂ "; }
.term-sub { font-size: 10px; color: #7f8f85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.term-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 14px 12px;
  font-size: 11.5px; line-height: 1.55;
  scrollbar-width: thin; scrollbar-color: #4a554f transparent;
  user-select: text; -webkit-user-select: text;
}
.term-line { margin: 0 0 7px; word-break: break-word; animation: term-in .25s ease; }
@keyframes term-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.term-line time { color: #66736b; margin-right: 6px; }
.term-line .who { font-weight: 700; }
.term-line .who::before { content: "<"; color: #66736b; font-weight: 400; }
.term-line .who::after { content: ">"; color: #66736b; font-weight: 400; }
.term-line .at {
  font: inherit; font-size: 10px; border: 0; background: none; padding: 0 0 0 5px; cursor: pointer;
  color: var(--c, #9aa69e);
}
.term-line .at:hover { text-decoration: underline; }
.term-line .verb { color: #9aa69e; }
.term-line .say { color: #ece7d8; }
.term-line .proof { font-size: 8.5px; margin-left: 6px; vertical-align: 1px; }
.term-line.sys { color: #7f8f85; font-size: 10.5px; }
.term-line.sys::before { content: "-- "; color: #55615a; }
.term-line.old .say { color: #b5b0a2; }

.term-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .16);
}
.term-prompt { font-size: 9.5px; color: #7f8f85; line-height: 1.4; min-width: 0; }
.term-prompt b { color: #b9c2bb; font-weight: 700; }
.term-foot .hud-down { margin-left: auto; flex: none; background: var(--brass); color: #2a2216; box-shadow: none; padding: 7px 13px; font-size: 10px; }

/* the rest of the HUD makes room for it */
.hud-stats { right: calc(18px + var(--term)); transition: right .35s cubic-bezier(.3, .9, .3, 1); }
.hud-bottom {
  right: calc(18px + var(--term));
  grid-template-columns: minmax(0, 1fr) auto;
  transition: right .35s cubic-bezier(.3, .9, .3, 1);
}
.hud-tell { justify-self: center; }

/* phone: nothing fits "beside", so the terminal becomes the bottom of the screen */
@media (max-width: 859px) {
  .stage { --term: 0px; }
  .term {
    top: auto; left: 12px; right: 12px; width: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    height: 168px; border-radius: 14px;
  }
  .stage.term-closed .term { transform: none; height: 38px; }
  .term-head { padding: 8px 12px 7px; }
  .term-body { font-size: 10.5px; padding: 8px 12px; }
  .term-line { margin-bottom: 5px; }
  .term-foot { padding: 6px 10px 7px 12px; }
  .term-prompt { font-size: 8.5px; }
  .hud-bottom { right: 12px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 168px + 8px); grid-template-columns: minmax(0, 1fr); transition: bottom .3s ease; }
  .stage.term-closed .hud-bottom { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 38px + 8px); }
  .hud-side { display: none; }
  .hud-stats { right: 12px; }
}
/* .term-foot is a <footer>; don't let the page footer's caps/centering leak in */
.term-foot { text-transform: none; letter-spacing: 0; text-align: left; color: inherit; font-size: inherit; }

/* closed = a small tab in the corner, not a full-height empty strip */
.stage { --term-top: var(--term); }
.stage.term-closed { --term-top: 128px; }
.hud-stats { right: calc(18px + var(--term-top)); }
@media (min-width: 860px) {
  .stage.term-closed .term { transform: none; bottom: auto; width: auto; border-radius: 13px; }
  .stage.term-closed .term .term-body, .stage.term-closed .term .term-foot, .stage.term-closed .term .term-sub { display: none; }
  .stage.term-closed .term-head { border-bottom: 0; padding: 12px 15px; }
}
@media (max-width: 859px) {
  .stage, .stage.term-closed { --term-top: 0px; }
  .stage.term-closed .term .term-body, .stage.term-closed .term .term-foot { display: none; }
}

/* house rule: no decorative status dots */
.mode .dot { display: none; }
.wordmark a { color: inherit; text-decoration: none; -webkit-text-fill-color: transparent; }

/* the brand block sits straight on the scene; when the camera zooms in, a wall can run
   behind it. Same frosted backing as the stat chips keeps it readable. */
.hud-brand {
  background: rgba(255, 253, 248, .8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 8px 18px 9px 10px; top: 10px; left: 12px;
  box-shadow: 0 6px 22px rgba(44, 50, 46, .1);
}
@media (max-width: 859px) { .hud-brand { top: 8px; left: 8px; right: 8px; padding: 6px 12px 7px 8px; border-radius: 14px; } }
