:root {
  --ink: #0d0e12; --ink-2: #15171d; --ink-3: #1e2129; --line: #2c303b;
  --cream: #f6efe0; --muted: #a9a595;
  --gold: #f6b92b; --gold-2: #ffd978; --orange: #ff6a1f;
  --green: #3ddc84; --red: #ff5a52;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "DM Sans", "Segoe UI", Arial, sans-serif;
  --wrap: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold-2); }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); line-height: 1; margin: 0; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: clamp(3rem, 8.4vw, 6rem); font-weight: 800; text-transform: uppercase; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; text-transform: uppercase; max-width: 18ch; }
h3 { font-size: 1.6rem; font-weight: 700; }
p { margin: 0 0 1em; }
.gold { color: var(--gold); }
.eyebrow { font: 700 .78rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--orange); }
.fine { font-size: .9rem; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 700 1rem/1 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--cream); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(13,14,18,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); font: 800 1.45rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.brand em { font-style: normal; color: var(--gold); }
.brand-yen { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); font: 800 1.3rem/1 var(--display); }
nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a { color: var(--cream); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 10px 12px; border-radius: 999px; white-space: nowrap; }
nav a:hover { color: var(--gold); }
nav .nav-out { background: var(--gold); color: var(--ink); font-weight: 700; padding: 10px 16px; margin-left: 6px; }
nav .nav-out:hover { background: var(--gold-2); color: var(--ink); }

/* Hero */
.hero { position: relative; overflow: hidden; background:
  radial-gradient(900px 500px at 85% 10%, rgba(246,185,43,.16), transparent 60%),
  radial-gradient(700px 500px at 0% 100%, rgba(255,106,31,.10), transparent 60%), var(--ink); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding: 72px 0 64px; }
