:root {
  --green: #004E42; --green-2: #0A6656; --green-soft: #E3EEEA; --yellow: #F6B700; --yellow-soft: #FFF1C9;
  --cream: #F7F3EA; --cream-2: #EFE8D8; --paper: #FFFDF8; --ink: #161A16; --muted: #5D645E; --line: #E4DCC9;
  --brown: #865F47; --red: #B3261E; --red-soft: #FBE9E7; --ok: #1F7A4D; --ok-soft: #E2F3EA;
  --sec: var(--green);
  --radius: 16px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(22,26,22,.06), 0 6px 24px rgba(22,26,22,.06);
  --serif: 'Noto Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--green); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: clamp(22px, 3.6vw, 28px); }
h3 { font-size: 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; } .mb { margin-bottom: 16px; }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--green); color: #fff; }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--cream); display: grid; place-items: center; overflow: hidden; }
.brand-mark img { width: 34px; }
.brand b { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .01em; }
.brand > div > span { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: rgba(255,255,255,.82); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav a.on { background: var(--yellow); color: var(--ink); }
.userchip { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 96px; }
.tabbar { display: none; }
@media (max-width: 820px) {
  .nav, .userchip .uname { display: none; }
  .userchip { margin-left: auto; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--paper); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); text-decoration: none; padding: 4px 0; font-weight: 500; }
  .tabbar a svg { font-size: 22px; }
  .tabbar a.on { color: var(--green); }
  .tabbar a.on svg { color: var(--green); }
  .main { padding-bottom: calc(var(--nav-h) + 40px); }
}

/* ---------- elements ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.pad-lg { padding: 28px; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .12s ease, box-shadow .12s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(22,26,22,.06), 0 12px 32px rgba(22,26,22,.1); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .g4.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 600; cursor: pointer;
  background: var(--green); color: #fff; text-decoration: none; font-size: 15px; line-height: 1.2; transition: filter .12s, transform .05s; min-height: 44px; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn.light { background: var(--cream-2); color: var(--ink); }
.btn.danger { background: var(--red); }
.btn.sm { padding: 7px 14px; font-size: 14px; min-height: 36px; }
.btn.block { width: 100%; }
.iconbtn { border: 0; background: transparent; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--muted); display: inline-grid; place-items: center; }
.iconbtn:hover { background: var(--cream-2); color: var(--ink); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--cream-2); color: var(--ink); white-space: nowrap; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.yellow { background: var(--yellow-soft); color: #7A5A00; }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.dark { background: var(--green); color: #fff; }

.bar { height: 8px; background: var(--cream-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--sec); border-radius: 99px; transition: width .4s ease; }
.bar.thin { height: 5px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: 11px 13px; outline: none; min-height: 44px; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }

.alert { border-radius: var(--radius-sm); padding: 12px 14px; background: var(--red-soft); color: var(--red); font-size: 14.5px; }
.alert.info { background: var(--yellow-soft); color: #5E4500; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 14px; background: var(--cream); border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--cream); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--cream-2); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 100; font-size: 14.5px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.err { background: var(--red); }

/* ---------- page header ---------- */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green); }
.hero { background: var(--sec); color: #fff; border-radius: 22px; padding: 28px; position: relative; overflow: hidden; }
.hero h1, .hero h2 { color: #fff; }
.hero .muted { color: rgba(255,255,255,.78); }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; background: url('/logo-noodles.svg') no-repeat center/contain; opacity: .14; pointer-events: none; }
.hero .bar { background: rgba(255,255,255,.2); }
.hero .bar > i { background: var(--yellow); }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .8; }

/* ---------- ring ---------- */
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring b { position: absolute; font-size: 18px; font-weight: 700; }
.ring.lg b { font-size: 30px; font-family: var(--serif); }

