/* =========================================================
   Casual game portal - playful dark "game lobby" theme
   ========================================================= */
:root {
  --bg: #130e2c;
  --bg-2: #1a1340;
  --surface: #211a4b;
  --surface-2: #2d2462;
  --surface-3: #3a2f78;
  --deep: #0c0822;
  --ink: #ffffff;
  --text: #e9e5ff;
  --muted: #a99fd6;
  --yellow: #ffc93c;
  --yellow-d: #cf9100;
  --pink: #ff4f9a;
  --cyan: #3dd6ff;
  --green: #59e08b;
  --purple: #a98bff;
  --orange: #ff8a4c;
  --radius: 22px;
  --radius-sm: 14px;
  --header-h: 70px;
  --drop: 0 6px 0 rgba(0, 0, 0, .28);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; font-weight: 600;
  color: var(--text); background-color: var(--bg); overflow-x: hidden;
  background-image:
    radial-gradient(900px 520px at -5% -10%, rgba(255, 79, 154, .22), transparent 60%),
    radial-gradient(900px 600px at 105% 0%, rgba(61, 214, 255, .16), transparent 60%),
    radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.6px);
  background-size: auto, auto, 24px 24px;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.8vw, 1.65rem); }
h3 { font-size: 1.15rem; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: #cfc7f5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: #2b1a00; padding: 8px 14px; border-radius: 10px; z-index: 300; font-weight: 800; }
.skip:focus { left: 8px; }
.section { padding-top: 28px; padding-bottom: 28px; }
body.no-scroll { overflow: hidden; }
.grad { background: linear-gradient(90deg, var(--yellow), var(--pink) 60%, var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(19, 14, 44, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo:hover { text-decoration: none; }
.logo img { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover img { transform: rotate(-12deg) scale(1.08); }
.logo__text { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--ink); letter-spacing: -.01em; }
.logo__text b { color: var(--yellow); font-weight: 700; margin-left: .18em; }
.hsearch { position: relative; display: flex; align-items: center; flex: 1 1 auto; max-width: 420px; }
.hsearch svg { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.hsearch input { width: 100%; height: 46px; border-radius: 999px; border: 2px solid transparent; background: var(--surface-2); color: var(--ink); padding: 0 18px 0 44px; font: inherit; font-weight: 700; outline: none; transition: border-color .15s, background .15s; }
.hsearch input::placeholder { color: var(--muted); }
.hsearch input:focus { border-color: var(--cyan); background: var(--surface); }
.hsearch--drawer { display: none; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 800; padding: 9px 13px; border-radius: 14px; white-space: nowrap; transition: background .15s, transform .15s; }
.nav-link svg { color: var(--c, var(--yellow)); }
.nav-link:hover { background: var(--surface-2); text-decoration: none; transform: translateY(-1px); }
.nav-drop { position: relative; }
.nav-drop > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop__chev { color: var(--muted) !important; transition: transform .2s; }
.nav-drop[open] > summary { background: var(--surface-2); }
.nav-drop[open] .nav-drop__chev { transform: rotate(180deg); }
.nav-drop__menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 120; min-width: 360px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--surface-3); box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.nav-drop__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; color: var(--text); font-weight: 800; }
.nav-drop__item:hover { background: var(--surface-2); text-decoration: none; }
.nav-drop__icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--c); color: rgba(20, 10, 50, .85); box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.nav-toggle { display: none; margin-left: auto; background: var(--surface-2); border: 0; width: 46px; height: 46px; padding: 12px 11px; cursor: pointer; border-radius: 14px; flex: none; }
.nav-toggle span { display: block; height: 3px; background: var(--ink); margin: 4px 0; border-radius: 3px; transition: transform .2s, opacity .2s; }
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; background: var(--bg-2); border-bottom: 1px solid var(--surface-3); padding: 12px 16px 18px; box-shadow: 0 20px 40px rgba(0, 0, 0, .45); display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .nav-open .site-nav { display: flex; }
  .nav-link { padding: 12px 14px; font-size: 1.05rem; }
  .nav-drop > summary { display: flex; }
  .nav-drop__menu { position: static; min-width: 0; margin: 4px 0 6px; box-shadow: none; background: var(--surface); }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 640px) {
  .hsearch--bar { display: none; }
  .hsearch--drawer { display: flex; max-width: none; margin-bottom: 8px; }
  .logo__text { font-size: 1.3rem; }
}

/* ===== Buttons / pills ===== */
.btn { --btn-shadow: rgba(0, 0, 0, .35); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px; border-radius: 16px; font-family: var(--display); font-weight: 600; font-size: 1.1rem; border: 0; cursor: pointer; box-shadow: 0 5px 0 var(--btn-shadow); transition: transform .1s, box-shadow .1s, filter .15s; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--btn-shadow); }
.btn--primary { background: var(--yellow); color: #2b1a00; --btn-shadow: var(--yellow-d); }
.btn--ghost { background: var(--surface-2); color: var(--ink); --btn-shadow: var(--deep); }
.pill { --c: var(--purple); display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); white-space: nowrap; }
a.pill:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 28%, transparent); }
.pill--muted { --c: var(--muted); }
.flag { display: inline-block; font-family: var(--display); font-weight: 700; font-size: .72rem; letter-spacing: .05em; line-height: 1; padding: 5px 8px 4px; border-radius: 8px; color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.flag--hot { background: var(--pink); }
.flag--new { background: var(--green); color: #07301a; }
.icon-btn { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--deep); transition: transform .1s, box-shadow .1s, background .15s; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--deep); }

