/* ============================================================
   Feeling in Numbers · 감정을 세다
   Editorial data-essay meets Korean print culture.
   Paper, ink, taegeuk red & indigo. Letters as imagery.
   ============================================================ */

:root {
  --paper:      #faf6ee;
  --paper-deep: #f3ecdd;
  --ink:        #211d17;
  --ink-soft:   #5c5547;
  --line:       #d9d0bd;
  --pos:        #bf3b21;   /* vermillion — 긍정, love  */
  --pos-soft:   #f3d8cf;
  --neg:        #2b4a8b;   /* jjok indigo — 부정, hate */
  --neg-soft:   #d4dcec;
  --gold:       #c9971f;
  --gold-soft:  #f0e3c0;
  --mark:       #ffe9a8;

  --serif: "Fraunces", "Gowun Batang", serif;
  --sans:  "Instrument Sans", "Noto Sans KR", sans-serif;
  --mono:  "IBM Plex Mono", monospace;
  --kr-serif: "Gowun Batang", "Noto Sans KR", serif;

  --w: min(1060px, 92vw);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[lang="ko"] { font-family: "Noto Sans KR", sans-serif; font-style: normal; }

a { color: inherit; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--pos); }

::selection { background: var(--mark); }

/* paper grain */
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: var(--w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 0;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: .45rem;
  background: var(--pos); color: var(--paper);
  font-family: "Noto Sans KR", sans-serif; font-size: .8rem; font-weight: 700;
  transform: rotate(-4deg);
}
.brand:hover .brand-mark { transform: rotate(4deg); transition: transform .25s; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }

.topnav { display: flex; gap: 1.4rem; font-size: .85rem; }
.topnav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; }
.topnav a:hover { color: var(--pos); }
.nv-num { font-family: var(--mono); color: var(--pos); font-weight: 500; margin-right: .15rem; }
.nv-about { border: 1.5px solid var(--ink); border-radius: 99px; padding: .15rem .7rem; color: var(--ink) !important; }
.nv-about:hover { background: var(--ink); color: var(--paper) !important; }

/* ---------------------------------------------------------- hero */
.hero {
  position: relative;
  width: var(--w); margin: 0 auto;
  padding: clamp(4rem, 9vh, 7rem) 0 4.5rem;
  overflow: visible;
}
.hero-jamo { position: absolute; inset: 0; pointer-events: none; }
.hero-jamo span {
  position: absolute; left: var(--x); top: var(--y);
  font-family: "Noto Sans KR", sans-serif; font-weight: 700; font-size: var(--s);
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--ink) 14%, transparent);
  transform: rotate(var(--r));
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-jamo span:nth-child(2n) { animation-duration: 18s; }
@keyframes drift { to { transform: rotate(var(--r)) translateY(-14px); } }

.kicker {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 1.2rem;
}
.kicker::before { content: "✶ "; color: var(--pos); }

.hero-title { margin: 0; line-height: .92; position: relative; }
.hero-title .line {
  display: block;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 60, "opsz" 144;
  font-weight: 460;
  font-size: clamp(3.2rem, 9.5vw, 7.2rem);
  letter-spacing: -.03em;
}
.hero-title .line-num {
  font-weight: 800; font-style: italic; color: var(--pos);
  margin-left: clamp(1rem, 8vw, 6rem);
}
.hero-kr {
  display: inline-block; margin-top: 1.1rem;
  font-family: var(--kr-serif); font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--paper); background: var(--ink);
  padding: .25rem .8rem; transform: rotate(-1.5deg);
}

.standfirst {
  max-width: 34em; margin: 2.2rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.55;
}
.standfirst em { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--pos); }

