@charset "UTF-8";

:root {
  color-scheme: light;
  --ink: #25292d;
  --ink-soft: #60666a;
  --paper: #f6f7f3;
  --surface: #fff;
  --line: #dde1d8;
  --line-strong: #bec6b6;
  --dark: #23282b;
  --dark-soft: #30373b;
  --lime: #d4f486;
  --lime-deep: #476123;
  --lavender: #dcd3f4;
  --lavender-deep: #65518e;
  --danger: #a33636;
  --shadow: 0 12px 34px rgb(31 39 29 / 5%);
  --radius: 19px;
  --radius-small: 11px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 280px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--lime-deep); text-underline-offset: 3px; }
a:hover { color: #283b12; }
img, svg, canvas { max-width: 100%; vertical-align: middle; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.035em; }
h1 { margin-bottom: 12px; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 750; }
h2 { margin-bottom: 12px; font-size: 1.35rem; }
h3 { margin-bottom: 9px; font-size: 1.08rem; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
small { font-size: .82rem; }
hr, .divider { width: 100%; margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
:focus-visible { outline: 3px solid #8360b7; outline-offset: 4px; }
::selection { color: var(--dark); background: var(--lime); }
.muted { color: var(--ink-soft); }
.hint { display: block; margin-top: 7px; color: var(--ink-soft); font-size: .83rem; line-height: 1.5; }
.eyebrow { margin-bottom: 12px; color: var(--lime-deep); font-size: .72rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.badge, .pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 99px; background: #edf0e8; color: #526043; font-size: .74rem; font-weight: 700; line-height: 1.4; }
.badge { background: var(--lavender); color: #544273; }
.pill.live { color: #38551b; background: #e3f3c9; }
.pill.live::before { width: 6px; height: 6px; border-radius: 50%; background: #5d8b2e; content: ""; }
.pill.closed { color: #61656b; background: #edf0f1; }
.pill.draft { color: #735723; background: #faf0d7; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.grid { display: grid; gap: 20px; min-width: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > *, .stack > * { min-width: 0; }

/* Shared identity */
.brand { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-mark { display: inline-grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 12px 12px 12px 3px; color: var(--dark); background: var(--lime); font-size: 22px; font-weight: 850; line-height: 1; }
.brand-text { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-size: 1.03rem; font-weight: 760; letter-spacing: -.035em; line-height: 1.3; }
.wordmark-live { color: var(--lavender-deep); font-weight: 500; }
.sidebar .wordmark-live, .auth-brand .wordmark-live { color: var(--lime); }

/* Forms and small controls */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin-bottom: 20px; }
.field > label, .field > span:first-child { font-size: .86rem; font-weight: 680; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { width: 100%; min-width: 0; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 112px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8b9089; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: #7b9561; box-shadow: 0 0 0 3px rgb(129 160 99 / 14%); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: #577b32; }
input[type="range"] { width: 100%; accent-color: #577b32; }
fieldset { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 680; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; font-size: .88rem; }
.check-row input { margin-top: 4px; }
.check-row label { min-width: 0; }
.form-actions, .page-actions, .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.form-actions { margin-top: 24px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 43px; max-width: 100%; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; color: var(--ink); background: #e9ede4; font-size: .86rem; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { color: var(--ink); background: #dfe6d6; transform: translateY(-1px); }
.button.primary { border-color: var(--lime); color: #29341e; background: var(--lime); }
.button.primary:hover { border-color: #c2e275; background: #c2e275; }
.button.secondary { border-color: var(--line); background: #fff; }
.button.secondary:hover { border-color: var(--line-strong); background: #f3f5ef; }
.button.ghost { color: var(--ink-soft); background: transparent; }
.button.ghost:hover { color: var(--ink); background: #edf0e9; }
.button.danger { border-color: #edcece; color: var(--danger); background: #fff2f1; }
.button.danger:hover { background: #ffe6e4; }
.button.small { min-height: 34px; padding: 6px 11px; border-radius: 8px; font-size: .77rem; }
.inline-form { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0; }
.inline-form .field { margin: 0; }
.notice { margin: 0 0 20px; padding: 14px 17px; border: 1px solid #d7dee5; border-radius: 12px; color: #435361; background: #eef3f8; font-size: .9rem; overflow-wrap: anywhere; }
.notice.success { border-color: #d3e2bd; color: #3d5d25; background: #edf5e4; }
.notice.error { border-color: #efcccc; color: #903939; background: #fff0ef; }
.notice.warning { border-color: #e7d8af; color: #77591b; background: #fff8e6; }
.notice a { color: inherit; }

/* Account entry */
.auth-page { min-height: 100svh; padding: 40px; background: #e9ede4; }
.auth-shell { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(330px, 1.08fr); width: min(1020px, 100%); min-height: 660px; margin: max(0px, calc((100svh - 740px) / 2)) auto 0; border: 1px solid #d4dacb; border-radius: 28px; background: #fff; box-shadow: 0 24px 80px rgb(38 49 26 / 8%); }
.auth-brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 48px; min-width: 0; padding: 42px; border-radius: 27px 0 0 27px; color: #f6f8f1; background: var(--dark); }
.auth-brand h1 { max-width: 350px; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 650; line-height: 1.08; }
.auth-brand .eyebrow { color: var(--lime); }
.auth-brand .muted, .auth-brand p { color: #bdc7b8; }
.auth-aside { max-width: 340px; }
.auth-aside .badge { margin-bottom: 20px; }
.auth-card { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 48px; }
.auth-card h1 { font-size: 1.9rem; }
.auth-card form { margin-top: 28px; }
.auth-card .button.primary { width: 100%; }
.auth-card .form-actions { margin-top: 8px; }
.auth-card .form-actions + p { margin-top: 24px; }
.setup-steps { padding-left: 21px; color: var(--ink-soft); font-size: .9rem; }
.setup-steps li { padding: 0 0 11px 4px; }
.setup-steps li::marker { color: var(--lime-deep); font-weight: 800; }

/* Application frame */
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; min-width: 0; height: 100svh; padding: 30px 20px 20px; color: #e5eadf; background: var(--dark); }
.sidebar-brand { padding: 0 5px 35px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar-nav a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 13px; border-radius: 10px; color: #b9c2b3; font-size: .87rem; font-weight: 580; text-decoration: none; }
.sidebar-nav a:hover { color: #fff; background: #333b3c; }
.sidebar-nav a.active { color: var(--lime); background: #3c4639; }
.sidebar-footer { margin-top: auto; padding: 24px 12px 0; color: #a5b09e; font-size: .77rem; }
.sidebar-footer a { color: #d2dccb; }
.sidebar-footer .divider { border-color: #424a46; }
.sidebar .button.ghost { color: #c7d0c0; }
.sidebar .button.ghost:hover { background: #363e3c; }
.main { min-width: 0; padding: 0 clamp(22px, 3.5vw, 56px) 48px; }
.topbar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-height: 85px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.user-chip { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: var(--ink-soft); font-size: .82rem; }
.user-chip strong { color: var(--ink); font-weight: 650; }
.user-chip::before { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #a9c587; content: ""; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-header p { max-width: 650px; color: var(--ink-soft); }
.page-header .page-actions { flex-shrink: 0; padding-top: 7px; }
.card { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.card.feature { padding: 30px; border-color: #d6dfc8; background: #eaf0e2; }
.card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.card-title h2, .card-title h3 { margin-bottom: 0; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 15px; color: var(--ink-soft); font-size: .78rem; }
.empty { padding: 48px 22px; border: 1px dashed #cdd5c3; border-radius: var(--radius); color: var(--ink-soft); text-align: center; }
.empty h2, .empty h3 { color: var(--ink); }
.empty .button { margin-top: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 24px 0; }
.stat { min-width: 0; padding: 19px 22px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.stat strong { display: block; font-size: 1.8rem; font-weight: 720; line-height: 1.3; letter-spacing: -.05em; }
.stat span, .stat small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: .8rem; }
.table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .85rem; text-align: left; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink-soft); background: #f4f6f0; font-size: .74rem; font-weight: 700; letter-spacing: .025em; }
tr:last-child td { border-bottom: 0; }
td .inline-form { gap: 5px; }
.toolbar { justify-content: space-between; margin-bottom: 20px; }
.toolbar > input, .toolbar > select { max-width: 300px; }
.presentation-card { display: flex; flex-direction: column; gap: 18px; }
.presentation-card h2 { margin-bottom: 6px; }
.presentation-card .page-actions { margin-top: auto; }
.mini-preview { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; min-height: 135px; padding: 22px; border-radius: 12px; color: var(--dark); background: #ece8f4; text-align: center; }
.mini-preview strong { max-width: 32ch; font-size: 1.1rem; line-height: 1.35; }
.mini-preview .eyebrow { margin: 0; font-size: .62rem; }
.danger-zone { margin-top: 32px; padding: 22px; border: 1px solid #e6cdcd; border-radius: 15px; background: #fff9f8; }
.danger-zone h2, .danger-zone h3 { color: var(--danger); }
.invite-link { padding: 14px; border: 1px dashed #c4d2b0; border-radius: 10px; background: #f2f7ea; overflow-wrap: anywhere; }
.copy-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.copy-row input { flex: 1; }
.copy-row .button { flex-shrink: 0; }
.help-list { margin: 16px 0; padding-left: 20px; color: var(--ink-soft); }
.help-list li { padding-left: 3px; margin-bottom: 9px; }

/* Presentation editor */
.editor-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 22px; }
.slide-list { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.slide-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: #fff; text-decoration: none; }
.slide-row:hover { color: inherit; border-color: #b6c4a7; background: #f9fbf6; }
.slide-row.selected { border-color: #9ab577; background: #ecf3e2; box-shadow: 0 0 0 1px #9ab577; }
.slide-number { display: grid; flex: 0 0 26px; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: #686e63; background: #edf0e8; font-size: .76rem; font-weight: 750; }
.selected .slide-number { color: #3d571f; background: #d7e8be; }
.slide-copy { flex: 1; min-width: 0; }
.slide-copy strong { display: block; overflow: hidden; font-size: .82rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.slide-copy small { color: var(--ink-soft); font-size: .72rem; }
.slide-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.editor-form { min-width: 0; }
.editor-preview { display: flex; flex-direction: column; justify-content: center; min-height: 200px; margin-bottom: 22px; padding: 30px; border-radius: 17px; background: var(--lavender); text-align: center; }
.editor-preview h2 { max-width: 34ch; margin: 0 auto 14px; font-size: 1.6rem; }
.editor-preview .muted { color: #756a86; }
.options-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.option-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.option-row input:not([type="checkbox"]):not([type="radio"]) { flex: 1; }
.option-row .button { flex-shrink: 0; }
.option-row > span { width: 20px; color: var(--ink-soft); text-align: center; }

/* Session control and results */
.session-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 24px; }
.question-panel { min-width: 0; }
.question-panel h2 { font-size: clamp(1.45rem, 2.8vw, 2.1rem); }
.control-panel { min-width: 0; }
.control-panel .button { width: 100%; }
.control-panel .form-actions { flex-direction: column; align-items: stretch; }
.control-panel .field { margin-bottom: 14px; }
.code-display { display: block; margin: 12px 0; font-variant-numeric: tabular-nums; font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 750; line-height: 1.15; letter-spacing: .13em; }
.join-card { padding: 26px; border: 1px solid #d5dfc7; border-radius: 17px; background: #edf3e5; text-align: center; }
.join-card .qr-box { margin: 15px auto; }
.join-card a { overflow-wrap: anywhere; }
.results { display: flex; flex-direction: column; gap: 18px; margin: 26px 0; }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; align-items: center; }
.result-label { min-width: 0; font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.result-track { grid-column: 1; height: 27px; overflow: hidden; border-radius: 6px; background: #eff1eb; }
.result-bar { min-width: 0; max-width: 100%; height: 100%; border-radius: inherit; background: #b6d780; transition: width .4s ease; }
.result-row:nth-child(3n + 2) .result-bar { background: #c4b5e4; }
.result-row:nth-child(3n) .result-bar { background: #a5c9cd; }
.result-value { grid-column: 2; grid-row: 1 / span 2; color: var(--ink-soft); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.word-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 8px 20px; min-height: 250px; padding: 25px 10px; text-align: center; }
.word { max-width: 100%; color: #557c30; font-size: clamp(1.1rem, 2.3vw, 2rem); font-weight: 740; line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
.word:nth-child(4n + 2) { color: #8065a9; }
.word:nth-child(4n + 3) { color: #418b91; }
.word:nth-child(4n) { color: #b67b37; }
.word-cloud.live-word-cloud { display: block; min-height: 0; padding: 0; }
.word-cloud-map { display: block; width: 100%; height: auto; overflow: visible; }
.word-cloud-map .word { fill: currentColor; font-family: Arial, sans-serif; font-weight: 700; letter-spacing: 0; transform-box: view-box; transform-origin: 0 0; transition: transform .45s ease, font-size .45s ease; }
.presenter-question .word-cloud.live-word-cloud { min-height: 0; padding: 0; }
@media (prefers-reduced-motion: reduce) { .word-cloud-map .word { transition: none; } }
.response-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 20px 0; }
.response-card { min-width: 0; padding: 18px; border: 1px solid #e3dfeb; border-radius: 13px; background: #f4f1f9; overflow-wrap: anywhere; }
.response-card small { display: block; margin-top: 14px; color: var(--ink-soft); }
.qna-list { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.qna-item { display: flex; align-items: flex-start; gap: 15px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow-wrap: anywhere; }
.qna-item > div { flex: 1; min-width: 0; }
.qna-item p { margin-bottom: 8px; }
.qna-item .button { flex-shrink: 0; }

/* Audience phones */
.participant-shell { width: min(680px, 100%); min-height: 100svh; margin: 0 auto; padding: 0 24px 40px; }
.participant-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 92px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.participant-header .brand-text { font-size: .95rem; }
.participant-main { padding-top: 40px; }
.participant-main > .eyebrow { margin-bottom: 15px; }
.participant-main h1 { font-size: clamp(1.7rem, 5.5vw, 2.35rem); line-height: 1.18; }
.participant-main .card { margin-top: 24px; }
.participant-main .form-actions .button.primary { width: 100%; min-height: 49px; }
.question-count { flex-shrink: 0; color: var(--ink-soft); font-size: .78rem; font-variant-numeric: tabular-nums; }
.vote-options { display: flex; flex-direction: column; gap: 11px; margin: 25px 0; }
.vote-option { display: flex; align-items: center; gap: 13px; min-height: 60px; padding: 16px; border: 1px solid #cdd5c3; border-radius: 13px; color: var(--ink); background: #fff; font-size: 1rem; font-weight: 580; text-align: left; cursor: pointer; }
.vote-option:hover { border-color: #a5bc89; background: #f8fbf3; }
.vote-option:has(input:checked), .vote-option.selected, .vote-option[aria-pressed="true"] { border-color: #799954; background: #e7f2d7; box-shadow: 0 0 0 1px #799954; }
.vote-option input { flex-shrink: 0; }
.scale-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 12px; }
.scale-option { display: grid; flex: 1 0 38px; place-items: center; min-width: 38px; min-height: 52px; padding: 7px; border: 1px solid #cdd5c3; border-radius: 10px; color: var(--ink); background: #fff; font-weight: 700; cursor: pointer; }
.scale-option:has(input:checked), .scale-option.selected, .scale-option[aria-pressed="true"] { border-color: #718d50; background: var(--lime); }
.scale-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.scale-option:has(input:focus-visible) { outline: 3px solid #8360b7; outline-offset: 3px; }
.rank-list { display: flex; flex-direction: column; gap: 11px; margin: 24px 0; padding: 0; list-style: none; counter-reset: rank; }
.rank-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; counter-increment: rank; }
.rank-item::before { display: grid; flex: 0 0 26px; place-items: center; height: 26px; border-radius: 50%; color: #537432; background: #e8f0dd; font-size: .8rem; font-weight: 750; content: counter(rank); }
.rank-item > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rank-item select { width: 80px; flex-shrink: 0; }

/* Projector display */
.presenter-page { color-scheme: dark; min-height: 100svh; color: #f1f4eb; background: #22282a; }
.presenter-screen { display: flex; flex-direction: column; width: 100%; min-height: 100svh; padding: clamp(24px, 3.5vw, 65px); }
.presenter-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 35px; color: #b9c6af; }
.presenter-top .wordmark-live { color: var(--lime); }
.presenter-top .pill { color: var(--lime); background: #3c4b32; }
.presenter-question { flex: 1; width: min(1280px, 100%); margin: auto; }
.presenter-question > h1 { max-width: 28ch; margin: 12px auto 35px; font-size: clamp(2rem, 4.4vw, 4.6rem); font-weight: 680; text-align: center; }
.presenter-question > .eyebrow { color: var(--lime); text-align: center; }
.presenter-question .results { width: min(1000px, 100%); margin: 35px auto; gap: 25px; }
.presenter-question .result-label { color: #edf2e7; font-size: clamp(1rem, 2.2vw, 1.9rem); }
.presenter-question .result-track { height: 39px; background: #353e3f; }
.presenter-question .result-value { color: #c3cfb9; font-size: clamp(1rem, 1.8vw, 1.5rem); }
.presenter-question .word-cloud { min-height: 340px; gap: 14px 30px; }
.presenter-question .word { color: var(--lime); font-size: clamp(1.5rem, 3.9vw, 4rem); }
.presenter-question .word:nth-child(4n + 2) { color: #c9b4f0; }
.presenter-question .word:nth-child(4n + 3) { color: #91d2d6; }
.presenter-question .word:nth-child(4n) { color: #e5b780; }
.presenter-question .response-card, .presenter-question .qna-item { border-color: #4b5150; color: #f2f4ec; background: #343c3c; font-size: clamp(1rem, 1.8vw, 1.5rem); }
.presenter-question .muted, .presenter-question .response-card small { color: #b9c6af; }
.presenter-question .empty { border-color: #4e5b47; color: #b9c6af; }
.presenter-question .empty h2 { color: #f2f4ec; }
.presenter-footer { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-top: 30px; padding-top: 25px; border-top: 1px solid #414c43; color: #bac7b1; font-size: clamp(.8rem, 1.4vw, 1.1rem); }
.presenter-footer a { color: #e6efdb; text-decoration: none; }
.presenter-code { color: var(--lime); font-size: clamp(1.6rem, 3vw, 3rem); font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: .12em; line-height: 1.3; }
.presenter-footer .qr-box { width: 100px; }
.qr-box { width: 170px; max-width: 100%; padding: 10px; border-radius: 12px; background: #fff; }
.qr-box img, .qr-box svg, .qr-box canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }

/* Native disclosures and feedback */
details { min-width: 0; padding: 17px 0; border-top: 1px solid var(--line); }
summary { color: var(--ink); font-weight: 650; cursor: pointer; }
details[open] > summary { margin-bottom: 15px; }
dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 48px); margin: auto; padding: 30px; overflow-y: auto; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: #fff; box-shadow: 0 24px 100px rgb(0 0 0 / 24%); }
dialog::backdrop { background: rgb(26 33 27 / 55%); backdrop-filter: blur(3px); }
dialog form { margin-top: 22px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(420px, calc(100% - 32px)); padding: 14px 20px; border: 1px solid #59694b; border-radius: 12px; color: #eff8e6; background: #303b29; box-shadow: 0 10px 36px rgb(0 0 0 / 14%); font-size: .88rem; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.mobile-only { display: none !important; }
[hidden] { display: none !important; }

@media (min-width: 1500px) {
  .main { max-width: 1600px; width: 100%; margin: 0 auto; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding: 28px 14px 18px; }
  .sidebar .brand { gap: 8px; }
  .sidebar .brand-text { font-size: .88rem; }
  .sidebar .brand-mark { flex-basis: 33px; width: 33px; height: 33px; }
  .session-grid { grid-template-columns: minmax(0, 1fr) 265px; gap: 18px; }
  .editor-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 18px; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 22px; }
  .page-header { flex-wrap: wrap; gap: 12px; }
  .page-header .page-actions { padding-top: 0; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 20px 24px 14px; }
  .sidebar-brand { padding: 0 0 16px; }
  .sidebar .brand-text { font-size: 1rem; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 5px; }
  .sidebar-nav a { min-height: 39px; padding: 8px 12px; }
  .sidebar-footer { display: none; }
  .main { padding: 0 24px 35px; }
  .topbar { min-height: 66px; margin-bottom: 28px; }
  .session-grid { grid-template-columns: minmax(0, 1fr); }
  .control-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .control-panel > h2, .control-panel > h3, .control-panel > .notice, .control-panel > .divider { grid-column: 1 / -1; }
  .control-panel .form-actions { margin-top: 0; }
  .auth-page { padding: 24px; }
  .auth-shell { grid-template-columns: .9fr 1.1fr; min-height: 600px; }
  .auth-brand { padding: 28px; }
  .auth-card { padding: 32px; }
}
@media (max-width: 620px) {
  body { font-size: 14px; }
  .auth-page { padding: 0; background: #fff; }
  .auth-shell { display: block; min-height: 100svh; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .auth-brand { gap: 22px; padding: 26px 24px; border-radius: 0; }
  .auth-brand h1 { max-width: 100%; margin-bottom: 9px; font-size: 1.8rem; }
  .auth-brand > .muted { display: none; }
  .auth-aside { max-width: none; }
  .auth-aside .badge { margin-bottom: 14px; }
  .auth-card { display: block; padding: 30px 24px 42px; }
  .auth-card h1 { font-size: 1.65rem; }
  .auth-card form { margin-top: 24px; }
  .main { padding: 0 18px 30px; }
  .sidebar { padding: 18px 18px 13px; }
  .sidebar-nav a { font-size: .8rem; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 12px 0; }
  .topbar .button { min-height: 34px; padding: 6px 10px; font-size: .75rem; }
  .page-header { margin-bottom: 23px; }
  .page-header h1 { font-size: 1.85rem; }
  .page-actions { width: 100%; }
  .page-actions .button { flex-grow: 1; }
  .grid.two, .grid.three, .field-row, .editor-grid, .response-grid { grid-template-columns: minmax(0, 1fr); }
  .grid, .stack { gap: 16px; }
  .card, .card.feature { padding: 20px; border-radius: 15px; }
  .stats { gap: 8px; margin: 20px 0; }
  .stat { padding: 14px 10px; border-radius: 11px; }
  .stat strong { font-size: 1.45rem; }
  .stat span, .stat small { font-size: .7rem; }
  .toolbar { align-items: stretch; }
  .toolbar > input, .toolbar > select { max-width: 100%; }
  .editor-grid > .slide-list { display: grid; grid-template-columns: minmax(0, 1fr); }
  .slide-actions { gap: 7px; }
  .editor-preview { min-height: 170px; padding: 24px 18px; }
  .editor-preview h2 { font-size: 1.35rem; }
  .control-panel { grid-template-columns: minmax(0, 1fr); }
  .control-panel > * { grid-column: 1; }
  .copy-row { align-items: stretch; flex-wrap: wrap; }
  .copy-row input { flex-basis: 100%; }
  .copy-row .button { flex: 1; }
  .participant-shell { padding: 0 20px 32px; }
  .participant-header { min-height: 82px; gap: 10px; }
  .participant-main { padding-top: 30px; }
  .participant-header .brand { gap: 9px; }
  .participant-header .brand-mark { flex-basis: 32px; width: 32px; height: 32px; border-radius: 10px 10px 10px 3px; font-size: 19px; }
  .participant-header .brand-text { font-size: .85rem; }
  .vote-option { min-height: 59px; padding: 14px; }
  .scale-options { gap: 7px; }
  .scale-option { min-height: 48px; }
  .qna-item { gap: 10px; padding: 15px; }
  .qna-item .button.small { padding: 6px 8px; }
  .word-cloud { gap: 9px 14px; min-height: 200px; padding: 20px 0; }
  .presenter-screen { padding: 24px 20px; }
  .presenter-top { flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
  .presenter-question > h1 { margin-bottom: 25px; font-size: 2rem; }
  .presenter-question .word-cloud { min-height: 260px; gap: 10px 17px; }
  .presenter-question .word { font-size: 1.8rem; }
  .presenter-question .result-track { height: 30px; }
  .presenter-footer { gap: 18px; margin-top: 22px; }
  .presenter-footer .qr-box { width: 80px; padding: 7px; }
  dialog { padding: 24px 20px; }
  .mobile-only { display: initial !important; }
  .desktop-only { display: none !important; }
}
@media (max-width: 360px) {
  .main, .sidebar { padding-right: 14px; padding-left: 14px; }
  .sidebar-nav a { padding: 7px 9px; }
  .auth-card, .auth-brand { padding-right: 20px; padding-left: 20px; }
  .card, .card.feature { padding: 17px; }
  .brand-text { column-gap: 4px; }
  .participant-shell { padding-right: 16px; padding-left: 16px; }
  .participant-header .brand-text { max-width: 160px; }
  .option-row { gap: 6px; }
  .option-row .button.small { padding: 6px 8px; }
  .form-actions { align-items: stretch; }
  .form-actions > .button { flex-grow: 1; }
  .stat { padding-right: 8px; padding-left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .button:hover { transform: none; }
}
@media print {
  .sidebar, .topbar, .page-actions, .control-panel, .slide-actions, .toast { display: none !important; }
  .app-shell, .main, .session-grid { display: block; padding: 0; }
  body, .presenter-page, .presenter-screen { color: #222; background: #fff; }
  .card { margin-bottom: 16px; box-shadow: none; break-inside: avoid; }
}

/* Fit the permanent join instructions into a projector viewport. */
.preview-banner { margin: 0; padding: 8px 16px; border-radius: 0; font-size: .78rem; }
.mini-preview .word-cloud { min-height: 110px; padding: 10px 0; }
.auth-page:has(.preview-banner) .auth-shell { margin: 32px auto; }
.rank-item::before { display: none; }
.rank-item > .slide-number { flex: 0 0 28px; }
.word { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.presenter-screen { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 12px; height: 100svh; min-height: 0; padding: 24px 40px; }
.presenter-page:has(.preview-banner) .presenter-screen { height: calc(100svh - 38px); }
.presenter-top { margin: 0; }
.presenter-top .button.ghost, .presenter-page .hint { color: #b9c6bd; }
.presenter-question { min-height: 0; margin: 0 auto; padding: 12px 0; overflow: auto; }
.presenter-question > h1 { margin: 8px auto 16px; font-size: clamp(2rem,4vw,4rem); }
.presenter-question .results { margin: 12px auto; gap: 12px; }
.presenter-question .word-cloud { min-height: 160px; padding: 12px 0; }
.presenter-question:has(.live-word-cloud) { display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.presenter-question #qna:empty, .presenter-question #leaderboard:empty { display: none; }
.presenter-question:has(.live-word-cloud) > h1, .presenter-question:has(.live-word-cloud) > .eyebrow { flex: 0 0 auto; }
.presenter-question:has(.live-word-cloud) > .results { flex: 1 1 0; min-height: 0; }
.presenter-question .word-cloud.live-word-cloud { display: flex; flex: 1 1 0; min-height: 0; }
.presenter-question .word-cloud-map { width: 100%; height: 100%; min-height: 0; }
.presenter-footer { margin: 0; padding-top: 12px; align-items: center; }
.presenter-footer .qr-box { width: 112px; }
.presenter-footer .eyebrow { color: #cee99e; }
@media (max-width: 620px) {
  .auth-aside, .auth-brand > .hint { display: none; }
  .auth-brand { gap: 14px; }
  .auth-page:has(.preview-banner) .auth-shell { margin: 0; }
  .presenter-screen { padding: 16px; }
  .presenter-top .badge { display: none; }
  .presenter-footer { flex-wrap: nowrap; font-size: .72rem; }
  .presenter-footer .qr-box { width: 76px; flex: 0 0 76px; }
  .presenter-footer #participant-count { display: none; }
}
