/* ============================================================
   CUSTOM HEAVEN'S SHOT — RENEWAL
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1;
}

/* THEME TOKENS */
.app[data-theme="ink"] {
  --bg: #0c0b18;
  --bg-2: #14122a;
  --bg-3: #1c1a36;
  --fg: #f5efdf;
  --fg-dim: #b9b1a0;
  --fg-muted: #6b6580;
  --rule: rgba(245, 239, 223, 0.12);
  --rule-strong: rgba(245, 239, 223, 0.28);
  --card: #15132a;
  --card-2: #1d1b3a;
  --gold: #d4a64a;
  --gold-2: #f0c970;
}
.app[data-theme="dawn"] {
  --bg: #1a1530;
  --bg-2: #251c44;
  --bg-3: #2e2456;
  --fg: #fdf6e6;
  --fg-dim: #c8bfd6;
  --fg-muted: #7d7398;
  --rule: rgba(253, 246, 230, 0.14);
  --rule-strong: rgba(253, 246, 230, 0.30);
  --card: #251c44;
  --card-2: #312758;
  --gold: #ffce63;
  --gold-2: #ffe49a;
}
.app[data-theme="ivory"] {
  --bg: #f5efdf;
  --bg-2: #ece4cf;
  --bg-3: #e2d8be;
  --fg: #1a1730;
  --fg-dim: #4a4660;
  --fg-muted: #8a8499;
  --rule: rgba(26, 23, 48, 0.14);
  --rule-strong: rgba(26, 23, 48, 0.32);
  --card: #ffffff;
  --card-2: #fdf9ec;
  --gold: #b88a2b;
  --gold-2: #d4a64a;
}

/* DENSITY */
.app[data-density="compact"]    { --pad-y: 64px; --pad-x: clamp(20px, 4vw, 60px); --gap: 18px; }
.app[data-density="comfortable"] { --pad-y: 96px; --pad-x: clamp(24px, 6vw, 96px); --gap: 28px; }
.app[data-density="spacious"]    { --pad-y: 140px; --pad-x: clamp(32px, 9vw, 140px); --gap: 38px; }

/* shared */
.app {
  --serif: "Zen Antique", "Hiragino Mincho ProN", serif;
  --display: "Bebas Neue", "Oswald", "Noto Sans JP", sans-serif;
  --mono: "JetBrains Mono", "Space Mono", monospace;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1428;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 2px 0 rgba(0,0,0,0.25), 0 12px 32px -16px var(--gold);
}
.btn--gold:hover { filter: brightness(1.06); }
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { background: var(--rule); }
.btn--line {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule-strong);
}
.btn--line:hover { border-color: var(--gold); color: var(--gold); }

.btn--xl {
  padding: 22px 40px;
  font-size: 16px;
  letter-spacing: 0.1em;
  border-radius: 999px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: absolute;
  top: 24px; left: var(--pad-x); right: var(--pad-x);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
}
.navbar__brand {
  display: flex; align-items: center; gap: 12px;
}
.navbar__sigil {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--gold);
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--rule-strong);
  padding: 4px 14px;
  border-radius: 6px;
}
.navbar__brand-title { font-size: 14px; font-weight: 700; line-height: 1.1; }
.navbar__brand-sub  { font-size: 10px; letter-spacing: 0.2em; opacity: .65; }
.navbar__links {
  margin-left: auto;
  display: flex; gap: 28px;
}
.navbar__links a {
  color: var(--fg);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.05em;
  opacity: 0.78;
  transition: opacity .2s;
}
.navbar__links a:hover { opacity: 1; color: var(--gold); }
.navbar__links a.navbar__apply {
  margin-left: 8px;
  background: var(--gold);
  color: #1a1428;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 1;
}
.navbar__links a.navbar__apply:hover { color: #1a1428; filter: brightness(1.06); }

.btn--line.is-active {
  background: var(--gold);
  color: #1a1428;
  border-color: var(--gold);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px var(--pad-x) 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
  filter: saturate(0.9) contrast(1.05);
}
.hero__bg-fade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, transparent 0%, var(--bg) 80%),
    linear-gradient(180deg, transparent 0%, var(--bg) 96%);
}
.app[data-theme="ivory"] .hero__bg img { opacity: 0.7; filter: saturate(1) contrast(1); }
.app[data-theme="ivory"] .hero__bg-fade {
  background:
    radial-gradient(ellipse at 30% 40%, transparent 0%, rgba(245,239,223,0.7) 70%, var(--bg) 100%),
    linear-gradient(180deg, transparent 0%, var(--bg) 96%);
}