.stamps { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.stamp {
  border: 1.5px solid var(--ink); border-radius: .6rem;
  padding: .7rem 1.1rem .6rem; min-width: 10rem;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-.6deg);
}
.stamp:nth-child(2) { transform: rotate(.8deg); }
.stamp:nth-child(3) { transform: rotate(-.3deg); }
.stamp b { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.stamp span { font-family: var(--mono); font-size: .72rem; color: var(--ink-soft); }

.scroll-cue {
  display: inline-block; margin-top: 3rem;
  font-family: var(--mono); font-size: .85rem; text-decoration: none;
  border-bottom: 2px solid var(--gold);
}
.scroll-cue span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* load reveal — no base opacity:0, so content stays visible even when the
   animation never runs (fill-mode "both" supplies the hidden from-state) */
.reveal { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.reveal:nth-of-type(1), .hero .reveal:nth-child(1) { animation-delay: .05s; }
.hero-title .line.reveal { animation-delay: .15s; }
.hero-title .line-num.reveal { animation-delay: .28s; }
.hero-kr.reveal { animation-delay: .42s; }
.standfirst.reveal { animation-delay: .55s; }
.stamps.reveal { animation-delay: .7s; }
.scroll-cue.reveal { animation-delay: .85s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- experiments */
.exp { width: var(--w); margin: 0 auto; padding: 4.5rem 0 1rem; }

.exp-head { display: flex; align-items: flex-start; gap: 1.4rem; margin-bottom: 1.6rem; }
.exp-no {
  font-family: var(--serif); font-weight: 900; font-style: italic;
  font-size: clamp(3.4rem, 7vw, 5.5rem); line-height: .9;
  color: transparent; -webkit-text-stroke: 2px var(--pos);
  flex: 0 0 auto; transform: translateY(-6px);
}
.exp-head h2 {
  margin: 0; font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.02em;
}
.exp-q { margin: .4rem 0 0; color: var(--ink-soft); font-size: 1.05rem; max-width: 38em; }

.panel {
  border: 1.5px solid var(--ink); border-radius: 1rem;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--paper-deep), 6px 6px 0 1.5px var(--ink);
  padding: clamp(1.1rem, 3vw, 2rem);
}

/* controls */
.controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.4rem; }
.ctl {
  font: 600 .88rem var(--sans); cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 99px;
  background: var(--paper); color: var(--ink);
  padding: .42rem 1rem; transition: transform .12s ease, background .15s, color .15s;
}
.ctl:hover { transform: translateY(-2px); }
.ctl:active { transform: translateY(0); }
.ctl.is-on { background: var(--ink); color: var(--paper); }
.ctl-pos.is-on { background: var(--pos); border-color: var(--pos); }
.ctl-neg.is-on { background: var(--neg); border-color: var(--neg); }
.ctl [lang="ko"] { font-size: .8em; opacity: .8; }

/* bar chart */
.bars { list-style: none; margin: 0; padding: 0; }
.bars li {
  display: grid;
  grid-template-columns: 2ch minmax(7.5rem, 12rem) 1fr 5.5ch;
  align-items: center; gap: .8rem;
  padding: .3rem .4rem; border-radius: .5rem;
  cursor: pointer;
}
.bars li:hover { background: var(--paper-deep); }
.b-rank { font-family: var(--mono); font-size: .75rem; color: var(--ink-soft); text-align: right; }
.b-word { display: flex; flex-direction: column; line-height: 1.25; }
.b-word b { font-family: "Noto Sans KR", sans-serif; font-weight: 700; font-size: 1.02rem; }
.b-word i { font-style: normal; font-size: .72rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-track { position: relative; height: 1.15rem; background: var(--paper-deep); border-radius: .3rem; overflow: hidden; }
.b-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: .3rem;
  background: linear-gradient(90deg, var(--neg) calc(100% - var(--posshare)), var(--pos) 0);
  transition: width .8s cubic-bezier(.2,.7,.2,1);
}
.bars li.split-off .b-fill { background: var(--ink); }
.mode-pos .b-fill { background: var(--pos); }
.mode-neg .b-fill { background: var(--neg); }
.b-count { font-family: var(--mono); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }

.panel-foot { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.2rem; }
.more {
  font: 600 .85rem var(--mono); cursor: pointer;
  background: none; border: none; border-bottom: 2px solid var(--gold);
  padding: 0 0 .1rem; color: var(--ink);
}
.more:hover { color: var(--pos); }
.hint { margin: 0; font-size: .85rem; color: var(--ink-soft); }

/* legend chip inside chart rows */
.legend { display: flex; gap: 1.2rem; margin: 0 0 .8rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-soft); }
.legend i { display: inline-block; width: .8em; height: .8em; border-radius: .2em; margin-right: .35em; vertical-align: -.05em; }
.legend .lg-pos i { background: var(--pos); }
.legend .lg-neg i { background: var(--neg); }

