/* Xons Play — site & game UI */
:root {
  --bg: #0b0f1e; --bg2: #121833; --card: #161d3b; --line: #263063; --text: #eef1ff; --muted: #9aa6d6;
  --pri: #6d5cff; --pri2: #00d4ff; --acc: #ff4d8d; --ok: #2ee59d; --warn: #ffb648; --bad: #ff5468;
  --r: 16px; --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: radial-gradient(1200px 600px at 80% -10%, #2a1f6b55, transparent), radial-gradient(900px 500px at -10% 10%, #00d4ff22, transparent), var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: #8fb4ff; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; color: #000; padding: 8px; z-index: 99; }
.grad { background: linear-gradient(90deg, var(--pri2), var(--pri), var(--acc)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 12px clamp(16px, 4vw, 48px); background: rgba(11, 15, 30, .82); backdrop-filter: blur(14px); border-bottom: 1px solid #ffffff10; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--pri2); }
.site-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { color: #c8d0f5; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .93rem; }
.site-nav a:hover, .site-nav a[aria-current] { background: #ffffff12; text-decoration: none; color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 2px; background: #fff; position: relative; margin: auto; transition: .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -7px; } .nav-toggle span::after { top: 7px; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #0e1430; padding: 10px; border-bottom: 1px solid var(--line); }
  .nav-open .site-nav { display: flex; }
}

/* buttons */
.btn { --b: #ffffff14; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #ffffff1f; background: var(--b); color: #fff; font: 700 .95rem var(--font); padding: 10px 18px; border-radius: 12px; cursor: pointer; transition: transform .12s, filter .2s, background .2s; text-decoration: none !important; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn.primary { background: linear-gradient(135deg, var(--pri), #8e5cff 60%, var(--pri2)); border-color: transparent; box-shadow: 0 8px 24px #6d5cff55; }
.btn.accent { background: linear-gradient(135deg, var(--acc), #ff7a59); border-color: transparent; box-shadow: 0 8px 24px #ff4d8d44; }
.btn.ghost { background: #ffffff0d; }
.btn.big { padding: 14px 22px; font-size: 1.03rem; border-radius: 14px; }
.btn.sm { padding: 6px 10px; font-size: .82rem; }
.btn.wide { width: 100%; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #ffffff12; font-size: .78rem; font-weight: 700; color: #cfd6ff; margin: 0 6px 6px 0; }

/* layout */
.section { padding: clamp(28px, 5vw, 56px) clamp(16px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.prose { max-width: 900px; }
.prose p, .prose li { color: #d5dbff; font-size: 1.04rem; }
.prose h2 { margin-top: 1.6em; }
.prose code { background: #ffffff14; padding: 2px 6px; border-radius: 6px; }
.lead { font-size: clamp(1.03rem, 1.6vw, 1.2rem); color: #c6cff6; }
.center { text-align: center; }
.crumbs { font-size: .85rem; color: var(--muted); }
.byline { color: var(--muted); font-size: .9rem; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: clamp(36px, 7vw, 90px) clamp(16px, 5vw, 64px); max-width: 1320px; margin: 0 auto; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.usp { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #c4ccf3; font-weight: 600; font-size: .93rem; }
.hero-art { position: relative; aspect-ratio: 1.15; }
.hero-art img { position: absolute; width: 72%; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid #ffffff22; object-fit: cover; aspect-ratio: 1.6; }
.hero-art img:nth-child(1) { left: 0; top: 4%; transform: rotate(-6deg); z-index: 2; }
.hero-art img:nth-child(2) { right: 0; top: 0; transform: rotate(5deg); }
.hero-art img:nth-child(3) { left: 16%; bottom: 0; transform: rotate(2deg); z-index: 3; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero-art { max-width: 520px; margin: 0 auto; width: 100%; } }

/* game cards */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.game-grid.small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.game-card { background: linear-gradient(180deg, #1a2248, #121835); border: 1px solid #ffffff14; border-radius: 20px; overflow: hidden; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column; }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 18px 50px #0008, 0 0 0 1px var(--c); text-decoration: none; }
.game-card .thumb { aspect-ratio: 1.6; overflow: hidden; background: #0d1226; }
.game-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.game-card:hover .thumb img { transform: scale(1.05); }
.gc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gc-body h3 { margin: 0; font-size: 1.2rem; }
.gc-body p { margin: 0 0 8px; color: var(--muted); font-size: .92rem; flex: 1; }
.play-now { color: var(--c); font-weight: 800; filter: brightness(1.4); }
.game-grid.small .gc-body p { display: none; }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.guide-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; color: var(--text); }
.guide-card:hover { border-color: var(--pri); text-decoration: none; }
.guide-card h3 { margin: 8px 0; font-size: 1.08rem; }
.guide-card p { color: var(--muted); margin: 0; font-size: .92rem; }
.tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--pri2); }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { color: #cdd5fb; margin: 10px 0 0; }
.rules dt { font-weight: 800; color: #fff; margin-top: 12px; }
.rules dd { margin: 4px 0 0; color: #cdd5fb; }
.cta-box { margin-top: 32px; padding: 20px; background: var(--card); border-radius: var(--r); border: 1px solid var(--line); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; }

/* game landing */
.game-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; padding: clamp(24px, 5vw, 64px) clamp(16px, 5vw, 64px); max-width: 1320px; margin: 0 auto; }
.gh-art img { border-radius: 22px; box-shadow: 0 30px 80px #0009, 0 0 0 1px #ffffff1a; width: 100%; aspect-ratio: 1.6; object-fit: cover; }
.mode-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 16px; }
.join-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.join-form input { width: 110px; text-transform: uppercase; letter-spacing: .15em; font-weight: 800; }
.meta-line { margin-top: 14px; }
@media (max-width: 860px) { .game-hero { grid-template-columns: 1fr; } .gh-art { order: -1; } .mode-buttons .btn { flex: 1 1 100%; } }

input, textarea { font: 600 1rem var(--font); background: #0d1330; color: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus { border-color: var(--pri); box-shadow: 0 0 0 3px #6d5cff33; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .9rem; color: #cfd6ff; margin-bottom: 14px; }
.contact-form { max-width: 560px; }
.hp { position: absolute; left: -9999px; }
.hint { color: var(--muted); font-size: .88rem; min-height: 1.2em; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1; background: #ffffff0d; border: 1px solid #ffffff1a; color: #dfe4ff; padding: 9px 10px; border-radius: 10px; font: 700 .9rem var(--font); cursor: pointer; }
.seg button.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.tabs { margin: 18px 0; }
.tabs button { flex: 0 0 auto; }
.lb { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; }
.lb th, .lb td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.lb th { background: #1d2550; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ads */
.ad-wrap { max-width: 1100px; margin: 10px auto; padding: 0 16px; min-height: 100px; }
.ad-label { display: block; font-size: .68rem; color: #6c77a8; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }

/* footer */
.site-footer { border-top: 1px solid #ffffff12; margin-top: 40px; padding: 40px clamp(16px, 5vw, 64px) 24px; background: #080b17; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; max-width: 1240px; margin: 0 auto; }
.foot-grid h4 { margin: 0 0 10px; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot-grid a:not(.brand) { display: block; color: #c4cdf5; padding: 3px 0; font-size: .93rem; }
.foot-grid p { color: var(--muted); font-size: .9rem; }
.copy { text-align: center; color: #6c77a8; font-size: .82rem; margin-top: 30px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

.cookie { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: auto; background: #151c3d; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cookie p { margin: 0; flex: 1 1 320px; font-size: .9rem; color: #cfd6ff; }
.cookie div { display: flex; gap: 8px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; background: #050814b3; backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(440px, 100%); background: linear-gradient(180deg, #1b2352, #121838); border: 1px solid #ffffff1f; border-radius: 22px; padding: 26px; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, 1.4, .4, 1); }
.modal-card h2 { margin: 0 0 18px; font-size: 1.35rem; }
.modal-x { position: absolute; right: 14px; top: 12px; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; opacity: .7; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }

/* ============ in-game shell ============ */
body.playing { overflow: hidden; }
.shell { position: fixed; inset: 0; z-index: 80; background: #070a14; color: #fff; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
.shell[hidden] { display: none; }
.stage { position: absolute; inset: 0; }
.stage canvas { display: block; outline: none; }
.hud-top { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.hud-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid #ffffff22; background: #0d1330cc; backdrop-filter: blur(10px); color: #fff; font-size: 1.05rem; cursor: pointer; display: grid; place-items: center; }
.hud-btn.sm { width: auto; height: 30px; padding: 0 10px; font: 700 .78rem var(--font); }
.hud-btn i { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); }
.room-chip { display: flex; align-items: center; gap: 8px; background: #0d1330cc; backdrop-filter: blur(10px); padding: 6px 6px 6px 12px; border-radius: 12px; border: 1px solid #ffffff22; font-size: .82rem; }
.room-chip b { letter-spacing: .14em; font-size: .95rem; }
.ping { font: 700 .75rem var(--font); padding: 4px 8px; border-radius: 8px; background: #0d1330cc; color: var(--muted); }
.ping.good { color: var(--ok); } .ping.ok { color: var(--warn); } .ping.bad { color: var(--bad); }
.players { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 54px); left: 10px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; max-width: 46vw; }
.pl { display: flex; align-items: center; gap: 8px; background: #0d1330b8; backdrop-filter: blur(10px); border: 1px solid #ffffff18; padding: 7px 12px; border-radius: 12px; font-size: .86rem; font-weight: 700; transition: .25s; }
.pl i { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #ffffff40; }
.pl .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .bd { margin-left: auto; padding-left: 8px; color: #cfd6ff; font-size: .78rem; white-space: nowrap; }
.pl.turn { border-color: var(--pri2); box-shadow: 0 0 0 1px var(--pri2), 0 0 24px #00d4ff55; transform: translateX(4px); }
.pl.off { opacity: .5; }
.status { position: absolute; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 58px); transform: translateX(-50%); background: #0d1330d9; backdrop-filter: blur(10px); border: 1px solid #ffffff22; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: .92rem; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.status.on { opacity: 1; }
.timer { position: absolute; left: 0; right: 0; top: 0; height: 4px; opacity: 0; transition: opacity .3s; }
.timer.on { opacity: 1; }
.timer i { display: block; height: 100%; background: linear-gradient(90deg, var(--pri2), var(--pri)); transform-origin: left; }
.timer.low i { background: var(--bad); }
.actions { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: max-content; max-width: 96vw; }
.actions .btn { backdrop-filter: blur(10px); min-width: 120px; }
.actions .btn.primary { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 8px 34px #6d5cffaa, 0 0 0 6px #6d5cff22; } }
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 92vw); background: linear-gradient(180deg, #1b2352f2, #121838f2); backdrop-filter: blur(16px); border: 1px solid #ffffff22; border-radius: 22px; padding: 24px; box-shadow: var(--shadow); text-align: center; animation: pop .3s cubic-bezier(.2, 1.4, .4, 1); }
.panel[hidden] { display: none; }
.panel h3 { margin: 0 0 6px; font-size: 1.4rem; }
.panel .btn { margin-top: 10px; }
.wait-list { list-style: none; padding: 0; margin: 14px 0; text-align: left; }
.wait-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #ffffff0a; border-radius: 12px; margin: 6px 0; font-weight: 700; }
.wait-list li i { width: 12px; height: 12px; border-radius: 50%; }
.wait-list li small { color: var(--pri2); font-size: .7rem; text-transform: uppercase; }
.wait-list li.empty { color: var(--muted); font-weight: 600; border: 1px dashed #ffffff22; background: none; }
.share { display: flex; gap: 6px; }
.share input { flex: 1; min-width: 0; font-size: .8rem; padding: 9px 10px; }
.share .btn { margin-top: 0; padding: 9px 12px; }
.trophy { font-size: 3.4rem; line-height: 1; animation: pop .5s; }
.chat { position: absolute; right: 10px; top: calc(max(10px, env(safe-area-inset-top)) + 54px); width: min(320px, 80vw); background: #0d1330e6; backdrop-filter: blur(12px); border: 1px solid #ffffff22; border-radius: 16px; padding: 10px; }
.chat[hidden] { display: none; }
.chat-log { height: 200px; overflow-y: auto; font-size: .86rem; padding: 2px 4px; user-select: text; }
.chat-log p { margin: 4px 0; word-wrap: break-word; }
.chat-log p.sys { color: var(--muted); font-style: italic; font-size: .8rem; }
.chat form { display: flex; gap: 6px; margin-top: 6px; }
.chat input { flex: 1; min-width: 0; padding: 8px 10px; font-size: .88rem; }
.chat .btn { padding: 8px 12px; }
.toast { position: absolute; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 70px); transform: translate(-50%, 20px); background: #000c; padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .92rem; opacity: 0; transition: .25s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.loader { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: #070a14; color: var(--muted); z-index: 5; }
.loader[hidden] { display: none; }
.spinner { width: 46px; height: 46px; border: 4px solid #ffffff22; border-top-color: var(--pri2); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.picker { position: absolute; inset: 0; display: grid; place-items: center; background: #0008; z-index: 6; }
.picker[hidden] { display: none; }
.picker .pk { background: #151c3d; border: 1px solid #ffffff22; border-radius: 20px; padding: 20px; text-align: center; animation: pop .25s; }
.picker .pk h4 { margin: 0 0 12px; }
.picker .colors { display: grid; grid-template-columns: repeat(2, 84px); gap: 10px; }
.picker .colors button { height: 84px; border-radius: 16px; border: 3px solid #ffffff55; cursor: pointer; font: 800 .9rem var(--font); color: #fff; text-shadow: 0 1px 3px #0008; }
.slider { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 64px); width: min(420px, 80vw); }
.slider input { width: 100%; accent-color: var(--pri2); }
.power { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 16px; height: 180px; border-radius: 10px; background: #ffffff18; overflow: hidden; border: 1px solid #ffffff33; opacity: 0; transition: opacity .2s; }
.power.on { opacity: 1; }
.power i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, var(--ok), var(--warn), var(--bad)); }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
@media (max-width: 600px) {
  .room-chip span { display: none; }
  .pl { padding: 5px 9px; font-size: .78rem; }
  .status { font-size: .82rem; top: auto; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 62px); }
  #ping { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

body.playing .cookie, body.playing .site-header { display: none; }
@media (max-width: 600px) {
  .cookie { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; gap: 8px; }
  .cookie p { font-size: .78rem; flex-basis: 100%; }
  .cookie div { width: 100%; } .cookie .btn { flex: 1; padding: 8px 10px; font-size: .85rem; }
}
.cookie[hidden] { display: none; }

/* ---------- icons & small UI ---------- */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.btn .ic { width: 1.2em; height: 1.2em; }
.usp li { display: inline-flex; align-items: center; gap: 8px; }
.usp .ic { color: var(--pri2); }
.play-now { display: inline-flex; align-items: center; gap: 6px; }
.hud-btn .ic { width: 20px; height: 20px; }
.trophy .ic { width: 64px; height: 64px; color: #ffd166; stroke-width: 1.6; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; box-shadow: 0 0 0 2px #ffffff40; }
.tag-bot { font-size: .62rem; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 6px; background: #ffffff1c; color: #b9c3f0; margin-left: 6px; }
.rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; background: #ffffff10; }
.rank.r1 { background: #ffd166; color: #3a2a00; } .rank.r2 { background: #cfd8e3; color: #222; } .rank.r3 { background: #e0a370; color: #2b1500; }
.touch-power { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; background: #0d1330cc; border: 1px solid #ffffff22; border-radius: 14px; padding: 12px 8px; backdrop-filter: blur(10px); }
.touch-power[hidden] { display: none; }
.touch-power label { font-size: .7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.touch-power input { writing-mode: vertical-lr; direction: rtl; width: 34px; height: 170px; accent-color: var(--acc); }
.room-chip .btn-label { display: inline; }

/* ---------- device adaptations ---------- */
.shell { height: 100vh; height: 100dvh; }
@media (max-width: 380px) {
  .room-chip { padding: 4px 4px 4px 8px; } .room-chip b { font-size: .8rem; letter-spacing: .08em; }
  .hud-btn { width: 38px; height: 38px; } .hud-right { gap: 5px; }
  .actions .btn { min-width: 100px; padding: 10px 14px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .hud-top { top: 6px; } .hud-btn { width: 36px; height: 36px; border-radius: 10px; }
  .players { top: 48px; gap: 4px; max-width: 30vw; } .pl { padding: 4px 8px; font-size: .74rem; }
  .status { top: 50px; font-size: .78rem; padding: 6px 12px; bottom: auto; }
  .actions { bottom: 8px; } .actions .btn.big { padding: 9px 16px; font-size: .9rem; }
  .panel { max-height: 92vh; overflow: auto; padding: 16px; } .chat-log { height: 110px; }
  .toast { bottom: 60px; } .slider { bottom: 56px; } .touch-power input { height: 120px; }
  .modal-card { max-height: 94vh; overflow: auto; padding: 18px; }
}
@media (min-width: 1600px) { .section, .hero, .game-hero { max-width: 1440px; } body { font-size: 17px; } }
@media (hover: none) { .game-card:hover { transform: none; } }
.btn, .hud-btn, .seg button { min-height: 44px; touch-action: manipulation; }
.hud-btn.sm { min-height: 30px; }

/* ---------- nav dropdowns ---------- */
.site-nav { align-items: center; }
.nav-drop { position: relative; }
.nav-drop summary { list-style: none; cursor: pointer; color: #c8d0f5; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .93rem; display: flex; align-items: center; gap: 6px; }
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nav-drop summary:hover, .nav-drop[open] summary { background: #ffffff12; color: #fff; }
.nav-drop > div { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; background: #121838; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 40; }
.nav-drop > div a { padding: 9px 12px; }
@media (max-width: 960px) {
  .nav-drop > div { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 12px; }
  .site-nav { align-items: stretch; max-height: calc(100vh - 70px); overflow: auto; }
}

/* ---------- guides ---------- */
.chips { margin-bottom: 20px; } .chips button { flex: 0 0 auto; }
.guide-card { display: flex; flex-direction: column; gap: 6px; }
.guide-card[hidden] { display: none; }
.guide-card .meta { margin-top: auto; padding-top: 8px; color: #8f9bcf; font-size: .82rem; display: inline-flex; align-items: center; gap: 6px; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin: 24px 0; }
.toc h2 { margin: 0 0 8px; font-size: 1.05rem; }
.toc ol { margin: 0; padding-left: 20px; } .toc li { margin: 4px 0; font-size: .96rem; }
.article h2 { scroll-margin-top: 80px; }
.article blockquote { border-left: 4px solid var(--pri); margin: 18px 0; padding: 6px 16px; color: #cdd5fb; background: #ffffff08; border-radius: 0 10px 10px 0; }
.article p, .article li { line-height: 1.75; }
.cta-box span { font-weight: 700; }
.center { text-align: center; } .center .btn { margin-top: 18px; }

/* ---------- single-player HUD ---------- */
.score-box { display: flex; gap: 6px; background: #0d1330cc; backdrop-filter: blur(10px); border: 1px solid #ffffff22; border-radius: 14px; padding: 6px 12px; }
.score-box > div { display: flex; flex-direction: column; align-items: center; min-width: 58px; line-height: 1.1; }
.score-box small { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.score-box b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.powerups { position: absolute; left: 10px; top: calc(max(10px, env(safe-area-inset-top)) + 62px); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.pu { display: flex; align-items: center; gap: 8px; background: #0d1330cc; border: 1px solid #ffffff22; border-radius: 12px; padding: 6px 10px; font-weight: 700; font-size: .82rem; }
.pu i { display: block; width: 60px; height: 5px; border-radius: 4px; background: #ffffff22; overflow: hidden; }
.pu i::after { content: ""; display: block; height: 100%; width: var(--p, 100%); background: var(--pri2); }
.solo .panel h3 { font-size: 1.6rem; }
.solo .panel .big-score { font-size: 3rem; font-weight: 900; line-height: 1; margin: 6px 0; }
.solo .panel .stats { display: flex; justify-content: center; gap: 22px; margin: 10px 0 6px; color: var(--muted); }
.solo .panel .stats b { display: block; color: #fff; font-size: 1.2rem; }
.solo .panel .keys { color: var(--muted); font-size: .88rem; text-align: left; margin: 12px auto 4px; max-width: 320px; }
.solo .panel .keys div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #ffffff10; }
.solo .panel .keys kbd { font: 700 .78rem var(--font); background: #ffffff14; padding: 2px 7px; border-radius: 6px; color: #fff; }
.new-best { color: #ffd166; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
@media (orientation: landscape) and (max-height: 520px) { .score-box b { font-size: 1rem; } .score-box > div { min-width: 48px; } .powerups { top: 52px; } }
@media (max-width: 400px) { .score-box > div { min-width: 46px; } .score-box { padding: 5px 8px; } }