/* ===== Home: welcome + hero ===== */
.welcome { padding: 28px 16px 18px; }
.welcome h1 { margin-bottom: .2em; }
.welcome .lead { margin: 0; }
.hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.hero-main { position: relative; overflow: hidden; display: flex; align-items: center; gap: 28px; padding: 28px; min-height: 290px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #fff 0%), #5b35e8 75%); box-shadow: var(--drop); isolation: isolate; }
.hero-main::before, .hero-main::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); z-index: -1; }
.hero-main::before { width: 340px; height: 340px; right: -90px; top: -140px; }
.hero-main::after { width: 200px; height: 200px; right: 160px; bottom: -120px; background: rgba(255, 255, 255, .08); }
.hero-main:hover { text-decoration: none; }
.hero-main__art { flex: none; width: 230px; border-radius: 26px; overflow: hidden; transform: rotate(-4deg); box-shadow: 0 10px 0 rgba(0, 0, 0, .25), 0 20px 40px rgba(0, 0, 0, .3); border: 4px solid rgba(255, 255, 255, .9); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.hero-main__art img { width: 100%; height: auto; }
.hero-main:hover .hero-main__art { transform: rotate(0) scale(1.04); }
.hero-main__text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.hero-main__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.05; text-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.hero-main__desc { font-size: 1.05rem; color: rgba(255, 255, 255, .92); max-width: 420px; }
.hero-main .btn { margin-top: 6px; }
.hero-side { display: grid; gap: 18px; grid-auto-rows: 1fr; }
.hero-tile { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--drop); border: 2px solid transparent; transition: transform .2s, border-color .2s; }
.hero-tile:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--c); }
.hero-tile img { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; flex: none; }
.hero-tile__text { display: flex; flex-direction: column; min-width: 0; }
.hero-tile__text strong { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--ink); }
.hero-tile__text small { color: var(--c); font-weight: 800; }
.hero-tile__go { margin-top: 6px; font-weight: 800; font-size: .85rem; color: var(--yellow); }
.hero-tile__go::after { content: " \2192"; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero-main { padding: 20px; gap: 16px; min-height: 0; }
  .hero-main__art { width: 120px; border-width: 3px; border-radius: 18px; }
  .hero-main__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .95rem; }
  .hero-main .btn { min-height: 44px; padding: 0 18px; font-size: 1rem; }
  .hero-side { grid-template-columns: 1fr; gap: 12px; }
  .hero-tile img { width: 72px; height: 72px; }
}

/* ===== Category filter chips ===== */
.cat-chips { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 18px; padding: 4px 16px 8px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 8px 0 6px; border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 800; font-size: .92rem; border: 2px solid transparent; box-shadow: 0 3px 0 rgba(0, 0, 0, .28); transition: transform .15s, border-color .15s, background .15s; }
.cat-chip:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.cat-chip__icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: rgba(20, 10, 50, .85); flex: none; }
.cat-chip__n { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: .75rem; background: var(--surface-2); color: var(--muted); }
.cat-chip.is-active { background: var(--c); color: #1a1033; border-color: transparent; }
.cat-chip.is-active .cat-chip__icon { background: rgba(255, 255, 255, .45); }
.cat-chip.is-active .cat-chip__n { background: rgba(0, 0, 0, .15); color: #1a1033; }

/* ===== Row heading ===== */
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.row-h { display: flex; align-items: center; gap: 12px; margin: 0; }
.row-h__icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: rgba(20, 10, 50, .85); box-shadow: 0 3px 0 rgba(0, 0, 0, .3); flex: none; }
.count { font-family: var(--font); font-size: .85rem; font-weight: 800; color: var(--muted); background: var(--surface-2); padding: 2px 10px; border-radius: 999px; }
.center-cta { text-align: center; margin: 28px 0 8px; }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }

/* ===== Game cards ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
@media (max-width: 440px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.card { --c: var(--cyan); display: block; padding: 8px; border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--drop); transition: transform .22s cubic-bezier(.3, 1.5, .5, 1), box-shadow .2s; }
.card:hover { text-decoration: none; transform: translateY(-5px) rotate(-1deg); box-shadow: 0 0 0 3px var(--c), 0 16px 30px rgba(0, 0, 0, .45); }
.card[hidden] { display: none; }
.card__thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card__thumb img { transform: scale(1.08); }
.card__flags { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.card__ratio { position: absolute; right: 8px; bottom: 8px; font-size: .68rem; font-weight: 900; padding: 2px 7px; border-radius: 7px; background: rgba(8, 5, 25, .65); color: #fff; }
.card__play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(12, 8, 34, .35); opacity: 0; transition: opacity .2s; }
.card__play > span { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #2b1a00; box-shadow: 0 4px 0 var(--yellow-d); transform: scale(.6); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.card:hover .card__play { opacity: 1; }
.card:hover .card__play > span { transform: scale(1); }
.card__body { padding: 10px 6px 4px; }
.card__title { font-size: 1.05rem; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__cat { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 800; color: var(--c); }

/* ===== Features ===== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-bottom: 20px; }
.feature { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--drop); }
.feature__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--c); color: rgba(20, 10, 50, .85); margin-bottom: 14px; box-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.feature p { margin: 0; color: var(--muted); }

/* ===== Panels / prose ===== */
.panel { background: var(--surface); border-radius: 26px; padding: 26px 30px; box-shadow: var(--drop); }
@media (max-width: 600px) { .panel { padding: 20px 18px; border-radius: 20px; } }
.prose { max-width: none; }
.prose > :first-child { margin-top: 0; }
.prose h2 { display: flex; align-items: center; gap: 10px; margin-top: 1.5em; }
.prose h2::before { content: ""; flex: none; width: 8px; height: 26px; border-radius: 4px; background: linear-gradient(var(--yellow), var(--pink)); }
.prose p, .prose li { color: var(--text); font-weight: 600; }
.prose ul { padding-left: 1.3em; }
.prose ul li::marker { color: var(--yellow); }
.prose li { margin: .35em 0; }
.prose ol { list-style: none; counter-reset: step; padding: 0; }
.prose ol li { counter-increment: step; position: relative; padding-left: 44px; margin: 12px 0; min-height: 30px; }
.prose ol li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--cyan); color: #062033; font-family: var(--display); font-weight: 700; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.page { margin: 24px 0 8px; }
.page-head { display: flex; align-items: center; gap: 20px; padding: 6px 0 24px; max-width: 900px; }
.page-head h1 { margin-bottom: .2em; }
.page-head .lead { margin: 0; }
.page-head__icon { flex: none; width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; background: var(--c); color: rgba(20, 10, 50, .85); box-shadow: 0 6px 0 rgba(0, 0, 0, .3); }
@media (max-width: 600px) { .page-head { align-items: flex-start; gap: 14px; } .page-head__icon { width: 60px; height: 60px; border-radius: 20px; } .page-head__icon svg { width: 30px; height: 30px; } }
.page-404 { padding: 40px 16px; }
.page-404 .grid { margin: 24px 0; }

/* ===== Breadcrumb ===== */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; font-weight: 700; color: var(--muted); padding: 16px 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

/* ===== Game page ===== */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1100px) { .game-layout { grid-template-columns: minmax(0, 1fr) 300px; } .game-side { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; } }
.game-main > .panel { margin-top: 8px; }
.controls { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.controls th, .controls td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--surface-3); vertical-align: top; }
.controls th { background: var(--surface-3); font-size: .85rem; color: var(--ink); }
.controls tr:last-child td { border-bottom: 0; }
.controls td:first-child { font-weight: 800; color: var(--yellow); white-space: nowrap; }
.faq details { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 18px; margin: 10px 0; }
.faq summary { font-weight: 800; cursor: pointer; color: var(--ink); }
.faq details[open] summary { color: var(--yellow); }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.info { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; background: var(--surface-2); padding: 16px 20px; border-radius: var(--radius-sm); }
.info dt { font-weight: 800; color: var(--muted); }
.info dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.tag { font-size: .82rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag::before { content: "#"; color: var(--pink); margin-right: 1px; }
.side-box { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--drop); margin-bottom: 18px; }
.side-h { font-size: 1.15rem; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mini { display: flex; align-items: center; gap: 12px; padding: 7px; border-radius: 14px; color: var(--text); transition: background .15s; }
.mini:hover { background: var(--surface-2); text-decoration: none; }
.mini img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex: none; }
.mini span { display: flex; flex-direction: column; line-height: 1.3; }
.mini strong { font-family: var(--display); font-weight: 600; color: var(--ink); }
.mini small { color: var(--muted); font-weight: 700; }