/* ---------------------------------------------------------- diverging chart */
.axis-labels {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .75rem; margin-bottom: 1rem;
}
.ax-neg { color: var(--neg); } .ax-pos { color: var(--pos); text-align: right; }

.diverge { display: flex; flex-direction: column; gap: .22rem; }
.dv-row {
  display: grid; grid-template-columns: 1fr 11rem 1fr;
  align-items: center; gap: .6rem;
  border-radius: .4rem; padding: .12rem .2rem;
  cursor: pointer;
}
.dv-row:hover { background: var(--paper-deep); }
.dv-side { position: relative; height: .95rem; }
.dv-bar {
  position: absolute; top: 0; bottom: 0; width: 0;
  transition: width .8s cubic-bezier(.2,.7,.2,1);
}
.dv-left  .dv-bar { right: 0; background: var(--neg); border-radius: .3rem 0 0 .3rem; }
.dv-right .dv-bar { left: 0;  background: var(--pos); border-radius: 0 .3rem .3rem 0; }
.dv-label { text-align: center; line-height: 1.15; }
.dv-label b { font-family: "Noto Sans KR", sans-serif; font-size: .95rem; font-weight: 700; }
.dv-label i { display: block; font-style: normal; font-size: .68rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-row.is-flagged .dv-label b { box-shadow: 0 -2px 0 0 var(--gold) inset; }

/* ---------------------------------------------------------- field notes */
.fieldnote {
  width: min(40rem, 100%);
  margin: 1.8rem 0 0 auto;
  border-left: 4px solid var(--neg);
  background: var(--paper-deep);
  border-radius: 0 .8rem .8rem 0;
  padding: 1rem 1.3rem;
  font-size: .95rem;
  transform: rotate(-.4deg);
}
.fieldnote-gold { border-left-color: var(--gold); transform: rotate(.4deg); }
.fieldnote p { margin: .2rem 0 0; }
.fn-label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.pos-ink { color: var(--pos); } .neg-ink { color: var(--neg); }

/* ---------------------------------------------------------- probe */
.probe-bar { display: flex; gap: .7rem; margin-bottom: 1.2rem; }
#probe-input {
  flex: 1; min-width: 0;
  font: 500 1.25rem "Noto Sans KR", sans-serif;
  background: var(--paper-deep);
  border: 1.5px solid var(--ink); border-radius: .7rem;
  padding: .65rem 1rem; color: var(--ink);
}
#probe-input:focus { outline: 3px solid var(--gold-soft); border-color: var(--gold); }
.probe-go {
  font: 700 1rem var(--sans); cursor: pointer;
  background: var(--pos); color: var(--paper);
  border: 1.5px solid var(--ink); border-radius: .7rem;
  padding: 0 1.4rem;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.probe-go:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.probe-go:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--ink); }

.chip-groups { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.6rem; }
.chip-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem; }
.chip-cat {
  flex: 0 0 7.2rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft);
}
.chip {
  font-family: "Noto Sans KR", sans-serif; font-weight: 500; font-size: .95rem;
  cursor: pointer;
  border: 1.5px dashed var(--ink-soft); border-radius: .55rem;
  background: var(--paper); color: var(--ink);
  padding: .22rem .7rem;
  transition: transform .12s, background .15s, border-color .15s;
}
.chip:hover { transform: translateY(-2px) rotate(-1deg); border-style: solid; border-color: var(--pos); color: var(--pos); }
.chip.is-on { background: var(--ink); border-style: solid; border-color: var(--ink); color: var(--paper); }

