/* Dunderquiz – pubquiz-tema */

@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600; font-display: swap; src: url('/fonts/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url('/fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url('/fonts/nunito-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2'); }

:root {
  --cream: #FBF4E6;
  --paper: #FFFDF7;
  --sand: #F3E6CC;
  --sand-dark: #E9DCC4;
  --ink: #2B1D14;
  --ink-soft: #5C4A3C;
  --ink-faint: #6E5B4C;
  --tomato: #C8442F;
  --mustard: #E8B33A;
  --bottle: #2F6B4F;
  --sky: #2F6A9E;
  --plum: #A63D6B;
  --grape: #6B4A9E;
  --wood: #8A5A2B;
  --moss: #4F6B1F;
  --good-bg: #DCEBDD;
  --bad-bg: #F6DAD2;
  --display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --body: 'Nunito', 'Segoe UI', sans-serif;
  --radius: 20px;
  --shadow: 5px 5px 0 var(--ink);
  --border: 3px solid var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
}
main { flex: 1 0 auto; }
a { color: var(--ink); }
a:hover { color: var(--tomato); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -0.3px; }
h1 { font-size: clamp(32px, 5vw, 46px); }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
h3 { font-size: 23px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 36px 24px 64px; }
.container.narrow { max-width: 900px; }
.container.thin { max-width: 560px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }

/* --- Sidhuvud --------------------------------------------------------- */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 16px 24px; border-bottom: var(--border); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo span { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.5px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.site-nav a.navlink, .site-nav button.navlink { padding: 10px 12px; font: inherit; font-weight: 700; text-decoration: none; background: none; border: 0; color: var(--ink); cursor: pointer; }
.site-nav a.navlink:hover, .site-nav button.navlink:hover { color: var(--tomato); }
.nick-badge { padding: 6px 12px; border-radius: 999px; background: var(--sand); font-weight: 800; font-size: 15px; color: var(--ink); text-decoration: none; }
a.nick-badge:hover { background: var(--mustard); color: var(--ink); }

.site-footer { border-top: var(--border); padding: 22px 24px; font-size: 15px; color: var(--ink-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* --- Knappar ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  border: var(--border); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 800; font-size: 17px; text-decoration: none;
  cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { color: inherit; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--tomato); color: #fff; }
.btn-primary:hover { color: #fff; }
.btn-yellow { background: var(--mustard); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--cream); box-shadow: none; }
.btn-dark:hover { color: var(--cream); box-shadow: none; }
.btn-lg { min-height: 56px; padding: 12px 30px; font-size: 19px; }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 15px; box-shadow: 2px 2px 0 var(--ink); }
.btn-plain { background: none; border: 0; box-shadow: none; padding: 10px 4px; text-decoration: underline; }
.btn-plain:hover { transform: none; box-shadow: none; color: var(--tomato); }
.btn-danger { background: var(--bad-bg); }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }

/* --- Kort och taggar ------------------------------------------------- */
.card { background: var(--paper); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card-dark { background: var(--ink); color: var(--cream); border-radius: 24px; padding: 34px 38px; }
.card-dark a:not(.btn) { color: var(--cream); }
.tag { display: inline-block; align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; background: var(--ink-soft); color: #fff; }
.tag[data-cat='fredagsquiz'] { background: var(--ink); color: var(--mustard); }
.tag[data-cat='blandat'] { background: var(--plum); }
.tag[data-cat='musik'] { background: var(--tomato); }
.tag[data-cat='film-tv'] { background: var(--sky); }
.tag[data-cat='sport'] { background: var(--mustard); color: var(--ink); }
.tag[data-cat='geografi'] { background: var(--bottle); }
.tag[data-cat='historia-samhalle'] { background: var(--wood); }
.tag[data-cat='spel-teknik'] { background: var(--grape); }
.tag[data-cat='djur-natur'] { background: var(--moss); }
.card-dark .tag[data-cat='fredagsquiz'] { background: var(--mustard); color: var(--ink); }
.pill { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 15px; }
.pill-dark { background: var(--ink); color: var(--cream); }
.pill-line { border: var(--border); }

/* --- Startsida -------------------------------------------------------- */
.hero { display: flex; flex-wrap: wrap; gap: 24px; }
.hero > .card-dark { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hero > .upcoming { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.hero-empty { flex: 999 1 540px; }
.kicker { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--mustard); color: var(--ink); font-weight: 800; font-size: 14px; letter-spacing: 0.5px; text-transform: uppercase; }
.hero-meta { color: var(--sand-dark); font-size: 18px; }
.countdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.countdown div { padding: 12px 6px; border-radius: 14px; background: var(--sand); text-align: center; }
.countdown strong { display: block; font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1; }
.countdown span { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.carousel-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.round-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: var(--border); border-radius: 999px; background: var(--paper); cursor: pointer; color: var(--ink); }
.dots { display: flex; align-items: center; gap: 2px; }
.dots button { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.dots span { display: block; width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); transition: width 0.2s; }
.dots button[aria-current='true'] span { width: 22px; background: var(--ink); }

.search-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.search-row .field { flex: 0 1 380px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border: var(--border); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none; }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--cream); }

.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.quiz-card { display: flex; flex-direction: column; gap: 10px; }
.quiz-card h3 { font-size: 23px; line-height: 1.15; }
.quiz-card h3 a { text-decoration: none; }
.quiz-card .btn { margin-top: auto; align-self: flex-start; }
.empty { padding: 28px; border: 3px dashed var(--ink-faint); border-radius: var(--radius); text-align: center; color: var(--ink-soft); }

/* --- Formulär --------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 800; font-size: 16px; }
.hint { font-size: 14px; color: var(--ink-soft); }
input[type='text'], input[type='search'], input[type='password'], input[type='datetime-local'], input[type='url'], textarea, select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: var(--border); border-radius: 14px; background: var(--paper);
  font: inherit; color: var(--ink);
}
textarea { min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
.error-box { padding: 14px 18px; border: var(--border); border-radius: 14px; background: var(--bad-bg); font-weight: 700; }
.ok-box { padding: 14px 18px; border: var(--border); border-radius: 14px; background: var(--good-bg); font-weight: 700; }
.info-box { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: var(--sand); }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; cursor: pointer; }
.checkbox input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); flex: 0 0 auto; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 800; font-size: 19px; }

.tabs { display: flex; gap: 8px; }
.tabs button { flex: 1; }

/* --- Wizard ----------------------------------------------------------- */
.stepper { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stepper li { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-faint); }
.stepper li::before { content: ''; display: block; height: 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); }
.stepper li.done { color: var(--ink); }
.stepper li.done::before { background: var(--bottle); }
.stepper li[aria-current='step'] { color: var(--ink); font-weight: 800; }
.stepper li[aria-current='step']::before { background: var(--mustard); }
@media (max-width: 640px) { .stepper li span { display: none; } .stepper li[aria-current='step'] span { display: inline; white-space: nowrap; } }
.option-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.option-pills button { min-height: 48px; padding: 10px 22px; border: var(--border); border-radius: 999px; background: var(--paper); font: inherit; font-weight: 800; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); color: var(--ink); }
.option-pills button[aria-pressed='true'] { background: var(--ink); color: var(--cream); box-shadow: none; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.choice-cards button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 18px 20px; border: var(--border); border-radius: 18px; background: var(--paper); font: inherit; color: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.choice-cards button strong { font-family: var(--display); font-size: 21px; }
.choice-cards button span { font-weight: 600; font-size: 15px; }
.choice-cards button[aria-pressed='true'] { background: var(--mustard); box-shadow: none; }
.switch { position: relative; width: 72px; height: 40px; flex: 0 0 72px; padding: 0; border: var(--border); border-radius: 999px; cursor: pointer; background: var(--sand-dark); transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); transition: left 0.2s; }
.switch[aria-checked='true'] { background: var(--bottle); }
.switch[aria-checked='true']::after { left: 35px; }
.wizard-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }

