* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--app-background);
  color: var(--app-ink);
  font-family: Arial, sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  min-height: 48px;
  border: 1px solid var(--app-border);
  background: var(--app-card);
  border-radius: 14px;
  padding: 12px 18px;
  color: inherit;
  font-weight: 700;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid #d39126;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--app-primary);
  color: white;
  border-color: var(--app-primary);
}
button:hover:not(:disabled) {
  filter: brightness(0.96);
}
#app {
  max-width: 1180px;
  margin: 0 auto 20px;
  height: calc(100dvh - 80px);
  min-height: 580px;
  background: var(--app-surface);
  border: 7px solid #26463b;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 60px #223b3418;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 26px;
  border-bottom: 1px solid #dbe4d9;
  gap: 14px;
}
.brand {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -1px;
}
.brand span {
  color: #729754;
}
.identity {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
.avatar {
  display: grid;
  place-items: center;
  background: #e4ebd5;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  font-size: 23px;
}
.content {
  overflow: auto;
  padding: 26px 30px;
  flex: 1;
}
.eyebrow {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin: 0 0 10px;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 0 0 12px;
}
h2 {
  font-size: 22px;
  margin: 0 0 8px;
}
h3 {
  font-size: 19px;
  margin: 0 0 8px;
}
p {
  line-height: 1.5;
}
.muted {
  color: var(--app-muted);
  font-size: 14px;
}
.greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.capi {
  font-size: 56px;
  background: #e5ecd3;
  border-radius: 50% 50% 40% 40%;
  padding: 8px 16px;
}
.assignment {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 22px 0;
  background: #f6e7b7;
  border: 1px solid #e6d18f;
  border-radius: 22px;
  padding: 20px 24px;
}
.assignment .icon {
  font-size: 34px;
}
.assignment .copy {
  flex: 1;
}
.badge {
  font-size: 10px;
  background: #fff9dc;
  color: #705617;
  display: inline-block;
  border-radius: 20px;
  padding: 6px 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.badge.new {
  background: var(--app-primary);
  color: white;
}
.assignment h2 {
  font-size: 22px;
}
.assignment p {
  font-size: 14px;
  margin: 6px 0 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 24px 0 14px;
}
.section-head p {
  font-size: 13px;
  color: var(--app-muted);
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.game-card {
  border: 1px solid var(--app-border);
  border-radius: 22px;
  overflow: hidden;
  background: var(--app-card);
}
.scene {
  height: 104px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 44px;
  gap: 15px;
  background: var(--app-scene);
}
.scene:after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  height: 20px;
  background: #668c6c1c;
  bottom: 5px;
  border-radius: 50%;
}
.scene.genres {
  background: #e0e9f3;
}
.scene.words {
  background: #f0e2d8;
}
.card-copy {
  padding: 18px;
}
.card-copy p {
  font-size: 14px;
  min-height: 42px;
  margin: 8px 0 18px;
}
.card-copy button {
  width: 100%;
}
.foot {
  border-top: 1px solid #dbe4d9;
  padding: 12px 26px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--app-muted);
}
.teacher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.8fr);
  gap: 24px;
}
.panel {
  background: white;
  border: 1px solid var(--app-border);
  border-radius: 20px;
  padding: 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: bold;
  margin: 16px 0;
}
input,
select {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-card);
  color: inherit;
  width: 100%;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.activity-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.activity-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--app-border);
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  cursor: pointer;
}
.activity-choice:has(input:checked) {
  background: var(--app-tint);
  border-color: #659579;
}
.activity-choice input {
  min-height: 24px;
  width: 24px;
  height: 24px;
  flex: none;
}
.activity-choice small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--app-muted);
}
.count {
  color: var(--app-primary);
  font-size: 13px;
  font-weight: bold;
}
.summary {
  position: sticky;
  top: 0;
  align-self: start;
}
.summary ul {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
}
.summary .primary {
  width: 100%;
  margin-top: 14px;
}
.notice {
  padding: 14px;
  background: var(--app-tint);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.assignment-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.assignment-item {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
}
.assignment-item strong {
  display: block;
  margin-bottom: 6px;
}
.empty {
  font-size: 14px;
  color: var(--app-muted);
  background: #f0f3e9;
  padding: 16px;
  border-radius: 12px;
}
dialog {
  width: min(820px, calc(100vw - 40px));
  max-height: calc(100dvh - 50px);
  border: 0;
  border-radius: 25px;
  padding: 28px;
  background: var(--app-surface);
  color: var(--app-ink);
  overflow: auto;
}
dialog::backdrop {
  background: #193c3480;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
.question {
  background: var(--app-tint);
  border: 1px solid #cbdccf;
  padding: 22px;
  border-radius: 18px;
  font-size: 23px;
  line-height: 1.4;
  white-space: pre-line;
}
.answers {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.answers button {
  text-align: left;
  font-size: 19px;
}
.answers button.selected {
  background: var(--app-selected);
  border: 2px solid #33735b;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}
.feedback {
  padding: 16px;
  background: var(--app-tint);
  border-radius: 14px;
  line-height: 1.5;
}
.options-note {
  font-size: 13px;
  color: var(--app-muted);
}
.progress {
  height: 6px;
  border-radius: 8px;
  background: #e1e7da;
  margin-bottom: 18px;
}
.progress i {
  display: block;
  height: 100%;
  background: #d9af48;
  border-radius: 8px;
}
.large {
  font-size: 19px;
}
.large .muted,
.large .card-copy p {
  font-size: 18px;
}
@media (max-width: 850px) {
  #app {
    height: calc(100dvh - 85px);
  }
  .content {
    padding: 20px;
  }
  .teacher-layout {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
  }
  .cards {
    gap: 12px;
  }
  .card-copy {
    padding: 14px;
  }
  .card-copy h3 {
    font-size: 17px;
  }
  .assignment {
    flex-wrap: wrap;
  }
  .assignment .primary {
    margin-left: auto;
  }
  h1 {
    font-size: 28px;
  }
  .scene {
    font-size: 33px;
  }
  .top {
    padding: 12px 18px;
  }
}
@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .greeting .capi {
    display: none;
  }
  .row {
    grid-template-columns: 1fr;
  }
}

textarea {
  font: inherit;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-card);
  color: inherit;
  resize: vertical;
}
.field[hidden] {
  display: none;
}
#share {
  width: 100%;
  margin-top: 10px;
}
.word-grid {
  display: grid;
  grid-template-columns: repeat(var(--size), minmax(0, 1fr));
  gap: 5px;
  max-width: 570px;
  margin: 18px auto;
}
.word-grid button {
  padding: 0;
  min-width: 0;
  min-height: 48px;
  font-size: 22px;
}
.word-list {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.word-list span {
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--app-tint);
}
.found {
  background: #d4e8bb !important;
  color: #184c39;
}
.word-list .found {
  text-decoration: line-through;
}
.pair-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.pair-columns > div {
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
}
.pair-columns button {
  text-align: left;
}
.pair-columns button:disabled {
  opacity: 0.65;
  background: #d4e8bb;
}
#game-models {
  margin: 12px 0;
  width: 100%;
}
#model-preview {
  margin: 18px 0;
}
.record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.record-actions button {
  font-size: 15px;
}
.danger {
  color: #8c2626;
  border-color: #bd5454;
}
.retro-settings {
  padding: 14px;
  border: 1px solid #ceded4;
  border-radius: 14px;
  margin: 16px 0;
}
.retro-question {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 48px;
}
.retro-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}
.retro-board section {
  padding: 16px;
  background: #eef4de;
  border-radius: 16px;
}
.retro-board section:nth-child(2) {
  background: #fff0c4;
}
.retro-board section:nth-child(3) {
  background: #e4eefb;
}
.retro-board section:nth-child(4) {
  background: #f2e4f6;
}
.retro-board button {
  display: block;
  width: 100%;
  margin: 8px 0;
  text-align: left;
}
.summary > .panel {
  margin-top: 18px;
}
.teacher-nav {
  display: flex;
  gap: 8px;
  padding: 12px 28px;
  flex-wrap: wrap;
  border-bottom: 1px solid #d3e2d7;
}
.teacher-nav button {
  font-size: 15px;
}
.category-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.category-cards .scene {
  height: 100px;
}
.classification {
  border: 1px solid #d3e2d7;
  border-radius: 14px;
  padding: 16px;
  margin: 18px 0;
}
.content > article.panel {
  margin: 16px 0;
}
.fable-stage {
  padding: 20px;
  background: #f2f6ed;
  border: 1px solid #cbdcce;
  border-radius: 16px;
  margin: 18px 0;
}
.story-text {
  white-space: pre-wrap;
  font-size: 22px;
  line-height: 1.7;
  background: #f4f1e4;
  padding: 24px;
  border-radius: 16px;
  margin: 18px 0;
}
.fable-stage .section-head {
  flex-wrap: wrap;
}
.fable-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.fable-reading-path {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.fable-reading-path span {
  background: var(--app-tint);
  border-radius: 12px;
  padding: 10px 14px;
}
.fable-book {
  border: 1px solid #d1decf;
  border-radius: 20px;
  overflow: hidden;
  background: var(--app-card);
  margin: 18px 0;
}
.fable-book-cover {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e9efcf;
  padding: 24px;
  gap: 18px;
}
.fable-book-cover h2 {
  font-size: 30px;
  margin: 8px 0;
}
.fable-book-art {
  font-size: 64px;
  white-space: nowrap;
}
.fable-audio {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: #f3f6eb;
  border-bottom: 1px solid #d1decf;
}
.fable-audio span {
  font-size: 15px;
  color: #496657;
}
.fable-book-text {
  padding: 10px 28px 24px;
  font-size: 22px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.fable-book-text p {
  margin: 18px 0;
}
.fable-ready {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.fable-ready h2 {
  font-size: 22px;
}
.listening-target {
  background: #f3efd9;
  border: 1px solid #ded7b4;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  margin: 16px 0;
}
.listening-target > span {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
}
.listening-target button {
  min-height: 56px;
  font-size: 22px;
}
.found-words {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.character-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.character-buttons button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 78px;
  min-height: 72px;
  background: #fffdf4;
}
.character-buttons button > span {
  font-size: 36px;
}
.challenge-characters {
  margin: 12px 0;
}
.challenge-characters button {
  min-height: 48px;
  flex-direction: row;
}
.persona-editor {
  padding: 16px;
  margin: 12px 0;
  border: 1px solid #cbded2;
  border-radius: 16px;
}
.chat-messages {
  max-height: 38vh;
  overflow: auto;
  padding: 8px;
}
.chat-message {
  padding: 16px;
  border-radius: 18px;
  margin: 10px 0;
  background: #edf5ef;
  line-height: 1.6;
}
.chat-message.child {
  background: #fff0cc;
  margin-left: 40px;
}
.chat-message p {
  font-size: 20px;
  white-space: pre-wrap;
}
.chat-message button {
  margin-right: 8px;
}
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
#module-chat {
  width: min(820px, 94vw);
}
body {
  background: #fff;
}
.top,
.foot,
.teacher-nav {
  background: #fff;
}
#app {
  border: 9px solid #a8794c;
  border-radius: 16px;
  box-shadow:
    0 0 0 2px #704c2c,
    0 10px 28px #5335191c;
}
.foot {
  position: relative;
  border-bottom: 7px solid #b58a5d;
  padding-bottom: 16px;
}
.foot:after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: calc(50% - 24px);
  width: 48px;
  height: 8px;
  border-radius: 2px;
  background: #5c7067;
  box-shadow:
    58px 2px 0 -1px #fff,
    82px 2px 0 -1px #e9cd76;
}
.fable-book-cover > div:first-child {
  min-width: 0;
  flex: 1;
}
.fable-book-cover .character-buttons {
  max-width: 280px;
  flex-shrink: 0;
}
@media (max-width: 850px) {
  .fable-book-cover {
    flex-wrap: wrap;
  }
  .fable-book-cover .character-buttons {
    max-width: 100%;
  }
}
#app {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#app {
  border: 1px solid #dce5df;
  border-radius: 12px;
  box-shadow: none;
}
.card-copy .template-type {
  min-height: 0;
  margin: 4px 0 12px;
  font-size: 13px;
  color: #426b59;
}
.card-copy .template-type-description {
  min-height: 0;
  margin: 10px 0 16px;
  line-height: 1.5;
}
.fable-builder-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: sticky;
  top: -1px;
  background: white;
  padding: 12px 0;
  z-index: 2;
  border-bottom: 1px solid #dce5df;
  margin-bottom: 20px;
}
.fable-builder-tabs [aria-selected='true'] {
  background: var(--app-primary);
  color: white;
}
.fable-builder-tabs button {
  flex: 1;
  min-width: 110px;
}
[data-fable-panel][hidden] {
  display: none;
}
.ai-author-tools {
  background: #f0f5ee;
  padding: 18px;
  border-radius: 16px;
  margin-bottom: 22px;
}
.ai-author-tools .panel {
  margin: 12px 0;
}
.random-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}
.random-option input {
  width: 24px;
  height: 24px;
}
.library-module-section {
  margin: 28px 0;
}
.library-module-section > p {
  max-width: 800px;
}
.library-module-section .cards {
  margin-top: 18px;
}
.setting-card {
  padding: 20px;
  border: 1px solid #dce5df;
  border-radius: 16px;
  margin: 18px 0;
  background: #fbfcf8;
}
.setting-card h3 {
  margin-bottom: 12px;
}
.random-option span {
  display: block;
  line-height: 1.5;
}
.random-option small {
  display: block;
  color: var(--app-muted);
  margin-top: 4px;
  font-weight: normal;
}
.retro-settings {
  margin: 28px 0 0;
  padding: 22px;
  border: 1px solid #dce5df;
  border-radius: 16px;
  background: #f6f8f2;
}
.retro-settings .retro-question {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid #dce5df;
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
  background: white;
}
.retro-question input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.retro-settings [hidden] {
  display: none;
}
.journey-challenge-group {
  border: 1px solid #cfded4;
  border-radius: 18px;
  padding: 20px;
  margin: 22px 0;
  background: #f8faf4;
}
.journey-challenge-group > .fable-stage {
  background: white;
  padding: 18px;
  border: 1px solid #dde5da;
  border-radius: 14px;
  margin: 18px 0;
}
.fable-reading-choice {
  padding: 18px 24px;
  border-bottom: 1px solid #d1decf;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.fable-reading-choice [aria-pressed='true'] {
  background: var(--app-primary);
  color: white;
  border-color: var(--app-primary);
}
.fable-reading-choice p {
  flex-basis: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}