/* results */
.probe-results { border-top: 1.5px dashed var(--line); padding-top: 1.4rem; }
.probe-results.is-empty { text-align: center; color: var(--ink-soft); }
.probe-empty { font-family: var(--serif); font-style: italic; font-size: 1.1rem; }

.res-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .8rem 1.6rem; margin-bottom: 1rem; }
.res-term { font-family: "Noto Sans KR", sans-serif; font-weight: 700; font-size: 2rem; }
.res-gloss { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 1.05rem; }
.res-count { font-family: var(--mono); font-size: .95rem; margin-left: auto; }
.res-count b { font-size: 1.35rem; color: var(--pos); }

.meter { position: relative; height: 2.1rem; border: 1.5px solid var(--ink); border-radius: .6rem; overflow: hidden; display: flex; }
.meter-neg, .meter-pos {
  display: flex; align-items: center; overflow: hidden;
  font: 700 .85rem var(--mono); color: var(--paper);
  white-space: nowrap;
  transition: width .8s cubic-bezier(.2,.7,.2,1);
}
.meter-neg { background: var(--neg); justify-content: flex-start; padding-left: .7rem; }
.meter-pos { background: var(--pos); justify-content: flex-end; padding-right: .7rem; }
.meter-caption { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .72rem; color: var(--ink-soft); margin: .4rem 0 0; }

.copair { margin: 1.3rem 0 0; }
.copair h4, .ex-head { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .6rem; }
.co-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; list-style: none; }
.co-list button {
  font-family: "Noto Sans KR", sans-serif; font-size: .88rem; cursor: pointer;
  border: 1px solid var(--line); border-radius: .5rem; background: var(--paper-deep);
  padding: .18rem .6rem;
}
.co-list button:hover { border-color: var(--pos); color: var(--pos); }
.co-list i { font-style: normal; font-size: .75em; color: var(--ink-soft); }

