/* DM Sans (OFL 1.1), em WOFF2. Declarada aqui e não por @import: um @import faz o navegador descobrir as fontes só depois de baixar um segundo CSS. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/dm-sans-0.woff2) format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/dm-sans-1.woff2) format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(assets/fonts/dm-sans-2.woff2) format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/dm-sans-3.woff2) format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(assets/fonts/dm-sans-4.woff2) format("woff2");
}
:root {
  color-scheme: dark;
  --bg: #101426;
  --panel: #191f35;
  --panel2: #222a43;
  --line: #35405b;
  --muted: #b7bfd2;
  --text: #f6f7fc;
  --lime: #d3f66b;
  --aqua: #8cddd5;
  --danger: #ffaaa5;
  --warn: #e7c077;
  --warn-text: #f3d79c;
  --warn-wash: #e7c0770f;
  --radius: 24px;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 5px;
}
button {
  border: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  hyphens: auto;
}
h1 {
  font-size: clamp(2.5rem, 5.3vw, 5rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}
h3 {
  font-size: 1.3rem;
}
p {
  color: var(--muted);
}
.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;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  padding: 12px;
  background: var(--lime);
  color: var(--bg);
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.site-header {
  max-width: 1440px;
  margin: auto;
  padding: 25px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid #ffffff10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 1.05;
}
.brand strong {
  display: block;
  color: var(--lime);
  font-size: 1.1rem;
  letter-spacing: 0.13em;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--lime);
  color: var(--bg);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.13em;
  transform: rotate(-7deg);
}
.brand-mark span {
  font-size: 1.8rem;
  align-self: flex-start;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
}
.site-header nav button {
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  padding: 12px 18px;
  font-size: 0.95rem;
  border-radius: 12px;
}
.site-header nav button[aria-current="page"] {
  color: var(--lime);
  background: #d3f66b0c;
}
.header-end {
  display: flex;
  align-items: center;
  gap: 22px;
}
.ncs {
  font-size: 0.75rem;
  color: var(--muted);
}
.ncs strong {
  margin-left: 7px;
  color: var(--text);
  font-size: 1.15rem;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  font-size: 1.2rem;
}
main {
  max-width: 1344px;
  min-height: 70vh;
  margin: auto;
  padding: 44px 32px 64px;
  outline: none;
}
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--aqua);
  display: block;
  margin-bottom: 20px;
}
.welcome {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 30px;
  align-items: center;
  min-height: 450px;
}
.welcome-copy {
  padding: 16px 0 26px;
}
.welcome h1 em {
  font-style: normal;
  color: var(--lime);
}
.welcome-copy > p {
  font-size: 1.1rem;
  max-width: 430px;
  margin: 24px 0 28px;
}
.primary {
  max-width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border-radius: 13px;
  background: var(--lime);
  color: var(--bg);
  font-weight: 750;
  padding: 16px 24px;
  min-height: 54px;
  text-decoration: none;
  transition:
    transform 0.15s,
    background 0.15s;
}
@media (hover: hover) {
  .primary:hover {
    background: #e1ff91;
    transform: translateY(-2px);
  }
}
.primary span:last-child {
  font-size: 1.3rem;
}
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-decoration: none;
  font-weight: 600;
}
@media (hover: hover) {
  .secondary:hover {
    background: var(--panel2);
  }
}
.text-button {
  background: none;
  color: var(--aqua);
  padding: 10px 0;
  text-align: left;
}
.button-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.play-note {
  display: flex;
  gap: 18px;
  margin-top: 17px;
  font-size: 0.82rem;
  color: var(--muted);
}
.world-panel {
  min-height: 420px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 32px;
  background: radial-gradient(ellipse at 50% 55%, #293644aa, transparent 69%);
  overflow: hidden;
}
.world-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
}
.world-caption {
  position: absolute;
  bottom: 13px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}
.world-caption strong {
  color: var(--text);
}
.world-tag {
  border: 1px solid #697f6a66;
  background: #202f2ad9;
  border-radius: 100px;
  padding: 7px 14px;
  color: var(--lime);
  font-size: 0.8rem;
}
.orbit {
  width: 300px;
  height: 300px;
  border: 20px dotted var(--lime);
  border-radius: 50%;
  opacity: 0.2;
}
.section-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin: 28px 0 20px;
}
.section-bar h2 {
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}
.section-bar p {
  font-size: 0.87rem;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.mode-card {
  text-align: left;
  background: var(--panel);
  border: 1px solid #ffffff10;
  border-radius: 20px;
  padding: 25px;
  min-height: 165px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition:
    background 0.2s,
    border-color 0.2s;
}
@media (hover: hover) {
  .mode-card:hover {
    background: var(--panel2);
    border-color: var(--line);
  }
}
.mode-card h3 {
  letter-spacing: -0.02em;
}
.mode-card p {
  font-size: 0.95rem;
  max-width: 28ch;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mode-icon {
  font-size: 1.35rem;
  color: var(--lime);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.card-arrow {
  position: absolute;
  right: 24px;
  top: 30px;
  font-size: 1.3rem;
  color: var(--muted);
}
.mode-label {
  font-size: 0.75rem;
  color: var(--aqua);
}
.sdg-strip {
  display: flex;
  gap: 4px;
  margin-top: 34px;
}
.sdg-strip span {
  height: 5px;
  flex: 1;
  border-radius: 3px;
}
.site-footer {
  max-width: 1344px;
  margin: auto;
  padding: 22px 32px 28px;
  border-top: 1px solid #ffffff12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.75rem;
  color: var(--muted);
}
.site-footer div {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.site-footer button {
  background: none;
  font-size: inherit;
  padding: 7px 0;
}
.site-footer a {
  display: inline-block;
  padding: 7px 0;
  text-decoration: none;
}
.footer-dot {
  margin: 0 8px;
}
.page-head {
  margin-bottom: 30px;
  max-width: 760px;
}
.page-head p {
  margin-top: 15px;
  font-size: 1.08rem;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.no-script {
  padding: 30px;
}
.pill {
  display: inline-block;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 13px;
  font-size: 0.8rem;
  color: var(--muted);
}
@media (max-width: 1000px) {
  .site-header {
    padding: 20px 28px;
  }
  .header-end .ncs {
    display: none;
  }
  .welcome {
    min-height: 400px;
  }
  .world-panel {
    min-height: 380px;
  }
  .welcome h1 {
    font-size: 3.5rem;
  }
  .mode-card {
    padding: 20px;
  }
  .site-footer {
    align-items: start;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  .site-header {
    padding: 18px 20px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 1.25rem;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
  }
  .site-header nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    margin-top: 8px;
  }
  .site-header nav button {
    padding: 10px 13px;
    font-size: 0.9rem;
  }
  .header-end {
    margin-left: auto;
  }
  main {
    padding: 24px 20px 40px;
  }
  .welcome {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
  }
  .welcome-copy {
    padding: 5px 0 0;
  }
  .welcome h1 {
    font-size: clamp(2.7rem, 10vw, 4rem);
  }
  .eyebrow {
    margin-bottom: 14px;
  }
  .welcome-copy > p {
    margin: 18px 0 22px;
    font-size: 1rem;
  }
  .world-panel {
    min-height: 285px;
    max-width: 470px;
    width: 100%;
    margin: auto;
  }
  .mode-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .mode-card {
    min-height: 130px;
  }
  .mode-card p {
    max-width: none;
    margin-right: 16px;
  }
  .section-bar {
    margin-top: 20px;
  }
  .section-bar p {
    display: none;
  }
  .site-footer {
    padding: 20px;
    line-height: 1.8;
  }
  .site-footer div {
    gap: 14px;
  }
  .primary {
    padding: 15px 20px;
  }
  .world-caption {
    bottom: 0;
    left: 8px;
    right: 8px;
  }
  .sdg-strip {
    margin-top: 26px;
  }
  .page-head h1 {
    font-size: 2.4rem;
  }
  .panel {
    padding: 22px;
  }
}
.lime {
  color: var(--lime);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.85rem;
}
.danger {
  color: var(--danger);
}
[hidden] {
  display: none !important;
}
.large-text {
  font-size: 19px;
}
.reduce-motion * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
.sharing-choice {
  width: min(480px, calc(100% - 24px));
  padding: 24px;
}
.sharing-choice h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 12px;
}
.sharing-choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sharing-choice-actions button {
  width: 100%;
  justify-content: center;
}
.sharing-choice a {
  color: var(--lime);
}
.storage-warning {
  padding: 12px 24px;
  background: #48391f;
  color: #ffe6ae;
  font-size: 0.9rem;
  text-align: center;
}
.in-game main {
  padding-top: 22px;
}
.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 23px;
}
.streak-chip {
  display: inline-block;
  background: var(--panel2);
  border: 1px solid var(--lime);
  border-radius: 100px;
  padding: 4px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lime);
  white-space: nowrap;
}
.toolbar-score {
  color: var(--muted);
  font-size: 0.9rem;
}
.toolbar-score strong {
  font-size: 1.3rem;
  color: var(--lime);
  margin-right: 5px;
}
.play-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
}
.journey-panel {
  border-right: 1px solid #ffffff12;
  padding-right: 27px;
}
.journey-heading .eyebrow {
  font-size: 0.75rem;
  margin-bottom: 13px;
}
.journey-heading h2 {
  font-size: 2.3rem;
}
.journey-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0 2px;
}
.chapter-list {
  list-style: none;
  margin: 18px 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.chapter-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 13px 12px;
  border-radius: 12px;
}
.chapter-list li > span:first-child {
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.chapter-list li.active {
  background: #d3f66b0b;
  color: var(--lime);
}
.chapter-list li.active > span:first-child {
  background: var(--lime);
  color: var(--bg);
  border-color: var(--lime);
}
.chapter-list li.done {
  color: var(--aqua);
}
.streak {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.streak > span {
  font-size: 1.5rem;
  color: var(--lime);
}
.streak strong {
  font-size: 0.87rem;
  font-weight: 600;
}
.streak p {
  font-size: 0.8rem;
  margin-top: 5px;
}
.question-area {
  min-width: 0;
}
.question-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.question-topline strong {
  color: var(--text);
}
.timer {
  font-size: 0.85rem;
  letter-spacing: 0;
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 100px;
}
.timer.urgent {
  color: var(--danger);
  border-color: var(--danger);
}
.round-progress {
  display: flex;
  gap: 5px;
  margin: 15px 0 28px;
}
.round-progress span {
  height: 5px;
  border-radius: 3px;
  flex: 1;
  background: #323b54;
}
.round-progress span.current {
  background: var(--lime);
}
.round-progress span.correct {
  background: var(--aqua);
}
.round-progress span.visited {
  background: #ad99cc;
}
.question-content {
  animation: appear 0.25s ease-out;
}
.question-category {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 19px;
}
.goal-badge {
  display: inline-block;
  white-space: nowrap;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-left: 5px solid var(--goal-color);
  border-radius: 7px;
  color: var(--text);
  font-weight: 700;
  padding: 6px 10px;
}
.question-content h1 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.36;
  font-weight: 650;
  outline: none;
  hyphens: manual;
  overflow-wrap: break-word;
  text-wrap: pretty;
  max-width: 880px;
}
.question-instruction {
  font-size: 0.88rem;
  margin-top: 13px;
  margin-bottom: 23px;
}
.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.answer {
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid #4a5672;
  border-radius: 15px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
  min-height: 74px;
  transition:
    border-color 0.12s,
    background 0.12s;
}
@media (hover: hover) {
  .answer:hover:not(:disabled) {
    border-color: var(--aqua);
    background: #212d43;
  }
}
.answer.selected {
  background: #d3f66b0c;
  border-color: var(--lime);
}
.answer-key {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid #606d89;
  color: var(--muted);
  border-radius: 9px;
  font-size: 0.9rem;
}
.answer.selected .answer-key {
  background: var(--lime);
  color: var(--bg);
  border-color: var(--lime);
}
.answer:disabled {
  opacity: 1;
}
.answer.is-correct {
  border-color: var(--aqua);
  background: #8cddd510;
}
.answer.is-correct .answer-key {
  background: var(--aqua);
  border-color: var(--aqua);
  color: var(--bg);
}
.answer.is-wrong {
  border-color: var(--danger);
  background: #ffaaa509;
}
.answer-status {
  font-size: 0.75rem;
  white-space: nowrap;
  margin-left: auto;
  font-weight: 700;
  color: var(--muted);
}
.answer.is-correct .answer-status {
  color: var(--aqua);
}
.answer.is-wrong .answer-status {
  color: var(--danger);
}
.answer.eliminated {
  opacity: 0.45;
}
.decision-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.helps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.help-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  font-size: 0.8rem;
  white-space: nowrap;
}
@media (hover: hover) {
  .help-button:hover:not(:disabled) {
    border-color: var(--muted);
  }
}
.help-button span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  background: var(--panel2);
  border-radius: 5px;
  margin-left: 4px;
  font-size: 0.75rem;
}
.keyboard-note {
  font-size: 0.75rem;
  margin-top: 20px;
  color: #a1acc3;
}
.hint {
  background: #e7c0770a;
  border-left: 3px solid #e7c077;
  border-radius: 0 12px 12px 0;
  padding: 15px 18px;
  margin-top: 18px;
}
.hint strong {
  font-size: 0.86rem;
  color: #e7c077;
}
.hint p {
  font-size: 0.94rem;
  margin-top: 5px;
}
/* Cravada: one more decision under the alternatives. It sits in the page
   flow, outside the fixed action bar of small screens. */
