/* ============================================================
   MindSpar — "debate arena" identity
   Flat warm-ink canvas · condensed poster display · a central
   spine with two opposing color zones (FOR = vermilion, AGAINST
   = cyan) and a brass verdict. Deliberately unlike the planner,
   the field-manual, and the gallery sites.
   ============================================================ */

:root {
  --ink: #16151b;
  --ink-2: #1d1c24;
  --ink-3: #26242e;
  --line: #36333f;
  --bone: #ece7df;
  --bone-dim: #a39e97;
  --aff: #e2483d;   /* the case FOR  */
  --neg: #2fb6c0;   /* the case AGAINST */
  --brass: #d8b25a; /* the verdict */
  --rad: 4px;
  --maxw: 1120px;
  --serif: "Spectral", Georgia, serif;
  --cond: "Oswald", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* faint structural grid, no gradient */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .05; pointer-events: none; z-index: 0;
}
.spine {
  position: fixed; top: 0; bottom: 0; left: 50%;
  width: 1px; transform: translateX(-.5px);
  background: linear-gradient(var(--line), transparent 60%, var(--line));
  opacity: .55; z-index: 0; pointer-events: none;
}
@media (max-width: 860px){ .spine{ display:none; } }

a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--brass); }
h1,h2,h3,h4 { margin: 0; font-weight: 600; }

.aff-ink { color: var(--aff); }
.neg-ink { color: var(--neg); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(18px, 5vw, 40px);
  background: rgba(22,21,27,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: inline-flex; }
.brand-word {
  font-family: var(--cond); font-weight: 700;
  letter-spacing: .22em; font-size: 19px;
}
.topnav { display: flex; gap: 26px; margin-left: auto; }
.topnav a {
  font-family: var(--cond); font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em;
  font-size: 13px; color: var(--bone-dim);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.topnav a:hover { color: var(--bone); border-color: var(--brass); }
.btn-mini {
  font-family: var(--cond); text-transform: uppercase;
  letter-spacing: .1em; font-size: 13px; font-weight: 600;
  padding: 9px 16px; border: 1px solid var(--brass); color: var(--brass);
  border-radius: var(--rad); cursor: pointer; transition: background .15s ease, color .15s ease;
}
.btn-mini:hover { background: var(--brass); color: var(--ink); }
.btn-mini.ghost { border-color: var(--line); color: var(--bone-dim); background: transparent; margin-right: 8px; cursor: pointer; }
.btn-mini.ghost:hover { border-color: var(--brass); color: var(--bone); background: transparent; }
@media (max-width: 720px){ .topnav{ display:none; } }

/* ---------- hero / ring ---------- */
main { position: relative; z-index: 1; }
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 40px) 40px;
  text-align: center;
}
.kicker {
  font-family: var(--cond); text-transform: uppercase;
  letter-spacing: .34em; font-size: 12px; color: var(--bone-dim);
  margin: 0 0 18px;
}
.display {
  font-family: var(--cond); font-weight: 700;
  text-transform: uppercase; letter-spacing: .01em;
  line-height: .98; font-size: clamp(40px, 8vw, 84px);
  margin: 0 auto; max-width: 14ch;
}
.lede {
  max-width: 60ch; margin: 26px auto 0; color: #d6d0c8;
  font-size: clamp(17px, 2.1vw, 20px);
}
.lede em { color: var(--brass); }

