.mu { max-width: 760px; margin: 0 auto; padding: 14px 16px 60px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.btn { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 14px; cursor: pointer; font: inherit; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }
.btn.big { width: 100%; min-height: 54px; font-size: 18px; margin-top: 10px; } .btn:disabled { opacity: .5; }
.muted { color: var(--muted); } .small { font-size: 13px; } .err { color: #c0392b; }
.mu input, .mu select { height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; background: var(--surface); color: var(--text); width: 100%; box-sizing: border-box; }
.mu input[type=checkbox] { width: auto; height: auto; } .f { display: block; font-size: 13px; color: var(--muted); margin-top: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.pl { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; }
.pl img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; } .pl .grow { flex: 1; }
.codebox { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } .code { font-size: 54px; font-weight: 900; letter-spacing: 8px; }
.codebox img { width: 150px; height: 150px; background: #fff; border-radius: 10px; padding: 4px; }
.teams { display: flex; gap: 6px; flex-wrap: wrap; } .tm { background: var(--surface-2); border-radius: 99px; padding: 5px 12px; font-size: 14px; }
.tm.ok { background: var(--accent); color: var(--accent-text); }
.board { width: 100%; border-collapse: collapse; } .board td { padding: 7px 4px; border-top: 1px solid var(--line); } .board td.s { text-align: right; font-weight: 800; }
.stage { text-align: center; padding: 20px 10px; } .stage .big { font-size: 34px; font-weight: 900; margin: 6px 0; } .stage img { width: 180px; height: 180px; border-radius: 12px; object-fit: cover; }
.bar { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 14px 0; } .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .5s linear; }
.opts { display: grid; gap: 10px; margin-top: 10px; } .opt { min-height: 58px; font-size: 18px; font-weight: 700; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; padding: 8px 12px; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); } .opt.right { border-color: #2e9d57; background: #2e9d5733; } .opt.wrong { border-color: #c0392b; background: #c0392b22; }
/* year stepper: shrinks to its box (it overflowed the nested "Ditt svar" card on phones) */
.year { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; max-width: 100%; }
.year b { order: -1; flex: 0 0 100%; font-size: 44px; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; }
.year button { flex: 1 1 0; min-width: 0; max-width: 72px; height: 50px; padding: 0; font-size: 19px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.step { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 8px; }
.result { font-size: 26px; font-weight: 900; text-align: center; margin: 10px 0; }
/* the host's own answers: no box around the box — the team card sits flat inside the host's card */
.mu.me { padding: 0 16px; } #me-slot .mu.me { padding: 0; max-width: none; }
#me-slot .mu.me .card, #me-slot .card { border: 0; background: none; padding: 6px 0 0; margin: 0; text-align: left; }
#me-slot .opts { gap: 8px; margin-top: 8px; } #me-slot .opt { padding: 6px 10px; }
#me-slot .step { margin-top: 0; }
.pl .prog { font-size: 12px; } .pl .prog.done { color: var(--accent); } .linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* timeline mode: narrow cards with the year standing, so a long timeline fits a phone's width */
.tl-wrap { overflow-x: auto; margin: 12px -4px 4px; padding: 4px; scrollbar-width: thin; }
.tl { position: relative; height: 84px; margin: 0 auto; }
.tl.static { display: flex; gap: 6px; height: auto; flex-wrap: wrap; }
.tl::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line); }
.tl.static::before { display: none; }
.tl-card { position: absolute; top: 0; width: 34px; height: 84px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); display: flex; align-items: center; justify-content: center; transition: left .3s ease; }
.tl.static .tl-card { position: static; flex: none; }
.tl-card b { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 18px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.tl-card span { display: none; }
.tl-card.start { border-style: dashed; }
.tl-card.new { border: 2px solid var(--accent); background: var(--accent-soft); z-index: 1; box-shadow: 0 4px 14px rgba(0,0,0,.18); top: -2px; height: 88px; }
.tl-card.won { border: 2px solid #2e9d57; }
.tl-gap { text-align: center; font-weight: 700; margin-top: 4px; }
.tl-mini { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; } .tl-mini i { font-style: normal; font-size: 11px; padding: 1px 5px; border-radius: 6px; background: var(--surface-2); }
/* what everyone guessed vs what was right */
table.cmp, table.answers { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; text-align: left; }
.cmp th, .cmp td, .answers th, .answers td { padding: 5px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.cmp th, .answers th { font-size: 12px; color: var(--muted); font-weight: 600; }
.ok { color: #2e9d57; font-weight: 800; } .bad { color: #c0392b; font-weight: 800; }

/* compact listening card: round number tight above "Lyssna…" so the answers fit without scrolling */
.stage.listen { padding: 12px 12px 14px; }
.stage.listen .muted:first-child { margin: 0; line-height: 1.2; }
.stage.listen .big { font-size: 26px; margin: 0 0 2px; line-height: 1.15; }
.stage.listen .bar { margin: 8px 0 6px; }
.stage.listen .teams { margin-top: 6px !important; }
/* bigger answer buttons for the host playing along */
#me-slot .opt { min-height: 56px; font-size: 18px; }
.note { border-left: 4px solid var(--accent); } .sugg .pl { text-decoration: none; color: var(--text); }
/* in-page dialog (instead of the browser's confirm/alert, which shows the site address) */
.dlg-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 1000; padding: 16px; }
.dlg { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px 16px; width: min(360px, 100%); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.dlg p { margin: 0 0 16px; font-size: 18px; line-height: 1.35; }
.dlg-btns { display: flex; gap: 10px; } .dlg-btns .btn { flex: 1; min-height: 48px; font-size: 17px; }
.btn.danger { background: #c0392b; border-color: #c0392b; color: #fff; font-weight: 700; }
/* online */
.online-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; }
#o-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.pick-fold summary { cursor: pointer; padding: 6px 0; font-size: 14px; } .pick-fold[open] summary { margin-bottom: 4px; }
/* compact answers table (8 teams on a phone) */
table.answers.compact { table-layout: fixed; font-size: 13px; }
.answers.compact th:first-child, .answers.compact td.tn { width: 28%; }
.answers.compact td { text-align: center; } .answers.compact td.tn { text-align: left; font-weight: 700; font-size: 12.5px; overflow-wrap: break-word; hyphens: auto; }
.answers.compact th { text-align: center; } .answers.compact th:first-child { text-align: left; }
.answers .guess { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.answers td.s { font-weight: 800; color: var(--accent); width: 13%; }
.me-result { padding: 10px 14px; margin-top: 12px; } .me-result .result { font-size: 18px; margin: 4px 0 0; text-align: left; }
/* the answer card above the table: small, so the table fits without much scrolling */
.stage.song-top { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; }
.stage.song-top img { width: 72px; height: 72px; flex: none; border-radius: 8px; }
.song-top .st-text { flex: 1; min-width: 0; } .song-top .st-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
.song-top .st-artist { font-size: 15px; } .song-top p { margin: 4px 0 6px; } .song-top .btn { min-height: 34px; font-size: 14px; }
.tbl-head { display: flex; gap: 6px; align-items: baseline; }
.answers.compact th:first-child, .answers.compact td.tn { width: 30%; }
.answers td.tot { font-weight: 900; font-size: 15px; width: 12%; } .answers td.s { width: 10%; }
.answers .pos { color: var(--muted); font-weight: 600; } .answers tr.done td.tn { color: var(--accent); }
/* start page: two big choices */
.start { text-align: center; padding-top: 6vh; } .start h1 { font-size: 40px; margin: 0 0 6px; }
.btn.huge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 96px; margin: 14px 0 0;
  font-size: 24px; font-weight: 800; border-radius: 18px; text-decoration: none; box-sizing: border-box; }
.btn.huge span { font-size: 13px; font-weight: 400; opacity: .8; margin-top: 4px; }
.join-link { display: inline-block; margin-top: 20px; font-size: 15px; }
.bad-text { color: #c0392b; }

/* challenges ("Utmana") on the online home screen */
.chal-in { border-color: var(--accent); }
.chal-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); }
.chip button { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; padding: 0 0 2px; cursor: pointer; }

/* teams: more phones in one team ("Fler i laget": a QR code / link with the team's token), the rules in the lobby */
.invite summary { cursor: pointer; list-style: none; } .invite summary::-webkit-details-marker { display: none; }
.invite summary::after { content: " ▾"; color: var(--muted); } .invite[open] summary::after { content: " ▴"; }
.qr { display: block; margin: 10px auto; width: 180px; height: 180px; background: #fff; border-radius: 10px; padding: 6px; box-sizing: border-box; }
.dlg .qr { width: 200px; height: 200px; margin-bottom: 14px; } .dlg p.small { font-size: 14px; margin-bottom: 4px; }
.inv-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; } .inv-btns .muted { overflow-wrap: anywhere; }
.rules ol { margin: 8px 0 0; padding-left: 22px; } .rules li { margin: 4px 0; line-height: 1.35; }
button.tm { border: 0; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; } button.tm.ok { color: var(--accent-text); }
#app:not(.tv) .answers tr[data-team] { cursor: pointer; }

/* the TV screen (/music/tv): big type, no site header, read-only */
body.tv-body .site-header { display: none; }
.mu.tv { max-width: 1400px; font-size: clamp(16px, 1.5vw, 26px); padding-top: 10px; }
.tv .muted.small, .tv .small { font-size: .8em; }
.tv-join { display: flex; gap: 20px; align-items: center; justify-content: flex-end; }
.tv-join img { width: 110px; height: 110px; background: #fff; border-radius: 12px; padding: 6px; box-sizing: border-box; }
.tv-join .code { font-size: clamp(34px, 4vw, 64px); font-weight: 900; letter-spacing: 8px; line-height: 1.05; }
.tv-join.big { justify-content: center; } .tv-join.big img { width: min(30vw, 320px); height: min(30vw, 320px); }
.tv-join.big .code { font-size: clamp(56px, 9vw, 150px); }
.tv-lobby { display: grid; gap: 0 16px; } .tv-lobby .tv-join { padding: 12px 0; }
@media (min-width: 900px) { .tv-lobby { grid-template-columns: 1fr 1fr; } .tv-lobby .tv-join { grid-column: 1 / -1; } }
.tv-teams { margin: 10px 0; justify-content: center; } .tv-teams .tm { font-size: 1em; padding: 8px 16px; }
.tv-listen .big { font-size: clamp(48px, 7vw, 110px); }
.tv .stage.song-top.tv-song img { width: clamp(90px, 12vw, 200px); height: clamp(90px, 12vw, 200px); }
.tv-song .st-title { font-size: clamp(26px, 3.2vw, 54px); } .tv-song .st-artist { font-size: clamp(19px, 2.1vw, 34px); }
.tv table.answers.compact { font-size: 1em; } .tv .answers .guess { font-size: .72em; } .tv .answers.compact td.tn { font-size: 1em; }
.tv .answers td.tot { font-size: 1.15em; }
.tv-h { text-align: center; font-size: clamp(32px, 4vw, 64px); margin: 6px 0; }
.tv-podium { display: flex; justify-content: center; gap: 5vw; text-align: center; flex-wrap: wrap; }
.tv-podium .medal { font-size: 2.6em; line-height: 1.1; } .tv-podium .nm { font-size: 1.4em; font-weight: 800; }
.tv-ask { max-width: 440px; margin: 8vh auto; }
body.tv-offline::after { content: "Tappade kontakten – försöker igen…"; position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--line); padding: 8px 16px; border-radius: 99px; font-size: 16px; }
.tv-standings ol { list-style: none; margin: 8px 0 0; padding: 0; columns: 2 320px; column-gap: 40px; }
.tv-standings li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); break-inside: avoid; font-size: 1.15em; }

/* TV-värd (/music/tvhost): the host's page on a TV: big, the remote's focus always visible, the question on the screen */
body.tvhost .site-header { display: none; }
body.tvhost .mu { max-width: none; font-size: clamp(18px, 1.7vw, 30px); padding: 2vh 5vw 6vh; }
body.tvhost .btn { min-height: 2.8em; font-size: 1em; padding: 0 1.2em; }
body.tvhost .btn.big { font-size: 1.15em; min-height: 3.2em; }
body.tvhost button:focus, body.tvhost a.btn:focus { outline: .2em solid var(--accent); outline-offset: .15em; }
body.tvhost .code { font-size: clamp(56px, 7vw, 120px); }
body.tvhost .codebox img { width: min(20vw, 260px); height: min(20vw, 260px); }
body.tvhost .stage .big { font-size: clamp(48px, 6vw, 100px); }
body.tvhost .teams .tm { font-size: 1em; padding: .4em 1em; }
body.tvhost .st-title { font-size: clamp(26px, 3.2vw, 54px); } body.tvhost .st-artist { font-size: clamp(19px, 2.1vw, 34px); }
body.tvhost .stage img { width: clamp(90px, 12vw, 200px); height: clamp(90px, 12vw, 200px); }
.tv-q { margin-top: 3vh; } .tv-q .step { font-size: .8em; }
body.tvhost .opts.tv-opts { grid-template-columns: repeat(2, 1fr); gap: 1.2vw; margin-top: 1.5vh; }
body.tvhost .opts.tv-opts .opt { min-height: 3.6em; font-size: 1.2em; display: grid; place-items: center; cursor: default; }
body.tvhost table.answers.compact { font-size: 1.1em; } body.tvhost .answers .guess { font-size: .72em; } body.tvhost .answers.compact td.tn { font-size: 1.1em; } body.tvhost .answers td.tot { font-size: 1.2em; }

