/* Farver fra designerens rumtema: dyb blå/lilla, cyan accent, guld til mønter. */
:root {
  --bg: #070b24;
  --panel: rgba(12, 20, 58, 0.92);
  --panel2: #142159;
  --line: #24418a;
  --text: #eef3ff;
  --muted: #8fa3d6;
  --accent: #38d6ff;
  --accent2: #ff4f7a;
  --gold: #ffd84d;
  --good: #5dff6a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--text); font-family: system-ui, "Segoe UI", sans-serif; overflow: hidden; }
body { background: var(--bg) url("../assets/sprites/bg_space.webp") center / cover no-repeat; }
body::before { content: ""; position: fixed; inset: 0; background: rgba(4, 7, 26, 0.72); pointer-events: none; }
button { font: inherit; color: inherit; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: 0.6; cursor: wait; }
button.primary { background: linear-gradient(180deg, #4fe0ff, #1f9fe0); border-color: #7fe9ff; color: #06122e; font-weight: 800; box-shadow: 0 0 18px rgba(56, 214, 255, 0.35); }
img.si { width: 44px; height: 44px; object-fit: contain; pointer-events: none; }
img.ci { width: 1.05em; height: 1.05em; vertical-align: -0.15em; margin-right: 3px; pointer-events: none; }
img.hi { width: 34px; height: 34px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.hidden { display: none !important; }

#app { position: relative; display: flex; flex-direction: column; height: 100vh; }
#topbar { display: flex; align-items: center; gap: 16px; padding: 6px 14px; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 58px; }
.brand { font-weight: 900; letter-spacing: 2px; font-size: 18px; }
.stat { display: flex; flex-direction: column; line-height: 1.1; }
.stat small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.stat b { font-size: 18px; }
.topbtns { display: flex; gap: 6px; margin-left: auto; }
.topbtns button { min-width: 40px; height: 40px; padding: 0 8px; font-size: 17px; }

/* TV-HUD: alle spillere med liv og mønter */
#hud { display: flex; gap: 8px; flex: 1; overflow: hidden; }
.hc { display: flex; flex-direction: column; gap: 3px; min-width: 96px; padding: 4px 8px; border-radius: 10px; background: var(--panel2); border-left: 4px solid var(--c); }
.hc.dead { opacity: 0.35; }
.hc .n { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.hc .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.hc .row b { color: var(--gold); }
.hpbar { height: 6px; background: #0a0e1a; border-radius: 3px; overflow: hidden; }
.hpbar i { display: block; height: 100%; background: var(--good); transition: width 0.15s; }
.hpbar i.low { background: #ff4d4d; }

#main { flex: 1; display: flex; min-height: 0; }
#boardWrap { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 10px; min-width: 0; }
#board { border-radius: 14px; border: 2px solid #2a56b0; box-shadow: 0 0 0 1px #0a1440, 0 0 40px rgba(56,140,255,0.25), 0 14px 50px rgba(0,0,0,0.7); touch-action: none; }
#banner { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-size: clamp(26px, 4.5vw, 60px); font-weight: 900; text-shadow: 0 4px 20px #000, 0 0 30px rgba(255,61,110,0.6); pointer-events: none; opacity: 0; white-space: nowrap; }
#banner.show { animation: banner 2s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -62%) scale(1); } }
#pausedNote { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 60px; font-weight: 900; background: rgba(5,8,16,0.55); pointer-events: none; }

#side { width: 380px; display: flex; flex-direction: column; gap: 12px; padding: 12px; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; }

/* Telefon-controlleren (prototype af mobil-UI'en) */
.phone { border: 3px solid var(--c); border-radius: 26px; padding: 12px; background: linear-gradient(180deg, #0f1a4d, #0a1236); box-shadow: 0 0 0 6px #050a24 inset, 0 0 24px rgba(56,140,255,0.2); user-select: none; }
.phone.dead { opacity: 0.6; }
.ph-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ph-top .who { font-weight: 800; color: var(--c); }
.ph-top .coins { margin-left: auto; font-size: 28px; font-weight: 900; color: var(--gold); text-shadow: 0 2px 6px #000; display: flex; align-items: center; }
.ph-hp { flex-basis: 100%; }
.ph-hp .hpbar { height: 10px; border-radius: 5px; }
.ph-hp small { color: var(--muted); font-size: 11px; }
.shop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 4px 6px; min-height: 84px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel2); touch-action: manipulation; }
.tile .fill { position: absolute; left: 0; bottom: 0; width: 100%; background: rgba(255,216,77,0.13); pointer-events: none; transition: height 0.2s; }
.tile .ic { line-height: 1; position: relative; height: 46px; display: flex; align-items: center; }
.tile .nm { font-size: 12px; font-weight: 700; position: relative; white-space: nowrap; }
.tile .pr { font-size: 13px; font-weight: 800; color: var(--gold); position: relative; }
.tile .k { position: absolute; top: 4px; left: 7px; font-size: 10px; color: var(--muted); }
.tile.ok { border-color: var(--gold); background: linear-gradient(180deg, #2d3470, #1c2458); box-shadow: 0 0 12px rgba(255,216,77,0.25); }
.tile.ok:active { transform: scale(0.95); }
.tile.no { opacity: 0.55; } .tile.no img { filter: grayscale(0.6); }
.tile.flash { animation: flash 0.35s; }
@keyframes flash { 0% { background: #fff6; } 100% { background: inherit; } }
.ph-bottom { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.joy { position: relative; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #1f2a4a 0%, #141b33 70%); border: 2px solid var(--line); touch-action: none; flex-shrink: 0; cursor: grab; }
.joy .knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--c); box-shadow: 0 3px 10px #000; pointer-events: none; }
.ph-hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.ph-desc { min-height: 32px; font-size: 12px; color: var(--text); margin-top: 8px; }

#log { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line); padding-top: 8px; }
#log b { color: var(--text); }
#log .t { color: #56618a; margin-right: 4px; font-variant-numeric: tabular-nums; }

.overlay { position: fixed; inset: 0; background: rgba(5,8,16,0.82); display: flex; align-items: center; justify-content: center; z-index: 10; padding: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px; max-width: 780px; width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }

/* ---------- Key art: loading screen and behind the menus ---------- */
.overlay.art { --shade: linear-gradient(180deg, rgba(5,8,16,0.35) 0%, rgba(5,8,16,0.5) 55%, rgba(5,8,16,0.85) 100%); }
#splash { --shade: linear-gradient(180deg, rgba(5,8,16,0.75) 0%, rgba(5,8,16,0) 30%, rgba(5,8,16,0) 85%, rgba(5,8,16,0.7) 100%); }
.overlay.art, #splash { background: var(--shade), url(../assets/art/keyart.webp) center 60% / cover no-repeat, #070b24; }
@media (max-width: 960px) {
  .overlay.art, #splash { background: var(--shade), url(../assets/art/keyart-960.webp) center 60% / cover no-repeat, #070b24; }
}
.overlay.art .card { background: rgba(16, 22, 56, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#splash {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 4vh 16px 5vh;
  transition: opacity 0.5s;
  animation: splashFallback 0.5s 10s forwards;   /* never stuck on the loading screen, even if a script fails */
}
#splash.gone { opacity: 0; pointer-events: none; }
@keyframes splashFallback { to { opacity: 0; visibility: hidden; } }
.splash-logo { font-size: clamp(38px, 7vw, 92px); font-weight: 900; letter-spacing: 4px; text-shadow: 0 4px 28px rgba(0,0,0,0.9); }
.splash-bar { width: min(360px, 70vw); height: 6px; border-radius: 3px; background: rgba(255,255,255,0.15); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); transition: width 0.2s; }
h1 { margin: 0; font-size: 44px; font-weight: 900; letter-spacing: 3px; }
.tagline { color: var(--muted); margin: 4px 0 18px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.form select, .form input:not([type]) { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.range { display: flex; align-items: center; gap: 10px; }
.range input { flex: 1; }
.range b { color: var(--text); font-size: 18px; min-width: 20px; }
.menu-btns { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.menu-btns button { padding: 12px 20px; font-size: 16px; }
#roWinner { font-size: 34px; margin: 0 0 14px; }
#roTable { width: 100%; border-collapse: collapse; }
#roTable td, #roTable th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
#roTable th { color: var(--muted); font-weight: 500; font-size: 13px; }
.help-card { max-width: 900px; }
.rules li, .keys li { margin-bottom: 6px; line-height: 1.4; }
.help-items { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.help-items div { background: var(--panel2); border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.35; }
.help-items .hi { font-size: 22px; margin-right: 6px; vertical-align: middle; }
.help-items .p { color: var(--gold); font-weight: 700; }

@media (max-width: 1000px) {
  #main { flex-direction: column; }
  #side { width: 100%; border-left: 0; border-top: 1px solid var(--line); max-height: 50vh; }
  .brand, .stat:nth-of-type(3) { display: none; }
  .form, .help-items { grid-template-columns: 1fr; }
}

/* ---------- Netværksspil (play.html / tv.html) ---------- */
.form.one { grid-template-columns: 1fr; }
.form.one input { font-size: 20px; padding: 12px; }
.lobby-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.lobby-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border-left: 5px solid var(--c, var(--line)); font-size: 17px; }
.lobby-list li .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.lobby-list li small { color: var(--muted); }
.lobby-list li .w { margin-left: auto; color: var(--gold); font-weight: 700; }
.lobby-list li.empty { color: var(--muted); border-left-color: var(--line); }
.wait { color: var(--muted); margin: 10px 0 0; }
.joinurl { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #0b1440; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; line-height: 1.6; word-break: break-all; }
.joinurl b { color: var(--accent); font-size: 16px; }
.joinurl.big b { font-size: 26px; }
.hc.me { box-shadow: 0 0 0 2px #fff inset; }
#roTable tr.me td { background: rgba(56, 214, 255, 0.12); }
#connNote { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 20; padding: 10px 18px; border-radius: 12px; background: #5a1030; border: 1px solid var(--accent2); font-weight: 700; }
body[data-mode="tv"] #boardWrap { padding: 6px; }
body[data-mode="tv"] .hc { min-width: 120px; }
body[data-mode="tv"] .hc .n { font-size: 15px; }

/* Telefon: banen øverst, styringen fylder resten */
@media (max-width: 1000px) {
  body.net #boardWrap { flex: 0 0 auto; height: 36vh; padding: 4px; }
  body.net[data-mode="tv"] #boardWrap { flex: 1; height: auto; }
  body.net #side { flex: 1; max-height: none; padding: 8px; }
  body.net #topbar { gap: 8px; min-height: 46px; padding: 4px 8px; }
  body.net #hud { display: none; }
  body.net #log { display: none; }
  body.net .phone { padding: 8px; border-radius: 18px; }
  body.net .tile { min-height: 70px; }
  body.net .joy { width: 130px; height: 130px; }
}

@media (max-width: 520px) {
  h1 { font-size: 30px; letter-spacing: 1px; }
  .card { padding: 18px 16px; }
  .joinurl b { font-size: 14px; }
}


/* Telefon i højformat: alt skal kunne ses uden at scrolle – joysticket især */
@media (max-width: 600px) {
  body.net[data-mode="play"] #boardWrap { height: calc(100vw * 9 / 16 + 8px); }
  body.net[data-mode="play"] #side { overflow-y: auto; }
  body.net .ph-top { margin-bottom: 6px; }
  body.net .ph-top .coins { font-size: 24px; }
  body.net .shop { gap: 6px; }
  body.net .tile { min-height: 56px; padding: 4px 2px; }
  body.net .tile .ic { height: 32px; }
  body.net .tile img.si { width: 32px; height: 32px; }
  body.net .tile .nm { font-size: 11px; }
  body.net .ph-desc { display: none; }
  body.net .ph-bottom { margin-top: 8px; justify-content: center; }
  body.net .ph-hint { display: none; }
  body.net .joy { width: 140px; height: 140px; }
}

.btnlink { display: inline-flex; align-items: center; padding: 12px 20px; font-size: 16px; border-radius: 10px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; }
.btnlink:hover { background: rgba(56, 214, 255, 0.12); }


/* Butik i 5 x 2 (10 ting) */
.tile { min-height: 76px; padding: 6px 2px 4px; }
.tile .nm { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tile img.si { width: 38px; height: 38px; }
.tile .ic { height: 40px; }
.tile.aiming { border-color: #ff6a5a; box-shadow: 0 0 0 2px #ff6a5a inset, 0 0 16px rgba(255,90,70,0.5); animation: aimpulse 0.8s infinite alternate; }
@keyframes aimpulse { from { background: #3a1830; } to { background: #5a2236; } }
#board.aiming { cursor: crosshair; }
@media (max-width: 600px) {
  body.net .shop { gap: 4px; }
  body.net .tile { min-height: 60px; }
  body.net .tile .nm { font-size: 9.5px; }
  body.net .tile img.si { width: 30px; height: 30px; }
  body.net .tile .ic { height: 30px; }
}

/* Butik i 4 x 3 (11 ting) – og supervåbnet skal kunne ses på lang afstand */
.tile .nm { font-size: 12px; }
.tile[data-key="cluster"] { border-color: #ff9a1f; background: linear-gradient(180deg, #3a1d10, #1c1030); }
.tile[data-key="cluster"] .pr { color: #ffb347; }
.tile[data-key="cluster"].ok { box-shadow: 0 0 0 2px #ffb347 inset, 0 0 22px rgba(255,150,40,0.6); animation: ultimate 1s infinite alternate; }
@keyframes ultimate { from { background: #4a2210; } to { background: #6a2a12; } }
@media (max-width: 600px) {
  body.net .tile .nm { font-size: 10.5px; }
}

/* ---------- Online: name, lobby list, create, room lobby ---------- */
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-top h2 { margin: 0; }
.menu-card.wide { max-width: 820px; }
select.langsel { font: inherit; font-size: 14px; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; max-width: 150px; }
.topbtns select.langsel { height: 40px; }
@media (max-width: 600px) {
  .topbtns select.langsel { max-width: 88px; padding: 6px 4px; }
  #btnLeave { font-size: 0; }                                   /* room is tight: show ✕, full text stays as title */
  #btnLeave::before { content: '✕'; font-size: 17px; }
}
.hello { color: var(--muted); margin: 6px 0 12px; }
button.link { background: none; border: none; color: var(--accent); padding: 0 4px; text-decoration: underline; cursor: pointer; }
.menu-btns.top { margin-top: 0; margin-bottom: 12px; }
.search { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.room-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; }
.room-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.room-list li .rn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.room-list li .rn b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-list li .rn small { color: var(--muted); }
.room-list li .rp { color: var(--gold); font-weight: 700; white-space: nowrap; }
.room-list li button { min-width: 80px; }
.room-list li button:disabled { opacity: 0.4; cursor: default; }
.room-list li.empty { color: var(--muted); justify-content: center; }
.offline { margin: 14px 0 0; text-align: center; }
.offline a { color: var(--muted); }
.form .span2 { grid-column: 1 / 3; }
.form .radios { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; color: var(--muted); font-size: 13px; }
.form .radios .check { grid-column: auto; }
.form label small { color: var(--muted); font-size: 12px; }
.form input[type=password] { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge.pub { background: rgba(56, 214, 255, 0.15); color: var(--accent); }
.badge.priv { background: rgba(255, 180, 70, 0.15); color: #ffb347; }
.lobby-list li .kick { margin-left: 8px; padding: 4px 10px; font-size: 12px; border-color: var(--accent2); color: #ff9ab3; }
.invite { display: grid; gap: 8px; margin-top: 12px; }
.invite small { color: var(--muted); }
.copyrow { display: flex; gap: 6px; }
.copyrow input { flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--text); background: #0b1440; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; padding: 12px 18px; border-radius: 12px; background: #3a1030; border: 1px solid var(--accent2); font-weight: 700; max-width: 90vw; text-align: center; }
@media (max-width: 600px) {
  .form .span2 { grid-column: 1; }
  .menu-btns.top button { flex: 1; }
  .room-list li { flex-wrap: wrap; }
  .card-top h1 { font-size: 26px; }
}

/* ---------- Logo (the designer's wordmark, assets/art/logo.webp) ---------- */
img.logo { display: block; height: auto; user-select: none; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.55)); }
h1 img.logo { height: 104px; width: auto; margin: -6px 0 -4px -6px; }
.brand img.logo { height: 34px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); }
.splash-logo img.logo { width: min(560px, 78vw); max-height: 34vh; object-fit: contain; }
@media (max-width: 600px) { h1 img.logo { height: 72px; } .brand img.logo { height: 28px; } }

/* ---------- "What does what?" guide (js/guide.js) ---------- */
.ph-row { display: flex; align-items: flex-start; gap: 8px; }
.ph-row .ph-desc { flex: 1; }
.guide-btn { margin: 8px 0 0 auto; padding: 6px 10px; font-size: 13px; white-space: nowrap; border-radius: 8px; }
.overlay.guide { z-index: 40; align-items: flex-start; overflow-y: auto; }
.guide-card { max-width: 1040px; max-height: none; margin: auto; }
.guide-card h2 { margin: 0; font-size: 24px; }
.guide-card h4 { margin: 22px 0 6px; font-size: 16px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.g-close { min-width: 40px; height: 40px; font-size: 18px; }
.g-live { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 200, 60, 0.12); border: 1px solid rgba(255, 200, 60, 0.35); font-size: 14px; }
.g-hint { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.g-scroll { overflow-x: auto; }
.g-matrix { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; }
.g-matrix th, .g-matrix td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.g-matrix tr:first-child th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; text-align: center; }
.g-matrix tr th:first-child { text-align: left; white-space: nowrap; font-weight: 700; }
.g-matrix td { text-align: center; font-size: 18px; font-weight: 800; }
.g-ic { display: inline-flex; width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
.g-ic img { width: 100%; height: 100%; object-fit: contain; }
.g-ic.big { width: 52px; height: 52px; margin-right: 0; }
.g-hit, .g-first, .g-x2 { color: #5dff6a; }
.g-first { color: #ffd84d; }
.g-area { color: #ff9d4d; font-size: 16px; }
.g-slow { color: #7fdcff; }
.g-no { color: rgba(255, 255, 255, 0.2); }
.g-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.g-legend i { font-style: normal; font-weight: 800; margin-right: 4px; }
.g-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.g-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.g-card p { margin: 8px 0; line-height: 1.4; }
.g-head { display: flex; align-items: center; gap: 10px; }
.g-head h3 { margin: 0; font-size: 17px; }
.g-type { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.g-pricebox { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.g-price { display: inline-flex; align-items: center; gap: 4px; color: #ffd84d; font-size: 17px; }
.g-price img { width: 18px; height: 18px; }
.g-pricebox small { color: var(--muted); font-size: 11px; max-width: 130px; }
.g-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.g-stats span { display: flex; flex-direction: column; padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.g-stats small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.g-stats b { font-size: 14px; }
.g-line { margin-top: 3px; font-size: 13px; }
.g-line b { color: var(--muted); font-weight: 700; margin-right: 4px; }
.g-rules { margin: 0; padding-left: 20px; line-height: 1.5; font-size: 14px; }
@media (max-width: 600px) {
  .guide-card { padding: 16px 14px; }
  .g-cards { grid-template-columns: 1fr; }
  .guide-btn { font-size: 12px; padding: 5px 8px; }
}

/* ---------- Round-over table: "This round" / "Whole game" tabs (js/standings.js) ---------- */
.st-tabs { display: inline-flex; gap: 0; margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.st-tabs button { border: 0; border-radius: 0; padding: 7px 16px; font-size: 14px; background: transparent; color: var(--muted); }
.st-tabs button.on { background: var(--accent); color: #06121f; font-weight: 800; }
#roTable tr.st-note td { color: var(--muted); font-size: 12px; text-align: left; border: 0; padding-top: 8px; }
#roTable tr.me td { background: rgba(56, 214, 255, 0.1); }