.examples { margin-top: 1.6rem; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .9rem; }
.ex-card {
  position: relative;
  border: 1px solid var(--line); border-radius: .7rem;
  background: var(--paper-deep);
  padding: .9rem 1rem 2.2rem;
  font-family: var(--kr-serif); font-size: 1rem; line-height: 1.65;
  animation: rise .45s cubic-bezier(.2,.7,.2,1) both;
}
.ex-card:nth-child(2n) { transform: rotate(.4deg); }
.ex-card:nth-child(3n) { transform: rotate(-.4deg); }
.ex-card mark { background: var(--mark); padding: 0 .1em; border-radius: .2em; box-shadow: 0 2px 0 var(--gold); }
.ex-tag {
  position: absolute; bottom: .65rem; right: .8rem;
  font: 700 .68rem var(--mono); letter-spacing: .08em;
  color: var(--paper); border-radius: .35rem; padding: .1rem .5rem;
  transform: rotate(-2deg);
}
.ex-tag.pos { background: var(--pos); } .ex-tag.neg { background: var(--neg); }
.ex-foot { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.shuffle {
  font: 600 .85rem var(--mono); cursor: pointer;
  background: none; border: 1.5px solid var(--ink); border-radius: 99px;
  padding: .3rem .9rem; color: var(--ink);
}
.shuffle:hover { background: var(--ink); color: var(--paper); }
.res-zero { font-family: var(--serif); font-style: italic; font-size: 1.05rem; }

/* ---------------------------------------------------------- method + foot */
.method { width: var(--w); margin: 4.5rem auto 0; padding-bottom: 2rem; }
.method h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.6rem, 3.5vw, 2.3rem); letter-spacing: -.02em; }
.m-kr { color: var(--paper); background: var(--neg); font-family: var(--kr-serif); font-size: .65em; padding: .1em .45em; vertical-align: .25em; display: inline-block; transform: rotate(-2deg); margin-right: .4rem; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.m-card { border: 1px solid var(--line); border-radius: .8rem; padding: 1.1rem 1.2rem; background: var(--paper); font-size: .92rem; }
.m-card h3 { margin: 0 0 .4rem; font-family: var(--serif); font-size: 1.05rem; }
.m-card p { margin: 0; color: var(--ink-soft); }
.m-card-cta { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.m-card-cta p { color: color-mix(in srgb, var(--paper) 82%, transparent); }
.m-card-cta a { color: var(--paper); text-decoration-color: var(--gold); }
.m-card-cta a:hover { color: var(--gold); }

.foot { border-top: 1.5px solid var(--ink); margin-top: 3rem; padding: 1.6rem 0 2.4rem; }
.foot p { width: var(--w); margin: .2rem auto; font-size: .85rem; color: var(--ink-soft); }
.foot b, .foot i { color: var(--ink); }
.foot-credit { font-family: var(--mono); font-size: .75rem; }

/* ---------------------------------------------------------- in-view + motion prefs */
.watch .b-fill, .watch .dv-bar { width: 0 !important; }
.in .b-fill, .in .dv-bar { width: var(--wd) !important; }

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

/* ---------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .topnav { display: none; }
  .bars li { grid-template-columns: 2ch minmax(6rem, 8rem) 1fr 4.5ch; gap: .5rem; }
  .dv-row { grid-template-columns: 1fr 7.5rem 1fr; }
  .dv-label i { display: none; }
  .exp-head { gap: .9rem; }
  .probe-bar { flex-direction: column; }
  .probe-go { padding: .6rem 1.4rem; }
  .chip-cat { flex-basis: 100%; }
}

/* ---------------------------------------------------------- type filters */
.controls-sub { margin: -.6rem 0 1.4rem; align-items: center; }
.sub-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-right: .2rem; }
.ctl-mini { font-size: .78rem; padding: .28rem .8rem; border-width: 1px; }
.ctl-expr [lang="ko"] { font-size: .85em; opacity: .75; }
.ctl-expr.is-on { background: var(--gold); border-color: var(--ink); color: var(--ink); }

/* ---------------------------------------------------------- chips: two-line */
.chip { display: inline-flex; flex-direction: column; align-items: center; gap: .05rem; line-height: 1.2; }
.chip b { font-family: "Noto Sans KR", sans-serif; font-weight: 500; }
.chip i { font-style: normal; font-family: var(--mono); font-size: .6rem; opacity: .65; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.is-on i { opacity: .8; }

/* ---------------------------------------------------------- translated examples */
.ex-card { font-size: .98rem; }
.ex-card .ex-en {
  display: block; margin-top: .55rem; padding-top: .5rem;
  border-top: 1px dashed var(--line);
  font-family: var(--sans); font-size: .84rem; line-height: 1.5;
  color: var(--ink-soft);
}
.ex-card .ex-en mark { background: none; box-shadow: 0 2px 0 var(--gold); }

/* ---------------------------------------------------------- experiment 04: face-off */
.h-kr { color: var(--paper); background: var(--pos); font-family: var(--kr-serif); font-size: .55em; padding: .12em .5em; vertical-align: .35em; display: inline-block; transform: rotate(2deg); margin-left: .35rem; }
.duel-form { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.duel-form input {
  flex: 1; min-width: 8rem;
  font: 500 1.25rem "Noto Sans KR", sans-serif; text-align: center;
  background: var(--paper-deep); border: 1.5px solid var(--ink); border-radius: .7rem;
  padding: .55rem .8rem; color: var(--ink);
}
.duel-form input:focus { outline: 3px solid var(--gold-soft); border-color: var(--gold); }
.duel-vs-input { font-family: var(--serif); font-style: italic; font-weight: 800; color: var(--pos); }
.duel-arena { border-top: 1.5px dashed var(--line); padding-top: 1.4rem; text-align: center; }
.duel-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 1rem; }
.duel-card {
  border: 1.5px solid var(--ink); border-radius: .9rem; background: var(--paper-deep);
  padding: 1.1rem 1rem 1rem; text-align: center;
}
.duel-term { font-family: "Noto Sans KR", sans-serif; font-weight: 700; font-size: 1.9rem; display: block; }
.duel-gloss { display: block; font-family: var(--serif); font-style: italic; font-size: .9rem; color: var(--ink-soft); margin-top: .15rem; }
.duel-meter { position: relative; height: 1rem; margin: .9rem 0 .5rem; background: var(--neg-soft); border-radius: .4rem; overflow: hidden; }
.duel-meter span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--pos); border-radius: .4rem 0 0 .4rem; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.duel-stats { margin: 0; font-family: var(--mono); font-size: .78rem; color: var(--ink-soft); }
.duel-stats b { font-size: 1.15rem; color: var(--pos); }
.duel-vs {
  align-self: center;
  font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 1.6rem;
  color: transparent; -webkit-text-stroke: 1.5px var(--pos);
  transform: rotate(-8deg);
}
.duel-verdict { font-family: var(--serif); font-style: italic; font-size: 1.15rem; margin: 1.2rem auto .3rem; max-width: 34em; }
.duel-arena .hint { margin: .2rem 0 0; }

@media (max-width: 720px) {
  .duel-grid { grid-template-columns: 1fr; }
  .duel-vs { transform: rotate(-8deg); margin: -0.4rem 0; }
  .duel-form input { min-width: 6rem; }
  .chip i { max-width: 6.5rem; }
}

/* ---------------------------------------------------------- hero corpus card */
.corpus-card {
  max-width: 46em; margin-top: 2.2rem;
  border: 1.5px dashed var(--ink); border-radius: .9rem;
  background: color-mix(in srgb, var(--paper-deep) 55%, var(--paper));
  padding: .9rem 1.25rem 1rem;
}
.corpus-card.reveal { animation-delay: .8s; }
.hero .scroll-cue.reveal { animation-delay: .95s; }
.cc-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.cc-label::before { content: "✶ "; color: var(--pos); }
.corpus-card p { margin: .35rem 0 0; font-size: .95rem; line-height: 1.6; }
.corpus-card em { font-family: var(--serif); font-style: italic; }

/* ---------------------------------------------------------- duel slots + roster + bets */
.duel-slot { flex: 1; min-width: 8rem; display: flex; flex-direction: column; gap: .3rem; }
.duel-slot input { width: 100%; min-width: 0; }
.slot-gloss {
  font-family: var(--mono); font-size: .68rem; color: var(--ink-soft);
  text-align: center; min-height: 1em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.roster-label {
  margin: 0 0 .55rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft);
}
.roster { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.3rem; }

.bet-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin-bottom: 1.3rem; padding: .65rem 1rem;
  border: 1.5px dashed var(--gold); border-radius: .8rem;
  background: var(--gold-soft);
}
.bet-label { font-family: var(--mono); font-size: .75rem; color: var(--ink); }
.bet {
  font: 600 .9rem var(--sans); cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 99px;
  background: var(--paper); color: var(--ink);
  padding: .35rem 1rem;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.bet:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.bet:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }
.bet b { font-family: "Noto Sans KR", sans-serif; }
.duel-bet-line {
  font-family: var(--mono); font-size: .85rem; color: var(--ink);
  background: var(--mark); display: inline-block;
  padding: .15rem .7rem; border-radius: .4rem; margin: .1rem 0 .4rem;
  transform: rotate(-.5deg);
}
@media (max-width: 720px) {
  .duel-slot { min-width: 100%; }
  .duel-vs-input { display: none; }
}
