:root {
  --accent: #7b1e3a;
  --accent-2: #a3324f;
  --accent-soft: #f6e8ec;
  --bg: #f7f4f2;
  --card: #ffffff;
  --text: #241c1e;
  --muted: #7a6f72;
  --border: #e6dfdc;
  --ok: #1f8a4c;
  --ok-soft: #e5f4ea;
  --bad: #c0392b;
  --bad-soft: #fbe9e7;
  --warn: #9a6200;
  --warn-soft: #fff4dc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(40, 20, 25, .06), 0 4px 14px rgba(40, 20, 25, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 14px calc(96px + env(safe-area-inset-bottom));
}
body.admin main { max-width: 960px; padding-bottom: 48px; }

h1, h2, h3 { line-height: 1.2; margin: .2em 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; margin-top: 1.2em; }
a { color: var(--accent); text-decoration: none; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.noMargin { margin: 0 0 4px; }
.mt { margin-top: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}
.narrow { max-width: 420px; margin: 8vh auto 0; }
.login .logo, .card .logo { font-size: 2.6rem; text-align: center; }
.login h1 { text-align: center; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }

label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
label.inline { flex-direction: row; align-items: center; gap: 10px; }
label.inline input { width: 90px; }
input, textarea, select {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-2); outline-offset: -1px; }
#code { text-transform: uppercase; letter-spacing: .15em; font-size: 1.2rem; text-align: center; }

.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--accent-2); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); }
.btn.danger { color: var(--bad); border-color: #efc4bf; }
.btn.link { background: none; border: none; color: var(--accent); padding: 6px 8px; }
.btn.link.danger { color: var(--bad); }
.btn.big { padding: 13px 20px; font-size: 1.05rem; }
.btn.full { width: 100%; }
.btn.round { width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; padding: 0; }

.error { color: var(--bad); background: var(--bad-soft); padding: 8px 12px; border-radius: 8px; margin: 0; }
.warn { color: var(--warn); background: var(--warn-soft); padding: 8px 12px; border-radius: 8px; margin: 8px 0; font-size: .92rem; }
.warnText { color: var(--warn); font-style: italic; }

/* Topplinje */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 4px 2px 8px;
}
.topbar .title { font-weight: 700; }
.topbar .right { display: flex; align-items: center; gap: 8px; }
.save { font-size: .8rem; color: var(--ok); }
.save.pending { color: var(--muted); }

