:root {
  --blue: #2F7BFF; --blue-d: #1E5BD0; --orange: #FF8A1F; --orange-d: #D96A05; --green: #2BC46B; --green-d: #1E9A52;
  --ink: #18213A; --muted: #66708A; --bg: #F3F6FC; --card: #FFFFFF; --line: #E2E7F2; --red: #F0453A;
  --radius: 16px; --shadow: 0 4px 0 rgba(24, 33, 58, .08), 0 10px 30px rgba(24, 33, 58, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Fredoka', system-ui, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 600; font-size: 16px; cursor: pointer; background: #fff; color: var(--ink); box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 0 0 2px var(--line); transition: transform .08s, filter .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 0 0 2px var(--line); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: inset 0 -4px 0 var(--blue-d); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: inset 0 -4px 0 var(--orange-d); }
.btn-green { background: var(--green); color: #fff; box-shadow: inset 0 -4px 0 var(--green-d); }
.btn-danger { background: var(--red); color: #fff; box-shadow: inset 0 -4px 0 #b52a21; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:active { box-shadow: none; }
.btn-big { font-size: 20px; padding: 14px 28px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- nav ---------- */
#nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.logo-text b { color: var(--blue); font-weight: 700; }
.logo-mark { position: relative; width: 34px; height: 30px; }
.logo-mark i { position: absolute; height: 10px; border-radius: 3px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.logo-mark i::before, .logo-mark i::after { content: ''; position: absolute; top: -4px; width: 7px; height: 4px; border-radius: 2px 2px 0 0; background: inherit; }
.logo-mark i::before { left: 3px; } .logo-mark i::after { right: 3px; }
.logo-mark .b1 { width: 34px; bottom: 0; background: var(--blue); }
.logo-mark .b2 { width: 22px; bottom: 10px; left: 2px; background: var(--orange); }
.logo-mark .b3 { width: 14px; bottom: 20px; left: 6px; background: var(--green); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.nav-links a:hover { background: var(--bg); color: var(--ink); }
.nav-links a.active { background: #E8F0FF; color: var(--blue); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-user { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 8px 12px; border-radius: 10px; }
.nav-user:hover { background: var(--bg); }
.nav-user .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
@media (max-width: 720px) {
  .nav-inner { gap: 10px; flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; justify-content: space-around; }
  .logo { font-size: 20px; }
}

/* ---------- layout ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 24px 16px 60px; }
h1, h2, h3 { margin: 0; letter-spacing: -.3px; }
.muted { color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; }
.tabs { display: flex; gap: 6px; background: #fff; padding: 5px; border-radius: 14px; box-shadow: 0 0 0 2px var(--line); }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 10px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--blue); color: #fff; }
.search { border: 0; border-radius: 12px; padding: 10px 14px; background: #fff; box-shadow: 0 0 0 2px var(--line); min-width: 220px; outline: none; }
.search:focus { box-shadow: 0 0 0 2px var(--blue); }

/* ---------- hero ---------- */
.hero { position: relative; border-radius: 26px; overflow: hidden; min-height: 420px; display: flex; align-items: flex-end; background: #5fb4ff url('/img/hero.jpg') center/cover; box-shadow: var(--shadow); }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,20,50,.78) 0%, rgba(10,20,50,.45) 45%, rgba(10,20,50,0) 75%); }
.hero-text { position: relative; padding: 40px; max-width: 620px; color: #fff; }
.hero-text h1 { font-size: 56px; line-height: 1.02; text-shadow: 0 4px 0 rgba(0,0,0,.2); }
.hero-text p { font-size: 20px; opacity: .95; margin: 14px 0 24px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 22px; margin-top: 22px; font-weight: 600; opacity: .95; }
.hero-stats b { font-size: 22px; display: block; }
@media (max-width: 720px) { .hero { min-height: 360px; } .hero-text { padding: 24px; } .hero-text h1 { font-size: 38px; } .hero-text p { font-size: 17px; } }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .12s; display: block; }
.card:hover { transform: translateY(-4px); }
.card-thumb { position: relative; aspect-ratio: 16/9; background: #dfe8f7; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 85% 60%), hsl(calc(var(--h) + 40) 85% 50%)); }
.thumb-ph span { font-size: 64px; font-weight: 700; color: rgba(255,255,255,.9); text-shadow: 0 4px 0 rgba(0,0,0,.15); }
.badge-live, .badge-draft { position: absolute; top: 8px; left: 8px; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); color: #7dffb0; }
.badge-draft { color: #fff; background: var(--orange); left: auto; right: 8px; }
.card-body { padding: 12px 14px 14px; }
.card-title { font-weight: 600; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 14px; margin-top: 4px; }
.card-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- feature strip ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 40px; }
.feature { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature .ico { font-size: 34px; }
.feature h3 { margin: 8px 0 6px; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); }

/* ---------- forms ---------- */
.form-card { max-width: 420px; margin: 40px auto; background: #fff; padding: 30px; border-radius: 22px; box-shadow: var(--shadow); }
.form-card h1 { font-size: 30px; margin-bottom: 6px; }
.field { display: block; margin: 16px 0; }
.field span { display: block; font-weight: 600; margin-bottom: 6px; }
.input { width: 100%; border: 0; border-radius: 12px; padding: 12px 14px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); outline: none; }
.input:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.err { color: var(--red); min-height: 22px; font-weight: 500; }
.switch-link { color: var(--blue); font-weight: 600; cursor: pointer; }

/* ---------- game page ---------- */
.game-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; }
@media (max-width: 860px) { .game-top { grid-template-columns: 1fr; } }
.game-thumb { border-radius: 22px; overflow: hidden; aspect-ratio: 16/9; box-shadow: var(--shadow); background: #dfe8f7; }
.game-thumb img, .game-thumb .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.game-info { background: #fff; border-radius: 22px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.game-info h1 { font-size: 34px; line-height: 1.1; word-break: break-word; }
.game-by a { color: var(--blue); font-weight: 600; }
.play-big { font-size: 26px; padding: 16px; width: 100%; }
.game-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.game-stats div { background: var(--bg); border-radius: 12px; padding: 10px 6px; }
.game-stats b { display: block; font-size: 20px; }
.game-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.game-actions .btn { flex: 1; }
.liked { color: var(--red); }
.desc { white-space: pre-wrap; color: var(--ink); background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); margin-top: 24px; }
.embed-box { margin-top: 24px; background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.embed-box code { display: block; background: var(--bg); padding: 12px; border-radius: 10px; font-size: 13px; overflow-x: auto; white-space: nowrap; margin-top: 8px; }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; background: #fff; padding: 22px; border-radius: 22px; box-shadow: var(--shadow); }
.profile-avatar { width: 120px; height: 120px; border-radius: 18px; background: linear-gradient(#bfe3ff, #e9f6ff); overflow: hidden; flex: none; }
.profile-head h1 { font-size: 32px; }

/* ---------- avatar editor ---------- */
.avatar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
@media (max-width: 860px) { .avatar-layout { grid-template-columns: 1fr; } }
.avatar-stage { height: 560px; border-radius: 22px; overflow: hidden; background: linear-gradient(#bfe3ff, #f0f8ff); box-shadow: var(--shadow); }
@media (max-width: 860px) { .avatar-stage { height: 380px; } }
.avatar-panel { background: #fff; border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.avatar-panel h3 { margin: 14px 0 8px; font-size: 17px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 9px; border: 0; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.swatch.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; padding: 7px 12px; border-radius: 10px; background: var(--bg); cursor: pointer; font-weight: 600; text-transform: capitalize; }
.chip.on { background: var(--blue); color: #fff; }

/* ---------- page toast ---------- */
.page-toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; opacity: 0; transition: .25s; z-index: 1000; pointer-events: none; }
.page-toast.show { opacity: 1; transform: translate(-50%, 0); }
.page-toast.bad { background: var(--red); }

/* ---------- footer ---------- */
footer { text-align: center; color: var(--muted); padding: 30px 16px 40px; font-size: 14px; }

/* ---------- full-screen play ---------- */
.fullscreen { position: fixed; inset: 0; background: #000; }
.play-root { position: absolute; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.play-root canvas { display: block; }
.hud { position: absolute; inset: 0; pointer-events: none; font-family: 'Fredoka', system-ui, sans-serif; color: #fff; }
.hud > * { pointer-events: auto; }
.hud-tl { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; }
.hud-btn { border: 0; background: rgba(15,20,40,.6); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px); }
.hud-btn:hover { background: rgba(15,20,40,.8); }
.hud-stats { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; pointer-events: none; }
.hud-pill { background: rgba(15,20,40,.6); padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 18px; }
.hud-toast { position: absolute; top: 28%; left: 50%; transform: translate(-50%, 10px) scale(.95); font-size: 38px; font-weight: 700; text-shadow: 0 4px 0 rgba(0,0,0,.35); opacity: 0; transition: .2s; pointer-events: none; white-space: nowrap; }
.hud-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.hud-players { position: absolute; top: 12px; right: 12px; background: rgba(15,20,40,.55); border-radius: 12px; padding: 10px 14px; min-width: 150px; max-height: 40vh; overflow: auto; backdrop-filter: blur(6px); }
.players-title { font-weight: 700; margin-bottom: 4px; }
.player-row { font-size: 15px; opacity: .9; }
.player-row.me { color: #7dffb0; }
.hud-chat { position: absolute; left: 12px; bottom: 12px; width: min(360px, 60vw); }
.chat-log { max-height: 170px; overflow-y: auto; font-size: 15px; text-shadow: 0 1px 2px rgba(0,0,0,.8); margin-bottom: 6px; }
.chat-line { padding: 1px 0; word-break: break-word; }
.chat-line.sys { color: #ffe27d; font-style: italic; }
.chat-input { width: 100%; border: 0; border-radius: 10px; padding: 8px 12px; background: rgba(15,20,40,.55); color: #fff; outline: none; }
.chat-input::placeholder { color: rgba(255,255,255,.6); }
.hud-help { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(15,20,40,.55); padding: 7px 14px; border-radius: 999px; font-size: 14px; transition: opacity 1s; pointer-events: none; white-space: nowrap; }
.hud-help.fade { opacity: 0; }
.made-on { position: absolute; bottom: 12px; right: 12px; background: var(--blue); color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 10px; box-shadow: inset 0 -3px 0 var(--blue-d); }
.win-card { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; color: var(--ink); padding: 28px 34px; border-radius: 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); min-width: 300px; }
.win-card h2 { font-size: 32px; }
.win-card p { color: var(--muted); font-size: 18px; }
.win-card .btn { margin: 4px; }
.win-emoji { font-size: 60px; }
.joy-zone { position: absolute; left: 24px; bottom: 90px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.35); }
.joy-knob { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.75); }
.jump-btn { position: absolute; right: 30px; bottom: 100px; width: 86px; height: 86px; border-radius: 50%; border: 0; background: rgba(255,255,255,.3); color: #fff; font-size: 40px; }
@media (pointer: coarse) { .hud-chat { display: none; } .hud-help { display: none; } }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 600; background: linear-gradient(#2F7BFF, #1E5BD0); }

/* ---------- editor ---------- */
.editor-body { overflow: hidden; height: 100vh; }
#editor { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.ed-top { display: flex; align-items: center; gap: 14px; padding: 8px 12px; background: #fff; border-bottom: 2px solid var(--line); z-index: 5; }
.ed-top .logo { font-size: 20px; }
.ed-title { flex: 1; min-width: 80px; max-width: 360px; border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 17px; background: var(--bg); outline: none; }
.ed-title:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.ed-top-btns { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ed-top-btns .btn { padding: 8px 14px; font-size: 15px; }
.ed-main { flex: 1; display: flex; min-height: 0; }
.ed-tools { width: 84px; background: #fff; border-right: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; }
.ed-tool { border: 0; background: var(--bg); border-radius: 12px; padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ed-tool .ico { font-size: 24px; }
.ed-tool .lbl { font-size: 11px; font-weight: 600; color: var(--muted); }
.ed-tool.on { background: var(--blue); box-shadow: inset 0 -3px 0 var(--blue-d); }
.ed-tool.on .lbl { color: #fff; }
.ed-stage { flex: 1; position: relative; min-width: 0; }
.ed-stage canvas { display: block; }
.ed-side { width: 300px; background: #fff; border-left: 2px solid var(--line); overflow-y: auto; padding: 6px 14px 20px; }
.ed-sec { padding: 10px 0; border-bottom: 2px solid var(--bg); }
.ed-sec h4 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.ed-sec .chip { padding: 5px 10px; font-size: 14px; }
.ed-steps { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.ed-stepper { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ed-stepper span { color: var(--muted); font-weight: 600; }
.ed-stepper button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--bg); font-weight: 700; cursor: pointer; }
.ed-stepper b { min-width: 22px; text-align: center; }
.ed-side .swatch { width: 30px; height: 30px; }
.swatch.glass { background-image: linear-gradient(135deg, rgba(255,255,255,.8) 0 30%, transparent 30% 60%, rgba(255,255,255,.6) 60%) !important; }
.ed-behs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ed-beh { border: 0; background: var(--bg); border-radius: 10px; padding: 7px 8px; display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; font-size: 14px; text-align: left; }
.ed-beh.on { background: var(--orange); color: #fff; }
.ed-tip { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.ed-hint { display: flex; gap: 16px; align-items: center; padding: 6px 12px; background: #fff; border-top: 2px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.ed-count { font-weight: 700; color: var(--ink); }
.ed-modal-bg { position: fixed; inset: 0; background: rgba(15,20,40,.5); display: grid; place-items: center; z-index: 100; padding: 16px; }
.ed-modal { background: #fff; border-radius: 22px; padding: 26px; width: min(560px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.3); max-height: 90vh; overflow: auto; }
.ed-modal h2 { font-size: 28px; }
.ed-modal-btns { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.ed-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.ed-template { border: 0; background: var(--bg); border-radius: 16px; padding: 16px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: transform .1s; }
.ed-template:hover { transform: translateY(-3px); background: #E8F0FF; }
.ed-template .ico { font-size: 38px; }
.ed-template small { color: var(--muted); }
.ed-test { position: fixed; inset: 0; z-index: 200; background: #000; }
#editor.testing .ed-top, #editor.testing .ed-hint { visibility: hidden; }
@media (max-width: 900px) {
  .ed-side { position: absolute; right: 0; top: 0; bottom: 0; width: 230px; z-index: 4; }
  .ed-main { position: relative; }
  .ed-tools { width: 62px; }
  .ed-tool .lbl { display: none; }
  .ed-top .logo-text { display: none; }
  .ed-hint span:last-child { display: none; }
}

.av-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 2px solid var(--bg); }
.av-tab { border: 0; background: var(--bg); border-radius: 12px; padding: 9px 12px; font-weight: 600; cursor: pointer; flex: 1 1 auto; white-space: nowrap; }
.av-tab.on { background: var(--blue); color: #fff; box-shadow: inset 0 -3px 0 var(--blue-d); }
.av-body { min-height: 150px; padding-top: 6px; }
.av-body .swatch { width: 40px; height: 40px; }

.ed-modal.wide { width: min(860px, 100%); }
.ed-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ed-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.ed-game { background: var(--bg); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .1s; }
.ed-game:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--blue); }
.ed-game-thumb { position: relative; aspect-ratio: 16/9; background: #dfe8f7; display: grid; place-items: center; font-size: 34px; }
.ed-game-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-game-tag { position: absolute; top: 6px; right: 6px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--orange); color: #fff; }
.ed-game-tag.live { background: var(--green); }
.ed-game b { padding: 8px 10px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-game small { padding: 0 10px 10px; color: var(--muted); }
.ed-sel { position: absolute; top: 10px; left: 10px; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); width: 240px; z-index: 3; }
.ed-sel-row { display: flex; gap: 6px; margin: 4px 0; }
.ed-sel-row .chip, .ed-sel-row .btn { flex: 1; padding: 7px 8px; font-size: 14px; }
.ed-sel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.ed-sel-f { display: flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 8px; padding: 3px 6px; }
.ed-sel-f span { font-weight: 700; color: var(--muted); font-size: 13px; }
.ed-sel-f input { width: 100%; border: 0; background: none; outline: none; font-weight: 600; min-width: 0; }

.section-head h1.h2 { font-size: 26px; }

.players { background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.player { display: grid; grid-template-columns: 56px 64px 1fr auto; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 2px solid var(--bg); }
.player:last-child { border-bottom: 0; }
.player:hover { background: #f8faff; }
.p-rank { font-size: 22px; font-weight: 700; color: var(--muted); text-align: center; }
.p-rank.top { color: var(--orange); }
.p-av { width: 64px; height: 64px; border-radius: 14px; background: linear-gradient(#bfe3ff, #e9f6ff); overflow: hidden; }
.p-av img { width: 100%; height: 100%; }
.p-name { font-weight: 700; font-size: 18px; }
.p-meta { color: var(--muted); font-size: 14px; }
.p-age { text-align: right; font-weight: 700; }
.p-age small { display: block; color: var(--muted); font-weight: 500; }
@media (max-width: 600px) { .player { grid-template-columns: 36px 48px 1fr; } .p-av { width: 48px; height: 48px; } .p-age { display: none; } }

/* ---------- admin ---------- */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.adm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 860px) { .adm-cols { grid-template-columns: 1fr; } }
.adm-card { background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); overflow-x: auto; }
.adm-card h3 { margin-bottom: 10px; }
.adm-room { margin-bottom: 12px; }
.adm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--bg); }
.adm-chat { max-height: 420px; overflow-y: auto; }
.adm-sm { padding: 5px 10px; font-size: 13px; border-radius: 9px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.adm-table th { text-align: left; color: var(--muted); font-size: 13px; padding: 6px 8px; border-bottom: 2px solid var(--bg); }
.adm-table td { padding: 8px; border-bottom: 1px solid var(--bg); vertical-align: middle; }
.adm-table a:hover { color: var(--blue); }
.adm-thumb { width: 96px; height: 54px; border-radius: 8px; object-fit: cover; background: #dfe8f7; display: block; }
.adm-actions { white-space: nowrap; display: flex; gap: 4px; justify-content: flex-end; }
.adm-live, .adm-draft, .adm-ban { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--green); }
.adm-draft { background: var(--muted); }
.adm-ban { background: var(--red); margin-left: 6px; }