.question-editor { display: flex; flex-direction: column; gap: 14px; }
.question-editor .q-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.q-number { font-family: var(--display); font-weight: 800; font-size: 22px; }
.answer-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .answer-inputs { grid-template-columns: 1fr; } }
.answer-input { display: flex; align-items: center; gap: 10px; }
.answer-input .slot, .match-input .slot { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border: var(--border); border-radius: 10px; font-family: var(--display); font-weight: 800; color: #fff; }
.answer-input input[type='radio'] { width: 24px; height: 24px; accent-color: var(--bottle); flex: 0 0 auto; margin: 0; }
.slot-0 { background: var(--tomato); }
.slot-1 { background: var(--mustard); color: var(--ink) !important; }
.slot-2 { background: var(--bottle); }
.slot-3 { background: var(--sky); }
.q-image { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.q-image img { width: 120px; height: 80px; object-fit: cover; border: var(--border); border-radius: 12px; }
.import-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border: 3px dashed var(--ink); border-radius: 18px; background: var(--paper); }
.import-errors { margin: 0; padding-left: 20px; }
.review-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.review-list li { padding: 12px 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); }
.summary-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.summary-grid dt { font-weight: 800; }
.summary-grid dd { margin: 0; }

/* --- Spelvy ----------------------------------------------------------- */
.play-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.timer { display: flex; align-items: center; gap: 14px; }
.timer-track { flex: 1 1 auto; height: 18px; border: var(--border); border-radius: 999px; background: var(--paper); overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: var(--mustard); border-right: 3px solid var(--ink); transition: width 0.25s linear, background 0.3s; }
.timer.low .timer-fill { background: var(--tomato); }
.timer-text { font-family: var(--display); font-weight: 800; font-size: 24px; min-width: 64px; text-align: right; }
.question-card { padding: 34px 38px; display: flex; flex-direction: column; gap: 14px; }
.question-card h1 { font-size: clamp(26px, 4vw, 40px); }
.question-card img { max-height: 340px; width: auto; margin: 4px auto 0; border: var(--border); border-radius: 16px; }
.q-type { font-weight: 800; font-size: 14px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--wood); }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .answers { grid-template-columns: 1fr; } }
.answer {
  display: flex; align-items: center; gap: 16px; min-height: 92px; width: 100%;
  padding: 16px 20px; border: var(--border); border-radius: 20px;
  font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2.6vw, 27px); text-align: left;
  color: #fff; cursor: pointer; box-shadow: var(--shadow); transition: opacity 0.2s, box-shadow 0.2s, transform 0.08s;
}
.answer:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.answer:disabled { cursor: default; }
.answer .num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; background: var(--cream); color: var(--ink); border: var(--border); font-size: 22px; }
.answer .txt { flex: 1 1 auto; overflow-wrap: anywhere; }
.answer .mark { padding: 4px 12px; border-radius: 999px; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 14px; }
.answer.s0 { background: var(--tomato); }
.answer.s1 { background: var(--mustard); color: var(--ink); }
.answer.s2 { background: var(--bottle); }
.answer.s3 { background: var(--sky); }
.answer.dim { opacity: 0.35; box-shadow: none; }
.answer.is-right { box-shadow: 0 0 0 5px var(--cream), 0 0 0 10px var(--bottle); }
.answer.is-wrong { box-shadow: 0 0 0 5px var(--cream), 0 0 0 10px var(--tomato); }
.answer.picked { box-shadow: 0 0 0 5px var(--cream), 0 0 0 10px var(--ink); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.answer.is-right.anim { animation: pop 0.35s ease-out; }
.answer.is-wrong.anim { animation: shake 0.3s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .answer.anim { animation: none !important; } .timer-fill { transition: none; } }

.rank-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.rank-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: var(--border); border-radius: 18px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); font-family: var(--display); font-weight: 800; font-size: 22px; }
.rank-item .pos { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; background: var(--ink); color: var(--cream); }
.rank-item .txt { flex: 1 1 auto; overflow-wrap: anywhere; }
.rank-item .grip { display: inline-flex; flex: 0 0 auto; color: var(--ink-soft); }
.rank-item .grip .icon { width: 26px; height: 26px; }
.rank-item.is-right { background: var(--good-bg); }
.rank-item.is-wrong { background: var(--bad-bg); }
/* Dra och släpp (sortable.js). touch-action: none gör att fingret drar i stället för att scrolla. */
.sortable { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; position: relative; }
.sortable.locked { cursor: default; touch-action: auto; user-select: auto; -webkit-user-select: auto; }
.sortable:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.sorting .sortable { transition: transform 0.15s ease; }
.sorting .sortable.dragging { transition: none; z-index: 5; cursor: grabbing; box-shadow: 6px 8px 0 var(--ink); background: var(--cream); }
@media (prefers-reduced-motion: reduce) { .sorting .sortable { transition: none; } }