.fable-reading-choice .badge {
  margin: 0;
}
.word-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.word-tiles button {
  min-height: 56px;
  min-width: 72px;
  padding: 12px 16px;
  overflow-wrap: anywhere;
}
.sentence-assembly {
  padding: 18px;
  border: 1px dashed #a2b8a8;
  border-radius: 16px;
  margin-top: 18px;
  background: white;
}
.sentence-assembly p {
  font-size: 22px;
  margin: 10px 0;
  min-height: 32px;
  line-height: 1.5;
}
.word-grid {
  max-width: 700px;
  gap: 4px;
}
.word-grid button {
  min-height: 44px;
}
[data-genre-document][aria-pressed='true'] {
  background: var(--app-primary);
  color: white;
  border-color: var(--app-primary);
}
#app.entry-shell {
  height: calc(100dvh - 28px);
  min-height: 0;
  margin: 14px auto;
  border: 1px solid var(--app-border);
  background: var(--app-card);
  border-radius: 24px;
}
.entry-page {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 24px 36px;
}
.entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
}
.entry-tag {
  font-size: 13px;
  color: var(--app-muted);
}
.entry-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 36px;
  padding: 20px 0 24px;
}
.entry-hero h1 {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -1.3px;
}
.entry-hero p {
  font-size: 17px;
  max-width: 510px;
}
.entry-pill {
  display: inline-block;
  background: var(--app-tint);
  padding: 9px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: bold;
}
.entry-world {
  background: #e8efcd;
  border: 1px solid #d4dfb6;
  border-radius: 32px;
  padding: 22px;
  text-align: center;
  transform: rotate(1deg);
}
.entry-world-title {
  font-size: 19px;
  font-weight: bold;
}
.entry-animals {
  font-size: 57px;
  margin: 14px 0;
}
.entry-mini {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 12px;
}
.entry-mini span {
  background: #fffef9bd;
  border-radius: 20px;
  padding: 8px 10px;
}
.entry-word {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.entry-word span {
  display: grid;
  place-items: center;
  background: var(--app-card);
  border: 1px solid #d0dec3;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  font-weight: bold;
  font-size: 20px;
}
.entry-world p {
  font-size: 12px;
  margin-bottom: 0;
}
.entry-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.entry-door {
  background: white;
  border: 1px solid #d7e1d8;
  border-radius: 22px;
  padding: 22px;
  display: flex;
  gap: 18px;
}
.student-door {
  background: #f4f7ed;
}
.entry-avatar {
  background: #e8eddb;
  border-radius: 18px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  font-size: 32px;
}
.entry-door p {
  font-size: 14px;
  margin: 8px 0 16px;
}
.entry-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.entry-buttons button {
  min-width: 110px;
}
.entry-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 26px 0 8px;
}
.entry-features article > span {
  font-size: 26px;
}
.entry-features h3 {
  font-size: 17px;
  margin: 10px 0 4px;
}
.entry-features p {
  font-size: 13px;
  margin: 0;
  color: var(--app-muted);
}
.entry-footer {
  text-align: center;
  color: var(--app-muted);
  font-size: 12px;
  padding: 20px 0 4px;
}
.entry-access {
  max-width: 960px;
  margin: 8px auto;
}
.entry-access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 24px;
}
.entry-access-grid h1 {
  font-size: 34px;
  line-height: 1.2;
}
.entry-sticker {
  font-size: 70px;
  display: block;
  margin-bottom: 18px;
}
.entry-access .panel {
  padding: 26px;
}
.entry-submit {
  width: 100%;
  margin-bottom: 12px;
}
.entry-access #entry-change {
  width: 100%;
  font-size: 13px;
}
.entry-access .notice {
  margin-top: 24px;
}
.entry-access #cloud-login-error {
  color: #963528;
  font-size: 14px;
}
.entry-shell.large {
  font-size: 19px;
}
@media (max-width: 850px) {
  .entry-page {
    padding: 20px 24px;
  }
  .entry-hero {
    gap: 20px;
  }
  .entry-hero h1 {
    font-size: 30px;
  }
  .entry-hero p {
    font-size: 15px;
  }
  .entry-door {
    padding: 18px;
    gap: 12px;
  }
  .entry-avatar {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }
  .entry-access-grid {
    gap: 24px;
  }
  .entry-tag {
    display: none;
  }
}
@media (max-width: 650px) {
  .entry-hero,
  .entry-doors,
  .entry-access-grid {
    grid-template-columns: 1fr;
  }
  .entry-world {
    display: none;
  }
  .entry-features {
    grid-template-columns: 1fr;
  }
  .entry-sticker {
    font-size: 42px;
  }
  .entry-access-grid {
    margin-top: 16px;
    gap: 16px;
  }
}
.monitor-summary,
.student-progress-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.monitor-summary article {
  padding: 18px;
  background: var(--app-tint);
  border: 1px solid #d8e4d4;
  border-radius: 18px;
}
.monitor-summary strong {
  font-size: 29px;
  display: block;
}
.monitor-summary span {
  font-size: 13px;
}
.monitor-indicate {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.monitor-indicate > div {
  flex: 1;
  min-width: 200px;
}
.monitor-indicate p {
  font-size: 14px;
  margin-bottom: 0;
}
.monitor-indicate .field {
  flex: 1;
  min-width: 220px;
}
.monitor-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.monitor-students {
  display: grid;
  gap: 16px;
}
.monitor-students .section-head {
  margin: 0 0 12px;
}
.monitor-record {
  border-top: 1px solid #dce6dc;
  padding: 14px 0;
}
.monitor-record summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-height: 48px;
}
.monitor-record summary > span:first-child {
  flex: 1;
}
.monitor-record small {
  display: block;
  color: var(--app-muted);
  margin: 7px 0;
}
.monitor-record progress {
  width: 100%;
  height: 10px;
  accent-color: var(--app-primary);
}
.monitor-question {
  font-size: 14px;
  padding: 10px;
  background: #f1f5eb;
  border-radius: 12px;
}
.student-progress-summary {
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 24px;
}
.student-progress-summary span {
  padding: 14px;
  background: var(--app-tint);
  border-radius: 16px;
  font-size: 14px;
}
.student-completed {
  margin: 28px 0;
}
.student-completed article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid #cbdcce;
  background: #f2f6ec;
  border-radius: 16px;
  margin: 12px 0;
}
.student-completed article p {
  margin: 5px 0 0;
  font-size: 14px;
}
.student-completed article > span {
  font-size: 26px;
  color: var(--app-primary);
}
@media (max-width: 700px) {
  .monitor-summary {
    grid-template-columns: 1fr 1fr;
  }
  .monitor-filters {
    grid-template-columns: 1fr;
  }
  .student-progress-summary {
    gap: 8px;
  }
  .student-progress-summary span {
    font-size: 12px;
    padding: 12px;
  }
}
.entry-demo-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  background: #fff2c8;
  border: 1px solid #ecdba6;
  border-radius: 20px;
  padding: 20px 24px;
}
.entry-demo-invite h2 {
  font-size: 20px;
}
.entry-demo-invite p {
  font-size: 14px;
  margin: 6px 0 0;
}
.demo-link {
  display: inline-block;
  padding: 14px 18px;
  background: var(--app-primary);
  color: white;
  border-radius: 14px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
}
.demo-welcome {
  text-align: center;
  max-width: 700px;
  margin: 24px auto;
}
.demo-welcome h1 {
  margin-top: 16px;
}
.demo-guide {
  margin-top: 22px;
}
.demo-guide ol {
  line-height: 1.8;
  padding-left: 24px;
}
.demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff2c8;
  border-bottom: 1px solid #e6d7ac;
  padding: 10px 20px;
  font-size: 12px;
  flex-shrink: 0;
}
.demo-toolbar > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.demo-toolbar button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 12px;
}
.demo-toolbar a,
.entry-top a {
  color: var(--app-primary);
  font-weight: bold;
}
.demo-toolbar + .top {
  padding: 12px 20px;
}
@media (max-width: 800px) {
  .entry-demo-invite,
  .demo-toolbar {
    flex-wrap: wrap;
  }
  .demo-toolbar {
    padding: 8px 16px;
  }
}
.library-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}
.library-tabs button[aria-pressed='true'] {
  background: var(--app-primary);
  color: white;
  border-color: var(--app-primary);
}
.library-settings {
  padding: 16px 20px;
  background: #f0f5e9;
  border: 1px solid #d7e3cf;
  border-radius: 16px;
}
.library-settings summary {
  cursor: pointer;
  font-weight: bold;
  min-height: 32px;
}
.library-settings label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  font-size: 14px;
}
.library-settings input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex-shrink: 0;
}
.library-card-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.library-card-actions button {
  width: 100%;
}
.library-ready {
  margin: 28px 0;
}
.library-ready > .cards {
  margin: 18px 0;
}
.library-path {
  display: block;
  width: 100%;
  text-align: left;
  margin: 12px 0;
}
.classroom-onboarding {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px;
  background: #eaf1d9;
  border: 1px solid #d3dfc7;
  border-radius: 20px;
  margin-bottom: 24px;
}
.classroom-onboarding > div {
  flex: 1;
}
.classroom-onboarding p {
  font-size: 14px;
}
.classroom-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.classroom-steps span {
  padding: 14px;
  background: var(--app-tint);
  border-radius: 14px;
  font-size: 13px;
}
.classroom-steps b {
  display: block;
  color: var(--app-primary);
  font-size: 23px;
  margin-bottom: 6px;
}
.classroom-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--app-tint);
  border: 1px solid #d4e1ce;
  border-radius: 18px;
  padding: 20px;
}
.classroom-code small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--app-muted);
}
.classroom-code strong {
  display: block;
  font-size: 26px;
  margin: 8px 0;
}
.classroom-code p {
  font-size: 13px;
  margin: 0;
}
.classroom-activity {
  margin: 16px 0;
}
.classroom-progress > .section-head h1 {
  font-size: 24px;
}
.classroom-progress .monitor-indicate {
  display: none;
}
.classroom-progress .monitor-filters {
  grid-template-columns: 1fr 1fr;
}
.classroom-progress .field[hidden] {
  display: none;
}
.classroom-card button {
  width: 100%;
}
@media (max-width: 850px) {
  .classroom-steps {
    grid-template-columns: 1fr 1fr;
  }
  .classroom-onboarding,
  .classroom-code {
    flex-wrap: wrap;
  }
}
.classroom-delete-zone {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e4c9bf;
}
.classroom-delete-zone p {
  font-size: 14px;
  color: var(--app-muted);
}