/* ===== Player ===== */
.player { --avail-h: calc(100vh - var(--header-h) - 130px); }
@supports (height: 100svh) { .player { --avail-h: calc(100svh - var(--header-h) - 130px); } }
.stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; border-radius: 26px; border: 3px solid transparent; background: linear-gradient(var(--deep), var(--deep)) padding-box, linear-gradient(135deg, var(--pink), var(--purple) 50%, var(--cyan)) border-box; box-shadow: 0 8px 0 rgba(0, 0, 0, .3), 0 0 60px rgba(169, 139, 255, .18); }
.frame { position: relative; background: #000; border-radius: 16px; overflow: hidden; max-width: 100%; }
.player--landscape .frame { width: min(100%, calc(var(--avail-h) * 16 / 9)); aspect-ratio: 16 / 9; min-width: min(100%, 320px); }
.player--portrait .frame { width: min(100%, calc(var(--avail-h) * 9 / 16), 480px); aspect-ratio: 9 / 16; min-width: min(100%, 260px); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.play-cover { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; cursor: pointer; background-color: #000; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: #fff; }
.play-cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(19, 14, 44, .35), rgba(12, 8, 34, .8)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.play-cover__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; text-align: center; }
.play-btn { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #2b1a00; box-shadow: 0 7px 0 var(--yellow-d), 0 0 0 10px rgba(255, 201, 60, .18); animation: pulse 1.6s ease-in-out infinite; }
.play-btn svg { margin-left: 5px; }
.play-cover:hover .play-btn { animation-duration: .8s; }
.play-cover__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 4vw, 2.2rem); text-shadow: 0 3px 0 rgba(0, 0, 0, .35); margin-top: 8px; }
.play-cover__hint { font-weight: 800; color: rgba(255, 255, 255, .75); font-size: .95rem; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .play-btn { animation: none; } }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 2px 6px; }
.player-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-width: 0; }
.player-title h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 6px 0 0; }
.player-actions { display: flex; gap: 10px; flex: none; }
.fs-exit { display: none; position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); z-index: 5; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.rotate-hint { display: none; position: absolute; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 4; align-items: center; gap: 8px; background: rgba(0, 0, 0, .72); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: .9rem; pointer-events: none; white-space: nowrap; animation: hint-fade 5s forwards; }
@keyframes hint-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 640px) {
  .stage { margin: 0 -16px; border-radius: 0; padding: 0; border-width: 0; background: var(--deep); box-shadow: none; }
  .frame { border-radius: 0; }
  .play-btn { width: 76px; height: 76px; }
  .play-btn svg { width: 32px; height: 32px; }
  .player-bar { flex-wrap: wrap; }
}

/* Fullscreen (native, or CSS fallback for iPhone) */
.stage.is-fs { position: fixed; inset: 0; z-index: 1000; margin: 0; padding: 0; border: 0; border-radius: 0; background: #000; box-shadow: none; width: 100vw; height: 100vh; height: 100dvh; }
.stage.is-fs .frame { border-radius: 0; min-width: 0; }
.player--landscape .stage.is-fs .frame { width: min(100vw, calc(100vh * 16 / 9)); width: min(100vw, calc(100dvh * 16 / 9)); }
.player--portrait .stage.is-fs .frame { width: min(100vw, calc(100vh * 9 / 16)); width: min(100vw, calc(100dvh * 9 / 16)); }
.stage.is-fs .fs-exit { display: flex; align-items: center; justify-content: center; }
@media (orientation: portrait) and (pointer: coarse) { .player--landscape .stage.is-fs .rotate-hint { display: flex; } }

/* ===== Ads ===== */
.ad { margin: 24px auto; text-align: center; min-height: 90px; overflow: hidden; }
.ad__label { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad--gameSidebar { margin-top: 0; min-height: 250px; }
.ad--placeholder { display: none; }
.show-ad-placeholders .ad--placeholder { display: flex; align-items: center; justify-content: center; margin: 24px auto; border: 2px dashed var(--surface-3); border-radius: var(--radius-sm); color: var(--muted); font-size: .85rem; font-weight: 700; min-height: 100px; }
.show-ad-placeholders .ad--placeholder::after { content: "Ad slot: " attr(data-slot) " (local preview only)"; }
.show-ad-placeholders .ad--gameSidebar.ad--placeholder { min-height: 250px; margin-top: 0; }
@media (max-width: 1099px) { .ad--gameSidebar { display: none !important; } }

/* ===== Footer ===== */
.site-footer { position: relative; margin-top: 56px; background: var(--deep); padding: 44px 0 26px; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--yellow), var(--pink), var(--purple), var(--cyan), var(--green)); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid p { margin: 12px 0 0; max-width: 360px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-h { font-size: 1.05rem; margin-bottom: 10px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-links a { color: var(--muted); font-weight: 700; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); color: var(--muted); font-size: .85rem; }
