/* =========================================================
   墨境 INK REALM · 视觉系统
   ========================================================= */
:root {
  --paper: #ece4d3;
  --paper-2: #e5dcc8;
  --paper-3: #dcd1ba;
  --paper-hi: #f6f1e4;
  --ink: #1c1c18;
  --ink-2: #2e2e28;
  --ink-70: rgba(28, 28, 24, 0.78);
  --ink-55: rgba(28, 28, 24, 0.66);
  --ink-40: rgba(28, 28, 24, 0.54);
  --ink-25: rgba(28, 28, 24, 0.32);
  --line: rgba(28, 28, 24, 0.14);
  --line-strong: rgba(28, 28, 24, 0.28);
  --red: #a83224;
  --red-deep: #872419;
  --red-soft: rgba(168, 50, 36, 0.12);
  --gold: #8f7444;
  --gold-soft: rgba(143, 116, 68, 0.14);
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", "宋体", serif;
  --kai: "STKaiti", "KaiTi", "Kaiti SC", "楷体", "Noto Serif SC", serif;
  --latin: "Baskerville", "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --shadow: 0 32px 70px -58px rgba(28, 28, 24, 0.75);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 760px at 78% -12%, rgba(255, 252, 243, 0.85), transparent 62%),
    radial-gradient(900px 640px at -8% 34%, rgba(180, 158, 118, 0.12), transparent 62%),
    linear-gradient(180deg, #eee6d6 0%, var(--paper) 38%, #e9e1cf 100%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(92deg, rgba(120, 100, 70, 0.02) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(2deg, rgba(120, 100, 70, 0.015) 0 1px, transparent 1px 9px);
}
::selection { background: rgba(168, 50, 36, 0.22); color: var(--ink); }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.34;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.5'/></svg>");
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- shared bits ---------- */
.eyebrow {
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--ink-55);
  display: flex;
  align-items: center;
  gap: 10px;
}
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--red);
  color: var(--paper-hi);
  font-family: var(--kai);
  font-size: 18px;
  line-height: 1;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  flex: none;
}
.seal.mini { width: 22px; height: 22px; font-size: 12px; }
.seal.inline { vertical-align: -5px; margin-right: 2px; }
.seal.gold { background: var(--gold); }
.seal.ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-seal {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--red); color: var(--paper-hi);
  font-family: var(--kai); font-size: 22px; line-height: 1;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 6px 18px -14px rgba(0, 0, 0, 0.7);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--kai); font-size: 21px; font-weight: 600; letter-spacing: 0.16em; }
.brand-text small { font-family: var(--latin); font-size: 8.5px; letter-spacing: 0.32em; color: var(--ink-55); }

.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: clamp(18px, 3vw, 42px);
  height: 74px; padding: 0 clamp(18px, 4vw, 58px);
  background: rgba(236, 228, 211, 0.8);
  -webkit-backdrop-filter: blur(16px) saturate(0.92);
  backdrop-filter: blur(16px) saturate(0.92);
  border-bottom: 1px solid var(--line);
}
.topnav { display: flex; gap: 30px; margin-left: 8px; }
.topnav a {
  position: relative; text-decoration: none;
  font-family: var(--kai); font-size: 15px; letter-spacing: 0.22em; color: var(--ink-70);
  padding: 6px 0; transition: color 0.3s;
}
.topnav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--ink); transition: width 0.4s var(--ease);
}
.topnav a:hover { color: var(--ink); }
.topnav a:hover::after { width: 100%; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sound-toggle {
  width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--kai); font-size: 14px; color: var(--ink-70);
  transition: all 0.3s;
}
.sound-toggle:hover { border-color: var(--ink); color: var(--ink); }
.sound-toggle .snd-off { display: none; }
.sound-toggle[aria-pressed="false"] .snd-on { display: none; }
.sound-toggle[aria-pressed="false"] .snd-off { display: block; color: var(--ink-40); }

.btn {
  --btn-bg: transparent; --btn-fg: var(--ink); --btn-line: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.78em 1.6em; border: 1px solid var(--btn-line);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--kai); font-size: 16px; letter-spacing: 0.2em;
  text-decoration: none; cursor: pointer; overflow: hidden;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none; opacity: 0; transition: opacity 0.4s;
}
.btn:hover { transform: translateY(-1px); }
.btn:hover::after { opacity: 1; }
.btn-ink { background: var(--ink); color: var(--paper-hi); border-color: var(--ink); }
.btn-ink:hover { background: #000; border-color: #000; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink-70); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: rgba(255, 255, 255, 0.18); }
.btn-seal { background: var(--red); border-color: var(--red); color: var(--paper-hi); }
.btn-seal:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn.small { padding: 0.52em 1.15em; font-size: 14px; letter-spacing: 0.16em; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn .em { font-family: var(--latin); font-style: normal; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 94vh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; border-bottom: 1px solid var(--line);
  padding-top: 20px;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(236, 228, 211, 0.94) 0%, rgba(236, 228, 211, 0.68) 34%, rgba(236, 228, 211, 0.05) 68%, rgba(236, 228, 211, 0.2) 100%),
    linear-gradient(0deg, rgba(236, 228, 211, 0.92) 0%, rgba(236, 228, 211, 0) 32%),
    linear-gradient(180deg, rgba(236, 228, 211, 0.55) 0%, transparent 22%);
}
.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: 1500px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.65fr);
  align-items: center; gap: 40px;
  padding: 46px clamp(20px, 5vw, 78px) 64px;
}
.hero-copy { max-width: 700px; }
.hero-copy > * { animation: rise 1.1s var(--ease) both; }
.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero-title {
  font-family: var(--kai); font-weight: 500;
  font-size: clamp(88px, 15vw, 208px);
  line-height: 0.86; letter-spacing: 0.04em;
  margin: 0.12em 0 0.06em;
  display: flex; align-items: flex-start; gap: 0.02em;
  color: var(--ink);
}
.hero-title > span { display: block; position: relative; }
.hero-title > span:nth-child(2) { margin-top: 0.19em; }
.hero-stamp {
  position: relative; top: 0.16em; margin-left: 0.14em;
  width: clamp(44px, 5vw, 64px); height: clamp(44px, 5vw, 64px);
  display: grid; place-items: center;
  background: var(--red); color: var(--paper-hi);
  font-family: var(--kai); font-style: normal;
  font-size: clamp(24px, 3vw, 34px); line-height: 1;
  transform: rotate(-7deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  opacity: 0.95;
}
.hero-sub {
  font-family: var(--kai); font-size: clamp(22px, 2.7vw, 34px);
  letter-spacing: 0.3em; color: var(--ink-2); margin: 0.1em 0 0.5em;
}
.hero-lead { max-width: 34em; color: var(--ink-70); font-size: 16.5px; line-height: 1.95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-side {
  justify-self: end; align-self: stretch;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  padding: 12px 0 8px; gap: 24px;
  animation: rise 1.4s var(--ease) 0.3s both;
}
.vertical {
  writing-mode: vertical-rl; font-family: var(--kai);
  font-size: 14px; letter-spacing: 0.42em; color: var(--ink-55);
  border-left: 1px solid var(--line-strong); padding-left: 12px;
}
.hero-marks { width: min(230px, 100%); display: grid; gap: 0; }
.hero-marks li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 13px 0; border-top: 1px solid var(--line);
}
.hero-marks li:last-child { border-bottom: 1px solid var(--line); }
.hero-marks b { font-family: var(--latin); font-size: 30px; font-weight: 400; letter-spacing: 0.02em; }
.hero-marks span { font-family: var(--kai); font-size: 13px; letter-spacing: 0.2em; color: var(--ink-55); }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 16px;
  padding: 16px clamp(20px, 5vw, 78px);
  border-top: 1px solid var(--line);
  background: linear-gradient(0deg, rgba(236, 228, 211, 0.72), rgba(236, 228, 211, 0));
  font-family: var(--latin); font-size: 10px; letter-spacing: 0.26em; color: var(--ink-55);
}
.hero-foot i { width: 1px; height: 12px; background: var(--line-strong); }
.hero-foot-right { margin-left: auto; }