/* ---------- section tiles ---------- */
.tile { border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.tile-top { background: var(--sec); color: #fff; padding: 18px 20px 16px; position: relative; }
.tile-top h3 { color: #fff; margin: 0; font-size: 24px; }
.tile-top p { margin: 2px 0 0; font-size: 14px; opacity: .85; }
.tile-ico { position: absolute; right: 16px; top: 16px; font-size: 28px; opacity: .85; }
.tile-body { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

/* ---------- lesson list ---------- */
.lessons { display: flex; flex-direction: column; gap: 10px; }
.lesson { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.lesson:hover { border-color: var(--sec); }
.lesson-num { width: 40px; height: 40px; border-radius: 12px; background: var(--cream-2); display: grid; place-items: center; font-weight: 700; flex: none; color: var(--ink); }
.lesson.done .lesson-num { background: var(--ok); color: #fff; }
.lesson.progress .lesson-num { background: var(--yellow); }
.lesson h4 { margin: 0; font-size: 16.5px; font-weight: 600; font-family: var(--sans); }
.lesson p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.lesson .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.exam { border: 2px dashed var(--sec); background: var(--paper); border-radius: var(--radius); padding: 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.exam.open { border-style: solid; background: var(--yellow-soft); border-color: var(--yellow); }
.exam.passed { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.exam-ico { width: 54px; height: 54px; border-radius: 16px; background: var(--sec); color: #fff; display: grid; place-items: center; font-size: 26px; flex: none; }

/* ---------- material ---------- */
.mat-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.md { font-size: 16.5px; line-height: 1.65; }
.md > *:first-child { margin-top: 0; }
.md h2 { margin: 1.6em 0 .5em; font-size: 24px; color: var(--sec); }
.md h3 { margin: 1.3em 0 .4em; font-size: 19px; font-family: var(--sans); font-weight: 700; }
.md p { margin: 0 0 .9em; }
.md ul, .md ol { padding-left: 1.3em; margin: 0 0 1em; }
.md li { margin: .25em 0; }
.md li::marker { color: var(--sec); }
.md strong { font-weight: 700; }
.md code { background: var(--yellow); color: var(--ink); font-family: var(--sans); font-size: .72em; font-weight: 700; padding: 3px 9px; border-radius: 99px; vertical-align: middle; letter-spacing: .02em; white-space: nowrap; }
.md blockquote { margin: 1em 0 1.3em; padding: 14px 18px; background: var(--green-soft); border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; }
.md blockquote p { margin: .2em 0; font-style: italic; }
.md blockquote strong { font-style: normal; color: var(--green); }
.md table { width: 100%; border-collapse: collapse; margin: .6em 0 1.4em; font-size: 15px; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); display: block; overflow-x: auto; }
.md table thead { background: var(--sec); color: #fff; }
.md th { text-align: left; padding: 10px 12px; font-weight: 600; font-size: 13.5px; }
.md td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.md tbody tr:nth-child(even) td { background: var(--cream); }
.md input[type=checkbox] { accent-color: var(--green); width: 17px; height: 17px; margin-right: 8px; vertical-align: -3px; }
.md ul:has(input[type=checkbox]) { list-style: none; padding-left: 0; }
.md a { word-break: break-word; }

.videos { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
@media (max-width: 720px) { .videos { grid-template-columns: minmax(0,1fr); } }
.video { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.video-play { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; border: 0; background: rgba(0,0,0,.25); width: 100%; }
.video-play span { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-size: 26px; color: var(--ink); }
.video-title { padding: 12px 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.icard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.icard-img { aspect-ratio: 4/3; background: var(--cream-2); overflow: hidden; }
.icard-img img { width: 100%; height: 100%; object-fit: cover; }
.icard-img.contain img { object-fit: contain; padding: 12px; background: #fff; }
.icard-noimg { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--sec), color-mix(in srgb, var(--sec) 70%, #000)); display: grid; place-items: center; color: rgba(255,255,255,.9); font-family: var(--serif); font-size: 24px; text-align: center; padding: 16px; }
.icard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.icard-title { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.icard-title h4 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.15; }
.icard-text { font-size: 14.5px; color: var(--ink); margin: 0; }
.icard dl { margin: 4px 0 0; display: grid; gap: 8px; }
.icard dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--sec); font-weight: 700; }
.icard dd { margin: 0; font-size: 14px; white-space: pre-line; }
.icard-note { font-size: 13.5px; background: var(--yellow-soft); border-radius: 10px; padding: 9px 11px; color: #5E4500; }
.icard-more { margin-top: auto; align-self: flex-start; }
.cards-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cards-tools .input { max-width: 300px; }

.sticky-done { position: sticky; bottom: 12px; z-index: 20; margin-top: 28px; }
@media (max-width: 820px) { .sticky-done { bottom: calc(var(--nav-h) + 12px); } }
.done-box { background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.done-box .bar { background: rgba(255,255,255,.18); flex: 1; min-width: 120px; }
.done-box .bar > i { background: var(--yellow); }
.done-box .check input { accent-color: var(--yellow); }
.done-box.ok { background: var(--green); }

/* ---------- quiz ---------- */
.quiz-wrap { max-width: 760px; margin: 0 auto; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.qtext { font-family: var(--serif); font-size: clamp(22px, 3.6vw, 28px); line-height: 1.25; margin: 18px 0 20px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 15px 16px; border: 2px solid var(--line); background: var(--paper); border-radius: 14px; cursor: pointer; text-align: left; font-size: 16px; width: 100%; transition: border-color .1s, background .1s; }
.opt:hover { border-color: var(--green-2); }
.opt .key { width: 30px; height: 30px; border-radius: 9px; background: var(--cream-2); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.opt.sel { border-color: var(--green); background: var(--green-soft); }
.opt.sel .key { background: var(--green); color: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .key { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt.wrong .key { background: var(--red); color: #fff; }
.opt[disabled] { cursor: default; }
.result-hero { text-align: center; padding: 36px 20px; border-radius: 22px; color: #fff; background: var(--green); }
.result-hero.fail { background: var(--brown); }
.result-hero h1 { color: #fff; }
.review { display: flex; flex-direction: column; gap: 12px; }
.review-item { border-left: 4px solid var(--ok); }
.review-item.bad { border-left-color: var(--red); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--green); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { color: #fff; font-size: clamp(34px, 4vw, 54px); max-width: 520px; }
.login-art .pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.login-art .pill-row span { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.login-logo { background: var(--cream); border-radius: 16px; padding: 14px 18px; width: 220px; }
.login-form { display: grid; place-items: center; padding: 32px 20px; }
.login-form .card { width: 100%; max-width: 400px; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-art { padding: 28px 20px; gap: 24px; } .login-art h1 { font-size: 30px; } .login-logo { width: 170px; } }

/* ---------- admin ---------- */
.subnav { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 20px; padding-bottom: 4px; }
.subnav a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.subnav a.on { background: var(--green); color: #fff; border-color: var(--green); }
.kpi { padding: 18px 20px; }
.kpi b { display: block; font-family: var(--serif); font-size: 32px; line-height: 1.1; color: var(--green); }
.kpi span { font-size: 13.5px; color: var(--muted); }
.secbars { display: flex; gap: 4px; min-width: 150px; }
.secbars > div { flex: 1; }
.secbars .bar { height: 6px; }
.secbars small { display: block; font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--line); }
.dot.on { background: var(--ok); }
.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.tl:last-child { border-bottom: 0; }
.tl time { color: var(--muted); font-size: 13px; min-width: 110px; }
.qedit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 16px; }
.qedit .opt-row { display: flex; gap: 8px; align-items: center; }
.qedit .opt-row .input { min-height: 40px; padding: 8px 11px; }
.correct-toggle { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; flex: none; color: var(--muted); }
.correct-toggle.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.modal-bg { position: fixed; inset: 0; background: rgba(22,26,22,.5); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--paper); border-radius: 20px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; }
.modal.wide { max-width: 860px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.preview-box { border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; background: #fff; max-height: 640px; overflow: auto; }
.statbar { display: flex; align-items: center; gap: 10px; }
.statbar .bar { flex: 1; }
.icard-title { flex-wrap: wrap; }
.icard-title .chip { white-space: normal; text-align: right; max-width: 100%; }
.md table { display: table; }
@media (max-width: 720px) { .md table { display: block; } }

/* ---------- quiz na żywo ---------- */
.live-host { min-height: 100vh; background: radial-gradient(circle at 80% 0%, #0A6656 0, var(--green) 45%, #00332B 100%); color: #fff; display: flex; flex-direction: column; }
.live-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.1); }
.live-title { font-family: var(--serif); font-size: 20px; }
.live-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 24px; gap: 14px; }
.live-h1 { color: #fff; font-size: clamp(32px, 4.5vw, 64px); margin: 0; }
.live-sub { font-size: clamp(16px, 1.8vw, 24px); opacity: .85; margin: 0; }
.live-code { display: flex; gap: 10px; margin: 10px 0; }
.live-code span { width: clamp(52px, 7vw, 100px); height: clamp(68px, 9vw, 130px); background: #fff; color: var(--green); border-radius: 18px; display: grid; place-items: center; font: 700 clamp(40px, 6vw, 84px)/1 var(--sans); box-shadow: 0 8px 0 rgba(0,0,0,.2); }
.live-players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 1000px; min-height: 48px; }
.live-chip { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 18px; animation: pop .3s ease; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.live-start { font-size: 22px; padding: 16px 34px; margin-top: 10px; }
.live-q { flex: 1; display: flex; flex-direction: column; padding: 28px clamp(16px, 4vw, 56px); gap: 20px; }
.live-qrow { display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.live-qtext { color: #fff; font-size: clamp(26px, 3.6vw, 52px); margin: 0; line-height: 1.15; }
.live-img { max-height: 30vh; border-radius: 16px; align-self: center; }
.live-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: auto; }
.live-opt { border-radius: 18px; padding: clamp(16px, 2.2vw, 30px); font-size: clamp(18px, 2.2vw, 32px); font-weight: 700; display: flex; align-items: center; gap: 16px; box-shadow: 0 6px 0 rgba(0,0,0,.25); position: relative; overflow: hidden; }
.live-opt .k { width: 1.7em; height: 1.7em; border-radius: 10px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; font-size: .8em; }
.live-opts.small .live-opt { font-size: clamp(15px, 1.6vw, 22px); padding: 14px 18px; }
.live-opt.dim { opacity: .35; }
.live-opt.ok { outline: 4px solid #fff; }
.live-opt .cnt { position: relative; min-width: 90px; text-align: right; font-size: .9em; }
.live-opt .cnt i { position: absolute; right: 36px; top: 50%; height: 10px; transform: translateY(-50%); background: rgba(255,255,255,.6); border-radius: 9px; max-width: 120px; }
.live-foot { text-align: center; font-size: 20px; opacity: .85; }
.live-reveal { flex: 1; display: flex; gap: 28px; padding: 28px clamp(16px, 4vw, 56px); align-items: flex-start; }
.live-reveal .live-opts { margin-top: 20px; }
.live-side { width: min(420px, 38%); background: rgba(0,0,0,.18); border-radius: 22px; padding: 20px; }
@media (max-width: 900px) { .live-reveal { flex-direction: column; } .live-side { width: 100%; } .live-opts { grid-template-columns: 1fr; } }
.live-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.live-rank li { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.live-rank.dark li { background: rgba(255,255,255,.1); border-color: transparent; color: #fff; font-size: 18px; }
.live-rank li.me { background: var(--yellow-soft); }
.live-rank .pl { width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 14px; }
.live-rank .nm { flex: 1; font-weight: 600; }
.live-rank .dl { color: #3FBF7F; font-weight: 700; font-size: .9em; }
.live-rank.dark .dl { color: #9BE7B8; }
.podium { display: flex; align-items: flex-end; gap: 14px; margin: 20px 0; }
.pod { width: clamp(110px, 16vw, 200px); text-align: center; }
.pod-name { font-weight: 700; font-size: clamp(16px, 1.8vw, 24px); }
.pod-pts { opacity: .8; margin-bottom: 8px; }
.pod-col { border-radius: 14px 14px 0 0; display: grid; place-items: start center; padding-top: 12px; color: var(--ink); font: 700 44px/1 var(--serif); animation: rise .8s ease; }
@keyframes rise { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
.live-player { max-width: 560px; margin: 0 auto; }
.live-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live-btn { border: 0; border-radius: 16px; color: #fff; padding: 18px 14px; min-height: 110px; font-size: 17px; font-weight: 700; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.live-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.live-btn .k { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.25); display: grid; place-items: center; }
.live-btn.sel { outline: 4px solid var(--ink); }
@media (max-width: 380px) { .live-btns { grid-template-columns: 1fr; } .live-btn { min-height: 70px; } }
.live-verdict { border-radius: 22px; color: #fff; text-align: center; padding: 30px 20px; }
.live-verdict.ok { background: var(--ok); } .live-verdict.bad { background: var(--red); }
.live-verdict h2 { color: #fff; margin: 8px 0 4px; font-size: 32px; }
.pulse { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-size: 30px; margin: 0 auto; animation: pulse 1.6s ease infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(246,183,0,.5); } 50% { box-shadow: 0 0 0 16px rgba(246,183,0,0); } }
.live-code-input { font-size: 34px; text-align: center; letter-spacing: .3em; font-weight: 700; }
.live-banner { background: var(--red); color: #fff; border-radius: var(--radius); padding: 14px 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; text-decoration: none; }
.live-banner .dotlive { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.locswitch { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px 6px 4px 12px; color: #fff; }
.locswitch select { background: transparent; border: 0; color: #fff; font-weight: 600; font-size: 14px; padding: 6px 4px; max-width: 170px; cursor: pointer; }
.locswitch select option { color: var(--ink); }
@media (max-width: 820px) { .locswitch { margin-left: auto; } .locswitch select { max-width: 120px; } .userchip { margin-left: 8px; } }
.brand-logo { opacity: 1; background: var(--cream); border-radius: 10px; padding: 6px 10px; display: flex; align-items: center; height: 42px; }
.brand-logo img { height: 30px; width: auto; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: #fff; }
@media (max-width: 480px) { .brand-name { display: none; } .brand-logo { height: 38px; } .brand-logo img { height: 26px; } }