.kbd-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-soft); font-weight: 600; }
kbd { padding: 1px 9px; border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: 8px; background: var(--paper); color: var(--ink); font-family: var(--body); font-weight: 800; font-size: 15px; }
.feedback { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; border: var(--border); border-radius: 20px; }
.feedback.good { background: var(--good-bg); }
.feedback.bad { background: var(--bad-bg); }
.feedback.neutral { background: var(--sand); }
.feedback .text { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* --- Resultat och topplista ------------------------------------------ */
.score-big { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 10vw, 96px); line-height: 1; }
.celebrate { background: var(--mustard); }
.leaderboard { width: 100%; border-collapse: collapse; }
.leaderboard th, .leaderboard td { padding: 10px 12px; text-align: left; border-bottom: 2px solid var(--sand-dark); }
.leaderboard th { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-soft); }
.leaderboard td.num, .leaderboard th.num { text-align: right; font-variant-numeric: tabular-nums; }
.leaderboard tr.me td { background: var(--sand); font-weight: 800; }
.medal { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.medal.m1 { background: var(--mustard); }
.medal.m2 { background: #C9CED4; }
.medal.m3 { background: #D9A47A; }
.review-item { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); }
.review-item.good { border-left-width: 2px; }
.review-item .verdict { font-weight: 800; }
.review-item .verdict.good { color: var(--bottle); }
.review-item .verdict.bad { color: var(--tomato); }

/* --- Tabeller (admin, mina quiz) ------------------------------------- */
.table-wrap { overflow-x: auto; border: var(--border); border-radius: var(--radius); background: var(--paper); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 2px solid var(--sand-dark); vertical-align: middle; }
.table th { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-soft); background: var(--sand); }
.table tr:last-child td { border-bottom: 0; }
.table select { min-height: 40px; padding: 6px 10px; border-width: 2px; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.status.live { background: var(--good-bg); }
.status.scheduled { background: var(--sand); }
.status.banned { background: var(--bad-bg); }
.upcoming-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.status.flagged { background: var(--mustard); color: var(--ink); }
ul.chips { margin: 0; padding: 0; list-style: none; }
ul.chips .chip { cursor: default; gap: 6px; padding-right: 8px; }
.chip-x { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.chip-x:hover, .chip-x:focus-visible { background: var(--bad-bg); }

/* --- Toast ------------------------------------------------------------ */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); padding: 14px 22px; border: var(--border); border-radius: 16px; background: var(--ink); color: var(--cream); font-weight: 700; box-shadow: var(--shadow); }

/* --- Text-sidor ------------------------------------------------------- */
.prose { display: flex; flex-direction: column; gap: 14px; }
.prose h2 { margin-top: 10px; }
.terms-box { padding: 18px 20px; border: var(--border); border-radius: 16px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow: auto; }

/* Pekskärmar: tangenttipsen behövs inte */
@media (hover: none) and (pointer: coarse) { .kbd-hint { display: none; } .btn kbd { display: none; } }

/* --- Statistik -------------------------------------------------------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: var(--border); border-radius: 18px; background: var(--paper); }
.stat-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-soft); }
.stat-value { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(80px, 3fr) auto; align-items: center; gap: 12px; }
.bar-label { font-weight: 700; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; }
.bar-badge { padding: 1px 8px; border-radius: 999px; background: var(--good-bg); font-size: 12px; font-weight: 800; }
.bar-track { height: 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--sand-dark); }
.bar-row.right .bar-fill { background: var(--bottle); }
.bar-value { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* --- Dialoger ---------------------------------------------------------- */
.dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 30px 32px; border: var(--border); border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.dialog::backdrop { background: rgba(43, 29, 20, 0.55); }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Nya frågetyper ---------------------------------------------------- */
.zoom-box { position: relative; width: 100%; aspect-ratio: 16 / 10; margin: 4px auto 0; overflow: hidden; border: var(--border); border-radius: 16px; background: var(--ink); }
.zoom-box img { width: 100%; height: 100%; object-fit: contain; margin: 0; border: 0; border-radius: 0; max-height: none; will-change: transform; user-select: none; -webkit-user-drag: none; }
.answer.toggle { color: inherit; }
.answer.toggle .check { width: 30px; height: 30px; flex: 0 0 30px; border: 3px solid var(--ink); border-radius: 8px; background: var(--cream); }
.answer.toggle[aria-pressed='true'] { box-shadow: 0 0 0 5px var(--cream), 0 0 0 10px var(--ink); }
.answer.toggle[aria-pressed='true'] .check { background: var(--ink); }
.answer.toggle[aria-pressed='true'] .check::after { content: ''; display: block; width: 8px; height: 14px; margin: 3px auto 0; border: solid var(--cream); border-width: 0 4px 4px 0; transform: rotate(45deg); }
.answer.s1.toggle[aria-pressed='true'] .check::after { border-color: var(--mustard); }
.closest-card { gap: 18px; padding: 28px 30px; }
.guess-big { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 8vw, 72px); line-height: 1; text-align: center; }
.guess-big .unit { font-size: 0.45em; color: var(--ink-soft); }
input[type='range'] { width: 100%; height: 36px; accent-color: var(--tomato); cursor: pointer; }
input[type='number'] { width: 100%; min-height: 48px; padding: 10px 14px; border: var(--border); border-radius: 14px; background: var(--paper); font: inherit; color: var(--ink); }
.kbd-in-btn { margin-left: 6px; padding: 0 8px; border-width: 2px; border-bottom-width: 2px; border-radius: 6px; font-size: 13px; background: transparent; color: inherit; border-color: currentColor; }

