:root { --bg:#0f1220; --card:#1a1f35; --card2:#222844; --line:#2a3152; --text:#e8eaf6; --muted:#9aa3c7; --accent:#ffb020; --ok:#2ecc71; --err:#ff5a5a; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, sans-serif; background:var(--bg); color:var(--text); line-height:1.5; display:flex; flex-direction:column; min-height:100vh; }
a { color:var(--accent); }
main { width:100%; max-width:1100px; margin:0 auto; padding:24px 16px; flex:1; }
button, input, select { font:inherit; border-radius:8px; border:1px solid var(--line); padding:8px 12px; }
input, select { background:#0b0e1a; color:var(--text); }
button { background:var(--card); color:var(--text); cursor:pointer; }
button.primary { background:var(--accent); color:#1a1200; border-color:var(--accent); font-weight:600; }
button.on { background:var(--ok); color:#04220f; border-color:var(--ok); }
button.link { background:none; border:0; padding:0; color:var(--accent); text-decoration:underline; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.muted { color:var(--muted); }
[hidden] { display:none !important; }

/* header + menu */
header.top { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--line); }
.logo img { margin-right:10px; }
.logo { display:flex; align-items:center; margin:0; font-size:1.35rem; font-weight:800; letter-spacing:-.02em; color:var(--text); text-decoration:none; white-space:nowrap; }
.logo span { color:var(--accent); }
#search { flex:1; min-width:180px; max-width:420px; }
nav.menu { display:flex; gap:6px; overflow-x:auto; padding:10px 16px; border-bottom:1px solid var(--line); background:#0c0f1c; }
nav.menu button { white-space:nowrap; border-radius:999px; }
nav.menu button[aria-pressed="true"] { background:var(--accent); color:#1a1200; border-color:var(--accent); }

/* game grid */
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; display:flex; flex-direction:column; }
.card .thumb { position:relative; font-size:56px; display:grid; place-items:center; aspect-ratio:5/3; padding:0; overflow:hidden; background:linear-gradient(135deg, var(--c1), var(--c2)); border:0; border-radius:0; cursor:pointer; }
.card .thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .25s; }
.card:hover .thumb img { transform:scale(1.05); }
.card .body { padding:14px; display:flex; flex-direction:column; gap:8px; flex:1; }
.card h3 { margin:0; font-size:1.1rem; } .card p { margin:0; flex:1; color:var(--muted); font-size:.95rem; }
.tag { align-self:flex-start; font-size:.75rem; padding:2px 8px; border-radius:999px; background:var(--card2); color:var(--muted); }
.box { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px; margin-bottom:24px; }
.box h2 { margin-top:0; }
.box form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.msg { min-height:1.2em; margin:8px 0 0; } .msg.err { color:var(--err); } .msg.ok { color:var(--ok); }
.hero { margin:0 0 20px; } .hero h1 { margin:0 0 4px; font-size:1.6rem; } .hero p { margin:0; color:var(--muted); }

/* player */
dialog { width:min(960px, 96vw); padding:0; border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--text); }
dialog::backdrop { background:#000b; }
dialog .bar { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; }
dialog iframe { display:block; width:100%; height:min(660px, 78vh); border:0; background:#000; }

/* text pages */
article.page { max-width:760px; }
article.page h1 { margin-top:0; }
article.page h2 { margin-top:28px; font-size:1.2rem; }
article.page li { margin:4px 0; }

/* footer */
footer.bottom { border-top:1px solid var(--line); padding:24px 16px; color:var(--muted); font-size:.9rem; }
footer.bottom .in { max-width:1100px; margin:0 auto; display:flex; flex-wrap:wrap; gap:12px 24px; justify-content:space-between; }
footer.bottom nav { display:flex; flex-wrap:wrap; gap:8px 18px; }
footer.bottom a, footer.bottom button.link { color:var(--muted); font-size:inherit; }

/* cookie banner */
#cookieBanner { position:fixed; left:16px; right:16px; bottom:16px; z-index:10; max-width:720px; margin:0 auto; background:var(--card2); border:1px solid var(--line); border-radius:14px; padding:16px; box-shadow:0 10px 40px #0008; }
#cookieBanner p { margin:0 0 12px; }