/* ---------- sections ---------- */
.section { max-width: 1360px; margin: 0 auto; padding: clamp(64px, 9vw, 118px) clamp(20px, 5vw, 64px); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding-bottom: 20px; margin-bottom: 38px; border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--kai); font-weight: 500; font-size: clamp(36px, 4.4vw, 60px);
  letter-spacing: 0.1em; line-height: 1.15; margin-top: 10px;
}
.section-note { max-width: 24em; color: var(--ink-55); font-size: 14px; line-height: 1.9; text-align: right; }

/* ---------- plays ---------- */
.play-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 206px; gap: 16px;
}
.play-card {
  position: relative; overflow: hidden; display: block;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink); text-decoration: none;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.6s;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.play-card::after {
  content: ""; position: absolute; inset: 5px; border: 1px solid rgba(28, 28, 24, 0.12);
  pointer-events: none; z-index: 5;
}
.play-card:hover { transform: translateY(-5px); box-shadow: 0 42px 80px -52px rgba(28, 28, 24, 0.8); border-color: rgba(28, 28, 24, 0.42); }
.play-art { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.4s var(--ease); }
.play-card:hover .play-art { transform: scale(1.035); }
.play-veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(236, 228, 211, 0.02) 0%, rgba(236, 228, 211, 0.18) 44%, rgba(236, 228, 211, 0.93) 88%);
}
.play-veil.strong {
  background:
    linear-gradient(180deg, rgba(236, 228, 211, 0.5) 0%, rgba(236, 228, 211, 0.62) 46%, rgba(236, 228, 211, 0.94) 90%);
}
.play-live { grid-column: span 6; grid-row: span 2; }
.play-soon { grid-column: span 3; }
.play-more {
  display: flex; align-items: center; gap: 18px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
  font-family: var(--kai); font-size: 11px; letter-spacing: 0.24em; color: var(--ink-40);
}
.play-more-line { flex: 1; height: 1px; background: var(--line); }
.play-top {
  position: absolute; z-index: 3; top: 16px; left: 18px; right: 18px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--kai); font-size: 11px; letter-spacing: 0.22em; color: var(--ink-70);
}
.play-live .play-top { top: 22px; left: 26px; right: 26px; font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(168, 50, 36, 0.5); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(168, 50, 36, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(168, 50, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(168, 50, 36, 0); }
}
.play-no { margin-left: auto; font-family: var(--kai); font-size: 14px; color: var(--ink-55); border: 1px solid var(--line-strong); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.play-body { position: absolute; z-index: 3; left: 26px; right: 26px; bottom: 24px; }
.play-live .play-body { left: 34px; right: 34px; bottom: 30px; max-width: 620px; }
.play-kicker { font-family: var(--latin); font-size: 10px; letter-spacing: 0.3em; color: var(--red); margin-bottom: 6px; }
.play-body h3 { font-family: var(--kai); font-weight: 500; font-size: 30px; letter-spacing: 0.12em; line-height: 1.2; }
.play-live .play-body h3 { font-size: clamp(32px, 4vw, 52px); letter-spacing: 0.1em; }
.play-body p { color: var(--ink-70); font-size: 13.5px; margin-top: 6px; max-width: 30em; }
.play-live .play-body p { font-size: 15px; }
.play-desc { line-height: 1.9; }
.play-cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 16px;
  font-family: var(--kai); font-size: 14px; letter-spacing: 0.24em; color: var(--ink);
  border-bottom: 1px solid var(--ink); padding-bottom: 4px;
}
.play-cta em { font-family: var(--latin); font-style: normal; transition: transform 0.4s var(--ease); }
.play-card:hover .play-cta em { transform: translateX(5px); }
.play-soon { cursor: pointer; }
.play-soon .play-art { filter: saturate(0.35) contrast(0.96); opacity: 0.82; }
.play-soon .play-body h3 { font-size: 22px; color: var(--ink-70); }
.play-soon .play-body p { font-size: 11.5px; letter-spacing: 0.12em; color: var(--ink-40); }
.soon-seal {
  position: absolute; z-index: 4; top: 44px; right: 20px;
  writing-mode: vertical-rl;
  padding: 9px 6px; border: 1px solid rgba(168, 50, 36, 0.55); color: var(--red);
  font-family: var(--kai); font-size: 11px; letter-spacing: 0.32em;
  opacity: 0.78; transform: rotate(3deg);
}
.play-soon:hover .soon-seal { opacity: 1; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { position: relative; padding: 30px 30px 10px 0; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; padding-right: 0; }
.step + .step { padding-left: 30px; }
.step b {
  display: block; font-family: var(--kai); font-weight: 400;
  font-size: 58px; line-height: 1; color: rgba(28, 28, 24, 0.12);
  margin-bottom: 12px;
}
.step h3 { font-family: var(--kai); font-weight: 500; font-size: 24px; letter-spacing: 0.16em; margin-bottom: 8px; }
.step p { color: var(--ink-70); font-size: 14px; line-height: 1.95; max-width: 26em; }

.arena-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); border: 1px solid var(--line); margin-top: 46px; }
.arena-rule { background: linear-gradient(180deg, rgba(246, 241, 228, 0.55), rgba(236, 228, 211, 0.2)); padding: clamp(24px, 3vw, 38px); }
.ar-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.ar-head h3 { font-family: var(--kai); font-weight: 500; font-size: 27px; letter-spacing: 0.14em; }
.ar-sub { font-size: 12px; color: var(--ink-55); letter-spacing: 0.14em; }
.ar-tag { margin-left: auto; font-family: var(--latin); font-size: 10px; letter-spacing: 0.22em; color: var(--ink-55); border: 1px solid var(--line); padding: 4px 7px; }
.ratio-bar { height: 12px; display: flex; background: var(--paper-3); border: 1px solid var(--line); overflow: hidden; }
.ratio-bar i { display: block; height: 100%; transform-origin: left center; animation: growX 1.5s var(--ease) both; }
.ratio-bar i:nth-child(2) { animation-delay: 0.18s; }
.ratio-bar i:nth-child(3) { animation-delay: 0.3s; }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.survivor { background: var(--ink); }
.burn { background: var(--red); }
.buyback { background: var(--gold); }
.treasury { background: rgba(28, 28, 24, 0.32); }
.ratio-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 18px; font-size: 11.5px; color: var(--ink-70); letter-spacing: 0.04em; }
.ratio-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 9px; height: 9px; display: inline-block; }
.arena-rule > p { color: var(--ink-70); font-size: 13.5px; line-height: 1.95; }