.hero__inner {
  position: relative; z-index: 2;
  max-width: 1100px;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
  border: 1px solid var(--rule-strong);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  margin-bottom: 28px;
}
.app[data-theme="ivory"] .hero__eyebrow { background: rgba(255,255,255,0.6); }
.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--gold) 30%, transparent);
}

.hero__title {
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  line-height: 0.85;
}
.hero__title-en {
  font-family: var(--display);
  font-size: clamp(56px, 11vw, 168px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-shadow: 0 4px 0 rgba(0,0,0,0.35);
}
.hero__title-en--alt {
  color: var(--gold);
  font-style: italic;
  margin-left: 0.15em;
}
.hero__title-jp {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(14px, 1.6vw, 22px);
  font-weight: 400;
  letter-spacing: 0.45em;
  color: var(--fg-dim);
}

.hero__copy {
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.9;
  color: var(--fg-dim);
  max-width: 640px;
  margin: 0 0 36px;
  text-wrap: pretty;
}

.hero__cta {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: 60px;
}

.hero__stats {
  display: flex; align-items: stretch;
  gap: clamp(20px, 4vw, 60px);
  border-top: 1px solid var(--rule);
  padding-top: 28px;
  max-width: 720px;
}
.stat__num {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  color: var(--gold);
}
.stat__lbl {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  margin-top: 6px;
}
.stat__rule {
  width: 1px;
  background: var(--rule);
  margin: 4px 0;
}

.hero__scroll {
  position: absolute;
  right: var(--pad-x); bottom: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--fg-muted);
  z-index: 2;
  writing-mode: vertical-rl;
  animation: scroll-pulse 2.4s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.45; transform: translateY(0); }
  50%      { opacity: 1;    transform: translateY(8px); }
}

/* ============================================================
   SECTION LABEL
   ============================================================ */
.section-label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.section-label__num {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 110px);
  line-height: 0.85;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.section-label__kana {
  font-family: var(--serif);
  font-size: clamp(22px, 3.2vw, 38px);
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.section-label__en {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--fg-muted);
  margin-top: 8px;
}
.section-label__sub {
  max-width: 320px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-dim);
  text-align: right;
}

/* ============================================================
   FLOW
   ============================================================ */
.flow { padding: var(--pad-y) var(--pad-x); }
.flow__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.flow-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 28px 24px 30px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, border-color .2s;
}
.flow-card:hover {
  transform: translateY(-4px);
  border-color: var(--tone);
}
.flow-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--tone);
  opacity: 0.65;
}
.flow-card__head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.flow-card__step {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}
.flow-card__step span {
  font-family: var(--display);
  font-size: 22px;
  color: var(--tone);
  margin-left: 4px;
  letter-spacing: 0;
}
.flow-card__rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.flow-card__art {
  height: 200px;
  display: flex; align-items: flex-end; justify-content: center;
  margin: 4px auto 18px;
  position: relative;
  overflow: hidden;
}
.flow-card__art::before {
  content: none;
}
.flow-card__art img {
  height: 110%;
  width: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.4));
  object-fit: contain;
  object-position: center bottom;
}
.flow-card__title {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 12px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.flow-card__body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-dim);
  margin: 0;
}
.flow-card__note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  font-size: 11px;
  line-height: 1.7;
  color: var(--fg-muted);
}
.flow__cta {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

@media (max-width: 1100px) {
  .flow__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .flow__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CAST
   ============================================================ */
.cast {
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-2);
  position: relative;
}
.cast::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--rule);
}
.cast__layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: stretch;
}
.cast__list {
  display: flex; flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}
.cast-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: none;
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  text-align: left;
  padding: 22px 24px;
  transition: background .2s, padding-left .2s;
}
.cast-row:last-child { border-bottom: none; }
.cast-row:hover { background: var(--card-2); padding-left: 28px; }
.cast-row.is-active {
  background: var(--card-2);
  padding-left: 28px;
}
.cast-row.is-active::before {
  content: ""; position: absolute;
}
.cast-row.is-active .cast-row__idx { color: var(--tone); }
.cast-row__idx {
  font-family: var(--display);
  font-size: 26px;
  color: var(--fg-muted);
  width: 36px;
  transition: color .2s;
}
.cast-row__jp {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
}
.cast-row__en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--fg-muted);
  margin-top: 4px;
}
.cast-row__role {
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.06em;
}
.cast-row__chev {
  font-family: var(--mono);
  color: var(--fg-muted);
  transition: transform .2s, color .2s;
}
.cast-row.is-active .cast-row__chev,
.cast-row:hover .cast-row__chev {
  color: var(--tone);
  transform: translateX(6px);
}

