/* Bokstavsleken – stil. Mobil först för spelarna; storskärm för spelledaren. */
:root {
  --blue: #005B99; --blue-d: #003f6b; --blue-l: #e6f0f8;
  --yellow: #FECC02; --yellow-d: #d9ad00;
  --bg: #f2f5f9; --card: #ffffff; --ink: #14212b; --muted: #5b6b78; --line: #dbe3ea;
  --ok: #17663d; --okbg: #e2f4e9; --fix: #0a5f78; --fixbg: #e0f1f7;
  --bad: #a8221a; --badbg: #fde7e5; --unk: #7a4f00; --unkbg: #fff3cf;
  --r: 14px; --shadow: 0 1px 2px rgba(16, 33, 43, .06), 0 4px 14px rgba(16, 33, 43, .06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 2rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.15rem; } h4 { font-size: 1rem; }
p { margin: 0 0 .8em; }
a { color: var(--blue); }
button, input, select { font: inherit; color: inherit; }
.small { font-size: .88rem; } .muted { color: var(--muted); } .center { text-align: center; }
.err { color: var(--bad); font-weight: 600; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .3em; }

/* Layout */
.screen { padding: 20px 16px 40px; max-width: 1100px; margin: 0 auto; }
.screen.narrow { max-width: 560px; }
.screen.center { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin: 0 0 14px; border: 1px solid var(--line); }

/* Logo */
.logo { font-weight: 900; font-size: 2.6rem; letter-spacing: -.02em; color: var(--blue); text-align: center; margin: 10px 0 6px; }
.logo span { color: var(--ink); background: linear-gradient(transparent 62%, var(--yellow) 62%); padding: 0 .05em; }
.logo.small { font-size: 1.7rem; }
.logo.tiny { font-size: 1.2rem; margin: 0; text-align: left; }
.tagline { text-align: center; color: var(--muted); margin-bottom: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer; background: var(--blue); color: #fff; text-decoration: none; min-height: 48px; transition: transform .05s, background .15s; }
.btn:hover { background: var(--blue-d); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--yellow); color: #1b1b1b; }
.btn.primary:hover { background: var(--yellow-d); }
.btn.ghost { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn.ghost:hover { background: var(--blue-l); }
.btn.danger { background: var(--bad); }
.btn.big { font-size: 1.15rem; padding: 14px 24px; min-height: 56px; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.link { background: none; border: 0; color: var(--blue); text-decoration: underline; cursor: pointer; padding: 4px; }
:focus-visible { outline: 3px solid var(--yellow-d); outline-offset: 2px; }

/* Forms */
input[type=text], input:not([type]), select { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 18px; background: #fff; }
input:focus, select:focus { border-color: var(--blue); outline: none; }
.join label { display: block; font-weight: 700; margin-bottom: 6px; }
.join input { margin-bottom: 12px; }
.join .btn { width: 100%; }
#codeIn { text-transform: uppercase; letter-spacing: .25em; font-weight: 800; font-size: 1.6rem; text-align: center; }
#codeIn::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 1.1rem; }
.host-card .btn { width: 100%; margin: 4px 0 10px; }
details > summary { cursor: pointer; font-weight: 700; }
details[open] > summary { margin-bottom: 10px; }

/* Badges & chips */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .95rem; }
.badge.team { background: var(--tc); color: #fff; }
.badge.muted { background: #eef2f6; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #eef2f6; border-radius: 999px; padding: 5px 4px 5px 12px; margin: 3px 4px 3px 0; font-weight: 600; font-size: .98rem; max-width: 100%; }
.chip em { font-style: normal; font-weight: 700; font-size: .85em; }
.chip button { border: 0; background: rgba(0,0,0,.08); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; flex: none; }
.chip.ok { background: var(--okbg); color: var(--ok); }
.chip.fix { background: var(--fixbg); color: var(--fix); }
.chip.bad { background: var(--badbg); color: var(--bad); }
.chip.unk { background: var(--unkbg); color: var(--unk); }

/* Spinner */
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--blue-l); border-top-color: var(--blue); animation: spin 1s linear infinite; margin: 10px auto; }
.spinner.big { width: 70px; height: 70px; border-width: 7px; }
@keyframes spin { to { transform: rotate(360deg); } }
.bigicon { font-size: 4rem; line-height: 1; margin-bottom: 10px; }

/* Toast & modal */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 150%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50; transition: transform .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.toast.warn { background: var(--bad); }
.modal { position: fixed; inset: 0; background: rgba(10, 20, 30, .45); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 16px; }
.mbox { width: min(520px, 100%); max-height: 90vh; overflow: auto; }
.mrow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
input.copy { font-size: .85rem; }

/* Player: lobby */
.hello h1 { font-size: 2rem; }
.wait { color: var(--muted); margin-top: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow-d); margin-right: 6px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.rules ol { padding-left: 1.2em; margin: 0 0 .6em; }
.rules li { margin-bottom: .45em; }
.teampick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tbtn { border: 3px solid var(--tc); background: #fff; color: var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 700; cursor: pointer; min-height: 48px; }
.tbtn.on { background: var(--tc); color: #fff; }

/* Countdown */
.countdown .cdnum, .hcount-screen .cdnum { font-size: 9rem; font-weight: 900; color: var(--blue); line-height: 1; animation: pop 1s infinite; }
@keyframes pop { 0% { transform: scale(1.15); } 30% { transform: scale(1); } }

/* Player: play */
.play { max-width: 640px; margin: 0 auto; padding-bottom: 50vh; }
.playbar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; background: var(--blue); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.pletter { width: 58px; height: 58px; border-radius: 14px; background: var(--yellow); color: #1b1b1b; display: grid; place-items: center; font-size: 2.3rem; font-weight: 900; }
.ptime span { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pmeta { text-align: right; font-size: .85rem; line-height: 1.3; }
.tbarwrap { height: 6px; background: rgba(255,255,255,.25); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.tbarwrap i { display: block; height: 100%; width: 100%; background: var(--yellow); transition: width .25s linear; }
.playbar.hurry { background: var(--bad); }
.playbar.hurry .ptime span { animation: pulse .8s infinite; }
.cards { padding: 12px 12px 0; }
.cat { padding: 14px; }
.cat h3 { margin-bottom: 8px; color: var(--blue-d); }
.add { display: flex; gap: 8px; }
.add input { flex: 1; min-width: 0; }
.addbtn { flex: none; width: 52px; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font-size: 1.6rem; font-weight: 700; cursor: pointer; }
.chips { margin-top: 8px; }
.mates { margin-top: 6px; font-size: .9rem; color: var(--muted); }
.mates small { opacity: .75; }
.mlabel { font-weight: 700; }

/* Player: results */
.resulthead { text-align: center; }
.bigpts { font-size: 3.6rem; font-weight: 900; color: var(--blue); line-height: 1.05; }
.bigpts small { font-size: .45em; }
.rcat h4 { margin: 12px 0 6px; color: var(--blue-d); }
.rcat ul { list-style: none; margin: 0; padding: 0; }
.rcat li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; margin-bottom: 4px; background: #f3f6f9; }
.rcat li em { font-style: normal; font-weight: 700; }
.rcat li b { white-space: nowrap; font-size: .9rem; }
.r-ok { background: var(--okbg) !important; color: var(--ok); }
.r-uniq { background: #fff0b3 !important; color: #5d4500; }
.r-no { background: var(--badbg) !important; color: var(--bad); }
.r-dup { color: var(--muted); text-decoration: line-through; }
.standings { list-style: none; margin: 0; padding: 0; }
.standings li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.standings li.me { background: #fff6cc; font-weight: 700; border-radius: 8px; }
.standings .pl { width: 28px; text-align: right; font-weight: 800; color: var(--muted); }
.standings .nm { flex: 1; }
.standings .sw { width: 14px; height: 14px; border-radius: 4px; background: var(--tc); }

/* Confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 110vh; transform: rotate(720deg); } }

/* ---------------- Spelledaren (storskärm) ---------------- */
body.is-host { font-size: 18px; }
.host { min-height: 100vh; display: flex; flex-direction: column; }
.htop { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hinfo { flex: 1; color: var(--muted); }
.hinfo b { color: var(--ink); }
.hcode { background: var(--yellow); padding: 0 8px; border-radius: 6px; letter-spacing: .08em; }
.hbtns { display: flex; gap: 8px; }

.lobby { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; padding: 20px; flex: 1; }
.joinpanel { background: var(--blue); color: #fff; border-radius: 20px; padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.jp-1 { margin: 4px 0; opacity: .9; }
.jp-url { font-size: clamp(1.15rem, 2vw, 1.9rem); font-weight: 800; margin: 2px 0 8px; white-space: nowrap; max-width: 100%; }
.jp-code { font-size: clamp(3rem, 6.5vw, 6rem); font-weight: 900; letter-spacing: .1em; max-width: 100%; background: var(--yellow); color: #1b1b1b; border-radius: 16px; padding: 0 .3em; margin: 6px 0 14px; line-height: 1.15; }
.jp-qr { width: min(240px, 60vw); background: #fff; padding: 8px; border-radius: 12px; margin: 6px auto; }
.jp-qr svg { display: block; width: 100%; height: auto; }
.jp-qr.small { width: 200px; border: 1px solid var(--line); }
.jp-count { margin-top: 12px; font-size: 1.3rem; }
.jp-count b { font-size: 2.6rem; display: block; line-height: 1; }
.lobbyside { display: flex; flex-direction: column; min-width: 0; }
.settings .srow { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.settings .srow.top { align-items: flex-start; }
.slabel { width: 130px; font-weight: 700; flex: none; }
.seg { display: inline-flex; border: 2px solid var(--blue); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 14px; font-weight: 700; cursor: pointer; color: var(--blue); }
.seg button.on { background: var(--blue); color: #fff; }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper button { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--blue); background: #fff; color: var(--blue); font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.stepper b { min-width: 28px; text-align: center; font-size: 1.3rem; }
.letters { max-width: 220px; letter-spacing: .2em; font-weight: 800; text-transform: uppercase; }
.settings select { max-width: 180px; }
.chk { display: flex; align-items: center; gap: 8px; margin: 6px 0; cursor: pointer; }
.chk input { width: 20px; height: 20px; }
.cats { flex: 1; min-width: 240px; }
.inline { display: flex; gap: 8px; margin-top: 8px; }
.inline input { font-size: 16px; padding: 8px 10px; }
.board { flex: 1; }
.teamgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tbox { border: 3px solid var(--tc); border-radius: 14px; padding: 10px; min-height: 90px; }
.tbox h4 { color: var(--tc); display: flex; justify-content: space-between; }
.tbox h4 span { background: var(--tc); color: #fff; border-radius: 999px; padding: 0 9px; font-size: .9rem; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { border: 0; background: #eef2f6; border-radius: 999px; padding: 4px 11px; font-weight: 600; cursor: pointer; font-size: .95rem; }
.pchip:hover { background: var(--blue-l); }
.unassigned { margin-top: 14px; }
.startbar { display: flex; gap: 12px; justify-content: flex-end; padding: 6px 0 20px; flex-wrap: wrap; }
.startbar.center { justify-content: center; }

.hcount-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.hcount-screen .big { font-size: 2.4rem; font-weight: 800; }
.hcount-screen .tbarwrap { width: min(600px, 80vw); background: var(--blue-l); height: 10px; }
.hcount-screen .tbarwrap i { background: var(--blue); }
.hplay { flex: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding: 24px; align-items: center; }
.hp-left { text-align: center; }
.hp-letter { font-size: clamp(10rem, 28vw, 22rem); font-weight: 900; line-height: .95; color: var(--blue); }
.hp-time { font-size: clamp(3rem, 7vw, 6rem); font-weight: 900; font-variant-numeric: tabular-nums; }
.hplay.hurry .hp-time { color: var(--bad); animation: pulse .8s infinite; }
.tbarwrap.big { height: 14px; background: var(--blue-l); max-width: 600px; margin: 8px auto 0; }
.tbarwrap.big i { background: var(--blue); }
.hp-right { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.hp-cats { font-size: 1.5rem; font-weight: 700; padding-left: 1.3em; margin: 0 0 16px; }
.hp-cats li { margin-bottom: 6px; }
.activity .abar { display: grid; grid-template-columns: 140px 1fr 50px; gap: 10px; align-items: center; margin: 6px 0; }
.activity .abar div { background: #eef2f6; border-radius: 6px; height: 16px; overflow: hidden; }
.activity .abar i { display: block; height: 100%; border-radius: 6px; transition: width .4s; }
.act-sum { font-size: 1.2rem; }

.review { padding: 18px 20px 30px; max-width: 1200px; margin: 0 auto; width: 100%; }
.rv-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.rv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; }
.tab span { background: #eef2f6; border-radius: 999px; padding: 0 7px; margin-left: 4px; font-size: .85rem; }
.tab.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.tab.on span { background: rgba(255,255,255,.25); }
.rlist { display: flex; flex-direction: column; gap: 6px; }
.rrow { display: grid; grid-template-columns: 44px 1fr auto auto 60px; gap: 12px; align-items: center; text-align: left; border: 2px solid transparent; border-radius: 12px; padding: 8px 12px; cursor: pointer; background: #fff; box-shadow: var(--shadow); }
.rrow .tick { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; }
.rrow.acc .tick { background: var(--ok); color: #fff; }
.rrow.rej .tick { background: var(--bad); color: #fff; }
.rrow.rej { background: #fff8f7; }
.rrow.rej .word { text-decoration: line-through; text-decoration-color: rgba(168,34,26,.5); }
.rrow .word { font-weight: 800; font-size: 1.15rem; }
.rrow .word small { display: block; font-weight: 500; font-size: .85rem; color: var(--muted); text-decoration: none; }
.rrow .word small.catname { color: var(--blue); }
.rrow .tag { font-size: .85rem; padding: 3px 10px; border-radius: 999px; background: #eef2f6; white-space: nowrap; }
.rrow.st-check .tag, .rrow.st-wrong .tag { background: var(--unkbg); color: var(--unk); font-weight: 700; }
.rrow.st-fix .tag, .rrow.st-wiki .tag { background: var(--fixbg); color: var(--fix); }
.rrow.st-ok .tag { background: var(--okbg); color: var(--ok); }
.rrow.st-letter .tag, .rrow.st-bad .tag { background: var(--badbg); color: var(--bad); }
.rrow .who { color: var(--muted); font-size: .9rem; white-space: nowrap; display: flex; align-items: center; gap: 3px; }
.dotc { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.rrow .pts { font-weight: 800; text-align: right; }

.results { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 24px; flex: 1; max-width: 1400px; margin: 0 auto; width: 100%; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: 36px minmax(120px, 220px) 1fr 60px 56px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 1.3rem; }
.bars .pl { font-weight: 900; color: var(--muted); text-align: right; }
.bars .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .bar { background: #e8edf2; border-radius: 8px; height: 28px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; border-radius: 8px; transition: width .8s; }
.bars b { text-align: right; font-size: 1.5rem; }
.bars .plus { color: var(--ok); font-weight: 800; font-size: 1rem; }
.fun { background: #fff; border-radius: 20px; padding: 20px; box-shadow: var(--shadow); align-self: start; }
.funlist { list-style: none; padding: 0; margin: 0 0 16px; }
.funlist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.funlist li span { color: var(--muted); font-size: .9rem; }
.final { padding: 20px; text-align: center; flex: 1; }
.final h1 { font-size: 3.2rem; color: var(--blue); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 20px 0 30px; }
.pod { width: min(260px, 28vw); }
.pname { font-weight: 900; font-size: 1.5rem; margin-bottom: 6px; }
.pblock { background: var(--tc); color: #fff; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.pblock span { font-size: 3.5rem; font-weight: 900; line-height: 1; }
.pblock b { font-size: 1.3rem; }
.p1 .pblock { height: 240px; } .p2 .pblock { height: 180px; } .p3 .pblock { height: 140px; }
.standings.wide { max-width: 640px; margin: 0 auto 20px; text-align: left; font-size: 1.2rem; }

@media (max-width: 900px) {
  .lobby, .hplay, .results { grid-template-columns: 1fr; }
  .rrow { grid-template-columns: 40px 1fr 56px; }
  .rrow .tag, .rrow .who { grid-column: 2; justify-self: start; }
  .bars li { grid-template-columns: 28px 1fr 50px; font-size: 1.05rem; }
  .bars .bar, .bars .plus { display: none; }
}
@media (max-width: 420px) {
  .playbar { padding: 8px 12px; gap: 10px; }
  .pletter { width: 50px; height: 50px; font-size: 2rem; }
  .ptime span { font-size: 1.6rem; }
  .slabel { width: 100%; }
}

/* Spelaren väljer eller skapar lag */
.teamlist { display: grid; gap: 8px; margin: 10px 0 14px; }
.tteam { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left; width: 100%; background: #fff; color: var(--ink); border: 2px solid var(--line); border-left: 10px solid var(--tc); border-radius: 12px; padding: 10px 12px; font: inherit; }
button.tteam { cursor: pointer; min-height: 56px; }
button.tteam:hover { border-color: var(--tc); }
.tteam b { font-size: 1.08rem; }
.tteam .cnt { background: var(--tc); color: #fff; border-radius: 999px; padding: 0 10px; font-weight: 800; font-size: .9rem; }
.tteam small { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }
.tteam.on { border-color: var(--tc); background: #fffbe6; box-shadow: 0 0 0 2px var(--tc) inset; }
.tteam.on b::after { content: ' ✓'; color: var(--ok); }
.newteam label { display: block; font-weight: 700; margin-bottom: 6px; }
.newteam .inline input { font-size: 17px; }
.tdel { margin-left: auto; border: 0; background: rgba(0,0,0,.08); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink); }
.tbox h4 { gap: 6px; align-items: center; }

/* Länk tillbaka till LinguAula / MiLengua, språkval, öva själv */
.backlink { position: fixed; left: 12px; bottom: 12px; z-index: 30; background: #fff; color: var(--blue); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.backlink:hover { background: var(--blue-l); }
.langsel { display: flex; width: max-content; margin: 0 auto 6px; }
.btn.wide { width: 100%; }
.btn.light { color: #fff; border-color: rgba(255,255,255,.7); min-height: 30px; padding: 2px 10px; }
.btn.light:hover { background: rgba(255,255,255,.15); }
.solo-set .cats { min-width: 0; }
.rcat li .link { padding: 0 0 0 6px; font-weight: 700; }

/* ================= Design 13-10: mjukare, tydligare, mer lek ================= */
:root { --c0: #1f6fb4; --c1: #d1495b; --c2: #2a9d8f; --c3: #e07a1f; --c4: #8e44ad; --c5: #2e7d32; --c6: #c2185b; --c7: #3949ab; --r: 18px; }
body {
  background:
    radial-gradient(circle at 8% -10%, #dcecf9 0, transparent 38%),
    radial-gradient(circle at 95% 5%, #fff3c4 0, transparent 32%),
    var(--bg);
  background-attachment: fixed;
}
.card { border: 1px solid rgba(219, 227, 234, .8); box-shadow: 0 1px 2px rgba(16, 33, 43, .05), 0 8px 24px rgba(16, 33, 43, .07); }
.btn { border-radius: 14px; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.btn.ghost { box-shadow: none; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { box-shadow: 0 3px 0 #c9a000; }

/* Logon: en bokstavsbricka före namnet */
.logo { display: flex; align-items: center; justify-content: center; gap: .3em; }
.logo::before { content: "B"; display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; border-radius: .25em; background: var(--yellow); color: var(--blue-d); font-size: .8em; box-shadow: 0 3px 0 #c9a000; transform: rotate(-6deg); }
.logo.tiny::before { width: 1.3em; height: 1.3em; }
.logo.tiny { justify-content: flex-start; }
.home .tagline { font-size: 1.05rem; }

/* Spelarens kategorier: färg och antal ord */
.cat { border-top: 5px solid var(--cc, var(--blue)); }
.cat h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink); }
.ccount { min-width: 28px; height: 28px; border-radius: 999px; background: var(--cc, var(--blue)); color: #fff; display: grid; place-items: center; font-size: .9rem; font-weight: 800; padding: 0 8px; }
.ccount:empty { display: none; }
.add input:focus { border-color: var(--cc, var(--blue)); box-shadow: 0 0 0 3px rgba(0, 91, 153, .12); }
.addbtn { background: var(--cc, var(--blue)); }

/* Mitt lag (under spelraden och i resultatet) */
.myteam { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.myteam:empty { display: none; }
.myteam b, .myteam-res b { color: var(--ink); }
.myteam .sw, .myteam-res .sw, .uniqlist .sw { width: 12px; height: 12px; border-radius: 4px; background: var(--tc); display: inline-block; flex: none; }
.myteam-res { margin-top: 6px; }

/* Rundans unika ord */
.uniq h3 { margin-bottom: 2px; }
.uniqlist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.uniqlist li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #fff8dc; }
.uniqlist li.me { outline: 2px solid var(--yellow-d); }
.uniqlist li .cnt { background: var(--yellow); color: #3d3000; border-radius: 999px; padding: 0 10px; font-weight: 900; }
.uniqlist li small { grid-column: 1 / -1; color: #5d4500; }
.fun .uniq.big .uniqlist li { font-size: 1.1rem; }
.fun .uniq.big .uniqlist li small { font-size: .95rem; }

/* Spelledaren */
.joinpanel { background: linear-gradient(160deg, #0a6ab0 0%, var(--blue) 45%, var(--blue-d) 100%); box-shadow: 0 12px 40px rgba(0, 63, 107, .35); }
.jp-code { box-shadow: 0 6px 0 #c9a000; }
.hp-letter { background: linear-gradient(180deg, var(--blue) 0%, #0a6ab0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 10px 0 rgba(0, 91, 153, .12)); }
.bars .nm { display: flex; flex-direction: column; }
.bars .nm small { font-size: .8rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars.many li { margin-bottom: 6px; font-size: 1.05rem; }
.bars.many .bar { height: 20px; }
.activity .abar small { color: var(--muted); font-weight: 500; }
.results .fun { display: flex; flex-direction: column; gap: 16px; }

/* Impostor */
.imp-screen { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 24px 20px; }
.imp-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.imp-head h1 { font-size: clamp(2rem, 4vw, 3.4rem); color: var(--blue-d); }
.imp-ico { font-size: clamp(3.5rem, 7vw, 6rem); line-height: 1; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .08)); }
.imp-steps { font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.5; background: #fff; border-radius: 20px; padding: 18px 18px 18px 2.2em; box-shadow: var(--shadow); }
.imp-steps li { margin-bottom: 6px; }
.imp-time { font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; margin-top: 12px; color: var(--blue); }
.imp-time.hurry { color: var(--bad); animation: pulse .8s infinite; }
.activity.wide { background: #fff; border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.impgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.impteam { background: #fff; border-radius: 16px; padding: 14px; border-top: 6px solid var(--tc); box-shadow: var(--shadow); }
.impteam h4 { color: var(--tc); font-size: 1.15rem; }
.impteam p { margin: 0 0 4px; }
.impteam .verdict { font-weight: 900; font-size: 1.1rem; }
.impteam.caught .verdict { color: var(--ok); }
.impteam.fooled .verdict { color: var(--bad); }
.impteam.few { opacity: .7; }
.imp-dlg .impcats { max-height: 40vh; overflow: auto; }
.impcard { text-align: center; }
.impsecret .impreveal { display: block; padding: 10px 0 4px; }
.impsecret.hidden .impreveal { display: none; }
.impsecret:not(.hidden) #impShow { display: none; }
.impword { font-size: clamp(2.2rem, 11vw, 3.4rem); font-weight: 900; color: var(--blue-d); background: #fff6cc; border-radius: 18px; padding: 14px 10px; margin: 8px 0 12px; word-break: break-word; }
.impword.imp { background: #fde7e5; color: var(--bad); font-size: clamp(1.8rem, 8vw, 2.6rem); }
.logo { gap: 0; }
.logo::before { margin-right: .3em; }
.myteam-res .sw { margin-right: 6px; vertical-align: -1px; }