/* Navigasjonsprikker */
.dots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dot {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff;
  font: inherit; font-weight: 700; color: var(--muted); cursor: pointer;
}
.dot.answered { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.dot.dup { background: var(--warn-soft); border-color: #f0d28e; color: var(--warn); }
.dot.current { border-color: var(--accent); color: #fff; background: var(--accent); }

.posHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.posNum { font-size: 2.4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.posNum span { font-size: 1rem; font-weight: 500; color: var(--muted); }

.chosen {
  background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
}
.chosen .warn { flex-basis: 100%; margin: 0; }
.chosen .btn { margin-left: auto; }

/* Objektkort */
.items { display: flex; flex-direction: column; gap: 8px; }
.item {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px;
  transition: border-color .12s, background .12s;
}
.item:hover { border-color: var(--accent-2); }
.item.selected { border-color: var(--accent); background: var(--accent-soft); }
.item.used:not(.selected) { border-style: dashed; }
.itemTop { display: flex; justify-content: space-between; gap: 8px; }
.itemName { font-weight: 700; }
.check { color: var(--accent); font-weight: 800; }
.desc { color: var(--muted); font-size: .92rem; margin-top: 4px; white-space: pre-wrap; }
.badge {
  display: inline-block; margin-top: 6px; font-size: .78rem; font-weight: 600;
  background: var(--warn-soft); color: var(--warn); padding: 2px 8px; border-radius: 999px;
}
.badge.inline { margin: 0 0 0 6px; }

.bottomBar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
@media (min-width: 790px) {
  .bottomBar { left: 50%; transform: translateX(-50%); width: 760px; border: 1px solid var(--border); border-bottom: none; border-radius: 14px 14px 0 0; }
}

/* Oppsummering */
.summary { list-style: none; padding: 0; margin: 0; }
.summary li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-bottom: 1px solid var(--border);
}
.summary li:last-child { border-bottom: none; }
.summary li.clickable { cursor: pointer; }
.summary li.clickable:hover { background: var(--bg); }
.summary li.right { background: var(--ok-soft); }
.summary li.wrong { background: var(--bad-soft); }
.summary li.right, .summary li.wrong { border-radius: 8px; border-bottom: none; margin-bottom: 4px; }
.facit { font-size: .85rem; color: var(--muted); }
.res { font-size: 1.3rem; font-weight: 800; }
.res.ok { color: var(--ok); }
.res.bad { color: var(--bad); }

.num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem;
}
.score { font-size: 3rem; font-weight: 800; color: var(--accent); margin: 0; }
.score span { font-size: 1.1rem; font-weight: 500; color: var(--muted); }

/* Admin */
.gameList { display: flex; flex-direction: column; }
.gameRow { display: flex; align-items: center; gap: 12px; color: inherit; margin: 6px 0; }
.gameRow:hover { border-color: var(--accent-2); }
.code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .1em; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-right: 6px; }
.pill.active { background: var(--ok-soft); color: var(--ok); }
.pill.closed { background: #eee; color: var(--muted); }
.codeBox { text-align: center; background: var(--accent-soft); border-radius: 12px; padding: 8px 16px; }
.bigCode { font-family: ui-monospace, Menlo, monospace; font-size: 2rem; font-weight: 800; letter-spacing: .15em; color: var(--accent); }

.itemEdit { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.itemEdit .num { margin-top: 8px; }
.keyGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 12px; }
.keyCell { flex-direction: row; align-items: center; gap: 8px; }

.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats3 .card { margin: 0; }
.stat { text-align: center; }
.statNum { font-size: 1.8rem; font-weight: 800; color: var(--accent); }

.winner { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #fff8e6, #fff); border-color: #f0d28e; }
.trophy { font-size: 2.8rem; }
.winnerName { font-size: 1.4rem; font-weight: 800; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.table .r { text-align: right; }
.table tr.top td { background: #fff8e6; }
.matrix th, .matrix td { text-align: center; padding: 6px 4px; font-size: .9rem; }
.matrix td:first-child, .matrix th:first-child { text-align: left; white-space: nowrap; }
.matrix td.ok { color: var(--ok); background: var(--ok-soft); }
.matrix td.bad { color: var(--bad); background: var(--bad-soft); }
.scroll { overflow-x: auto; margin-top: 10px; }

ul.plain { list-style: none; padding: 0; margin: 8px 0 0; }
ul.plain li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }

.bars { display: flex; flex-direction: column; gap: 12px; }
.barRow { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr auto; gap: 4px 12px; align-items: center; }
.barLabel { display: flex; align-items: center; gap: 8px; min-width: 0; }
.barLabel b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 12px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.barVal { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.barNote { grid-column: 2 / 4; margin-top: -2px; }

details summary { cursor: pointer; }

#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; }
.toast { background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: .9rem; }
.toast.ok { background: var(--ok); }
.toast.error { background: var(--bad); }

@media (max-width: 560px) {
  .hideMobile { display: none; }
  .barRow { grid-template-columns: 1fr auto; }
  .bar { grid-column: 1 / 3; grid-row: 2; }
  .barNote { grid-column: 1 / 3; }
  .bigCode { font-size: 1.6rem; }
}

/* Google-innlogging, status og seksjoner */
.btn.google { background: #fff; border: 1px solid #dadce0; color: #3c4043; gap: 10px; }
.btn.google:hover { background: #f8f9fa; }
h2.section { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 22px; }
.pill.open { background: var(--ok-soft); color: var(--ok); }
.pill.locked { background: var(--warn-soft); color: var(--warn); }
.statusBox { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.statusBox p { margin: 0 0 4px; }
.statusBox.open { background: var(--ok-soft); }
.statusBox.locked { background: var(--warn-soft); }
ul.plain li .right { display: flex; align-items: center; gap: 8px; }
.btn.small { padding: 4px 8px; font-size: .85rem; }
.table tr.me td { background: var(--accent-soft); font-weight: 600; }

/* ---------- Podium ---------- */
.row.noTop { margin-top: 0; }
.podium {
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: end;
  gap: 8px; max-width: 520px; margin: 18px auto 6px;
}
.pStep { display: flex; flex-direction: column; align-items: stretch; text-align: center; min-width: 0; }
.pTop { padding: 0 2px 8px; opacity: 0; animation: fadeUp .5s ease forwards; }
.pName { font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.pName.me { color: var(--accent); }
.pScore { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.pBlock {
  position: relative; border-radius: 12px 12px 4px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 10px; color: #fff; box-shadow: inset 0 -6px 0 rgba(0,0,0,.08);
  transform-origin: bottom; transform: scaleY(0); animation: rise .6s cubic-bezier(.2,.8,.2,1) forwards;
}
.pMedal { font-size: 1.8rem; line-height: 1; }
.pRank { font-size: 1.6rem; font-weight: 900; opacity: .9; margin-top: 4px; }
.p1 .pBlock { height: 150px; background: linear-gradient(180deg, #e8c14a, #c99a1e); }
.p2 .pBlock { height: 110px; background: linear-gradient(180deg, #c3cad1, #98a2ac); }
.p3 .pBlock { height: 80px;  background: linear-gradient(180deg, #d7955e, #b06a35); }
.p3 .pBlock { animation-delay: .1s; }  .p3 .pTop { animation-delay: .6s; }
.p2 .pBlock { animation-delay: .5s; }  .p2 .pTop { animation-delay: 1s; }
.p1 .pBlock { animation-delay: .9s; }  .p1 .pTop { animation-delay: 1.5s; }
.pStep.empty .pBlock { opacity: .35; }
@keyframes rise { to { transform: scaleY(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pBlock, .pTop { animation: none; transform: none; opacity: 1; } }

.restList { list-style: none; padding: 0; margin: 16px auto 0; max-width: 520px; }
.restList li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.restList li.me { background: var(--accent-soft); border-radius: 8px; font-weight: 600; }
.rRank { width: 2em; color: var(--muted); font-weight: 700; }

/* Storskjerm */
.stage { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; }
.stageBar { position: fixed; top: 10px; left: 14px; right: 14px; display: flex; justify-content: space-between; }
.stageTitle { text-align: center; font-size: clamp(1.8rem, 5vw, 3.4rem); margin-bottom: 4px; }
.podium.big { max-width: 900px; gap: 14px; }
.podium.big .pName { font-size: clamp(1.1rem, 3vw, 2rem); }
.podium.big .pScore { font-size: clamp(.9rem, 2vw, 1.3rem); }
.podium.big .p1 .pBlock { height: 34vh; }
.podium.big .p2 .pBlock { height: 25vh; }
.podium.big .p3 .pBlock { height: 18vh; }
.podium.big .pMedal { font-size: clamp(2rem, 5vw, 3.6rem); }
.podium.big .pRank { font-size: clamp(1.6rem, 4vw, 3rem); }
.podium.big + .restList { max-width: 700px; font-size: 1.15rem; }

/* ---------- Smaksprøvene ---------- */
.tastings { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.tasting { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.tasting[open] { border-color: var(--accent-2); }
.tasting summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer;
}
.tasting summary::-webkit-details-marker { display: none; }
.tasting summary .grow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.miniBar { flex-basis: 100%; height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.miniBar span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.mini { font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #eee; color: var(--muted); }
.mini.ok { background: var(--ok-soft); color: var(--ok); }
.mini.bad { background: var(--bad-soft); color: var(--bad); }
.tRate { text-align: right; font-weight: 800; line-height: 1.1; }
.tRate small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); }
.tBody { padding: 0 14px 14px; border-top: 1px dashed var(--border); }
.tBody h4 { margin: 12px 0 6px; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--bg); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.dist { display: flex; flex-direction: column; gap: 8px; }
.dRow { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; gap: 2px 10px; align-items: center; }
.dLabel { font-weight: 600; font-size: .9rem; }
.dRow.correct .dLabel { color: var(--ok); }
.dRow .fill { background: var(--bad); opacity: .55; }
.dRow.correct .fill { background: var(--ok); opacity: 1; }
.fill.grey { background: #ccc !important; }
.dVal { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.dWho { grid-column: 2 / 4; }
.you { font-size: .7rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
@media (max-width: 560px) {
  .dRow { grid-template-columns: 1fr auto; }
  .dRow .bar { grid-column: 1 / 3; grid-row: 2; }
  .dWho { grid-column: 1 / 3; }
  .p1 .pBlock { height: 132px; } .p2 .pBlock { height: 104px; } .p3 .pBlock { height: 84px; }
  .pMedal { font-size: 1.4rem; } .pRank { font-size: 1.3rem; margin-top: 2px; }
}

/* ---------- Mobiljusteringer ---------- */
.podium { width: 100%; }
.statusBox .row .btn { flex: 1 1 auto; }
@media (max-width: 560px) {
  .codeBox { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; }
  .bigCode { font-size: 1.7rem; }
  .row.wrap > #joinUrl { flex: 1 1 100%; font-size: .85rem; }
  .row.wrap > #copy { flex: 1 1 100%; }
  .statusBox .row .btn { flex: 1 1 100%; }
  .podium.big { gap: 8px; }
  .podium.big .p1 .pBlock { height: min(34vh, 230px); }
  .podium.big .p2 .pBlock { height: min(25vh, 170px); }
  .podium.big .p3 .pBlock { height: min(18vh, 125px); }
  .stage { justify-content: flex-start; padding-top: 48px; }
  .gameRow { flex-wrap: wrap; }
  #toasts { width: calc(100% - 24px); }
  .toast { text-align: center; }
}

/* Spillkode i nytt spill */
.codeRow { margin-top: 4px; }
.codeInput { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); max-width: 200px; }
.codeStatus { margin: 6px 0 0; font-weight: 600; min-height: 1.2em; }
.codeStatus.ok { color: var(--ok); }
.codeStatus.bad { color: var(--bad); }

/* Animasjon kun på storskjerm – i kortene oppdateres podiet live og skal ikke "hoppe" */
.podium:not(.big) .pBlock, .podium:not(.big) .pTop { animation: none; transform: none; opacity: 1; }

/* ---------- Installerbar app ---------- */
main { padding-top: max(12px, env(safe-area-inset-top)); }
#installBanner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 8px 30px rgba(40, 20, 25, .18);
  max-width: 520px; margin: 0 auto; animation: fadeUp .3s ease;
}
#installBanner img { width: 44px; height: 44px; border-radius: 10px; }
.shareIcon { display: inline-block; font-weight: 800; color: #0a84ff; }
/* Unngå at banneret dekker bunnlinjen i smakevisningen */
body:has(.bottomBar) #installBanner { bottom: calc(76px + env(safe-area-inset-bottom)); }

/* ---------- Ikonvelger ---------- */
.fieldLabel { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.iconPicker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.iconOpt {
  font: inherit; cursor: pointer; background: #fff; color: var(--text);
  border: 2px solid var(--border); border-radius: 12px; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.iconOpt:hover { border-color: var(--accent-2); }
.iconOpt.sel { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.iconEmoji { font-size: 1.7rem; line-height: 1.2; }
.gIcon { font-size: 1.1em; }
@media (max-width: 560px) { .iconPicker { grid-template-columns: repeat(3, 1fr); } }

/* Fasit: automatisk vs. manuelt */
.keyCell.manual select { border-color: var(--accent-2); background: var(--accent-soft); }

/* ---------- Live deltakeroversikt ---------- */
.liveDot { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: #fff; background: var(--bad); padding: 3px 8px; border-radius: 999px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.liveList { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.liveRow { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.liveRow.done { background: #fbfdfb; }
.liveHead { display: flex; align-items: center; gap: 8px; }
.liveName { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.badgeS { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.badgeS.ok { background: var(--ok-soft); color: var(--ok); }
.badgeS.bad { background: var(--bad-soft); color: var(--bad); }
.liveScore { text-align: right; line-height: 1; }
.liveScore b { font-size: 1.4rem; color: var(--accent); }
.liveScore small { display: block; font-size: .7rem; color: var(--muted); }
.liveProg { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; }
.liveProg .bar { flex: 1; }
.fill.okFill { background: var(--ok); }
.pips { display: flex; flex-wrap: wrap; gap: 4px; }
.pip { width: 24px; height: 24px; border-radius: 6px; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pip.empty { background: var(--bg); color: #bbb; border: 1px dashed #ddd; }
.pip.ok { background: var(--ok); color: #fff; }
.pip.bad { background: var(--bad); color: #fff; opacity: .85; }
.pip.nokey { background: #ddd; color: #666; }

/* ---------- Ølkorker ---------- */
.cap { display: block; width: 100%; height: 100%; }
.capRow { display: inline-flex; gap: 2px; vertical-align: middle; }
.capRow .cap { width: 22px; height: 22px; }
.capRow.xs .cap { width: 15px; height: 15px; }
.capRow.sm .cap { width: 18px; height: 18px; }
.capRow.lg .cap { width: clamp(20px, 4vw, 34px); height: clamp(20px, 4vw, 34px); }

.rateBox { background: #fff8e6; border: 1px solid #f0d28e; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.rateHead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.capPick { display: flex; justify-content: space-between; gap: 4px; }
.capBtn {
  flex: 1; max-width: 58px; aspect-ratio: 1; padding: 2px; border: none; background: none; cursor: pointer;
  border-radius: 50%; transition: transform .12s;
}
.capBtn:active { transform: scale(.9); }
.capBtn:focus-visible { outline: 2px solid var(--accent-2); }
.capBtn .cap.on { animation: capPop .25s ease; }
@keyframes capPop { 50% { transform: scale(1.15); } }

.rated { margin-top: 2px; }
.capLine { margin: 6px 0 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.capLive { list-style: none; padding: 0; margin: 8px 0 0; }
.capLive li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.capLive li.none { opacity: .55; }
.capNum { text-align: right; line-height: 1.15; }
.capNum b { font-size: 1.3rem; color: var(--accent); }
.capNum small { display: block; font-size: .72rem; color: var(--muted); white-space: nowrap; }

/* Podium med korker */
.pScore .capRow { margin: 3px 0 1px; justify-content: center; }
.pScore .capRow.sm .cap { width: 13px; height: 13px; }
.rScore { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.podium.big .pScore div { font-size: clamp(.8rem, 1.8vw, 1.2rem); }

/* Korker per deltaker */
.personCaps { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pCaps { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.pCaps[open] { border-color: #f0d28e; }
.pCaps summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.pCaps summary::-webkit-details-marker { display: none; }
.pAvg { text-align: right; font-weight: 800; color: var(--accent); line-height: 1.1; }
.pAvg small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); }
.pCapList { list-style: none; margin: 0; padding: 0 12px 6px; border-top: 1px dashed var(--border); }
.pCapList li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pCapList li:last-child { border-bottom: none; }
.pVal { min-width: 1.6em; text-align: right; }
.pCaps > p { margin: 0 12px 10px; }
.rateHint { margin: -2px 0 6px; font-size: .78rem; color: var(--muted); }
