:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1c2433;
  --muted: #5b6577;
  --line: #dde3ee;
  --brand: #1f5fbf;
  --brand-ink: #ffffff;
  --ok-bg: #e6f5ec; --ok-ink: #14532d;
  --err-bg: #fdecec; --err-ink: #7f1d1d;
  --warn-bg: #fff6dd; --warn-ink: #6b4e00;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420; --surface: #171e2e; --text: #e7ecf6; --muted: #9aa6bd; --line: #2a3550;
    --brand: #6ea2ff; --brand-ink: #0b1220;
    --ok-bg: #12301f; --ok-ink: #a6e3bd;
    --err-bg: #3a1618; --err-ink: #ffb4b4;
    --warn-bg: #3a2f10; --warn-ink: #ffd988;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 48px; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 56px; }
.brand { color: var(--text); font-weight: 700; text-decoration: none; }
.brand span { color: var(--brand); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
nav a { color: var(--text); text-decoration: none; }
nav a:hover { color: var(--brand); }
.who { color: var(--muted); font-size: .9rem; }

h1 { font-size: 1.6rem; margin: 0 0 12px; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }
.card h2:first-child, .card h1:first-child { margin-top: 0; }
a { color: var(--brand); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.muted { color: var(--muted); font-size: .92rem; }
.big { font-size: 1.4rem; font-weight: 700; margin: 4px 0; }
.crumb { margin: 0 0 8px; font-size: .92rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.card.narrow { max-width: 26rem; margin-left: auto; margin-right: auto; }

.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row label { flex: 1 1 14rem; }
label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
input[type="checkbox"] { width: auto; }
textarea { resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .link:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.small { padding: 4px 10px; font-size: .88rem; }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; }
form.inline { display: inline; margin: 0; }

.notice { padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice.err { background: var(--err-bg); color: var(--err-ink); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.problems { margin: 0; padding: 10px 14px 10px 32px; background: var(--err-bg); color: var(--err-ink); border-radius: 8px; max-height: 14rem; overflow: auto; }

.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.check, th.check { width: 2.5rem; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form, td.actions a { display: inline-block; margin: 0; }
.cred-secret { font-size: 1.1rem; font-weight: 700; letter-spacing: .08em; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; }
.stat .num { font-size: 1.8rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .9rem; }
.stat.total { border-color: var(--brand); }

/* ---------- Status, daftar sesi, kendali ---------- */
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); vertical-align: middle; }
.badge.s-running { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.badge.s-scheduled { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.badge.s-finished { background: var(--bg); color: var(--muted); }
.chip { display: inline-block; font-size: .82rem; padding: 1px 8px; margin: 2px 4px 2px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.btn.danger { border-color: var(--err-ink); color: var(--err-ink); }
.btn.danger:hover { background: var(--err-bg); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0; }
legend { font-weight: 600; font-size: .92rem; padding: 0 6px; }
h3 { font-size: 1.02rem; margin: 20px 0 8px; }
.card h3 { margin-top: 0; }
.sessions { display: grid; gap: 12px; }
.session { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin: 0; }
.session .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 12px 20px; margin: 0 0 12px; }
.facts dt { color: var(--muted); font-size: .82rem; }
.facts dd { margin: 0; font-weight: 600; }
.center { text-align: center; }
.center-row { justify-content: center; }

/* ---------- Arena siswa ---------- */
.arena { max-width: 40rem; margin: 0 auto; }
.arena-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: flex-start; }
.arena-head h1 { margin-bottom: 2px; }
.timer { text-align: right; display: grid; }
.timer strong { font-size: 1.9rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timer.low strong { color: var(--err-ink); }
.big-count { font-size: 3.4rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 6px 0 12px; }
.play-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .95rem; }
.play-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.progress { height: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 12px 0 4px; }
.progress #bar { height: 100%; width: 0; background: var(--brand); transition: width .35s ease; }
.qno { margin: 14px 0 0; color: var(--muted); font-size: .9rem; }
.question { font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 700; margin: 4px 0 18px; text-align: center; word-break: break-word; font-variant-numeric: tabular-nums; }
.answer { display: flex; gap: 10px; }
.answer input { font-size: 1.6rem; text-align: center; padding: 12px; }
.answer .btn { font-size: 1.15rem; padding: 12px 22px; }
.feedback { min-height: 1.6em; margin: 12px 0 0; text-align: center; font-weight: 600; }
.feedback.ok { color: var(--ok-ink); }
.feedback.bad { color: var(--err-ink); }
.feedback.warn { color: var(--warn-ink); }
.hint { text-align: center; margin: 6px 0 0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.key { font: inherit; font-size: 1.4rem; padding: 14px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; touch-action: manipulation; }
.key:active { background: var(--bg); }

@media (max-width: 40rem) {
  th, td { padding: 8px; }
  .card { padding: 16px; }
}

/* ---------- Halaman masuk (tema terang tetap, mengikuti desain poster) ---------- */
body.auth-body { background: #fdfaf3; color: #14110f; }
.auth { --hot: #ff4a14; --ink: #14110f; --line2: #d9d3c7; --muted2: #5b5650; max-width: 80rem; margin: 0 auto; padding: 18px 28px 20px; min-height: 100vh; display: flex; flex-direction: column; }
.auth a { color: inherit; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line2); }
.auth-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.auth-brand { font: 800 1.95rem/1 system-ui, "Segoe UI", sans-serif; font-style: italic; letter-spacing: -.02em; }
.auth-brand span { color: var(--hot); }
.auth-year { background: var(--hot); color: #fff; font-weight: 800; font-size: 1rem; padding: 4px 12px; border-radius: 2px; margin-left: 4px; }
.auth-live { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; white-space: nowrap; flex: none; }
.auth-live .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 5px rgba(255, 74, 20, .18); }
.auth-live:hover { color: var(--hot); }

.auth-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); gap: 44px; align-items: stretch; }
.auth-hero-col { position: relative; display: flex; flex-direction: column; padding-top: 34px; min-width: 0; order: -1; }
.eyebrow { font: 700 .85rem/1.2 ui-monospace, Consolas, Menlo, monospace; letter-spacing: .42em; margin: 0 0 12px; color: var(--muted2); }
.auth-headline { margin: 0; font: 900 clamp(2.2rem, 4.9vw, 4.2rem)/.94 "Arial Black", Impact, "Segoe UI", system-ui, sans-serif; font-style: italic; letter-spacing: -.045em; }
.auth-headline span { display: block; }
.auth-headline .hot { color: var(--hot); display: inline-block; padding-bottom: 10px; background: linear-gradient(var(--hot), var(--hot)) left bottom / 100% 6px no-repeat; margin-top: 4px; }
.auth-sub { margin: 18px 0 0; font-size: 1.08rem; line-height: 1.5; max-width: 26rem; position: relative; z-index: 1; }
.auth-hero { display: block; width: calc(100% + 28px); max-width: none; height: auto; margin: auto 0 -20px 0; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%); mask-image: linear-gradient(to bottom, transparent 0, #000 24%); pointer-events: none; user-select: none; }

.auth-form-col { align-self: center; width: 100%; max-width: 31rem; justify-self: end; padding-top: 10px; }
.auth-title { margin: 0; font: 800 clamp(2rem, 3.6vw, 2.7rem)/1.05 system-ui, "Segoe UI", sans-serif; letter-spacing: -.03em; color: var(--ink); }
.auth-lead { margin: 8px 0 18px; font-size: 1.12rem; color: var(--muted2); }
.auth-note { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 14px 18px; border-radius: 8px; font-weight: 700; font-size: 1.05rem; }
.auth-note svg { width: 30px; height: 30px; flex: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.auth-note.ok { background: #e3f3e8; color: #166534; }
.auth-note.ok svg circle { fill: #166534; stroke: #166534; }
.auth-note.ok svg path { stroke: #fff; }
.auth-note.err { background: #fde8e4; color: #8a1d0a; }
.auth-note.err svg circle { fill: #c2410c; stroke: #c2410c; }
.auth-note.err svg path { stroke: #fff; }

.auth-form { display: grid; gap: 8px; }
.auth-form label { font-weight: 800; font-size: 1rem; margin-top: 8px; display: block; }
.field { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #cfc8bb; border-radius: 6px; padding: 0 14px; height: 54px; transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--hot); box-shadow: 0 0 0 3px rgba(255, 74, 20, .22); }
.field svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #3b3835; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth .field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); padding: 0; font-size: 1.02rem; outline: none; box-shadow: none; }
.auth .field input::placeholder { color: #8b857c; font-style: italic; }
.reveal { all: unset; cursor: pointer; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; }
.reveal:hover { background: #f1ece1; }
.reveal:focus-visible { outline: 3px solid rgba(255, 74, 20, .5); }
.reveal[aria-pressed="true"] svg { stroke: var(--hot); }

.cta { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 58px; border: 0; border-radius: 4px; cursor: pointer; color: #fff; font: 800 1.2rem/1 system-ui, "Segoe UI", sans-serif; background: linear-gradient(115deg, var(--hot) 0 92%, #ff7d4d 92% 100%); transition: transform .12s, filter .12s; }
.cta svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta:focus-visible, .qr-btn:focus-visible { outline: 3px solid rgba(255, 74, 20, .55); outline-offset: 3px; }
.cta:disabled { opacity: .75; cursor: progress; }

.or { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--muted2); font-size: .95rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.qr-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 54px; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; cursor: pointer; font: 800 1.05rem/1 system-ui, "Segoe UI", sans-serif; }
.qr-btn svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qr-btn:hover { background: #f6f1e6; }
.qr-panel { margin-top: 12px; padding: 14px 16px; background: #fff; border: 1px dashed #b9b1a3; border-radius: 6px; font-size: .95rem; }
.qr-panel p { margin: 0 0 10px; }
.qr-code-form label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 6px; }
.qr-row { display: flex; gap: 8px; }
.qr-row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid #cfc8bb; border-radius: 6px; background: #fff; color: var(--ink); font: 600 1rem ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.qr-row button { height: 44px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; }

.auth-hint { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: .95rem; color: var(--muted2); }
.auth-hint svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted2); stroke-width: 1.7; stroke-linecap: round; }
.auth-foot { display: flex; align-items: center; gap: 18px; margin-top: 18px; color: var(--muted2); font-size: .9rem; letter-spacing: .22em; }
.auth-foot::before, .auth-foot::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.who-big { margin: 0 0 4px; font: 900 1.9rem/1.1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; letter-spacing: -.02em; }
.auth-narrow { max-width: 36rem; }
.auth-card { margin: 40px auto 0; justify-self: center; align-self: auto; }

@media (max-width: 56rem) {
  .auth { padding: 14px 18px 18px; }
  .auth-grid { grid-template-columns: 1fr; gap: 8px; }
  .auth-form-col { justify-self: stretch; max-width: none; padding-top: 22px; }
  .auth-hero-col { order: 0; padding-top: 26px; }
  /* Ilustrasi selebar layar seperti pada rancangan ponsel. */
  .auth { min-height: 100svh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .auth-hero { width: 100%; margin: 14px 0 0; border-radius: 16px; -webkit-mask-image: none; mask-image: none; }
  .auth-headline { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .auth-form-col { padding-bottom: 8px; }
  .auth-foot { margin-top: 22px; letter-spacing: .12em; font-size: .8rem; }
}
@media (max-width: 30rem) {
  .auth-logo { gap: 8px; }
  .auth-brand { font-size: 1.4rem; }
  .auth-year { font-size: .8rem; padding: 3px 8px; margin-left: 0; }
  .auth-live { font-size: .95rem; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .cta, .field { transition: none; }
  .progress #bar { transition: none; }
}

/* ---------- Layar siaran (timing tower + sirkuit) ---------- */
.tv { --hot: #ff4a14; --navy: #0e1524; --navy2: #151e32; --ink: #14110f; --good: #22c55e; --bad: #ef4444;
  min-height: 100vh; display: flex; flex-direction: column; color: var(--ink); background: #fdfaf3; }
.tv-top { display: flex; align-items: center; gap: 22px; padding: 12px 22px; border-bottom: 1px solid #ddd5c4; background: #fdfaf3; }
.tv-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.tv-brand-text { display: grid; gap: 4px; min-width: 0; }
.tv-brand-text small { font-size: .68rem; letter-spacing: .3em; color: #5b5650; white-space: nowrap; }
.tv .auth-brand { font-size: 2.3rem; }
.tv-heat { margin-left: auto; padding-left: 22px; border-left: 2px solid #ddd5c4; display: grid; gap: 2px; }
.tv-heat b { font: 900 1.25rem/1.1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; text-transform: uppercase; }
.tv-heat small { color: #5b5650; font-size: .85rem; }
.tv-status { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; background: #6b7280; color: #fff; font: 800 .95rem/1 system-ui, sans-serif; letter-spacing: .04em; border-radius: 4px; transform: skewX(-10deg); text-transform: uppercase; }
.tv-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.tv-status[data-state="running"] { background: #e11d1d; }
.tv-status[data-state="running"]::before { animation: tv-pulse 1.2s ease-in-out infinite; }
.tv-status[data-state="scheduled"] { background: #d97706; }
.tv-clock { text-align: right; padding-left: 22px; border-left: 2px solid #ddd5c4; display: grid; }
.tv-clock small { font-size: .72rem; letter-spacing: .14em; color: #5b5650; }
.tv-clock strong { font: 900 2.9rem/1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; color: var(--hot); font-variant-numeric: tabular-nums; }
@keyframes tv-pulse { 50% { opacity: .35; } }

.tv-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 27rem; min-height: 0; }
.tv-circuit { position: relative; padding: 14px 18px 10px; display: flex; flex-direction: column; min-width: 0; background: #f4ecd9; }
.tv-circuit-head h2 { margin: 0; font: 900 1.5rem/1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; text-transform: uppercase; }
.tv-circuit-head p { margin: 4px 0 0; font-size: .85rem; color: #5b5650; letter-spacing: .04em; }
.tv-svg { flex: 1; width: 100%; min-height: 20rem; display: block; }
.tv-legend { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 6px 0 0; font-size: .85rem; color: #3b3835; }
.tv-legend span { background: rgba(255, 255, 255, .8); padding: 4px 12px; border-radius: 6px; }

.tv-tower { background: var(--navy); color: #fff; padding: 16px 16px 14px; display: flex; flex-direction: column; min-width: 0; }
.tv-tower-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tv-tower-head h2 { margin: 0; font: 900 1.25rem/1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; text-transform: uppercase; }
.tv-chip { display: inline-flex; align-items: center; gap: 7px; background: #e11d1d; color: #fff; font: 800 .75rem/1 system-ui, sans-serif; padding: 6px 12px; border-radius: 4px; transform: skewX(-10deg); }
.tv-chip i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: tv-pulse 1.2s ease-in-out infinite; }
.tv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tv-tabs button { font: 700 .78rem/1 system-ui, sans-serif; color: #c7d0e4; background: var(--navy2); border: 1px solid #263149; padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.tv-tabs button.on { background: var(--hot); border-color: var(--hot); color: #fff; }

.tv-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tv-row { position: relative; display: grid; grid-template-columns: 2.6rem 4.2rem minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 9px 12px 10px 10px; background: var(--navy2); border: 1px solid #263149; border-radius: 8px; will-change: transform; }
.tv-row.lead { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot) inset; background: linear-gradient(90deg, rgba(255, 74, 20, .16), var(--navy2) 55%); }
.tv-row .pos { grid-row: 1 / 3; font: 900 1.55rem/1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; color: #e8edf8; text-align: center; font-variant-numeric: tabular-nums; }
.tv-row.lead .pos { color: var(--hot); }
.tv-row .carico { grid-row: 1 / 3; width: 4.2rem; height: 2rem; }
.tv-row .who { min-width: 0; display: grid; line-height: 1.15; }
.tv-row .nm { font: 800 1.1rem/1.15 system-ui, sans-serif; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em; }
.tv-row .sch { font-size: .72rem; color: #9aa6c1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-row .cnt { font: 800 1.15rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; text-align: right; }
.tv-row .cnt small { font-size: .8rem; color: #9aa6c1; font-weight: 600; }
.tv-row .pbar { grid-column: 3 / 5; grid-row: 2; height: 6px; margin-top: 6px; border-radius: 999px; background: #2a3550; overflow: hidden; }
.tv-row .pbar i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .8s ease; }
.tv-row .delta { position: absolute; left: 8px; top: 4px; font: 800 .68rem/1 system-ui, sans-serif; opacity: 0; transition: opacity .3s; }
.tv-row .delta.up { color: var(--good); opacity: 1; }
.tv-row .delta.down { color: var(--bad); opacity: 1; }
.tv-row .stb { position: absolute; right: 10px; top: -8px; font: 800 .62rem/1 system-ui, sans-serif; font-style: normal; letter-spacing: .1em; padding: 3px 7px; border-radius: 4px; display: none; }
.tv-row.st-finished, .tv-row.st-game_over { margin-top: 4px; }
.tv-row.st-finished { border-color: #22c55e; background: linear-gradient(90deg, rgba(34, 197, 94, .22), var(--navy2) 70%); box-shadow: 4px 0 0 #22c55e inset; }
.tv-row.st-finished .stb { display: block; background: #22c55e; color: #052e16; }
.tv-row.st-finished .pos, .tv-row.st-finished .cnt b { color: #4ade80; }
.tv-row.st-game_over { border-color: #ef4444; background: linear-gradient(90deg, rgba(239, 68, 68, .22), var(--navy2) 70%); box-shadow: 4px 0 0 #ef4444 inset; }
.tv-row.st-game_over .stb { display: block; background: #ef4444; color: #fff; }
.tv-row.st-game_over .pos { color: #f87171; }
.tv-row.st-game_over .nm { color: #fca5a5; }
.tv-row.st-game_over .carico { opacity: .45; filter: grayscale(1); }
.tv-row.dim { opacity: .28; }
.tv-empty, .tv-more { margin: 10px 4px 0; color: #9aa6c1; font-size: .85rem; text-align: center; }

.tv-leader { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: auto; padding: 12px 14px; border: 1px solid var(--hot); border-radius: 8px; background: rgba(255, 74, 20, .08); }
.tv-leader svg { width: 38px; height: 38px; fill: none; stroke: var(--hot); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tv-leader small { display: block; color: var(--hot); font: 800 .72rem/1 system-ui, sans-serif; letter-spacing: .12em; }
.tv-leader b { font: 900 1.7rem/1.1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; text-transform: uppercase; overflow-wrap: anywhere; }
.tv-leader p { margin: 0; font-size: .95rem; line-height: 1.2; max-width: 6rem; color: #dbe2f2; }
.tv-leader[hidden] { display: none; }

.tv-ticker { display: flex; align-items: stretch; background: var(--navy); color: #fff; min-height: 4.6rem; overflow: hidden; }
.tv-ticker-tag { display: flex; align-items: center; gap: 12px; padding: 0 34px 0 22px; background: var(--hot); clip-path: polygon(0 0, 100% 0, calc(100% - 28px) 100%, 0 100%); font: 900 1rem/1.05 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; flex: none; }
.tv-ticker-tag svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tv-ticker-text { margin: 0; flex: 1; display: flex; align-items: center; padding: 0 28px; font: 800 clamp(1.1rem, 2.4vw, 2rem)/1.15 system-ui, sans-serif; font-style: italic; overflow: hidden; }
.tv-ticker-text span { display: inline-block; animation: tv-slide .5s cubic-bezier(.2, .8, .2, 1); }
.tv-ticker-text b { color: #fff; }
.tv-ticker-text em { color: var(--hot); font-style: italic; }
@keyframes tv-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.tv-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 22px; padding: 8px 22px 12px; background: #fdfaf3; border-top: 1px solid #ddd5c4; font-size: .9rem; }
.tv-tools label { font-weight: 700; display: grid; gap: 4px; min-width: 14rem; }
.tv-tools select { height: 36px; border: 1px solid #cfc8bb; border-radius: 6px; background: #fff; color: var(--ink); padding: 0 10px; font: inherit; }
.tv-tools a { color: inherit; }
.tv-conn { margin-left: auto; color: #5b5650; }
.tv.kiosk .tv-tools, .tv.kiosk #tabs { display: none; }
.tv.kiosk { height: 100vh; overflow: hidden; }
.tv.kiosk .tv-ticker { min-height: 5.4rem; }

/* Elemen SVG sirkuit */
.tv-svg .car-body { transition: none; }
.tv-svg text { font-family: system-ui, "Segoe UI", sans-serif; }
.tv-svg .lbl rect { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }

@media (max-width: 62rem) {
  .tv-main { grid-template-columns: 1fr; }
  .tv-top { flex-wrap: wrap; gap: 10px 16px; padding: 10px 14px; }
  .tv-brand-text small { display: none; }
  .tv .auth-brand { font-size: 1.7rem; }
  .tv-heat { margin-left: 0; padding-left: 0; border-left: 0; }
  .tv-clock { margin-left: auto; }
  .tv-clock strong { font-size: 2.1rem; }
  .tv-ticker-tag { padding: 0 26px 0 14px; }
  .tv-ticker-tag svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tv-status::before, .tv-chip i, .tv-ticker-text span { animation: none; }
  .tv-row .pbar i { transition: none; }
}

/* Pilihan sirkuit bergambar (admin) */
.cpicks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cpick { position: relative; display: grid; gap: 6px; cursor: pointer; font-weight: 600; }
.cpick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cpick .cthumb { display: block; aspect-ratio: 1000 / 560; border-radius: 8px; overflow: hidden; border: 2px solid var(--line); background: #ead9b4; }
.cpick .cthumb img, .cpick .cthumb svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.cpick:hover .cthumb { border-color: #b9b2a8; }
.cpick input:checked + .cthumb { border-color: var(--hot, #ff4a14); box-shadow: 0 0 0 2px var(--hot, #ff4a14); }
.cpick input:focus-visible + .cthumb { outline: 3px solid #1c7ed6; outline-offset: 2px; }
.cpick .cname { font-size: .88rem; line-height: 1.2; }
.cpick input:checked ~ .cname { color: var(--hot, #ff4a14); }

/* ---------- Kerangka admin (tema terang, sidebar) ---------- */
body.adm {
  --bg: #fbf8f1; --surface: #ffffff; --text: #14110f; --muted: #6b645c; --line: #e8e1d4;
  --brand: #ff4a14; --brand-ink: #ffffff; --hot: #ff4a14;
  --ok-bg: #e3f3e8; --ok-ink: #166534; --err-bg: #fde8e4; --err-ink: #8a1d0a; --warn-bg: #fff1d6; --warn-ink: #8a5a00;
  background: var(--bg); color: var(--text);
}
.adm a { color: inherit; }
.adm-shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: 100vh; }
.adm-side { background: #fdfbf6; border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.adm-logo { display: grid; justify-items: center; text-decoration: none; text-align: center; }
.adm-logo img { height: 54px; width: auto; }
.adm-brand { font: 800 1.55rem/1.1 system-ui, "Segoe UI", sans-serif; letter-spacing: -.02em; margin-top: 4px; }
.adm-year { font: 800 1.35rem/1 system-ui, sans-serif; color: var(--hot); }
.adm-role { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; font-size: .9rem; }
.adm-role svg { width: 18px; height: 18px; fill: var(--hot); }
.adm-nav { display: grid; gap: 4px; margin-top: 6px; }
.adm-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; color: #3b3835; border-left: 3px solid transparent; }
.adm-nav a svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.adm-nav a:hover { background: #f5efe3; }
.adm-nav a[aria-current="page"] { background: #ffe9df; color: var(--hot); border-left-color: var(--hot); }
.adm-tag { margin: auto 0 0; font: italic 600 1.05rem/1.35 Georgia, "Times New Roman", serif; color: #6b645c; padding: 18px 6px 4px; border-bottom: 3px solid var(--hot); width: fit-content; }
.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-bar { display: flex; align-items: center; justify-content: flex-end; gap: 22px; padding: 16px 28px 0; }
.adm-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1.5px solid #14110f; border-radius: 6px; background: #fff; font-weight: 700; text-decoration: none; cursor: pointer; font-size: .95rem; }
.adm-btn svg { width: 14px; height: 14px; }
.adm-btn:hover { background: #f5efe3; }
.adm-btn.hot { background: var(--hot); border-color: var(--hot); color: #fff; }
.adm-btn.hot:hover { filter: brightness(1.06); background: var(--hot); }
.adm-user { display: flex; align-items: center; gap: 10px; padding-left: 22px; border-left: 1px solid var(--line); }
.adm-avatar { width: 38px; height: 38px; border-radius: 50%; background: #e4ddd0; display: grid; place-items: center; font-weight: 800; text-transform: uppercase; color: #4a443d; }
.adm-uname { display: grid; line-height: 1.15; }
.adm-uname small { color: var(--muted); }
.adm-out { font: inherit; font-weight: 600; font-size: .9rem; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; color: var(--text); }
.adm-out:hover { border-color: var(--hot); color: var(--hot); }
.adm-content { padding: 6px 28px 48px; max-width: 78rem; width: 100%; }
.adm-content h1 { font: 800 2.3rem/1.1 system-ui, "Segoe UI", sans-serif; letter-spacing: -.03em; margin: 8px 0 4px; }
.adm-sub { margin: 0 0 18px; color: var(--muted); font-size: 1.05rem; }
.adm-head { margin-bottom: 4px; }

.adm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; }
.adm-stat { display: flex; align-items: center; gap: 16px; padding: 20px 22px; }
.adm-stat + .adm-stat { border-left: 1px solid var(--line); }
.adm-stat svg { width: 46px; height: 46px; flex: none; fill: none; stroke: var(--hot); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.adm-stat div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; }
.adm-stat b { font: 800 2.1rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.adm-stat span { font-weight: 600; }
.adm-stat small { grid-column: 1 / -1; color: var(--muted); }

.adm-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.adm-col { display: grid; gap: 20px; min-width: 0; }
.adm-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.adm-ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.adm-ph h2 { margin: 0; font: 800 1.2rem/1.2 system-ui, sans-serif; }
.adm-ph p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.adm-pill { font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #f1ece1; color: var(--muted); }
.adm-pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.adm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.adm-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.adm-list li div { display: grid; line-height: 1.25; }
.adm-list small { color: var(--muted); }
.adm-bars { list-style: none; margin: 0; padding: 0; display: grid; }
.adm-bars li { display: flex; justify-content: space-between; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.adm-bars li:last-child { border-bottom: 0; }
.adm-bars b { font-variant-numeric: tabular-nums; }
.adm-bars .total { font-weight: 800; color: var(--hot); }

/* Komponen umum di dalam kerangka admin */
.adm .card, .adm .table-wrap { border-radius: 12px; }
.adm .card { margin: 0 0 20px; }
.adm th { background: #faf6ec; }
.adm .btn.primary { background: var(--hot); border-color: var(--hot); }
.adm .btn:hover { border-color: var(--hot); }
.adm .stat.total { border-color: var(--hot); }
.adm .crumb a { color: var(--hot); }
.adm input, .adm select, .adm textarea { background: #fff; border-color: #d8d0c1; }
.adm input:focus-visible, .adm select:focus-visible, .adm textarea:focus-visible, .adm .btn:focus-visible { outline-color: rgba(255, 74, 20, .45); }

@media (max-width: 64rem) {
  .adm-grid { grid-template-columns: 1fr; }
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-stat:nth-child(3) { border-left: 0; }
  .adm-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.adm-mtop, .adm-tabbar { display: none; }
@media (max-width: 52rem) {
  html:has(.adm-shell) { overflow-x: clip; }
  .adm-shell { grid-template-columns: 1fr; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .adm-side, .adm-bar { display: none; }
  .adm-mtop { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 25; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid #e3eaf4; }
  .adm-mlogo { margin-right: auto; display: flex; align-items: center; }
  .adm-mlogo img { height: 34px; width: auto; }
  .adm-mmenu { position: relative; }
  .adm-mmenu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; }
  .adm-mmenu summary::-webkit-details-marker { display: none; }
  .adm-mmenu .adm-avatar { width: 38px; height: 38px; background: #ffe9df; color: var(--hot); }
  .adm-mtop .ps-ico { display: grid; width: 44px; height: 44px; background: #f1f5fb; color: #1d2a44; }
  .adm-mtop .ps-ico[hidden] { display: none; }
  .adm-content { padding: 10px 14px 28px; }
  .adm-content h1 { font-size: 1.7rem; }
  .adm-stat { padding: 16px 12px; gap: 10px; min-width: 0; }
  .adm-stat svg { width: 34px; height: 34px; }
  .adm-stat div { min-width: 0; grid-template-columns: auto minmax(0, 1fr); }
  .adm-stat b { font-size: 1.8rem; }
  .adm-stat span, .adm-stat small { overflow-wrap: anywhere; }
  .adm-content table { display: block; overflow-x: auto; max-width: 100%; }
  .adm-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; position: fixed; left: 0; right: 0; bottom: 0; width: 100%; z-index: 30; background: #fff; border-top: 1px solid #e3eaf4; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px rgba(20, 40, 80, .08); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .adm-tabbar > a, .adm-lain > summary { display: grid; justify-items: center; gap: 2px; padding: 7px 2px 6px; font-size: .74rem; font-weight: 700; color: #4a5568; text-decoration: none; border-radius: 14px; list-style: none; cursor: pointer; }
  .adm-lain > summary::-webkit-details-marker { display: none; }
  .adm-tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .adm-tabbar a[aria-current="page"], .adm-lain[open] > summary { color: var(--hot); background: #fff1ea; }
  .adm-lain { position: static; }
  .adm-sheet { position: fixed; left: 10px; right: 10px; bottom: calc(78px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 10px; background: #fff; border: 1px solid #dfe7f2; border-radius: 18px; box-shadow: 0 12px 32px rgba(20, 40, 80, .18); max-height: 60vh; overflow-y: auto; }
  .adm-sheet a { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: .9rem; color: #2a3446; }
  .adm-sheet a svg { width: 22px; height: 22px; }
  .adm-sheet a[aria-current="page"] { background: #fff1ea; color: var(--hot); }
}

/* Tab, status tiket, pengumuman */
.adm-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 0 0 14px; flex-wrap: wrap; }
.adm-tabs a { padding: 8px 2px 10px; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.adm-tabs a:hover { color: var(--text); }
.adm-tabs a[aria-selected="true"] { color: var(--hot); border-bottom-color: var(--hot); }
.adm-count { display: inline-block; min-width: 1.4em; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #ffe9df; color: var(--hot); font-size: .78rem; font-weight: 800; text-align: center; }
.adm-body { white-space: pre-line; overflow-wrap: anywhere; }
.adm-list .adm-body { display: block; margin-top: 4px; font-size: .92rem; }
.adm-more { margin: 12px 0 0; text-align: right; font-weight: 600; }
.adm-more a { color: var(--hot); text-decoration: none; }
.adm-window { margin: 0 0 14px; font-weight: 700; line-height: 1.35; }
.adm-window .muted { font-weight: 400; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: auto; }
.badge.t-open { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.badge.t-in_progress { background: #e1efff; color: #144a8f; border-color: transparent; }
.badge.t-done { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.ticket { margin: 0 0 12px; padding: 0; }
.ticket summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.ticket summary::-webkit-details-marker { display: none; }
.ticket[open] summary { border-bottom: 1px solid var(--line); }
.ticket .t-main { display: grid; line-height: 1.25; }
.ticket .t-main small { color: var(--muted); }
.ticket > .adm-body, .ticket > form { margin: 14px 18px 18px; }
.ticket-card .ticket-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ticket-card p { margin: 6px 0; }
.reply { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border-radius: 0 8px 8px 0; }
.reply p { margin: 4px 0 0; }
.announce { margin: 0 0 18px; display: grid; gap: 10px; }
.announce article { padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; background: var(--surface); }
.announce p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Race Center: daftar siaran publik ---------- */
.rc { --hot: #ff4a14; --ink: #14110f; --line: #e5dfd2; --muted: #5f5a53; max-width: 82rem; margin: 0 auto; padding: 0 28px 24px; color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.rc a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rc svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.rc-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0 -28px; padding-left: 28px; padding-right: 28px; }
.rc-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.rc-brand { font: 800 1.45rem/1 system-ui, "Segoe UI", sans-serif; letter-spacing: -.02em; }
.rc-brand span { color: var(--hot); }
.rc-nav { display: flex; gap: 38px; }
.rc-nav a { padding: 20px 4px 18px; text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin: -20px 0 -15px; }
.rc-nav a:hover { color: var(--hot); }
.rc-nav a[aria-current="page"] { color: var(--hot); border-bottom-color: var(--hot); }
.rc-login { justify-self: end; display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.rc-login:hover { background: #f6f1e6; }

.rc-hero { position: relative; min-height: 17rem; display: grid; align-items: center; padding: 22px 0 8px; }
.rc-hero-text { position: relative; z-index: 1; max-width: 40rem; }
.rc-eyebrow { margin: 0 0 6px; font: 700 .8rem/1.2 ui-monospace, Consolas, Menlo, monospace; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.rc-hero h1 { margin: 0; font: 900 clamp(2.2rem, 5.2vw, 3.9rem)/.98 "Arial Black", Impact, system-ui, sans-serif; letter-spacing: -.045em; color: #0c1a30; }
.rc-lead { margin: 12px 0 0; font-size: 1.2rem; color: #27303f; }
.rc-hero-art { position: absolute; right: -28px; top: 0; height: 100%; width: 60%; object-fit: cover; object-position: center 78%; pointer-events: none; user-select: none; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%); mask-image: linear-gradient(to right, transparent 0, #000 38%); }

.rc-banner { display: flex; align-items: center; gap: 14px; margin: 14px 0 22px; padding: 14px 18px; border-radius: 8px; background: #efeee9; color: #2c2a27; }
.rc-banner svg { width: 24px; height: 24px; flex: none; }
.rc-banner.live { background: #ffe9df; color: #8a2a0a; font-weight: 600; }

.rc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.rc-tabs { display: flex; flex-wrap: wrap; }
.rc-tabs a { position: relative; padding: 14px 20px 16px; text-decoration: none; font-weight: 600; color: #3a3631; }
.rc-tabs a + a::before { content: ""; position: absolute; left: 0; top: 30%; height: 40%; width: 1px; background: var(--line); }
.rc-tabs a[aria-current="true"] { color: var(--ink); }
.rc-tabs a[aria-current="true"]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 3px; background: var(--hot); }
.rc-n { display: inline-block; min-width: 1.7em; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #ece7db; font-size: .82rem; text-align: center; }
.rc-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: 12px; }
.rc-search { display: flex; align-items: center; gap: 10px; width: 17.5rem; max-width: 100%; padding: 0 14px; height: 46px; background: #fff; border: 1px solid #d8d1c3; border-radius: 6px; }
.rc-search:focus-within, .rc-select select:focus-visible { border-color: var(--hot); box-shadow: 0 0 0 3px rgba(255, 74, 20, .2); outline: none; }
.rc-search svg { width: 20px; height: 20px; flex: none; color: #4a453e; }
.rc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 0; height: 100%; }
.rc-select select { height: 46px; padding: 0 14px; border: 1px solid #d8d1c3; border-radius: 6px; background: #fff; font: inherit; color: var(--ink); min-width: 11.5rem; }
.rc-go { height: 46px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.rc-go:hover { background: var(--hot); }

.rc-h { margin: 4px 0 12px; font: 800 .88rem/1.2 system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #3b4a60; }
.rc-feature { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.rc-feature-img { display: block; position: relative; min-height: 15rem; background: #ead9b4; }
.rc-feature-img img, .rc-feature-img svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-thumb img, .rc-thumb svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.rc-feature-body { display: flex; flex-direction: column; padding: 22px 26px; min-width: 0; }
.rc-kicker { margin: 0 0 6px; font: 700 .8rem/1.2 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rc-feature h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font: 800 2rem/1.1 system-ui, "Segoe UI", sans-serif; letter-spacing: -.03em; }
.rc-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 6px; background: #ece9e1; font: 700 .86rem/1 system-ui, sans-serif; letter-spacing: 0; color: #25221f; }
.rc-status.s-running { background: #fde3d9; color: #a3300c; }
.rc-status.s-running::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); }
.rc-status.s-scheduled { background: #fff1d6; color: #8a5a00; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 14px 0 0; color: #27303f; }
.rc-meta span { display: inline-flex; align-items: center; gap: 10px; }
.rc-meta svg { width: 22px; height: 22px; flex: none; }
.rc-feature-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; }
.rc-feature-foot p { margin: 0; color: var(--muted); flex: 1 1 12rem; }
.rc-cta { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 6px; background: var(--hot); color: #fff !important; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.rc-cta:hover { filter: brightness(1.07); }

.rc-prevhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rc-sort { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.rc-sort svg { width: 18px; height: 18px; }
.rc-sort:hover { color: var(--hot); }
.rc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rc-row { display: grid; grid-template-columns: 11.7rem minmax(0, 1fr) auto 9.5rem; align-items: center; gap: 18px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.rc-thumb { display: block; height: 3.9rem; border-radius: 4px; overflow: hidden; background: #ead9b4; }
.rc-row-main { display: grid; line-height: 1.3; min-width: 0; }
.rc-row-main b { font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-row-main span { color: var(--muted); }
.rc-open { justify-self: end; padding: 9px 18px; border: 1.5px solid var(--hot); border-radius: 6px; color: var(--hot) !important; font-weight: 700; text-decoration: none; white-space: nowrap; margin-right: 6px; }
.rc-open:hover { background: #fff1ec; }
.rc-empty { padding: 34px 0; text-align: center; color: var(--muted); font-size: 1.05rem; }
.rc-empty a { color: var(--hot); font-weight: 600; }
.rc-foot { display: flex; align-items: center; gap: 18px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.rc-logo.small .rc-brand { font-size: 1.15rem; }
.rc-tag { padding-left: 18px; border-left: 1px solid var(--line); }

@media (max-width: 62rem) {
  .rc-top { grid-template-columns: auto 1fr auto; }
  .rc-nav { gap: 20px; justify-self: center; }
  .rc-feature { grid-template-columns: 1fr; }
  .rc-feature-img { min-height: 0; aspect-ratio: 16 / 7; }
  .rc-hero-art { max-width: 80%; opacity: .55; }
}
@media (max-width: 44rem) {
  .rc { padding: 0 16px 20px; }
  .rc-top { margin: 0 -16px; padding: 10px 16px; grid-template-columns: auto auto; }
  .rc-nav { display: none; }
  .rc-login { padding: 8px 14px; }
  .rc-brand { font-size: 1.15rem; }
  .rc-hero { min-height: 11rem; }
  .rc-hero-art { right: -16px; opacity: .35; max-width: 100%; }
  .rc-tabs a { padding: 12px 12px 14px; }
  .rc-filter { width: 100%; }
  .rc-search { flex: 1 1 100%; width: auto; }
  .rc-select { flex: 1; }
  .rc-select select { width: 100%; min-width: 0; }
  .rc-row { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 6px 12px; }
  .rc-thumb { height: 3.4rem; grid-row: span 2; }
  .rc-status { justify-self: start; grid-column: 2; }
  .rc-open { grid-column: 1 / -1; justify-self: stretch; text-align: center; margin: 4px 0 0; }
  .rc-feature h3 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: no-preference) { .rc-cta, .rc-open, .rc-go { transition: filter .12s, background .12s; } }

/* ---------- Dasbor sekolah (operator) ---------- */
body.adm { --ink: #14110f; }
.adm-role.op { justify-content: flex-start; text-align: left; }
.adm-role.op svg { width: 26px; height: 26px; fill: var(--hot); stroke: none; flex: none; }
.adm-role.op span { display: grid; line-height: 1.2; min-width: 0; }
.adm-role.op small { color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.adm-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adm-btn.big { padding: 14px 24px; font-size: 1rem; }
.hot { color: var(--hot); }

.adm-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.adm-check { display: flex; align-items: center; gap: 14px; padding: 18px 22px; min-width: 0; }
.adm-check + .adm-check { border-left: 1px solid var(--line); }
.adm-check-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #16a34a; }
.adm-check-ic svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.adm-check.wait .adm-check-ic { background: #fff1d6; }
.adm-check.wait .adm-check-ic svg { stroke: #b45309; }
.adm-check div { display: grid; line-height: 1.3; min-width: 0; }
.adm-check b { font-size: 1.05rem; }
.adm-check small { color: var(--muted); overflow-wrap: anywhere; }

.adm-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.adm-cat { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 8px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.adm-cat:hover, .adm-cat[aria-current="true"] { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot) inset; }
.adm-cat-name { grid-column: 1 / -1; font-weight: 700; }
.adm-cat b { font: 800 1.9rem/1.1 system-ui, sans-serif; font-variant-numeric: tabular-nums; justify-self: start; }
.adm-cat-unit { color: var(--muted); justify-self: start; margin-left: -4px; }
.adm-cat-bar { grid-column: 1 / -1; width: 100%; height: 8px; margin-top: 8px; border: 0; border-radius: 999px; background: #ece7db; overflow: hidden; appearance: none; -webkit-appearance: none; }
.adm-cat-bar::-webkit-progress-bar { background: #ece7db; border-radius: 999px; }
.adm-cat-bar::-webkit-progress-value { background: var(--hot); border-radius: 999px; }
.adm-cat-bar::-moz-progress-bar { background: var(--hot); border-radius: 999px; }
.adm-cat.k-sd_nonoap .adm-cat-bar::-webkit-progress-value, .adm-cat.k-smp_nonoap .adm-cat-bar::-webkit-progress-value { background: #0f766e; }
.adm-cat.k-sd_nonoap .adm-cat-bar::-moz-progress-bar, .adm-cat.k-smp_nonoap .adm-cat-bar::-moz-progress-bar { background: #0f766e; }

.school-grid { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
.adm-filter { margin-bottom: 14px; padding-bottom: 0; }
.adm-clear { font-weight: 600; color: var(--hot); text-decoration: none; }
.adm .rc-search { width: 100%; max-width: 20rem; flex: 1 1 14rem; }
.kchip { display: inline-block; padding: 3px 14px; border-radius: 6px; font-weight: 700; font-size: .86rem; background: #ffe9df; color: #c2410c; white-space: nowrap; }
.kchip.k-sd_nonoap, .kchip.k-smp_nonoap { background: #dff1ff; color: #14508a; }
.pname { text-transform: uppercase; letter-spacing: .01em; }
.adm-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fdfbf6; }
.adm-bulk .muted { margin-right: auto; }
.adm-dl { margin: 0; display: grid; gap: 12px; }
.adm-dl div { display: grid; gap: 2px; }
.adm-dl dt { color: var(--muted); font-size: .85rem; }
.adm-dl dd { margin: 0; font-weight: 600; padding: 9px 12px; background: #f4f1ea; border-radius: 8px; }
.adm-tip { display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px 18px; background: #e3f3e8; color: #166534; border: 1px solid #c3e4cd; border-radius: 12px; font-weight: 500; }
.adm-tip svg { width: 28px; height: 28px; flex: none; fill: none; stroke: #16a34a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 64rem) {
  .adm-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-grid { grid-template-columns: 1fr; }
  .adm-checks { grid-template-columns: 1fr; }
  .adm-check + .adm-check { border-left: 0; border-top: 1px solid var(--line); }
}
.rc-search svg, .rc-sort svg, .rc-meta svg, .adm-bulk svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Beranda peserta ---------- */
.ps { --hot: #ff4a14; --ink: #14110f; --line: #e8e1d4; --muted: #5f5a53; max-width: 78rem; margin: 0 auto; padding: 0 24px 28px; color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ps a { color: inherit; }
.ps svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ps-top { display: flex; align-items: center; gap: 28px; padding: 16px 0; }
.ps-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.ps-brand { font: 800 1.45rem/1 system-ui, sans-serif; letter-spacing: -.02em; }
.ps-brand span { color: var(--hot); }
.ps-nav { display: flex; gap: 14px; margin-right: auto; margin-left: 12px; }
.ps-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.ps-nav a svg { width: 20px; height: 20px; }
.ps-nav a:hover { color: var(--hot); }
.ps-nav a[aria-current="page"] { color: var(--hot); border-bottom-color: var(--hot); }
.ps-user { display: flex; align-items: center; gap: 10px; }
.ps-avatar { width: 38px; height: 38px; border-radius: 50%; background: #f0d9c9; display: grid; place-items: center; font-weight: 800; text-transform: uppercase; color: #8a3a12; }
.ps-out { font: inherit; font-weight: 600; font-size: .9rem; background: #fff; border: 1px solid #d8d1c3; border-radius: 6px; padding: 6px 12px; cursor: pointer; color: var(--ink); }
.ps-out:hover { border-color: var(--hot); color: var(--hot); }

.ps-hero { position: relative; display: grid; align-items: center; min-height: 15rem; padding: 18px 0 18px; overflow: hidden; border-radius: 14px; }
.ps-hero-text { position: relative; z-index: 1; max-width: 34rem; padding-left: 4px; }
.ps-hero h1 { margin: 0; font: 900 clamp(2.1rem, 5vw, 3.4rem)/1.02 "Arial Black", Impact, system-ui, sans-serif; letter-spacing: -.04em; }
.ps-lead { margin: 12px 0 18px; font-size: 1.2rem; color: #3a3631; }
.ps-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.ps-school { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.ps-school svg { width: 30px; height: 30px; }
.ps-chip { padding: 5px 16px; border-radius: 999px; background: #ece7db; font-weight: 600; }
.ps-hero-art { position: absolute; right: 0; top: 0; height: 100%; width: 62%; object-fit: cover; object-position: center 78%; pointer-events: none; user-select: none; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40%); mask-image: linear-gradient(to right, transparent 0, #000 40%); }

.ps-cta { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 0 18px; margin: 0 0 20px; padding: 22px 30px; border-radius: 12px; background: var(--hot); color: #fff !important; text-decoration: none; }
.ps-cta svg { grid-row: 1 / 3; width: 38px; height: 38px; stroke: none; }
.ps-cta-title { font: 800 1.9rem/1.1 system-ui, sans-serif; letter-spacing: -.02em; }
.ps-cta-sub { align-self: center; padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .5); opacity: .95; }
.ps-cta:hover { filter: brightness(1.06); }
.ps-cta.off { background: #ece9e1; color: #4a453e !important; }
.ps-cta.off svg { fill: none; stroke: currentColor; stroke-width: 1.7; width: 34px; height: 34px; }
.ps-cta.off:hover { filter: none; }

.ps-h { margin: 6px 0 12px; font: 800 .88rem/1.2 system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #3b4a60; }
.ps-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 18px; margin-bottom: 22px; }
.ps-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px 18px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.ps-card.live { border-left: 5px solid var(--hot); }
.ps-ic { width: 76px; height: 76px; border-radius: 12px; display: grid; place-items: center; background: #e3f3e8; color: #166534; }
.ps-ic svg { width: 44px; height: 44px; stroke-width: 1.6; }
.ps-ic.s-gladi, .ps-ic.s-penyisihan_antar, .ps-ic.s-penyisihan_internal { background: #ffe9df; color: var(--hot); }
.ps-ic.s-final { background: #14110f; color: var(--hot); }
.ps-card-body { min-width: 0; }
.ps-status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #e3f3e8; color: #166534; }
.ps-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.ps-status.s-scheduled { background: #fff1d6; color: #8a5a00; }
.ps-status.s-scheduled::before { background: #f59e0b; }
.ps-card h3 { margin: 0; font: 800 1.35rem/1.15 system-ui, sans-serif; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ps-meta { margin: 4px 0 0; color: #2f2c28; font-weight: 500; }
.ps-desc { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.ps-card-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.ps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex: 1 1 10rem; padding: 14px 22px; border-radius: 6px; border: 1.5px solid var(--ink); background: #fff; font-weight: 800; text-decoration: none; }
.ps-btn.hot { background: var(--hot); border-color: var(--hot); color: #fff !important; }
.ps-btn:hover { filter: brightness(.97); }
.ps-btn.hot:hover { filter: brightness(1.07); }
.ps-btn.small { flex: none; padding: 9px 16px; font-size: .92rem; font-weight: 700; }
.ps-link { font-weight: 600; color: var(--hot) !important; text-decoration: none; }
.ps-empty { margin: 0 0 18px; padding: 22px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #d8d1c3; border-radius: 12px; }
.ps-empty.small { padding: 12px; border: 0; background: none; text-align: left; }

.ps-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ps-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; min-width: 0; }
.ps-panel h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 1.35rem/1.2 system-ui, sans-serif; letter-spacing: -.02em; }
.ps-panel h2 svg { width: 26px; height: 26px; color: var(--hot); }
.ps-sub { margin: 4px 0 14px; color: var(--muted); }
.ps-results { list-style: none; margin: 0; padding: 0; }
.ps-results li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.ps-res-main { display: grid; line-height: 1.3; min-width: 0; }
.ps-res-main b { overflow-wrap: anywhere; }
.ps-res-main span, .ps-res-score span { color: var(--muted); font-size: .9rem; }
.ps-res-score { display: grid; gap: 6px; }
.ps-bar { width: 100%; height: 9px; border: 0; border-radius: 999px; appearance: none; -webkit-appearance: none; background: #ece7db; }
.ps-bar::-webkit-progress-bar { background: #ece7db; border-radius: 999px; }
.ps-bar::-webkit-progress-value { border-radius: 999px; background: #16a34a; }
.ps-bar::-moz-progress-bar { border-radius: 999px; background: #16a34a; }
.ps-bar.mid::-webkit-progress-value { background: #f59e0b; } .ps-bar.mid::-moz-progress-bar { background: #f59e0b; }
.ps-bar.low::-webkit-progress-value { background: #ef4444; } .ps-bar.low::-moz-progress-bar { background: #ef4444; }
.ps-pct { min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.ps-info { display: grid; gap: 10px; margin-top: 12px; }
.ps-info article { padding: 14px 16px; border-radius: 8px; background: #fff1ea; border: 1px solid #ffd9c7; }
.ps-info b { color: #c2410c; }
.ps-info p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; color: #3a3631; }
.ps-help { display: flex; gap: 14px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.ps-help svg { width: 28px; height: 28px; flex: none; color: var(--ink); }
.ps-help b { color: var(--ink); }
.ps-tabbar { display: none; }

@media (max-width: 60rem) {
  .ps-split { grid-template-columns: 1fr; }
  .ps-results li { grid-template-columns: minmax(0, 1fr) auto; }
  .ps-res-score { grid-column: 1 / -1; grid-row: 2; }
  .ps-pct { display: none; }
}
@media (max-width: 46rem) {
  .ps { padding: 0 16px 90px; }
  .ps-nav { display: none; }
  .ps-top { justify-content: space-between; padding: 12px 0; }
  .ps-brand { font-size: 1.15rem; }
  .ps-user b { display: none; }
  .ps-hero { min-height: 0; padding: 6px 0 0; display: block; }
  .ps-hero-text { max-width: none; }
  .ps-hero-art { position: relative; display: block; width: calc(100% + 32px); height: 12rem; margin: 14px -16px 0; -webkit-mask-image: none; mask-image: none; border-radius: 0; }
  .ps-cta { grid-template-columns: auto 1fr; padding: 18px 20px; border-radius: 12px; }
  .ps-cta-title { font-size: 1.5rem; }
  .ps-cta-sub { grid-column: 2; padding-left: 0; border-left: 0; font-size: .9rem; }
  .ps-card { padding: 16px; grid-template-columns: auto 1fr; }
  .ps-ic { width: 60px; height: 60px; }
  .ps-ic svg { width: 34px; height: 34px; }
  .ps-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .ps-tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; text-decoration: none; font-size: .78rem; font-weight: 600; color: #4a453e; border-bottom: 3px solid transparent; }
  .ps-tabbar a svg { width: 24px; height: 24px; }
  .ps-tabbar a[aria-current="page"] { color: var(--hot); border-bottom-color: var(--hot); }
}

/* ---------- Ruang Latihan ---------- */
.ps-pagehead { padding: 8px 0 14px; }
.ps-pagehead h1 { margin: 0; font: 900 clamp(1.9rem, 4.4vw, 2.8rem)/1.05 "Arial Black", Impact, system-ui, sans-serif; letter-spacing: -.04em; }
.ps-pagehead .ps-lead { margin: 8px 0 0; }
.ps-crumb { margin: 4px 0 0; font-weight: 600; }
.ps-crumb a { text-decoration: none; color: var(--hot); }
.ps-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; }
.ps-stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ps-stats div { display: grid; padding: 16px 20px; line-height: 1.2; }
.ps-stats div + div { border-left: 1px solid var(--line); }
.ps-stats b { font: 800 1.9rem/1.1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ps-stats span { color: var(--muted); }
.ps-stats .good b { color: #15803d; }
.ps-stats .bad b { color: #b91c1c; }
.ps-ic.s-latihan { background: #e3f3e8; color: #166534; }
.ps-leftcol { display: grid; gap: 20px; min-width: 0; }
.ps-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ps-panel.gap { margin-top: 20px; }
.ps-again { margin: 20px 0 0; }
.ps-again .ps-btn { display: inline-flex; flex: none; }
.ps-btn.big { padding: 16px 28px; font-size: 1.1rem; width: 100%; flex: none; }

.lt-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lt-form { display: grid; gap: 16px; }
.lt-packs { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.lt-packs legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.lt-pack { position: relative; display: block; cursor: pointer; }
.lt-pack input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lt-pack-body { display: grid; gap: 2px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.lt-pack-body small { color: var(--muted); }
.lt-pack-meta { font: 600 .78rem/1.2 ui-monospace, Consolas, monospace; color: #7a7266; margin-top: 4px; }
.lt-pack:hover .lt-pack-body { border-color: #c9bfae; }
.lt-pack input:checked + .lt-pack-body { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot) inset; background: #fff8f4; }
.lt-pack input:focus-visible + .lt-pack-body { outline: 3px solid rgba(255, 74, 20, .4); outline-offset: 2px; }
.lt-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lt-opts label { display: grid; gap: 4px; font-weight: 700; font-size: .92rem; }
.lt-opts select { height: 46px; padding: 0 12px; border: 1px solid #d8d1c3; border-radius: 6px; background: #fff; font: inherit; color: var(--ink); }

.ps-bar.big { height: 14px; }
.ps-tablewrap { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.ps-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ps-table th, .ps-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.ps-table th { background: #faf6ec; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ps-table td.num, .ps-table th.num { text-align: right; }
.ps-table td.q { font-weight: 700; }
.ps-table tr:last-child td { border-bottom: 0; }
.ps-ok { padding: 2px 10px; border-radius: 6px; background: #dcfce7; color: #166534; font-weight: 700; font-size: .85rem; }
.ps-no { padding: 2px 10px; border-radius: 6px; background: #fee2e2; color: #991b1b; font-weight: 700; font-size: .85rem; }

.stop-form { margin: 14px 0 0; text-align: center; }

.lt-admin { gap: 12px; }
.lt-admin li { display: block; padding: 14px; }
.lt-admin-row { display: grid; grid-template-columns: minmax(10rem, 1fr) auto minmax(12rem, 2fr) auto; align-items: end; gap: 12px 18px; }
.lt-admin-info { display: grid; line-height: 1.25; }
.lt-admin-info small { color: var(--muted); }
.lt-desc { display: grid; gap: 4px; font-weight: 600; font-size: .85rem; }
.adm-panel.gap { margin-top: 20px; }

@media (max-width: 60rem) {
  .lt-split { grid-template-columns: 1fr; }
  .ps-stats.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-stats.five div:nth-child(odd) { border-left: 0; }
  .ps-stats.five div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lt-admin-row { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 46rem) {
  .ps-stats div { padding: 12px 14px; }
  .ps-stats b { font-size: 1.5rem; }
  .lt-opts { grid-template-columns: 1fr; }
}

/* ---------- Arena (latihan dan lomba) ---------- */
/* Tema: terang bawaan; gelap mengikuti pengaturan perangkat atau pilihan pengguna (data-theme). */
.ar {
  --hot: #ff4a14; --ink: #14110f; --muted: #5f5a53; --sub: #2f3646;
  --bg: #fdfaf3; --card: #fff; --line: #e8e1d4; --track: #e9e6df;
  --top: #1a2233; --top-line: transparent;
  --input: #fff; --input-line: #d8d1c3; --chip: #ece9e2; --chip-ink: #4a453e; --dot: #9a9387;
  --soft: #ffe9df; --soft-ink: #c2410c; --key: #f3f0e9; --key-line: #ddd6c8; --key-on: #e6e1d6;
  --ok: #15803d; --bad: #b91c1c; --warn: #a16207; --stop-hover: #fef2f2; --head-ink: #3b4a60;
  --sun: none; --moon: inline-block; --tag-l: none; --tag-d: inline-block;
}
.ar[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  .ar:not([data-theme="light"]) { color-scheme: dark; }
}
.ar[data-theme="dark"], .ar.ar-waiting {
  --ink: #f3f5f9; --muted: #9aa6bd; --sub: #c4cddd;
  --bg: #0e1520; --card: #131b29; --line: #243047; --track: #1f2a3d;
  --top: #0f1623; --top-line: #1f2a3d;
  --input: #0b111b; --input-line: #2b3850; --chip: #1a2436; --chip-ink: #c4cddd; --dot: #6c7a93;
  --soft: rgba(255, 74, 20, .18); --soft-ink: #ff8a5f; --key: #1b2638; --key-line: #2a3850; --key-on: #243148;
  --ok: #4ade80; --bad: #f87171; --warn: #fbbf24; --stop-hover: rgba(220, 38, 38, .12); --head-ink: #9fb0cc;
  --sun: inline-block; --moon: none; --tag-l: inline-block; --tag-d: none;
}
@media (prefers-color-scheme: dark) {
  .ar:not([data-theme="light"]) {
    --ink: #f3f5f9; --muted: #9aa6bd; --sub: #c4cddd;
    --bg: #0e1520; --card: #131b29; --line: #243047; --track: #1f2a3d;
    --top: #0f1623; --top-line: #1f2a3d;
    --input: #0b111b; --input-line: #2b3850; --chip: #1a2436; --chip-ink: #c4cddd; --dot: #6c7a93;
    --soft: rgba(255, 74, 20, .18); --soft-ink: #ff8a5f; --key: #1b2638; --key-line: #2a3850; --key-on: #243148;
    --ok: #4ade80; --bad: #f87171; --warn: #fbbf24; --stop-hover: rgba(220, 38, 38, .12); --head-ink: #9fb0cc;
    --sun: inline-block; --moon: none; --tag-l: inline-block; --tag-d: none;
  }
}

.ar { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ar [hidden] { display: none !important; }
.ar svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ar-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 40px; background: var(--top); border-bottom: 1px solid var(--top-line); color: #fff; }
.ar-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; justify-self: start; }
.ar-brand { font: 800 1.45rem/1 system-ui, sans-serif; letter-spacing: -.02em; }
.ar-brand span { color: var(--hot); }
.ar-mode { padding: 9px 30px; border: 1.5px solid var(--hot); border-radius: 999px; color: var(--hot); font: 800 .85rem/1 system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.ar-right { justify-self: end; display: inline-flex; align-items: center; gap: 14px; }
.ar-user { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.ar-avatar { width: 38px; height: 38px; border-radius: 50%; background: #f7c9b4; color: #8a2a0a; display: grid; place-items: center; font-weight: 800; text-transform: uppercase; }
.ar-theme { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.ar-theme:hover { border-color: var(--hot); color: var(--hot); }
.ar-theme svg { width: 20px; height: 20px; }
.ar-theme .sun { display: var(--sun); }
.ar-theme .moon { display: var(--moon); }

.ar-main { flex: 1; width: 100%; max-width: 62rem; margin: 0 auto; padding: 26px 24px 20px; }
.ar-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.ar-crumb { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 1.05rem; }
.ar-crumb a { color: inherit; text-decoration: none; }
.ar-crumb a:hover { color: var(--hot); }
.ar-crumb b { color: var(--hot); font-weight: 500; }
.ar-head h1 { margin: 0; font: 800 clamp(2rem, 5vw, 3rem)/1.05 system-ui, "Segoe UI", sans-serif; letter-spacing: -.035em; }
.ar-sub { margin: 6px 0 0; font-size: 1.2rem; color: var(--sub); }
.ar-timer { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; min-width: 15rem; padding: 14px 20px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.ar-timer svg { width: 38px; height: 38px; color: var(--hot); }
.ar-timer-lbl { display: block; font: 700 .75rem/1.2 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ar-timer strong { display: block; font: 800 2.6rem/1.05 system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ar-timer-bar { grid-column: 1 / -1; width: 100%; height: 6px; border: 0; border-radius: 999px; appearance: none; -webkit-appearance: none; background: var(--track); margin-top: 4px; }
.ar-timer-bar::-webkit-progress-bar { background: var(--track); border-radius: 999px; }
.ar-timer-bar::-webkit-progress-value { background: var(--hot); border-radius: 999px; transition: width .25s linear; }
.ar-timer-bar::-moz-progress-bar { background: var(--hot); border-radius: 999px; }
.ar-timer.low strong { color: var(--bad); }
.ar-timer.low .ar-timer-bar::-webkit-progress-value { background: #dc2626; }

.ar-stats { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.ar-stats > div { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 12px; font-size: 1.15rem; }
.ar-stats > div + div { border-left: 1px solid var(--line); }
.ar-stats svg { width: 30px; height: 30px; flex: none; }
.ar-stats .star { fill: #f59e0b; stroke: #f59e0b; }
.ar-stats .ok { fill: #16a34a; stroke: #fff; }
.ar-stats .no { fill: #ef4444; stroke: #fff; }
.ar-stats b { font: 800 1.6rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ar-stats .of { color: var(--muted); font-weight: 600; }

.ar-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px 30px 26px; }
.ar-card.center { text-align: center; padding: 40px 24px; }
.ar-card h2 { margin: 0 0 8px; }
.ar-card .muted { color: var(--muted); }
.ar-count { font: 800 3.4rem/1.1 system-ui, sans-serif; font-variant-numeric: tabular-nums; margin: 6px 0 12px; color: var(--hot); }
.ar-play { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px 30px 26px; }
.ar-blk.padcard { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ar-progress-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .95rem; color: var(--muted); }
.ar-progress-head span:first-child { font: 700 .8rem/1.4 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--head-ink); }
.ar-bar { height: 12px; margin: 10px 0 24px; border-radius: 999px; background: var(--track); overflow: hidden; }
.ar-bar #bar { height: 100%; width: 0; background: var(--hot); border-radius: 999px; transition: width .35s ease; }
.ar-qno { margin: 0; text-align: center; }
.ar-qno > span { display: inline-block; padding: 7px 24px; border-radius: 999px; background: var(--soft); color: var(--soft-ink); font: 800 .85rem/1 system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.ar-question { margin: 16px 0 26px; text-align: center; font: 800 clamp(2.4rem, 8vw, 4.4rem)/1.1 system-ui, "Segoe UI", sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; word-break: break-word; }
.ar-answer label { display: block; margin-bottom: 8px; font-weight: 800; font-size: 1.1rem; }
.ar-answer-row { display: flex; gap: 14px; }
.ar-answer-row input { flex: 1; min-width: 0; height: 64px; padding: 0 20px; border: 1.5px solid var(--input-line); border-radius: 6px; background: var(--input); font: 600 1.4rem system-ui, sans-serif; color: var(--ink); }
.ar-answer-row input::placeholder { color: var(--muted); opacity: .8; }
.ar-answer-row input:focus { outline: none; border-color: var(--hot); box-shadow: 0 0 0 3px rgba(255, 74, 20, .22); }
.ar-send { height: 64px; padding: 0 30px; border: 0; border-radius: 6px; background: var(--hot); color: #fff; font: 800 1.15rem system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.ar-send:hover:not(:disabled) { filter: brightness(1.07); }
.ar-send:disabled { opacity: .7; cursor: progress; }
.ar-hint { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; color: var(--muted); font-size: .95rem; }
.ar-hint svg { width: 28px; height: 28px; }
.ar-formats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.ar-formats b { flex-basis: 100%; font-size: 1.05rem; }
.ar-formats span { padding: 8px 16px; border-radius: 6px; background: var(--chip); font-size: 1.02rem; border: 1px solid var(--line); }
.ar-formats i { font-style: normal; color: var(--chip-ink); }
.ar-formats em { color: var(--dot); font-style: normal; }
.ar .feedback { min-height: 1.6em; margin: 12px 0 0; text-align: center; font-weight: 700; font-size: 1.1rem; }
.ar .feedback.ok { color: var(--ok); } .ar .feedback.bad { color: var(--bad); } .ar .feedback.warn { color: var(--warn); }
.ar .notice.err { background: rgba(220, 38, 38, .15); color: var(--bad); }

.ar-m-kicker, .ar-m-title, .ar-prog-m, .h-m, .ar-ex { display: none; }
.ar-pad-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 0 10px; border: 0; background: none; font: 800 1.05rem system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.ar-pad-head span { transition: transform .15s; }
.ar-pad-head[aria-expanded="false"] span { transform: rotate(-90deg); }
.ar .keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 0; }
.ar .key { height: 54px; padding: 0; border-radius: 8px; border: 1px solid var(--key-line); background: var(--key); font-size: 1.5rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.ar .key.text { font-size: 1.05rem; font-weight: 600; }
.ar .key:active { background: var(--key-on); }
.ar-ex { align-items: center; gap: 6px; margin-left: auto; padding: 0; border: 0; background: none; font: 600 1rem system-ui, sans-serif; color: var(--hot); text-decoration: underline; cursor: pointer; }

.ar-endstats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; }
.ar-endstats > div { display: grid; padding: 14px 8px; }
.ar-endstats > div + div { border-left: 1px solid var(--line); }
.ar-endstats b { font: 800 2rem/1.1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ar-endstats span { color: var(--muted); }
.ar-endact { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ar-btn { padding: 13px 26px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 800; }
.ar-btn.hot { background: var(--hot); border-color: var(--hot); color: #fff; }
.ar-btn:hover { filter: brightness(.97); }

.ar-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 40px 22px; }
.ar-tag { display: inline-flex; align-items: center; gap: 14px; font-style: italic; color: var(--muted); }
.ar-tag .logo-d { display: var(--tag-d); }
.ar-tag .logo-l { display: var(--tag-l); }
.ar-stop { display: inline-flex; align-items: center; gap: 12px; padding: 12px 24px; border: 1.5px solid #dc2626; border-radius: 6px; background: var(--card); color: var(--bad); font: 800 1rem system-ui, sans-serif; cursor: pointer; }
.ar-stop i { width: 16px; height: 16px; border-radius: 2px; background: #dc2626; }
.ar-stop:hover { background: var(--stop-hover); }
.ar-conn { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.ar-conn i { width: 14px; height: 14px; border-radius: 50%; background: #22c55e; }
.ar-conn.off { color: var(--bad); }
.ar-conn.off i { background: #ef4444; }

@media (max-width: 46rem) {
  .ar-top { grid-template-columns: 1fr auto; padding: 14px 18px; }
  .ar-mode, .ar-uname { display: none; }
  .ar-brand { font-size: 1.25rem; }
  .ar-logo img { width: 48px; height: auto; }
  .ar-avatar { width: 42px; height: 42px; }
  .ar-theme { width: 40px; height: 40px; }
  .ar-main { padding: 14px 14px 10px; }

  .ar-head { flex-wrap: nowrap; align-items: center; gap: 0; margin-bottom: 14px; }
  .ar-head-main { flex: 1; min-width: 0; }
  .ar-crumb, .ar-head h1, .ar-sub { display: none; }
  .ar-m-kicker { display: block; margin: 0; font: 700 1rem/1.3 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--hot); }
  .ar-m-title { display: block; margin: 2px 0 0; font: 800 1.9rem/1.1 system-ui, sans-serif; letter-spacing: -.02em; overflow-wrap: anywhere; }
  .ar-timer { flex: none; width: auto; min-width: 0; margin-left: 14px; padding: 4px 0 4px 16px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; grid-template-columns: auto auto; gap: 0 10px; }
  .ar-timer svg { width: 34px; height: 34px; }
  .ar-timer-bar { display: none; }
  .ar-timer strong { font-size: 2.5rem; }

  .ar-stats > div { flex-direction: row; gap: 8px; padding: 12px 4px; font-size: .95rem; }
  .ar-stats svg { width: 28px; height: 28px; }
  .ar-stats b { font-size: 1.35rem; }

  .ar-card { padding: 18px 16px 20px; }
  .ar-play { padding: 0; border: 0; background: none; border-radius: 0; }
  .ar-blk { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
  .ar-blk.padcard { margin-top: 0; padding-top: 12px; }
  .ar-progress-head .ar-prog-d { display: none; }
  .ar-progress-head .ar-prog-m { display: inline; }
  .ar-bar { margin: 8px 0 2px; height: 14px; }
  .ar-qno { margin-top: 4px; }
  .ar-question { margin: 14px 0 20px; font-size: clamp(2.6rem, 13vw, 3.6rem); letter-spacing: -.04em; }
  .ar-answer-row { flex-direction: column; gap: 12px; }
  .ar-answer-row input { height: 56px; flex: none; font-size: 1.2rem; }
  .ar-send { height: 58px; width: 100%; font-size: 1.15rem; }
  .ar-hint .h-d { display: none; }
  .ar-hint .h-m { display: inline; }
  .ar-hint .ar-ex { display: inline-flex; }
  .ar-hint svg { width: 24px; height: 24px; }
  .ar-formats { display: none; margin-top: 12px; padding-top: 12px; }
  .ar-formats.open { display: flex; }
  .ar-foot { flex-wrap: nowrap; padding: 4px 14px 22px; }
  .ar-tag { display: none; }
  .ar-stop { padding: 12px 18px; font-size: .98rem; }
  .ar-formats span { padding: 6px 10px; font-size: .92rem; }
  .ar-endstats { grid-template-columns: repeat(2, 1fr); }
  .ar-endstats > div:nth-child(3) { border-left: 0; }
  .ar-endstats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Admin: isi paket soal */
.pk-table td { vertical-align: top; }
.pk-table tr.off td { opacity: .55; }
.pk-table code { font-size: .78rem; }
.pk-samples { display: grid; gap: 4px; }
.pk-samples span { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 22rem; margin-left: auto; }
.pk-actions form { display: inline-flex; gap: 4px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.adm-panel.danger-zone { border-color: #f3c6bd; }
.kchip.small { padding: 1px 10px; font-size: .75rem; }
.kchip.alt { background: #ece9e2; color: #4a453e; }
.lt-restrict { margin-top: 4px; }
.pk-limit { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.pk-limit legend { font-weight: 700; font-size: .92rem; padding: 0 6px; }
.pk-limit-cols { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(14rem, 2fr); gap: 16px 28px; }
.pk-limit-cols > div { display: grid; gap: 6px; align-content: start; }
.pk-schools { display: grid; gap: 4px; max-height: 11rem; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pk-schools .check, .pk-limit-cols .check { font-weight: 500; }
@media (max-width: 52rem) { .pk-limit-cols { grid-template-columns: 1fr; } }

/* Mode lanjutan paket */
details.adv > summary { list-style: none; cursor: pointer; display: grid; gap: 2px; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary h2 { margin: 0; font: 800 1.2rem/1.2 system-ui, sans-serif; }
details.adv > summary h2::before { content: "\25B8"; display: inline-block; margin-right: 8px; transition: transform .15s; color: var(--hot); }
details.adv[open] > summary h2::before { transform: rotate(90deg); }
.adv-body { margin-top: 14px; display: grid; gap: 14px; }
.adv-help p { margin: 6px 0; }
.adv-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .92rem; }
.adv-table th, .adv-table td { text-align: left; padding: 6px 10px; border: 1px solid var(--line); vertical-align: top; }
.adv-table th { background: #faf6ec; }
.adv-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adv-results li { padding: 10px 14px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; background: #fff; }
.adv-results li.ok { border-left-color: #16a34a; }
.adv-results li.bad { border-left-color: #dc2626; background: #fef6f5; }
.adv-results p { margin: 4px 0 0; }
.adv-err { color: #b91c1c; font-weight: 600; }

/* Hitung mundur mulai sesi */
.countdown-box h3 { margin: 0 0 4px; }
.cd-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.cd-custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cd-custom label { max-width: 14rem; }

/* ---------- Ruang tunggu (selalu gelap, latar balap) ---------- */
.ar-brandbox { display: grid; line-height: 1.1; }
.ar-brand-sub, .ar-wait-h, .ar-wait-sub { display: none; }
.ar.ar-waiting { color-scheme: dark; background: #0a1018 url(/static/ruang-tunggu.webp) left bottom / cover no-repeat; }
.ar-waiting .ar-brand-sub { display: block; font: italic 500 .62rem/1.3 ui-monospace, Consolas, monospace; letter-spacing: .22em; color: #9aa6bd; margin-top: 2px; }
.ar-waiting .ar-mode, .ar-waiting .ar-theme, .ar-waiting .ar-conn, .ar-waiting .ar-head h1:not(.ar-wait-h), .ar-waiting .ar-sub, .ar-waiting .ar-timer, .ar-waiting .ar-m-kicker, .ar-waiting .ar-m-title { display: none; }
.ar-waiting .ar-wait-h { display: block; margin: 0; font: 800 clamp(2.2rem, 5.5vw, 3.6rem)/1.05 system-ui, "Segoe UI", sans-serif; letter-spacing: -.035em; }
.ar-waiting .ar-wait-sub { display: block; margin: 8px 0 0; font-size: 1.2rem; color: #c4cddd; }
.ar-waiting .ar-foot { justify-content: flex-end; }
.ar-waiting .ar-main { max-width: 82rem; }
.ar-waiting .ar-crumb b { color: var(--hot); }

.ar-glass { background: rgba(14, 21, 33, .8); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ar-wait-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ar-wait-main { position: relative; padding: 22px 28px 30px; text-align: center; }
.ar-wait-side { padding: 22px 26px; display: grid; gap: 4px; }
.ar-wait-tag { display: flex; align-items: center; gap: 12px; margin: 0; font: 800 .78rem/1 system-ui, sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #dbe3f0; }
.ar-wait-tag i { width: 3px; height: 16px; background: var(--hot); transform: skewX(-18deg); }
.ar-wait-main .ar-wait-tag { position: absolute; left: 26px; top: 26px; }
.ar-lights { display: flex; justify-content: center; gap: 12px; padding: 4px 0 18px; }
.ar-lights i { width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #232a36 0 38%, #11161f 40% 100%); box-shadow: 0 0 0 5px #0a0e15, 0 0 0 6px #2a3445 inset, 0 4px 14px rgba(0, 0, 0, .6); transition: background .12s, box-shadow .12s; }
.ar-lights i.on { background: radial-gradient(circle at 50% 40%, #ffb199 0 14%, #ff3b1d 34%, #b3200a 100%); box-shadow: 0 0 0 5px #0a0e15, 0 0 26px 6px rgba(255, 74, 20, .75); }
.ar-wait-chip { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 0; padding: 9px 22px; border-radius: 999px; background: #1a2436; border: 1px solid #2a3850; font-weight: 700; }
.ar-wait-chip svg { width: 22px; height: 22px; }
.ar-wait-main h2 { margin: 14px 0 6px; font: 800 clamp(2rem, 4.6vw, 3rem)/1.1 system-ui, sans-serif; letter-spacing: -.03em; }
.ar-wait-lbl { margin: 0; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; color: #dbe3f0; }
.ar-cd { display: inline-grid; grid-template-columns: auto auto auto; align-items: center; justify-content: center; column-gap: 8px; margin-top: 8px; color: var(--hot); font-variant-numeric: tabular-nums; }
.ar-cd .d { font: 800 clamp(4.2rem, 11vw, 7.6rem)/1 system-ui, sans-serif; letter-spacing: -.02em; text-shadow: 0 0 30px rgba(255, 74, 20, .25); min-width: 1.15ch; }
.ar-cd i { font: 800 clamp(3.4rem, 9vw, 6.2rem)/1 system-ui, sans-serif; font-style: normal; transform: translateY(-.06em); }
.ar-cd small { font: 700 .85rem/1 system-ui, sans-serif; letter-spacing: .3em; color: #9fb0cc; margin-top: 2px; }
.ar-segs { display: flex; justify-content: center; gap: 10px; margin: 18px 0 20px; }
.ar-segs i { width: 62px; height: 5px; border-radius: 99px; background: #2c3648; transition: background .25s; }
.ar-segs i.on { background: var(--hot); }
.ar-wait-note { margin: 0; color: #c4cddd; line-height: 1.5; }
.ar-wait-note b { color: #fff; }

.ar-wait-side h3 { margin: 14px 0 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); font: 800 1.45rem/1.2 system-ui, sans-serif; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ar-detail { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ar-detail > svg { width: 42px; height: 42px; flex: none; color: var(--hot); stroke-width: 1.6; }
.ar-detail small { display: block; color: #9fb0cc; font-size: .9rem; }
.ar-detail b { font-size: 1.25rem; }
.ar-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.ar-steps li { display: flex; align-items: center; gap: 14px; color: #dbe3f0; }
.ar-steps li span { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #1d2a40; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.ar-wconn { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; }
.ar-wconn i { width: 16px; height: 16px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, .7); }
.ar-wconn span { display: grid; line-height: 1.25; }
.ar-wconn b { color: #4ade80; }
.ar-wconn small { color: #9fb0cc; }
.ar-wconn.off i { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, .7); }
.ar-wconn.off b { color: #f87171; }

@media (max-width: 62rem) {
  .ar-wait-grid { grid-template-columns: 1fr; }
}
@media (max-width: 46rem) {
  .ar.ar-waiting { background-size: 190% auto; background-position: 10% bottom; }
  .ar-waiting .ar-wait-h { font-size: 2.3rem; }
  .ar-waiting .ar-wait-sub { font-size: 1.05rem; }
  .ar-waiting .ar-crumb { display: flex; }
  .ar-wait-main { padding: 56px 16px 24px; }
  .ar-wait-main .ar-wait-tag { left: 16px; top: 18px; }
  .ar-lights { gap: 8px; }
  .ar-lights i { width: 44px; height: 44px; }
  .ar-segs i { width: 44px; }
  .ar-wait-side { padding: 18px; }
  .ar-waiting .ar-foot { padding-bottom: 14px; }
  .ar-waiting .ar-tag { display: inline-flex; }
}

/* ---------- Arena mode lomba ---------- */
.m-mode, .posm, .comp-sf, .ar-m-cat { display: none; }
.comp .ar-brand-sub { display: block; font: 500 .72rem/1.3 system-ui, sans-serif; letter-spacing: .04em; color: #9aa6bd; margin-top: 2px; }
.comp .ar-brand { font-size: 1.8rem; }
.comp .ar-mode { display: inline-flex; align-items: center; gap: 10px; padding: 11px 32px; font-size: 1.05rem; letter-spacing: .08em; }
.comp .ar-mode svg { width: 22px; height: 22px; }
.comp .ar-avatar { background: #2563eb; color: #fff; }
.comp .ar-main { max-width: 96rem; padding-top: 14px; }
.comp .ar-crumb { align-items: center; gap: 10px; font-size: 1rem; margin-bottom: 8px; }
.comp .ar-crumb .home { display: inline-flex; color: var(--muted); }
.comp .ar-crumb .home svg { width: 22px; height: 22px; }
.comp .ar-crumb b { color: var(--muted); font-weight: 400; }
.comp .ar-head h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); letter-spacing: -.03em; }
.comp .ar-head { align-items: flex-end; }

.cstats { display: grid; grid-template-columns: 1.25fr 1.2fr .85fr .8fr 1.25fr .8fr; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.cs { display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-width: 0; }
.cs + .cs { border-left: 1px solid var(--line); }
.cs.mtimer { display: none; }
.cs svg { width: 44px; height: 44px; flex: none; color: var(--hot); stroke-width: 1.6; }
.cs svg.okc { fill: #16a34a; stroke: #fff; }
.cs svg.star { fill: #f59e0b; stroke: #f59e0b; }
.cs.speed svg { color: #22b8e6; }
.cs.left svg { color: var(--ink); }
.cs small { display: block; font: 600 .78rem/1.2 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cs b { font: 800 2.6rem/1.05 system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs i { font: 400 1rem/1.25 system-ui, sans-serif; font-style: normal; color: var(--muted); }
.cs.left b { white-space: normal; }
@media (max-width: 46rem) { .cs.left i { display: block; margin-top: 2px; } }
.cs.speed span { display: block; color: var(--sub); font-size: .95rem; }
.cs.speed em { display: block; font-style: normal; color: var(--muted); font-size: .75rem; }
.cs.cat b { font-size: 1.35rem; }
.cs.cat small { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 500; }

.comp .ar-play { padding: 0; border: 0; background: none; border-radius: 0; display: grid; gap: 14px; }
.comp .ar-blk { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.cseg { display: flex; gap: 8px; }
.cseg i { flex: 1; height: 16px; border-radius: 99px; background: var(--track); transition: background .3s; }
.cseg i.on { background: var(--hot); }
.cprog { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--sub); }
.cprog b { font-size: 1.3rem; color: var(--ink); }
.comp-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.comp-left { display: grid; gap: 14px; min-width: 0; }
.comp-right { display: grid; gap: 14px; min-width: 0; }
.comp .qcard { padding: 22px 26px 18px; }
.comp .ar-qno { text-align: left; }
.comp .ar-qno > span { border-radius: 8px; background: #20304c; color: #cfe0ff; letter-spacing: .08em; padding: 9px 18px; }
.comp .ar-question { margin: 10px 0 28px; font-size: clamp(2.6rem, 6vw, 4.2rem); }
.comp .ar-answer label { font-weight: 500; font-size: 1.05rem; color: var(--sub); }
.comp .ar-answer-row input { height: 62px; }
.comp .ar-send { height: 62px; }
.comp .h-f { display: inline-flex; gap: 10px; align-items: center; }
.comp .h-f i { font-style: normal; color: var(--dot); }
.comp .h-f em { font-style: normal; color: var(--dot); }
.comp .ar-hint svg { display: none; }
.comp .ar-hint { margin-top: 12px; color: #8fb5ff; gap: 14px; }
.comp .ar-formats { display: none; }
.comp-wrong { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 1.05rem; color: var(--sub); }
.comp-wrong b { color: var(--ink); }
.comp-wrong .of { color: var(--muted); }

.pos h3, .fokus h3 { margin: 0 0 12px; font: 800 1.3rem/1.2 system-ui, sans-serif; letter-spacing: -.01em; }
.near { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.near li { display: grid; grid-template-columns: 1.6rem 2.4rem 1fr auto auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; border: 1px solid transparent; background: rgba(255, 255, 255, .03); font-variant-numeric: tabular-nums; }
.near li.me { background: rgba(255, 74, 20, .22); border-color: var(--hot); }
.near .rk { font-weight: 700; }
.near .av { width: 36px; height: 36px; border-radius: 50%; background: #34527a; display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: #fff; }
.near li.me .av { background: #2563eb; }
.near .nm { font-size: 1.05rem; }
.near em { font-style: normal; font: 800 .75rem/1 system-ui, sans-serif; letter-spacing: .08em; background: var(--hot); color: #fff; padding: 6px 12px; border-radius: 999px; }
.near b { font-size: 1.05rem; }
.pos-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
.pos-foot .live { display: inline-flex; align-items: center; gap: 8px; }
.pos-foot .live i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; }
.fokus .trackart { width: 100%; height: auto; display: block; }
.wrongbox { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font-size: .9rem; color: var(--sub); }
.pips { display: inline-flex; gap: 5px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; background: var(--track); }
.pips i.on { background: #ef4444; }
.pips.warn i:not(.on) { box-shadow: 0 0 0 1px #f59e0b; }

.near-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.near-chips .chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--chip); color: var(--ink); }
.near-chips .chip i { width: 32px; height: 32px; border-radius: 50%; background: #34527a; color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 700; }
.near-chips .chip.me i { background: var(--hot); }

@media (max-width: 62rem) {
  .cstats { grid-template-columns: repeat(3, 1fr); }
  .cs:nth-child(4) { border-left: 0; }
  .cs:nth-child(n+4) { border-top: 1px solid var(--line); }
  .comp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 46rem) {
  .comp .ar-top { grid-template-columns: 1fr auto; }
  .comp .ar-top .ar-mode { display: none; }
  .comp .ar-brand { font-size: 1.5rem; }
  .comp .m-mode { display: block; margin: 0 0 12px; }
  .comp .m-mode .ar-mode { display: inline-flex; padding: 10px 26px; font-size: .95rem; }
  .comp .ar-main { padding: 12px 14px 8px; }
  .comp .ar-head { margin-bottom: 12px; align-items: baseline; }
  .comp .ar-m-kicker { display: none; }
  .comp .ar-m-title { font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; color: #cfe0ff; margin: 0; }
  .comp .ar-head-main { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px; }
  .comp .ar-m-title { grid-column: 1; }
  .comp .ar-m-cat { display: block; grid-column: 2; grid-row: 1; margin: 0; font: 800 1.15rem/1.2 system-ui, sans-serif; white-space: nowrap; }
  .comp .ar-timer, .comp .ar-crumb { display: none; }

  .cstats { grid-template-columns: repeat(6, 1fr); }
  .cs { padding: 14px 12px; gap: 10px; }
  .cs + .cs { border-left: 0; }
  .cs.rank { grid-column: span 3; }
  .cs.mtimer { display: flex; grid-column: span 3; border-left: 1px solid var(--line); }
  .cs.left, .cs.speed, .cs.score { grid-column: span 2; border-top: 1px solid var(--line); }
  .cs.speed, .cs.score { border-left: 1px solid var(--line); }
  .cs.ok, .cs.cat { display: none; }
  .cs svg { width: 38px; height: 38px; }
  .cs b { font-size: 2.1rem; }
  .cs.left b { font-size: 2.4rem; }
  .cs.left i, .cs.speed span { font-size: .8rem; }
  .cs.speed em { display: none; }
  .cs.mtimer svg { color: var(--ink); }
  .cs.mtimer b { font-size: 2.2rem; }

  .comp .ar-blk { padding: 14px 16px; }
  .cseg { gap: 5px; }
  .cseg i { height: 14px; }
  .cprog { font-size: .95rem; }
  .comp .qcard { padding: 16px 16px 14px; }
  .comp .ar-qno > span { padding: 8px 16px; }
  .comp .ar-question { margin: 6px 0 16px; font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .comp .h-f { display: none; }
  .comp .ar-hint { color: var(--muted); }
  .comp-right { display: none; }
  .posm { display: block; }
  .comp-wrong { margin-top: 12px; padding-top: 12px; }
  .comp .ar-foot { padding: 10px 14px 18px; border-top: 1px solid var(--line); margin-top: 8px; }
  .comp .ar-tag { display: none; }
  .comp-sf { display: grid; text-align: right; line-height: 1.3; }
  .comp-sf small { color: var(--muted); font-size: .8rem; }
  .comp-sf b { font-size: 1.05rem; }
  .comp .ar-conn { order: -1; }
}
@media (min-width: 46.01rem) {
  .comp .ar-foot { display: grid; grid-template-columns: 1fr auto 1fr; border-top: 1px solid var(--line); }
  .comp .ar-conn { order: -1; justify-self: start; color: #4ade80; }
  .comp .ar-tag { justify-self: center; font-style: normal; font-size: .9rem; }
  .comp .ar-tag img { display: none; }
}

.ar-skip { margin-top: 10px; background: transparent; border: 1px dashed var(--line); color: var(--sub); border-radius: 10px; padding: 9px 14px; font: 600 .9rem system-ui, sans-serif; cursor: pointer; }
.ar-skip:hover:not(:disabled) { border-color: var(--hot); color: var(--ink); }
.ar-skip:disabled { opacity: .5; cursor: not-allowed; }
.ar-skip.armed { border-style: solid; border-color: #f59e0b; color: #f59e0b; }
.pts { display: block; margin-top: 6px; color: var(--muted); font-size: .85rem; }

/* Klasemen akhir */
.tv-final { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--navy); color: #fff; padding: 18px 22px 12px; gap: 12px; }
.tv-final[hidden] { display: none; }
.tv.done .tv-main { display: none; }
.tv-final-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; }
.tv-final-head small { display: block; color: var(--hot); font: 800 .78rem/1 system-ui, sans-serif; letter-spacing: .14em; }
.tv-final-head h2 { margin: 4px 0 0; font: 900 clamp(1.6rem, 3vw, 2.4rem)/1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; text-transform: uppercase; }
.tv-final .tv-tabs { margin: 0; }
.tv-final-scroll { flex: 1; min-height: 0; overflow: auto; border: 1px solid #263149; border-radius: 10px; background: var(--navy2); }
.tv-ft { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tv-ft th { position: sticky; top: 0; background: #0f1a30; color: #9aa6c1; font: 700 .75rem/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; text-align: left; padding: 12px 14px; z-index: 1; }
.tv-ft td { padding: 10px 14px; border-top: 1px solid #263149; vertical-align: middle; }
.tv-ft .num { text-align: right; }
.tv-ft .rk { font: 900 1.4rem/1 "Arial Black", Impact, system-ui, sans-serif; font-style: italic; width: 4.5rem; }
.tv-ft td b { display: block; font: 800 1.05rem/1.15 system-ui, sans-serif; text-transform: uppercase; }
.tv-ft td small { color: #9aa6c1; }
.tv-ft .sc { font-weight: 900; font-size: 1.15rem; }
.tv-ft tr.st-finished { background: rgba(34, 197, 94, .1); box-shadow: 4px 0 0 #22c55e inset; }
.tv-ft tr.st-finished .rk { color: #4ade80; }
.tv-ft tr.st-game_over { background: rgba(239, 68, 68, .1); box-shadow: 4px 0 0 #ef4444 inset; }
.tv-ft tr.st-game_over .rk, .tv-ft tr.st-game_over b { color: #f87171; }
.tv-ft tr.pod1 .rk { color: #facc15; }
.tv-ft tr.pod2 .rk { color: #e2e8f0; }
.tv-ft tr.pod3 .rk { color: #fb923c; }
.fb, .lg { display: inline-block; font: 800 .68rem/1 system-ui, sans-serif; letter-spacing: .1em; padding: 4px 8px; border-radius: 4px; }
.fb.fin, .lg.fin { background: #22c55e; color: #052e16; }
.fb.go, .lg.go { background: #ef4444; color: #fff; }
.fb.to, .lg.to { background: #3b4a66; color: #dbe2f2; }
.tv-final-legend { margin: 0; color: #9aa6c1; font-size: .82rem; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }

/* Pemantauan proses lomba */
.pt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.pt-head h1 { margin: 0; }
.pt-state { display: flex; align-items: center; gap: 18px; }
.pt-live { font: 700 .8rem/1 system-ui, sans-serif; letter-spacing: .06em; padding: 6px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.pt-live[data-state="on"] { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.pt-live[data-state="off"] { background: var(--err-bg); color: var(--err-ink); border-color: transparent; }
.pt-clock small { display: block; color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
.pt-clock b { font: 800 1.9rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.pt-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 10px; margin-bottom: 14px; }
.pt-sum > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.pt-sum small { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.pt-sum b { font: 800 1.6rem/1.2 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.pt-sum .fin b { color: #16a34a; }
.pt-sum .go b { color: #dc2626; }
.pt-sum progress { display: block; width: 100%; height: 6px; margin-top: 4px; }
.pt-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-bottom: 10px; }
.pt-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-tabs button { font: 700 .82rem/1 system-ui, sans-serif; color: var(--text); background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.pt-tabs button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pt-f { display: grid; gap: 3px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.pt-f input, .pt-f select { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; }
.pt-count { margin-left: auto; }
.pt-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: opacity .3s; }
.pt-wrap.stale { opacity: .55; }
.pt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
.pt-table th { position: sticky; top: 0; z-index: 2; background: var(--surface); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; cursor: pointer; user-select: none; }
.pt-table th[aria-sort="ascending"]::after { content: " \25B2"; }
.pt-table th[aria-sort="descending"]::after { content: " \25BC"; }
.pt-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.pt-table .num { text-align: right; }
.pt-table .k1 { position: sticky; left: 0; z-index: 1; min-width: 3.4rem; font-weight: 800; }
.pt-table .k2 { position: sticky; left: 3.4rem; z-index: 1; min-width: 12rem; }
.pt-table th.k1, .pt-table th.k2 { z-index: 3; }
.pt-table .who b { display: block; }
.pt-table .who small { color: var(--muted); }
.pt-table .pos.m1::before { content: "\1F947 "; }
.pt-table .pos.m2::before { content: "\1F948 "; }
.pt-table .pos.m3::before { content: "\1F949 "; }
.pt-table td.ok progress { display: block; width: 6rem; height: 5px; margin: 3px 0 0 auto; }
.pt-table td.warn { color: #dc2626; font-weight: 800; }
.pt-table td.stale { color: #d97706; font-weight: 700; }
.pt-table tr.st-finished td { background: color-mix(in srgb, #22c55e 14%, var(--surface)); }
.pt-table tr.st-game_over td { background: color-mix(in srgb, #ef4444 14%, var(--surface)); }
.pt-table tr.st-timeout td { background: color-mix(in srgb, #94a3b8 14%, var(--surface)); }
.pt-table tr.stuck td { background: color-mix(in srgb, #f59e0b 16%, var(--surface)); }
.pt-table tr.st-finished td.k1 { box-shadow: 4px 0 0 #22c55e inset; }
.pt-table tr.st-game_over td.k1 { box-shadow: 4px 0 0 #ef4444 inset; }
.pt-table tr.st-game_over .nm { color: #dc2626; }
.pb { display: inline-block; font: 800 .66rem/1 system-ui, sans-serif; letter-spacing: .08em; padding: 4px 7px; border-radius: 4px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.pb.fin { background: #22c55e; border-color: #22c55e; color: #052e16; }
.pb.go { background: #ef4444; border-color: #ef4444; color: #fff; }
.pb.to { background: #64748b; border-color: #64748b; color: #fff; }
.pb.run { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pb.stuck { background: #f59e0b; border-color: #f59e0b; color: #1c1100; margin-left: 4px; }
.pb[hidden] { display: none; }
.pt-empty { padding: 20px; text-align: center; }
.pt-legend { margin-top: 10px; font-size: .85rem; }
@media (max-width: 46rem) { .pt-table .k2 { min-width: 9rem; } .pt-clock b { font-size: 1.5rem; } }

/* Pendaftaran mandiri */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.auth-form .field select { width: 100%; height: 100%; border: 0; background: transparent; color: inherit; font: inherit; padding: 0 4px; outline: 0; }
.auth-form .check { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-size: .95rem; }
.auth-form .check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.auth-form .muted { margin: 4px 0 0; font-size: .85rem; }
.auth-note ul.problems { margin: 0; padding-left: 1.1rem; }
.auth-hint a { color: var(--hot); font-weight: 700; }

/* Modul belajar */
.ln-grade { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; }
.ln-grade select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.ln-topics, .ln-lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ln-topic, .ln-lesson { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.ln-topic:hover, .ln-lesson:hover { border-color: var(--hot); transform: translateY(-1px); }
.ln-topic-no { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: #fff1ea; color: var(--hot); font: 900 1.1rem system-ui, sans-serif; }
.ln-topic-body, .ln-lesson-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ln-topic-body b, .ln-lesson-body b { font-size: 1.1rem; }
.ln-topic-body small, .ln-lesson-body small { color: var(--muted); }
.ln-topic-body em { font-style: normal; color: var(--hot); font-weight: 700; font-size: .85rem; }
.ln-topic > svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ln-ico { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 10px; display: grid; place-items: center; background: #eef3ff; }
.ln-ico svg { width: 22px; height: 22px; fill: none; stroke: #2563eb; stroke-width: 2; stroke-linejoin: round; }
.ln-tag { flex: none; font: 800 .7rem/1 system-ui, sans-serif; letter-spacing: .06em; padding: 4px 8px; border-radius: 999px; background: #eee; color: var(--muted); }
.ln-tag.free { background: #dcfce7; color: #14532d; }
.ln-player { margin: 8px 0 18px; background: #000; border-radius: 12px; overflow: hidden; }
.ln-player video { display: block; width: 100%; max-height: 70vh; background: #000; }
.ln-prose { line-height: 1.65; font-size: 1.05rem; }
.ln-prose h1, .ln-prose h2, .ln-prose h3 { margin: 1.2em 0 .5em; line-height: 1.25; }
.ln-prose h2 { font-size: 1.3rem; }
.ln-prose h3 { font-size: 1.1rem; }
.ln-prose :first-child { margin-top: 0; }
.ln-prose p { margin: .7em 0; }
.ln-prose ul, .ln-prose ol { padding-left: 1.4rem; }
.ln-prose code { background: #f4efe6; padding: 1px 6px; border-radius: 4px; font-size: .95em; }
.ln-prose pre { background: #14110f; color: #f4efe6; padding: 12px 14px; border-radius: 8px; overflow: auto; }
.ln-prose pre code { background: none; padding: 0; }
.ln-prose table { border-collapse: collapse; margin: 1em 0; }
.ln-prose th, .ln-prose td { border: 1px solid var(--line); padding: 6px 12px; }
.ln-prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--hot); background: #fff7f2; }
.ln-practice { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ln-pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 46rem) { .ln-topic, .ln-lesson { padding: 12px; } .ln-pager .btn { width: 100%; text-align: center; } }

.ln-ico.locked { background: #f1efe9; }
.ln-ico.locked svg { stroke: var(--muted); }
.ln-lock-note { margin: 0 0 14px; }
.ln-locked { display: flex; gap: 18px; align-items: flex-start; }
.ln-locked > svg { flex: none; width: 44px; height: 44px; fill: none; stroke: var(--hot); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-plans { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 14px; }
.sb-plan { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 6px; align-content: start; background: #fff; }
.sb-plan b { font-size: 1.15rem; }
.sb-price { font: 900 1.8rem/1.1 system-ui, sans-serif; color: var(--hot); }
.sb-plan small { color: var(--muted); }
.sb-plan p { margin: 4px 0; color: #3a3631; }
.sb-active { border-color: #22c55e; }

/* Halaman syarat dan privasi */
.terms-body { max-width: 46rem; margin: 18px auto 40px; line-height: 1.65; }
.terms-body h1 { font: 900 clamp(1.7rem, 4vw, 2.4rem)/1.1 system-ui, sans-serif; letter-spacing: -.03em; margin: 10px 0 8px; }
.terms-body h2 { margin: 1.6em 0 .4em; font-size: 1.2rem; }
.terms-body ul { padding-left: 1.3rem; }
.terms-body li { margin: .35em 0; }

/* ---------- Penyegaran halaman member (beranda, belajar, latihan, langganan) ---------- */
body:has(.ps) { background: linear-gradient(180deg, #e9f2fd 0, #f4f8fd 460px, #f6f9fd 100%) fixed; }
.ps { --line: #dfe7f2; }
.ps-top { gap: 18px; padding: 12px 0; background: #fff; box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); position: relative; z-index: 5; margin-bottom: 20px; }
.ps-top::after { content: ""; position: absolute; left: -100vmax; right: -100vmax; bottom: 0; height: 1px; background: #e3eaf4; }
.ps-brand { display: grid; line-height: 1.02; font-size: 1.5rem; }
.ps-brand span { font-size: 1.5rem; }
.ps-nav { gap: 6px; margin-left: 16px; }
.ps-nav a { padding: 10px 16px; border-radius: 12px; border-bottom: 0; color: #1d2433; }
.ps-nav a:hover { background: #f3f6fb; color: var(--hot); }
.ps-nav a[aria-current="page"] { background: #fff1ea; color: var(--hot); }
.ps-live { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #3b4a60; text-decoration: none; }
.ps-live:hover { background: #f3f6fb; color: var(--hot); }
.ps-live svg { width: 22px; height: 22px; }
.ps-user { position: relative; padding-left: 14px; border-left: 1px solid #e3eaf4; }
.ps-user summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.ps-user summary::-webkit-details-marker { display: none; }
.ps-user .ps-avatar { background: #ffe5d8; color: var(--hot); }
.ps-chev { width: 18px; height: 18px; color: #5f6b7e; }
.ps-user[open] .ps-chev { transform: rotate(180deg); }
.ps-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 14rem; display: grid; gap: 2px; padding: 8px; background: #fff; border: 1px solid #dfe7f2; border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 40, 80, .14); z-index: 30; }
.ps-menu-name { margin: 4px 10px 6px; font-weight: 800; overflow-wrap: anywhere; }
.ps-menu a { padding: 9px 10px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.ps-menu a:hover { background: #f3f6fb; color: var(--hot); }
.ps-menu form { margin: 6px 0 0; padding-top: 8px; border-top: 1px solid #eef2f8; }
.ps-menu .ps-out { width: 100%; padding: 9px 12px; }

.hm-hero { position: relative; display: grid; align-items: center; min-height: 20rem; padding: 36px 44px; overflow: hidden; border-radius: 22px; background: linear-gradient(100deg, #e4efff 0, #eef5ff 52%, #f8fbff 100%); border: 1px solid #d5e3f7; }
.hm-hero-text { position: relative; z-index: 1; max-width: 36rem; }
.hm-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 7px 14px; border-radius: 999px; background: #fff1ea; color: var(--hot); font: 800 .78rem/1 system-ui, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.hm-pill svg { width: 18px; height: 18px; }
.hm-hero h1 { margin: 0; font: 900 clamp(2.3rem, 5vw, 3.8rem)/1.02 "Arial Black", Impact, system-ui, sans-serif; letter-spacing: -.045em; color: #0f1a33; }
.hm-hero h1 em { font-style: normal; color: var(--hot); }
.hm-lead { margin: 12px 0 18px; font-size: 1.2rem; color: #2f3a4f; }
.hm-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.hm-school { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: #fff; font-weight: 800; box-shadow: 0 1px 0 #dfe7f2; }
.hm-school svg { width: 26px; height: 26px; }
.hm-chip { padding: 8px 16px; border-radius: 12px; background: #fff; font-weight: 700; box-shadow: 0 1px 0 #dfe7f2; }
.hm-btns { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 0; }
.hm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 28px; border-radius: 12px; border: 1.5px solid #cfdaea; background: #fff; font-weight: 800; text-decoration: none; color: #0f1a33; }
.hm-btn svg { width: 20px; height: 20px; }
.hm-btn.hot { background: var(--hot); border-color: var(--hot); color: #fff !important; box-shadow: 0 8px 20px rgba(255, 74, 20, .28); }
.hm-btn:hover { filter: brightness(.97); }
.hm-btn.hot:hover { filter: brightness(1.07); }
.hm-btn.small { padding: 10px 18px; font-size: .92rem; }
.hm-btn.wide { width: 100%; max-width: 20rem; margin-top: 14px; }
.hm-hero-art { position: absolute; right: 0; top: 0; height: 100%; width: 60%; object-fit: cover; object-position: center 78%; pointer-events: none; user-select: none; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%); mask-image: linear-gradient(to right, transparent 0, #000 38%); }

.hm-status { display: flex; align-items: center; gap: 18px; margin: 18px 0 30px; padding: 16px 24px; background: #fff; border: 1px solid #dbe7f7; border-radius: 18px; text-decoration: none; color: #0f1a33 !important; box-shadow: 0 1px 0 rgba(20, 40, 80, .04); }
.hm-status-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #2f6bff; color: #fff; }
.hm-status-ic svg { width: 28px; height: 28px; }
.hm-status b { font: 800 1.5rem/1.1 system-ui, sans-serif; letter-spacing: -.02em; }
.hm-status-sub { padding-left: 18px; border-left: 1px solid #d8e1ef; color: #3a4659; flex: 1; }
.hm-status-pill { flex: none; padding: 9px 18px; border-radius: 10px; background: #e6f0ff; color: #2456b8; font-weight: 700; }
.hm-status.live { background: var(--hot); border-color: var(--hot); color: #fff !important; }
.hm-status.live .hm-status-ic { background: #fff; color: var(--hot); }
.hm-status.live .hm-status-sub { border-left-color: rgba(255, 255, 255, .5); color: #fff; }
.hm-status.live .hm-status-pill { background: rgba(255, 255, 255, .22); color: #fff; }

.hm-h { margin: 0 0 14px; font: 900 1.7rem/1.15 system-ui, sans-serif; letter-spacing: -.03em; color: #0f1a33; }
.hm-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; margin-bottom: 24px; align-items: stretch; }
.hm-card { background: #fff; border: 1px solid #dfe7f2; border-radius: 18px; padding: 24px; min-width: 0; box-shadow: 0 1px 0 rgba(20, 40, 80, .04); }
.hm-card h2 { display: flex; align-items: center; gap: 12px; margin: 0; font: 900 1.4rem/1.2 system-ui, sans-serif; letter-spacing: -.025em; color: #0f1a33; }
.hm-card h2 svg { width: 28px; height: 28px; color: var(--hot); }
.hm-practice { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 0 22px; align-items: start; overflow: hidden; background: linear-gradient(100deg, #fff 55%, #f1f8f3 100%); }
.hm-ic { width: 84px; height: 84px; border-radius: 18px; display: grid; place-items: center; }
.hm-ic svg { width: 46px; height: 46px; }
.hm-ic.green { background: #e1f3e7; color: #15803d; }
.hm-practice-body { position: relative; z-index: 1; min-width: 0; max-width: 24rem; }
.hm-practice h3 { margin: 0; font: 900 1.7rem/1.1 system-ui, sans-serif; letter-spacing: -.03em; color: #0f1a33; }
.hm-meta { margin: 6px 0 0; font-weight: 600; color: #26324a; }
.hm-desc { margin: 6px 0 0; color: #566178; }
.hm-tiles { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 16rem; height: auto; pointer-events: none; user-select: none; }
.hm-sessions { display: grid; align-content: start; gap: 6px; }
.hm-sess-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.hm-sess-list li { padding: 14px; border: 1px solid #dfe7f2; border-radius: 14px; display: grid; gap: 10px; }
.hm-sess-list li.live { border-color: var(--hot); box-shadow: inset 4px 0 0 var(--hot); }
.hm-sess-main { display: grid; gap: 3px; }
.hm-sess-main b { font-size: 1.1rem; overflow-wrap: anywhere; }
.hm-sess-main span { color: #26324a; font-size: .92rem; }
.hm-sess-main small { color: #566178; }
.hm-sess-act { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.hm-empty-sess { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 0 6px; }
.hm-empty-sess svg { width: 150px; height: 125px; margin-bottom: 4px; }
.hm-empty-sess b { font-size: 1.1rem; }
.hm-empty-sess span { color: #566178; }
.hm-lower .ps-leftcol { gap: 20px; }
.hm-info .ps-info article { background: #fff1ea; border-color: #ffd5c2; border-radius: 12px; }
.hm-medal { display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 14px; }
.hm-medal svg { width: 26px; height: 26px; color: #6b7a93; }

@media (max-width: 70rem) { .ps-nav a { padding: 10px 11px; } .ps-nav a svg { display: none; } }
@media (max-width: 60rem) {
  .hm-grid { grid-template-columns: 1fr; }
  .hm-tiles { width: 11rem; opacity: .9; }
  .hm-status-sub { display: none; }
}
@media (max-width: 46rem) {
  body:has(.ps) { background: #f4f8fd; }
  .ps-top { margin-bottom: 12px; }
  .ps-user { padding-left: 0; border-left: 0; }
  .ps-live { display: none; }
  .hm-hero { display: block; min-height: 0; padding: 22px 20px 0; border-radius: 18px; }
  .hm-hero-text { max-width: none; }
  .hm-hero-art { position: relative; display: block; width: calc(100% + 40px); height: 11rem; margin: 18px -20px 0; -webkit-mask-image: none; mask-image: none; }
  .hm-btns { gap: 10px; }
  .hm-btn { flex: 1 1 10rem; padding: 14px 16px; }
  .hm-status { padding: 14px 16px; gap: 12px; margin: 14px 0 22px; flex-wrap: wrap; }
  .hm-status-ic { width: 44px; height: 44px; }
  .hm-status b { font-size: 1.2rem; }
  .hm-status-pill { margin-left: auto; padding: 7px 12px; font-size: .85rem; }
  .hm-h { font-size: 1.4rem; }
  .hm-card { padding: 18px; border-radius: 16px; }
  .hm-practice { grid-template-columns: 1fr; padding-bottom: 12px; }
  .hm-ic { width: 64px; height: 64px; margin-bottom: 12px; }
  .hm-tiles { position: relative; right: auto; top: auto; transform: none; width: 12rem; margin: 6px auto 0; }
  .hm-btn.wide { max-width: none; }
}

body:has(.ps) { overflow-x: hidden; }

/* Logo resmi */
.brand-logo { display: block; height: 56px; width: auto; }
.brand-logo.side { height: auto; width: 100%; max-width: 170px; }
.brand-logo.small { height: 38px; }
.brand-plate { display: block; height: 44px; width: auto; border-radius: 8px; }
.ps-logo .brand-logo { height: 50px; }
.tv-brand .brand-logo { height: 52px; }
.adm-logo { padding: 4px 6px; }
@media (max-width: 46rem) { .brand-logo { height: 44px; } .ps-logo .brand-logo { height: 40px; } .brand-logo.side { max-width: 120px; } .brand-plate { height: 36px; } }

.auth-logo .brand-logo { height: 62px; }
.ps-logo .brand-logo { height: 56px; }
@media (max-width: 46rem) { .auth-logo .brand-logo { height: 48px; } .ps-logo .brand-logo { height: 44px; } }

/* ---------- Admin: Jadwal & Sesi (daftar) dan Buat sesi (bertahap) ---------- */
.sl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.sl-eyebrow { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.sl-head h1, .sn h1 { margin: 2px 0 4px; }
.sl-sub { margin: 0 0 18px; color: var(--muted); }
.sl-new, .sl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 .95rem/1 system-ui, "Segoe UI", sans-serif; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 11px 16px; cursor: pointer; text-decoration: none; }
.sl-new { background: var(--hot); border-color: var(--hot); color: #fff; padding: 13px 22px; }
.adm a.sl-new { color: #fff; }
.sl-new svg, .sl-btn svg, .sl-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sl-btn:hover { border-color: var(--hot); }
.sl-btn.small { padding: 8px 14px; }
.sl-btn.ghost { background: transparent; }
.sl-link { color: var(--hot); font-weight: 700; text-decoration: none; }
.sl-link:hover { text-decoration: underline; }
.sl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.sl-stat { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.sl-stat small { display: block; font-weight: 600; color: var(--text); }
.sl-stat b { font: 800 2rem/1.1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.sl-stat em { display: block; font-style: normal; font-size: .85rem; color: var(--muted); }
.sl-ic { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; }
.sl-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sl-ic.hot { background: #ffe9df; color: var(--hot); }
.sl-ic.blue { background: #e1efff; color: #2468d6; }
.sl-ic.green { background: #e3f3e8; color: #1a8a45; }
.sl-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; overflow: hidden; }
.sl-tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.sl-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 16px 2px 13px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.sl-tabs a span { font-size: .8rem; background: #f1ece2; border-radius: 999px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.sl-tabs a[aria-current] { color: var(--hot); border-bottom-color: var(--hot); }
.sl-tabs a[aria-current] span { background: #ffe9df; }
.sl-filter { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 20px; }
.sl-filter select, .sl-filter input[type=date], .sl-search input { height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 12px; font: inherit; color: var(--text); }
.sl-search { position: relative; flex: 1 1 16rem; display: block; }
.sl-search input { width: 100%; padding-left: 38px; }
.sl-search svg { position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.sl-filter .sl-btn { height: 42px; padding-top: 0; padding-bottom: 0; }
.sl-table { width: 100%; border-collapse: collapse; }
.sl-panel .table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--line); }
.sl-table th { text-align: left; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: #faf7f0; padding: 12px 20px; white-space: nowrap; }
.sl-table td { padding: 14px 20px; border-top: 1px solid var(--line); vertical-align: middle; }
.sl-table td small { display: block; color: var(--muted); font-size: .85rem; }
.sl-name { font-weight: 600; }
.sl-count b { font-variant-numeric: tabular-nums; }
.sl-table td.actions { text-align: right; white-space: nowrap; }
.sl-table td.actions .sl-link { margin-left: 10px; }
.sl-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 700; background: #f1ece2; color: var(--muted); }
.sl-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sl-badge.s-finished { background: var(--ok-bg); color: var(--ok-ink); }
.sl-badge.s-running { background: #e1efff; color: #144a8f; }
.sl-badge.s-scheduled { background: var(--warn-bg); color: var(--warn-ink); }
.sl-empty { margin: 0; padding: 36px 20px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.sl-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }
.sl-foot p { margin: 0; }
.sl-per select { height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; font: inherit; }
.sl-pager { margin-left: auto; display: flex; gap: 6px; }
.sl-pager a, .sl-pager .off { display: grid; place-items: center; min-width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 700; background: #fff; }
.sl-pager a[aria-current] { background: var(--hot); border-color: var(--hot); color: #fff; }
.sl-pager .off { color: #c3bcaf; }
.sl-tz { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 20px 16px; color: var(--muted); font-size: .85rem; }
.sl-tz svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.sl-back { margin: 16px 0 6px; }
.sl-back a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 600; }
.sn-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 4px 0 20px; padding: 0; gap: 10px; }
.sn-steps li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); }
.sn-steps li span { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-weight: 800; }
.sn.js .sn-steps li { cursor: pointer; }
.sn-steps li.on { color: var(--text); }
.sn-steps li.on span { background: var(--hot); border-color: var(--hot); color: #fff; }
.sn-steps li.done span { background: #e3f3e8; border-color: #bfe2cb; color: #1a8a45; }
.sn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 20px; align-items: start; }
.sn-card, .sn-sum { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.sn-card[hidden] { display: none; }
.sn:not(.js) .sn-card + .sn-card { margin-top: 16px; }
.sn-ch { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.sn-ch h2, .sn-sum h2 { margin: 0; font: 800 1.45rem/1.2 system-ui, sans-serif; }
.sn-ch p, .sn-sum > p { margin: 4px 0 0; }
.sn-of { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.sn-card h3 { margin: 18px 0 10px; font-size: 1.05rem; }
.sn-card label { display: block; font-weight: 600; margin-bottom: 14px; }
.sn-card label[hidden] { display: none; }
.sn-card label input:not([type=checkbox]):not([type=radio]), .sn-card label select { display: block; width: 100%; margin-top: 6px; height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; background: #fff; color: var(--text); }
.sn-card label small { display: block; margin-top: 5px; font-weight: 400; color: var(--muted); font-size: .85rem; }
.sn-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.sn-bypass { background: #faf7f0; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 4px; margin-top: 6px; }
.sn-bypass .sn-two.off { opacity: .55; }
.sn-card .sn-switch { display: flex; align-items: flex-start; gap: 14px; position: relative; }
.sn-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sn-track { flex: none; order: 2; margin-left: auto; position: relative; width: 46px; height: 26px; border-radius: 999px; background: #cfc8ba; transition: background .15s; }
.sn-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sn-switch input:checked + .sn-track { background: var(--hot); }
.sn-switch input:checked + .sn-track::after { transform: translateX(20px); }
.sn-switch input:focus-visible + .sn-track { outline: 3px solid rgba(255, 74, 20, .35); outline-offset: 2px; }
.sn-switch > span:last-child { order: 1; }
.sn-sum { position: sticky; top: 14px; }
.sn-sum h3 { margin: 18px 0 8px; font-size: 1.05rem; padding-top: 14px; border-top: 1px solid var(--line); }
.sn-sum dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0 0; }
.sn-sum dt { color: var(--muted); }
.sn-sum dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.sn-checks { list-style: none; margin: 16px 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.sn-checks li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.sn-checks li span { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cfc8ba; }
.sn-checks li.ok { color: var(--text); }
.sn-checks li.ok span { border-color: #1a8a45; background: #1a8a45; box-shadow: inset 0 0 0 4px #1a8a45, inset 0 0 0 8px #fff; }
.sn-note { margin: 0; padding: 14px 16px; border-radius: 10px; background: #e9f2ff; color: #1b3f7a; font-size: .92rem; }
.sn-bar { display: flex; align-items: center; gap: 14px; margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; }
.sn-bar-gap { flex: 1; }
.sn-bar [hidden] { display: none; }
.sn:not(.js) [data-prev], .sn:not(.js) [data-next], .sn:not(.js) .sn-pos, .sn:not(.js) .sn-steps { display: none; }
@media (max-width: 62rem) {
  .sn-grid { grid-template-columns: 1fr; }
  .sn-sum { position: static; }
  .sl-stats { grid-template-columns: 1fr; }
}
@media (max-width: 40rem) {
  .sn-steps li { font-size: 0; }
  .sn-steps li span { font-size: 1rem; }
  .sn-two { grid-template-columns: 1fr; }
  .sl-pager { margin-left: 0; }
  .sn-bar { flex-wrap: wrap; }
}
.sl-filter select, .sl-filter input[type=date] { width: auto; flex: 0 1 13rem; margin: 0; }
.sl-filter .sl-search input { margin: 0; }
.sl-per select { width: auto; margin: 0; }
.sn-two.off { opacity: .55; }
.tokcode { font: 800 1.05rem/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; background: #fff1e8; padding: 3px 8px; border-radius: 6px; }
.jn { max-width: 30rem; }
.jn-form { display: grid; gap: 14px; }
.jn-form label { font-weight: 700; }
.jn-code { display: block; width: 100%; margin-top: 6px; height: 56px; text-align: center; font: 800 1.6rem/1 ui-monospace, Consolas, monospace; letter-spacing: .25em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 10px; }
.pg-body { padding: 22px 24px; display: grid; gap: 14px; }
.pg-opt { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pg-opt input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--hot); }
.pg-opt em { font-style: normal; color: var(--muted); margin-left: 6px; }
.pg-opt small { display: block; color: var(--muted); margin-top: 3px; }
.pg-opt.danger { border-color: #f1b4a5; background: #fff6f3; }
.pg-confirm { font-weight: 600; }
.pg-confirm input { display: block; margin-top: 6px; width: 14rem; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: 800 1rem system-ui; letter-spacing: .1em; }
.sl-new.danger { background: #c62a0b; border-color: #c62a0b; justify-self: start; }
.hm-chip.watch { background: #fff1d6; color: #8a5a00; }
.hm-chip.invited { background: #e3f3e8; color: #166534; }
.hm-sess-main .hm-chip { padding: 2px 10px; font-size: .78rem; border-radius: 999px; box-shadow: none; margin-left: 6px; vertical-align: middle; }
.inv-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.inv-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pt-tabs[hidden], .tv-tabs[hidden] { display: none !important; }
.pt-single th:nth-child(3), .pt-single td:nth-child(3) { display: none; }

/* ---------- Admin: Pola Soal ---------- */
.pl-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.pl-nav a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; text-decoration: none; }
.pl-nav a:hover { border-color: var(--hot); color: var(--hot); }
.pl-box { margin-bottom: 20px; }
.pl-pad { padding: 20px 22px 6px; }
.pl-pad h2, .pl-pad h3 { margin-top: 0; }
.pl h2 { margin: 26px 0 6px; }
.pl-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 14px 0; }
.pl-form label { font-weight: 600; display: grid; gap: 5px; }
.pl-form select, .pl-form input[type=number] { height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; background: #fff; width: auto; min-width: 8rem; margin: 0; }
.pl-form .pl-x { display: flex; align-items: center; gap: 8px; height: 42px; }
.pl-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 700; margin: 8px 0; }
.pl-code code { background: #fff1e8; padding: 4px 10px; border-radius: 6px; font-size: .95rem; }
.pl-samples { list-style: none; margin: 8px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 10px; }
.pl-samples li { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #faf7f0; }
.pl-samples b { display: block; font: 800 1.2rem/1.3 ui-monospace, Consolas, monospace; }
.pl-samples small { color: var(--muted); }
.pl-table th[scope=row] { background: transparent; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--text); white-space: normal; }
.pl-table td a { font: 600 .98rem/1.3 ui-monospace, Consolas, monospace; text-decoration: none; color: var(--text); }
.pl-table td a:hover { color: var(--hot); text-decoration: underline; }
.pl-tier { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; background: #f1ece2; }
.pl-tier.ready { background: #e3f3e8; color: #166534; }
.pl-tier.easy { background: #e1efff; color: #144a8f; }
.pl-tier.medium { background: #fff1d6; color: #8a5a00; }
.pl-tier.new { background: #fde8e4; color: #8a1d0a; }
.tv-ft tr.st-timeout { background: rgba(148, 163, 184, .08); box-shadow: 4px 0 0 #64748b inset; }
.pb.flag { font-size: .7rem; white-space: nowrap; cursor: help; }
.pb.flag.mid { background: #fff1d6; color: #8a5a00; }
.pb.flag.high { background: #fde8e4; color: #8a1d0a; }
.pt-sum .flagbox b { color: #8a1d0a; }

/* ---------- Peserta: tampilan ponsel / PWA ---------- */
.ps-ico { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #3b4a60; cursor: pointer; padding: 0; }
.ps-ico[hidden] { display: none; }
.ps-ico:hover { background: #f3f6fb; color: var(--hot); }
.ps-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-pagehead h1 { margin: 6px 0 4px; font: 900 clamp(1.7rem, 5vw, 2.4rem)/1.08 system-ui, sans-serif; letter-spacing: -.03em; color: #0f1a33; }
.hm-pagehead p { margin: 0 0 16px; color: #4a5568; }
.hm-sessions { margin-bottom: 20px; }
.pwa-hint { border: 0; border-radius: 20px; padding: 22px 22px 18px; max-width: min(24rem, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(15, 26, 51, .35); }
.pwa-hint::backdrop { background: rgba(15, 26, 51, .5); }
.pwa-hint h2 { margin: 0 0 8px; font-size: 1.25rem; }
.pwa-hint p { margin: 8px 0; color: #3a4659; }
.pwa-hint .hm-btn { width: 100%; margin-top: 10px; }

@media (max-width: 46rem) {
  /* Ruang aplikasi: isi tidak tertutup tab bawah, dan menghormati area aman (notch dan bilah gestur). */
  body:has(.ps) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
  .ps { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

  /* Header: logo di kiri; pasang, siaran, dan avatar sebagai tombol bulat di kanan. */
  .ps-top { position: sticky; top: 0; padding: calc(10px + env(safe-area-inset-top)) 0 10px; margin-bottom: 14px; gap: 8px; }
  .ps-top > .ps-logo { margin-right: auto; }
  .ps-ico, .ps-live { display: grid; width: 44px; height: 44px; background: #f1f5fb; color: #1d2a44; }
  .ps-user summary b, .ps-user .ps-chev { display: none; }
  .ps-user .ps-avatar { width: 44px; height: 44px; font-size: 1.1rem; }
  .ps-menu { right: 0; }

  /* Hero: judul di atas, gambar lintasan melebar, tombol di atas gambar. */
  .hm-hero { display: flex; flex-direction: column; padding: 20px 18px 18px; border-radius: 24px; }
  .hm-hero-text { display: contents; }
  .hm-pill { order: 1; align-self: flex-start; }
  .hm-hero h1 { order: 2; font-size: clamp(2.3rem, 11vw, 3rem); }
  .hm-lead { order: 3; margin: 8px 0 0; font-size: 1.02rem; }
  .hm-chips { order: 4; margin-top: 14px; }
  .hm-hero-art { order: 5; position: relative; display: block; width: calc(100% + 36px); height: 13.5rem; margin: 16px -18px 0; object-fit: cover; object-position: center 72%; -webkit-mask-image: none; mask-image: none; }
  .hm-btns { order: 6; position: relative; z-index: 2; margin: -66px 0 0; padding: 0; gap: 10px; flex-wrap: nowrap; }
  .hm-btn { flex: 1 1 0; min-height: 54px; border-radius: 16px; font-size: 1.02rem; }
  .hm-btn.hot { box-shadow: 0 10px 22px rgba(255, 74, 20, .35); }
  .hm-chip, .hm-school { font-size: .92rem; padding: 8px 14px; }

  .hm-status { margin: 14px 0 18px; border-radius: 20px; }
  .hm-h { margin: 6px 2px 12px; font-size: 1.45rem; }

  /* Kartu Ruang Latihan: ikon, judul, deskripsi, ubin di kanan, tombol penuh di bawah. */
  .hm-practice { grid-template-columns: auto 1fr; gap: 0 14px; padding: 16px; }
  .hm-ic { width: 60px; height: 60px; margin: 0; grid-row: 1; }
  .hm-practice-body { grid-column: 1 / -1; max-width: none; margin-top: -48px; padding-left: 74px; padding-right: 0; }
  .hm-practice-body .hm-btn { margin-top: 14px; margin-left: -74px; width: calc(100% + 74px); }
  .hm-practice h3 { font-size: 1.45rem; }
  .hm-tiles { position: absolute; right: 6px; top: 8px; transform: none; width: 7.6rem; margin: 0; }

  .ps-results li { grid-template-columns: 1fr auto; row-gap: 8px; }

  /* Tab bawah: lima menu, aktif berlatar jingga muda. */
  .ps-tabbar { grid-template-columns: repeat(5, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 2px; background: #fff; border-top: 1px solid #e3eaf4; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px rgba(20, 40, 80, .08); }
  .ps-tabbar a { padding: 7px 2px 6px; font-size: .76rem; font-weight: 700; color: #4a5568; border-bottom: 0; border-radius: 14px; }
  .ps-tabbar a[aria-current="page"] { color: var(--hot); background: #fff1ea; border-bottom: 0; }
  .ps-tabbar a svg { width: 25px; height: 25px; }
}

/* Aplikasi terpasang (mode standalone): tidak ada bilah peramban, jadi header memakai area aman penuh. */
@media (display-mode: standalone) {
  body:has(.ps) { overscroll-behavior-y: contain; }
}
@media (max-width: 46rem) {
  .hm-btn { white-space: nowrap; padding: 14px 8px; gap: 6px; font-size: .98rem; justify-content: center; }
  .hm-status { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: center; flex-wrap: nowrap; }
  .hm-status-ic { grid-row: 1 / 3; }
  .hm-status b { font-size: 1.15rem; }
  .hm-status-sub { display: block; grid-column: 2; padding: 0; border: 0; color: #4a5568; }
  .hm-status:not(.live) .hm-status-pill { display: none; }
  .hm-status.live .hm-status-sub { color: #fff; }
  .hm-status-pill { grid-column: 1 / -1; justify-self: start; margin: 8px 0 0; }
}

/* Perbaikan ponsel: header penuh lebar tanpa elemen yang melebihi layar (pseudo-elemen -100vmax membuat halaman melebar
   dan tab bawah ikut melebar di ponsel). */
@media (max-width: 46rem) {
  html:has(.ps) { overflow-x: clip; }
  .ps-top {
    clip-path: none; box-shadow: none; border-bottom: 1px solid #e3eaf4;
    margin-left: calc(-1 * max(16px, env(safe-area-inset-left))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right)));
    padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
  }
  .ps-top::after { display: none; }
  .ps-tabbar { left: 0; right: 0; width: 100%; max-width: 100vw; }
}
@media (max-width: 46rem) {
  .ps-ph { flex-wrap: nowrap; align-items: center; gap: 8px; }
  .ps-ph h2 { font-size: 1.3rem; }
  .ps-ph .ps-link { white-space: nowrap; font-size: .92rem; }
  .hm-grid { margin-bottom: 14px; gap: 14px; }
  .hm-lower { gap: 14px; }
}
.ps-menu-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-weight: 600; text-align: left; color: inherit; cursor: pointer; }
.ps-menu-btn[hidden] { display: none; }
.ps-menu-btn:hover { background: #f3f6fb; color: var(--hot); }
.ps-menu-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pwa-hint .pwa-warn { padding: 10px 12px; border-radius: 10px; background: #fff1d6; color: #6b4e00; font-size: .92rem; }

.reg-btn { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 16px; border: 2px solid var(--hot); border-radius: 6px; background: #fff4ee; color: var(--ink); text-decoration: none; }
.reg-btn svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--hot); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.reg-btn span { display: grid; font-weight: 800; font-size: 1.05rem; color: var(--hot); }
.reg-btn small { font-weight: 500; font-size: .88rem; color: var(--muted2); }
.reg-btn:hover { background: #ffe9df; }
.auth-hints { display: grid; gap: 4px; margin-top: 8px; }
.auth-hints .auth-hint { margin: 6px 0 0; align-items: flex-start; }
.auth-hints .auth-hint svg { margin-top: 1px; }