.cast__stage {
  position: relative;
  min-height: 540px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--rule);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 32px;
}
.cast__stage-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in oklab, var(--tone) 28%, transparent), transparent 60%);
}
.cast__stage-img {
  position: relative; z-index: 2;
  max-height: 480px;
  width: auto;
  filter: drop-shadow(0 24px 36px rgba(0,0,0,0.5));
  animation: cast-float 4s ease-in-out infinite;
}
@keyframes cast-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.cast__stage-meta {
  position: absolute; left: 32px; bottom: 32px; right: 32px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--rule-strong);
}
.cast__stage-romaji {
  grid-column: 1 / -1;
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.9;
  color: var(--tone);
  letter-spacing: 0.02em;
}
.cast__stage-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.1em;
}
.cast__stage-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--fg-muted);
  text-align: right;
}
.cast__stage-frame {
  position: absolute; inset: 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 1000px) {
  .cast__layout { grid-template-columns: 1fr; }
  .cast__stage { min-height: 460px; }
}

/* ============================================================
   CHARACTER BUBBLE
   ============================================================ */
.bubble {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px 20px 16px 16px;
  margin: 0 0 22px;
  max-width: 640px;
  position: relative;
}
.bubble::before {
  content: "";
  position: absolute;
  left: 64px; top: -7px;
  width: 14px; height: 14px;
  background: var(--card-2);
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  transform: rotate(45deg);
}
.bubble__portrait {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--tone);
  background: transparent;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.bubble__portrait img {
  position: absolute;
  width: 130%;
  height: 130%;
  top: -8%;
  left: -15%;
  object-fit: contain;
  object-position: center top;
}
.bubble__name {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 4px;
}
.bubble__name span:first-child {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.06em;
}
.bubble__role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}
.bubble__line {
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-dim);
}

.app[data-bubbles="off"] .bubble { display: none; }

/* ============================================================
   SIMULATOR
   ============================================================ */
.sim { padding: var(--pad-y) var(--pad-x); }

.sim-block {
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.sim-block:last-of-type { border-bottom: none; }

.sim-block__head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 22px;
}
.sim-block__idx {
  font-family: var(--display);
  font-size: 36px;
  color: var(--gold);
}
.sim-block__title {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.08em;
  margin: 0;
}
.sim-block__body { padding: 0; }

/* BUY */
.buy {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  align-items: stretch;
}
.buy__input-wrap {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex; flex-direction: column;
}
.buy__yen {
  font-family: var(--display);
  font-size: 48px;
  color: var(--gold);
  position: absolute;
  left: 24px; top: 18px;
}
.buy__input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 72px);
  letter-spacing: 0.02em;
  width: 100%;
  padding-left: 44px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.buy__input::-webkit-outer-spin-button,
.buy__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy__hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  margin-top: 14px;
}
.buy__presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-content: center;
}
.chip {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--fg);
  padding: 12px 16px;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.04em;
  transition: all .15s;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1428;
}

/* WIN */
.win__top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
  margin-bottom: 28px;
}
.win__current {
  display: flex; align-items: baseline; gap: 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px 26px;
}
.win__current-x {
  font-family: var(--display);
  font-size: 64px;
  color: var(--gold);
  line-height: 1;
}
.win__current-x span {
  font-family: var(--serif);
  font-size: 22px;
  margin-left: 6px;
  color: var(--fg);
}
.win__current-mult {
  font-size: 13px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}
.win__current-mult strong {
  font-family: var(--display);
  font-size: 28px;
  color: var(--fg);
  margin-left: 6px;
}
.win__quick {
  display: flex; gap: 10px;
}

.win__slider {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px 32px 22px;
  margin-bottom: 24px;
}
.win__slider input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--gold) var(--pct, 0%), var(--rule-strong) var(--pct, 0%));
  border-radius: 3px;
  outline: none;
}
.win__slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold), 0 6px 16px rgba(0,0,0,0.4);
  cursor: grab;
  margin-top: -1px;
}
.win__slider input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold);
  cursor: grab;
}
.win__ticks {
  display: flex; justify-content: space-between;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-muted);
}
.win__ticks span.is-on {
  color: var(--gold);
  font-weight: 700;
}
.win__ends {
  display: flex; justify-content: space-between;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.win__table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.win__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  transition: all .2s;
}
.win__row.is-active {
  background: color-mix(in oklab, var(--gold) 12%, var(--card));
  border-color: var(--gold);
}
.win__row-cond {
  font-family: var(--display);
  font-size: 22px;
}
.win__row-arrow { color: var(--fg-muted); }
.win__row-mult {
  font-family: var(--display);
  font-size: 20px;
  color: var(--gold);
}