.rule-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.note-card { border-left: 2px solid var(--red); padding: 8px 0 8px 18px; }
.note-card:nth-child(2) { border-color: var(--gold); }
.note-card:nth-child(3) { border-color: var(--ink); }
.note-card h4 { font-family: var(--kai); font-size: 16px; letter-spacing: 0.1em; margin-bottom: 5px; }
.note-card p { color: var(--ink-55); font-size: 12.5px; line-height: 1.9; }

/* ---------- flap ---------- */
.flap { max-width: 1360px; }
.flap-panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 44px; padding: clamp(30px, 5vw, 68px);
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(143, 116, 68, 0.16), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(168, 50, 36, 0.12), transparent 60%),
    #1b1b17;
  color: var(--paper);
  border: 1px solid #000;
  box-shadow: 0 50px 90px -70px #000;
}
.flap-panel::before {
  content: "墨"; position: absolute; right: -30px; bottom: -90px;
  font-family: var(--kai); font-size: 420px; line-height: 1;
  color: rgba(236, 228, 211, 0.03); pointer-events: none;
}
.flap-main { position: relative; z-index: 2; }
.flap-panel .eyebrow { color: rgba(236, 228, 211, 0.5); }
.flap-panel h2 { font-family: var(--kai); font-weight: 500; font-size: clamp(34px, 4vw, 54px); letter-spacing: 0.1em; margin: 8px 0 14px; }
.flap-lead { color: rgba(236, 228, 211, 0.68); font-size: 14.5px; max-width: 36em; line-height: 1.95; }
.flap-steps { margin: 26px 0; display: grid; gap: 13px; }
.flap-steps li { display: flex; gap: 14px; align-items: baseline; color: rgba(236, 228, 211, 0.72); font-size: 13.5px; }
.flap-steps b {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(236, 228, 211, 0.28); color: var(--paper);
  font-family: var(--kai); font-size: 11px; font-weight: 400;
  transform: translateY(3px);
}
.flap-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 6px; }
.flap-panel .btn-ink { background: transparent; color: var(--paper); border-color: rgba(236, 228, 211, 0.4); }
.flap-panel .btn-ink:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.flap-status { font-family: var(--kai); font-size: 12px; letter-spacing: 0.2em; color: rgba(236, 228, 211, 0.45); }
.flap-side { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.token-disc {
  width: clamp(120px, 15vw, 176px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #f4eee0, #d9cdb5 55%, #bba985 100%);
  color: var(--ink); font-family: var(--kai); font-size: clamp(46px, 6vw, 64px);
  box-shadow: inset 0 0 0 1px rgba(28, 28, 24, 0.22), inset 0 0 0 9px rgba(236, 228, 211, 0.5), 0 22px 50px -36px #000;
  position: relative;
}
.token-disc::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px dashed rgba(236, 228, 211, 0.25); animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.token-line { font-family: var(--latin); font-size: 10px; letter-spacing: 0.3em; color: rgba(236, 228, 211, 0.45); margin-top: 10px; }
.token-add { font-family: var(--latin); font-size: 10px; letter-spacing: 0.1em; color: rgba(236, 228, 211, 0.35); }
.flap-stamp {
  position: absolute; right: 0; top: -8px;
  writing-mode: vertical-rl; padding: 10px 7px;
  border: 1px solid rgba(168, 50, 36, 0.6); color: rgba(236, 228, 211, 0.6);
  font-family: var(--kai); font-size: 11px; letter-spacing: 0.3em;
  transform: rotate(4deg); background: rgba(168, 50, 36, 0.14);
}

/* ---------- faq ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 46px 22px 0;
  font-family: var(--kai); font-size: 17px; letter-spacing: 0.06em;
  transition: color 0.3s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--latin); font-size: 23px; font-weight: 300; color: var(--ink-40);
  transition: transform 0.35s var(--ease), color 0.3s;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--red); }
.faq-list summary:hover { color: var(--red); }
.faq-list details p { padding: 0 12% 24px 0; color: var(--ink-70); font-size: 14px; line-height: 2; animation: rise 0.5s var(--ease); }

/* ---------- footer ---------- */
.site-foot { margin-top: 40px; background: #1b1b17; color: rgba(236, 228, 211, 0.68); border-top: 1px solid #000; }
.foot-inner { max-width: 1360px; margin: 0 auto; padding: 52px clamp(20px, 5vw, 64px) 36px; display: grid; gap: 24px; }
.foot-brand { display: flex; align-items: center; gap: 12px; color: var(--paper); }
.foot-brand b { font-family: var(--kai); font-size: 18px; letter-spacing: 0.16em; display: block; }
.foot-brand small { font-family: var(--latin); font-size: 9px; letter-spacing: 0.28em; color: rgba(236, 228, 211, 0.55); }
.foot-risk { max-width: 62em; font-size: 11.5px; line-height: 1.95; color: rgba(236, 228, 211, 0.55); border-top: 1px solid rgba(236, 228, 211, 0.12); padding-top: 20px; }
.foot-meta { display: flex; justify-content: space-between; gap: 20px; font-family: var(--latin); font-size: 10px; letter-spacing: 0.18em; color: rgba(236, 228, 211, 0.42); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  z-index: 1000; max-width: min(90vw, 460px);
  background: rgba(27, 27, 23, 0.94); color: var(--paper);
  padding: 11px 20px; font-size: 13px; letter-spacing: 0.05em;
  opacity: 0; pointer-events: none; transition: opacity 0.35s, transform 0.35s var(--ease);
  box-shadow: 0 20px 40px -30px #000;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   ARENA
   ========================================================= */
.arena-page { background: #eae2d1; }
.arena { max-width: 1520px; margin: 0 auto; padding: 34px clamp(16px, 3vw, 40px) 80px; }
.arena-top {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 20px 30px; padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.arena-heading h1 {
  font-family: var(--kai); font-weight: 500; font-size: clamp(28px, 3.4vw, 46px);
  letter-spacing: 0.08em; line-height: 1.2; margin-top: 8px;
}
.arena-heading .dot { color: var(--red); margin: 0 0.2em; }
.arena-switch { display: inline-flex; border: 1px solid var(--line-strong); background: rgba(246, 241, 228, 0.4); padding: 3px; }
.switch-btn {
  padding: 10px 18px; font-family: var(--kai); font-size: 14px; letter-spacing: 0.14em;
  color: var(--ink-55); display: inline-flex; align-items: center; gap: 7px; transition: all 0.3s;
}
.switch-btn small { font-family: var(--latin); font-size: 9px; letter-spacing: 0.16em; opacity: 0.8; }
.switch-btn.is-on { background: var(--ink); color: var(--paper); }
.switch-btn:not(.is-on):hover { color: var(--ink); background: rgba(28, 28, 24, 0.05); }
.round-meta { display: flex; align-items: stretch; gap: 0; border-left: 1px solid var(--line); }
.round-meta > div { display: flex; flex-direction: column; gap: 1px; padding: 0 18px; border-right: 1px solid var(--line); min-width: 76px; }
.round-meta span { font-family: var(--kai); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-40); }
.round-meta b { font-family: var(--latin); font-size: 19px; font-weight: 400; letter-spacing: 0.02em; white-space: nowrap; }
.round-meta .meta-count b { color: var(--red); }
.notice {
  margin-top: 14px; padding: 10px 14px; border: 1px solid rgba(168, 50, 36, 0.3);
  background: var(--red-soft); color: var(--ink-70); font-size: 12.5px;
}
.arena-grid { display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 22px; margin-top: 22px; align-items: start; }

/* board */
.board-wrap { min-width: 0; }
.board-paper {
  position: relative; padding: clamp(10px, 1.2vw, 18px);
  background:
    radial-gradient(900px 600px at 50% 0%, rgba(255, 251, 241, 0.55), transparent 70%),
    linear-gradient(180deg, #efe7d6, #e6ddc9);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), inset 0 0 0 5px rgba(246, 241, 228, 0.4);
}
.board-paper::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid rgba(28, 28, 24, 0.09); pointer-events: none; z-index: 4;
}
#boardBg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.6; z-index: 0; }
.threads { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.threads path { fill: none; stroke: rgba(28, 28, 24, 0.18); stroke-width: 1; }
.threads path.is-picked { stroke: rgba(168, 50, 36, 0.55); stroke-width: 1.5; stroke-dasharray: none; }
.threads path.is-killed { stroke: rgba(168, 50, 36, 0.8); stroke-width: 2.2; }
.board-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 14px); aspect-ratio: 1 / 1.02;
}
.room { position: relative; min-width: 0; cursor: pointer; transition: transform 0.5s var(--ease); }
.room[data-room="0"] { grid-area: 1 / 1; }
.room[data-room="1"] { grid-area: 1 / 2; }
.room[data-room="2"] { grid-area: 1 / 3; }
.room[data-room="3"] { grid-area: 2 / 1; }
.room[data-room="4"] { grid-area: 2 / 3; }
.room[data-room="5"] { grid-area: 3 / 1; }
.room[data-room="6"] { grid-area: 3 / 2; }
.room[data-room="7"] { grid-area: 3 / 3; }
.room-paper {
  position: relative; height: 100%; overflow: hidden;
  border: 1px solid rgba(28, 28, 24, 0.26);
  background: var(--paper-2);
  box-shadow: 0 16px 30px -28px rgba(28, 28, 24, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: box-shadow 0.45s var(--ease), border-color 0.45s, transform 0.45s var(--ease);
}
.room-paper::after {
  content: ""; position: absolute; inset: 5px; border: 1px solid rgba(28, 28, 24, 0.09); pointer-events: none; z-index: 6;
}
.room-canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.2s var(--ease), filter 1s; }
.room-wash {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(236, 228, 211, 0.12) 0%, rgba(236, 228, 211, 0) 38%, rgba(236, 228, 211, 0.86) 82%, rgba(236, 228, 211, 0.96) 100%);
}
.room:hover { transform: translateY(-3px); }
.room:hover .room-paper { box-shadow: 0 24px 42px -34px rgba(28, 28, 24, 0.8), inset 0 0 0 1px rgba(168, 50, 36, 0.18); }
.room:hover .room-canvas { transform: scale(1.028); }
.room-head { position: absolute; z-index: 3; top: 10px; left: 10px; right: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.room-no {
  width: 24px; height: 24px; display: grid; place-items: center;
  font-family: var(--kai); font-size: 12px; color: var(--ink-70);
  border: 1px solid rgba(28, 28, 24, 0.28); border-radius: 50%;
  background: rgba(236, 228, 211, 0.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.room-tag { font-family: var(--kai); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-55); background: rgba(236, 228, 211, 0.5); padding: 3px 6px; }
.room-body { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.room-name h3 { font-family: var(--kai); font-weight: 500; font-size: clamp(17px, 1.6vw, 23px); letter-spacing: 0.12em; line-height: 1.2; }
.room-name p { font-family: var(--kai); font-size: 10.5px; color: var(--ink-70); letter-spacing: 0.06em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 18em; }
.room-pot { text-align: right; flex: none; }
.room-pot b { font-family: var(--latin); font-size: clamp(15px, 1.5vw, 20px); font-weight: 400; letter-spacing: 0.01em; display: block; line-height: 1.1; }
.room-pot span { font-family: var(--latin); font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-55); }
.room-dots { position: absolute; z-index: 3; left: 12px; bottom: 5px; display: flex; gap: 3px; opacity: 0.55; }
.room-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-70); }
.room-dots i:nth-child(3n) { background: var(--red); }
.room-select {
  position: absolute; z-index: 7; top: 50%; left: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  display: grid; place-items: center;
  background: var(--red); color: var(--paper-hi);
  font-family: var(--kai); font-size: 16px;
  border-radius: 2px; opacity: 0; transform: scale(0.7) rotate(-8deg);
  transition: opacity 0.3s, transform 0.35s var(--ease);
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.7);
}
.room.is-picked .room-select { opacity: 1; transform: scale(1) rotate(-8deg); }
.room.is-picked .room-paper { border-color: rgba(168, 50, 36, 0.65); box-shadow: 0 0 0 1px rgba(168, 50, 36, 0.45) inset, 0 24px 46px -34px rgba(168, 50, 36, 0.6); }
.room.is-picked { transform: translateY(-4px); }
.room.is-empty .room-canvas { filter: saturate(0.55) contrast(0.95); opacity: 0.8; }
.room.is-drawing .room-paper { animation: roomBreathe 2.6s ease-in-out infinite; }
@keyframes roomBreathe { 0%, 100% { box-shadow: 0 16px 30px -28px rgba(28, 28, 24, 0.65); } 50% { box-shadow: 0 0 0 2px rgba(168, 50, 36, 0.18) inset, 0 18px 36px -26px rgba(28, 28, 24, 0.7); } }

/* kill flood */
.flood {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: #171712;
  transform: translateY(calc(100% + 44px));
  transition: transform 1.35s cubic-bezier(0.7, 0, 0.2, 1);
  filter: blur(0.3px);
}
.flood::before {
  content: ""; position: absolute; top: -22px; left: -4%; width: 108%; height: 44px;
  background: #171712; border-radius: 48% 52% 0 0 / 100% 100% 0 0;
  box-shadow: 0 0 14px rgba(23, 23, 18, 0.6);
}
.flood i {
  position: absolute; top: -20px; left: 18%; width: 28%; height: 32px; background: #171712;
  border-radius: 50%; opacity: 0.8;
}
.flood i:nth-child(2) { left: 62%; width: 22%; top: -14px; }
.room.is-killed .flood { transform: translateY(0); }
.room.is-killed .room-wash { opacity: 0; transition: opacity 0.8s; }
.room.is-killed .room-head, .room.is-killed .room-body, .room.is-killed .room-dots { color: var(--paper); opacity: 0.55; transition: opacity 1s 0.4s; }
.room.is-killed .room-name h3 { color: var(--paper); }
.room.is-killed .room-name p, .room.is-killed .room-pot span { color: rgba(236, 228, 211, 0.5); }
.room.is-killed .room-pot b { color: var(--paper); }
.room-killed-stamp {
  position: absolute; z-index: 8; inset: 0; display: grid; place-items: center;
  font-family: var(--kai); font-size: clamp(50px, 6vw, 82px);
  color: rgba(236, 228, 211, 0.88);
  opacity: 0; transform: scale(1.4) rotate(-6deg); pointer-events: none;
  transition: opacity 0.4s 0.9s, transform 0.6s 0.9s var(--ease);
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}
.room.is-killed .room-killed-stamp { opacity: 1; transform: scale(1) rotate(-6deg); }
.room-killed-stamp::after, .room-survive-stamp::after {
  content: ""; position: absolute; inset: 22%;
  border: 1px solid rgba(168, 50, 36, 0.55);
  transform: rotate(8deg);
}
.room-survive-stamp {
  position: absolute; z-index: 8; top: 9px; right: 9px;
  width: 26px; height: 26px; display: grid; place-items: center;
  font-family: var(--kai); font-size: 11px;
  border: 1px solid var(--gold); color: var(--gold);
  opacity: 0; transform: scale(0.6); transition: opacity 0.5s 1.1s, transform 0.5s 1.1s var(--ease);
  background: rgba(236, 228, 211, 0.6);
}
.room.is-survivor .room-survive-stamp { opacity: 1; transform: scale(1); }
.room.is-survivor .room-paper { border-color: rgba(143, 116, 68, 0.55); }
.room.is-killed { cursor: default; }
.room.is-killed:hover { transform: none; }
.room.is-killed:hover .room-canvas { transform: none; }

/* center pool */
.center-pool {
  grid-area: 2 / 2; position: relative;
  align-self: center; justify-self: center;
  width: 92%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 42% 36%, rgba(255, 252, 243, 0.85), rgba(236, 228, 211, 0.35) 42%, rgba(28, 28, 24, 0.08) 78%, rgba(28, 28, 24, 0.16) 100%);
  box-shadow: inset 0 0 0 1px rgba(28, 28, 24, 0.25), inset 0 0 46px rgba(28, 28, 24, 0.08), 0 20px 50px -40px rgba(28, 28, 24, 0.8);
}
.center-pool::before {
  content: ""; position: absolute; inset: 7%; border-radius: 50%;
  border: 1px solid rgba(28, 28, 24, 0.18);
  border-style: dashed; opacity: 0.75;
  animation: spin 44s linear infinite reverse;
}
.center-pool::after {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  border: 1px solid rgba(28, 28, 24, 0.08);
}
.pool-ink { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.8; }
.pool-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12%; gap: 2px; }
.pool-kicker { font-family: var(--kai); font-size: 11px; letter-spacing: 0.2em; color: var(--ink-70); }
.pool-glyph {
  font-family: var(--kai); font-size: clamp(44px, 5.6vw, 70px); line-height: 1.1;
  color: var(--ink); margin: 3px 0 2px;
  text-shadow: 0 2px 24px rgba(28, 28, 24, 0.12);
}
.pool-phase { font-family: var(--kai); font-size: clamp(12px, 1.2vw, 15px); letter-spacing: 0.2em; color: var(--ink-70); }
.pool-clock { font-family: var(--latin); font-size: clamp(17px, 1.8vw, 24px); letter-spacing: 0.08em; color: var(--ink); margin-top: 3px; }
.pool-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.pool-btn {
  border: 1px solid rgba(28, 28, 24, 0.3); padding: 6px 12px;
  font-family: var(--kai); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-70);
  background: rgba(246, 241, 228, 0.45); transition: all 0.3s;
  white-space: nowrap; line-height: 1.25;
}
.pool-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pool-btn.seal { background: var(--red); color: var(--paper); border-color: var(--red); }
.pool-btn.seal:hover { background: var(--red-deep); }
.pool-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.center-pool.is-killed { box-shadow: inset 0 0 0 1px rgba(168, 50, 36, 0.45), inset 0 0 60px rgba(168, 50, 36, 0.15), 0 20px 50px -40px rgba(28, 28, 24, 0.8); }
.center-pool.is-killed .pool-glyph { color: var(--red); }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 0 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-family: var(--kai); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-55); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.dot-live { background: var(--red); }
.dot-survive { background: var(--gold); }
.dot-burn { background: var(--ink); }
.mode-chip {
  font-family: var(--kai); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-55);
  border: 1px solid var(--line-strong); padding: 4px 9px; white-space: nowrap;
}
.mode-chip.live { color: var(--red); border-color: rgba(168, 50, 36, 0.4); }