.classroom-picker-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}
.classroom-picker-list {
  max-height: 48vh;
  overflow: auto;
  margin: 16px 0;
}
.classroom-picker-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 12px;
  border-bottom: 1px solid #d4e2d8;
  cursor: pointer;
}
.classroom-picker-row input {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.classroom-picker-row span {
  display: grid;
  gap: 6px;
}
.classroom-picker-row small {
  color: #52695f;
}
.classroom-picker-row:has(input:checked) {
  background: #ecf5e9;
}
.classroom-picker-row:has(input:disabled) {
  opacity: 0.65;
  cursor: default;
}
.classroom-picker-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
@media (max-width: 700px) {
  .classroom-picker-filters {
    grid-template-columns: 1fr;
  }
  .classroom-picker-footer {
    flex-wrap: wrap;
  }
}

.library-assignment-list {
  margin: 16px 0 28px;
}
.library-batch-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.library-batch-rows {
  margin: 12px 0;
  max-height: 55vh;
  overflow: auto;
}
@media (max-width: 600px) {
  .library-batch-filters {
    grid-template-columns: 1fr;
  }
}
.next-activity {
  border: 2px solid #27715b;
  background: #edf5ed;
}
.library-entry {
  border-bottom: 1px solid #d3e1d8;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.library-entry-details {
  margin: 0 12px 8px 48px;
}
.library-entry-details summary {
  cursor: pointer;
  padding: 12px 0;
  color: #245d4e;
  font-weight: 600;
}
.library-entry-details .story-text {
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
}
#cloud-save-status {
  margin: 0;
  padding: 6px 16px;
  font-size: 13px;
  color: #36564c;
}
@media (max-width: 600px) {
  .library-entry-details {
    margin-left: 12px;
  }
}
:root {
  --app-background: #e9eee9;
  --app-surface: #fffdf5;
  --app-card: #fffef9;
  --app-ink: #213c34;
  --app-primary: #24684f;
  --app-tint: #edf4e8;
  --app-selected: #dcebcf;
  --app-scene: #e4ecd0;
  --app-border: #cedbd1;
  --app-muted: #52695f;
}
:root[data-palette='sky'] {
  --app-background: #eaf0f7;
  --app-surface: #f6f9ff;
  --app-card: #fff;
  --app-ink: #233e5a;
  --app-primary: #245891;
  --app-tint: #eaf1fa;
  --app-selected: #d9e6fa;
  --app-scene: #e7e0f5;
  --app-border: #c6d4e6;
  --app-muted: #52667c;
}
:root[data-palette='sunset'] {
  --app-background: #f5ece6;
  --app-surface: #fff8f1;
  --app-card: #fffdfb;
  --app-ink: #503a33;
  --app-primary: #92442e;
  --app-tint: #fcece3;
  --app-selected: #f2d9ca;
  --app-scene: #dfeaf4;
  --app-border: #dfcbbf;
  --app-muted: #725c51;
}
.top {
  flex-wrap: wrap;
}
.top .identity {
  flex: 1;
  min-width: 150px;
}
.palette-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.palette-options button {
  display: grid;
  gap: 10px;
  text-align: left;
  background: var(--app-card);
}
.palette-options button[aria-pressed='true'] {
  outline: 3px solid var(--app-primary);
  outline-offset: 2px;
}
.palette-options small {
  font-weight: 400;
  line-height: 1.4;
}
.palette-swatches {
  display: flex;
  gap: 6px;
}
.palette-swatches i {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #0002;
}
.student-access {
  max-width: 650px;
  margin: 30px auto;
}
.student-access > form {
  margin: 24px 0;
}
.entry-qr {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: white;
  border-radius: 16px;
}
.entry-qr img {
  width: 300px;
  max-width: 100%;
  height: auto;
}
.classroom-code > div:first-child {
  flex: 1;
  min-width: 0;
}
.classroom-code .record-actions {
  max-width: 340px;
  flex-wrap: wrap;
}
.institution-guidance {
  font-weight: 400;
}
.institution-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.institution-list .panel {
  padding: 16px;
}
.roster-student {
  margin: 12px 0;
}
.roster-student p {
  font-size: 14px;
}
.student-class-switcher {
  display: grid;
  gap: 6px;
  font-size: 12px;
  max-width: 240px;
}
.student-class-switcher select {
  font-size: 14px;
}
.beta-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  white-space: nowrap;
  background: #fff1c8;
  color: #654a13;
  border: 1px solid #dfc87c;
  border-radius: 20px;
  padding: 6px 10px;
  min-height: 30px;
  font-weight: 700;
}
.beta-note {
  background: var(--app-tint);
  border: 1px solid var(--app-border);
  padding: 16px 20px;
  border-radius: 16px;
  margin-top: 24px;
  font-size: 13px;
}
.beta-note p {
  margin: 6px 0 0;
}
.school-identity {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--app-tint);
}
.feedback.success {
  background: #e8f4e8;
  color: #214c30;
}
.feedback.retry {
  background: #fff1d2;
  color: #624315;
}
#app-palette {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .palette-options {
    grid-template-columns: 1fr;
  }
  .classroom-code .record-actions {
    max-width: none;
  }
  .student-class-switcher {
    max-width: 100%;
  }
  .entry-top {
    flex-wrap: wrap;
  }
}