/* --- Betyg ------------------------------------------------------------- */
.vote { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px; border: var(--border); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.vote[aria-pressed='true'] { background: var(--ink); color: var(--cream); box-shadow: none; }
.rating-summary { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink-soft); }
.rating-summary .icon { width: 18px; height: 18px; }
.rating-summary .icon + .icon, .rating-summary .icon:nth-of-type(2) { margin-left: 8px; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--tomato); color: #fff; font-size: 13px; font-weight: 800; }
.closest-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.focus-picker { position: relative; display: inline-block; max-width: 100%; align-self: flex-start; cursor: crosshair; }
.focus-picker img { display: block; width: auto; max-width: 100%; max-height: 300px; height: auto; object-fit: contain; border: var(--border); border-radius: 12px; }
.focus-marker { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 4px solid var(--tomato); border-radius: 999px; background: rgba(255, 253, 247, 0.6); box-shadow: 0 0 0 3px var(--paper); pointer-events: none; }
.answer-input input[type='checkbox'] { width: 24px; height: 24px; accent-color: var(--bottle); flex: 0 0 auto; margin: 0; }
.report.unread { border-color: var(--tomato); box-shadow: 5px 5px 0 var(--tomato); }
.report.handled { opacity: 0.7; box-shadow: none; }
.report-msg { padding: 12px 14px; border-radius: 12px; background: var(--sand); white-space: pre-wrap; overflow-wrap: anywhere; }
.answer.toggle.is-right { box-shadow: 0 0 0 5px var(--cream), 0 0 0 10px var(--bottle); }
.answer.toggle.is-wrong { box-shadow: 0 0 0 5px var(--cream), 0 0 0 10px var(--tomato); }
.answer.toggle.dim { box-shadow: none; }