/* PAYOUT */
.payout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.payout-card {
  position: relative;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 26px 24px 22px;
  color: var(--fg);
  transition: all .2s;
  cursor: pointer;
}
.payout-card:hover { border-color: var(--rule-strong); }
.payout-card.is-active {
  border-color: var(--gold);
  background: color-mix(in oklab, var(--gold) 8%, var(--card));
  box-shadow: 0 8px 32px -16px var(--gold);
}
.payout-card__rate {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 56px);
  color: var(--gold);
  line-height: 1;
  letter-spacing: 0.02em;
}
.payout-card__title {
  font-family: var(--serif);
  font-size: 18px;
  margin-top: 12px;
  letter-spacing: 0.06em;
}
.payout-card__sub {
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.payout-card__check {
  position: absolute; top: 22px; right: 22px;
  width: 22px; height: 22px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.payout-card__check span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background .2s;
}
.payout-card.is-active .payout-card__check { border-color: var(--gold); }
.payout-card.is-active .payout-card__check span { background: var(--gold); }
.payout-card__badge {
  position: absolute; top: -10px; left: 22px;
  background: var(--gold);
  color: #1a1428;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 4px;
}
.payout__note {
  margin-top: 16px;
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  line-height: 1.7;
}

/* RESULT */
.result {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 36px;
  margin: 32px 0 56px;
  position: relative;
  overflow: hidden;
}
.result::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 0%, color-mix(in oklab, var(--gold) 10%, transparent), transparent 60%);
  pointer-events: none;
}
.result__head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 28px;
  position: relative;
}
.result__head-num {
  font-family: var(--display);
  font-size: 52px;
  color: var(--gold);
  line-height: 1;
}
.result__head-en {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--fg-muted);
}
.result__head-jp {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.result__main {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 36px;
  position: relative;
}
.result__big {
  border-right: 1px solid var(--rule);
  padding-right: 36px;
}
.result__big-rate {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 4px;
}
.result__big-amount {
  font-family: var(--display);
  font-size: clamp(64px, 9vw, 130px);
  line-height: 1;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.result__big-sub {
  margin-top: 14px;
  font-size: 13px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}
.result__compare {
  display: flex; flex-direction: column; gap: 10px;
  align-self: center;
}
.compare-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.compare-row__label {
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.06em;
}
.compare-row__amt {
  font-family: var(--display);
  font-size: 20px;
}
.compare-row--best { border-color: var(--gold); }
.compare-row--best .compare-row__amt { color: var(--gold); }
.compare-row--diff {
  background: color-mix(in oklab, var(--gold) 12%, transparent);
  border-color: var(--gold);
}
.compare-row--diff .compare-row__amt em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  margin-left: 6px;
}

.result__breakdown {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  position: relative;
}
.item {
  padding: 0 16px;
  border-right: 1px solid var(--rule);
}
.item:last-child { border-right: none; }
.item:first-child { padding-left: 0; }
.item__k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.item__v {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
}

@media (max-width: 1000px) {
  .result__main { grid-template-columns: 1fr; }
  .result__big { border-right: none; border-bottom: 1px solid var(--rule); padding-right: 0; padding-bottom: 28px; }
  .result__breakdown { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .item { border: none; padding: 0; }
}

/* MACHINE */
.machine__search-wrap {
  display: flex; align-items: center;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0 18px;
  margin-bottom: 18px;
}
.machine__search-icon {
  font-size: 22px;
  color: var(--fg-muted);
  margin-right: 12px;
}
.machine__search {
  background: transparent; border: none; outline: none;
  flex: 1;
  padding: 16px 0;
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
}
.machine__count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.18em;
}
.machine__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-strong) transparent;
}
.machine__grid::-webkit-scrollbar { width: 6px; }
.machine__grid::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 3px; }
.machine__item {
  text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--fg);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: all .15s;
}
.machine__item-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.machine__item-img {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 6px; object-fit: cover;
  background: #0b1530; border: 1px solid var(--rule);
}
.machine__item:hover { border-color: var(--rule-strong); background: var(--card-2); }
.machine__item.is-active {
  background: color-mix(in oklab, var(--gold) 14%, var(--card));
  border-color: var(--gold);
}
.machine__item-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  border: 1px solid var(--rule-strong);
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.machine__item.is-active .machine__item-tag {
  border-color: var(--gold);
  color: var(--gold);
}