/* fx overlay */
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* rail */
.rail { display: grid; gap: 16px; position: sticky; top: 88px; }
.panel { background: linear-gradient(180deg, rgba(246, 241, 228, 0.58), rgba(236, 228, 211, 0.28)); border: 1px solid var(--line-strong); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-family: var(--kai); font-weight: 500; font-size: 18px; letter-spacing: 0.16em; }
.panel-head .link { font-family: var(--kai); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-55); border-bottom: 1px solid var(--line-strong); padding: 0 1px 1px; }
.panel-head .link:hover { color: var(--red); border-color: var(--red); }
.panel-head > span { font-family: var(--latin); font-size: 10.5px; letter-spacing: 0.1em; color: var(--ink-55); }
.panel-body { padding: 14px 16px 16px; }
.mode-line { font-family: var(--kai); font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-55); margin-bottom: 12px; display: flex; justify-content: space-between; gap: 8px; }
.mode-line b { color: var(--red); font-weight: 400; }
.selected-rooms { display: grid; gap: 5px; min-height: 42px; margin-bottom: 12px; }
.sel-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(28, 28, 24, 0.035); border: 1px solid rgba(28, 28, 24, 0.08); font-size: 12px; }
.sel-row .n { font-family: var(--kai); letter-spacing: 0.1em; }
.sel-row .amt { margin-left: auto; font-family: var(--latin); color: var(--ink-70); }
.sel-row .rm { color: var(--ink-40); padding: 0 2px; }
.sel-row .rm:hover { color: var(--red); }
.sel-empty { font-family: var(--kai); font-size: 11.5px; color: var(--ink-55); letter-spacing: 0.08em; padding: 10px 0; }
.amount-row { display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--line-strong); padding: 4px 0 6px; }
.amount-row label { font-family: var(--kai); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-55); white-space: nowrap; padding-bottom: 4px; }
.amount-input { margin-left: auto; display: flex; align-items: baseline; gap: 7px; }
.amount-input input {
  width: 100%; min-width: 0; max-width: 170px; border: 0; background: transparent; text-align: right;
  font-family: var(--latin); font-size: 21px; padding: 0; outline: 0; color: var(--ink);
}
.amount-input input::placeholder { color: var(--ink-25); }
.amount-input span { font-family: var(--latin); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-55); }
.preset-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chip {
  border: 1px solid var(--line); padding: 4px 9px; font-family: var(--latin); font-size: 10.5px;
  letter-spacing: 0.04em; color: var(--ink-55); transition: all 0.25s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.total-row { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; font-family: var(--kai); font-size: 12px; color: var(--ink-55); }
.total-row b { margin-left: auto; font-family: var(--latin); font-size: 22px; font-weight: 400; color: var(--ink); }
.total-row span:last-child { font-family: var(--latin); font-size: 10px; color: var(--ink-55); }
.balance-row { display: flex; gap: 8px; font-size: 11px; color: var(--ink-55); margin: 5px 0 12px; }
.balance-row b { margin-left: auto; font-family: var(--latin); font-weight: 400; color: var(--ink-55); }
.fine { font-size: 11px; line-height: 1.8; color: var(--ink-55); margin-top: 10px; }
.mine-list { display: grid; gap: 7px; }
.mine-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mine-row .n { font-family: var(--kai); letter-spacing: 0.08em; }
.mine-row .v { margin-left: auto; font-family: var(--latin); color: var(--ink-70); }
.mine-row .cl { font-family: var(--kai); font-size: 11px; color: var(--red); border-bottom: 1px solid rgba(168, 50, 36, 0.4); padding-bottom: 1px; }
.mine-row .cl:hover { color: var(--red-deep); }
.mine-empty { font-family: var(--kai); font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-55); padding: 6px 0; }
.mine-sum { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; font-size: 10.5px; color: var(--ink-55); line-height: 1.8; }
.mine-sum b { font-family: var(--latin); font-weight: 400; color: var(--ink); }
.mine-history { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 9px; display: grid; gap: 7px; }
.mine-history-title { font-family: var(--kai); font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-55); }
.mine-history .mine-row .n { font-size: 11px; }

