/* The page is styled entirely from the system it is currently generating.
   Almost every value here is a custom property that app.js rewrites, which is
   why changing the seed re-skins the whole site rather than a demo box.

   The handful of fixed values are structural: layout that must not move when
   the theme does. */

:root {
  /* Overwritten on every generate(). These are only the first paint. */
  --bg: #ffffff;
  --surface: #f7f7f8;
  --surface-alt: #eeeef1;
  --text: #101014;
  --text-muted: #5b5b66;
  --brand: #3d2bb5;
  --accent: #0f6f5c;
  --button-bg: #3d2bb5;
  --button-text: #ffffff;
  --border: #dededf;
  --focus: #0f6f5c;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  --font-heading: Georgia, serif;
  --font-body: system-ui, sans-serif;
  --font-mono: ui-monospace, Menlo, monospace;
  --grain: none;

  --measure: 62ch;
  --gap: 1.5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Every colour transition is animated, so re-skinning reads as a change
     rather than a flash. */
  transition: background-color 0.5s, color 0.5s;
}

a { color: var(--brand); }
::selection { background: var(--brand); color: var(--button-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--grain);
  opacity: 0.6;
}
nav, header, main, footer { position: relative; z-index: 1; }

/* --- nav ----------------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.5s, border-color 0.5s;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); font-size: 1.05rem; }
.brand b { font-family: var(--font-heading); letter-spacing: -0.02em; }
.brand svg { display: block; border-radius: 50%; }
.navlinks { display: flex; gap: 1.3rem; margin-left: auto; }
.navlinks a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.navlinks a:hover { color: var(--text); }

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size: 0.92rem;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s, background-color 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-1px); background: var(--surface-alt); }
.btn.primary { background: var(--button-bg); color: var(--button-text); border-color: transparent; font-weight: 600; box-shadow: var(--shadow); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
.btn[aria-pressed="true"] { background: var(--button-bg); color: var(--button-text); border-color: transparent; }

/* --- hero ---------------------------------------------------------------- */

.hero { max-width: 1080px; margin: 0 auto; padding: clamp(2.5rem, 8vh, 5rem) clamp(1rem, 4vw, 2.5rem) 3rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.35rem 0.8rem; margin: 0 0 1.6rem;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1.02; letter-spacing: -0.035em;
  margin: 0 0 1rem;
}
h1 em { font-style: italic; color: var(--brand); }

.lede { color: var(--text-muted); max-width: var(--measure); font-size: clamp(1rem, 2vw, 1.12rem); margin: 0 0 1.6rem; }
.lede b, .lede em { color: var(--text); font-style: normal; }

.vibes { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.vibe {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  padding: 0.6rem 0.9rem; cursor: pointer; font: inherit; font-size: 0.9rem;
  display: flex; align-items: center; gap: 0.55rem;
  transition: 0.2s;
}
.vibe:hover { transform: translateY(-2px); }
.vibe[aria-selected="true"] { background: var(--button-bg); color: var(--button-text); border-color: transparent; }
.vibe .sw { display: flex; border-radius: 4px; overflow: hidden; }
.vibe .sw i { width: 7px; height: 14px; display: block; }

.seedbar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.seedbar label { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); }
.seedbar input {
  font-family: var(--font-mono); font-size: 0.95rem;
  padding: 0.6rem 0.9rem; min-width: 12ch;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.hint { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); margin-top: 0.9rem; min-height: 1.2em; }

/* --- sections ------------------------------------------------------------ */

main { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem) 5rem; }
section { padding: clamp(3rem, 8vh, 5rem) 0 0; }

h2 { font-family: var(--font-heading); font-size: clamp(1.8rem, 4.5vw, 2.6rem); letter-spacing: -0.03em; margin: 0 0 0.5rem; display: flex; align-items: baseline; gap: 0.8rem; }
h2 .tag { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }
h3 { font-family: var(--font-heading); font-size: 1.15rem; margin: 0 0 1rem; letter-spacing: -0.02em; }
h3.sub { margin-top: 2.5rem; }

.reveal > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in > * { opacity: 1; transform: none; }

.grid-2 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: background-color 0.5s, border-color 0.5s, box-shadow 0.5s;
}

/* --- tokens -------------------------------------------------------------- */

.ramps { display: grid; gap: 6px; margin-bottom: 1.2rem; }
.ramp { display: flex; border-radius: 8px; overflow: hidden; height: 30px; }
.ramp i { flex: 1; display: block; }