/* --- Live: gemensamt ---------------------------------------------------- */
.live-offline { position: sticky; top: 0; z-index: 40; padding: 10px 16px; background: var(--tomato); color: #fff; font-weight: 800; text-align: center; }
.live-board { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.live-board li { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border: var(--border); border-radius: 16px; background: var(--paper); color: var(--ink); font-weight: 800; }
.live-board .rank { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: var(--ink); color: var(--cream); font-family: var(--display); }
.live-board li:nth-child(1) .rank { background: var(--mustard); color: var(--ink); }
.live-board .nick { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 10px; }
.live-board .pts { font-family: var(--display); font-variant-numeric: tabular-nums; }
.live-board .gain { color: var(--bottle); font-variant-numeric: tabular-nums; }
.live-board li.me { background: var(--mustard); }
.live-board li.me .rank { background: var(--ink); color: var(--cream); }
.live-board .climb { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; background: var(--good-bg); color: var(--bottle); font-size: 0.7em; }
.live-board .climb .icon { width: 14px; height: 14px; }

/* --- Live: spelaren (mobilen) ------------------------------------------------ */
.live-header { padding: 10px 16px; }
.live-header .navlink { font-weight: 700; text-decoration: none; }
.live-player .container { padding-top: 20px; }
.code-input { font-family: var(--display); font-weight: 800; font-size: 36px; letter-spacing: 6px; text-align: center; }
.live-wait { align-items: center; text-align: center; padding: 30px 24px; }
.live-wait .kicker { align-self: center; }
.live-nick { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 10vw, 54px); line-height: 1.05; overflow-wrap: anywhere; }
.live-q { padding: 22px 22px; }
.live-q h1 { font-size: clamp(22px, 5.5vw, 32px); }
.live-player .answers { gap: 12px; }
.live-player .answer { min-height: 76px; padding: 12px 14px; gap: 10px; font-size: clamp(18px, 4.6vw, 24px); }
.live-player .answer .num { width: 36px; height: 36px; flex-basis: 36px; font-size: 18px; }
.live-sent { align-items: center; text-align: center; background: var(--sand); }
.live-verdict { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 20px; border: var(--border); border-radius: var(--radius); text-align: center; font-weight: 700; }
.live-verdict.good { background: var(--good-bg); }
.live-verdict.bad { background: var(--bad-bg); }
.verdict-word { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 12vw, 64px); line-height: 1; }
.verdict-gain { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--bottle); }
.q-img { max-height: 260px; width: auto; margin: 4px auto 0; border: var(--border); border-radius: 16px; }
.live-player .q-img { max-height: 180px; }
@media (max-width: 480px) {
  .live-player .answers { grid-template-columns: 1fr; }
  .live-player .answer { min-height: 60px; }
  .live-player .container { padding-left: 14px; padding-right: 14px; }
}

