:root {
  --bg1: #f1eadc;
  --bg2: #fbfaf6;
  --bg3: #edf3f1;
  --panel: #ffffff;
  --text: #14283a;
  --muted: #526472;
  --primary: #173d52;
  --primary-dark: #0d2c3d;
  --secondary: #fff0e9;
  --secondary-text: #a8321b;
  --green: #166534;
  --red: #b91c1c;
  --amber: #92400e;
  --card: #ffffff;
  --line: rgba(56, 66, 124, 0.16);
  --shadow: 0 18px 50px rgba(32, 41, 85, 0.09);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text); }
body { background: radial-gradient(circle at 80% -20%, #f4eadb 0%, #fbfaf6 45%, #eef3f1 100%); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: .55; cursor: not-allowed; }
.hidden { display: none !important; }

.landing, .student-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.home-card, .join-card, .wait-card { width: min(680px, 100%); background: var(--panel); border-radius: 28px; padding: 36px; box-shadow: var(--shadow); text-align: center; }
.home-card h1, .join-card h1, .wait-card h1 { font-size: clamp(2rem, 6vw, 4rem); line-height: 1.03; margin: 18px 0 14px; letter-spacing: -0.04em; }
.home-card p, .wait-card p { color: var(--muted); font-size: 1.1rem; }
.brand-pill { display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border-radius: 999px; background: var(--secondary); color: var(--secondary-text); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.home-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.primary-btn, .secondary-btn, .ghost-btn, .danger-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; padding: 14px 20px; font-weight: 850; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.primary-btn { background: var(--primary); color: white; box-shadow: 0 10px 22px rgba(15, 118, 110, .25); }
.primary-btn:hover:not(:disabled), .secondary-btn:hover:not(:disabled), .ghost-btn:hover:not(:disabled), .danger-btn:hover:not(:disabled) { transform: translateY(-1px); }
.secondary-btn { background: var(--secondary); color: var(--secondary-text); }
.ghost-btn { background: rgba(255,255,255,.16); color: white; border: 1px solid rgba(255,255,255,.35); }
.danger-btn { background: #fee2e2; color: #991b1b; }
.full { width: 100%; }
.small-note { font-size: .92rem !important; }

.topbar { height: 72px; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; color: white; }
.logo { font-weight: 950; font-size: 1.25rem; letter-spacing: -0.03em; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.shell { width: min(1440px, calc(100% - 32px)); margin: 0 auto 32px; }
.teacher-grid { display: grid; grid-template-columns: 1.1fr .7fr; gap: 18px; align-items: start; }
.panel { background: var(--panel); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; font-size: 1.35rem; }
.panel h3 { margin: 22px 0 10px; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.panel p { color: var(--muted); margin-top: 0; }
.setup-panel { grid-row: span 2; }
.live-panel { grid-column: span 2; }
.file-drop { display: flex; align-items: center; justify-content: center; min-height: 70px; border: 2px dashed var(--line); border-radius: 18px; background: rgba(224, 242, 254, .65); color: var(--secondary-text); font-weight: 800; margin: 14px 0; }
.file-drop input { display: none; }
textarea { width: 100%; min-height: 180px; border: 1px solid var(--line); border-radius: 18px; padding: 14px; resize: vertical; outline: none; background: white; }
input { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 14px; outline: none; background: white; margin: 7px 0 14px; }
.status-box { min-height: 22px; margin-top: 12px; color: var(--muted); font-size: .95rem; }
.status-box.error { color: var(--red); font-weight: 750; }
.status-box.ok { color: var(--green); font-weight: 750; }
.preview-list, .players-list, .ranking-list, .answers-list { display: grid; gap: 10px; }
.preview-item, .player-row, .ranking-row, .answer-row { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.preview-item span, .player-row span, .ranking-row span { color: var(--muted); }
.empty { color: var(--muted); }
.room-code-box { text-align: center; background: linear-gradient(135deg, #ecfeff, #d1fae5); border: 1px solid var(--line); border-radius: 22px; padding: 20px; margin: 16px 0; }
.room-code-box span { display: block; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.room-code-box strong { display: block; font-size: clamp(2.6rem, 7vw, 4.8rem); letter-spacing: .08em; margin-top: 8px; }
.room-panel button { margin-top: 10px; }
.live-header, .quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.counter { background: var(--secondary); color: var(--secondary-text); padding: 8px 12px; border-radius: 999px; font-weight: 850; }
.question-display { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.question-display h1 { margin: 0 0 16px; font-size: clamp(1.35rem, 3vw, 2.2rem); }
.option-mini { padding: 10px 12px; border-radius: 14px; background: #f8fafc; margin-top: 8px; font-weight: 700; }
.option-mini.correct { background: #dcfce7; color: #166534; }
.answer-row.correct { border-color: rgba(22, 163, 74, .35); }
.answer-row.wrong { border-color: rgba(220, 38, 38, .35); }
.answer-pill { padding: 6px 10px; border-radius: 999px; font-weight: 850; color: white; }
.answer-pill.correct { background: var(--green); }
.answer-pill.wrong { background: var(--red); }

.join-card { text-align: left; }
.join-card .brand-pill, .join-card h1 { text-align: center; display: flex; margin-left: auto; margin-right: auto; width: max-content; }
.join-card h1 { display: block; width: auto; }
.join-card label { font-weight: 800; color: var(--muted); }
.quiz-stage { width: min(1060px, 100%); min-height: 90vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; color: white; }
.quiz-topline { margin-bottom: 18px; font-weight: 900; }
.quiz-topline span { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); padding: 10px 14px; border-radius: 999px; }
.quiz-stage h1 { font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1.08; text-align: center; margin: 10px 0 38px; text-shadow: 0 5px 20px rgba(0,0,0,.15); }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.option-card { min-height: 112px; display: grid; grid-template-columns: 52px 1fr 40px; align-items: center; gap: 14px; text-align: left; color: white; border-radius: 22px; padding: 18px; box-shadow: 0 16px 38px rgba(0,0,0,.18); font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 850; }
.option-card .letter { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.24); font-weight: 950; }
.option-card[data-letter="A"] { background: #075985; }
.option-card[data-letter="B"] { background: #9a3412; }
.option-card[data-letter="C"] { background: #0f766e; }
.option-card[data-letter="D"] { background: #173d52; }
.option-card.correct { background: var(--green) !important; }
.option-card.wrong { background: var(--red) !important; }
.option-card.disabled { opacity: .56; cursor: default; }
.icon-slot { font-size: 1.7rem; font-weight: 950; }
.feedback-box { margin-top: 18px; background: rgba(255,255,255,.94); color: var(--text); border-radius: 18px; padding: 16px; text-align: center; font-weight: 850; }
.loader { width: 56px; height: 56px; border-radius: 50%; border: 6px solid #dbeafe; border-top-color: var(--primary); margin: 30px auto 0; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .teacher-grid { grid-template-columns: 1fr; }
  .setup-panel, .live-panel { grid-column: auto; grid-row: auto; }
  .topbar { height: auto; padding: 16px; align-items: flex-start; gap: 12px; flex-direction: column; }
  .option-grid { grid-template-columns: 1fr; }
}

/* Atualização: modo de apresentação, ranking entre perguntas e resposta única */
.game-active .setup-panel { display: none; }
.game-active .teacher-grid { grid-template-columns: 360px 1fr; }
.game-active .live-panel { grid-column: 2; grid-row: 1 / span 2; }
.game-active .room-panel { grid-column: 1; }
.game-active .players-panel { grid-column: 1; }

.live-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.counter.subtle { background: #ecfdf5; color: #166534; }
.teacher-details { margin-top: 18px; background: rgba(224, 242, 254, .55); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.teacher-details summary { cursor: pointer; font-weight: 850; color: var(--secondary-text); }
.teacher-details .answers-list { margin-top: 12px; }
.player-row small, .ranking-row small, .answer-row small, .big-ranking-row small { color: var(--muted); font-size: .74rem; margin-left: 6px; font-weight: 800; }
.ranking-row.leader, .big-ranking-row.leader { border-color: rgba(217, 119, 6, .5); background: #fffbeb; }

.presentation-question { padding: clamp(20px, 4vw, 42px); min-height: 520px; display: flex; flex-direction: column; justify-content: center; }
.presentation-meta, .student-question-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.timer-badge { min-width: 86px; text-align: center; padding: 10px 14px; border-radius: 999px; color: white; background: var(--primary); font-weight: 950; letter-spacing: .04em; }
.timer-badge.expired { background: var(--amber); }
.presentation-question h1 { font-size: clamp(2rem, 4.8vw, 4.5rem); line-height: 1.08; letter-spacing: -.04em; margin: 0 0 28px; }
.presentation-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.presentation-options .option-mini { font-size: clamp(1rem, 1.7vw, 1.35rem); min-height: 78px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #f8fafc; }

.ranking-screen { padding: clamp(20px, 4vw, 42px); min-height: 520px; }
.ranking-screen h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); text-align: center; margin-bottom: 26px; }
.big-ranking-list { display: grid; gap: 12px; width: min(900px, 100%); margin: 0 auto; }
.big-ranking-row { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; font-size: clamp(1rem, 2vw, 1.5rem); }
.rank-pos { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--secondary); color: var(--secondary-text); font-weight: 950; }
.big-ranking-row span:last-child { font-weight: 950; color: var(--primary-dark); }

.student-question-meta { color: rgba(255,255,255,.88); margin: 0 auto 16px; width: min(900px, 100%); }
.student-question-meta .timer-badge { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.28); }
.student-question-meta .timer-badge.expired { background: rgba(217, 119, 6, .92); }
#rankingView .ranking-list, #finishedView .ranking-list { margin-top: 16px; text-align: left; }
#rankingView .ranking-row, #finishedView .ranking-row { font-size: 1rem; }

@media (max-width: 900px) {
  .game-active .teacher-grid { grid-template-columns: 1fr; }
  .game-active .live-panel, .game-active .room-panel, .game-active .players-panel { grid-column: auto; grid-row: auto; }
  .presentation-options { grid-template-columns: 1fr; }
  .presentation-question, .ranking-screen { min-height: auto; }
  .big-ranking-row { grid-template-columns: 44px 1fr; }
  .big-ranking-row span:last-child { grid-column: 2; }
}

/* Ajustes desta versão: posição do aluno em tempo real e melhor adaptação da barra superior */
.quiz-topline { flex-wrap: wrap; }
#studentPosition { background: rgba(255,255,255,.28); }

/* Feedback reforçado para o aluno após resposta única */
.feedback-box { display: grid; gap: 6px; border: 2px solid transparent; }
.feedback-box strong { display: block; font-size: clamp(1.25rem, 3vw, 2rem); line-height: 1.1; }
.feedback-box span { display: block; font-size: 1rem; }
.feedback-box.feedback-correct { background: #dcfce7; color: #14532d; border-color: rgba(22, 163, 74, .45); box-shadow: 0 16px 38px rgba(22, 163, 74, .24); }
.feedback-box.feedback-wrong { background: #fee2e2; color: #7f1d1d; border-color: rgba(220, 38, 38, .45); box-shadow: 0 16px 38px rgba(220, 38, 38, .22); }


/* Etapa adicional: revisão da resposta correta antes do ranking */
.answer-screen { padding: clamp(20px, 4vw, 42px); min-height: 520px; }
.answer-review-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.answer-review-header strong { background: #dcfce7; color: #166534; padding: 10px 14px; border-radius: 999px; }
.answer-screen h1 { font-size: clamp(1.8rem, 4.2vw, 4rem); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 22px; }
.correct-answer-box { background: #dcfce7; color: #14532d; border: 2px solid rgba(22, 163, 74, .35); border-radius: 20px; padding: 18px 20px; margin-bottom: 20px; }
.correct-answer-box span { display: block; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; opacity: .82; margin-bottom: 6px; }
.correct-answer-box strong { font-size: clamp(1.2rem, 2.4vw, 2rem); line-height: 1.2; }
.answer-distribution { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.distribution-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.distribution-card.correct { border-color: rgba(22, 163, 74, .45); box-shadow: 0 10px 28px rgba(22, 163, 74, .14); }
.distribution-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 900; }
.distribution-topline strong { font-size: 1.4rem; color: var(--primary-dark); }
.distribution-topline span { color: var(--muted); }
.distribution-card p { margin: 8px 0 12px; color: var(--text); font-weight: 750; }
.distribution-bar { height: 12px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.distribution-bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.distribution-card.correct .distribution-bar span { background: var(--green); }
.answer-review-note { margin-top: 16px; color: var(--muted); font-size: 1rem; }

@media (max-width: 900px) {
  .answer-distribution { grid-template-columns: 1fr; }
  .answer-review-header { align-items: flex-start; flex-direction: column; }
  .answer-screen { min-height: auto; }
}

/* Authoring and readable question presentation */
:root { --question-size: 2.65rem; --option-size: 1.18rem; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 4px; }
input:focus, textarea:focus, select:focus { border-color: #0f766e; box-shadow: 0 0 0 3px #0f766e20; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
select { font: inherit; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.section-eyebrow { color: #0f766e; font-size: .72rem; font-weight: 850; letter-spacing: .14em; margin-bottom: 12px; }
.setup-panel h1 { margin: 0 0 10px; font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.03em; }
.panel { background: #f7fafb; box-shadow: 0 16px 42px #001a2720; }
.input-modes { display: flex; padding: 5px; gap: 5px; border-radius: 14px; background: #e6eef0; margin: 22px 0 18px; }
.mode-btn { flex: 1; padding: 12px; border-radius: 10px; background: transparent; color: #526675; font-weight: 750; }
.mode-btn.active { background: white; color: #0e6664; box-shadow: 0 2px 8px #173d4210; }
.file-drop { position: relative; flex-direction: column; gap: 8px; padding: 22px; margin-bottom: 0; text-align: center; cursor: pointer; background: #eff9f6; border-color: #8bbdb5; }
.file-drop input { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop:focus-within { outline: 3px solid #f59e0b; }
.file-drop span:last-child { font-size: .8rem; font-weight: 500; color: #526c70; }
.upload-symbol { font-size: 1.7rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: #dceee7; }
.file-drop.dragging { background: #d4efe4; border-color: #0f766e; }
.format-guide { border: 1px solid #d9e5e8; border-radius: 14px; margin: 16px 0 22px; padding: 16px; background: white; }
.format-guide summary { cursor: pointer; font-weight: 800; color: #155e63; }
.format-guide ol { padding-left: 23px; font-size: .9rem; line-height: 1.65; }
.format-guide p { font-size: .86rem; line-height: 1.6; }
.format-example { margin: 12px 0; padding: 18px; background: #132c3d; color: #e1f5eb; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font: .83rem/1.7 Consolas, 'Courier New', monospace; }
.field-label { display: block; margin: 14px 0 8px; font-weight: 750; font-size: .9rem; }
#rawQuestions { min-height: 230px; font: .88rem/1.65 Consolas, monospace; }
.editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.editor-actions .secondary-btn, .editor-actions .primary-btn { font-size: .85rem; padding: 11px 14px; border-radius: 10px; }
.text-btn { color: #096d6c; background: transparent; padding: 8px; font-weight: 750; border-radius: 8px; font-size: .84rem; }
.text-btn:hover { background: #e2f0ec; }
.manual-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.manual-options label { font-weight: 800; color: #0f766e; }
.manual-options textarea { display: block; min-height: 90px; margin-top: 6px; font-weight: 500; color: var(--text); }
#manualStatement { font: .95rem/1.6 Consolas, monospace; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; }
.preview-heading h3 { margin: 0; }
.preview-heading .counter { font-size: .75rem; }
.preview-list { margin-top: 14px; }
.preview-item { align-items: flex-start; flex-wrap: wrap; }
.preview-number { display: grid; place-items: center; background: #e5f3ec; color: #137465 !important; border-radius: 10px; width: 30px; height: 30px; font-weight: 800; flex-shrink: 0; }
.preview-copy { flex: 1; min-width: 160px; }
.preview-copy strong { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preview-copy > span { display: block; margin-top: 6px; font-size: .77rem; }
.preview-actions { display: flex; gap: 2px; flex-wrap: wrap; }
.parse-errors { background: #fff2ed; border: 1px solid #f6ccbe; color: #8e3829; padding: 16px 16px 16px 34px; border-radius: 12px; font-size: .85rem; line-height: 1.6; }
.parse-errors li + li { margin-top: 8px; }
.resume-panel { padding: 14px; background: #edf3f6; border-radius: 14px; font-size: .88rem; }
.resume-controls { display: flex; gap: 8px; align-items: center; }
.resume-controls input { min-width: 0; margin: 8px 0; }
.resume-controls button { margin: 0; padding: 12px; border-radius: 12px; }
.resume-panel p { margin: 6px 0 0; }
.question-preview-dialog { width: min(1120px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; padding: 20px; border-radius: 24px; background: #f1f6f5; box-shadow: 0 30px 100px #0005; }
.question-preview-dialog::backdrop { background: #071b2bbd; backdrop-filter: blur(5px); }
.preview-dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.preview-dialog-header .secondary-btn { padding: 10px 14px; font-size: .85rem; }
[data-fit-question] { --fit: 1; --question-size: clamp(1.85rem, 2.7vw, 2.7rem); --option-size: clamp(1rem, 1.45vw, 1.25rem); min-width: 0; }
[data-density="comfortable"] { --question-size: clamp(1.6rem, 2.35vw, 2.25rem); --option-size: 1.05rem; }
[data-density="dense"] { --question-size: clamp(1.35rem, 1.9vw, 1.8rem); --option-size: 1rem; }
.presentation-question { min-height: 0; padding: clamp(20px, 3vw, 38px); border-radius: 22px; background: #fff; justify-content: flex-start; }
.question-statement { font-size: max(1.2rem, calc(var(--question-size) * var(--fit))); font-weight: 750; line-height: 1.3; letter-spacing: -.025em; text-align: left; margin: 2px 0 28px; }
.rich-text { min-width: 0; overflow-wrap: anywhere; }
.text-paragraph { display: block; white-space: pre-wrap; }
.text-paragraph + .text-paragraph { margin-top: .7em; }
.inline-code { background: #0e766e14; color: #0d6965; padding: .12em .3em; border: 1px solid #0f766e25; border-radius: 5px; font-size: .87em; font-family: Consolas, 'Courier New', monospace; font-weight: 600; }
.code-block { display: block; text-align: left; margin: 16px 0; border: 1px solid #2e4658; border-radius: 14px; overflow: hidden; background: #122536; color: #e3f5ee; letter-spacing: 0; font-weight: 450; box-shadow: 0 8px 24px #0b213313; }
.code-label { display: block; padding: 8px 16px; background: #1b3447; color: #91b7c3; font: 650 .7rem/1.5 system-ui, sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.code-block > code { display: block; font: max(.9rem, calc(1.03rem * var(--fit, 1)))/1.65 Consolas, 'Courier New', monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; padding: 16px 20px; }
.presentation-options { gap: 12px; }
.presentation-options .option-mini { margin: 0; display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 14px; padding: 18px; border-radius: 15px; min-height: 74px; font-size: max(.95rem, calc(var(--option-size) * var(--fit))); font-weight: 600; background: #f5f8fa; border-color: #e1e8eb; line-height: 1.5; }
.option-letter { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; background: #deebf5; color: #226398; }
.option-mini:nth-child(2) .option-letter { background: #fae9d9; color: #a35118; }
.option-mini:nth-child(3) .option-letter { background: #d9eee5; color: #176447; }
.option-mini:nth-child(4) .option-letter { background: #e6e3f8; color: #6550a2; }
.game-active .teacher-grid { grid-template-columns: 280px minmax(0,1fr); }
.game-active .live-panel { min-width: 0; }
.presentation-meta { font-size: .77rem; letter-spacing: .09em; }
.presentation-mode .teacher-grid { grid-template-columns: 1fr; }
.presentation-mode .room-panel { grid-column: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; }
.presentation-mode .room-panel > :is(h2, .resume-panel, .room-code-box, #createRoomBtn, #startBtn, #exportBtn, #teacherStatus, p, #newRoomBtn) { display: none; }
.presentation-mode .room-panel button { width: auto; margin: 0; }
.presentation-mode .live-panel { grid-column: 1; grid-row: auto; }
.presentation-mode .players-panel, .presentation-mode .live-panel > h3, .presentation-mode #rankingList, .presentation-mode .teacher-details { display: none; }
.presentation-mode .live-header { margin-bottom: 12px; }
.quiz-stage { width: min(1120px,100%); min-height: 0; padding: clamp(18px,3vw,36px); background: #f8fafb; border: 1px solid #ffffff60; border-radius: 26px; box-shadow: 0 20px 60px #00172344; color: var(--text); }
.student-shell { align-content: center; padding: 24px; }
.quiz-topline { font-size: .83rem; gap: 8px; margin-bottom: 26px; }
.quiz-topline span, #studentPosition { background: #e8f1f2; border: 0; color: #38616d; padding: 8px 12px; }
.student-question-meta { color: #637784; font-size: .75rem; margin-bottom: 14px; }
.student-question-meta .timer-badge { background: #0f766e; min-width: 72px; padding: 8px 12px; }
.quiz-stage .option-grid { gap: 12px; }
.option-card { min-height: 88px; grid-template-columns: 34px minmax(0,1fr) 20px; gap: 12px; border-radius: 15px; padding: 18px; font-size: max(.95rem, calc(var(--option-size) * var(--fit))); font-weight: 600; box-shadow: 0 4px 12px #173b4b0c; border: 1px solid #dce6eb; color: #17334a; line-height: 1.5; }
.option-card[data-letter="A"], .option-card[data-letter="B"], .option-card[data-letter="C"], .option-card[data-letter="D"] { background: #fff; }
.option-card:hover:not(:disabled) { border-color: #0f766e; background: #eff8f5; }
.option-card .letter { width: 34px; height: 34px; font-size: .9rem; border-radius: 10px; background: #deebf5; color: #226398; }
.option-card[data-letter="B"] .letter { background: #fae9d9; color: #a35118; }
.option-card[data-letter="C"] .letter { background: #d9eee5; color: #176447; }
.option-card[data-letter="D"] .letter { background: #e6e3f8; color: #6550a2; }
.option-card.correct, .option-card.wrong { color: white; }
.option-card.disabled { opacity: .8; }
.option-card .code-block { margin: 8px 0; }
.option-card .code-block > code { padding: 12px; font-size: .9rem; }
.feedback-box { box-shadow: none; font-size: .95rem; }
.feedback-box strong { font-size: 1.2rem; }
.feedback-box > strong { display: block; white-space: nowrap; overflow-wrap: normal; }
.ranking-awaiting { text-align: center !important; margin: 18px 0; }
.connection-status { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 10; padding: 14px 20px; border-radius: 12px; max-width: min(640px, 94vw); background: #fff2da; color: #7c480d; box-shadow: 0 8px 30px #0003; }
.answer-screen { min-height: 0; }
.answer-screen .question-statement { font-size: clamp(1.35rem,2.6vw,2.4rem); }
.distribution-card .rich-text { margin: 12px 0; font-weight: 550; line-height: 1.5; }
@media (max-width: 900px) {
  .game-active .teacher-grid { grid-template-columns: 1fr; }
  .presentation-options { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .student-shell { padding: 12px; align-content: start; }
  .quiz-stage { border-radius: 20px; padding: 20px 16px; }
  .question-statement { font-size: 1.55rem; margin-bottom: 20px; }
  [data-density="dense"] .question-statement { font-size: 1.25rem; }
  .option-card { padding: 14px 12px; grid-template-columns: 30px minmax(0,1fr) 16px; gap: 9px; }
  .manual-options { grid-template-columns: 1fr; }
  .preview-item { gap: 10px; }
  .preview-actions { width: 100%; }
  .home-card, .join-card, .wait-card { padding: 26px 22px; }
  .code-block > code { padding: 14px; }
  .panel { padding: 18px; }
  .question-preview-dialog { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* Keep the room controls together even when the import guide is expanded. */
.teacher-sidebar { display: grid; gap: 18px; align-content: start; min-width: 0; }
.teacher-sidebar > .panel { min-width: 0; max-width: 100%; }
.game-active .teacher-grid { grid-template-columns: minmax(0, 350px) minmax(0, 1fr); }
.room-code-box strong { font-size: clamp(2rem, 3vw, 3rem); letter-spacing: .025em; white-space: nowrap; }
.room-panel button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.resume-controls input { flex: 1 1 0; width: 0; }
.resume-controls button { flex: 0 0 auto; }
.setup-panel { grid-row: auto; }
.game-active .teacher-sidebar { grid-column: 1; grid-row: 1; }
.game-active .live-panel { grid-row: 1; }
.presentation-mode .teacher-sidebar { grid-column: 1; grid-row: auto; }
.presentation-mode .live-panel { grid-row: auto; }
.code-block > code { font-size: max(.95rem, calc(1.15rem * var(--fit, 1))); }
@media (max-width: 1100px) {
  .game-active .teacher-sidebar, .game-active .live-panel { grid-column: auto; grid-row: auto; }
  .game-active .teacher-grid { grid-template-columns: minmax(0, 1fr); }
  .game-active .live-panel { grid-column: auto; }
}
@media (max-width: 600px) {
  .code-block > code { font-size: .9rem; line-height: 1.55; }
}

/* Apresentação do professor: camada independente, sem sobrepor os painéis de controle. */
body.presentation-open { overflow: hidden; }
body.presentation-open > .topbar,
body.presentation-open > main { visibility: hidden; pointer-events: none; }
.presentation-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: clamp(14px, 2.5vw, 30px);
  color: #eaf7f4;
  background: radial-gradient(circle at 50% -20%, #1d6265 0%, #0c3b48 48%, #071f2e 100%);
  overflow: auto;
}
.presentation-overlay.hidden { display: none; }
.presentation-overlay:fullscreen { padding: clamp(18px, 3vw, 44px); }
.presentation-overlay-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; width: min(1500px, 100%); margin: 0 auto clamp(16px, 3vh, 34px); }
.presentation-brand { color: #fff; font-size: clamp(1rem, 2vw, 1.4rem); font-weight: 950; text-decoration: none; letter-spacing: -.02em; }
.presentation-session { display: flex; align-items: center; justify-content: center; gap: 10px; justify-self: center; }
.presentation-room { padding: 8px 14px; border: 1px solid #ffffff38; border-radius: 999px; color: #cbe9e3; font-size: clamp(.78rem, 1.2vw, 1rem); font-weight: 750; white-space: nowrap; }
.presentation-room strong { margin-left: 5px; color: #fff; font-size: 1.08em; letter-spacing: .1em; }
.presentation-answered { padding: 8px 14px; border: 1px solid #b9f5da88; border-radius: 999px; color: #082f2f; background: #b9f5da; font-size: clamp(.78rem, 1.2vw, 1rem); font-weight: 850; white-space: nowrap; }
.presentation-overlay-actions { display: flex; justify-content: flex-end; gap: 8px; }
.presentation-action { padding: 9px 13px; border: 1px solid #ffffff40; border-radius: 10px; color: #fff; background: #ffffff16; font-size: .8rem; font-weight: 800; }
.presentation-action:hover { background: #ffffff2b; }
.presentation-action:disabled { cursor: not-allowed; opacity: .42; }
.presentation-icon-action { display: grid; place-items: center; width: 42px; height: 38px; padding: 0; }
.presentation-icon-action .ui-icon { width: 20px; height: 20px; }
.presentation-icon-action[aria-pressed="true"] { color: #073844; border-color: #f7c948; background: #f7c948; box-shadow: 0 0 0 4px #f7c94826; }
.presentation-icon-action[aria-pressed="true"]:hover { background: #ffe28a; }
.presentation-stage-wrap { position: relative; display: flex; flex: 1; align-items: center; justify-content: center; width: min(1500px, 100%); min-height: 0; margin: 0 auto; padding: 0 clamp(30px, 6vw, 100px); }
.presentation-canvas-wrap { position: relative; width: min(1280px, 100%); max-height: calc(100dvh - 150px); }
.presentation-stage { width: 100%; max-height: calc(100dvh - 150px); overflow: auto; border-radius: 24px; color: var(--text); }
.presentation-ink-canvas { position: absolute; inset: 0; z-index: 3; display: block; width: 100%; height: 100%; border-radius: 24px; pointer-events: none; }
.presentation-ink-canvas.is-active { cursor: crosshair; pointer-events: auto; touch-action: none; }
.presentation-stage.question-display { box-shadow: 0 28px 90px #00131f66; }
.presentation-stage .question-statement,
.presentation-stage .answer-review-header,
.presentation-stage .big-ranking-row,
.presentation-stage .answer-review-note { color: var(--text); }
.presentation-stage .presentation-options .option-mini { color: var(--text); }
.presentation-stage .presentation-question,
.presentation-stage .answer-screen,
.presentation-stage .ranking-screen { min-height: min(680px, calc(100dvh - 170px)); }
.presentation-nav { position: absolute; top: 50%; z-index: 4; transform: translateY(-50%); display: grid; place-items: center; width: clamp(50px, 5vw, 72px); height: clamp(50px, 5vw, 72px); border: 2px solid #ffffffb8; border-radius: 50%; color: #073844; background: #f7c948; box-shadow: 0 12px 30px #00131f66, 0 0 0 5px #f7c94822; line-height: 1; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.presentation-back { left: clamp(4px, 1.5vw, 24px); }
.presentation-next { right: clamp(4px, 1.5vw, 24px); }
.presentation-next-icon { width: clamp(24px, 2.4vw, 34px); height: clamp(24px, 2.4vw, 34px); }
.presentation-nav-icon { width: clamp(24px, 2.4vw, 34px); height: clamp(24px, 2.4vw, 34px); }
.presentation-nav:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); background: #ffe28a; box-shadow: 0 14px 34px #00131f77, 0 0 0 7px #f7c94833; }
.presentation-nav:disabled { cursor: not-allowed; opacity: .32; }
.presentation-hint { margin: clamp(12px, 2vh, 20px) auto 0; color: #b9d9d4; font-size: .78rem; text-align: center; }
@media (max-width: 700px) {
  .presentation-overlay { padding: 12px; }
  .presentation-overlay-header { grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 10px; }
  .presentation-session { grid-column: 1 / -1; grid-row: 2; justify-self: start; justify-content: flex-start; flex-wrap: wrap; }
  .presentation-overlay-actions { grid-column: 2; grid-row: 1; gap: 5px; }
  .presentation-action { padding: 8px 9px; }
  .presentation-icon-action { width: 38px; height: 36px; padding: 0; }
  .presentation-stage-wrap { padding: 0 30px 0 0; }
  .presentation-canvas-wrap,
  .presentation-stage { max-height: calc(100dvh - 145px); border-radius: 18px; }
  .presentation-ink-canvas { border-radius: 18px; }
  .presentation-stage .presentation-question,
  .presentation-stage .answer-screen,
  .presentation-stage .ranking-screen { min-height: auto; }
  .presentation-back { left: 0; }
  .presentation-next { right: 0; }
  .presentation-nav { width: 46px; height: 46px; }
  .presentation-hint { font-size: .7rem; }
}

/* Fluxo guiado do professor: questões primeiro, sala depois. */
.teacher-progress { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; }
.progress-step { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border: 1px solid #ffffff49; border-radius: 999px; color: #d0e6e5; font-size: .86rem; font-weight: 800; }
.progress-step b { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #ffffff30; color: #fff; }
.progress-step.current { background: #fff; border-color: #fff; color: #12535a; }
.progress-step.current b { background: #0f766e; color: #fff; }
.teacher-auth-status { grid-column: 1 / -1; margin: 0; padding: 0 4px; color: #e6f5f2; }
.teacher-auth-status.error { color: #ffe7df; }
.teacher-auth-status:empty { display: none; }
.step-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.step-footer p { flex: 1 1 100%; margin: 0; }
.step-footer .primary-btn { margin-left: auto; }
.room-setup-intro { padding: 14px 16px; border: 1px solid #dbe8e6; border-radius: 16px; background: #eff8f5; margin: 10px 0 18px; }
.room-panel h1 { margin: 0 0 10px; font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.03em; }
.room-setup-intro > p:first-child { font-weight: 800; color: #175e5c; }
.room-setup-intro input { margin-bottom: 5px; }
.room-setup-intro .text-btn { padding-left: 0; }
.optional-note { color: var(--muted); font-size: .8rem; font-weight: 500; }
.room-created .room-setup-intro { display: none; }
.room-created #createRoomBtn, .room-created .resume-panel { display: none; }
body:not(.room-created) .room-code-box,
body:not(.room-created) #startBtn,
body:not(.room-created) #nextBtn,
body:not(.room-created) #finishBtn,
body:not(.room-created) .room-panel > .small-note { display: none; }
body.room-created:not(.game-active) #nextBtn,
body.room-created:not(.game-active) #finishBtn { display: none; }
body.game-active #startBtn { display: none; }
body.game-finished #nextBtn, body.game-finished #finishBtn { display: none; }
body[data-teacher-step="questions"]:not(.game-active) .teacher-sidebar,
body[data-teacher-step="questions"]:not(.game-active) .live-panel { display: none; }
body[data-teacher-step="questions"]:not(.game-active) .teacher-grid { grid-template-columns: minmax(0, 1fr); }
body[data-teacher-step="questions"]:not(.game-active) .setup-panel { grid-column: 1; width: min(940px, 100%); margin: 0 auto; }
body[data-teacher-step="room"]:not(.game-active) .setup-panel { display: none; }
body[data-teacher-step="room"]:not(.room-created) .live-panel,
body[data-teacher-step="room"]:not(.room-created) .players-panel { display: none; }
body[data-teacher-step="room"]:not(.room-created) .teacher-grid { grid-template-columns: minmax(0, 1fr); }
body[data-teacher-step="room"]:not(.room-created) .teacher-sidebar { grid-column: 1; width: min(680px, 100%); margin: 0 auto; }
body.room-created:not(.game-active) .teacher-grid { grid-template-columns: minmax(0, 350px) minmax(0, 1fr); }
body.room-created:not(.game-active) .teacher-sidebar { grid-column: 1; grid-row: auto; }
body.room-created:not(.game-active) .live-panel { grid-column: 2; grid-row: auto; min-width: 0; }
body.game-active .teacher-progress, body.game-active .teacher-auth-status { display: none; }
@media (max-width: 900px) {
  body.room-created:not(.game-active) .teacher-grid { grid-template-columns: minmax(0, 1fr); }
  body.room-created:not(.game-active) .teacher-sidebar,
  body.room-created:not(.game-active) .live-panel { grid-column: 1; }
}
@media (max-width: 600px) {
  .teacher-progress { gap: 6px; }
  .progress-step { font-size: .75rem; padding: 8px 10px; }
  .step-footer .primary-btn { width: 100%; }
}

/* Biblioteca de quizzes e página pública. */
.library-shell { width: min(1080px, calc(100% - 32px)); }
.library-panel { padding: clamp(24px, 4vw, 48px); }
.library-panel h1 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.04em; }
.library-panel > p { max-width: 720px; line-height: 1.65; }
.library-guest { margin-top: 28px; padding: 24px; border: 1px solid #cbe6df; border-radius: 18px; background: #eff9f5; }
.library-guest h2 { margin: 0 0 8px; }
.library-account { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 20px; margin: 24px 0; border-radius: 16px; background: #edf7f4; }
.library-account span, .library-account small { display: block; color: var(--muted); }
.library-account strong { display: block; margin: 2px 0; }
.library-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.library-list-heading h2 { margin: 0; }
.saved-quiz-list { display: grid; gap: 14px; }
.saved-quiz-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px; border: 1px solid #dce9e7; border-radius: 18px; background: #fff; }
.saved-quiz-card h3 { margin: 0 0 6px; font-size: 1.18rem; overflow-wrap: anywhere; }
.saved-quiz-card p { margin: 0; font-size: .88rem; }
.saved-quiz-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.saved-quiz-actions .primary-btn, .saved-quiz-actions .secondary-btn, .saved-quiz-actions .danger-btn { padding: 10px 14px; border-radius: 11px; font-size: .83rem; }
.library-empty { padding: 28px; border: 1px dashed #b7d3ca; border-radius: 18px; text-align: center; background: #f7fbf9; }
.library-empty p { margin: 8px 0 16px; }
body.landing { display: block; }
.not-found-shell { max-width: 680px; margin: 12vh auto; }
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 17px 0; color: #fff; }
.public-header nav { display: flex; gap: 10px; flex-wrap: wrap; }
.public-header nav a { padding: 9px 12px; border-radius: 10px; font-weight: 750; }
.public-header nav a:hover { background: #ffffff22; }
.public-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.public-hero { padding: clamp(28px, 5vw, 62px) 0; color: #fff; }
.public-hero .brand-pill { background: #ffffff24; color: #e7f9f6; }
.public-hero h1 { max-width: 760px; margin: 17px 0; font-size: clamp(2.15rem, 3.5vw, 3.35rem); line-height: 1.09; letter-spacing: -.045em; }
.public-hero p { max-width: 650px; font-size: clamp(1rem, 1.45vw, 1.16rem); line-height: 1.65; color: #d3ece7; }
.public-hero .home-actions { justify-content: flex-start; }
.public-section { margin: 24px 0; padding: clamp(24px, 4vw, 42px); border-radius: 24px; background: #f8fbfa; }
.public-section h2 { margin: 0 0 20px; font-size: clamp(1.65rem, 3vw, 2.3rem); letter-spacing: -.035em; }
.public-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.public-steps article { padding: 20px; border: 1px solid #dbe9e6; border-radius: 16px; background: #fff; }
.public-steps b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #075f59; background: #dff4ec; }
.public-steps h3 { margin: 14px 0 7px; }
.public-steps p, .public-section p { line-height: 1.65; }
.public-faq details { padding: 14px 0; border-bottom: 1px solid #dce9e6; }
.public-faq summary { cursor: pointer; font-weight: 800; }
.public-faq details p { margin: 8px 0 0; }
.public-footer { width: min(1180px, calc(100% - 32px)); margin: 30px auto; color: #d5eae7; font-size: .87rem; }
@media (max-width: 700px) {
  .public-header { align-items: flex-start; flex-direction: column; }
  .public-steps { grid-template-columns: 1fr; }
  .saved-quiz-actions, .saved-quiz-actions > * { width: 100%; }
}

/* Entrada do professor e apresentação mais clara das ações principais. */
.skip-link { position: fixed; z-index: 10000; top: 12px; left: 12px; padding: 12px 16px; border-radius: 12px; color: #102a43; background: #fff; font-weight: 800; box-shadow: 0 8px 24px #00131f55; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.public-header nav .header-login { margin-left: 8px; padding: 10px 18px; border: 1px solid #ffffffa8; background: #ffffff14; }
.public-header nav .header-login:hover { background: #ffffff28; }
body:not(.game-active) #presentationBtn,
body:not(.game-active) #exportBtn { display: none; }
.file-drop { position: relative; }
.file-drop input { display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); }

.public-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.public-hero h1 { font-size: clamp(2.15rem, 3.5vw, 3.35rem); }
.hero-preview { padding: clamp(20px, 3vw, 30px); border: 1px solid #d6eae6; border-radius: 26px; background: #fff; color: var(--text); box-shadow: 0 24px 70px #001c2e66; transform: rotate(1deg); }
.hero-preview-top { display: flex; justify-content: space-between; gap: 10px; color: #365d69; font-size: .72rem; font-weight: 900; letter-spacing: .06em; }
.hero-preview-top span:last-child { padding: 5px 8px; border-radius: 999px; color: #0b5954; background: #e0f5ed; letter-spacing: 0; }
.hero-preview h2 { margin: 20px 0; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.2; letter-spacing: -.03em; }
.hero-preview-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-preview-options div { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #dce9e7; border-radius: 13px; background: #f7fbfa; font-weight: 750; }
.hero-preview-options b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #075985; background: #e0f2fe; }
.hero-preview-options div:nth-child(2) b { color: #9a3412; background: #ffedd5; }
.hero-preview-options div:nth-child(3) b { color: #0f766e; background: #dff4ec; }
.hero-preview-options div:nth-child(4) b { color: #173d52; background: #e7eff1; }
.hero-preview p { margin: 20px 0 0; color: var(--muted); font-size: .88rem; }

.teacher-home-shell { width: min(1060px, calc(100% - 32px)); margin: clamp(12px, 3vw, 40px) auto 48px; }
.teacher-home-shell .panel { padding: clamp(24px, 4.5vw, 52px); }
.teacher-home-shell h1 { margin: 8px 0 12px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.12; letter-spacing: -.045em; }
.welcome-lead { max-width: 680px; font-size: 1.08rem; line-height: 1.6; }
.welcome-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.welcome-option { display: flex; flex-direction: column; align-items: flex-start; min-height: 310px; padding: clamp(20px, 3vw, 30px); border: 1px solid #cde3de; border-radius: 20px; background: #eff9f5; }
.welcome-option.welcome-anonymous { background: #f3f8fb; border-color: #d1e5ee; }
.welcome-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #085f57; background: #d8f2e7; font-size: 1.5rem; font-weight: 900; }
.welcome-anonymous .welcome-icon { color: #075985; background: #dceff9; }
.welcome-option h2 { margin: 20px 0 8px; font-size: 1.5rem; }
.welcome-option p { flex: 1; line-height: 1.6; }
.welcome-option .primary-btn, .welcome-option .secondary-btn { min-height: 48px; }
.welcome-option small { display: block; margin-top: 12px; color: var(--muted); line-height: 1.5; }
.welcome-member-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; flex-wrap: wrap; }
.welcome-member-top > div:first-child { flex: 1 1 420px; }
.welcome-account { flex: 0 1 250px; padding: 16px 20px; border: 1px solid #d5e9e3; border-radius: 16px; background: #f3faf7; }
.welcome-account span, .welcome-account small { display: block; color: var(--muted); }
.welcome-account strong { display: block; margin: 4px 0; overflow-wrap: anywhere; }
.welcome-account .text-btn { margin-top: 8px; padding-left: 0; }
.welcome-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0 32px; }
.welcome-action { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid #d0e5e0; border-radius: 18px; background: #f7fbfa; transition: transform .12s ease, box-shadow .12s ease; }
.welcome-action:hover { transform: translateY(-2px); box-shadow: 0 12px 28px #123d4022; }
.welcome-action-primary { border-color: #b8dbd0; background: #eff9f5; }
.welcome-action strong { font-size: 1.2rem; }
.welcome-action small { color: var(--muted); line-height: 1.5; }
.welcome-recent-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.welcome-recent-heading h2 { margin: 0; }
.welcome-recent-list { display: grid; gap: 10px; margin-top: 14px; }
.welcome-recent-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border: 1px solid #dce9e7; border-radius: 15px; background: #fff; }
.welcome-recent-card h3 { margin: 0 0 5px; font-size: 1.06rem; text-transform: none; letter-spacing: 0; color: var(--text); overflow-wrap: anywhere; }
.welcome-recent-card p { margin: 0; font-size: .9rem; }
.welcome-recent-card .secondary-btn { padding: 10px 15px; border-radius: 11px; }
.import-short-guide { margin: 16px 0 4px; line-height: 1.6; }
.import-quick-actions { margin: 8px 0; }
.import-quick-actions + .format-guide { margin-top: 12px; }
@media (max-width: 850px) {
  .public-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-preview { max-width: 560px; transform: none; }
}
@media (max-width: 400px) {
  .public-hero h1 { font-size: 2.05rem; }
}
@media (max-width: 650px) {
  .welcome-options, .welcome-quick-actions { grid-template-columns: 1fr; }
  .welcome-option { min-height: auto; }
  .welcome-option p { flex: auto; }
  .welcome-recent-card .secondary-btn { width: 100%; }
}

/* Visual claro e navegação de conta para professores. */
body.student-page { background: radial-gradient(circle at 65% -10%, #245a68 0%, #173f50 46%, #102b3c 100%); }
.topbar, .public-header { color: var(--text); }
.logo, .presentation-brand, .student-brand { display: inline-flex; align-items: center; gap: 8px; }
.logo { font-weight: 800; letter-spacing: -.035em; }
.brand-mark { display: block; width: 78px; height: 71px; overflow: hidden; border-radius: 12px; background: transparent; flex: none; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.presentation-brand .brand-mark { width: 72px; height: 66px; border: 1px solid #ffffff2b; }
.student-brand { justify-content: center; width: max-content; margin: 0 auto 4px; color: var(--text); font-size: 1.05rem; font-weight: 800; letter-spacing: -.03em; }
.student-brand .brand-mark { width: 132px; height: 120px; border-radius: 18px; }
.student-page .student-brand { color: var(--text); }
.primary-btn, .secondary-btn, .ghost-btn, .danger-btn { min-height: 44px; border-radius: 12px; font-weight: 700; }
.primary-btn { box-shadow: 0 9px 20px #173d5224; }
.primary-btn:hover:not(:disabled) { background: var(--primary-dark); box-shadow: 0 12px 25px #173d5231; }
.ghost-btn { color: var(--text); background: #ffffffc7; border: 1px solid #d9dfec; }
.ghost-btn:hover:not(:disabled) { background: #fff; }
.panel, .public-section { background: #fff; border: 1px solid #e3e7f0; }
.panel h2, .public-section h2 { font-weight: 740; }
.section-eyebrow { color: #c63b20; font-weight: 800; }
.teacher-auth-status { color: var(--muted); }
.teacher-auth-status.error { color: var(--red); }
.teacher-progress .progress-step { border-color: #d9dfec; color: #596681; background: #ffffffad; }
.teacher-progress .progress-step b { color: #173d52; background: #e6eff1; }
.teacher-progress .progress-step.current { border-color: #173d52; color: #fff; background: #173d52; }
.teacher-progress .progress-step.current b { color: #173d52; background: #fff; }
.public-header nav a:hover { background: #fff0e9; }
.public-header nav .header-login { margin-left: 8px; color: #fff; border-color: #173d52; background: #173d52; }
.public-header nav .header-login:hover { color: #fff; background: #0d2c3d; }
.public-hero { color: var(--text); }
.public-hero .brand-pill { color: #a8321b; background: #fff0e9; }
.public-hero h1, .teacher-home-shell h1, .library-panel h1 { font-weight: 760; }
.public-hero p { color: var(--muted); }
.hero-preview { border-color: #e3e7f0; box-shadow: 0 25px 65px #35387620; transform: none; }
.hero-preview-top { color: #596681; }
.hero-preview-top span:last-child { color: #8f2a16; background: #fff0e9; }
.hero-preview-options div { border-color: #e1e6f0; background: #f9faff; }
.hero-preview p { color: var(--muted); }
.public-steps article { border-color: #e1e6f0; }
.public-steps b { color: #14283a; background: #f04a24; }
.public-footer { color: #52617c; }
.site-credit { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; font-size: .86rem; }
.teacher-home-page .site-credit, .library-shell + .site-credit, .teacher-credit { width: min(1060px, calc(100% - 32px)); justify-content: center; text-align: center; }
body.game-active .teacher-credit { display: none; }
.home-auth-status { width: min(1180px, calc(100% - 32px)); margin: 0 auto; color: var(--muted); }
.home-auth-status:empty { display: none; }

.welcome-option { border-color: #cfe1dc; background: #f2faf7; }
.welcome-option.welcome-anonymous { border-color: #f0d9ce; background: #fff7f2; }
.welcome-option h2, .welcome-action strong { font-weight: 740; }
.welcome-icon { color: #173d52; background: #e7eff1; }
.welcome-anonymous .welcome-icon { color: #a8321b; background: #ffe6da; }
.welcome-action { border-color: #d8e4e2; background: #f8fbfa; }
.welcome-action-primary { border-color: #f0d9ce; background: #fff7f2; }
.welcome-action:hover { box-shadow: 0 12px 25px #173d5218; }
.welcome-member-top { display: block; }
.welcome-member-top h1 { max-width: 850px; }
.welcome-member-top p { font-size: 1.05rem; }
.welcome-recent-card, .saved-quiz-card { border-color: #e0e5ef; }
.welcome-recent-card h3 { color: var(--text); }
.library-guest, .library-empty { border-color: #d3e3df; background: #f4faf8; }
.room-setup-intro { border-color: #f0d9ce; background: #fff8f4; }
.room-setup-intro > p:first-child { color: #a8321b; }
.room-code-box { border-color: #d3e3df; background: linear-gradient(135deg, #fff8f3, #eaf6f2); }
.input-modes { background: #eceff8; }
.mode-btn.active { color: #a8321b; }
.file-drop { color: #173d52; border-color: #9eb4bc; background: #f7faf9; }
.file-drop.dragging { border-color: #f04a24; background: #fff2ec; }
.upload-symbol { color: #173d52; background: #e7eff1; }
.format-guide { border-color: #e0e4f0; }
.format-guide summary, .text-btn { color: #a8321b; }
.text-btn:hover { background: #fff0e9; }
input:focus, textarea:focus, select:focus { border-color: #f04a24; box-shadow: 0 0 0 3px #f04a2420; }
:focus-visible, .file-drop:focus-within { outline-color: #f04a24; }
.presentation-overlay { color: #f7fbfc; background: radial-gradient(circle at 50% -20%, #245a68 0%, #173f50 50%, #102b3c 100%); }
.presentation-room { color: #e4e7ff; }
.presentation-hint { color: #dbe0ff; }

.ui-icon { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.account-menu { position: relative; z-index: 30; }
.account-menu summary { display: flex; align-items: center; gap: 6px; min-width: 56px; height: 48px; padding: 4px 8px 4px 4px; border: 1px solid #d9dfec; border-radius: 999px; background: #fff; cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { border-color: #9eb4bc; box-shadow: 0 6px 18px #173d5217; }
.account-avatar { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; color: #fff; background: #173d52; font-size: .95rem; font-weight: 800; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-chevron { width: 14px; height: 14px; color: #52617c; }
.account-menu[open] .account-chevron { transform: rotate(180deg); }
.account-popover { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 24px)); padding: 8px; border: 1px solid #e0e4f0; border-radius: 16px; background: #fff; box-shadow: 0 18px 45px #20294429; color: var(--text); }
.account-popover-user { padding: 12px 12px 14px; border-bottom: 1px solid #e6e9f1; }
.account-popover-user strong, .account-popover-user small { display: block; overflow-wrap: anywhere; }
.account-popover-user strong { font-size: .95rem; }
.account-popover-user small { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.account-popover a, .account-popover button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 9px 10px; border-radius: 9px; background: transparent; color: var(--text); font-size: .9rem; font-weight: 650; text-align: left; }
.account-popover a:hover, .account-popover button:hover:not(:disabled) { background: #f3f4ff; }
.account-popover button { cursor: pointer; }
.account-popover button .ui-icon, .account-popover a .ui-icon { width: 18px; height: 18px; color: #2c6674; }
.google-signin-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 16px; border: 1px solid #747775; border-radius: 999px; color: #1f1f1f; background: #fff; box-shadow: 0 4px 12px #20294412; font-family: 'Google Sans', Roboto, Arial, sans-serif; font-size: .9rem; font-weight: 650; }
.google-signin-btn::before { content: ''; display: block; width: 20px; height: 20px; flex: none; background: center / contain no-repeat url('https://developers.google.com/static/identity/images/g-logo.png'); }
.google-signin-btn:hover:not(:disabled) { color: #1f1f1f; background: #f7f8fb; border-color: #4f5251; box-shadow: 0 6px 15px #2029441a; }
@media (max-width: 700px) {
  .public-header nav { width: 100%; justify-content: flex-end; }
  .public-header nav .header-login { margin-left: 0; }
}
@media (max-width: 900px) {
  .topbar .top-actions { width: 100%; justify-content: flex-end; }
}

/* Identidade Vai de Quiz e vitrine pública. */
.topbar { min-height: 86px; height: auto; }
.topbar .brand-mark { width: 82px; height: 75px; }
.presentation-brand .brand-mark { width: 60px; height: 55px; }

body.landing {
  overflow-x: hidden;
  color: #14283a;
  background:
    radial-gradient(circle at 84% 7%, #f6c9b5 0, #f6c9b500 25%),
    radial-gradient(circle at 7% 30%, #dcebed 0, #dcebed00 27%),
    #fbfaf6;
}
.landing .public-header { position: relative; z-index: 10; padding: 12px 0; }
.landing .public-header .brand-mark { width: 118px; height: 108px; border-radius: 18px; box-shadow: 0 12px 30px #14283a12; }
.landing .public-header nav { align-items: center; }
.landing .public-header nav a { color: #263b49; font-size: .91rem; font-weight: 750; }
.landing .public-header nav a:hover { color: #14283a; background: #fff0e9; }
.landing .public-header nav .header-login { min-height: 44px; padding: 10px 18px; color: #fff; border: 1px solid #173d52; background: #173d52; box-shadow: 0 8px 18px #173d5220; }
.landing .public-header nav .header-login:hover { color: #fff; background: #0d2c3d; }
.landing .public-main { width: min(1180px, calc(100% - 32px)); }

.landing .public-hero { position: relative; grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr); gap: clamp(38px, 6vw, 78px); min-height: 560px; padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 7vw, 88px); }
.landing .public-hero::before { content: ''; position: absolute; z-index: -1; width: 260px; height: 260px; top: 0; left: -180px; border: 2px dashed #f04a2460; border-radius: 50%; }
.landing .public-hero-copy { min-width: 0; }
.landing .public-hero h1 { max-width: 700px; margin: 0 0 22px; color: #14283a; font-size: clamp(2.35rem, 3.8vw, 3.65rem); line-height: 1.04; font-weight: 850; letter-spacing: -.05em; text-wrap: balance; }
.landing .public-hero p { max-width: 635px; margin: 0; color: #4d6170; font-size: clamp(1.02rem, 1.45vw, 1.16rem); line-height: 1.7; }
.landing .home-actions { justify-content: flex-start; gap: 12px; margin-top: 28px; }
.landing .primary-btn { min-height: 50px; padding: 13px 21px; color: #fff; background: #173d52; box-shadow: 0 12px 26px #173d5230; }
.landing .primary-btn:hover:not(:disabled) { color: #fff; background: #0d2c3d; box-shadow: 0 15px 30px #173d523d; }
.landing .secondary-btn { min-height: 50px; padding: 12px 20px; color: #14283a; border: 1px solid #d7cfc0; background: #fff; }
.landing .secondary-btn:hover:not(:disabled) { border-color: #f04a24; background: #fff7f2; }
.hero-proof { display: flex; gap: 10px 20px; flex-wrap: wrap; padding: 0; margin: 24px 0 0; color: #526472; font-size: .85rem; list-style: none; }
.hero-proof li { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #14283a; background: #f5ad8d; font-size: .72rem; font-weight: 900; }

.landing .hero-preview { position: relative; z-index: 1; padding: clamp(24px, 3vw, 34px); border: 2px solid #173d52; border-radius: 26px; background: #fffefa; box-shadow: 13px 15px 0 #f04a24, 0 28px 65px #173d5224; transform: rotate(1.1deg); }
.landing .hero-preview::after { content: '?'; position: absolute; z-index: -1; top: -55px; right: -32px; display: grid; place-items: center; width: 82px; height: 82px; border-radius: 25px; color: #fff; background: #173d52; font-size: 2.4rem; font-weight: 900; transform: rotate(8deg); }
.landing .hero-preview-top { color: #536874; letter-spacing: .035em; }
.landing .hero-preview-top strong { color: #14283a; letter-spacing: .13em; }
.landing .hero-preview-top span:last-child { color: #87301e; background: #ffe8dc; }
.landing .hero-preview h2 { margin: 24px 0; color: #14283a; font-size: clamp(1.55rem, 2.45vw, 2.25rem); }
.landing .hero-preview-options div { position: relative; border-color: #dce4e5; background: #f8faf9; }
.landing .hero-preview-options .preview-selected { color: #14283a; border-color: #f04a24; background: #fff0e9; box-shadow: inset 0 0 0 1px #f04a24; }
.landing .hero-preview-options .preview-selected > span { margin-left: auto; color: #a8321b; font-weight: 900; }
.landing .hero-preview p { display: flex; align-items: center; gap: 9px; color: #586a75; }
.preview-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #f04a24; box-shadow: 0 0 0 5px #f04a2420; }

.feature-ribbon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 28px; overflow: hidden; border: 1px solid #dfd8ca; border-radius: 22px; background: #fff; box-shadow: 0 16px 42px #173d520d; }
.feature-ribbon article { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 22px 24px; }
.feature-ribbon article + article { border-left: 1px solid #e7e0d4; }
.feature-ribbon .feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #a8321b; background: #fff0e9; flex: none; }
.feature-ribbon article:nth-child(2) .feature-icon { color: #fff; background: #173d52; }
.feature-ribbon article:nth-child(3) .feature-icon { color: #14283a; background: #eee5d2; }
.feature-ribbon strong, .feature-ribbon small { display: block; }
.feature-ribbon strong { color: #14283a; font-size: .96rem; }
.feature-ribbon small { margin-top: 3px; color: #63737d; line-height: 1.4; }

.landing .public-section { margin: 28px 0; padding: clamp(30px, 4.5vw, 54px); border: 1px solid #e4ddd1; border-radius: 28px; background: #fff; box-shadow: 0 16px 45px #173d520b; }
.section-heading { max-width: 720px; margin-bottom: 28px; }
.section-heading > span, .section-tag, .public-cta > div > span { color: #c63b20; font-size: .75rem; font-weight: 900; letter-spacing: .12em; }
.landing .section-heading h2, .landing .reuse-copy h2, .landing .public-cta h2 { margin: 8px 0 10px; color: #14283a; font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; }
.landing .section-heading p { margin: 0; color: #5a6c77; }
.landing .public-steps { gap: 16px; }
.landing .public-steps article { position: relative; min-height: 224px; padding: 25px; overflow: hidden; border: 1px solid #dfe5e4; border-radius: 20px; background: #f9fbfa; }
.landing .public-steps article::after { content: ''; position: absolute; width: 78px; height: 78px; right: -34px; bottom: -35px; border-radius: 50%; background: #f04a2414; }
.landing .public-steps article:nth-child(2)::after { background: #173d5214; }
.landing .public-steps article:nth-child(3)::after { background: #d7c8aa35; }
.landing .public-steps b { width: 42px; height: 42px; border-radius: 13px; color: #14283a; background: #f5ad8d; }
.landing .public-steps article:nth-child(2) b { color: #fff; background: #173d52; }
.landing .public-steps article:nth-child(3) b { color: #14283a; background: #e9dfca; }
.landing .public-steps h3 { color: #14283a; font-size: 1.16rem; }
.landing .public-steps p { margin-bottom: 0; color: #5a6c77; }

.landing .reuse-section { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); align-items: center; gap: clamp(34px, 6vw, 74px); color: #fff; border-color: #173d52; background: #173d52; }
.landing .reuse-copy .section-tag { color: #ffd8c7; }
.landing .reuse-copy h2 { color: #fff; }
.landing .reuse-copy p { color: #d8e4e7; }
.landing .reuse-copy .secondary-btn { margin-top: 10px; color: #14283a; border-color: #fff; background: #fff; }
.library-preview { padding: 16px; border: 1px solid #ffffff38; border-radius: 22px; background: #f7f4ec; box-shadow: 12px 12px 0 #f04a24; color: #14283a; transform: rotate(-1deg); }
.library-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 5px 6px 15px; }
.library-preview-head span { font-weight: 850; }
.library-preview-head b { padding: 6px 9px; border-radius: 999px; color: #8f2a16; background: #ffe3d5; font-size: .72rem; }
.library-preview article { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e0ddd4; border-radius: 15px; background: #fff; }
.library-preview article + article { margin-top: 9px; }
.library-preview article strong, .library-preview article small { display: block; }
.library-preview article small { margin-top: 3px; color: #687984; }
.saved-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: #173d52; font-weight: 900; }
.saved-icon.orange { color: #14283a; background: #f5ad8d; }
.saved-icon.sand { color: #14283a; background: #e9dfca; }

.landing .public-faq { max-width: 900px; margin-left: auto; margin-right: auto; }
.landing .public-faq .section-heading { margin-bottom: 8px; }
.landing .public-faq details { padding: 18px 2px; border-bottom-color: #e7e0d4; }
.landing .public-faq summary { color: #14283a; font-size: 1.02rem; }
.landing .public-faq details p { color: #5a6c77; }

.public-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 28px 0; padding: clamp(30px, 4.5vw, 54px); overflow: hidden; border: 2px solid #14283a; border-radius: 28px; color: #071a25; background: #f04a24; box-shadow: 10px 10px 0 #173d52; }
.landing .public-cta h2 { max-width: 670px; margin-bottom: 0; color: #071a25; }
.landing .public-cta > div > span { color: #071a25; }
.landing .public-cta .home-actions { flex: none; margin: 0; }
.landing .public-cta .primary-btn { color: #fff; background: #14283a; }
.landing .public-cta .secondary-btn { color: #14283a; border-color: #14283a; background: #fff8ee; }

.landing-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 20px 0 30px; border-top: 1px solid #ded6c7; color: #536470; }
.footer-logo img { display: block; width: 76px; height: auto; border-radius: 11px; }
.landing-footer nav { display: flex; align-items: center; justify-content: center; gap: 9px 18px; flex-wrap: wrap; }
.landing-footer nav a { font-weight: 700; }
.landing-footer nav a:hover { color: #a8321b; }
.landing-footer > span { text-align: right; }

.legal-shell { width: min(860px, calc(100% - 32px)); margin: 24px auto 60px; padding: clamp(28px, 5vw, 58px); border: 1px solid #e4ddd1; border-radius: 28px; background: #fff; box-shadow: 0 18px 50px #173d520c; }
.legal-shell h1 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.045em; }
.legal-shell h2 { margin: 30px 0 8px; font-size: 1.25rem; }
.legal-shell p, .legal-shell li { color: #536470; line-height: 1.7; }
.legal-shell .legal-updated { color: #a8321b; font-size: .82rem; font-weight: 800; letter-spacing: .05em; }

@media (max-width: 920px) {
  .landing .public-hero { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .landing .hero-preview { max-width: 650px; }
  .landing .reuse-section { grid-template-columns: minmax(0, 1fr); }
  .public-cta { align-items: flex-start; flex-direction: column; }
  .landing .public-cta .home-actions { width: 100%; }
}
@media (max-width: 760px) {
  .feature-ribbon { grid-template-columns: 1fr; }
  .feature-ribbon article + article { border-top: 1px solid #e7e0d4; border-left: 0; }
  .landing-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .landing-footer > span { text-align: center; }
}
@media (max-width: 700px) {
  .landing .public-header { align-items: center; flex-direction: row; }
  .landing .public-header .brand-mark { width: 94px; height: 86px; border-radius: 14px; }
  .landing .public-header nav { width: auto; margin-left: auto; }
  .landing .public-header nav > a[href^="#"] { display: none; }
  .landing .public-header nav > a:not(.header-login) { padding: 9px 8px; }
  .landing .public-header nav .header-login { margin-left: 0; padding: 9px 13px; }
  .landing .public-hero { gap: 46px; padding-top: 26px; }
  .landing .public-hero h1 { font-size: clamp(2.25rem, 11vw, 3.1rem); }
  .landing .hero-preview { margin-right: 10px; box-shadow: 9px 10px 0 #f04a24, 0 22px 50px #173d521c; transform: none; }
  .landing .hero-preview::after { top: -42px; right: -18px; width: 64px; height: 64px; border-radius: 19px; font-size: 1.9rem; }
  .landing .home-actions > * { width: 100%; }
  .hero-proof { display: grid; grid-template-columns: 1fr; }
  .landing .public-section, .public-cta { border-radius: 22px; }
  .library-preview { box-shadow: 8px 8px 0 #f04a24; transform: none; }
}
@media (max-width: 390px) {
  .landing .public-header nav > a:not(.header-login) { font-size: .82rem; }
  .landing .public-header nav .header-login { font-size: .82rem; }
  .landing .hero-preview-options { grid-template-columns: 1fr; }
  .landing .public-hero h1 { font-size: 2.16rem; }
  .library-preview article { grid-template-columns: 38px 1fr; }
  .library-preview article > span:last-child { display: none; }
}