.ring {
  max-width: 760px; margin: 40px auto 0; text-align: left;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
}
.ring-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--ink-3);
}
.ring-tag {
  font-family: var(--cond); font-weight: 700; letter-spacing: .22em;
  font-size: 13px; color: var(--brass);
}
.mode { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.chip {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em;
  font-size: 12px; padding: 6px 12px; cursor: pointer;
  background: transparent; color: var(--bone-dim);
  border: 1px solid var(--line); border-radius: 100px;
}
.chip.on { color: var(--ink); background: var(--bone); border-color: var(--bone); }
#topicInput {
  width: 100%; border: 0; resize: vertical; min-height: 92px;
  background: transparent; color: var(--bone);
  font-family: var(--serif); font-size: 19px; line-height: 1.5;
  padding: 20px 18px; outline: none;
}
#topicInput::placeholder { color: #6f6a73; }
.ring-foot {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; border-top: 1px solid var(--line);
}
.examples { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 220px; }
.ex {
  text-align: left; background: transparent; border: 0; cursor: pointer;
  color: var(--bone-dim); font-family: var(--serif); font-style: italic;
  font-size: 14px; padding: 2px 0;
}
.ex::before { content: "› "; color: var(--brass); font-style: normal; }
.ex:hover { color: var(--bone); }
.btn-go {
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; font-size: 15px; cursor: pointer;
  padding: 14px 22px; border: 0; border-radius: var(--rad);
  color: var(--ink); background: var(--brass); white-space: nowrap;
}
.btn-go:hover { filter: brightness(1.08); }
.btn-go:disabled { opacity: .55; cursor: progress; }
.ring-note { text-align: center; color: var(--aff); min-height: 1.4em; margin: 14px 0 0; font-size: 15px; }

/* ---------- arena / result ---------- */
.arena {
  max-width: var(--maxw); margin: 0 auto;
  padding: 20px clamp(18px, 5vw, 40px) 40px; text-align: center;
}
.node {
  width: 11px; height: 11px; margin: 0 auto 22px;
  transform: rotate(45deg); background: var(--ink);
  border: 1px solid var(--brass);
}
.bout-label, .band-tag, .verdict-tag {
  font-family: var(--cond); text-transform: uppercase;
  letter-spacing: .32em; font-size: 12px; color: var(--bone-dim); margin: 0;
}
.bout-topic {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(20px, 3vw, 28px); max-width: 30ch; margin: 12px auto 32px;
  color: var(--bone);
}

.tale {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 0;
  align-items: stretch; text-align: left;
}
.corner { padding: 26px clamp(18px, 3vw, 34px); background: var(--ink-2); }
.corner-a { border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; box-shadow: inset 3px 0 0 var(--aff); }
.corner-b { border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; box-shadow: inset -3px 0 0 var(--neg); }
.corner header { margin-bottom: 16px; }
.corner-tag {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em;
  font-size: 12px; font-weight: 600;
}
.corner-tag.aff { color: var(--aff); }
.corner-tag.neg { color: var(--neg); }
.corner h3 {
  font-family: var(--cond); font-weight: 600; text-transform: uppercase;
  letter-spacing: .02em; font-size: clamp(20px, 2.6vw, 26px); margin-top: 4px; line-height: 1.05;
}
.points { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.points li {
  position: relative; padding: 14px 0 14px 40px;
  border-top: 1px solid var(--line); counter-increment: p;
}
.points li:first-child { border-top: 0; }
.points li::before {
  content: counter(p, decimal-leading-zero);
  position: absolute; left: 0; top: 14px;
  font-family: var(--cond); font-size: 14px; color: var(--brass);
  letter-spacing: .05em;
}
.vs {
  display: flex; align-items: center; justify-content: center;
  width: 56px; background: var(--ink);
}
.vs span {
  font-family: var(--cond); font-weight: 700; font-size: 16px;
  color: var(--bone-dim); letter-spacing: .1em;
  border: 1px solid var(--line); border-radius: 100px;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--ink-3);
}
@media (max-width: 760px){
  .tale { grid-template-columns: 1fr; }
  .corner-a { border-right: 1px solid var(--line); border-radius: 8px 8px 0 0; }
  .corner-b { border-left: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; }
  .vs { width: auto; height: 40px; }
}