/* --- Live: storskärmen ------------------------------------------------------------ */
.live-stage { background: var(--ink); color: var(--cream); min-height: 100vh; }
.live-stage .logo, .live-stage .logo:hover { color: var(--cream); }
.live-stage .logo circle { stroke: var(--cream); }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; }
.bar-join { font-size: clamp(16px, 1.6vw, 22px); }
.bar-join strong { color: var(--mustard); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.btn-ghost:hover { color: inherit; box-shadow: none; }
.live-stage .btn-ghost { color: var(--cream); }
.live-stage .btn:not(.btn-yellow):not(.btn-ghost) { background: var(--cream); }
.live-stage .btn:not(.btn-ghost), .live-stage .btn:not(.btn-ghost):hover { color: var(--ink); }
.live-stage .btn-ghost:hover { color: var(--cream); }
.stage { flex: 1 0 auto; display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 1500px; margin: 0 auto; padding: 8px 32px 24px; position: relative; }
.stage-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 16px 28px 28px; }
.stage-controls:empty { display: none; }
.stage-message { margin: auto; display: flex; flex-direction: column; gap: 18px; text-align: center; max-width: 720px; }
.stage-hint { color: var(--sand-dark); font-weight: 700; }
.stage-meta { font-size: clamp(18px, 1.6vw, 24px); color: var(--sand-dark); }
.pill-cream { background: var(--cream); color: var(--ink); font-size: clamp(16px, 1.4vw, 22px); padding: 8px 18px; }
.pill-good { background: var(--bottle); color: #fff; font-size: clamp(16px, 1.4vw, 22px); padding: 8px 18px; }

.stage-lobby { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; gap: 40px; align-items: start; }
.join-panel { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 26px; border-radius: 28px; background: var(--paper); color: var(--ink); text-align: center; }
.join-lead { font-weight: 800; font-size: clamp(18px, 1.6vw, 24px); color: var(--ink-soft); }
.join-url { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3vw, 46px); line-height: 1.1; overflow-wrap: anywhere; }
.join-code { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 8vw, 128px); line-height: 1; letter-spacing: 4px; color: var(--tomato); margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.lobby-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lobby-side h1 { font-size: clamp(36px, 4.4vw, 64px); }
.player-chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.player-chip { padding: 10px 20px; border: 3px solid var(--cream); border-radius: 999px; background: transparent; color: var(--cream); font: inherit; font-weight: 800; font-size: clamp(18px, 1.6vw, 24px); cursor: pointer; animation: pop 0.3s ease-out; }
.player-chip:hover { background: var(--tomato); border-color: var(--tomato); text-decoration: line-through; }
.player-chip.offline { opacity: 0.45; }

.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.stage-timer { flex: 1 1 300px; display: flex; align-items: center; gap: 16px; }
.stage-timer #timer-text { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; flex: 0 0 84px; border-radius: 999px; background: var(--mustard); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 40px; }
.stage-timer.low #timer-text { background: var(--tomato); color: #fff; }
.stage-timer .timer-track { flex: 1 1 auto; height: 18px; border-color: var(--cream); background: transparent; }
.stage-timer .timer-fill { background: var(--mustard); border-right: 0; transition: width 0.1s linear; }
.stage-timer.low .timer-fill { background: var(--tomato); }
.stage-card { display: flex; flex-direction: column; gap: 22px; padding: 32px 38px; border-radius: 28px; background: var(--paper); color: var(--ink); }
.stage-question { font-size: clamp(32px, 3.6vw, 60px); line-height: 1.12; }
.stage-question.small { font-size: clamp(26px, 2.6vw, 40px); }
.stage-card .q-img { max-height: 52vh; margin: 0 auto; }
.stage-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stage-body.has-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 28px; }
.stage-body.has-media .stage-answers { grid-template-columns: 1fr; gap: 14px; }
.stage-body.has-media .stage-answers .answer { min-height: 76px; }
.stage-body.has-media .stage-rank { grid-template-columns: 1fr; }
.stage-media { display: flex; justify-content: center; min-width: 0; }
.stage-media .zoom-box { margin: 0; }
.stage-card .zoom-box { max-width: 100%; }
.stage-answers .answer { min-height: 110px; cursor: default; font-size: clamp(24px, 2.4vw, 38px); }
.stage-answers .answer:hover { transform: none; box-shadow: var(--shadow); }
.stage-answers .answer.dim:hover { box-shadow: none; }
.stage-answers .answer .num { width: 54px; height: 54px; flex-basis: 54px; font-size: 28px; }
.stage-answers .count { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 54px; padding: 0 14px; border-radius: 14px; background: var(--cream); color: var(--ink); border: var(--border); font-size: 28px; }
.stage-answers .answer.is-right { opacity: 1; }
.stage-rank { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: rank; }
.stage-rank li { padding: 18px 22px; border: var(--border); border-radius: 20px; font-family: var(--display); font-weight: 800; font-size: clamp(22px, 2.2vw, 34px); color: #fff; }
.stage-rank li.s0 { background: var(--tomato); }
.stage-rank li.s1 { background: var(--mustard); color: var(--ink); }
.stage-rank li.s2 { background: var(--bottle); }
.stage-rank li.s3 { background: var(--sky); }
.stage-rank.right li { background: var(--good-bg); color: var(--ink); counter-increment: rank; }
.stage-rank.right li::before { content: counter(rank) '. '; }
.stage-range { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 2.6vw, 40px); color: var(--wood); }
.stage-big { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 7vw, 110px); line-height: 1; color: var(--bottle); }
.stage-closest { display: flex; flex-direction: column; gap: 14px; }
.stage-card .stage-hint { color: var(--ink-soft); }
.stage-explain { padding: 14px 18px; border-radius: 14px; background: var(--sand); font-size: clamp(18px, 1.6vw, 24px); }
.stage-paused { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(43, 29, 20, 0.82); border-radius: 28px; }
.stage-paused p { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 8vw, 120px); color: var(--mustard); }