.tokens { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.78rem; }
.tokens td { padding: 0.3rem 0.4rem 0.3rem 0; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.tokens td:first-child { width: 45%; }
.tokens .chip { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--border); }
.tokens .pass { color: var(--accent); }

.type-preview > * { margin: 0 0 0.4rem; }
.type-preview .h { font-family: var(--font-heading); }
.type-preview .b { font-family: var(--font-body); color: var(--text-muted); }
.type-preview .m { font-family: var(--font-mono); font-size: 0.85rem; }

/* Generous gutters: a floating shadow is 60px of blur and it needs somewhere
   to land, or the swatches clip each other's shadows and every level looks the
   same again. No border either — the shadow is the only thing that should be
   separating these from the page. */
.elevations { display: grid; gap: 1.2rem; grid-template-columns: repeat(5, 1fr); padding: .4rem .2rem 1.4rem; }
.elev {
  aspect-ratio: 1; border-radius: var(--radius); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  font-family: var(--font-mono); font-size: .68rem; color: var(--text-muted);
}
.elev b { font-weight: 500; color: var(--text); }
.elev span { opacity: .6; }
.elev.here { outline: 2px solid var(--focus); outline-offset: 3px; }

.textures { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.tex {
  aspect-ratio: 1; border-radius: var(--radius);
  border: 1px solid var(--border); background-color: var(--bg);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
/* The label sits under the artwork rather than on top of it — a caption over a
   dark shape needed its own background plate, which looked like a bug. */
.tex span {
  margin-top: auto; padding: 3px 6px;
  font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted);
  background: var(--bg); border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.tex.shape { color: var(--brand); }
.tex.shape svg { width: 100%; flex: 1; min-height: 0; display: block; }
/* Dividers are wide and short by nature; centring them stops the squash. */
.tex.divider svg { flex: none; margin: auto 0; height: 46px; }

.gradbox { height: 150px; border-radius: var(--radius); margin-bottom: 0.8rem; border: 1px solid var(--border); }

.code {
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.5;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.8rem; overflow: auto; margin: 0; color: var(--text-muted);
  white-space: pre-wrap; word-break: break-word;
}
.code.tall { max-height: 420px; white-space: pre; word-break: normal; }

.motionbox { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.motionbox .m { width: 44px; height: 44px; border-radius: var(--radius); background: var(--button-bg); }

/* --- demo ---------------------------------------------------------------- */

.tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); margin-bottom: 1.2rem; flex-wrap: wrap; }
.tabs button { border: none; background: none; color: var(--text-muted); font: inherit; font-size: 0.86rem; padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--button-bg); color: var(--button-text); font-weight: 600; }

.demo-frame {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg); box-shadow: var(--shadow);
  min-height: 380px;
}

