/* Motyw jasny - Współczesna Dietetyka. Kolor przewodni: rgb(193, 114, 69).
   Bez zewnętrznych fontów - widok uczestnika ma działać na słabym Wi-Fi. */
:root {
    --brand: rgb(193, 114, 69);
    --brand-dark: #9a5530;      /* tekst w kolorze marki na jasnym tle (kontrast) */
    --brand-soft: #f6e6dc;
    --bg: #faf6f2;
    --surface: #ffffff;
    --surface-2: #f3ece6;
    --border: #e8ddd4;
    --fg: #2b2420;
    --muted: #75665d;
    --a: #e21b3c;
    --b: #1368ce;
    --c: #d89e00;
    --d: #26890c;
    --ok: #1f8a3b;
    --bad: #c62828;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(60, 35, 20, .08);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); line-height: 1.4; }
h1, h2 { margin: .2em 0 .4em; line-height: 1.15; }
a { color: var(--brand-dark); }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--bad); font-weight: 600; min-height: 1.2em; }
.logo { display: block; height: auto; }

/* Kolory odpowiedzi - te same na telefonach i rzutniku. */
.c-A { background: var(--a); color: #fff; } .c-B { background: var(--b); color: #fff; }
.c-C { background: var(--c); color: #fff; } .c-D { background: var(--d); color: #fff; }
.c-text-A { color: var(--a); } .c-text-B { color: var(--b); } .c-text-C { color: #a67900; } .c-text-D { color: var(--d); }

.pill { display: inline-block; padding: .25em .75em; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }

/* ---------- Uczestnik (mobile-first) ---------- */
body.phone { min-height: 100vh; min-height: 100dvh; }
.phone-wrap { max-width: 520px; margin: 0 auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.phone-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0 10px; border-bottom: 3px solid var(--brand); margin-bottom: 12px; }
.phone-header .logo { width: 132px; }
.phone-title { font-weight: 700; color: var(--muted); font-size: .9rem; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-wrap > section { flex: 1; display: flex; flex-direction: column; }
.phone-wrap > section > div { flex: 1; display: flex; flex-direction: column; }
.phone-center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 4px; padding: 24px 0; }
.big-emoji { font-size: 4rem; line-height: 1; margin-bottom: 8px; }
.phone-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--muted); }
.phone-bar .pill { font-size: 1.4rem; min-width: 3ch; text-align: center; background: var(--brand); color: #fff; }
.phone-question { font-size: 1.15rem; font-weight: 600; margin: 0 0 12px; }
.choices { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 55vh; }
.choice { border: 0; border-radius: var(--radius); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; box-shadow: 0 6px 0 rgba(0,0,0,.2); transition: transform .05s; -webkit-tap-highlight-color: transparent; }
.choice:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.choice .letter { font-size: 2.6rem; font-weight: 800; }
.choice .label { font-size: .95rem; font-weight: 600; }
.choice:disabled { opacity: .35; }
.choice.picked { opacity: 1; outline: 4px solid var(--fg); }
.choice-badge { width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center; font-size: 3rem; font-weight: 800; margin-bottom: 12px; }
.points { font-size: 2.4rem; font-weight: 800; margin: 0; color: var(--brand-dark); }
.result.ok h2 { color: var(--ok); } .result.bad h2 { color: var(--bad); }
.flash { background: var(--bad); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 600; text-align: center; }
.join-form { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; max-width: 360px; margin: 0 auto; }
.join-form label { text-align: left; color: var(--muted); }
.join-form input { font: inherit; font-size: 1.3rem; padding: 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); text-align: center; }
.join-form input:focus { outline: none; border-color: var(--brand); }
.btn-primary { font: inherit; font-size: 1.2rem; font-weight: 700; padding: 14px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; cursor: pointer; }
.btn-primary:active { background: var(--brand-dark); }

/* ---------- Rzutnik ---------- */
body.screen { overflow: hidden; }
.screen-wrap { height: 100vh; display: flex; flex-direction: column; padding: 3vh 4vw 1.5vh; border-top: 1vh solid var(--brand); }
.screen-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.screen-footer { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 1.1rem; gap: 2vw; }
.screen-footer .logo { height: 4.5vh; width: auto; }
.screen-footer .footer-url { flex: 1; }
.fs-btn { background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: .9rem; }

.screen-lobby { flex: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5vw; }
.screen-lobby .logo { width: 24vw; margin-bottom: 3vh; }
.screen-lobby h1 { font-size: 3.6vw; }
.lobby-cta { font-size: 2.2vw; margin: 0; color: var(--muted); }
.lobby-url { font-size: 3.4vw; font-weight: 800; background: var(--brand); color: #fff; display: inline-block; padding: .2em .6em; border-radius: 12px; }
.lobby-count { font-size: 2.4vw; color: var(--muted); } .lobby-count span:first-child { font-size: 5vw; font-weight: 800; color: var(--brand-dark); }
.qr { width: min(36vw, 68vh); height: auto; background: #fff; padding: 2vh; border-radius: 20px; box-shadow: var(--shadow); border: 3px solid var(--brand); }

.screen-question { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.screen-top { display: flex; justify-content: space-between; align-items: center; font-size: 1.8vw; }
.screen-timer { font-size: 5vw; font-weight: 800; text-align: center; background: var(--brand); color: #fff; border-radius: 50%; width: 9vw; height: 9vw; display: grid; place-items: center; }
.screen-timer.urgent { background: var(--bad); }
.screen-timer.stopped { opacity: .4; }
.timebar { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 1.5vh 0; }
.timebar div { height: 100%; background: var(--brand); transition: width .2s linear; }
.screen-q { font-size: 3.4vw; text-align: center; margin: 2vh 0 3vh; }
.screen-q.small { font-size: 2vw; text-align: left; margin: 0 0 2vh; }
.screen-answers { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 2vh 2vw; min-height: 0; }
.screen-answer { display: flex; align-items: center; gap: 2vw; padding: 2vh 2vw; border-radius: var(--radius); font-size: 2.4vw; font-weight: 700; box-shadow: var(--shadow); }
.screen-answer .letter { font-size: 3.6vw; font-weight: 800; opacity: .9; }
.screen-count { text-align: center; font-size: 2vw; margin: 2vh 0 0; color: var(--muted); }
.screen-count strong { color: var(--fg); }

.screen-results { flex: 1; display: grid; grid-template-columns: 1.6fr 1fr; gap: 4vw; min-height: 0; }
.screen-results > div { display: flex; flex-direction: column; min-height: 0; }
.screen-results h2 { color: var(--brand-dark); }
.bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2vw; align-items: end; min-height: 0; padding-top: 4vh; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 1vh; }
.bar-col.wrong { opacity: .4; }
.bar-track { flex: 1; min-height: 0; width: 100%; display: flex; align-items: flex-end; }
.bar { width: 100%; min-height: 6px; border-radius: 10px 10px 0 0; transition: height .6s ease-out; }
.bar-value { font-size: 2.4vw; font-weight: 800; }
.bar-label { font-size: 2vw; font-weight: 800; padding: .1em .6em; border-radius: 8px; }
.bar-col.correct .bar-label { outline: 4px solid var(--brand); outline-offset: 2px; }
.bar-text { font-size: 1.2vw; text-align: center; height: 3em; overflow: hidden; }
.ranking { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .8vh; font-size: 1.7vw; }
.ranking li { display: grid; grid-template-columns: 2.5em 1fr auto; gap: 1vw; align-items: center; background: var(--surface); padding: .6vh 1vw; border-radius: 10px; box-shadow: var(--shadow); }
.ranking li:first-child { background: var(--brand-soft); }
.ranking .rank { font-weight: 800; color: var(--brand-dark); } .ranking .pts { font-weight: 800; }
.ranking .nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.screen-final { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; }
.screen-final h1 { font-size: 4vw; color: var(--brand-dark); }
.screen-final .ranking { width: min(60vw, 900px); font-size: 1.5vw; margin-top: 2vh; }
.podium { display: grid; grid-template-columns: repeat(3, 18vw); gap: 2vw; align-items: end; height: 45vh; }
.podium-place { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.podium-nick { font-size: 2.2vw; font-weight: 800; text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.podium-points { font-size: 1.6vw; color: var(--muted); margin-bottom: 1vh; }
.podium-block { width: 100%; display: grid; place-items: center; font-size: 4vw; font-weight: 800; color: #fff; border-radius: 12px 12px 0 0; background: var(--surface-2); }
.p1 .podium-block { height: 60%; background: var(--brand); } .p2 .podium-block { height: 42%; background: #a79a91; } .p3 .podium-block { height: 30%; background: #c9a27f; }

/* ---------- Reżyserka ---------- */
.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 16px 16px 48px; }
.admin-topbar { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; border-bottom: 3px solid var(--brand); margin-bottom: 16px; }
.admin-topbar .logo { width: 150px; }
.admin-topbar span { color: var(--muted); font-weight: 600; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.card.wide { grid-column: 1 / -1; }
.card h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.status-badge { display: inline-block; font-size: 1.3rem; font-weight: 800; padding: .3em .8em; border-radius: 10px; background: var(--surface-2); margin: 0 0 12px; }
.status-badge[data-status="question_open"] { background: var(--d); color: #fff; }
.status-badge[data-status="results_shown"] { background: var(--b); color: #fff; }
.status-badge[data-status="lobby"] { background: var(--brand); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.stats dt { color: var(--muted); font-size: .85rem; } .stats dd { margin: 0; font-size: 1.8rem; font-weight: 800; }
.control-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 12px; }
.btn { display: inline-block; font: inherit; font-weight: 700; padding: 10px 14px; border-radius: 10px; border: 0; background: #8a7d74; color: #fff; cursor: pointer; text-decoration: none; text-align: center; }
.btn.primary { background: var(--brand); } .btn.danger { background: var(--bad); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn:disabled { opacity: .3; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.check input { accent-color: var(--brand); }
.distribution { display: flex; flex-direction: column; gap: 10px; }
.dist-row { display: grid; grid-template-columns: 3.2em 1fr 3em; gap: 10px; align-items: center; }
.dist-letter { font-weight: 800; text-align: center; border-radius: 8px; padding: 4px 0; }
.dist-track { background: var(--surface-2); border-radius: 8px; height: 28px; overflow: hidden; }
.dist-fill { height: 100%; transition: width .3s; }
.dist-count { font-weight: 800; font-size: 1.2rem; text-align: right; }
.question-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.question-list li { display: grid; grid-template-columns: 2em 1fr auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.question-list li.done { opacity: .45; }
.question-list li.current { outline: 2px solid var(--brand); background: var(--brand-soft); opacity: 1; }
.question-list li.next .q-pos::after { content: " ▶"; color: var(--brand); }
.q-pos { font-weight: 800; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-size: .85rem; text-transform: uppercase; }
.active-pill { background: var(--d); color: #fff; font-size: .75rem; vertical-align: middle; }
.inline-form { display: inline; margin: 0; }

@media (max-width: 800px) {
    .admin-grid { grid-template-columns: 1fr; }
    .question-list li { grid-template-columns: 2em 1fr auto; }
    .question-list li .muted { display: none; }
}
.screen-wrap:has(.screen-lobby) .screen-footer .logo { display: none; }

/* ---------- Lista quizów i edytor ---------- */
.admin-wrap.narrow { max-width: 900px; }
.admin-topbar a { display: block; }
.flash-msg { padding: 10px 14px; border-radius: 10px; background: var(--surface); border-left: 4px solid var(--brand); box-shadow: var(--shadow); }
.flash-msg.success { border-left-color: var(--ok); }
.quiz-list { display: flex; flex-direction: column; gap: 10px; }
.quiz-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-left: 6px solid transparent; }
.quiz-card.is-active { border-left-color: var(--brand); }
.card h2.quiz-name { font-size: 1.25rem; color: var(--fg); text-transform: none; letter-spacing: 0; margin: 0 0 4px; }
.quiz-meta { margin: 0; color: var(--muted); }
.quiz-meta strong { color: var(--brand-dark); }
.btn.activate { background: var(--brand-soft); color: var(--brand-dark); }
.section-title { margin: 24px 0 10px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; flex: 1; }
.field label, .field > label { font-weight: 600; color: var(--muted); font-size: .9rem; }
.admin input[type=text], .admin input[type=email], .admin input[type=password], .admin select, .admin input[type=search], .admin input[type=number], .admin textarea { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); width: 100%; }
.admin input:focus, .admin textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.admin textarea { resize: vertical; font-size: 1.05rem; }
.field ul, .q-edit > ul { list-style: none; margin: 2px 0 0; padding: 0; color: var(--bad); font-size: .85rem; font-weight: 600; }
.q-edit { margin-bottom: 12px; border-left: 4px solid var(--brand); }
.q-edit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.q-edit-no { font-size: 1.2rem; color: var(--brand-dark); }
.answers-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.answer-edit { display: flex; gap: 8px; align-items: flex-start; }
.answer-edit .dist-letter { width: 2.2em; flex: none; margin-top: 6px; }
.answer-edit .field { margin-bottom: 0; }
.q-edit-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.correct-choice { display: flex; gap: 6px; align-items: center; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span { display: inline-block; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); font-weight: 800; cursor: pointer; }
.radio-pill input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.time-field { display: flex; gap: 6px; align-items: center; }
.time-field input { width: 5.5em !important; }
.q-locked { margin-bottom: 8px; opacity: .7; }
.add-question { width: 100%; padding: 14px; border-style: dashed; }
.form-actions { display: flex; gap: 8px; margin-top: 20px; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.delete-form { margin-top: 32px; text-align: right; }
.danger-text { color: var(--bad) !important; }
@media (max-width: 700px) { .answers-edit { grid-template-columns: 1fr; } }

.control-buttons .btn:last-child { grid-column: 1 / -1; }
.people-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.people-filter { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); width: 220px; }
.people-scroll { max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.people-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.people-table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 6px 10px; font-size: .8rem; color: var(--muted); }
.people-table td { padding: 5px 10px; border-top: 1px solid var(--border); }
.people-table .nick { font-weight: 700; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-table .ans { text-align: center; font-weight: 800; width: 2.6em; }
.people-table .ans.ok { color: #fff; background: var(--ok); }
.people-table .ans.bad { color: var(--bad); }
.people-table .ans.none { color: var(--border); }
.people-table .pts { font-weight: 800; text-align: right; }

/* Rzutnik - osobne ekrany poprawnej odpowiedzi i rankingu */
.screen-answer-reveal { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.screen-answer-reveal .screen-q.small { font-size: 2.6vw; color: var(--fg); }
.screen-answer-reveal .bars { padding: 2vh 6vw 0; }
.screen-leaderboard { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; }
.screen-leaderboard h1 { font-size: 4vw; color: var(--brand-dark); margin-bottom: 0; }
.screen-leaderboard .ranking { width: min(70vw, 1100px); font-size: 2vw; margin-top: 2vh; }
.screen-leaderboard .ranking li { padding: 1vh 1.5vw; }

.flash-msg.error { border-left-color: var(--bad); color: var(--bad); font-weight: 700; }
.field:has(ul) input, .field:has(ul) textarea { border-color: var(--bad); background: #fff6f6; }

/* Długie pytania - rozmiary dobiera JS (fitText), CSS pilnuje, żeby nic nie wychodziło poza ekran. */
.screen-question .screen-q { flex: none; overflow: hidden; margin: 1.5vh 0 2.5vh; overflow-wrap: anywhere; }
.screen-answers { grid-template-rows: 1fr 1fr; }
.screen-answer { overflow: hidden; min-height: 0; min-width: 0; line-height: 1.2; }
.screen-answer .letter { flex: none; }
.screen-answer .answer-text { overflow-wrap: anywhere; }
.screen-answer-reveal .screen-q { flex: none; overflow-wrap: anywhere; }
.screen-answer-reveal .bar-text { height: 14vh; line-height: 1.2; overflow: hidden; overflow-wrap: anywhere; }
.screen-lobby h1 { overflow-wrap: anywhere; }
.phone-question.long { font-size: 1rem; }
.phone-question.xlong { font-size: .88rem; font-weight: 500; }
.choices.compact { min-height: 0; grid-auto-rows: minmax(110px, auto); }
.choices.compact .choice .letter { font-size: 1.8rem; }
.choices.compact .choice .label { font-size: .82rem; line-height: 1.2; }

/* ---------- Pytania tekstowe ---------- */
/* Edytor: przełącznik typu, pola tylko dla danego typu */
.type-choice { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.type-choice .radio-pill span { font-weight: 700; font-size: .9rem; }
.type-choice .radio-pill input:checked + span { background: var(--brand); border-color: var(--brand); }
.q-edit[data-type="text"] .choice-only, .q-edit:not([data-type="text"]) .text-only { display: none; }
.q-edit .time-field input[type=number] { width: 7em; }

/* Telefon */
.text-answer { display: flex; flex-direction: column; gap: 10px; }
.text-answer textarea { font: inherit; font-size: 1.1rem; padding: 12px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); resize: vertical; min-height: 120px; width: 100%; }
.text-answer textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.text-answer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.text-answer .btn { font-size: 1.15rem; padding: 12px 28px; }
.my-text { margin: 8px 0 12px; padding: 12px 16px; background: var(--surface); border-left: 4px solid var(--brand); border-radius: 8px; text-align: left; overflow-wrap: anywhere; max-width: 100%; }

/* Rzutnik: pytanie i ściana odpowiedzi */
.text-question .screen-q { margin: auto 0 2vh; }
.text-hint { text-align: center; font-size: 2.4vw; font-weight: 700; color: var(--brand-dark); margin: 0 0 auto; }
.screen-text-wall { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.screen-text-wall .screen-q { flex: none; overflow-wrap: anywhere; }
.text-wall { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wall-items { flex: 1; min-height: 0; overflow: hidden; columns: 14em; column-gap: 1.2vw; }
.wall-card { break-inside: avoid; margin: 0 0 1.2vw; padding: .6em .8em; background: var(--surface); border-radius: var(--radius); border-top: .25em solid var(--brand); box-shadow: var(--shadow); }
.wall-card p { margin: 0 0 .3em; font-weight: 600; overflow-wrap: anywhere; }
.wall-nick { font-size: .7em; color: var(--muted); }
.wall-more { text-align: center; color: var(--muted); font-size: 1.6vw; margin: 1vh 0 0; }

/* Reżyserka */
.text-answers { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.text-answers li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.text-answers .ta-text { overflow-wrap: anywhere; }
.text-answers li.is-hidden .ta-text { text-decoration: line-through; color: var(--muted); }
.people-table td.ans.txt { color: var(--brand-dark); cursor: help; }
.people-table td.ans.is-hidden { color: var(--muted); text-decoration: line-through; }

/* ---------- Chmura odpowiedzi i podsumowanie AI ---------- */
.admin select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.cloud { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; align-items: center; gap: .25em .7em; padding: 1vh 2vw; }
.cloud-word { font-weight: 700; line-height: 1.1; color: var(--fg); overflow-wrap: anywhere; text-align: center; }
.cloud-word sup { font-size: .45em; font-weight: 700; color: var(--muted); margin-left: .15em; }
.cloud-word.top { color: var(--brand); }
.cloud-word.t0 { color: var(--brand-dark); } .cloud-word.t1 { color: var(--b); } .cloud-word.t2 { color: var(--d); }
.cloud-word.t3 { color: #8a5a9e; } .cloud-word.t4 { color: #5d4f46; }
.ai-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ai-summary { flex: none; margin: 0 0 1.5vh; padding: .6em .9em; background: var(--surface); border-left: .25em solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow); line-height: 1.35; }
.ai-cloud .cloud-word sup { color: var(--brand-dark); }

/* Reżyserka */
.display-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.segmented button { font: inherit; font-size: .85rem; font-weight: 700; padding: 6px 10px; border: 0; background: var(--surface); color: var(--fg); cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button.on { background: var(--brand); color: #fff; }
.segmented button:disabled { opacity: .4; cursor: not-allowed; }
.btn.ai-btn { background: #5b4b8a; margin-left: auto; }
.ai-preview { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.ai-preview-summary { margin: 0 0 8px; font-weight: 600; }
.ai-preview ul { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-preview li { background: var(--surface); border-radius: 8px; padding: 3px 8px; display: flex; gap: 6px; font-size: .9rem; }
.ai-preview li strong { color: var(--brand-dark); }
.btn.bots-btn { width: 100%; margin-top: 10px; background: #5b4b8a; }

/* Polskie znaki: ogonki (ę, ą) i litery z "ogonem" (g, j, y) nie mogą być obcinane przez overflow: hidden. */
.screen-view h1, .screen-view h2, .screen-q { line-height: 1.3; padding-bottom: .12em; }
.screen-answer, .screen-answer-reveal .bar-text { line-height: 1.3; }
.screen-answer .answer-text { padding-bottom: .1em; }
.cloud-word { line-height: 1.25; }
.wall-card p { line-height: 1.3; }
.pill.ai-pill { background: #ece8f6; color: #5b4b8a; font-size: .75rem; padding: 1px 8px; }

/* Chmura: środkowy rząd = najczęstsza; bloki nad i pod nią, częstsze bliżej środka */
.cloud { flex-direction: column; flex-wrap: nowrap; justify-content: center; align-items: stretch; gap: .15em; }
.cloud-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .1em .6em; }
.cloud-up { align-content: flex-end; }
.cloud-center { flex: none; }
.cloud-word.t1 { color: var(--b); } .cloud-word.t2 { color: var(--d); } .cloud-word.t3 { color: #8a5a9e; }
.cloud-word.t4 { color: var(--brand-dark); } .cloud-word.t5 { color: #5d4f46; }
.pager { display: inline-flex; align-items: center; gap: 6px; }

.cloud-near, .cloud-center { flex-wrap: nowrap; }
.cloud-center { gap: .1em .9em; }
[hidden] { display: none !important; }
.cloud-word.nw { white-space: nowrap; }
.cloud-row > .cloud-word { flex-shrink: 0; max-width: 100%; }

/* Sale */
.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 20px; }
.room-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-left: 4px solid var(--border); }
.room-card.is-active { border-left-color: var(--brand); }
.room-buttons { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.screen-idle { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2vh; }
.screen-idle .logo { height: 10vh; }
.screen-idle h1 { font-size: 5vw; margin: 0; }
.screen-idle p { font-size: 2.4vw; }
.q-actions { display: inline-flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }

/* ---------- Ankieta ---------- */
.survey-wrap { padding-bottom: 40px; }
.survey-head { text-align: center; margin: 4px 0 12px; }
.survey-head h1 { font-size: 1.6rem; margin: 0; }
.survey-sub { margin: 0; color: var(--brand-dark); font-weight: 700; }
.survey-progress { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; display: flex; align-items: center; gap: 10px; }
.survey-progress-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.survey-progress-bar div { height: 100%; background: var(--brand); transition: width .3s; }
.survey-section { margin-bottom: 14px; }
.survey-section h2 { font-size: 1.2rem; }
.survey-q { padding: 12px 0; border-top: 1px solid var(--border); }
.survey-q:first-of-type { border-top: 0; }
.survey-label { display: block; font-weight: 700; margin: 0 0 8px; }
.survey-hint { display: block; font-weight: 400; color: var(--muted); font-size: .9em; margin-top: 2px; }
.survey-q input[type=text], .survey-q input[type=email], .survey-q textarea { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.survey-q textarea { margin-top: 8px; resize: vertical; }
.survey-q input:focus, .survey-q textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rating { display: flex; gap: 6px; flex-wrap: wrap; }
.rating-opt, .choice-opt { position: relative; }
.rating-opt input, .choice-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rating-opt span { display: flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); font-weight: 800; font-size: 1.15rem; cursor: pointer; }
.rating-opt.skip span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.rating-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.rating-opt input:focus-visible + span, .choice-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.choice-list { display: flex; flex-direction: column; gap: 6px; }
.choice-opt span { display: block; padding: 10px 12px 10px 40px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; position: relative; }
.choice-opt span::before { content: ""; position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); }
.choice-opt.multi span::before { border-radius: 5px; }
.choice-opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.choice-opt input:checked + span::before { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 3px #fff; }
.survey-missing { display: none; color: var(--bad); font-weight: 700; font-size: .85rem; margin: 6px 0 0; }
.survey-q.is-missing .survey-missing { display: block; }
.survey-q.is-missing .rating-opt span, .survey-q.is-missing .choice-opt span, .survey-q.is-missing input[type=text], .survey-q.is-missing input[type=email], .survey-q.is-missing textarea:not([name$=_comment]) { border-color: var(--bad); }
.survey-submit { text-align: center; }
.survey-submit .btn-primary { width: 100%; }
.survey-done { text-align: center; }

/* Panel ankiety */
.admin-nav { display: flex; gap: 4px; margin-left: 8px; }
.admin-nav a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 700; }
.admin-nav a.on { background: var(--brand-soft); color: var(--brand-dark); }
.draw-form { display: flex; gap: 8px; margin-bottom: 12px; }
.draw-form input { flex: 1; }
.draw-list { margin: 0; padding-left: 20px; }
.draw-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.draw-list li > div { display: inline-block; }
.draw-list li form { float: right; }
.draw-list li.is-absent { opacity: .5; text-decoration: line-through; }
.stats-section { margin: 18px 0 4px; font-size: 1rem; color: var(--brand-dark); }
.stat-q { padding: 8px 0; border-bottom: 1px solid var(--border); }
.stat-label { margin: 0; font-weight: 600; }
.stat-rating { display: flex; gap: 12px; align-items: flex-start; }
.stat-avg { flex: none; min-width: 3.2em; text-align: center; font-size: 1.3rem; font-weight: 800; color: var(--brand-dark); background: var(--brand-soft); border-radius: 10px; padding: 4px 6px; }
.stat-rating p { margin: 0 0 2px; }
.stat-bar { display: grid; grid-template-columns: minmax(0, 1fr) 160px 32px; gap: 8px; align-items: center; font-size: .9rem; margin: 3px 0; }
.stat-bar .dist-fill { background: var(--brand); }

/* Rzutnik losowania */
.draw-view { position: relative; display: flex; align-items: center; justify-content: center; }
.draw-idle { display: flex; align-items: center; justify-content: center; gap: 6vw; width: 100%; }
.draw-idle h1 { font-size: 4.6vw; line-height: 1.15; margin: 0 0 3vh; }
.draw-idle .qr { width: 32vh; height: 32vh; }
.draw-kicker { color: var(--brand-dark); font-weight: 800; font-size: 2vw; letter-spacing: .05em; text-transform: uppercase; margin: 0 0 1vh; }
.draw-stage { text-align: center; width: 100%; }
.draw-prize { font-size: 3.4vw; margin: 0 0 4vh; color: var(--brand); line-height: 1.25; }
.reel { position: relative; height: 30vh; overflow: hidden; margin: 0 auto; max-width: 70vw; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.reel::before, .reel::after { content: ""; position: absolute; left: 0; right: 0; height: 35%; z-index: 2; pointer-events: none; }
.reel::before { top: 0; background: linear-gradient(var(--surface), transparent); }
.reel::after { bottom: 0; background: linear-gradient(transparent, var(--surface)); }
.reel-strip { will-change: transform; }
.reel-item { height: 10vh; display: flex; align-items: center; justify-content: center; font-size: 5vw; font-weight: 800; color: var(--fg); line-height: 1.3; }
.reel-item.winner.lit { color: var(--brand); transform: scale(1.12); transition: transform .4s, color .4s; }
.draw-winner-label { font-size: 3vw; font-weight: 800; margin: 4vh 0 0; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.draw-winner-label.show { opacity: 1; transform: none; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

.draw-winner-email { font-size: 2vw; color: var(--muted); margin: 1vh 0 0; opacity: 0; transition: opacity .5s; }
.draw-winner-email.show { opacity: 1; }

/* ---------- Bilet ---------- */
body.ticket-page { background: #ece6df; }
.ticket-wrap { padding: 24px 12px 40px; }
.ticket { --olive: #8c6a14; --dark: #3a3418; --mustard: #e3ad57; max-width: 400px; margin: 0 auto; background: var(--bg); border-radius: 18px; overflow: hidden; box-shadow: 0 6px 24px rgba(60, 35, 20, .15); }
.ticket-strip { height: 120px; background: left center / auto 100% repeat-x; }
.ticket-strip.bottom { height: 46px; background-position: -560px bottom; background-size: auto 140px; }
.ticket-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 0; }
.ticket-head img { height: 30px; }
.ticket-badge { background: var(--brand); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.ticket-content { padding: 14px 20px 18px; }
.ticket-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--olive); }
.ticket h1 { margin: 4px 0 6px; font-size: 22px; line-height: 1.25; color: var(--dark); }
.ticket h1 span { color: var(--brand); }
.ticket-lead { margin: 0 0 14px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.ticket-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.ticket-fact { background: var(--surface); border-radius: 12px; padding: 8px 10px; }
.ticket-fact small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--olive); }
.ticket-fact strong { display: block; font-size: 14px; margin-top: 2px; }
.ticket-fact span { display: block; font-size: 12px; color: var(--muted); }
.ticket-fact.wide { grid-column: 1 / -1; }
.ticket-owner { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: 14px; padding: 12px; border-top: 4px solid var(--brand); }
.ticket-owner img { width: 120px; height: 120px; flex: none; }
.ticket-name { margin: 0 0 4px; font-weight: 800; font-size: 16px; color: var(--dark); overflow-wrap: anywhere; }
.ticket-email { margin: 0 0 8px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ticket-extras { display: flex; gap: 6px; flex-wrap: wrap; }
.ticket-extra { font-weight: 800; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; }
.ticket-extra.lunch { background: var(--mustard); color: var(--dark); }
.ticket-extra.workshop { background: var(--olive); color: #fff; }
.ticket-note { margin: 14px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); text-align: center; }
.ticket-actions { max-width: 400px; margin: 14px auto 0; display: flex; gap: 8px; }
.ticket-actions a { flex: 1; text-align: center; padding: 12px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.ticket-actions .primary { background: var(--brand); color: #fff; }
.ticket-actions .ghost { background: var(--surface); color: var(--fg); }
.ticket-error h1 { font-size: 19px; }

/* Panel biletów */
.ticket-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.ticket-filters select { font: inherit; padding: 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.pill.ticket-pill { font-size: .75rem; padding: 2px 8px; }
.pill.ticket-pill.workshop { background: #8c6a14; color: #fff; }
.pill.ticket-pill.lunch { background: #e3ad57; color: #3a3418; }
.people-table tr.is-inactive td { opacity: .5; }

/* Skaner (telefon obsługi) */
body.scanner-page { background: #1f1b18; color: #fff; }
.scanner { max-width: 520px; margin: 0 auto; padding: 12px 12px 30px; min-height: 100vh; }
.scanner-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.scanner-back { color: #ddd; text-decoration: none; font-weight: 700; }
.scanner-modes button { padding: 8px 14px; font-size: .95rem; }
.scanner.mode-workshop .scanner-reader { outline: 4px solid #8c6a14; }
.scanner-counts { display: flex; justify-content: space-between; margin: 12px 0; font-size: .95rem; color: #ccc; }
.scanner-counts strong { color: #fff; font-size: 1.2rem; }
.scanner-reader { width: 100%; border-radius: 16px; overflow: hidden; background: #000; min-height: 260px; }
.scanner-hint { text-align: center; color: #bbb; margin: 10px 0 16px; }
.scanner-search input { width: 100%; font: inherit; padding: 12px; border-radius: 12px; border: 0; }
.scanner-search ul { list-style: none; margin: 8px 0 0; padding: 0; background: #fff; color: var(--fg); border-radius: 12px; overflow: hidden; }
.scanner-search li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.scanner-search li:empty { display: none; }
.scanner-result { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #fff; }
.scanner-result.ok { background: #1f8a3b; }
.scanner-result.warn { background: #b26b00; }
.scanner-result.bad { background: #b3261e; }
.scanner-result-icon { font-size: 5rem; font-weight: 900; line-height: 1; }
.scanner-result-message { font-size: 1.5rem; font-weight: 800; margin: 12px 0; }
.scanner-result-name { font-size: 2rem; font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.scanner-result-email { margin: 4px 0 16px; opacity: .85; overflow-wrap: anywhere; }
.scanner-result-extras { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 420px; }
.scanner-result-extras .extra { display: block; padding: 16px; border-radius: 16px; font-size: 1.8rem; font-weight: 900; letter-spacing: .04em; border: 4px solid #fff; }
.scanner-result-extras .extra.workshop { background: #3a3418; }
.scanner-result-extras .extra.lunch { background: #e3ad57; color: #3a3418; }
.scanner-result-tap { position: absolute; bottom: 24px; opacity: .8; }

/* ---------- Scenariusz ---------- */
.agenda-now { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; border-left: 5px solid var(--brand); }
.agenda-now p { margin: 0; }
.agenda-now-title { font-size: 1.3rem; font-weight: 800; margin: 2px 0 4px !important; }
.agenda-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.agenda-item { display: grid; grid-template-columns: 22px 150px minmax(0, 1fr) 220px auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.agenda-item.is-current { border: 2px solid var(--brand); background: var(--brand-soft); }
.agenda-item.type-break, .agenda-item.type-lunch { background: var(--surface-2); }
.agenda-item.dragging { opacity: .4; }
.agenda-handle { cursor: grab; color: var(--muted); font-weight: 900; user-select: none; text-align: center; }
.agenda-item input, .agenda-item select { font: inherit; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 4px 6px; width: 100%; min-width: 0; }
.agenda-item input:hover, .agenda-item select:hover { border-color: var(--border); }
.agenda-item input:focus, .agenda-item select:focus { outline: none; border-color: var(--brand); background: #fff; }
.agenda-time { display: flex; align-items: center; gap: 2px; font-weight: 800; }
.agenda-time input { width: 62px; text-align: center; font-variant-numeric: tabular-nums; }
.agenda-main { display: flex; flex-direction: column; min-width: 0; }
.agenda-title { font-weight: 700; }
.agenda-speaker { font-size: .9rem; color: var(--muted); }
.agenda-meta { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.agenda-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.agenda-empty { padding: 16px; }
@media (max-width: 1000px) {
    .agenda-item { grid-template-columns: 22px minmax(0, 1fr); }
    .agenda-time, .agenda-main, .agenda-meta, .agenda-actions { grid-column: 2; }
    .agenda-actions { justify-content: flex-start; }
}

/* ---------- Pytania do prelegentów ---------- */
.questions-current { margin-bottom: 12px; border-left: 4px solid var(--brand); }
.questions-current p { margin: 0 0 2px; }
.questions-title { font-weight: 800; font-size: 1.1rem; }
.questions-form textarea, .questions-name { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 8px; }
.questions-form textarea:focus, .questions-name:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.questions-name[readonly] { background: var(--surface-2); color: var(--muted); }
.questions-form .btn-primary { width: 100%; margin-top: 6px; }
.questions-mine h2 { font-size: 1.1rem; margin-top: 18px; }
.questions-mine ul { list-style: none; padding: 0; margin: 0; }
.questions-mine li { background: var(--surface); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.questions-mine li p { margin: 0 0 4px; overflow-wrap: anywhere; }
.questions-anon { align-items: flex-start; }
.questions-anon input { margin-top: 4px; }

/* Moderacja pytań - tablet */
.moderation-page .admin-wrap { max-width: 1100px; }
.talk-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.talk-tab { position: relative; flex: none; scroll-snap-align: start; width: 210px; text-align: left; font: inherit; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.talk-tab.on { border-color: var(--brand); background: var(--brand-soft); }
.talk-tab.is-current .talk-tab-time { color: var(--brand-dark); }
.talk-tab-time { font-weight: 800; font-size: .9rem; color: var(--muted); }
.talk-tab-title { padding-right: 26px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.talk-tab-badge { position: absolute; top: 8px; right: 10px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--brand); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.moderation-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 8px 0 12px; }
.moderation-head h1 { margin: 0; font-size: 1.5rem; }
.moderation-head p { margin: 2px 0 0; }
.status-tabs button { padding: 12px 18px; font-size: 1rem; }
.question-cards { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.question-card { background: var(--surface); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); border-left: 6px solid var(--brand); transition: opacity .2s; }
.question-card.status-answered { border-left-color: var(--ok); }
.question-card.status-hidden { border-left-color: var(--muted); }
.question-card.leaving { opacity: .3; }
.question-card-text { margin: 0 0 12px; font-size: 1.25rem; line-height: 1.4; overflow-wrap: anywhere; }
.question-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.question-card-meta { color: var(--muted); }
.question-card-actions { display: flex; gap: 8px; }
.question-card-actions .btn { padding: 12px 20px; font-size: 1rem; min-height: 48px; }
.question-empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface); border-radius: 16px; }

/* ---------- Rzutnik ---------- */
.projector-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; padding: 8px 12px; border-radius: 12px; background: #2b2420; color: #fff; }
.projector-bar-label { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; opacity: .8; }
.projector-bar-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.projector-bar-buttons button { font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 10px; border: 2px solid #5a4d44; background: transparent; color: #fff; cursor: pointer; min-height: 40px; }
.projector-bar-buttons button.on { background: var(--brand); border-color: var(--brand); }
.projector-bar-buttons button.on::before { content: "● "; }
.projector-bar-link { color: #ddd; text-decoration: none; font-weight: 700; }
.projector-bar-error { color: #ffb4a9; font-size: .9rem; }
.projector-howto li { margin-bottom: 6px; }
.projector-preview { width: 100%; max-height: 300px; border-radius: 12px; background: #000; margin: 8px 0; }
.projector-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

body.projector-page { background: #000; overflow: hidden; }
.projector { position: fixed; inset: 0; }
.projector-screen { position: absolute; inset: 0; }
.projector-board { background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6vh 6vw 22vh; color: var(--fg); }
.projector-logo { height: 9vh; margin-bottom: 4vh; }
.projector-kicker { margin: 0; font-size: 2.2vw; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8c6a14; }
.projector-board h1 { font-size: 4.6vw; line-height: 1.2; margin: 1vh 0 5vh; }
.projector-board h1 span { color: var(--brand); }
.projector-agenda { display: flex; flex-direction: column; gap: 2vh; width: min(80vw, 1400px); }
.projector-agenda-row { display: grid; grid-template-columns: 12vw 8vw 1fr; align-items: baseline; gap: 2vw; text-align: left; background: var(--surface); border-radius: 2vh; padding: 2vh 2.5vw; box-shadow: var(--shadow); }
.projector-agenda-row:first-child { border-left: .8vh solid var(--brand); }
.projector-agenda-label { font-size: 1.5vw; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.projector-agenda-time { font-size: 2.4vw; font-weight: 800; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.projector-agenda-title { font-size: 2.4vw; font-weight: 700; line-height: 1.25; }
.projector-agenda-title small { display: block; font-size: .65em; font-weight: 400; color: var(--muted); }
.projector-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 16vh; background: left center / auto 100% repeat-x; }
.projector-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.projector-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
.projector-start { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vh; border: 0; background: rgba(43, 36, 32, .82); color: #fff; font: inherit; cursor: pointer; }
.projector-start strong { font-size: 3vw; }
.projector-start span { font-size: 1.6vw; opacity: .85; }

/* Potwierdzenie w oknie na stronie (zamiast systemowego confirm) */
.confirm-dialog { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(43, 36, 32, .55); }
.confirm-box { width: min(440px, 100%); background: var(--surface); border-radius: 16px; padding: 20px 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.confirm-box p { margin: 0 0 18px; font-size: 1.05rem; line-height: 1.45; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.confirm-actions .btn { padding: 12px 20px; min-height: 44px; }
/* Przejście między ekranami rzutnika: wygaszenie do czerni i powolne pojawienie się */
.projector::after { content: ""; position: absolute; inset: 0; z-index: 15; background: #000; opacity: 0; pointer-events: none; transition: opacity 1s ease-in-out; }
.projector.fading::after { opacity: 1; transition-duration: .6s; }

/* Moduły dla uczestników (panel) */
.modules-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 16px; padding: 6px 12px; border-radius: 12px; background: var(--surface-2); }
.modules-bar-label { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .75rem; color: var(--muted); }
.modules-bar button { font: inherit; font-weight: 700; padding: 6px 14px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.modules-bar button.on { border-color: var(--ok); color: var(--ok); }
.modules-bar-hint { font-size: .8rem; color: var(--muted); margin-left: auto; }

/* Logowanie do panelu */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 4px; }
.login-card .logo { width: 180px; margin: 0 auto 8px; }
.login-card h1 { text-align: center; font-size: 1.3rem; margin: 0 0 12px; }
.login-card .btn { margin-top: 4px; padding: 12px; }
.login-card .flash-msg.error { border-left-color: var(--bad); margin: 0 0 12px; }
.login-card .small { text-align: center; margin: 10px 0 0; }
.admin-user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.admin-topbar .admin-user a { display: inline; }
.accounts-table td { vertical-align: middle; }
.accounts-actions { display: flex; gap: 6px; justify-content: flex-end; }
.accounts-new { margin-top: 20px; }
.accounts-new-row { display: flex; flex-wrap: wrap; gap: 12px; }
.accounts-new-row .field { min-width: 180px; }
