/* How Many Games? — site styles. Display: Bricolage Grotesque 800, body: Rubik (both OFL, self-hosted). */
@font-face { font-family: "Bricolage"; src: url(/static/fonts/bricolage-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Rubik"; src: url(/static/fonts/rubik-var.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --bg: #0e0b1f;
  --bg2: #151130;
  --s1: #1b1639;
  --s2: #241d4a;
  --s3: #30285e;
  --line: #ffffff17;
  --line2: #ffffff2b;
  --text: #f5f2ff;
  --muted: #a9a2cf;
  --dim: #7c75a6;
  --sun: #ffd23f;
  --sun2: #ffe27a;
  --hot: #ff4d8d;
  --cyan: #3ee6e6;
  --lime: #a3ff5c;
  --violet: #8b5cf6;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 18px 50px -18px #000c, 0 2px 0 #ffffff08 inset;
  --display: "Bricolage", "Arial Black", Impact, system-ui, sans-serif;
  --body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1280px;
  --pad: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1200px 600px at 10% -10%, #3a1d7a55, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #0f4a6b44, transparent 60%),
    radial-gradient(800px 600px at 50% 120%, #ff4d8d14, transparent 60%);
  background-repeat: no-repeat;
}
a { color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.15em; height: 1.15em; flex: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.page-top { padding-top: 28px; }
.kicker { display: inline-block; font: 700 12px/1 var(--body); text-transform: uppercase; letter-spacing: .16em; color: var(--cyan); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sun); color: #000; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: #0e0b1fcc; backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--pad); display: flex; align-items: center; gap: 18px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.logo-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--sun), #ffb020); color: #1a0f00; font: 800 28px/1 var(--display); box-shadow: 0 6px 18px -6px #ffd23f99, inset 0 -3px 0 #0002; transform: rotate(-6deg); transition: transform .3s var(--ease); }
.logo:hover .logo-mark { transform: rotate(6deg) scale(1.05); }
.logo-text { display: flex; flex-direction: column; line-height: .95; }
.logo-text span { font: 700 11px/1 var(--body); text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }
.logo-text b { font: 800 22px/1 var(--display); letter-spacing: -.02em; }
.logo-text b::after { content: "?"; color: var(--sun); }
.logo.small .logo-mark { width: 34px; height: 34px; font-size: 23px; }
.logo.tiny .logo-mark { width: 28px; height: 28px; font-size: 19px; border-radius: 9px; }
.logo.tiny .logo-text b { font-size: 16px; }
.logo.tiny .logo-text span { font-size: 9px; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: #ffffff0d; }
.nav a[aria-current] { color: var(--text); background: #ffffff14; }
.hsearch { position: relative; margin-left: auto; flex: 0 1 300px; }
.hsearch .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.hsearch input { width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid var(--line2); background: #ffffff0a; color: var(--text); font: 500 15px var(--body); transition: border-color .15s, background .15s, box-shadow .15s; }
.hsearch input::placeholder { color: var(--dim); }
.hsearch input:focus { outline: none; border-color: var(--sun); background: #ffffff12; box-shadow: 0 0 0 4px #ffd23f26; }
.satoru-pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; text-decoration: none; color: var(--cyan); font-weight: 600; font-size: 14px; border: 1px solid #3ee6e655; background: #3ee6e60d; white-space: nowrap; transition: background .15s; }
.satoru-pill:hover { background: #3ee6e61f; }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; height: 46px; padding: 0 22px; border-radius: 14px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap; font: 700 16px/1 var(--body); letter-spacing: .01em; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn .i { width: 1.1em; height: 1.1em; }
.btn-play { background: linear-gradient(180deg, var(--sun2), var(--sun) 55%, #f5b800); color: #1a0f00; box-shadow: 0 10px 26px -10px #ffd23fcc, inset 0 -3px 0 #0000001f, inset 0 1px 0 #fff8; }
.btn-play:hover { box-shadow: 0 14px 34px -10px #ffd23fee, inset 0 -3px 0 #0000001f, inset 0 1px 0 #fff8; transform: translateY(-1px); }
.btn-ghost { background: #ffffff10; color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.btn-ghost:hover { background: #ffffff1c; }
.btn-cyan { background: var(--cyan); color: #00262a; box-shadow: 0 10px 26px -10px #3ee6e6aa, inset 0 -3px 0 #0000001a; }
.btn-cyan:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px #3ee6e6cc, inset 0 -3px 0 #0000001a; }
.btn-icon { width: 46px; padding: 0; background: #ffffff10; color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.btn-icon:hover { background: #ffffff1c; }
.btn-xs { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 17px; border-radius: 16px; }
.btn-xl { height: 62px; padding: 0 34px; font-size: 19px; border-radius: 18px; }

/* ---------- home intro + spotlight ---------- */
.intro { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; padding-top: 30px; padding-bottom: 20px; }
.intro-title { font-size: clamp(34px, 5.4vw, 64px); }
.intro-title span { color: var(--sun); display: inline-block; transform: rotate(8deg) translateY(-2px); margin-left: 2px; }
.intro-sub { margin: 0; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); }
.intro-sub b { color: var(--text); }

.spot { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 44px; }
.spot.multi { grid-template-columns: minmax(0, 1fr) 280px; }
.spot-stage { position: relative; aspect-ratio: 16 / 7.2; min-height: 360px; border-radius: 24px; overflow: hidden; background: var(--s1); box-shadow: var(--shadow); isolation: isolate; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
.slide.on { opacity: 1; visibility: visible; }
.slide-media { position: absolute; top: 0; bottom: 0; right: 0; left: 30%; }
.slide-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--s1) 0%, #1b163900 38%), linear-gradient(0deg, #1b1639cc 0%, #1b163900 35%); }
.slide-img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 7s linear; }
.slide.on .slide-img { transform: scale(1.0); }
.slide { background: radial-gradient(120% 140% at 0% 100%, #3a1d7a 0%, var(--s1) 55%); }
.slide-copy { position: absolute; z-index: 2; left: 0; top: 0; bottom: 0; width: 44%; min-width: 360px; display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 4vw, 52px); }
.slide-title { font-size: clamp(36px, 5.6vw, 72px); margin: 12px 0 12px; text-shadow: 0 4px 30px #0009; }
.slide-title a { color: var(--text); text-decoration: none; }
.slide-desc { margin: 0 0 22px; color: #e3defc; font-size: clamp(15px, 1.4vw, 18px); max-width: 46ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.spot-progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: #ffffff12; }
.spot-progress i { display: block; height: 100%; width: 0; background: var(--sun); }
.spot-progress.run i { animation: spotbar var(--spot-ms, 7000ms) linear forwards; }
@keyframes spotbar { to { width: 100%; } }
.spot:not(.multi) .spot-progress { display: none; }
.spot-thumbs { display: flex; flex-direction: column; gap: 10px; }
.spot-thumb { position: relative; display: flex; align-items: center; gap: 12px; flex: 1; min-height: 0; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--s1); cursor: pointer; text-align: left; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.spot-thumb:hover { background: var(--s2); }
.spot-thumb.on { border-color: #ffd23f88; background: var(--s2); box-shadow: inset 3px 0 0 var(--sun); }
.spot-thumb-img { width: 96px; height: 54px; object-fit: cover; border-radius: 10px; flex: none; background: var(--bg2); }
.spot-thumb span { font: 700 15px/1.2 var(--body); }

/* ---------- shelves, rails, grid ---------- */
.shelf { margin: 0 0 52px; }
.shelf-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.shelf-head h2 { font-size: clamp(24px, 3vw, 34px); display: flex; align-items: baseline; gap: 12px; }
.shelf-head h2 small { font: 500 15px var(--body); color: var(--dim); letter-spacing: 0; }
.more { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; }
.more:hover { color: var(--sun); }
.rail-nav { display: flex; gap: 8px; }
.more + .rail-nav { margin-left: 4px; }
.shelf-head h2 + .rail-nav { margin-left: auto; }
.rbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: #ffffff0a; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .15s, opacity .15s; }
.rbtn:hover { background: #ffffff1c; }
.rbtn:disabled { opacity: .3; cursor: default; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, calc((100% - 3 * 20px) / 4)); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); padding: 6px 2px 18px; margin: -6px -2px -18px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 20px; }

.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--s1); box-shadow: 0 10px 30px -14px #000c; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px #ffffff14; background: linear-gradient(0deg, #0e0b1f99, transparent 45%); opacity: .6; transition: opacity .3s; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; }
.card-play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: #1a0f00; box-shadow: 0 10px 30px #0008; opacity: 0; transform: scale(.7); transition: opacity .25s, transform .35s var(--ease); }
.card-play .i { width: 28px; height: 28px; margin-left: 3px; }
.card:hover .card-media { transform: translateY(-4px); box-shadow: 0 22px 40px -16px #000e, 0 0 0 2px #ffd23f66; }
.card:hover .card-img { transform: scale(1.06); }
.card:hover .card-media::after { opacity: .9; }
.card:hover .card-play { opacity: 1; transform: scale(1); }
.card-badges { position: absolute; z-index: 3; top: 10px; left: 10px; pointer-events: none; }
.card-body { padding: 14px 4px 0; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 21px; letter-spacing: -.01em; margin-bottom: 6px; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.card-desc { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--dim); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta i { font-style: normal; opacity: .5; }
.card-foot .btn { position: relative; z-index: 2; }

.noshot { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 30% 30%, var(--s3), var(--s1)); }
.noshot span { font: 800 64px var(--display); color: var(--sun); opacity: .9; }

.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font: 700 11px/1 var(--body); text-transform: uppercase; letter-spacing: .08em; padding: 6px 9px; border-radius: 8px; color: #10091f; box-shadow: 0 4px 12px -4px #0008; }
.b-new { background: var(--lime); }
.b-feat { background: var(--sun); }
.b-mp { background: var(--hot); color: #fff; }
.b-mob { background: var(--cyan); }

/* chips + sort */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: #ffffff0a; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; transition: all .15s; }
.chip:hover { color: var(--text); border-color: var(--line2); background: #ffffff12; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sort { margin-left: auto; display: inline-flex; padding: 4px; border-radius: 999px; background: #ffffff0a; border: 1px solid var(--line); }
.sort a { padding: 6px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.sort a:hover { color: var(--text); }
.sort a.on { background: #ffffff1a; color: var(--text); }
.empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--muted); }
.empty-big { font: 800 28px var(--display); color: var(--text); margin: 0 0 6px; }

/* ---------- Satoru CTA ---------- */
.satoru { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin: 12px 0 64px; padding: clamp(28px, 4vw, 48px); border-radius: 28px; background: linear-gradient(120deg, #2a1360 0%, #4b1d6e 40%, #0f4f63 100%); box-shadow: var(--shadow), inset 0 0 0 1px #ffffff1a; }
.satoru-copy { flex: 1 1 320px; position: relative; z-index: 1; }
.satoru h2 { font-size: clamp(30px, 4.4vw, 52px); margin: 10px 0 8px; }
.satoru h2 em { font-style: normal; color: var(--cyan); }
.satoru p { margin: 0; font-size: 18px; color: #e6defc; }
.satoru .btn { position: relative; z-index: 1; }
.satoru-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.satoru-art span { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.satoru-art span:nth-child(1) { width: 320px; height: 320px; right: -60px; top: -140px; background: radial-gradient(circle, #3ee6e6aa, transparent 65%); }
.satoru-art span:nth-child(2) { width: 260px; height: 260px; right: 22%; bottom: -170px; background: radial-gradient(circle, #ff4d8d88, transparent 65%); }
.satoru-art span:nth-child(3) { width: 180px; height: 180px; left: -60px; top: -60px; background: radial-gradient(circle, #ffd23f55, transparent 65%); }

/* ---------- game page ---------- */
.game { position: relative; isolation: isolate; }
.game-backdrop { position: absolute; z-index: -1; left: 0; right: 0; top: -80px; height: 760px; overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }
.game-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(48px) saturate(1.4); opacity: .38; transform: scale(1.15); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); padding: 22px 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumb-sep { width: 14px; height: 14px; opacity: .6; }
.game-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; margin-bottom: 56px; }
.game-hero { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--s1); box-shadow: 0 30px 70px -24px #000, inset 0 0 0 1px #ffffff1a; }
.game-hero-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .25s; }
.game-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, #0003, #0006); opacity: 0; transition: opacity .3s; }
.game-hero:hover::after { opacity: 1; }
.game-hero:hover .game-hero-img { transform: scale(1.03); }
.hero-play { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; height: 72px; padding: 0 30px 0 24px; border-radius: 999px; background: var(--sun); color: #1a0f00; font: 800 22px/1 var(--display); box-shadow: 0 16px 40px #0009; transition: transform .25s var(--ease); }
.hero-play .i { width: 30px; height: 30px; }
.game-hero:hover .hero-play { transform: translate(-50%, -50%) scale(1.06); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.shot { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; aspect-ratio: 16 / 9; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); opacity: .65; transition: opacity .2s, box-shadow .2s; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot:hover { opacity: 1; }
.shot.on { opacity: 1; box-shadow: 0 0 0 2px var(--sun); }
.game-info { position: sticky; top: 92px; }
.game-title { font-size: clamp(40px, 5vw, 66px); margin: 14px 0 6px; }
.game-by { margin: 0 0 14px; color: var(--muted); }
.game-by b { color: var(--text); font-weight: 600; }
.game-desc { font-size: 18px; color: #e3defc; margin: 0 0 26px; line-height: 1.55; }
.game-cta { display: flex; gap: 12px; }
.game-cta .btn-play { flex: 1; }
.game-cta .btn-icon { height: 62px; width: 62px; border-radius: 18px; }
.plays { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--muted); font-size: 15px; }
.plays .i { color: var(--sun); }
.plays b { color: var(--text); }
.note { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #3ee6e612; border: 1px solid #3ee6e633; color: #bff8f8; font-size: 14px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0 0; }
.facts div { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 12px 14px; border-radius: 14px; background: #ffffff08; border: 1px solid var(--line); }
.facts .i { grid-row: span 2; align-self: center; color: var(--dim); width: 22px; height: 22px; }
.facts dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.mobile-play { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: #07051099; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .2s; }
.lightbox img { max-width: min(1280px, 100%); max-height: 86vh; border-radius: 16px; box-shadow: 0 30px 80px #000; }
.lightbox button { position: absolute; top: 18px; right: 18px; }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; z-index: 95; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: 0 10px 30px #0008; animation: fade .2s; }

/* ---------- about / error ---------- */
.about { max-width: 760px; margin: 10px 0 48px; }
.about h1 { font-size: clamp(40px, 6vw, 72px); margin: 12px 0 20px; }
.about h1 em { font-style: normal; color: var(--sun); display: block; }
.about h2 { font-size: 26px; margin: 34px 0 8px; }
.about p { color: #ddd7f5; font-size: 17px; }
.about .lead { font-size: 20px; color: var(--text); }
.about-stats { display: flex; gap: 12px; margin: 28px 0 0; flex-wrap: wrap; }
.about-stats div { flex: 1 1 120px; padding: 18px; border-radius: 18px; background: #ffffff08; border: 1px solid var(--line); }
.about-stats b { display: block; font: 800 44px/1 var(--display); color: var(--sun); }
.about-stats span { color: var(--muted); font-weight: 600; }
.gameover { text-align: center; padding: 40px 0 56px; }
.go-code { margin: 0; font: 800 clamp(90px, 18vw, 200px)/.9 var(--display); background: linear-gradient(180deg, var(--sun), var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 12px 40px #ff4d8d55); }
.go-title { font-size: clamp(34px, 5vw, 56px); margin: 8px 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.go-msg { color: var(--muted); font-size: 18px; margin: 0 0 28px; }
.go-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: linear-gradient(#0b0918, #08060f); padding: 52px 0 28px; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px; }
.foot-brand p { color: var(--muted); margin: 14px 0 0; max-width: 30ch; }
.foot-links { display: flex; flex-direction: column; gap: 10px; }
.foot-links b { font: 700 12px var(--body); text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin-bottom: 4px; }
.foot-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.foot-links a:hover { color: var(--text); }
.foot-satoru p { color: var(--muted); margin: 8px 0 14px; }
.foot-legal { max-width: var(--wrap); margin: 40px auto 0; padding: 20px var(--pad) 0; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* ---------- play wrapper ---------- */
body.play { overflow: hidden; background: #000; height: 100%; }
.player { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000; }
.pbar { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 6px 12px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--bg); border-bottom: 1px solid var(--line); min-height: 52px; }
.pback { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); }
.pback:hover { color: var(--text); background: #ffffff12; }
.ptitle { flex: 1; min-width: 0; font: 800 17px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line2); }
.pbtn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line2); background: #ffffff0d; color: var(--text); font: 600 14px var(--body); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s; }
.pbtn:hover { background: #ffffff1f; }
.pexit:hover { background: var(--hot); border-color: var(--hot); }
.stage { position: relative; flex: 1; min-height: 0; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; display: block; }
.pcover { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; overflow: hidden; background: var(--bg); transition: opacity .5s var(--ease), visibility .5s; }
.pcover.done { opacity: 0; visibility: hidden; }
.pcover-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(30px) saturate(1.3); opacity: .5; }
.pcover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, #0e0b1f66, #0e0b1fee 70%); }
.pcover-in { position: relative; z-index: 1; text-align: center; padding: 24px; }
.pcover-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.pcover-title { font-size: clamp(36px, 7vw, 76px); margin: 10px 0 24px; text-shadow: 0 6px 30px #000a; }
.pload { width: min(280px, 70vw); height: 6px; margin: 0 auto; border-radius: 99px; background: #ffffff1a; overflow: hidden; }
.pload i { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sun), var(--hot)); animation: load 1.2s var(--ease) infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.pcover.ready .pload { display: none; }
.pstart[hidden] { display: none; }
.pcover-tip { margin: 22px 0 0; color: var(--muted); font-size: 14px; min-height: 1em; }
.poverlay { position: absolute; inset: 0; display: grid; place-items: center; background: #0e0b1ff2; text-align: center; padding: 24px; z-index: 4; }
.poverlay[hidden] { display: none; }
.poverlay p { font-size: 20px; margin: 0 0 14px; }
.poverlay .small { font-size: 14px; color: var(--muted); }
.poverlay .rot { width: 64px; height: 64px; color: var(--sun); margin: 0 auto 12px; animation: rot 2s var(--ease) infinite; }
@keyframes rot { 50% { transform: rotate(90deg); } }
.pfloat { position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #fff4; background: #0009; color: #fff; display: grid; place-items: center; cursor: pointer; opacity: .5; transition: opacity .2s; }
.pfloat:hover { opacity: 1; }
.pfloat[hidden] { display: none; }
.player.is-fs .pbar { display: none; }
.player.pseudo-fs { z-index: 10; height: 100dvh; }

/* ---------- admin ---------- */
.admin h1 { font-size: 40px; margin-bottom: 16px; }
.admin h1 small { font: 400 13px var(--body); color: var(--muted); }
.admin h2 { font-size: 22px; margin: 28px 0 10px; }
.admin table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; background: var(--s1); border-radius: 12px; overflow: hidden; }
.admin td, .admin th { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.admin img { border-radius: 6px; }
.admin pre { white-space: pre-wrap; margin: 0; font-size: 12px; }
.inline { display: inline; }
.abtn { font: 600 12px var(--body); background: var(--s3); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 5px 9px; cursor: pointer; text-decoration: none; display: inline-block; margin: 2px; }
.abtn.warn { background: #7a1f3d; }
.st { font-weight: 700; font-size: 12px; text-transform: uppercase; }
.st-published, .st-ok, .st-done { color: var(--lime); }
.st-warning, .st-queued, .st-running, .st-unpublished { color: var(--sun); }
.st-failed, .st-abandoned, .st-rejected { color: var(--hot); }
.ev-error td { color: #ff9cbf; }
.ev-warn td { color: #ffe08a; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .spot.multi { grid-template-columns: 1fr; }
  .spot-thumbs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .spot-thumb { flex: 0 0 240px; }
  .rail { grid-auto-columns: minmax(250px, calc((100% - 2 * 20px) / 3)); }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .game-top { grid-template-columns: 1fr; }
  .game-info { position: static; }
  .spot-stage { aspect-ratio: auto; min-height: 0; height: min(78vh, 560px); }
  .slide-media { left: 0; bottom: auto; height: 56%; }
  .slide-media::after { background: linear-gradient(0deg, var(--s1) 0%, #1b163900 55%); }
  .slide-copy { top: auto; width: auto; min-width: 0; justify-content: flex-end; padding-top: 0; }
}
@media (max-width: 640px) {
  .top-in { gap: 10px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .logo-text span { display: none; }
  .logo-text b { font-size: 20px; }
  .logo-mark { width: 34px; height: 34px; font-size: 23px; }
  .hsearch { order: 3; flex: 1 1 100%; }
  .hsearch input { height: 40px; }
  .satoru-pill { margin-left: auto; height: 36px; padding: 0 12px; font-size: 13px; }
  .intro { padding-top: 18px; padding-bottom: 14px; }
  .spot-stage { border-radius: 20px; height: min(72vh, 520px); }
  .slide-cta .btn { flex: 1; }
  .spot-thumb { flex: 0 0 200px; }
  .spot-thumb-img { width: 72px; height: 40px; }
  .rail { grid-auto-columns: 78%; gap: 14px; }
  .grid { grid-template-columns: 1fr; gap: 26px; }
  .card-play { opacity: 1; transform: scale(.8); width: 54px; height: 54px; margin: -27px 0 0 -27px; }
  .shelf-head .sort { margin-left: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding: 0 var(--pad); scrollbar-width: none; }
  .chip { flex: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .game-cta .btn-play { height: 58px; }
  .has-mobile-play .mobile-play { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; align-items: center; gap: 12px; padding: 10px var(--pad); padding-bottom: max(10px, env(safe-area-inset-bottom)); background: #0e0b1fee; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s var(--ease); }
  .has-mobile-play .mobile-play.show { transform: none; }
  .mobile-play span { flex: 1; min-width: 0; font: 800 17px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .foot-in { grid-template-columns: 1fr; gap: 26px; }
  .satoru { border-radius: 22px; }
  .satoru .btn { width: 100%; }
  .pbtn span, .pbar .logo { display: none; }
  .ptitle { border-left: 0; padding-left: 0; }
  .admin table { display: block; overflow-x: auto; }
}
@media (hover: none) {
  .card-play { opacity: 1; transform: scale(.8); }
  .card:hover .card-media { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
