:root {
  --bg: #0b0f1a;
  --bg2: #121a2b;
  --card: #182238;
  --line: #26324d;
  --text: #f2f5fb;
  --muted: #9aa7c2;
  --accent: #ffb020;
  --accent-ink: #1a1200;
  --ok: #2ecc71;
  --bad: #ff5a5f;
  --c0: #bf4f33; /* terakota — domek */
  --c1: #66742f; /* oliwka — liść */
  --c2: #9c6a0d; /* ochra — kubek */
  --c3: #4a6a93; /* granat — serce */
  --c4: #7a4a6b; /* śliwka — lampa */
  --c5: #866a5c; /* taupe — świeca */
  --gold: #c99a2e;
  --silver: #a8a8a8;
  --bronze: #a86b3c;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; line-height: 1.2; }
p { margin: 0; }
img { max-width: 100%; }

.page { max-width: 1100px; margin: 0 auto; padding: 16px; min-height: 100%; display: flex; flex-direction: column; gap: 16px; }
.page.center { align-items: center; justify-content: center; text-align: center; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.error { color: var(--bad); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--muted); font-weight: 700; }

.logo { font-size: 2.2rem; letter-spacing: -.02em; }
.logo span { display: block; color: var(--accent); font-size: .95rem; letter-spacing: .25em; text-transform: uppercase; margin-top: 6px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.page.center .card { max-width: 440px; }
.card.center { text-align: center; align-items: center; }
.card.danger { border-color: #5a2a33; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; width: 100%; max-width: 900px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
label.inline { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
input, textarea, select { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; padding: 0; accent-color: var(--accent); }
input[type="number"] { width: 84px; }
input:focus, textarea:focus, select:focus, button:focus-visible, .tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#code, #ocode { text-transform: uppercase; letter-spacing: .3em; font-size: 1.5rem; text-align: center; font-weight: 700; }

.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; cursor: pointer; background: var(--bg2); color: var(--text); white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.big { font-size: 1.15rem; padding: 15px 22px; }
.btn.small { padding: 7px 11px; font-size: .9rem; border-radius: 9px; }
.btn.file { display: inline-flex; align-items: center; }

.pill { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill.code { letter-spacing: .2em; }
.badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .75rem; text-align: center; margin-left: 4px; }

.stage { flex: 1; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.qhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qnum { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.timer { margin-left: auto; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.timer b { color: var(--accent); }
.tbar { height: 6px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.tbar div { height: 100%; width: 100%; background: var(--accent); transition: width .2s linear; }
.qimg { max-height: 40vh; width: auto; max-width: 100%; align-self: center; border-radius: 12px; object-fit: contain; }
.qtext { font-size: 1.6rem; font-weight: 700; }
.msg { color: var(--muted); min-height: 1.4em; text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tiles.n2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } .tiles.n2 { grid-template-columns: 1fr 1fr; } }
.tile { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; border: 0; color: #fff; font: inherit; font-weight: 700; font-size: 1.1rem; text-align: left; cursor: pointer; min-height: 74px; position: relative; text-wrap: balance; }
.tile i { font-style: normal; font-size: 1.4rem; width: 1.8rem; display: grid; place-items: center; flex: none; opacity: .95; }
.tile i svg, .bar .lbl i svg, .opt i svg, .ico svg { width: 1.5em; height: 1.5em; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico { font-style: normal; display: inline-grid; place-items: center; vertical-align: -.35em; }
.ico svg { width: 1.25em; height: 1.25em; }
.tile .txt { flex: 1; }
.tile em { font-style: normal; opacity: .6; font-size: .85rem; align-self: flex-start; }
.tile.c0 { background: var(--c0); } .tile.c1 { background: var(--c1); } .tile.c2 { background: var(--c2); }
.tile.c3 { background: var(--c3); } .tile.c4 { background: var(--c4); } .tile.c5 { background: var(--c5); }
.tile:hover:not(:disabled):not(.static) { filter: brightness(1.1); }
.tile:disabled { opacity: .5; cursor: default; }
.tile.static { cursor: default; opacity: 1; }
.tile.picked { opacity: 1; outline: 4px solid #fff; outline-offset: -4px; }
.tile.ok { opacity: 1; outline: 4px solid var(--ok); outline-offset: -4px; }
.tile.dim { opacity: .35; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--bg2); overflow: hidden; min-height: 56px; font-weight: 600; }
.bar .fill { position: absolute; inset: 0 auto 0 0; opacity: .55; transition: width .6s ease; }
.bar.c0 .fill { background: var(--c0); } .bar.c1 .fill { background: var(--c1); } .bar.c2 .fill { background: var(--c2); }
.bar.c3 .fill { background: var(--c3); } .bar.c4 .fill { background: var(--c4); } .bar.c5 .fill { background: var(--c5); }
.bar .lbl { position: relative; flex: 1; display: flex; gap: 10px; align-items: center; }
.bar .lbl i { font-style: normal; display: grid; place-items: center; }
.bar .cnt { position: relative; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar.ok { outline: 3px solid var(--ok); outline-offset: -3px; }
.bar.nok { opacity: .6; }

.result .big { font-size: 2.4rem; font-weight: 800; }
.result .big.ok { color: var(--ok); }
.result .big.nok { color: var(--bad); }
.result .pts { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.big2 { font-size: 1.3rem; }

.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board li { display: grid; grid-template-columns: 2.2rem 1fr 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg2); }
.board li.me { outline: 2px solid var(--accent); }
.board .rank { font-weight: 800; color: var(--muted); text-align: center; }
.board li.p1 .rank, .board li.p2 .rank, .board li.p3 .rank { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; justify-self: center; color: #1a1200; font-weight: 900; }
.board li.p1 .rank { background: var(--gold); } .board li.p2 .rank { background: var(--silver); } .board li.p3 .rank { background: var(--bronze); }
.board li.p1 { box-shadow: inset 5px 0 0 var(--gold); } .board li.p2 { box-shadow: inset 5px 0 0 var(--silver); } .board li.p3 { box-shadow: inset 5px 0 0 var(--bronze); }
.board .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .sbar { height: 10px; background: var(--card); border-radius: 999px; overflow: hidden; }
.board .sbar i { display: block; height: 100%; background: var(--accent); transition: width .6s ease; }
.board .pts { font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 560px) { .board li { grid-template-columns: 2rem 1fr auto; } .board .sbar { display: none; } }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; margin: 8px 0 16px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 12px 12px 0 0; background: var(--bg2); text-align: center; }
.step.p1 { min-height: 170px; border-top: 8px solid var(--gold); }
.step.p2 { min-height: 130px; border-top: 8px solid var(--silver); }
.step.p3 { min-height: 105px; border-top: 8px solid var(--bronze); }
.step .medal { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #1a1200; }
.step.p1 .medal { background: var(--gold); } .step.p2 .medal { background: var(--silver); } .step.p3 .medal { background: var(--bronze); }
.step .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.step .pts { color: var(--muted); font-size: .9rem; }
.step.empty { background: transparent; }

.cloud { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; padding: 8px; }
.cw { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: .35em .8em; line-height: 1.2; }
.cw b { color: var(--accent); margin-left: .4em; font-size: .8em; }
.olist { margin: 12px 0 0; padding-left: 18px; color: var(--muted); columns: 2; column-gap: 24px; }
.olist li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 700px) { .olist { columns: 1; } }

/* gracz */
.player-page { max-width: 640px; }
.pbar { display: flex; align-items: center; gap: 10px; }
.pbar .nick { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar .nick a { color: var(--text); text-decoration: none; }
.pbar .score { color: var(--accent); }
.lobby .dots { display: flex; gap: 8px; margin-top: 8px; }
.lobby .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: blink 1.4s infinite; }
.lobby .dots i:nth-child(2) { animation-delay: .2s; } .lobby .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.openform { display: flex; flex-direction: column; gap: 10px; }
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 1.6rem; font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.4); }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal-body { position: relative; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal-body .card { width: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--card); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }
body.offline::after { content: "Łączenie z serwerem…"; position: fixed; left: 12px; bottom: 12px; background: var(--bad); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: .8rem; z-index: 70; }

/* prowadzący */
.host-page { max-width: 1200px; transition: padding-right .2s; }
.hbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hleft, .hright { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hleft { flex: 1; min-width: 0; }
.htitle { font-weight: 800; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; bottom: 8px; }
.controls.busy { opacity: .6; pointer-events: none; }
.controls .cl { flex: 1; display: flex; align-items: center; gap: 8px; }
.controls .cr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.goto { flex-direction: row; align-items: center; gap: 8px; }
.goto select { width: auto; max-width: 320px; }

.lobby-stage { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.lobby-stage .plist { grid-column: 1 / -1; }
@media (max-width: 720px) { .lobby-stage { grid-template-columns: 1fr; } }
.joinbox { display: flex; flex-direction: column; gap: 6px; }
.joinbox .url { font-size: 1.3rem; font-weight: 700; word-break: break-all; }
.bigcode { font-size: clamp(3rem, 12vw, 7rem); font-weight: 900; letter-spacing: .18em; line-height: 1; color: var(--accent); }
.qrbox { background: #fff; padding: 12px; border-radius: 14px; width: 200px; height: 200px; display: grid; place-items: center; justify-self: end; }
.qrbox svg { width: 100%; height: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 600; animation: pop .3s ease; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.board-stage { display: flex; flex-direction: column; gap: 12px; }

.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--bg2); border-left: 1px solid var(--line); padding: 16px; overflow: auto; z-index: 40; display: flex; flex-direction: column; gap: 14px; box-shadow: -12px 0 40px rgba(0,0,0,.4); }
@media (min-width: 1300px) { body.panel-open .host-page { padding-right: 540px; } }
.phead { display: flex; flex-direction: column; gap: 8px; }
.phead h3 { font-size: 1.1rem; }
.qlist { display: flex; flex-direction: column; gap: 12px; }
.qed { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.qrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qrow select { width: auto; padding: 7px 10px; }
.qrow input[type="number"] { padding: 7px 8px; width: 70px; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; }
.opt i { font-style: normal; width: 1.2rem; display: grid; place-items: center; }
.opt.c0 i { color: #e07a5f; } .opt.c1 i { color: #9fb352; } .opt.c2 i { color: #e0a22a; } .opt.c3 i { color: #7fa3d1; } .opt.c4 i { color: #b98bb0; } .opt.c5 i { color: #c4a08f; }
.opt input[type="text"] { padding: 8px 10px; }
.imgrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.thumb { height: 64px; border-radius: 8px; }
.qalist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.qalist li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.qalist li.done { opacity: .5; }
.qalist label { flex-direction: row; gap: 10px; align-items: flex-start; color: var(--text); font-size: 1rem; }
.hostlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hostlist li { display: flex; justify-content: space-between; gap: 10px; }
.setform { display: flex; flex-direction: column; gap: 12px; }

/* ekran (rzutnik / udostępnianie w Teams) */
body.screen .page { max-width: 1400px; }
.sbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stitle { font-weight: 800; font-size: 1.3rem; flex: 1; }
body.screen .qtext { font-size: clamp(1.6rem, 3.4vw, 2.8rem); }
body.screen .tile { font-size: clamp(1.1rem, 2.2vw, 1.8rem); min-height: 110px; }
body.screen .tile i { font-size: 1.9rem; }
body.screen .bar { min-height: 68px; font-size: 1.3rem; }
body.screen .timer { font-size: 2.6rem; }
body.screen .board li { font-size: 1.25rem; padding: 12px 16px; }
body.screen .cw { font-size: 1.4em; }
body.screen .qrbox { width: 260px; height: 260px; }
body.screen .chip { font-size: 1.1rem; }
body.screen .qimg { max-height: 46vh; }

/* dyplom i Priority Pass — strony do druku */
body.printpage { background: #e9ecf1; color: #111; }
.printwrap { max-width: 1180px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.printbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; width: 100%; background: #fff; border: 1px solid #d3d8e0; border-radius: 12px; padding: 12px; color: #111; }
.printbar label { color: #444; }
.printbar input, .printbar select { background: #fff; color: #111; border: 1px solid #c3c9d2; width: auto; min-width: 220px; }
.printbar .btn { background: #fff; color: #111; border-color: #c3c9d2; }
.printbar .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
body.printpage .muted { color: #555; }
.sheet { background: #fff; color: #111; box-shadow: 0 10px 40px rgba(0,0,0,.18); max-width: 100%; overflow: auto; }
.diploma { width: 297mm; height: 210mm; padding: 12mm; box-sizing: border-box; background: #fff; display: flex; }
.dip-border { flex: 1; border: 3px solid #ffb020; outline: 1px solid #1a1200; outline-offset: -7px; padding: 12mm 18mm 10mm; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4mm; font-family: Georgia, 'Times New Roman', serif; color: #1a1200; }
.dip-eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: 10.5pt; color: #8a6400; font-family: system-ui, sans-serif; }
.dip-title { font-size: 54pt; letter-spacing: .22em; font-weight: 700; line-height: 1; }
.dip-sub { font-size: 19pt; font-style: italic; }
.dip-for { font-size: 10.5pt; text-transform: uppercase; letter-spacing: .3em; color: #666; font-family: system-ui, sans-serif; margin-top: 2mm; }
.dip-name { font-size: 38pt; font-weight: 700; border-bottom: 2px solid #ffb020; padding: 0 12mm 2mm; min-width: 130mm; line-height: 1.15; }
.dip-reason { font-size: 13.5pt; max-width: 210mm; line-height: 1.45; }
.dip-joke { font-size: 10pt; color: #555; font-style: italic; max-width: 200mm; line-height: 1.4; }
.dip-sign { display: flex; align-items: flex-end; justify-content: space-between; width: 100%; margin-top: auto; gap: 10mm; font-family: system-ui, sans-serif; font-size: 10pt; color: #333; }
.dip-sig { display: flex; flex-direction: column; align-items: center; gap: 2mm; }
.dip-sig .line { display: block; width: 62mm; border-top: 1px solid #333; }
.stamp { width: 36mm; height: 36mm; flex: none; }
.dip-serial { font-family: ui-monospace, Consolas, monospace; font-size: 8pt; color: #777; margin-top: 3mm; }
.pass-sheet { width: 297mm; height: 210mm; padding: 22mm 20mm; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 12mm; align-content: flex-start; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.card-pp { width: 85.6mm; height: 54mm; border-radius: 3.2mm; position: relative; overflow: hidden; box-sizing: border-box; padding: 4.5mm 5.5mm; display: flex; flex-direction: column; justify-content: space-between; zoom: 2; }
.card-pp.front { background: linear-gradient(135deg, #0b0f1a 0%, #1b2742 60%, #0b0f1a 100%); color: #f2f5fb; outline: 1px solid #26324d; }
.card-pp.back { background: #f6f7f9; color: #111; outline: 1px solid #c3c9d2; padding-top: 0; gap: 1.6mm; }
.pp-top { display: flex; justify-content: space-between; align-items: baseline; }
.pp-brand { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 8pt; color: #ffb020; }
.pp-org { font-size: 6pt; color: #9aa7c2; letter-spacing: .06em; text-transform: uppercase; }
.pp-mid { display: flex; align-items: center; gap: 3mm; }
.chip { width: 9.5mm; height: 7mm; border-radius: 1.4mm; background: linear-gradient(135deg, #f3d27a, #c99a2e 55%, #f3d27a); box-shadow: inset 0 0 0 .5mm rgba(0,0,0,.25); flex: none; }
.nfc { width: 7mm; height: 7mm; flex: none; }
.pp-claim { font-size: 12pt; font-weight: 800; line-height: 1.05; letter-spacing: .01em; }
.pp-punches { display: flex; align-items: center; gap: 2.5mm; }
.pp-punches span { width: 7.5mm; height: 7.5mm; border-radius: 50%; border: .5mm dashed #ffb020; display: grid; place-items: center; font-weight: 800; font-size: 8pt; color: #ffb020; }
.pp-punches small { font-size: 5.5pt; color: #9aa7c2; margin-left: 1mm; }
.pp-bottom { display: flex; justify-content: space-between; gap: 3mm; }
.pp-bottom small { display: block; font-size: 5pt; letter-spacing: .1em; text-transform: uppercase; color: #9aa7c2; }
.pp-bottom b { font-size: 8pt; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 46mm; }
.magstripe { height: 9mm; background: #1a1a1a; margin: 0 -5.5mm; }
.sigstrip { height: 7mm; background: repeating-linear-gradient(0deg, #fff 0 .6mm, #e8e8e8 .6mm 1.2mm); display: flex; align-items: center; justify-content: space-between; padding: 0 2mm; font-family: ui-monospace, Consolas, monospace; font-size: 6.5pt; }
.sigstrip i { font-style: italic; font-family: system-ui, sans-serif; color: #888; font-size: 5pt; }
.pp-number { font-family: ui-monospace, Consolas, monospace; font-size: 9pt; letter-spacing: .12em; font-weight: 700; }
.fineprint { margin: 0; padding-left: 3.5mm; font-size: 5.6pt; line-height: 1.3; color: #333; }
.fineprint li { margin-bottom: .4mm; }
.pp-how { font-size: 6pt; color: #111; }
.cutnote { width: 100%; font-size: .9rem; color: #555; }
@media (max-width: 1240px) { .card-pp { zoom: 1.4; } }
@media print {
  .noprint { display: none !important; }
  body.printpage { background: #fff; }
  .printwrap { padding: 0; max-width: none; gap: 0; }
  .sheet { box-shadow: none; overflow: visible; }
  .card-pp { zoom: 1; }
  @page { size: A4 landscape; margin: 0; }
}

/* motyw gracza (telefon) — jasny, w stylu homla.com.pl; ekran i panel prowadzącego zostają ciemne */
body.home, body.player {
  --bg: #f6f1e7; --bg2: #fbfaf6; --card: #ffffff; --line: #e3dccd;
  --text: #363636; --muted: #6e5448; --accent: #ef7d00; --accent-ink: #1a1200;
  --ok: #5c6b2f; --bad: #b4472e; --radius: 12px;
  color-scheme: light;
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body.home a, body.player a { color: var(--muted); }
body.home .card, body.player .card { box-shadow: 0 1px 2px rgba(54, 54, 54, .05); }
body.home .btn, body.player .btn { border-radius: 4px; background: #ffffff; border-color: #d9d0bf; }
body.home .btn.primary, body.player .btn.primary { background: #363636; color: #ffffff; border-color: #363636; text-transform: uppercase; letter-spacing: .12em; font-size: .95rem; }
body.home .btn.ghost, body.player .btn.ghost { background: transparent; }
body.home input, body.home textarea, body.player input, body.player textarea, body.player select { background: #fbfaf6; border-color: #d9d0bf; border-radius: 4px; }
body.home #code { font-family: Poppins, Lato, sans-serif; letter-spacing: .35em; }
body.home .eyebrow, body.player .eyebrow { letter-spacing: .22em; }
body.player .pill { background: #ffffff; border-color: #d9d0bf; border-radius: 3px; }
body.player .pill.code { font-family: Poppins, Lato, sans-serif; font-weight: 600; letter-spacing: .22em; }
body.player .pill.score, body.player .result .pts { position: relative; padding-left: 20px; border: 1.5px solid #363636; color: #363636; font-family: Poppins, Lato, sans-serif; font-weight: 700; border-radius: 3px; }
body.player .pill.score::before, body.player .result .pts::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; border: 1.5px solid currentColor; background: var(--bg); }
body.player .result .pts { display: inline-block; padding: 8px 18px 8px 30px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-size: 1.9rem; }
body.player .result .pts::before { left: 10px; width: 8px; height: 8px; margin-top: -4px; }
body.player .qtext, body.home .title { font-weight: 900; }
body.player .timer b { font-family: Poppins, Lato, sans-serif; color: var(--accent); }
body.player .tbar { height: 12px; background: #e3dccd; border-radius: 6px; overflow: visible; margin-top: 8px; }
body.player .tbar div { position: relative; height: 12px; box-sizing: border-box; background: #fffaf0; border: 1px solid #d9d0bf; border-radius: 6px 2px 2px 6px; }
body.player .tbar div::after { content: ""; position: absolute; right: -9px; top: -20px; width: 17px; height: 23px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 2c3 6 8 9 8 17a8 8 0 0 1-16 0c0-5 3-7 4-10 1 2 2 3 4 3 0-4-1-7 0-10z' fill='%23ef7d00'/%3E%3Cpath d='M12 14c2 3 4 5 4 8a4 4 0 0 1-8 0c0-3 2-5 4-8z' fill='%23ffd166'/%3E%3C/svg%3E") no-repeat center / contain; }
body.player .tile { border-radius: 10px; }
body.player .tile.picked { outline-color: #363636; }
body.player .tile em { opacity: .75; }
body.player .board li { background: #ffffff; border: 1px solid var(--line); }
body.player .board li.me { outline-color: #363636; }
body.player .board .sbar { background: #eae5d5; } body.player .board .sbar i { background: #866a5c; }
body.player .board .pts, body.player .step .pts { font-family: Poppins, Lato, sans-serif; }
body.player .step { background: #eae5d5; }
body.player .fab { background: #363636; color: #ffffff; box-shadow: 0 8px 24px rgba(54, 54, 54, .25); }
body.player .modal-bg { background: rgba(54, 54, 54, .45); }
body.player .toast { box-shadow: 0 8px 24px rgba(54, 54, 54, .18); }
body.player .cw b { color: var(--accent-ink); background: var(--accent); border-radius: 3px; padding: 0 .3em; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.brand img { width: 150px; height: auto; }
.title { font-size: 2rem; line-height: 1.1; }
.lead { max-width: 420px; line-height: 1.45; }
.codelock { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fbfaf6; border: 1.5px solid #d9d0bf; border-radius: 4px; }
.codelock b { font-family: Poppins, Lato, sans-serif; font-size: 1.5rem; letter-spacing: .35em; margin-left: auto; color: #363636; }
.codelock a { font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