.stage-standings { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 980px; margin: 0 auto; }
.stage-standings h1 { font-size: clamp(40px, 4.6vw, 72px); }
.stage-board li { padding: 16px 22px; font-size: clamp(22px, 2.2vw, 34px); animation: pop 0.35s ease-out both; }
.stage-board li:nth-child(2) { animation-delay: 0.08s; }
.stage-board li:nth-child(3) { animation-delay: 0.16s; }
.stage-board li:nth-child(4) { animation-delay: 0.24s; }
.stage-board li:nth-child(5) { animation-delay: 0.32s; }
.stage-board .rank { width: 54px; height: 54px; flex-basis: 54px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 18px; margin-top: 10px; }
.podium-step { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.podium-nick { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 2.8vw, 44px); line-height: 1.1; overflow-wrap: anywhere; }
.podium-pts { font-weight: 800; font-size: clamp(18px, 1.6vw, 24px); color: var(--sand-dark); }
.podium-block { width: 100%; display: flex; align-items: flex-start; justify-content: center; padding-top: 14px; border: 3px solid var(--cream); border-radius: 20px 20px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(40px, 5vw, 80px); color: var(--ink); }
.p1 .podium-block { height: 30vh; background: var(--mustard); }
.p2 .podium-block { height: 21vh; background: var(--sand-dark); }
.p3 .podium-block { height: 15vh; background: #D9A47A; }
.podium-step.vacant { visibility: hidden; }
.p1 { animation: pop 0.5s ease-out 0.6s both; }
.p2 { animation: pop 0.5s ease-out 0.3s both; }
.p3 { animation: pop 0.5s ease-out both; }
@media (prefers-reduced-motion: reduce) { .player-chip, .stage-board li, .podium-step { animation: none !important; } }
@media (max-width: 900px) {
  .stage-lobby { grid-template-columns: 1fr; }
  .stage-body.has-media { grid-template-columns: 1fr; }
  .stage { padding: 8px 16px 20px; }
  .stage-card { padding: 22px 20px; }
}

/* --- Livehistorik --------------------------------------------------------------- */
.live-history { display: flex; flex-direction: column; gap: 12px; }
.live-history details { border: var(--border); border-radius: 18px; background: var(--paper); }
.live-history summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px 20px; cursor: pointer; list-style: none; }
.live-history summary::-webkit-details-marker { display: none; }
.live-history summary strong { font-family: var(--display); font-size: 21px; }
.live-history .body { padding: 0 20px 18px; display: flex; flex-direction: column; gap: 12px; }

/* --- FAQ ------------------------------------------------------------------ */
.faq { gap: 12px; }
.faq h2 { margin-bottom: 4px; scroll-margin-top: 16px; }
.faq details { border: var(--border); border-radius: 18px; background: var(--paper); scroll-margin-top: 16px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 800; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 999px; font-family: var(--display); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '–'; background: var(--ink); color: var(--cream); }
.faq details[open] { box-shadow: var(--shadow); }
.faq .prose { padding: 0 20px 18px; gap: 10px; }
.faq .prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.card-dark .chip { background: transparent; color: var(--cream); border-color: var(--cream); }
.card-dark .chip:hover { background: var(--cream); color: var(--ink); }

/* --- Live: välj quiz som värd ----------------------------------------------- */
.host-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.host-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 16px; background: var(--cream); }
.host-row strong { overflow-wrap: anywhere; }
.host-row .btn { flex: 0 0 auto; }
@media (min-width: 900px) {
  .live-player .container.live-landing { max-width: 1060px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 28px; }
}

/* --- Cookie-info och integritetspolicy ------------------------------------- */
.cookie-notice { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 45; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: var(--border); border-radius: 18px; background: var(--ink); color: var(--cream); box-shadow: var(--shadow); font-size: 15px; }
.cookie-notice a { color: var(--mustard); font-weight: 800; }
.cookie-notice p { flex: 1 1 auto; }
.cookie-notice .btn { flex: 0 0 auto; }
body.has-notice { padding-bottom: 110px; }
@media (max-width: 520px) {
  .cookie-notice { left: 10px; right: 10px; bottom: 10px; padding: 12px 14px; gap: 12px; font-size: 14px; }
  body.has-notice { padding-bottom: 130px; }
}
.policy h2 { scroll-margin-top: 16px; }
.policy .table { min-width: 560px; }
.policy-table td { vertical-align: top; font-size: 15px; }
.policy ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
code { padding: 1px 6px; border-radius: 6px; background: var(--sand); font-size: 0.92em; }
.terms-check { padding: 14px 16px; border-radius: 14px; background: var(--sand); }
.danger-zone { border-color: var(--tomato); }

/* --- Min profil ----------------------------------------------------------- */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: start; }