.feed-list { max-height: 264px; overflow: auto; padding: 4px 16px 12px; scrollbar-width: thin; }
.feed-list::-webkit-scrollbar { width: 4px; }
.feed-list::-webkit-scrollbar-thumb { background: var(--line-strong); }
.feed-item { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px dashed rgba(28, 28, 24, 0.09); font-size: 11.5px; line-height: 1.65; color: var(--ink-70); animation: feedIn 0.4s var(--ease); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .t { font-family: var(--latin); font-size: 9.5px; color: var(--ink-40); padding-top: 2px; flex: none; }
.feed-item .d { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-25); margin-top: 6px; flex: none; }
.feed-item.kill .d { background: var(--red); }
.feed-item.kill { color: var(--red); }
.feed-item b { font-weight: 600; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.arena-rules { margin-top: 46px; border-top: 1px solid var(--line); padding-top: 30px; }
.arena-rules h2 { font-family: var(--kai); font-size: 24px; font-weight: 500; letter-spacing: 0.12em; margin-bottom: 16px; }
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rule-grid article { border-left: 1px solid var(--line-strong); padding-left: 14px; }
.rule-grid h3 { font-family: var(--kai); font-size: 14px; letter-spacing: 0.1em; margin-bottom: 4px; }
.rule-grid p { font-size: 11.5px; line-height: 1.9; color: var(--ink-55); }
.arena-rules .risk { margin-top: 22px; font-size: 10.5px; line-height: 1.9; color: var(--ink-40); max-width: 72em; }

/* reveal */
.reveal {
  position: fixed; inset: 0; z-index: 200; background: #151510; color: var(--paper);
  display: grid; place-items: center; overflow: hidden;
  opacity: 0; pointer-events: none; transition: opacity 0.5s;
}
.reveal.is-on { opacity: 1; pointer-events: auto; }
.reveal canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.reveal-copy { position: relative; z-index: 2; text-align: center; padding: 24px; opacity: 0; transform: translateY(24px); transition: opacity 0.6s 0.2s, transform 0.7s 0.2s var(--ease); }
.reveal.is-on .reveal-copy { opacity: 1; transform: none; }
.reveal-kicker { font-family: var(--latin); font-size: 10px; letter-spacing: 0.32em; color: rgba(236, 228, 211, 0.45); }
.reveal-name { font-family: var(--kai); font-weight: 500; font-size: clamp(64px, 12vw, 150px); line-height: 1; letter-spacing: 0.08em; margin: 14px 0 10px; display: flex; align-items: center; justify-content: center; gap: 0.16em; }
.reveal-name em { font-family: var(--kai); font-style: normal; font-size: 0.42em; color: rgba(236, 228, 211, 0.35); }
.reveal-line { font-family: var(--kai); font-size: clamp(14px, 1.6vw, 18px); letter-spacing: 0.32em; color: rgba(236, 228, 211, 0.6); }
.reveal-seal {
  display: inline-grid; place-items: center; width: 54px; height: 54px; margin-top: 26px;
  background: var(--red); color: var(--paper-hi); font-family: var(--kai); font-size: 30px;
  transform: rotate(-6deg); opacity: 0.95;
}
.reveal-skip { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3; font-family: var(--kai); font-size: 10px; letter-spacing: 0.2em; color: rgba(236, 228, 211, 0.35); border-bottom: 1px solid rgba(236, 228, 211, 0.2); padding-bottom: 2px; }
.reveal-skip:hover { color: var(--paper); }

/* wallet pop */
.wallet-pop {
  position: fixed; z-index: 120; top: 82px; right: clamp(14px, 3vw, 48px);
  width: 268px; background: var(--paper); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.6); padding: 16px;
}
.wallet-pop h4 { font-family: var(--kai); font-size: 12px; letter-spacing: 0.16em; color: var(--ink-55); margin-bottom: 8px; }
.wallet-pop .addr { font-family: var(--latin); font-size: 13px; word-break: break-all; }
.wallet-pop .net { margin-top: 8px; font-size: 10px; color: var(--ink-55); display: flex; align-items: center; gap: 6px; }
.wallet-pop .net i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.wallet-pop .net.ok i { background: #3d7a4a; }
.wallet-pop .pop-actions { display: flex; gap: 12px; margin-top: 14px; }
.wallet-pop .link { font-family: var(--kai); font-size: 11px; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.wallet-pop .link:hover { color: var(--red); border-color: var(--red); }
.wallet-btn.is-on { border-color: var(--red); color: var(--red); }
.wallet-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display: inline-block; margin-right: 2px; }

/* arena responsive */
@media (max-width: 1180px) {
  .arena-grid { grid-template-columns: 1fr; }
  .rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .rail .feed { grid-column: span 2; }
  .board-grid { aspect-ratio: auto; grid-template-rows: auto; }
  .center-pool { aspect-ratio: 1; }
  .room-paper { min-height: 212px; }
  .rail .stake { grid-row: span 2; }
}
@media (max-width: 900px) {
  .topnav { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .hero-foot-right { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-note { text-align: left; }
  .play-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .play-live { grid-column: span 2; grid-row: span 2; }
  .play-soon { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 0; }
  .step:last-child { border-bottom: 0; }
  .arena-split { grid-template-columns: 1fr; }
  .rule-notes { grid-template-columns: 1fr; }
  .flap-panel { grid-template-columns: 1fr; }
  .flap-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .flap-stamp { right: 10px; }
  .rule-grid { grid-template-columns: repeat(2, 1fr); }
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .center-pool { grid-area: auto; grid-column: 1 / -1; width: min(360px, 82%); margin: 8px auto 14px; order: 9; }
  .room { grid-area: auto !important; order: 0; }
  .threads { display: none; }
  .arena { padding-top: 22px; }
  .arena-top { align-items: flex-start; }
  .round-meta { width: 100%; border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .round-meta > div { padding: 0 12px; flex: 1; min-width: 0; }
  .round-meta > div:first-child { padding-left: 0; }
  .round-meta b { font-size: 16px; }
  .rail { grid-template-columns: 1fr; }
  .rail .feed { grid-column: auto; }
  .rail .stake { grid-row: auto; }
}
@media (max-width: 680px) {
  .topbar { height: 64px; gap: 12px; }
  .brand-seal { width: 32px; height: 32px; font-size: 18px; }
  .brand-text b { font-size: 18px; }
  .brand-text small { display: none; }
  .hero { min-height: 88vh; }
  .hero-inner { padding-top: 30px; }
  .hero-title { font-size: clamp(74px, 26vw, 120px); }
  .hero-lead { font-size: 14px; }
  .hero-foot { font-size: 9px; gap: 10px; padding: 12px 18px; }
  .hero-foot span:last-child { display: none; }
  .section { padding-top: 60px; padding-bottom: 60px; }
  .play-grid { grid-template-columns: 1fr; grid-auto-rows: 210px; }
  .play-live { grid-column: 1; grid-row: span 2; }
  .play-soon { grid-column: 1; }
  .play-live .play-body { left: 20px; right: 20px; bottom: 20px; }
  .play-live .play-top { left: 20px; right: 20px; }
  .arena-heading h1 { font-size: 26px; }
  .arena-switch { width: 100%; }
  .switch-btn { flex: 1; justify-content: center; }
  .round-meta > div { padding: 0 8px; }
  .round-meta b { font-size: 14px; }
  .board-paper { padding: 8px; }
  .board-grid { gap: 8px; }
  .room-paper { min-height: 188px; }
  .room-name p { display: none; }
  .room-body { left: 9px; right: 9px; bottom: 8px; }
  .room-no { width: 22px; height: 22px; font-size: 10px; }
  .center-pool { width: min(320px, 90%); }
  .pool-glyph { font-size: 42px; }
  .rail { gap: 12px; }
  .rule-grid { grid-template-columns: 1fr; }
  .foot-meta { flex-direction: column; gap: 4px; }
  .wall-pop, .wallet-pop { right: 12px; left: 12px; width: auto; }
}

/* arena runtime states */
.reveal[hidden], .wallet-pop[hidden], .notice[hidden] { display: none; }
.mine-row .v.lost { color: var(--red); }
.room { outline: none; }
.room:focus-visible .room-paper { box-shadow: 0 0 0 2px rgba(168, 50, 36, 0.5) inset, 0 24px 42px -34px rgba(28, 28, 24, 0.8); }
.chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: rgba(28, 28, 24, 0.06); }


/* ---------- language toggle ---------- */
.lang-toggle {
  height: 34px; min-width: 36px; padding: 0 9px;
  border: 1px solid var(--line-strong); background: transparent;
  font-family: var(--latin); font-size: 10px; letter-spacing: 0.14em;
  color: var(--ink-70); transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.lang-toggle:hover { color: var(--ink); border-color: var(--ink); background: rgba(28, 28, 24, 0.04); }

/* ---------- compact arena: keep all eight rooms on one desktop screen ---------- */
@media (min-width: 900px) {
  .arena { max-width: 1360px; padding-top: 12px; }
  .token-strip { margin: 0 0 8px; padding: 6px 10px; }
  .arena-top {
    padding-bottom: 8px; gap: 12px 20px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  }
  .arena-heading { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
  .arena-heading .eyebrow { margin: 0; white-space: nowrap; }
  .arena-heading h1 {
    margin: 0; font-size: clamp(20px, 2.1vw, 28px);
    letter-spacing: 0.06em; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .arena-switch { grid-row: 1; grid-column: 2; }
  .round-meta { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-top: 6px; }
  .round-meta > div { padding: 0 14px; flex-direction: row; align-items: baseline; gap: 6px; min-width: 0; }
  .round-meta > div:first-child { padding-left: 0; }
  .round-meta b { font-size: 15px; }
  .round-meta .meta-count { margin-left: auto; }
  .arena-grid {
    --board-w: clamp(340px, calc(100dvh - 278px), 780px);
    grid-template-columns: minmax(0, var(--board-w)) 336px;
    max-width: calc(var(--board-w) + 354px);
    justify-content: center;
    gap: 16px;
    margin: 10px auto 0;
  }
  .board-wrap { width: 100%; min-width: 0; }
  .board-foot { margin-top: 5px; }
  .board-grid { aspect-ratio: 1 / 1.02; grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .center-pool { width: 94%; height: auto; }
  .pool-glyph { font-size: clamp(28px, 4vh, 58px); }
  .pool-clock { font-size: clamp(18px, 2.4vh, 26px); }
  .room-paper { min-height: 0; }
  .room-body { gap: 5px; }
  .room-name { min-width: 0; flex: 1 1 auto; }
  .room-name h3 { font-size: clamp(15px, 1.35vw, 21px); letter-spacing: 0.08em; }
  .room-name p { max-width: 100%; font-size: 10px; }
  .room-pot { flex: 0 1 auto; min-width: 0; }
  .room-pot b { font-size: clamp(13px, 1.15vw, 18px); overflow: hidden; text-overflow: ellipsis; }
  .room-pot span, .room-pot em { font-size: 9.5px; }
}

@media (max-width: 1180px) and (min-width: 900px) {
  .rail { grid-template-columns: 1fr; }
  .rail .feed, .rail .stake { grid-column: auto; grid-row: auto; }
  .room-name p { display: none; }
  .arena-heading .eyebrow { display: none; }
}

@media (max-width: 680px) {
  .room-paper { min-height: 150px; }
  .center-pool { width: min(240px, 82%); }
  .pool-glyph { font-size: 36px; }
  .lang-toggle { height: 30px; min-width: 32px; padding: 0 7px; font-size: 9px; }
}

/* ---------- token strip ---------- */
.token-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 0 0 14px; padding: 8px 12px;
  border: 1px solid var(--line); background: rgba(246, 241, 228, 0.5);
  font-family: var(--latin); font-size: 10.5px; letter-spacing: 0.06em; color: var(--ink-70);
}
.token-strip .ts-label { font-family: var(--kai); font-weight: 700; letter-spacing: 0.14em; color: var(--ink); }
.token-strip .ts-addr { border-bottom: 1px solid var(--line-strong); color: var(--ink-70); }
.token-strip .ts-addr:hover { color: var(--red); border-color: var(--red); }
.token-strip .ts-copy { font-family: var(--kai); font-size: 10px; letter-spacing: 0.08em; color: var(--ink-55); border-bottom: 1px dotted var(--line-strong); }
.token-strip .ts-copy:hover { color: var(--ink); }
.token-strip .ts-burn { margin-left: auto; }
.token-strip .ts-burn b { font-family: var(--latin); font-weight: 700; color: var(--red); letter-spacing: 0.02em; }

/* ---------- legibility ---------- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-synthesis: weight; }
.grain { opacity: 0.2; }
.arena-heading h1, .panel-head h2, .room-name h3, .pool-phase,
.switch-btn, .btn, .round-meta b, .room-pot b, .pool-glyph { font-weight: 700; }
.pool-kicker, .room-name p, .room-tag, .legend, .round-meta span,
.fine, .mine-empty, .feed-item, .room-pot span { color: var(--ink-70); font-weight: 500; }
.room-name p { font-size: 10.5px; }
.pool-kicker { font-size: 11px; }
.room-tag, .room-no { font-weight: 700; }
.room-pot em {
  display: block; margin-top: 2px; font-style: normal;
  font-family: var(--latin); font-size: 9.5px; letter-spacing: 0.06em; color: var(--ink-55);
}
.room.is-killed .room-pot em { color: rgba(236, 228, 211, 0.6); }

@media (max-width: 680px) {
  .token-strip { font-size: 10px; padding: 7px 9px; gap: 8px; }
  .token-strip .ts-burn { margin-left: 0; width: 100%; }
}

.sw.reward, .reward { background: var(--red-deep, #7d241a); }
.ratio-bar i.reward { min-width: 2px; }

/* ---------- narrow windows (phone landscape / small desktop) ---------- */
@media (min-width: 450px) and (max-width: 899px) {
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-paper { min-height: clamp(130px, 26vw, 180px); }
  .center-pool { width: min(300px, 70%); }
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail .feed { grid-column: 1 / -1; }
  .rail .stake { grid-row: span 2; }
}

@media (max-width: 449px) {
  .topbar { gap: 8px; }
  .lang-toggle { min-width: 30px; padding: 0 6px; }
  .room-name h3 { font-size: 15px; letter-spacing: 0.04em; }
  .room-pot b { font-size: 12px; }
  .room-pot span, .room-pot em { font-size: 9px; }
  .room-body { gap: 3px; }
  .room-tag { font-size: 9.5px; padding: 2px 5px; }
}

/* ---------- room card: stack name over amount on narrow cards ---------- */
@media (max-width: 899px) {
  .room-body {
    left: 10px; right: 10px; bottom: 8px;
    flex-direction: column; align-items: flex-start; gap: 1px;
  }
  .room-name { width: 100%; }
  .room-name h3 { font-size: 17px; letter-spacing: 0.06em; }
  .room-pot { text-align: left; width: 100%; display: flex; align-items: baseline; gap: 4px; }
  .room-pot b { font-size: 14px; }
  .room-pot span, .room-pot em { display: inline; margin: 0; }
  .room-pot em { margin-left: auto; }
}

/* ---------- english typography ---------- */
body.lang-en .hero-sub {
  font-family: var(--latin); font-size: clamp(20px, 2.6vw, 34px);
  letter-spacing: 0.02em; line-height: 1.35;
}
body.lang-en .hero-title { letter-spacing: 0.04em; }
body.lang-en .hero-lead { font-family: var(--latin); letter-spacing: 0.01em; }
body.lang-en .play-body h3,
body.lang-en .step h3,
body.lang-en .note-card h4,
body.lang-en .arena-rule h3,
body.lang-en .panel-head h2,
body.lang-en .arena-heading h1,
body.lang-en .pool-phase { font-family: var(--latin); font-weight: 600; letter-spacing: 0.01em; }
body.lang-en .room-name h3 { font-family: var(--latin); letter-spacing: 0.02em; }
body.lang-en .eyebrow { font-family: var(--latin); letter-spacing: 0.2em; }
body.lang-en .switch-btn { font-family: var(--latin); letter-spacing: 0.06em; }
body.lang-en .switch-btn small { letter-spacing: 0.14em; }
body.lang-en .faq-list summary { font-family: var(--latin); letter-spacing: 0.01em; }
body.lang-en .btn { font-family: var(--latin); letter-spacing: 0.08em; }