.lede { font-size: 1.15rem; color: #d9d2c0; max-width: 54ch; margin: 26px 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 40px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.facts dt { font: 800 2rem/1 var(--display); color: var(--gold); }
.facts dd { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }

.machine-hero { display: grid; place-items: center; }
.atm { width: min(360px, 100%); background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: 0 40px 80px rgba(0,0,0,.5), 0 0 0 6px rgba(246,185,43,.06); transform: rotate(2deg); }
.atm-label { font: 700 .75rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.atm-screen { margin: 16px 0; background: #07080a; border: 1px solid var(--line); border-radius: 14px; padding: 30px 12px; text-align: center; font: 800 3.4rem/1 var(--display); color: var(--green); text-shadow: 0 0 22px rgba(61,220,132,.45); font-variant-numeric: tabular-nums; transition: color .2s; }
.atm-screen.hot { color: var(--red); text-shadow: 0 0 22px rgba(255,90,82,.5); }
.atm-bar { height: 8px; border-radius: 99px; background: #07080a; overflow: hidden; }
.atm-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--orange)); transition: width .4s linear; }
.atm-stop { margin-top: 18px; background: var(--red); color: #fff; border-radius: 14px; text-align: center; padding: 16px; font: 800 2rem/1 var(--display); letter-spacing: .08em; box-shadow: 0 6px 0 #a8302a; }

.ticker { background: var(--gold); color: var(--ink); overflow: hidden; border-block: 1px solid #000; }
.ticker-track { display: flex; width: max-content; animation: tick 30s linear infinite; }
.ticker span { font: 800 1rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; padding: 14px 28px; white-space: nowrap; }
.ticker span::after { content: "¥"; margin-left: 56px; opacity: .55; }
@keyframes tick { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--ink-2); border-block: 1px solid var(--line); }
.section-lede { color: #d9d2c0; max-width: 62ch; margin: 18px 0 34px; font-size: 1.08rem; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.steps article { background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px; }
.steps .num { font: 800 2.6rem/1 var(--display); color: var(--gold); display: block; margin-bottom: 14px; }
.steps h3 { margin-bottom: 10px; text-transform: uppercase; }
.steps p { color: #cfc8b6; font-size: .97rem; margin: 0; }

.twist { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; margin-top: 56px; padding: 40px; border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(135deg, rgba(246,185,43,.08), transparent 55%), var(--ink-2); }
.twist h3 { font-size: 2.2rem; text-transform: uppercase; margin-bottom: 16px; }
.twist p { color: #d9d2c0; }
.twist .fine { color: var(--muted); margin: 0; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ladder li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-radius: 14px; background: var(--ink-3); border: 1px solid var(--line); }
.ladder span { color: #cfc8b6; font-size: .95rem; }
.ladder b { font: 800 1.7rem/1 var(--display); color: var(--cream); }
.ladder .top { background: var(--gold); border-color: var(--gold); }
.ladder .top span, .ladder .top b { color: var(--ink); }
.ladder .top b { font-size: 2.2rem; }
.ladder .base { background: transparent; border-style: dashed; }
.ladder .base b { color: var(--muted); }

/* Game */
.game { border: 1px solid var(--line); border-radius: 26px; background: var(--ink); overflow: hidden; }
.scoreboard { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.scoreboard div { padding: 16px 20px; border-right: 1px solid var(--line); }
.scoreboard div:last-child { border-right: 0; }
.scoreboard span { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.scoreboard b { font: 800 1.9rem/1.1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.stage { display: grid; grid-template-columns: 340px 1fr; }
.console { padding: 26px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.console-label { font: 700 .78rem/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.console-screen { background: #07080a; border: 1px solid var(--line); border-radius: 14px; padding: 26px 10px; text-align: center; font: 800 3rem/1 var(--display); color: var(--cream); font-variant-numeric: tabular-nums; }
.console-screen.running { color: var(--green); text-shadow: 0 0 22px rgba(61,220,132,.45); }
.console-screen.good { color: var(--gold); }
.console-screen.bad { color: var(--red); }
.console-msg { margin: 0; min-height: 4.8em; color: #d9d2c0; font-size: .97rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cards[hidden], .stop[hidden], .again[hidden] { display: none; }
.card { aspect-ratio: 5/7; border-radius: 12px; border: 2px solid var(--gold); background: linear-gradient(160deg, #2a2413, var(--ink-3)); color: var(--gold); font: 800 1.25rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: transform .15s, background .15s; }
.card:hover { transform: translateY(-4px) rotate(-2deg); background: var(--gold); color: var(--ink); }
.stop { min-height: 76px; border: 0; border-radius: 16px; background: var(--red); color: #fff; font: 800 2.4rem/1 var(--display); letter-spacing: .08em; cursor: pointer; box-shadow: 0 7px 0 #a8302a; transition: transform .06s, box-shadow .06s; }
.stop:active { transform: translateY(5px); box-shadow: 0 2px 0 #a8302a; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 20px; align-content: center; }
.m { position: relative; min-height: 84px; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-3); color: var(--cream); font-family: var(--body); cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; transition: border-color .15s, transform .15s, background .15s; }
.m:not(:disabled):hover { border-color: var(--gold); transform: translateY(-2px); }
.m:disabled { cursor: default; opacity: .6; }
.m-n { font: 700 .7rem/1 var(--body); color: var(--muted); letter-spacing: .1em; }
.m-name { font: 700 1.05rem/1.05 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.m-val { font: 800 .95rem/1 var(--display); color: var(--muted); min-height: 1em; font-variant-numeric: tabular-nums; }
.m.live { opacity: 1; border-color: var(--green); box-shadow: 0 0 0 3px rgba(61,220,132,.25); }
.m.used { opacity: 1; background: transparent; }
.m.won { border-color: var(--gold); } .m.won .m-val { color: var(--gold); }
.m.bust { border-color: var(--red); } .m.bust .m-val { color: var(--red); }
.m.used .m-name { color: var(--muted); }

/* Episodes */
.frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.frame iframe, .frame .facade, .frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.playlist { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: 26px; background: var(--ink-2); }
.playlist-side h3 { font-size: 2rem; text-transform: uppercase; margin-bottom: 12px; }
.playlist-side p { color: #d9d2c0; }
.playlist-side .btn { width: 100%; margin-top: 10px; }
.ep-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 28px; }
.ep { background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px; padding: 14px; }
.facade { padding: 0; cursor: pointer; background: #000; }
.facade img { object-fit: cover; transition: transform .3s, opacity .3s; opacity: .9; }
.facade:hover img { transform: scale(1.04); opacity: 1; }
.play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.play::after { content: ""; position: absolute; left: 29px; top: 22px; border: 14px solid transparent; border-left: 22px solid var(--ink); border-right: 0; }
.len { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.8); color: #fff; font: 700 .8rem/1 var(--body); padding: 6px 8px; border-radius: 6px; }
.ep-body { padding: 18px 8px 8px; }
.ep-meta { font: 700 .74rem/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.ep-body h3 { margin-bottom: 10px; line-height: 1.05; }
.ep-body p { color: #cfc8b6; font-size: .97rem; margin-bottom: 10px; }
.ep-body a { font-weight: 700; text-decoration: none; }

/* Guide */
.spoiler { margin-bottom: 22px; }
.spoiler[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--ink); margin-bottom: 18px; }
.guide { width: 100%; border-collapse: collapse; min-width: 560px; }
.guide th, .guide td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.guide tr:last-child td { border-bottom: 0; }
.guide th { font: 700 .74rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.guide td:nth-child(1), .guide td:nth-child(2) { font: 800 1.3rem/1 var(--display); color: var(--gold); }
.guide .tba td { color: var(--muted); }
.guide .tba td:nth-child(1), .guide .tba td:nth-child(2) { color: var(--muted); }
.won { font: 800 1.3rem/1 var(--display); color: var(--muted); letter-spacing: .1em; }
.won.shown { color: var(--green); letter-spacing: 0; }
.guide a { font-weight: 700; text-decoration: none; }

/* Origin */
.origin { display: grid; grid-template-columns: 1.3fr .9fr; gap: 56px; align-items: center; }
.origin h2 { margin-bottom: 22px; }
.origin p { color: #d9d2c0; max-width: 60ch; }
.origin-cta { background: var(--gold); color: var(--ink); border-radius: 26px; padding: 34px; }
.origin-cta h3 { font-size: 2.2rem; text-transform: uppercase; margin-bottom: 12px; }
.origin-cta p { color: #2a2413; }
.origin-cta .btn { width: 100%; margin-top: 10px; }
.origin-cta .btn-gold { background: var(--ink); color: var(--cream); }
.origin-cta .btn-gold:hover { background: #000; color: var(--gold-2); }
.origin-cta .btn-ghost { color: var(--ink); border-color: rgba(13,14,18,.4); }
.origin-cta .btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.site-foot { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .92rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 30px; }
.foot-row p { margin: 0; }
.foot-row strong { color: var(--cream); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--cream); text-decoration: none; }
.foot-links a:hover { color: var(--gold); }

@media (max-width: 980px) {
  .hero-grid, .twist, .playlist, .origin { grid-template-columns: 1fr; }
  .hero-grid { padding: 48px 0; gap: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stage { grid-template-columns: 1fr; }
  .console { border-right: 0; border-bottom: 1px solid var(--line); }
  .console-msg { min-height: 3.2em; }
  .card { aspect-ratio: 5/3; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .section { padding: 60px 0; }
  .brand-text { display: none; }
  nav a { padding: 10px 9px; font-size: .9rem; }
  .steps, .ep-grid { grid-template-columns: 1fr; }
  .twist { padding: 24px; }
  .scoreboard { grid-template-columns: repeat(2, 1fr); }
  .scoreboard div:nth-child(2) { border-right: 0; }
  .scoreboard div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .scoreboard b { font-size: 1.6rem; }
  .console { padding: 18px; }
  .grid { grid-template-columns: repeat(4, 1fr); padding: 12px; gap: 6px; }
  .m { min-height: 74px; padding: 8px 6px; }
  .m-name { font-size: .92rem; }
  .playlist { padding: 12px; }
  .origin-cta { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  * { transition: none !important; }
}