/* DOCK */
.dock {
  margin-top: 36px;
  background: var(--bg-2);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 18px 22px;
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
  position: sticky;
  bottom: 16px;
  backdrop-filter: blur(8px);
  z-index: 5;
}
.dock__left { flex: 1; min-width: 280px; }
.dock__machine {
  font-family: var(--serif);
  font-size: 16px;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.dock__line {
  display: flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}
.dock__line i { color: var(--fg-muted); font-style: normal; }
.dock__line strong {
  color: var(--gold);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.copy-preview {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 18px;
}
.copy-preview summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}
.copy-preview pre {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-dim);
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .buy { grid-template-columns: 1fr; }
  .buy__presets { grid-template-columns: repeat(5, 1fr); }
  .payout { grid-template-columns: 1fr; }
  .win__table { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   NOTE
   ============================================================ */
.note {
  padding: 0 var(--pad-x) var(--pad-y);
}
.note__inner {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px dashed var(--rule-strong);
  border-radius: 14px;
  padding: 22px 26px;
  background: var(--card);
}
.note__icon {
  font-family: var(--display);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1428;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--fg-dim);
}

/* ============================================================
   FINALE — full-bleed battle CTA before footer
   ============================================================ */
.finale {
  position: relative;
  min-height: 88vh;
  padding: var(--pad-y) var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-top: 1px solid var(--rule);
}
.finale__bg {
  position: absolute; inset: 0; z-index: 0;
}
.finale__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
}
.finale__bg-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 80%, var(--bg) 100%),
    linear-gradient(90deg, transparent 0%, transparent 60%, color-mix(in oklab, var(--bg) 75%, transparent) 100%);
}
.app[data-theme="ivory"] .finale__bg img { opacity: 0.7; }
.app[data-theme="ivory"] .finale__bg-fade {
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 80%, var(--bg) 100%),
    linear-gradient(90deg, transparent 0%, transparent 60%, color-mix(in oklab, var(--bg) 70%, transparent) 100%);
}
.finale__inner {
  position: relative; z-index: 2;
  max-width: 880px;
  margin-left: auto;   /* push to right side, away from cast crowd */
  margin-right: 0;
  text-align: left;
}
.finale__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold);
  border: 1px solid var(--rule-strong);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  margin-bottom: 32px;
}
.finale__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--gold) 30%, transparent);
}
.app[data-theme="ivory"] .finale__eyebrow { background: rgba(255,255,255,0.6); }
.finale__title {
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  line-height: 0.85;
}
.finale__title-en {
  font-family: var(--display);
  font-size: clamp(56px, 10vw, 156px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-shadow: 0 4px 0 rgba(0,0,0,0.4);
}
.finale__title-en--alt {
  color: var(--gold);
  font-style: italic;
}
.finale__copy {
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.85;
  color: var(--fg-dim);
  max-width: 560px;
  margin: 0 0 40px;
  text-wrap: pretty;
}
.finale__cta {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.finale__url {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gold);
  border-bottom: 1px dashed var(--gold);
  padding-bottom: 4px;
}

@media (max-width: 1100px) {
  .finale__inner { margin-left: 0; }
  .finale__bg-fade {
    background:
      linear-gradient(180deg, transparent 0%, var(--bg) 96%),
      radial-gradient(ellipse at 30% 50%, transparent 0%, var(--bg) 80%);
  }
}
.foot {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  padding: 36px var(--pad-x);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 18px;
}
.foot__brand { display: flex; align-items: center; gap: 14px; }
.foot__sigil {
  font-family: var(--display);
  color: var(--gold);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--rule);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 24px;
}
.foot__title {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.1em;
}
.foot__sub {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.foot__copy {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

/* ============================================================
   STICKY APPLY
   ============================================================ */
.sticky-apply {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 50;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold);
  color: #1a1428;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 14px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 28px -10px var(--gold), 0 2px 0 rgba(0,0,0,0.3);
  animation: pop-in .3s ease both;
}
@keyframes pop-in {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.sticky-apply__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1a1428;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 800px) {
  .navbar__links { display: none; }
  .section-label { grid-template-columns: auto 1fr; gap: 14px; }
  .section-label__sub { grid-column: 1 / -1; text-align: left; max-width: none; }
  .result { padding: 24px; }
  .result__breakdown { grid-template-columns: repeat(2, 1fr); }
  .dock { flex-direction: column; align-items: stretch; }
  .dock__copy { width: 100%; }
}