/* ---------- verdict ---------- */
.verdict {
  position: relative; margin: 28px auto 0; max-width: 800px;
  padding: 40px clamp(20px, 4vw, 44px) 32px;
  background: var(--ink-2); border: 1px solid var(--brass);
  border-radius: 8px; text-align: center;
}
.gavel {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 48px; height: 48px; background: var(--ink);
  border: 1px solid var(--brass); border-radius: 50%;
  display: grid; place-items: center;
}
.verdict-tag { color: var(--brass); margin-bottom: 12px; }
.verdict-text { font-size: clamp(18px, 2.3vw, 21px); margin: 0 auto; max-width: 56ch; }
.beam {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 24px auto 4px; max-width: 420px;
}
.beam-a, .beam-b { font-family: var(--cond); font-size: 12px; letter-spacing: .14em; }
.beam-a { color: var(--aff); }
.beam-b { color: var(--neg); }
.beam-track {
  position: relative; flex: 1; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--aff), var(--bone-dim) 50%, var(--neg));
}
.beam-dot {
  position: absolute; top: 50%; left: 50%; width: 16px; height: 16px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: var(--brass); border: 2px solid var(--ink);
  transition: left .5s cubic-bezier(.2,.8,.2,1);
}
.verdict-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  text-align: left; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px;
}
.verdict-grid h4 {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em;
  font-size: 13px; color: var(--bone-dim); margin-bottom: 10px;
}
.change { margin: 0; padding-left: 18px; }
.change li { margin-bottom: 8px; }
.blindspot { margin: 0; font-style: italic; color: #d6d0c8; }
@media (max-width: 640px){ .verdict-grid{ grid-template-columns: 1fr; gap: 20px; } }

/* ---------- spar ---------- */
.spar { margin: 28px auto 0; max-width: 800px; text-align: center; }
.spar-prompt { color: #d6d0c8; }
.spar-prompt strong { color: var(--bone); }
.spar-pick { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.pick {
  font-family: var(--serif); font-size: 16px; cursor: pointer;
  padding: 14px 22px; background: var(--ink-2); color: var(--bone);
  border: 1px solid var(--line); border-radius: var(--rad);
}
.pick strong { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.pick-a:hover { border-color: var(--aff); box-shadow: inset 3px 0 0 var(--aff); }
.pick-b:hover { border-color: var(--neg); box-shadow: inset -3px 0 0 var(--neg); }
.spar-ring { margin-top: 18px; text-align: left; }
.thread {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px; min-height: 120px; max-height: 420px; overflow-y: auto;
}
.bubble { max-width: 82%; padding: 12px 15px; border-radius: 10px; font-size: 16px; line-height: 1.5; }
.bubble.you { align-self: flex-end; background: var(--ink-3); border: 1px solid var(--line); }
.bubble.spar { align-self: flex-start; background: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--neg); }
.bubble.you.is-a { border-right: 3px solid var(--aff); }
.bubble.you.is-b { border-right: 3px solid var(--neg); }
.bubble.spar.opp-a { border-left-color: var(--aff); }
.bubble .who { display:block; font-family: var(--cond); text-transform: uppercase; letter-spacing:.12em; font-size: 10px; color: var(--bone-dim); margin-bottom: 4px; }
.bubble.typing { color: var(--bone-dim); font-style: italic; }
.spar-input { display: flex; gap: 10px; margin-top: 12px; }
.spar-input input {
  flex: 1; background: var(--ink-2); border: 1px solid var(--line); color: var(--bone);
  border-radius: var(--rad); padding: 13px 15px; font-family: var(--serif); font-size: 16px; outline: none;
}
.spar-input input:focus { border-color: var(--brass); }
.spar-input button {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
  padding: 0 20px; background: var(--brass); color: var(--ink); border: 0; border-radius: var(--rad); cursor: pointer;
}
.restart { margin-top: 12px; background: transparent; border: 0; color: var(--bone-dim); cursor: pointer; font-family: var(--cond); letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.restart:hover { color: var(--bone); }

/* ---------- marketing bands ---------- */
.band {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(56px, 9vw, 104px) clamp(18px, 5vw, 40px); text-align: center;
}
.band.tinted { background: rgba(255,255,255,.015); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: none; }
.band.tinted > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.band-title {
  font-family: var(--cond); font-weight: 600; text-transform: uppercase;
  letter-spacing: .01em; line-height: 1.02; font-size: clamp(28px, 5vw, 48px);
  margin: 12px auto 0; max-width: 20ch;
}
.band-title.manifesto { text-transform: none; font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: 0; max-width: 22ch; }

.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 44px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.step { background: var(--ink); padding: 32px 26px; text-align: left; }
.step-no { font-family: var(--cond); font-weight: 700; font-size: 30px; color: var(--brass); }
.step h3 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-size: 20px; margin: 8px 0 8px; }
.step p { color: #cfc9c1; margin: 0; font-size: 16px; }
@media (max-width: 760px){ .steps{ grid-template-columns: 1fr; } }

.why-body { max-width: 64ch; margin: 24px auto 0; font-size: clamp(17px, 2.1vw, 20px); color: #d6d0c8; }

.uses-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 44px; text-align: left; }
.use { background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.use h3 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-size: 18px; color: var(--brass); }
.use p { margin: 8px 0 0; color: #cfc9c1; font-size: 15px; }
@media (max-width: 860px){ .uses-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .uses-grid{ grid-template-columns: 1fr; } }

.tiers { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 44px; text-align: left; }
.tier { position: relative; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 30px 26px; display: flex; flex-direction: column; }
.tier.feature { border-color: var(--brass); }
.ribbon { position: absolute; top: -11px; left: 26px; background: var(--brass); color: var(--ink); font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; padding: 3px 10px; border-radius: 100px; }
.tier h3 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .06em; font-size: 22px; }
.price { font-family: var(--cond); font-weight: 700; font-size: 44px; margin: 8px 0 0; }
.price span { font-size: 18px; color: var(--bone-dim); }
.tier-sub { color: var(--bone-dim); margin: 2px 0 18px; font-size: 15px; }
.tier ul { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.tier li { padding: 8px 0 8px 22px; position: relative; border-top: 1px solid var(--line); font-size: 15px; }
.tier li::before { content: "+"; position: absolute; left: 0; color: var(--brass); font-family: var(--cond); }
.tier-btn { display: inline-block; cursor: pointer; text-align: center; font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-size: 14px; padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--rad); color: var(--bone); transition: background .15s ease, color .15s ease, filter .15s ease; }
.tier-btn.solid, .tier-btn:hover { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.tier-btn.solid:hover { filter: brightness(1.08); }
@media (max-width: 860px){ .tiers{ grid-template-columns: 1fr; } }

.studio-body { max-width: 60ch; margin: 24px auto 0; color: #d6d0c8; font-size: clamp(17px, 2vw, 19px); }
.signature { margin-top: 30px; }
.sig-name { font-family: var(--serif); font-style: italic; font-size: 26px; margin: 0; color: var(--bone); }
.sig-role { font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--bone-dim); margin: 4px 0 0; }

.faq { max-width: 720px; margin: 36px auto 0; text-align: left; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-size: 17px; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--brass); }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: #cfc9c1; margin: 12px 0 0; }

/* ---------- subscribe ---------- */
.subscribe { max-width: 680px; margin: 0 auto; padding: clamp(48px,8vw,90px) clamp(18px,5vw,40px); text-align: center; }
.sub-lede { color: var(--bone-dim); margin: 12px 0 24px; }
.sub-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.sub-form input { flex: 1; background: var(--ink-2); border: 1px solid var(--line); color: var(--bone); border-radius: var(--rad); padding: 14px 16px; font-family: var(--serif); font-size: 16px; outline: none; }
.sub-form input:focus { border-color: var(--brass); }
.sub-form button { font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; padding: 0 22px; background: var(--brass); color: var(--ink); border: 0; border-radius: var(--rad); cursor: pointer; }
.sub-msg { min-height: 1.4em; margin: 14px 0 0; color: var(--brass); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--ink-2); }
.foot-grid { max-width: var(--maxw); margin: 0 auto; padding: 52px clamp(18px,5vw,40px) 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.foot-brand p { color: var(--bone-dim); margin: 10px 0 0; max-width: 28ch; }
.footer h4 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--bone-dim); margin: 0 0 12px; }
.footer .foot-grid a { display: block; color: var(--bone); margin-bottom: 8px; font-size: 15px; }
.footer .foot-grid a:hover { color: var(--brass); }
.foot-base { max-width: var(--maxw); margin: 0 auto; padding: 18px clamp(18px,5vw,40px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--bone-dim); font-size: 13px; font-family: var(--cond); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 760px){ .foot-grid{ grid-template-columns: 1fr 1fr; } }

/* ---------- legal docs ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(56px,8vw,96px) clamp(18px,5vw,40px); }
.doc .back { font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--bone-dim); }
.doc .back:hover { color: var(--brass); }
.doc h1 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .02em; font-size: clamp(30px,6vw,52px); margin: 14px 0 4px; }
.doc .meta { font-family: var(--cond); letter-spacing: .1em; text-transform: uppercase; font-size: 12px; color: var(--bone-dim); margin: 0 0 28px; }
.doc h2 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em; font-size: 20px; margin: 32px 0 10px; color: var(--brass); }
.doc p, .doc li { color: #d6d0c8; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--neg); }

/* ---------- ring tools: deep mode + history ---------- */
.ring-tools { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 18px 0; }
.tool-toggle, .tool-link {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--bone-dim); font-family: var(--cond); text-transform: uppercase;
  letter-spacing: .1em; font-size: 12px; padding: 7px 13px;
}
.tool-toggle .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background .15s; }
.tool-toggle:hover, .tool-link:hover { color: var(--bone); border-color: var(--brass); }
.tool-toggle.on { color: var(--ink); background: var(--brass); border-color: var(--brass); }
.tool-toggle.on .dot { background: var(--ink); }
.pro-tag {
  font-family: var(--cond); font-size: 9.5px; letter-spacing: .14em;
  background: var(--brass); color: var(--ink); padding: 1px 6px; border-radius: 3px;
}
.tool-toggle.on .pro-tag { background: var(--ink); color: var(--brass); }
body.pro .pro-tag { display: none; }
.bout-actions { display: flex; justify-content: center; margin: 0 0 22px; }