.bold-row {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.bold-toggle {
  flex: 0 1 auto;
  max-width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
}
@media (hover: hover) {
  .bold-toggle:hover:not(:disabled) {
    border-color: var(--muted);
  }
}
.bold-toggle[aria-pressed="true"] {
  border-color: var(--lime);
  background: var(--panel2);
  color: var(--lime);
}
.bold-left {
  display: inline-grid;
  place-items: center;
  min-width: 1.5em;
  height: 1.5em;
  background: var(--panel2);
  border-radius: 5px;
  margin-left: 4px;
  font-size: 0.75rem;
}
.bold-toggle[aria-pressed="true"] .bold-left {
  background: var(--lime);
  color: var(--bg);
}
.bold-note {
  flex: 1 1 220px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.feedback {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid #c2b0e6;
  border-radius: 15px;
  padding: 22px;
  margin-top: 20px;
  outline: none;
}
.feedback.positive {
  border-left-color: var(--aqua);
}
.feedback-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 12px;
}
/* Side by side only where the heading is a row; in the stacked mobile
   layout a flex-basis would become a height. */
@media (min-width: 551px) {
  .feedback-heading h2 {
    flex: 1 1 14rem;
  }
}
.feedback h2 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.feedback-points {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}
.feedback-points strong {
  color: var(--lime);
  white-space: nowrap;
  font-size: 0.9rem;
}
.points-detail {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.feedback p {
  font-size: 0.94rem;
  line-height: 1.65;
}
.selected-feedback {
  margin-bottom: 12px;
  color: #e0cee8;
}
.source-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
  font-size: 0.78rem;
  color: var(--aqua);
}
.source-row a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.next-button {
  margin-top: 20px;
  float: right;
}
.question-content:after {
  content: "";
  display: table;
  clear: both;
}
dialog {
  color: var(--text);
  background: #1b2238;
  border: 1px solid #4a5672;
  border-radius: 24px;
  padding: 30px;
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 36px);
  box-shadow: 0 30px 100px #0008;
}
dialog::backdrop {
  background: #070a17b8;
  backdrop-filter: blur(7px);
}
.modal-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.modal-heading h2 {
  font-size: 1.9rem;
  line-height: 1.18;
}
.modal-heading .icon-button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
dialog > p {
  font-size: 0.97rem;
  margin-bottom: 24px;
}
dialog .button-row {
  margin-top: 22px;
}
dialog .primary,
dialog .secondary {
  font-size: 0.94rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid > label {
  font-size: 0.85rem;
  font-weight: 600;
}
.form-grid select {
  width: 100%;
  margin-top: 8px;
}
.pace-picker {
  border: 0;
  padding: 0;
  margin: 6px 0;
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pace-picker legend {
  font-size: 0.85rem;
  padding: 0 0 12px;
}
.pace-picker label {
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 15px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: start;
  background: #10142666;
}
.pace-picker label:has(:checked) {
  border-color: var(--lime);
}
.pace-picker strong {
  display: block;
  font-size: 0.95rem;
}
.pace-picker small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}
.pace-picker input {
  margin-top: 5px;
  accent-color: var(--lime);
}
.brief-rules {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  padding: 16px 0;
  color: var(--aqua);
  flex-wrap: wrap;
}
.modal-start {
  width: 100%;
  margin-top: 24px;
}
.pause-score {
  display: flex;
  flex-direction: column;
  margin: 28px 0;
  align-items: center;
}
.pause-score strong {
  font-size: 3.2rem;
  color: var(--lime);
}
.pause-score span {
  color: var(--muted);
}
.settings-list {
  display: flex;
  flex-direction: column;
  margin: 12px 0 24px;
}
.settings-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.settings-list strong {
  font-size: 1rem;
}
.settings-list small {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 3px;
}
.settings-list input {
  width: 23px;
  height: 23px;
  accent-color: var(--lime);
  flex-shrink: 0;
}
.settings-heading {
  margin-bottom: 9px;
  font-size: 1.1rem;
}
.file-label {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.file-label:focus-within {
  outline: 3px solid var(--aqua);
  outline-offset: 4px;
}
.file-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.danger-button {
  padding: 12px 17px;
  border-radius: 12px;
  background: var(--danger);
  color: var(--bg);
  font-weight: 700;
}
#import-status {
  margin-top: 16px;
}
input[type="search"],
select {
  background: var(--panel);
  border: 1px solid #586582;
  border-radius: 12px;
  color: var(--text);
  padding: 13px 15px;
  min-height: 48px;
  max-width: 100%;
}
input::placeholder {
  color: #aeb8cb;
}
.filter-row {
  display: flex;
  gap: 14px;
  margin: 28px 0;
}
.filter-row input {
  flex: 1;
  min-width: 0;
}
.filter-row select {
  width: 230px;
}
.goals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.goal-card {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--panel);
  text-align: left;
  padding: 23px;
  border: 1px solid #ffffff14;
  border-top: 3px solid var(--goal-color);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
}
@media (hover: hover) {
  .goal-card:hover {
    background: var(--panel2);
  }
}
.goal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.goal-number {
  font-size: 2.1rem;
  font-weight: 750;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.07em;
}
.goal-card-top > span:last-child {
  font-size: 0.75rem;
  color: var(--muted);
}
.goal-card .earned {
  color: var(--aqua) !important;
}
.goal-card h2 {
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  min-height: 2.5em;
}
.goal-card p {
  font-size: 0.9rem;
  margin: 11px 0 23px;
}
.goal-cta {
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  color: var(--aqua);
  margin-top: auto;
}
.goal-cta span {
  font-size: 1.2rem;
}
.empty-note {
  padding: 40px;
  text-align: center;
}
.goal-detail-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 35px;
  margin: 25px 0 40px;
}
.goal-detail-head > div {
  min-width: 0;
}
.giant-number {
  font-size: 10rem;
  font-weight: 800;
  letter-spacing: -0.09em;
  border-bottom: 7px solid var(--goal-color);
  line-height: 1.1;
  padding-bottom: 10px;
  color: var(--text);
}
.goal-detail-head h1 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  max-width: 780px;
}
.goal-detail-head p {
  margin: 18px 0;
}
.goal-detail-head .eyebrow {
  margin-bottom: 14px;
}
.action-card {
  background: #1b2c30;
  border: 1px solid #53766e;
  border-radius: 20px;
  padding: 28px;
  margin: 25px 0 35px;
}
.action-card .eyebrow {
  margin-bottom: 12px;
  font-size: 0.75rem;
}
.action-card h2 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.action-card p {
  color: #c3dbd4;
  margin-top: 12px;
  max-width: 85ch;
}
.reading-intro {
  margin-bottom: 20px;
}
.reading-list,
.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reading-item,
.review-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
}
.reading-item summary,
.review-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  font-size: 1rem;
  font-weight: 600;
}
.reading-item summary::-webkit-details-marker,
.review-item summary::-webkit-details-marker {
  display: none;
}
.reading-item[open] summary {
  border-bottom: 1px solid var(--line);
}
.reading-item > h3 {
  margin: 22px;
  line-height: 1.5;
  letter-spacing: -0.015em;
  font-size: 1.2rem;
}
.reading-item ul {
  margin: 22px;
  padding-left: 24px;
  color: var(--muted);
}
.reading-item li {
  padding: 5px;
}
.reading-answer {
  margin: 22px;
  padding: 20px;
  background: #8cddd50b;
  border-left: 3px solid var(--aqua);
}
.reading-answer > strong {
  color: var(--aqua);
}
.reading-answer p {
  margin-top: 8px;
}
.reading-item > .source-row {
  margin: 22px;
}
.result-hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: center;
  gap: 40px;
  margin: 15px 0 40px;
}
.result-hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
}
.result-hero p {
  font-size: 1.1rem;
  margin: 23px 0;
}
.score-medallion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #d3f66b66;
  box-shadow:
    inset 0 0 0 12px var(--bg),
    inset 0 0 0 13px #d3f66b33;
  background: radial-gradient(ellipse, #d3f66b0b, transparent);
  color: var(--muted);
  font-size: 0.9rem;
}
.score-medallion > span:first-child {
  font-size: 2.5rem;
  color: var(--lime);
  line-height: 1.3;
}
.score-medallion strong {
  font-size: 3.8rem;
  color: var(--lime);
  letter-spacing: -0.05em;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  margin: 25px 0 35px;
}
.result-stats > div {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-right: 1px solid var(--line);
}
.result-stats > div:last-child {
  border-right: 0;
}
.result-stats strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.result-stats small {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0;
}
.result-stats span {
  font-size: 0.85rem;
  color: var(--muted);
}
.action-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.action-split > button {
  flex-shrink: 0;
}
.review-status {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #c2b0e60e;
  color: #c2b0e6;
  border: 1px solid #c2b0e64d;
  border-radius: 50%;
  flex-shrink: 0;
}
.review-status.correct {
  color: var(--aqua);
  background: #8cddd50b;
  border-color: #8cddd550;
}
.review-item summary > span:nth-child(2) {
  margin-right: auto;
}
.review-item summary strong {
  display: block;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.4;
  margin-top: 4px;
}
.review-points {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.review-body {
  padding: 0 24px 24px 76px;
}
.review-body h3 {
  font-size: 1.14rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 5px 0 18px;
}
.review-body p {
  margin: 13px 0;
  font-size: 0.95rem;
}
.correct-copy {
  color: var(--aqua);
}
.result-note {
  font-size: 0.8rem;
  max-width: 85ch;
  margin-top: 28px;
  color: var(--muted);
}
.passport {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.stamp {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 19px 14px;
  min-height: 170px;
  background: var(--panel);
  border: 1px dashed #59627a;
  border-radius: 15px;
  text-align: left;
  color: var(--muted);
}
.stamp > span {
  font-size: 2rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.05em;
}
.stamp > strong {
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.stamp > small {
  margin-top: auto;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.stamp.unlocked {
  border-style: solid;
  border-color: var(--goal-color);
  border-top-width: 5px;
  background: var(--panel2);
  color: var(--text);
}
.stamp.unlocked > small {
  color: var(--aqua);
}
@media (hover: hover) {
  .stamp:hover {
    background: var(--panel2);
  }
}
.history-list {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 20px;
  width: 100%;
  padding: 19px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.history-item:last-child {
  border-bottom: 0;
}
@media (hover: hover) {
  .history-item:hover {
    background: var(--panel2);
  }
}
.history-item small {
  display: block;
  font-size: 0.8rem;
  margin-top: 4px;
  color: var(--muted);
}
.history-item > span:nth-child(2) {
  font-size: 0.9rem;
  color: var(--muted);
}
.history-item > strong {
  color: var(--lime);
  white-space: nowrap;
  font-size: 0.9rem;
}
.empty-state {
  text-align: center;
  max-width: 760px;
  padding: 45px 25px;
  margin: auto;
}
.empty-state > span {
  font-size: 3rem;
  color: var(--aqua);
  margin-bottom: 16px;
  display: block;
}
.empty-state h2 {
  font-size: 1.6rem;
  line-height: 1.3;
}
.empty-state p {
  margin: 20px 0 26px;
}
.legacy-note {
  padding: 24px;
  background: var(--panel);
  border-radius: 16px;
  margin-top: 24px;
}
.legacy-note h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.prose {
  max-width: 870px;
  margin: 10px auto;
}
.prose h1 {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
}
.prose .lead {
  font-size: 1.17rem;
  margin: 26px 0 30px;
  line-height: 1.7;
}
.prose h2 {
  font-size: 1.65rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 36px 0 17px;
}
.prose p {
  margin: 16px 0;
  line-height: 1.8;
}
.prose p > a {
  color: var(--aqua);
}
.prose ul,
.prose ol {
  padding-left: 25px;
  color: var(--muted);
}
.prose li {
  padding: 7px 0;
  line-height: 1.7;
}
.lesson-plan strong {
  color: var(--text);
}
.source-summary {
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.source-summary strong {
  color: var(--lime);
  font-size: 1.4rem;
}
.source-summary span {
  color: var(--muted);
  font-size: 0.85rem;
}
.source-goals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}
.source-goals a {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px;
  font-size: 0.86rem;
}
.source-goals a span {
  color: var(--aqua);
  font-size: 1rem;
  font-weight: 700;
}
@media (hover: hover) {
  .source-goals a:hover {
    background: var(--panel2);
  }
}
@keyframes appear {
  from {
    transform: translateY(7px);
  }
  to {
    transform: none;
  }
}
@media (max-width: 1100px) {
  .play-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 26px;
  }
  .journey-panel {
    padding-right: 20px;
  }
  .journey-heading h2 {
    font-size: 2rem;
  }
  .chapter-list li {
    padding: 10px 0;
    font-size: 0.8rem;
  }
  .decision-row {
    align-items: stretch;
  }
  .decision-row > .primary {
    margin-left: auto;
  }
  .passport {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .result-hero {
    grid-template-columns: 1fr 235px;
  }
  .score-medallion strong {
    font-size: 3rem;
  }
  .result-stats > div {
    padding: 22px 18px;
  }
  .goals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 800px) {
  .play-layout {
    grid-template-columns: 1fr;
  }
  .journey-panel {
    display: none;
  }
  .in-game .site-header nav {
    display: none;
  }
  .in-game .site-header {
    flex-wrap: nowrap;
  }
  .question-content h1 {
    font-size: 1.6rem;
  }
  .goals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-hero {
    grid-template-columns: 1fr 180px;
    gap: 25px;
  }
  .score-medallion strong {
    font-size: 2.5rem;
  }
  .score-medallion > span:last-child {
    font-size: 0.75rem;
  }
  .goal-detail-head {
    grid-template-columns: 140px 1fr;
    gap: 25px;
  }
  .giant-number {
    font-size: 7rem;
  }
  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-stats > div:nth-child(2) {
    border-right: 0;
  }
  .result-stats > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .action-split {
    flex-direction: column;
    align-items: start;
  }
  .passport {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 550px) {
  .game-toolbar {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }
  .game-toolbar .pill {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
  /* One row: during a streak the chip takes the mode label's place. */
  .game-toolbar:has(.streak-chip) .pill {
    display: none;
  }
  .game-toolbar .text-button {
    font-size: 0.85rem;
  }
  .toolbar-score {
    font-size: 0.75rem;
  }
  .toolbar-score strong {
    font-size: 1rem;
  }
  .question-category {
    font-size: 0.75rem;
    align-items: start;
  }
  .question-category > span:last-child {
    padding-top: 5px;
  }
  .question-content h1 {
    font-size: 1.4rem;
    line-height: 1.42;
  }
  .question-instruction {
    font-size: 0.8rem;
  }
  .round-progress {
    margin: 12px 0 20px;
  }
  .answer {
    padding: 15px 12px;
    gap: 10px;
    font-size: 0.94rem;
    flex-wrap: wrap;
  }
  .answer > span:nth-child(2) {
    flex: 1;
    min-width: 0;
  }
  .answer-key {
    flex-basis: 29px;
    width: 29px;
    height: 29px;
    border-radius: 7px;
    font-size: 0.8rem;
  }
  .answer-status {
    flex-basis: 100%;
    padding-left: 39px;
  }
  .decision-row {
    gap: 16px;
    margin-top: 20px;
  }
  .helps {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }
  .help-button {
    padding: 10px 8px;
    font-size: 0.75rem;
  }
  .help-button span {
    margin-left: 0;
  }
  .decision-row > .primary,
  .next-button {
    width: 100%;
    float: none;
    min-height: 52px;
  }
  .keyboard-note {
    display: none;
  }
  .feedback {
    padding: 17px;
  }
  .feedback-heading {
    flex-direction: column;
    gap: 9px;
  }
  .feedback-points {
    justify-items: start;
    text-align: left;
  }
  .feedback h2 {
    font-size: 1.1rem;
  }
  .feedback p {
    font-size: 0.9rem;
  }
  .source-row {
    font-size: 0.75rem;
  }
  .goals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .goal-card {
    padding: 17px 13px;
  }
  .goal-card h2 {
    font-size: 1rem;
  }
  .goal-card p {
    font-size: 0.8rem;
  }
  .goal-card-top {
    flex-direction: column;
    align-items: start;
    gap: 10px;
    margin-bottom: 13px;
  }
  .goal-card-top > span:last-child {
    font-size: 0.75rem;
  }
  .goal-number {
    font-size: 1.7rem;
  }
  .goal-cta {
    font-size: 0.75rem;
  }
  .filter-row {
    flex-direction: column;
  }
  .filter-row select {
    width: 100%;
  }
  .goal-detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 15px;
  }
  .giant-number {
    font-size: 4rem;
    width: 110px;
    padding-bottom: 8px;
  }
  .goal-detail-head h1 {
    font-size: 2.2rem;
  }
  .goal-detail-head p {
    font-size: 0.95rem;
  }
  .action-card {
    padding: 22px;
  }
  .action-card h2 {
    font-size: 1.3rem;
  }
  .action-card p {
    font-size: 0.94rem;
  }
  .reading-item summary {
    padding: 18px;
    font-size: 0.93rem;
  }
  .reading-item > h3 {
    margin: 18px;
    font-size: 1.05rem;
  }
  .reading-item ul {
    margin: 18px;
    font-size: 0.9rem;
  }
  .reading-answer {
    margin: 18px;
    padding: 14px;
    font-size: 0.9rem;
  }
  .reading-item > .source-row {
    margin: 18px;
  }
  .result-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .result-hero h1 {
    font-size: 2.4rem;
  }
  .result-hero p {
    font-size: 1rem;
  }
  .score-medallion {
    width: 200px;
    margin: 10px auto;
  }
  .result-stats > div {
    padding: 20px 16px;
  }
  .result-stats span {
    font-size: 0.76rem;
  }
  .result-stats strong {
    font-size: 1.8rem;
  }
  .review-item summary {
    padding: 17px 14px;
    gap: 10px;
  }
  .review-item summary strong {
    font-size: 0.9rem;
  }
  .review-item .small {
    font-size: 0.75rem;
  }
  .review-status {
    width: 30px;
    height: 30px;
  }
  .review-points {
    font-size: 0.75rem;
  }
  .review-body {
    padding: 0 18px 20px;
  }
  .review-body h3 {
    font-size: 1.05rem;
  }
  .passport {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .stamp {
    padding: 14px 11px;
    min-height: 162px;
  }
  .stamp > strong {
    font-size: 0.75rem;
  }
  .stamp > small {
    font-size: 0.75rem;
  }
  .history-item {
    padding: 16px 14px;
    gap: 10px;
  }
  .history-item > span:nth-child(2) {
    display: none;
  }
  .history-item strong {
    font-size: 0.86rem;
  }
  .history-item small {
    font-size: 0.75rem;
  }
  dialog {
    padding: 22px 20px;
  }
  .modal-heading h2 {
    font-size: 1.6rem;
  }
  .pace-picker {
    grid-template-columns: 1fr;
  }
  .pace-picker label {
    padding: 12px;
  }
  .brief-rules {
    font-size: 0.77rem;
    gap: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid select {
    font-size: 0.92rem;
  }
  .source-goals {
    grid-template-columns: 1fr;
  }
  .prose h2 {
    font-size: 1.45rem;
  }
  .prose .lead {
    font-size: 1.05rem;
  }
  .section-bar .pill {
    display: none;
  }
}
p.daily-streak {
  color: var(--lime);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  max-width: none;
  margin-top: auto;
}
.result-records {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: -10px 0 35px;
}
.record-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}
.record-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aqua);
}
.record-card > strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1.2;
}
.record-card > strong small {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.record-note {
  font-size: 0.85rem;
  color: var(--muted);
}
.record-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 12px;
  border-radius: 100px;
  background: var(--lime);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 800;
}
.share-card {
  margin-bottom: 35px;
}
.share-card h2 {
  margin-bottom: 10px;
}
.share-card p.daily-streak {
  margin: 0 0 12px;
}
.share-preview {
  display: block;
  max-width: 46ch;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
  user-select: all;
}
.share-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.share-actions .secondary {
  min-height: 48px;
}
.share-status {
  min-height: 1.4em;
  max-width: 34ch;
  font-size: 0.875rem;
  color: var(--lime);
}
@media (hover: hover) {
  .share-actions .secondary:hover {
    border-color: var(--aqua);
  }
}
@media (max-width: 800px) {
  /* Ajudas e Confirmar (e Próxima decisão) ficam no pé da tela. O fundo é
     opaco e o recuo negativo leva a barra de borda a borda, sem texto
     aparecendo por trás. */
  html {
    scroll-padding-bottom: 9rem;
  }
  .in-game main {
    padding-bottom: 5.5rem;
  }
  .answer,
  .feedback {
    scroll-margin-bottom: 9rem;
  }
  .decision-row {
    position: sticky;
    bottom: 0;
    z-index: 5;
    gap: 8px;
    margin: 20px -32px 0;
    padding: 10px 32px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    border-top: 1px solid var(--line);
  }
  .decision-row > .primary {
    min-height: 48px;
  }
  .next-button {
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    float: none;
    display: flex;
    width: 100%;
    min-height: 52px;
    box-shadow:
      0 0 0 10px var(--bg),
      0 env(safe-area-inset-bottom, 0px) 0 10px var(--bg);
  }
}
@media (max-width: 700px) {
  .decision-row {
    margin-inline: -20px;
    padding-inline: 20px;
  }
  .result-records {
    grid-template-columns: 1fr;
    margin-top: -15px;
  }
}
/* Short screens (landscape phone, 200%+ zoom): a fixed bar would cover most
   of the question, so the actions go back to the normal flow. */
@media (max-width: 800px) and (max-height: 520px) {
  .decision-row,
  .next-button {
    position: static;
    box-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  html {
    color-scheme: light;
    background: white;
    color: #111;
    font-size: 12pt;
  }
  body {
    background: white;
  }
  .site-header,
  .site-footer,
  button,
  .skip-link,
  .storage-warning,
  .journey-panel,
  .game-toolbar {
    display: none !important;
  }
  main {
    padding: 0;
    max-width: none;
  }
  .prose,
  .page-head {
    max-width: none;
  }
  .prose p,
  .prose li,
  p {
    color: #222;
  }
  .prose h1 {
    font-size: 28pt;
  }
  .prose h2 {
    font-size: 18pt;
  }
  a {
    color: #111;
  }
  .prose a[href]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
  }
  .lesson-plan li,
  .reading-item,
  .review-item {
    break-inside: avoid;
  }
  .source-goals a {
    background: white;
    color: #111;
  }
  .source-goals a span {
    color: #111;
  }
}
/* Sala de aula: preparação da fila e pergunta em duas etapas, pensadas para
   um projetor de 1280×720 lido do fundo da sala. */
.prep,
.classroom-area {
  max-width: 1120px;
  margin: 0 auto;
}
.prep-head h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}
.prep-head p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 14px;
  max-width: 720px;
}
.prep-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.prep-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.prep-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--lime);
  min-width: 2ch;
}
.prep-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
.prep-concept {
  display: block;
  font-size: 1.15rem;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.sensitive-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px solid var(--warn);
  border-radius: 8px;
  background: var(--warn-wash);
  color: var(--warn-text);
  font-size: 0.8rem;
  font-weight: 700;
}
.prep-swap {
  min-width: 104px;
  min-height: 48px;
}
.prep-note {
  margin-top: 16px;
  color: #f3d79c;
  font-size: 0.9rem;
}
.prep-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.prep-actions p {
  max-width: 560px;
}
.classroom-area .question-content h1 {
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  line-height: 1.3;
  max-width: none;
}
.classroom-area .question-instruction {
  font-size: 1rem;
  color: var(--muted);
}
.classroom-area .answer {
  font-size: 1.15rem;
}
.classroom-area .answer-status {
  font-size: 0.85rem;
}
.prep-prompt summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  list-style: none;
  color: var(--aqua);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.prep-prompt summary::-webkit-details-marker {
  display: none;
}
.prep-prompt summary::before {
  content: "▸";
}
.prep-prompt[open] summary::before {
  content: "▾";
}
.prep-prompt p {
  max-width: 760px;
  margin-bottom: 4px;
  font-size: 1rem;
}
.in-classroom main {
  padding-top: 12px;
}
.in-classroom .game-toolbar {
  margin-bottom: 8px;
}
@media (min-width: 801px) {
  .in-classroom .site-header {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}
.classroom-area .round-progress {
  margin: 10px 0 14px;
}
.classroom-area .question-category {
  margin-bottom: 12px;
}
.stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4px 16px;
  margin: 8px 0 8px;
}
.classroom-area .stage-row .question-instruction {
  margin: 0;
}
.classroom-answers {
  gap: 10px;
}
.vote-column {
  text-align: right;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.vote-column span {
  font-weight: 400;
}
.answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  gap: 12px;
}
.answer-row > .answer {
  min-height: 62px;
  padding: 12px 18px;
}
.vote-inline input {
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 8px;
  border: 1px solid #606d89;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}
.classroom-area .decision-row {
  margin-top: 12px;
}
.vote-error:empty {
  margin: 0;
}
.vote-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 8px;
}
.classroom-reveal {
  list-style: none;
  margin: 0;
  padding: 0;
}
.reveal-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reveal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.reveal-tags .answer-status {
  margin-left: 0;
  flex-basis: auto;
  padding-left: 0;
}
.answer .reveal-chosen {
  color: var(--lime);
}
.vote-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.vote-bar {
  flex: 1;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #323b54;
  overflow: hidden;
}
.vote-bar > span {
  display: block;
  height: 100%;
  background: #8f9bb5;
}
.answer.is-correct .vote-bar > span {
  background: var(--aqua);
}
.vote-count {
  min-width: 10ch;
  text-align: right;
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}
.classroom-feedback p {
  font-size: 1.05rem;
}
.explain-toggle {
  margin-top: 16px;
  min-height: 48px;
}
.classroom-explanation {
  margin-top: 18px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.classroom-explanation h3 {
  font-size: 1.1rem;
  margin: 14px 0 6px;
}
.wrong-comments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.wrong-comments li {
  border-left: 3px solid #c2b0e6;
  padding-left: 14px;
}
.wrong-comments p {
  margin-top: 4px;
  color: #e0cee8;
}
@media (max-width: 550px) {
  .prep-item {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 14px;
    padding: 14px;
  }
  .prep-swap {
    grid-column: 1 / -1;
    width: 100%;
  }
  .prep-actions .primary {
    width: 100%;
  }
  .classroom-area .question-content h1 {
    font-size: 1.45rem;
  }
  .classroom-area .answer {
    font-size: 1rem;
  }
  .answer-row {
    grid-template-columns: minmax(0, 1fr) 4.25rem;
    gap: 8px;
  }
  .vote-column span {
    display: block;
  }
  .vote-row {
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  .vote-bar {
    flex-basis: 100%;
  }
  .vote-count {
    min-width: 0;
    text-align: left;
    font-size: 0.95rem;
  }
  .explain-toggle {
    width: 100%;
  }
}
@media (max-width: 380px) {
  /* Visually shorter, same accessible name ("Pausar partida"). */
  .game-toolbar:has(.streak-chip) .toolbar-extra,
  .streak-chip .chip-extra {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}
/* Sensitive items: warning before the situation, help channel after it and
   the teacher's opt-in in the classroom setup. */
.sensitive-gate {
  border: 1px solid var(--warn);
  border-left-width: 4px;
  border-radius: 15px;
  background: var(--warn-wash);
  padding: 24px;
}
.sensitive-gate .eyebrow {
  color: var(--warn-text);
  margin-bottom: 10px;
}
.sensitive-lead {
  font-size: 1.05rem;
  margin-top: 14px;
}
.sensitive-detail {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
}
.sensitive-actions {
  margin-top: 22px;
}
.sensitive-actions .secondary {
  min-height: 54px;
}
.sensitive-gate .feedback {
  margin-top: 22px;
}
.help-channel {
  border-left: 3px solid var(--warn);
  border-radius: 0 12px 12px 0;
  background: var(--warn-wash);
  padding: 14px 16px;
  margin-top: 14px;
}
.help-channel strong {
  display: block;
  color: var(--warn-text);
  font-size: 0.9rem;
}
.help-channel p {
  margin-top: 4px;
  font-size: 0.94rem;
  line-height: 1.6;
}
.sensitive-note {
  color: var(--warn-text);
  margin: 8px 0;
}
.sensitive-option {
  display: flex;
  gap: 12px;
  align-items: start;
  min-height: 44px;
  margin-top: 16px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10142666;
  cursor: pointer;
}
.sensitive-option:has(:checked) {
  border-color: var(--warn);
}
.sensitive-option input {
  width: 23px;
  height: 23px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--lime);
}
.sensitive-option strong {
  display: block;
  font-size: 0.95rem;
}
.sensitive-option small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}
/* The teacher's note: classroom preparation and reveal only. */
.teacher-note {
  border-left: 3px solid var(--aqua);
  border-radius: 0 12px 12px 0;
  background: #8cddd50b;
  padding: 12px 14px;
  margin-top: 10px;
}
.teacher-note summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.teacher-note strong {
  display: block;
  color: var(--aqua);
  font-size: 0.85rem;
}
.teacher-note p {
  margin-top: 4px;
  font-size: 0.92rem;
  line-height: 1.55;
}
/* Reading mode: a sensitive item keeps the statement behind its own
   disclosure, after the warning and the help channel. */
.reading-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.reading-warning {
  margin: 22px;
}
.reading-situation {
  margin: 0 22px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.reading-situation summary {
  min-height: 44px;
  padding: 12px 16px;
  font-size: 0.95rem;
}
.reading-situation[open] summary {
  border-bottom: 1px solid var(--line);
}
.reading-situation > h3 {
  margin: 18px 16px;
  line-height: 1.5;
  font-size: 1.1rem;
}
.reading-situation ul,
.reading-situation .reading-answer {
  margin: 16px;
}
@media (max-width: 550px) {
  .sensitive-gate {
    padding: 18px;
  }
  .sensitive-actions > * {
    width: 100%;
  }
}
/* Guia para educadores (#guide e guia.html). */
.guide h3 {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  margin: 30px 0 12px;
}
.guide .notes li {
  font-size: 0.95rem;
}
.guide code {
  font-size: 0.85rem;
  color: var(--text);
  overflow-wrap: anywhere;
}
.guide-table {
  width: 100%;
  margin: 14px 0 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  font-size: 0.92rem;
}
.guide-table caption {
  text-align: left;
  padding: 0 0 10px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}
.guide-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--aqua);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}
.guide-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.guide-table tr:last-child td {
  border-bottom: 0;
}
.guide-table td strong {
  color: var(--text);
}
.guide-table .code {
  display: block;
  color: var(--lime);
  white-space: nowrap;
}
.guide-table .code + .small {
  display: block;
}
.lesson-table td:first-child,
.cycle-table td:first-child {
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}
.qid {
  display: inline-block;
  margin: 2px 0;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel2);
  color: var(--text);
  font-size: 0.8rem;
  white-space: nowrap;
}
.qid-item {
  display: inline-block;
  margin: 0 10px 2px 0;
}
.guide-table .qid-item {
  display: block;
  margin: 0 0 4px;
}
.grade {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
}
.grade-direta {
  color: var(--lime);
}
.grade-parcial {
  color: var(--aqua);
}
.guide-callout {
  margin: 24px 0;
  padding: 20px 24px;
  border: 1px solid #e7c077;
  border-radius: 15px;
  background: #e7c0770f;
}
.guide-callout h3 {
  margin-top: 0;
  color: #f3d79c;
}
.guide blockquote {
  margin: 18px 0 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--aqua);
}
.guide blockquote p {
  margin: 10px 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
}
.guide blockquote footer {
  color: var(--muted);
  font-size: 0.85rem;
}
.guide blockquote footer a {
  color: var(--aqua);
}
.glossary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 0;
}
.glossary div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.glossary dt {
  color: var(--text);
  font-weight: 700;
}
.glossary dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.ficha {
  margin-top: 44px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.ficha-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 18px 0 8px;
  color: var(--text);
}
.ficha-field {
  display: flex;
  flex: 1 1 200px;
  align-items: flex-end;
  gap: 8px;
}
.ficha-line {
  flex: 1;
  min-height: 1.4em;
  border-bottom: 1px solid var(--muted);
}
.ficha-table td {
  height: 3.4rem;
}
.ficha-table td:nth-child(3),
.ficha-table td:nth-child(4),
.ficha-table td:nth-child(6) {
  white-space: nowrap;
}
.ficha-action {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
}
.ficha-action strong {
  grid-column: 1 / -1;
}
.ficha-action span {
  min-height: 2.2em;
  border-bottom: 1px solid var(--muted);
  color: var(--muted);
}
.ficha-rubric {
  font-size: 0.85rem;
}
@media screen and (max-width: 700px) {
  /* Tables become one card per row; ARIA roles keep the table semantics. */
  .guide-table,
  .guide-table tbody,
  .guide-table tr,
  .guide-table td,
  .guide-table caption {
    display: block;
    width: 100%;
  }
  .guide-table thead,
  .guide-table thead tr,
  .guide-table th {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .guide-table caption {
    padding: 14px 16px 4px;
  }
  .guide-table tr {
    padding: 12px 16px;
    border-top: 1px solid var(--line);
  }
  .guide-table td {
    height: auto;
    padding: 3px 0;
    border: 0;
    white-space: normal;
  }
  .guide-table td::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    color: var(--aqua);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .lesson-table td:first-child,
  .cycle-table td:first-child,
  .ficha-table td:nth-child(n) {
    white-space: normal;
  }
  .ficha-table td {
    min-height: 2.6rem;
  }
  .glossary,
  .ficha-action {
    grid-template-columns: 1fr;
  }
  .guide-callout {
    padding: 16px;
  }
}
@page {
  margin: 14mm;
}
@page ficha {
  size: A4 landscape;
  margin: 12mm;
}
@media print {
  /* :root paints the dark page background; html alone loses to it. */
  :root {
    color-scheme: light;
    background: #fff;
  }
  /* The guide prints on white: redefine its tokens instead of each rule. */
  .guide {
    --bg: #fff;
    --panel: #fff;
    --panel2: #fff;
    --line: #8a8a8a;
    --muted: #222;
    --text: #111;
    --lime: #234d00;
    --aqua: #0b4656;
    color: #111;
    font-size: 10.5pt;
  }
  .guide .button-row,
  .guide .ficha-intro {
    display: none;
  }
  .guide h1 {
    font-size: 24pt;
  }
  .guide h2 {
    font-size: 16pt;
    margin: 18pt 0 8pt;
    break-after: avoid;
  }
  .guide h3 {
    font-size: 12pt;
    margin: 12pt 0 6pt;
    break-after: avoid;
  }
  .guide .lead {
    font-size: 11.5pt;
    margin: 10pt 0;
  }
  .guide p,
  .guide li {
    line-height: 1.45;
  }
  .guide-table {
    border-radius: 0;
    font-size: 9.5pt;
  }
  .guide-table thead {
    display: table-header-group;
  }
  .guide-table tr {
    break-inside: avoid;
  }
  .guide-table th {
    padding: 5pt 7pt;
    border-bottom: 1.5pt solid #444;
    font-size: 8pt;
  }
  .guide-table td {
    padding: 5pt 7pt;
    border-bottom: 0.75pt solid #aaa;
  }
  .guide-table caption {
    font-size: 9.5pt;
  }
  .qid {
    padding: 0 3pt;
    font-size: 8.5pt;
  }
  .guide-callout {
    border: 1.5pt solid #444;
    background: none;
    break-inside: avoid;
  }
  .guide-callout h3 {
    color: #111;
  }
  .glossary div {
    break-inside: avoid;
  }
  .ficha {
    page: ficha;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .ficha h2 {
    margin: 0 0 4mm;
  }
  .ficha-fields {
    margin: 0 0 4mm;
    font-size: 10.5pt;
  }
  .ficha-table {
    margin: 0 0 4mm;
    font-size: 10pt;
  }
  .ficha-table td {
    height: 13mm;
  }
  .ficha-table th:nth-child(1) {
    width: 8mm;
  }
  .ficha-table th:nth-child(2) {
    width: 58mm;
  }
  .ficha-table th:nth-child(3) {
    width: 40mm;
  }
  .ficha-table th:nth-child(4) {
    width: 22mm;
  }
  .ficha-table th:nth-child(6) {
    width: 46mm;
  }
  .ficha-action {
    border-radius: 0;
    padding: 3mm 4mm;
    break-inside: avoid;
  }
  .ficha-rubric {
    margin: 3mm 0 0;
    font-size: 9pt;
  }
}
/* Sala com código: entrada do aluno, painel do professor (projetor) e placar. */
.room-choice {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.room-option {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}
.room-option span {
  color: var(--muted);
  font-size: 0.92rem;
}
@media (hover: hover) {
  .room-option:hover {
    background: var(--panel2);
  }
}
.room-narrow {
  max-width: 640px;
}
.room h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  margin-bottom: 16px;
  outline: none;
}
.room h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin: 28px 0 12px;
}
.room-form {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}
.room-form label {
  font-weight: 700;
}
.room-form input,
.room-form select {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid #586582;
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-size: 1.1rem;
}
.room-form input:focus-visible,
.room-form select:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
}
.room-form input[aria-invalid="true"] {
  border-color: var(--danger);
}
.room-form .button-row,
.room-form > .primary {
  margin-top: 8px;
}
.room-code-input {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}
.form-error {
  color: var(--danger);
  font-weight: 600;
}
.form-error:empty {
  display: none;
}
.room-notice {
  padding: 14px 16px;
  border-left: 4px solid var(--aqua);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
.room-facts {
  margin: 4px 0 18px;
  padding-left: 20px;
  color: var(--muted);
}
.room-status {
  padding: 10px 24px;
  background: var(--panel2);
  color: var(--text);
  font-size: 0.9rem;
  text-align: center;
}
.room-host {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: start;
}
.room-entry,
.room-board {
  min-width: 0;
}
.room-code {
  margin: 4px 0 18px;
  color: var(--lime);
  font-size: clamp(2.6rem, 6vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  overflow-wrap: anywhere;
}
.room-qr {
  width: min(100%, 340px);
  padding: 0;
  border-radius: 12px;
  background: #fff;
}
.room-qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.room-link {
  margin: 14px 0 8px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.room-link span {
  color: var(--muted);
}
.room-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}
.room-board-head h2 {
  margin: 0;
}
.room-board-head p {
  color: var(--text);
  font-weight: 700;
}
.board-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}
.board-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.board-row.is-me {
  border-color: var(--lime);
}
.board-place {
  color: var(--aqua);
  font-weight: 800;
  font-size: 1.2rem;
}
.board-name {
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}
.board-me {
  color: var(--lime);
  font-weight: 600;
  font-size: 0.9rem;
}
.board-progress {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-size: 0.9rem;
}
.board-score {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-size: 1.4rem;
  white-space: nowrap;
}
.board-score small {
  font-size: 0.8rem;
  color: var(--muted);
}
.board-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.board-actions .text-button {
  min-height: 44px;
  padding: 8px 0;
}
.board-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}
.podium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.podium-step {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--muted);
}
.podium-1 {
  border-color: var(--lime);
}
.podium-place {
  color: var(--aqua);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}
.podium-step strong {
  color: var(--text);
  font-size: 1.6rem;
  overflow-wrap: anywhere;
}
.room-me {
  color: var(--text);
  font-size: 1.15rem;
}
@media (max-width: 900px) {
  .room-host {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
@media (max-width: 550px) {
  .room-form .button-row > * {
    width: 100%;
  }
  .board-row {
    padding: 10px 12px;
  }
}
