/* Crazy 88 — bright, high-contrast theme that stays readable outdoors in sunlight. */
:root {
  --yellow: #ffd400;
  --yellow-dark: #e6bd00;
  --ink: #111111;
  --ink-2: #3b3b3f;
  --muted: #6b6b72;
  --line: #e4e2da;
  --bg: #f5f4ef;
  --card: #ffffff;
  --good: #15803d;
  --good-bg: #dcfce7;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --wait: #1d4ed8;
  --wait-bg: #dbeafe;
  --warn-bg: #fff4c2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .06em; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.center { text-align: center; }
.hr { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- buttons & form controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px;
  border: 2px solid var(--ink); border-radius: 12px;
  background: var(--card); color: var(--ink);
  font-weight: 700; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--yellow); }
.btn.primary:hover:not(:disabled) { background: var(--yellow-dark); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.bad { background: var(--card); border-color: var(--bad); color: var(--bad); }
.btn.bad.solid { background: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 34px; padding: 5px 11px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 54px; font-size: 18px; width: 100%; }
.btn.block { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 0;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; cursor: pointer;
}
label.field { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 4px; }
label.field small { font-weight: 400; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
  outline: none; font-size: 16px; /* 16px stops iOS zooming */
}
.input:focus { border-color: var(--ink); }
textarea.input { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.check small { display: block; color: var(--muted); }
input[type=color].input { padding: 4px; height: 46px; }

/* ---------- top bar ---------- */
.top { background: var(--ink); color: #fff; padding: 10px 16px 12px; padding-top: calc(10px + env(safe-area-inset-top)); }
.top-row { display: flex; align-items: center; gap: 10px; max-width: 1100px; margin: 0 auto; }
.brand { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: .02em; color: var(--yellow); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; }
.clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; background: rgba(255, 255, 255, .12); padding: 6px 10px; border-radius: 10px; white-space: nowrap; }
.clock.urgent { background: #dc2626; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { background: #991b1b; } }
.subbar { display: flex; align-items: center; gap: 10px; max-width: 1100px; margin: 10px auto 0; }
.team-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.team-chip .dot, .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.card .dot, .modal .dot, .list .dot { box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.score-big { margin-left: auto; text-align: right; line-height: 1.1; }
.score-big b { font-family: var(--display); font-size: 26px; color: var(--yellow); }
.score-big span { display: block; font-size: 12px; opacity: .75; }
.role-pill { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: var(--yellow); color: var(--ink); padding: 3px 8px; border-radius: 6px; }

.announce { background: var(--warn-bg); border-bottom: 2px solid var(--yellow); padding: 10px 16px; font-weight: 600; }
.announce > div { max-width: 1100px; margin: 0 auto; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; background: var(--card); border-bottom: 1px solid var(--line); padding: 0 12px; position: sticky; top: 0; z-index: 15; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs-inner { display: flex; gap: 4px; max-width: 1100px; margin: 0 auto; width: 100%; }
.tab { padding: 13px 12px 11px; text-decoration: none; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab.active { color: var(--ink); border-bottom-color: var(--yellow); }
.badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }

.view { max-width: 1100px; margin: 0 auto; padding: 16px 16px 80px; }
.view h2 { font-family: var(--display); font-size: 22px; margin: 4px 0 12px; text-transform: uppercase; letter-spacing: .01em; }
.view h3 { margin: 22px 0 10px; font-size: 17px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input { flex: 1; min-width: 160px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 2px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer; }
.chip.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip .n { opacity: .65; font-weight: 600; margin-left: 4px; }

/* ---------- cards & lists ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border: 1px solid var(--line); }
.cards { display: grid; gap: 10px; }
@media (min-width: 760px) { .cards.two { grid-template-columns: 1fr 1fr; } }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; background: var(--card); border-radius: var(--radius); border: 2px dashed var(--line); }
.empty .big { font-size: 40px; display: block; margin-bottom: 6px; }

.task { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; border-left: 6px solid var(--line); }
.task.st-done { border-left-color: var(--good); }
.task.st-pending { border-left-color: var(--wait); }
.task.st-rejected { border-left-color: var(--bad); }
.task.st-done .task-title { color: var(--muted); }
.num { font-family: var(--display); font-size: 18px; min-width: 42px; height: 42px; border-radius: 10px; background: var(--ink); color: var(--yellow); display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0 6px; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 700; display: block; overflow-wrap: anywhere; }
.task-meta { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.task-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pts { font-family: var(--display); font-size: 18px; white-space: nowrap; }
.pts small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 600; }

.pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.pill.done, .pill.approved { background: var(--good-bg); color: var(--good); }
.pill.pending { background: var(--wait-bg); color: var(--wait); }
.pill.rejected { background: var(--bad-bg); color: var(--bad); }
.pill.todo { background: #f0efe9; color: var(--muted); }
.pill.live { background: var(--warn-bg); color: #7a5d00; }
.pill.off { background: #eee; color: #777; }

.list { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.list-item:last-child { border-bottom: 0; }
button.list-item, a.list-item { cursor: pointer; text-decoration: none; }
button.list-item:hover, a.list-item:hover { background: #fafaf6; }
.li-main { flex: 1; min-width: 0; }
.li-title { display: block; font-weight: 700; overflow-wrap: anywhere; }
.li-sub { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* leaderboard */
.board-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.board-row:last-child { border-bottom: 0; }
.board-row.me { background: var(--warn-bg); }
.rank { font-family: var(--display); font-size: 20px; width: 40px; text-align: center; flex: none; }
.rank.r1 { color: #c79a00; } .rank.r2 { color: #8a8f98; } .rank.r3 { color: #a0522d; }
.bar { height: 6px; background: #efede6; border-radius: 3px; margin-top: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); margin-bottom: 12px; font-weight: 600; }
.notice.info { background: var(--wait-bg); color: #1e3a8a; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.good { background: var(--good-bg); color: var(--good); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.phase-card { display: flex; flex-direction: column; gap: 12px; }
.phase-big { font-family: var(--display); font-size: 26px; text-transform: uppercase; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 6px 0; display: flex; gap: 8px; }

/* ---------- media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.media-grid.big { grid-template-columns: 1fr; }
@media (min-width: 700px) { .media-grid.big { grid-template-columns: 1fr 1fr; } }
.media-item { position: relative; border-radius: 12px; overflow: hidden; background: #222; aspect-ratio: 1; display: block; border: 0; padding: 0; cursor: pointer; width: 100%; }
.media-grid.big .media-item { aspect-ratio: auto; cursor: default; background: #000; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-grid.big .media-item img, .media-grid.big .media-item video { object-fit: contain; max-height: 70vh; height: auto; }
.media-item .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; font-size: 12px; font-weight: 600; text-align: left; }
.media-item .play { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 8px; padding: 2px 7px; font-size: 12px; }
.media-actions { display: flex; gap: 12px; padding: 6px 2px; font-size: 13px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 10px; }
.preview { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 12px; text-align: center; padding: 4px; }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 14px; cursor: pointer; z-index: 2; }
.preview .vid { font-size: 28px; display: block; }
.progress { height: 12px; background: #eee; border-radius: 6px; overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; background: var(--yellow); width: 0; transition: width .2s; border-right: 2px solid var(--ink); }
.pick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick-row .btn { flex-direction: column; gap: 2px; font-size: 13px; padding: 8px 4px; min-height: 64px; }
.pick-row .btn span { font-size: 22px; }

/* ---------- modal ---------- */
#modal-root:empty { display: none; }
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@media (min-width: 700px) { .modal-back { align-items: center; padding: 24px; } }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--bg); width: 100%; max-width: 640px; max-height: 94vh; overflow-y: auto; border-radius: 20px 20px 0 0; animation: up .2s ease; overscroll-behavior: contain; }
.modal.wide { max-width: 900px; }
@media (min-width: 700px) { .modal { border-radius: 20px; } }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
.modal-head { position: sticky; top: 0; background: var(--ink); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; z-index: 2; }
.modal-head h3 { margin: 0; font-size: 18px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.modal-head .num { background: var(--yellow); color: var(--ink); }
.modal-head .close { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 20px; cursor: pointer; flex: none; }
.modal-body { padding: 16px; }
.modal-foot { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.modal-foot .btn { flex: 1; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.kv { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.attempt { border-left: 4px solid var(--line); padding: 6px 10px; margin: 8px 0; background: var(--card); border-radius: 0 10px 10px 0; }
.attempt.rejected { border-left-color: var(--bad); }
.attempt.approved { border-left-color: var(--good); }
.attempt.pending { border-left-color: var(--wait); }
.lightbox { background: #000; color: #fff; max-width: 1100px; }
.lightbox .modal-body { padding: 0; display: flex; align-items: center; justify-content: center; min-height: 50vh; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 76vh; display: block; margin: 0 auto; }
.lightbox .modal-foot { background: #111; border-color: #333; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; max-width: 520px; width: 100%; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: up .2s; cursor: pointer; transition: opacity .3s; }
.toast.good { background: var(--good); }
.toast.bad { background: var(--bad); }
.toast.out { opacity: 0; }
#offline { position: fixed; top: 0; left: 0; right: 0; z-index: 120; background: var(--bad); color: #fff; text-align: center; padding: 6px; font-weight: 700; font-size: 14px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: var(--yellow); }
.logo { font-family: var(--display); font-weight: 900; font-size: 54px; line-height: .9; text-align: center; letter-spacing: -.02em; margin-bottom: 8px; }
.logo span { display: block; font-size: 120px; -webkit-text-stroke: 3px var(--ink); color: transparent; }
.login .card { width: 100%; max-width: 400px; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.login .tag { font-weight: 700; margin: 0 0 20px; text-align: center; }

/* ---------- language switch + test-mode markers ---------- */
.lang-switch { display: inline-flex; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--card); }
.lang-switch button { border: 0; background: transparent; padding: 6px 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.lang-switch button.active { background: var(--ink); color: #fff; }
.login { position: relative; }
.login-lang { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.demo-bar { background: repeating-linear-gradient(45deg, #7c3aed, #7c3aed 12px, #6d28d9 12px, #6d28d9 24px); color: #fff; text-align: center; font-weight: 800; font-size: 13px; padding: 4px 8px; letter-spacing: .04em; }
.demo-pill { background: #7c3aed; color: #fff; font-weight: 800; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; font-size: 14px; }

/* ---------- big screen (projector) ---------- */
.screen { min-height: 100vh; background: #0b0b0c; color: #fff; padding: 3vh 4vw; display: flex; flex-direction: column; }
.screen-head { display: flex; align-items: center; gap: 20px; margin-bottom: 3vh; }
.screen-title { font-family: var(--display); color: var(--yellow); font-size: clamp(28px, 5vw, 64px); text-transform: uppercase; flex: 1; line-height: 1; }
.screen-clock { font-family: var(--display); font-size: clamp(24px, 4vw, 52px); font-variant-numeric: tabular-nums; }
.screen-rows { display: flex; flex-direction: column; gap: 1.2vh; flex: 1; }
.srow { display: flex; align-items: center; gap: 2vw; background: #18181b; border-radius: 16px; padding: 1.6vh 2vw; font-size: clamp(18px, 2.6vw, 38px); transition: all .5s; }
.srow .rank { width: 3em; font-size: 1em; color: var(--yellow); }
.srow .name { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .score { font-family: var(--display); font-variant-numeric: tabular-nums; }
.srow.hidden-row .name, .srow.hidden-row .score { color: #444; }
.srow.just { animation: reveal .8s ease; background: #2a2410; box-shadow: 0 0 0 3px var(--yellow); }
.srow.winner { background: var(--yellow); color: var(--ink); }
.srow.winner .rank { color: var(--ink); }
@keyframes reveal { from { transform: scale(.85); opacity: 0; } }
.screen-foot { display: flex; gap: 10px; justify-content: center; margin-top: 2vh; opacity: .35; transition: opacity .2s; }
.screen-foot:hover { opacity: 1; }
.screen .msg { font-size: clamp(22px, 3vw, 40px); text-align: center; margin: auto; color: #aaa; }

/* ---------- printable cards ---------- */
.cards-page { padding: 20px; max-width: 1100px; margin: 0 auto; }
.print-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.login-card { border: 3px solid var(--ink); border-radius: 16px; padding: 16px; text-align: center; background: #fff; break-inside: avoid; }
.login-card .lc-game { font-family: var(--display); font-size: 13px; text-transform: uppercase; background: var(--yellow); display: inline-block; padding: 2px 8px; border-radius: 6px; }
.login-card h3 { margin: 10px 0 4px; font-size: 22px; overflow-wrap: anywhere; }
.login-card img { width: 170px; height: 170px; display: block; margin: 8px auto; }
.login-card .lc-code { font-family: ui-monospace, Consolas, monospace; font-size: 28px; font-weight: 800; letter-spacing: .15em; }
.login-card .lc-url { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .cards-page { padding: 0; }
  .print-grid { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
}

/* ---------- lobby login ---------- */
.login-hello { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.team-picks { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; }
.team-pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; min-height: 48px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 700; cursor: pointer; }
.team-pick small { color: var(--muted); font-weight: 600; white-space: nowrap; }
.team-pick.active { border-color: var(--ink); background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--ink); }
.team-pick .plus { width: 14px; text-align: center; font-size: 20px; line-height: 1; }
.login .btn.ghost { margin-top: 8px; width: 100%; }

/* ---------- secret assignments ---------- */
.task.secret { border-left-color: #7c3aed; background: linear-gradient(90deg, #f5f0ff, #fff 60%); }
.task.secret.st-done { border-left-color: var(--good); }
.secret-tag { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #6d28d9; }
.pill.secret { background: #ede4ff; color: #6d28d9; }
.secret-box { margin: 4px 0 8px; background: #faf7ff; border-color: #d9c8ff; }
.secret-modal .modal-head { background: #6d28d9; }
.secret-pop { text-align: center; }
.secret-burst { font-size: 64px; line-height: 1; animation: wiggle .6s ease-in-out 3; }
@keyframes wiggle { 25% { transform: rotate(-12deg) scale(1.1); } 75% { transform: rotate(12deg) scale(1.1); } }
.secret-kicker { font-family: var(--display); color: #6d28d9; font-size: 20px; margin: 8px 0; letter-spacing: .02em; }
.secret-title { font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; overflow-wrap: anywhere; }
.secret-modal.big-screen { max-width: 1100px; }
.secret-modal.big-screen .secret-burst { font-size: 120px; }
.secret-modal.big-screen .secret-kicker { font-size: clamp(28px, 4vw, 56px); }
.secret-modal.big-screen .secret-title { font-size: clamp(26px, 3.5vw, 48px); }
.secret-modal.big-screen .desc { font-size: clamp(18px, 2vw, 28px); }

/* ---------- drag to reorder ---------- */
.list-item.sortable { padding: 0 14px 0 0; gap: 0; }
.list-item.sortable .li-btn { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 12px 0 12px 14px; background: none; border: 0; text-align: left; cursor: pointer; }
.list-item.sortable .drag + .li-btn { padding-left: 0; }
.list-item.sortable > .btn { margin-left: 8px; flex: none; }
.drag { flex: none; align-self: stretch; display: flex; align-items: center; justify-content: center; width: 40px; font-size: 22px; color: var(--muted); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.list-item.dragging { background: var(--warn-bg); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); position: relative; z-index: 3; }
.list-item.dragging .drag { cursor: grabbing; color: var(--ink); }

/* ---------- media: stays inside the app, moderation ---------- */
img, video { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.mi-open { display: block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in; color: inherit; }
.media-grid.big .mi-open { height: auto; }
.mod-btn { position: absolute; top: 6px; left: 6px; z-index: 2; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 7px; cursor: pointer; }
.is-hidden .mod-btn { background: var(--bad); }
.media-item.is-hidden img, .media-item.is-hidden video, .is-hidden .media-item img { opacity: .35; filter: grayscale(1); }
.hidden-mark { position: absolute; top: 6px; left: 6px; background: var(--bad); color: #fff; border-radius: 8px; padding: 2px 7px; font-size: 12px; font-weight: 700; pointer-events: none; }
.linklike { border: 0; background: none; padding: 0; text-decoration: underline; cursor: pointer; font-size: 13px; }
.media-actions { flex-wrap: wrap; align-items: center; }
.lb-zoom { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; max-width: 100%; }
.lb-zoom.on { cursor: zoom-out; max-width: none; }
.lightbox .lb-zoom.on img { max-width: none; max-height: none; }
.lightbox .modal-body:has(.lb-zoom.on) { overflow: auto; display: block; max-height: 78vh; }

/* ---------- judging ---------- */
.fixed-points { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.fixed-points b { font-family: var(--display); font-size: 24px; }
.fb-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.fb-label { flex: none; font-size: 20px; width: 28px; text-align: center; }
.quick.scroll { flex-wrap: nowrap; overflow-x: auto; margin-top: 0; padding-bottom: 2px; scrollbar-width: thin; }
.chip.good { border-color: #b7e4c7; background: #f0fbf4; }
.chip.bad { border-color: #f5c2c2; background: #fff5f5; }

/* ---------- ceremony, results, codes ---------- */
.ceremony-card { display: flex; flex-direction: column; gap: 10px; }
.ceremony-card p { margin: 0; }
.ceremony-bar { background: #2a2410; color: var(--yellow); border-bottom-color: var(--yellow); }
.code-big { font-size: 18px; margin-left: 8px; white-space: nowrap; }
.login-card.lobby { border-color: #7c3aed; box-shadow: inset 0 0 0 3px #ede4ff; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }
.results-modal .modal-head { background: var(--yellow); color: var(--ink); }
.results-modal .modal-head .close { background: rgba(0, 0, 0, .1); color: var(--ink); }
.results-pop { text-align: center; }
.results-cup { font-size: 72px; line-height: 1; animation: pop .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.2) rotate(-30deg); opacity: 0; } }
.results-kicker { font-family: var(--display); font-size: 22px; text-transform: uppercase; margin: 6px 0 10px; }
.results-mine { font-size: 18px; margin-bottom: 14px; padding: 10px; border-radius: 12px; background: var(--warn-bg); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; }
.pod { flex: 1; max-width: 170px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px 12px 0 0; background: #eceae2; overflow-wrap: anywhere; animation: rise .7s ease both; }
.pod b { font-size: 15px; }
.pod span { font-size: 13px; color: var(--ink-2); }
.pod .pod-medal { font-size: 32px; }
.pod.r1 { order: 2; min-height: 150px; background: var(--yellow); animation-delay: .6s; }
.pod.r2 { order: 1; min-height: 120px; animation-delay: .3s; }
.pod.r3 { order: 3; min-height: 100px; }
.pod.me { box-shadow: 0 0 0 3px var(--ink); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.screen-announce { background: var(--yellow); color: var(--ink); font-weight: 800; border-radius: 14px; padding: 1.2vh 2vw; margin-bottom: 2vh; font-size: clamp(18px, 2.4vw, 34px); }
.screen-foot.quiet { justify-content: space-between; opacity: .25; }
body.drag-active { user-select: none; -webkit-user-select: none; cursor: grabbing; }