/* ---------- modal (pro + history) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(8,7,11,.78);
  backdrop-filter: blur(3px); animation: mfade .18s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes mfade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: 100%; max-width: 460px; background: var(--ink-2);
  border: 1px solid var(--line); border-top: 3px solid var(--brass);
  border-radius: 6px; padding: 30px 28px 26px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
}
.modal-x {
  position: absolute; top: 12px; right: 14px; background: transparent; border: 0;
  color: var(--bone-dim); font-size: 24px; line-height: 1; cursor: pointer;
}
.modal-x:hover { color: var(--bone); }
.modal-tag { font-family: var(--cond); letter-spacing: .16em; text-transform: uppercase; font-size: 11px; color: var(--brass); margin: 0 0 8px; }
.modal h2 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .01em; font-size: clamp(24px,5vw,32px); line-height: 1.02; margin: 0 0 8px; }
.modal-sub { color: var(--bone-dim); font-size: 15px; margin: 0 0 18px; }
.modal form { display: flex; flex-direction: column; gap: 12px; }
.modal form[hidden] { display: none; }
.modal label { font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--bone-dim); display: flex; flex-direction: column; gap: 6px; }
.modal input, .modal textarea {
  background: var(--ink); border: 1px solid var(--line); color: var(--bone);
  border-radius: var(--rad); padding: 11px 13px; font-family: var(--serif);
  font-size: 15px; outline: none; resize: vertical;
}
.modal input:focus, .modal textarea:focus { border-color: var(--brass); }
.modal-go {
  margin-top: 4px; font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; font-size: 15px; cursor: pointer; padding: 14px 18px; border: 0;
  border-radius: var(--rad); color: var(--ink); background: var(--brass);
}
.modal-go:hover { filter: brightness(1.08); }
.modal-go:disabled { opacity: .55; cursor: progress; }
.modal-fine { font-size: 12.5px; color: var(--bone-dim); margin: 4px 0 0; }
.modal-msg { min-height: 1.3em; font-size: 14px; color: var(--brass); margin: 6px 0 0; }
.modal-tabs { display: flex; gap: 6px; margin: 14px 0 4px; border-bottom: 1px solid var(--line); }
.modal-tab {
  flex: 1; cursor: pointer; background: transparent; border: 0; padding: 9px 4px;
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-size: 12px;
  color: var(--bone-dim); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.modal-tab:hover { color: var(--bone); }
.modal-tab.on { color: var(--brass); border-bottom-color: var(--brass); }

/* ---------- history list ---------- */
.hist-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.hist-empty { color: var(--bone-dim); font-style: italic; }
.hist-item {
  text-align: left; cursor: pointer; background: var(--ink); border: 1px solid var(--line);
  border-left: 3px solid var(--brass); border-radius: var(--rad); padding: 11px 13px;
  color: var(--bone); font-family: var(--serif); font-size: 15px;
}
.hist-item:hover { border-color: var(--brass); }
.hist-item .when { display: block; font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; color: var(--bone-dim); margin-top: 4px; }