/* --- Sant eller falskt, Para ihop, zoompoäng --------------------------------- */
.answers.two .answer { min-height: 120px; justify-content: center; font-size: clamp(24px, 3vw, 34px); }
.tf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.match-input { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.match-link { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--ink-soft); text-align: center; }
.match-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.match-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.3fr); align-items: center; gap: 10px; }
.match-left, .pair-left { display: flex; align-items: center; min-height: 64px; padding: 10px 16px; border: var(--border); border-radius: 18px; font-family: var(--display); font-weight: 800; font-size: clamp(17px, 2vw, 22px); color: #fff; overflow-wrap: anywhere; }
.match-left.s0, .pair-left.s0 { background: var(--tomato); }
.match-left.s1, .pair-left.s1 { background: var(--mustard); color: var(--ink); }
.match-left.s2, .pair-left.s2 { background: var(--bottle); }
.match-left.s3, .pair-left.s3 { background: var(--sky); }
.match-right { min-height: 64px; }
.match-right .txt { font-size: clamp(17px, 2vw, 22px); }
.match-row.is-right .match-right { background: var(--good-bg); }
.match-row.is-wrong .match-right { background: var(--bad-bg); }
.match-right .txt { overflow-wrap: normal; word-break: normal; hyphens: auto; min-width: 0; }
@media (max-width: 520px) {
  .match-row { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 8px; }
  .match-row .match-link { display: none; }
  .match-left { min-height: 56px; padding: 8px 12px; font-size: 16px; }
  .match-right { min-height: 56px; padding: 6px 8px 6px 12px; gap: 6px; }
  .match-right .txt { font-size: 16px; }
  .match-right .grip .icon { width: 22px; height: 22px; }
  .match-input { grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr); }
  .match-input .match-link { display: none; }
}
.zoom-tier { padding: 6px 16px; border-radius: 999px; background: var(--mustard); font-weight: 700; }
.zoom-tier[data-points='2'] { background: var(--sand-dark); }
.zoom-tier[data-points='1'] { background: var(--sand); }
.stage-match { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.stage-pairs-col, .stage-pairs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.stage-pairs li { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); align-items: center; gap: 10px; }
.pair-right { display: flex; align-items: center; min-height: 64px; padding: 10px 16px; border: var(--border); border-radius: 18px; background: var(--paper); font-family: var(--display); font-weight: 800; font-size: clamp(17px, 2vw, 26px); overflow-wrap: anywhere; }
.stage-pairs .pair-right { background: var(--good-bg); }
.stage-card .match-left, .stage-card .pair-left, .stage-card .pair-right { font-size: clamp(20px, 2.2vw, 32px); min-height: 80px; }

/* --- AI-genererade quiz ------------------------------------------------------ */
.ai-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 2px dashed var(--ink-soft); border-radius: 999px; font-weight: 800; font-size: 12px; color: var(--ink-soft); background: var(--paper); }

.players-table .letter-row td { padding: 6px 14px; background: var(--sand); font-family: var(--display); font-weight: 800; font-size: 18px; }
.nick-note { font-size: 14px; color: var(--ink-soft); }

/* --- Kategorikort på startsidan ---------------------------------------------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.category-grid[hidden] { display: none; }
.category-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 120px; padding: 18px 20px; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--ink-soft); color: #fff; text-decoration: none; transition: transform 0.08s, box-shadow 0.15s; }
.category-tile:hover { color: #fff; transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.category-name { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.category-count { align-self: flex-start; padding: 3px 12px; border-radius: 999px; background: rgba(255, 253, 247, 0.92); color: var(--ink); font-weight: 800; font-size: 14px; }
.category-tile[data-cat='fredagsquiz'] { background: var(--ink); color: var(--mustard); }
.category-tile[data-cat='fredagsquiz']:hover { color: var(--mustard); }
.category-tile[data-cat='blandat'] { background: var(--plum); }
.category-tile[data-cat='musik'] { background: var(--tomato); }
.category-tile[data-cat='film-tv'] { background: var(--sky); }
.category-tile[data-cat='sport'] { background: var(--mustard); color: var(--ink); }
.category-tile[data-cat='sport']:hover { color: var(--ink); }
.category-tile[data-cat='geografi'] { background: var(--bottle); }
.category-tile[data-cat='historia-samhalle'] { background: var(--wood); }
.category-tile[data-cat='spel-teknik'] { background: var(--grape); }
.category-tile[data-cat='djur-natur'] { background: var(--moss); }
.back-link { align-self: flex-start; padding: 0; text-decoration: none; font-weight: 800; }
#lista-rubrik[data-sub]:not([data-sub=''])::after { content: attr(data-sub); display: block; margin-top: 6px; font-family: var(--body); font-weight: 600; font-size: 16px; color: var(--ink-soft); letter-spacing: 0; }
@media (max-width: 520px) {
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .category-tile { min-height: 96px; padding: 14px; }
  .category-name { font-size: 20px; }
}
