:root {
  --ink: #f4f7ff;
  --muted: #a9b6d6;
  --glass: rgba(10, 20, 44, 0.74);
  --glass-line: rgba(255, 255, 255, 0.12);
  --gold: #ffc23d;
  --gold-ink: #3a2600;
  --danger: #ff6b6b;
  --radius: 18px;
  font-family: "Avenir Next", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #040816; color: var(--ink); }
.hidden { display: none !important; }

#space {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, #13285a 0%, #0a1430 38%, #040816 75%);
}
#space::before, #space::after {
  content: ""; position: absolute; inset: 0; background-repeat: repeat;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 120px 80px, #cfe0ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 200px 160px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 60px 210px, #ffffff 50%, transparent 51%),
    radial-gradient(1px 1px at 260px 40px, #d9e6ff 50%, transparent 51%);
  background-size: 300px 260px; opacity: 0.55;
}
#space::after { background-size: 470px 390px; opacity: 0.35; transform: translate(80px, 50px); }
#map { position: fixed; inset: 0; }
.maplibregl-canvas { outline: none; }

.glass {
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Buttons */
.btn {
  font: inherit; font-weight: 700; font-size: 16px; border-radius: 999px; border: 0;
  padding: 12px 22px; cursor: pointer; color: var(--ink); transition: transform 0.08s, background 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--gold); color: var(--gold-ink); }
.btn.primary:hover { background: #ffd067; }
.btn.primary:disabled { opacity: 0.4; cursor: default; }
.btn.ghost { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.18); }
.btn.ghost:disabled { opacity: 0.4; cursor: default; }
.btn.big { font-size: 20px; padding: 16px 28px; min-width: 240px; }
.btn.wide { width: 100%; }