.contexts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ctx { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.ctx .label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.ctx iframe { width: 100%; height: 200px; border: 0; display: block; background: #fff; }

/* --- avatars ------------------------------------------------------------- */

.avbar { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.avbar input { font-family: var(--font-mono); padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chips button { font: inherit; font-size: 0.8rem; padding: 0.32rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text-muted); cursor: pointer; }
.chips button[aria-selected="true"] { background: var(--button-bg); color: var(--button-text); border-color: transparent; }

.avgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.av { text-align: center; }
.av svg { width: 100%; height: auto; display: block; }
.av span { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); display: block; margin-top: 0.4rem; }

/* --- chaos --------------------------------------------------------------- */

.chaosgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 1.4rem; }
.chaos {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 1rem; overflow: hidden;
}
.chaos .what { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.chaos .why { font-size: 0.78rem; color: var(--text-muted); margin: 0.3rem 0 0.7rem; }
.chaos .box {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 0.7rem; background: var(--bg); min-height: 68px;
  /* The point of the test: the container does not get to cheat. */
  overflow-wrap: break-word;
}
.chaos img { max-width: 100%; border-radius: 6px; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.checks li { display: flex; gap: 0.6rem; align-items: baseline; font-size: 0.9rem; }
.checks .ok { color: var(--accent); font-weight: 700; }
.checks .no { color: #c0392b; font-weight: 700; }
.checks small { display: block; color: var(--text-muted); }

/* --- export -------------------------------------------------------------- */

.exportbox { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.exporthead { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
.exporthead span { margin-right: auto; }
.subfile { max-width: 55%; font-family: var(--font-mono); font-size: 0.76rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.2rem 0.4rem; cursor: pointer; }
.report { margin-top: var(--gap); }
.report table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.78rem; }
.report td { padding: 0.35rem 0.4rem 0.35rem 0; border-bottom: 1px solid var(--border); }
.report .ratio { text-align: right; color: var(--text-muted); }
.report .ok { color: var(--accent); }
.report .no { color: #c0392b; }

/* --- gallery ------------------------------------------------------------- */

.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: left; padding: 0; font: inherit; color: inherit;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .strip { height: 54px; display: flex; }
.card .strip i { flex: 1; }
.card .meta { padding: 0.6rem 0.8rem; }
.card .meta b { display: block; font-size: 0.9rem; }
.card .meta span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }

/* --- footer -------------------------------------------------------------- */

footer { border-top: 1px solid var(--border); padding: 2.5rem clamp(1rem, 4vw, 2.5rem); text-align: center; color: var(--text-muted); }
footer .fine { font-size: 0.82rem; }

@media (max-width: 720px) { .navlinks { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
  .reveal > * { opacity: 1; transform: none; }
}

/* Swatch labels sit above the artwork they describe. */
.tex span.on-top { z-index: 1; background: color-mix(in srgb, var(--bg) 75%, transparent); padding: 0 3px; border-radius: 3px; }

/* --- the mascot ---------------------------------------------------------- */
/* He sits under the hero controls. Pointer-events off on the SVG so he never
   swallows a click meant for the button behind him. */
.mascotwrap {
  display: flex; align-items: center; gap: .9rem;
  margin-top: 2.2rem; cursor: pointer; user-select: none;
}
.mascotwrap svg { pointer-events: none; overflow: visible; }
#nu-mascot-pupils { transition: transform .12s cubic-bezier(.2,.8,.3,1); }
#nu-mascot-mouth, #nu-mascot-brows { transition: all .2s ease; }
.quip {
  position: relative; margin: 0; padding: .5rem .85rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); font-size: .9rem; color: var(--text-muted);
  font-family: var(--font-mono);
}
.quip::before {
  content: ''; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--surface); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

/* --- remix --------------------------------------------------------------- */
.remix { margin-top: 1.6rem; }
.remix h3, .sub { font-family: var(--font-heading); margin: 0 0 .4rem; }
.sub { margin-top: 2.6rem; }
.remixrow { display: flex; gap: 2rem; flex-wrap: wrap; margin: .9rem 0 1.2rem; }
.remixrow label { display: block; font-size: .8rem; color: var(--text-muted); }
.chips.sm button { font-size: .78rem; padding: .25rem .55rem; }
.moodstrip { display: flex; gap: .8rem; flex-wrap: wrap; }
.moodstrip .av span { font-size: .7rem; }

/* --- personas ------------------------------------------------------------ */
.persona {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center;
  padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
  border-left: 6px solid var(--p);
}
.persona .pface svg { display: block; border-radius: 50%; }
.pmeta h3 { margin: 0; font-family: var(--font-heading); font-size: 1.7rem; }
.phandle { margin: .15rem 0 .7rem; font-family: var(--font-mono); font-size: .85rem; color: var(--text-muted); }
.pbio { margin: 0 0 .5rem; font-size: 1.02rem; }
.psays { margin: 0 0 .9rem; color: var(--text-muted); font-style: italic; }
.ptraits { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: .8rem; }
.ptraits span {
  font-size: .76rem; padding: .2rem .6rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted);
}
.penergy { display: flex; gap: 3px; }
.penergy i { width: 20px; height: 6px; border-radius: 3px; background: var(--border); }
.penergy i.on { background: var(--p); }
.pkit { display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.pkitem { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.pkitem svg { border-radius: 50%; }
.pkitem span { font-size: .65rem; color: var(--text-muted); font-family: var(--font-mono); }

.cardbox { margin: 1rem 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cardbox svg { display: block; width: 100%; height: auto; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; }

.castgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .9rem; margin-top: 1rem; }
.castcard {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center;
  padding: 1rem .6rem; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius);
  background: var(--surface);
}
.castcard svg { border-radius: 50%; }
.castcard b { font-size: .92rem; }

/* --- judgement ----------------------------------------------------------- */
.judgegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1rem; }
.judgegrid .panel h3 { margin: 0 0 .3rem; font-family: var(--font-heading); }
.fixbar { display: flex; align-items: center; gap: .5rem; margin: .8rem 0; }
.fixbar input {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: .9rem; padding: .45rem .6rem;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
}
.fixdemo { display: grid; gap: .3rem; margin-bottom: .7rem; }
.fixdemo div { padding: .6rem .8rem; border-radius: var(--radius); border: 1px solid var(--border); font-size: 1rem; }
.verdict { margin: .5rem 0; font-weight: 600; font-size: .95rem; }
.verdict.good { color: var(--accent); }
.verdict.bad, .verdict.warn { color: var(--brand); }
i.sw { display: inline-block; width: 16px; height: 16px; border-radius: 3px; border: 1px solid var(--border); vertical-align: -3px; margin-right: .3rem; }
.tokens.vision th { font-size: .68rem; color: var(--text-muted); font-weight: 500; text-align: left; }
.tokens .num { text-align: right; font-family: var(--font-mono); font-size: .85rem; }
#roastin {
  width: 100%; font-family: var(--font-mono); font-size: .85rem; padding: .5rem;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: .6rem; resize: vertical;
}
.burns { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .92rem; }
.burns li { margin-bottom: .5rem; }

/* --- battle -------------------------------------------------------------- */
.battle { margin-top: 1rem; }
.bpair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.bside {
  display: flex; flex-direction: column; gap: .7rem; align-items: flex-start;
  padding: 1.4rem; border: 1px solid; border-radius: var(--radius-lg); cursor: pointer;
  font: inherit; text-align: left; transition: transform .18s ease, box-shadow .18s ease;
}
.bside:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bside b { font-size: 1.25rem; }
.bramp { display: flex; width: 100%; height: 10px; border-radius: 5px; overflow: hidden; }
.bramp i { flex: 1; }
.bbtn { padding: .45rem .9rem; font-size: .85rem; font-weight: 600; }
.bvs { color: var(--text-muted); font-size: .85rem; }

.keys { opacity: .45; transition: opacity .2s ease; }
.keys.lit { opacity: 1; }
.keys kbd {
  font-family: var(--font-mono); font-size: .75rem; padding: .1rem .35rem;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px;
}

@media (max-width: 900px) {
  /* A five-wide ladder stops reading as a ladder once each rung is 40px. */
  .elevations { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .persona { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .pkit { flex-direction: row; }
  .bpair { grid-template-columns: 1fr; }
  .mascotwrap { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  #nu-mascot-pupils, #nu-mascot-mouth, #nu-mascot-brows, .bside { transition: none; }
}

/* --- the room ------------------------------------------------------------ */
.roomgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1rem; }
.roomgrid .panel h3 { margin: 0 0 .3rem; font-family: var(--font-heading); }

.drop {
  display: grid; place-items: center; min-height: 90px; margin: .8rem 0;
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  color: var(--text-muted); font-size: .85rem; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.drop:hover, .drop.over { border-color: var(--focus); background: var(--surface-alt); }
.fromimg { display: grid; gap: .4rem; margin-bottom: .6rem; }
.fromimg div { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.fromimg i { width: 26px; height: 26px; border-radius: 5px; border: 1px solid var(--border); flex: none; }
.fromimg span { margin-left: auto; font-family: var(--font-mono); font-size: .72rem; }

.log { margin: .6rem 0; padding-left: 1.2rem; font-size: .88rem; max-height: 220px; overflow-y: auto; }
.log li { margin-bottom: .3rem; }

/* --- printed sheets ------------------------------------------------------ */
.papergrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; margin: 1rem 0; }
.sheet { margin: 0; }
.sheet > div {
  background: #fff; border: 1px solid var(--border); border-radius: 2px;
  box-shadow: var(--shadow); overflow: hidden; line-height: 0;
}
.sheet svg { display: block; }
.sheet figcaption { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); padding-top: .4rem; }

/* --- eras ---------------------------------------------------------------- */
.eragrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1rem; }
.era { margin: 0; }
.era svg { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: var(--radius); }
.era figcaption { font-size: .82rem; padding-top: .45rem; }

/* --- present mode -------------------------------------------------------- */
/* Everything that could change the design, hidden. The design itself, not. */
body.presenting .seedbar,
body.presenting .vibes,
body.presenting .avbar,
body.presenting .remix,
body.presenting .chips,
body.presenting .tabs,
body.presenting .exporthead,
body.presenting .fixbar,
body.presenting #roastin,
body.presenting .keys,
body.presenting .btn,
body.presenting .mascotwrap,
body.presenting #battle { display: none !important; }
/* …except the way out, which stays. */
body.presenting #present {
  display: inline-flex !important; position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  opacity: .35; transition: opacity .2s ease;
}
body.presenting #present:hover, body.presenting #present:focus-visible { opacity: 1; }
body.presenting .hint { opacity: .6; }