/* Overlay screens */
#overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(3, 7, 20, 0.35); }
#overlay.off { display: none; }
.card {
  background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 24px; padding: 32px; text-align: center; max-width: 440px; width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); max-height: calc(100vh - 32px); overflow-y: auto;
}
.card.wide { max-width: 720px; text-align: left; }
.card h1 { font-size: 40px; margin: 6px 0 10px; }
.card h2 { font-size: 20px; margin: 22px 0 10px; }
.card h2:first-child { margin-top: 0; }
.logo { font-size: 46px; font-weight: 800; letter-spacing: -1px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.logo-pin { width: 34px; height: 44px; background: var(--gold); clip-path: path("M17 44 C17 44 1 26 1 16 A16 16 0 1 1 33 16 C33 26 17 44 17 44 Z"); }
.tag { color: var(--muted); font-size: 17px; margin: 8px 0 22px; }
.stack { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.credits { color: var(--muted); font-size: 12px; margin-top: 22px; }
.note { color: var(--muted); font-size: 12px; margin-top: 10px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* Segmented controls */
.seg { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.seg button {
  font: inherit; font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.16);
}
.seg button.on { background: var(--ink); color: #0a1430; border-color: var(--ink); }

/* Player rows */
.prow { display: flex; align-items: center; gap: 12px; margin: 10px 0; flex-wrap: wrap; }
.prow input {
  font: inherit; font-size: 17px; font-weight: 600; flex: 1 1 180px; min-width: 150px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); color: var(--ink); outline: none;
}
.prow input:focus { border-color: var(--gold); }
.swatches { display: flex; gap: 6px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4); }
.sw.taken { opacity: 0.18; cursor: not-allowed; }
.pindot { width: 22px; height: 30px; flex: none; }

/* Difficulty cards */
.levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lvl {
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; padding: 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.07); border: 2px solid rgba(255, 255, 255, 0.1);
}
.lvl.on { border-color: var(--gold); background: rgba(255, 194, 61, 0.12); }
.lvl b { display: block; font-size: 17px; margin-bottom: 4px; }
.lvl span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
@media (max-width: 640px) { .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* HUD */
#topleft { position: fixed; top: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
#progress { padding: 10px 16px; font-weight: 700; font-size: 15px; }
.btn.small { font-size: 13px; padding: 7px 14px; }
#quitbtn { border-radius: 999px; }
.chip .lv { color: var(--gold); display: block; font-size: 13px; margin-top: 2px; }
#minis { position: fixed; top: 16px; right: 16px; padding: 10px 14px; min-width: 150px; font-size: 14px; }
.mini { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.mini .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.mini .nm { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.mini .sc { color: var(--muted); font-variant-numeric: tabular-nums; }

#qcard {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 380px));
  min-width: 300px; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
#qflagwrap { flex: none; }
#qflag { width: 72px; height: 54px; border-radius: 6px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); display: block; }
#qcard.flagq #qflag { width: 132px; height: 99px; }
#qtext { flex: 1; min-width: 0; }
#qkind { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); }
#qtitle { font-size: 28px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
#qsub { font-size: 15px; color: var(--muted); margin-top: 2px; }
#qclue { flex-basis: 100%; background: rgba(255, 194, 61, 0.14); border: 1px solid rgba(255, 194, 61, 0.4); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
#qclue p { margin: 0; }
#qclue p + p { margin-top: 6px; }

#turnbar {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 32px));
  padding: 12px 14px 12px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
#turnwho { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
#turnhelp { flex: 1; color: var(--muted); font-size: 14px; min-width: 120px; }
.turnbtns { display: flex; gap: 8px; margin-left: auto; }

#revealcard {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  padding: 18px; max-height: 52vh; overflow-y: auto;
}
#answer { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
#answer img { width: 66px; height: 50px; border-radius: 6px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
#answer .t { font-size: 22px; font-weight: 800; line-height: 1.15; }
#answer .s { color: var(--muted); font-size: 14px; margin-top: 2px; }
.res { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.res .nm { font-weight: 700; }
.res .km { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.res .km small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; }
.res .tot { color: var(--muted); font-size: 13px; text-align: right; min-width: 92px; font-variant-numeric: tabular-nums; }
.res .best { color: var(--gold); font-size: 12px; font-weight: 800; margin-left: 6px; }
.hintused { font-size: 11px; color: var(--gold); margin-left: 6px; font-weight: 700; }
#nextbtn { margin-top: 12px; }

/* Map markers */
.pin { width: 30px; height: 40px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45)); pointer-events: none; }
.pin svg { width: 30px; height: 40px; display: block; }
.pin span { position: absolute; top: 6px; left: 0; width: 30px; text-align: center; font-weight: 900; font-size: 13px; color: #0a1430; }
.target { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.target .star {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gold); border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(255, 194, 61, 0.35), 0 4px 10px rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--gold-ink); font-weight: 900;
}
.target .lbl { margin-top: 6px; background: rgba(10, 20, 44, 0.85); padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.country-label {
  font-size: 11px; font-weight: 800; color: #3b3326; letter-spacing: 0.3px; white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.9), 0 0 6px rgba(255, 255, 255, 0.7);
}
.country-label.big { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }

/* Ready screen */
#readypin { display: flex; justify-content: center; }
#readypin svg { width: 60px; height: 80px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }

/* Final + board */
#podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 18px 0 8px; min-height: 180px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 130px; }
.pod .bar { width: 100%; border-radius: 14px 14px 6px 6px; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; font-size: 26px; font-weight: 900; color: #0a1430; }
.pod .nm { font-weight: 800; font-size: 17px; text-align: center; overflow-wrap: anywhere; }
.pod .sc { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.blist { margin-top: 10px; }
.brow { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.brow .rk { font-weight: 900; color: var(--gold); font-size: 18px; text-align: center; }
.brow .nm { font-weight: 700; }
.brow .sc { font-weight: 800; font-variant-numeric: tabular-nums; }
.brow .dt { color: var(--muted); font-size: 12px; min-width: 76px; text-align: right; }
.brow.new { background: rgba(255, 194, 61, 0.12); border-radius: 10px; }
.empty { color: var(--muted); padding: 18px 6px; }

@media (max-width: 600px) {
  #minis { display: none; }
  #turnbar { bottom: 12px; padding: 10px 12px; }
  #qtitle { font-size: 24px; }
}
@media (max-width: 900px) {
  body.revealing #minis { display: none; }
  #topleft { flex-direction: row; }
  #qcard { top: 64px; width: calc(100vw - 32px); }
  #minis { top: auto; bottom: 104px; right: 16px; min-width: 0; }
}

/* Satellite look: light labels with a dark halo */
body.sat .country-label { color: #ffffff; text-shadow: 0 0 3px rgba(0, 0, 0, 0.95), 0 0 7px rgba(0, 0, 0, 0.7); }

/* Offline status on the home screen */
.offline { margin: 16px auto 0; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; display: inline-block;
  background: rgba(255, 194, 61, 0.14); color: var(--gold); border: 1px solid rgba(255, 194, 61, 0.4); }
.offline.ready { background: rgba(126, 217, 87, 0.14); color: #9be37b; border-color: rgba(126, 217, 87, 0.45); }

/* ---- v4: daily, online, facts, sounds ---- */
.btn.gold-ghost { background: rgba(255, 194, 61, 0.14); border: 1px solid rgba(255, 194, 61, 0.55); color: var(--gold); }
.btn.gold-ghost:hover { background: rgba(255, 194, 61, 0.24); }
.pair { display: flex; gap: 10px; width: 100%; max-width: 380px; }
.pair .btn { flex: 1; padding: 12px 10px; font-size: 15px; }
.soundbtn.off { opacity: 0.65; }
.hudbtns { display: flex; gap: 8px; }
.timer { font-weight: 900; font-size: 22px; font-variant-numeric: tabular-nums; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); min-width: 70px; text-align: center; }
.timer.low { background: rgba(255, 90, 95, 0.25); color: #ffb3b5; }
.fact { background: rgba(126, 217, 87, 0.12); border: 1px solid rgba(126, 217, 87, 0.35); border-radius: 12px;
  padding: 10px 12px; font-size: 14.5px; line-height: 1.4; margin: 0 0 10px; }
.fact b { color: #9be37b; margin-right: 4px; }
.waitnote { text-align: center; color: var(--muted); font-size: 14px; margin-top: 12px; }
.msg { color: var(--gold); font-size: 14px; margin: 14px 0 0; }
.note { color: var(--muted); font-size: 13px; }
.dailyinfo { background: rgba(255, 194, 61, 0.1); border: 1px solid rgba(255, 194, 61, 0.35); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }
.dailyinfo .today { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dailyinfo .today span, .streaks span { background: rgba(255, 255, 255, 0.08); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.streaks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 10px; }
.lbl { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.codeinput { font: inherit; font-size: 28px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; width: 100%; max-width: 280px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: var(--ink); outline: none; }
.codeinput:focus { border-color: var(--gold); }
.bigcode { font-size: 46px; font-weight: 900; letter-spacing: 6px; color: var(--gold); margin-bottom: 14px; }
.plist { text-align: left; margin-bottom: 8px; }
.plist .prow { margin: 6px 0; gap: 10px; }
.tagchip { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(255, 194, 61, 0.2); color: var(--gold); }
.tagchip.me { background: rgba(63, 169, 255, 0.2); color: #8fcaff; }
#s-lobby .stack { margin-top: 14px; }
#topleft .hudbtns .btn { border-radius: 999px; }
@media (max-width: 600px) {
  .pair { flex-direction: column; }
  .timer { font-size: 18px; min-width: 60px; }
}

/* ---- v5: packs, learning reveal, speed bonus, challenge codes, help, tips ---- */
.speed { font-weight: 900; font-size: 15px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 194, 61, 0.2); color: var(--gold); white-space: nowrap; }
.where { margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.res .miss { font-size: 12px; color: var(--muted); font-weight: 600; }
.speedused { font-size: 11px; color: #9be37b; margin-left: 6px; font-weight: 800; }
.explore { color: var(--muted); font-size: 12.5px; text-align: center; margin: 10px 0 0; }
.revealbtns { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.revealbtns #nextbtn { flex: 1; margin-top: 0; }
#revealcard { padding-top: 14px; }
.minbtn { position: absolute; top: 10px; right: 12px; font: inherit; font-size: 13px; font-weight: 800; color: var(--ink); cursor: pointer;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 5px 12px; z-index: 2; }
.minbtn:hover { background: rgba(255, 255, 255, 0.2); }
#answer { padding-right: 84px; }
.minline { display: none; cursor: pointer; padding-right: 96px; min-height: 26px; }
.minline b { display: block; font-size: 17px; }
.minline span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.minline i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 4px; }
#revealcard.min { max-height: none; overflow: visible; padding: 10px 12px; }
#revealcard.min .full { display: none; }
#revealcard.min .minline { display: block; }
#revealcard.min .revealbtns { margin-top: 8px; }
body.mapview #qcard, body.mapview #minis { display: none; }
.tripstar { display: flex; align-items: center; gap: 6px; pointer-events: none; }
.tripstar b { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); border: 2px solid #fff; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 900; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); flex: none; }
.tripstar span { background: rgba(10, 20, 44, 0.85); color: #fff; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tripdot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); pointer-events: none; }
.mapback { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 40; }
.mapback:active { transform: translateX(-50%) scale(0.97); }
.packsel { font: inherit; font-size: 17px; font-weight: 700; width: 100%; max-width: 360px; padding: 12px 40px 12px 14px; border-radius: 12px; cursor: pointer;
  color: var(--ink); background: rgba(255, 255, 255, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23ffc23d' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid rgba(255, 255, 255, 0.2); appearance: none; -webkit-appearance: none; margin-bottom: 8px; }
.packsel:focus { outline: none; border-color: var(--gold); }
.packsel option, .packsel optgroup { color: #0a1430; background: #fff; }
.rlabel { pointer-events: none; white-space: nowrap; font-weight: 800; font-size: 12px; color: #3b3326; letter-spacing: 0.3px;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 0 7px rgba(255, 255, 255, 0.8); }
.rlabel.answer { font-size: 15px; text-transform: uppercase; letter-spacing: 1.2px; color: #7a4a00; }
.rlabel.nb { font-size: 11.5px; color: #5c5240; }
.rlabel.cap { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.rlabel.cap i { width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2.5px solid #c0392b; flex: none; }
body.sat .rlabel { color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, 0.95), 0 0 7px rgba(0, 0, 0, 0.7); }
body.sat .rlabel.answer { color: #ffd77a; }
.tip { position: fixed; z-index: 50; background: #fff8e6; color: #3a2600; border-radius: 14px; padding: 12px 14px; font-size: 14.5px; line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.tip b { align-self: flex-end; font-size: 13px; color: #b07a00; }
.help { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.help div { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.35; }
.help i { font-style: normal; font-size: 22px; width: 30px; text-align: center; flex: none; }
.linkbtn { font: inherit; background: none; border: 0; color: var(--gold); font-weight: 700; font-size: 14.5px; cursor: pointer; padding: 6px 0; margin-top: 14px; text-decoration: underline; }
.codebox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.codeinput.small { font-size: 22px; max-width: 200px; letter-spacing: 3px; padding: 8px 12px; }
.challenge { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 8px 0 4px;
  background: rgba(255, 194, 61, 0.08); border: 1px dashed rgba(255, 194, 61, 0.45); border-radius: 14px; padding: 10px 14px; }
.challenge .note { margin: 0; display: block; }
.ccode { font-size: 28px; font-weight: 900; letter-spacing: 4px; color: var(--gold); }
.challenge .msg { flex-basis: 100%; text-align: center; margin: 4px 0 0; }
#s-board .seg { margin-bottom: 10px; }
#s-host .note { margin-top: 6px; }
@media (max-width: 600px) {
  .revealbtns { flex-wrap: wrap; }
  .revealbtns #nextbtn { flex-basis: 100%; }
  .revealbtns .btn.small { padding: 8px 10px; font-size: 12.5px; flex: 1; }
  .help div { font-size: 15px; }
}
.seg.cats { margin-bottom: 10px; }
.seg.cats button { font-size: 14.5px; padding: 9px 14px; }
@media (max-width: 600px) { .seg.cats button { font-size: 13.5px; padding: 8px 11px; } }

/* ---------- Classroom mode ---------- */
#turnhelp small { display: block; font-size: 12px; margin-top: 2px; opacity: 0.85; }
#turnhelp b { color: var(--ink); }
#turnbar.teacher #turnhelp { font-size: 16px; }
.mini.head { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.mini.sub { color: var(--gold); font-weight: 800; padding-left: 20px; }
.mini .rk { width: 18px; text-align: right; color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.classline { color: var(--muted); font-size: 14px; margin: 10px 2px 4px; }
.classline b { color: var(--gold); }
.classline.big { font-size: 18px; color: var(--ink); text-align: center; margin: 4px 0 12px; }
.classboard { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; padding: 10px 12px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: 14px; }
.classboard > b { width: 100%; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.classboard span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.classboard i { font-style: normal; color: var(--gold); font-weight: 900; }
.classboard em { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.classboard small { color: var(--muted); font-weight: 600; }
.plist.grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 42vh; overflow-y: auto; }
.plist.grid .note { width: 100%; margin: 0 0 4px; }
.plist .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07);
  font-weight: 700; font-size: 14px; }
.plist .chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.plist .chip.me { outline: 2px solid var(--gold); }
.plist .chip.out { opacity: 0.4; }
.lobbyhow { font-size: 17px; color: var(--ink); margin: 4px 0 8px; line-height: 1.4; }
.lobbyhow b { color: var(--gold); }
.netnote { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 107, 107, 0.92); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); cursor: pointer;
  max-width: calc(100vw - 32px); text-align: center; }
@media (max-width: 900px) { #minis .mini.head, #minis .mini .rk { font-size: 11px; } }

/* ---------- Connection check ---------- */
.checkrows { display: grid; gap: 8px; margin: 14px 0 6px; text-align: left; }
.checkrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.checkrow i { font-style: normal; font-weight: 900; width: 22px; text-align: center; color: var(--muted); }
.checkrow span { flex: 1; font-weight: 700; }
.checkrow em { font-style: normal; color: var(--muted); font-size: 14px; }
.checkrow.ok i, .checkrow.ok em { color: #7ed957; }
.checkrow.bad i, .checkrow.bad em { color: var(--danger); }
.checkadvice { text-align: left; padding: 12px 14px; border-radius: 12px; line-height: 1.45; margin: 8px 0 0; }
.checkadvice.good { background: rgba(126, 217, 87, 0.12); }
.checkadvice.badnote { background: rgba(255, 107, 107, 0.12); }
.credits a { color: var(--muted); }

/* ---------- Report a problem / moved ---------- */
.reporttext { width: 100%; margin: 10px 0 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; font-size: 16px; resize: vertical; }
.explore a, .note a { color: var(--gold); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
