:root {
  --ink: #20282b;
  --muted: #637073;
  --blue: #0066cc;
  --paper: #f5f6f7;
  --line: #dce2e4;
  --mint: #dceee4;
  --green: #22664d;
  --danger: #a22e31;
  font-family:
    "Noto Sans SC",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  min-height: 44px;
  padding: 10px 18px;
  background: #eaf0f2;
  color: var(--ink);
  border-radius: 12px;
  font-weight: 600;
}
button:hover:not(:disabled) {
  filter: brightness(0.96);
}
button:disabled {
  cursor: not-allowed;
  color: #717b7f;
  background: #e8ebed;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid #0071e3;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -1.1px;
  line-height: 1.25;
  font-weight: 650;
}
h2 {
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 18px;
}
p {
  margin-bottom: 16px;
}
small {
  font-size: 12px;
}
input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 46px;
  background: #fff;
  border: 1px solid #bbc6ca;
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
}
textarea {
  resize: vertical;
  line-height: 1.8;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  background: #f0f3f4;
  border-radius: 12px;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
code {
  font: inherit;
}
.primary {
  background: var(--blue);
  color: #fff;
  border-radius: 100px;
  padding: 12px 24px;
  white-space: nowrap;
}
.wide {
  width: 100%;
}
.text-button {
  color: var(--blue);
  background: transparent;
  padding: 9px 8px;
}
.muted {
  color: var(--muted);
}
.error {
  color: var(--danger);
  font-size: 14px;
  white-space: pre-wrap;
}
.error:empty {
  margin: 0;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: var(--green);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  letter-spacing: 0.7px;
  font-weight: 750;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.brand small {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 500;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  width: 31px;
  height: 33px;
  border-radius: 10px;
  font-size: 20px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  background: #eef2f3;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 12px;
  color: #536065;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  background: white;
  padding: 10px;
  z-index: 100;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link:focus {
  top: 10px;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: 90vw;
  background: #243934;
  color: white;
  border-radius: 14px;
  padding: 12px 22px;
  box-shadow: 0 5px 20px #23352e1c;
}
#toast:empty {
  display: none;
}
.boot {
  margin: 60px auto;
  max-width: 600px;
  padding: 24px;
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.auth-story {
  background: #eaf1ed;
  padding: 40px 7%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.story-copy {
  margin-top: 65px;
  z-index: 1;
}
.story-copy h1 {
  font-size: clamp(38px, 4.2vw, 62px);
  margin: 18px 0 22px;
  letter-spacing: -2px;
}
.story-copy p {
  color: #536b60;
  line-height: 1.9;
  font-size: 17px;
}
.story-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #52665c;
  font-size: 11px;
  margin-top: auto;
  padding-top: 22px;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 50px 8%;
}
.auth-card {
  max-width: 380px;
  width: 100%;
}
.tabline {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 24px;
  margin-bottom: 35px;
}
.tabline button {
  padding: 9px 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tabline [aria-selected="true"] {
  color: var(--ink);
  border-color: var(--ink);
}
.auth-card h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.auth-card form {
  margin-top: 26px;
}
.auth-card form label {
  margin-top: 18px;
}
.auth-card form small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.auth-card .error {
  margin-top: 12px;
}
.auth-card .primary {
  margin-top: 24px;
}
.privacy-copy {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 22px 0 0;
}
.welcome-island {
  position: relative;
  min-height: 275px;
  width: min(100%, 510px);
  margin: 6px auto 0;
  flex: 1;
  max-height: 335px;
}
.island-ground {
  position: absolute;
  left: 7%;
  right: 5%;
  bottom: 45px;
  height: 115px;
  background: #aecdb7;
  border-radius: 50%;
  box-shadow:
    0 17px 0 #7fa895,
    0 31px 0 -7px #dae7e0;
}
.library {
  position: absolute;
  left: 31%;
  bottom: 90px;
  width: 145px;
  height: 112px;
  background: #fff9e8;
  border-radius: 7px;
  border: 3px solid #37594c;
}
.roof {
  position: absolute;
  top: -43px;
  left: -17px;
  width: 172px;
  height: 52px;
  background: #668e7a;
  clip-path: polygon(50% 0, 100% 90%, 100% 100%, 0 100%, 0 90%);
}
.library-sign {
  position: absolute;
  top: 8px;
  left: 59px;
  font-size: 20px;
  font-weight: 700;
  color: #496a57;
}
.door {
  position: absolute;
  bottom: 0;
  left: 56px;
  background: #b5cbbd;
  width: 30px;
  height: 44px;
  border-radius: 20px 20px 0 0;
  border: 2px solid #496a57;
  border-bottom: 0;
}
.window {
  position: absolute;
  left: 14px;
  top: 49px;
  width: 24px;
  height: 28px;
  border: 3px solid #668e7a;
  border-radius: 4px;
  background: #dcecf2;
  box-shadow:
    86px 0 0 -3px #dcecf2,
    86px 0 0 0 #668e7a;
}
.tree {
  position: absolute;
  bottom: 100px;
  width: 12px;
  height: 67px;
  background: #57735a;
  border-radius: 8px;
}
.tree:before {
  content: "";
  position: absolute;
  left: -20px;
  top: -43px;
  width: 56px;
  height: 78px;
  border-radius: 46%;
  background: #81aa8d;
  box-shadow: inset -9px -4px #6c957a;
}
.tree-one {
  left: 17%;
}
.tree-two {
  right: 14%;
  height: 50px;
  transform: scale(0.8);
}
.guardian {
  position: absolute;
  right: 22%;
  bottom: 59px;
  height: 75px;
  width: 62px;
  background: #f9d68a;
  border: 3px solid #725e39;
  border-radius: 25px 25px 20px 20px;
  transform: rotate(8deg);
  box-shadow: 5px 7px 0 #799c8252;
}
.eyes {
  position: absolute;
  top: -16px;
  left: 12px;
  letter-spacing: 9px;
  font-size: 42px;
  color: #725e39;
}
.smile {
  position: absolute;
  bottom: 20px;
  left: 23px;
  width: 12px;
  height: 7px;
  border: 2px solid #725e39;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}
.sun {
  position: absolute;
  right: 20%;
  top: 15px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #e8cf94;
}
.cloud {
  position: absolute;
  background: #fff;
  opacity: 0.8;
  height: 20px;
  width: 62px;
  border-radius: 30px;
}
.cloud:before {
  content: "";
  position: absolute;
  width: 27px;
  height: 27px;
  background: white;
  top: -11px;
  left: 15px;
  border-radius: 50%;
}
.cloud-one {
  left: 12%;
  top: 48px;
}
.cloud-two {
  right: 5%;
  top: 80px;
  transform: scale(0.7);
}
.scene-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 10px;
  color: #637c6c;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: space-between;
  padding: 16px 4%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.topbar nav {
  display: flex;
  gap: 8px;
}
.nav-button {
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.nav-button.active {
  background: #eef4f1;
  color: var(--green);
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.account #account-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 26px 5%;
  font-size: 11px;
  color: var(--muted);
  gap: 20px;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 48px 32px;
  min-height: 70vh;
}
main:focus {
  outline: 0;
}
.map-heading {
  display: flex;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 32px;
}
.map-heading h1 {
  font-size: 34px;
  margin: 12px 0;
}
.progress-summary {
  display: flex;
  flex-direction: column;
  min-width: 170px;
  color: var(--muted);
  font-size: 12px;
}
.progress-summary strong {
  font-size: 36px;
  color: var(--ink);
  line-height: 1.3;
}
.progress-summary strong span {
  font-size: 18px;
  color: var(--muted);
  font-weight: 400;
}
progress {
  height: 7px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  accent-color: #497d65;
}
progress::-webkit-progress-bar {
  background: #dfe5e2;
}
progress::-webkit-progress-value {
  background: #497d65;
}
.continue-strip {
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--mint);
  border-radius: 18px;
  margin-bottom: 40px;
  gap: 20px;
}
.continue-strip small {
  color: var(--green);
}
.continue-strip h2 {
  margin: 4px 0;
  font-size: 21px;
}
.continue-strip p {
  font-size: 13px;
  margin: 0;
  color: #4c6859;
}
.academy-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.track {
  background: white;
  border-radius: 18px;
  padding: 26px;
}
.track-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid #edf0f1;
}
.track-number {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
  color: #4e7864;
}
.track-header h2 {
  font-size: 19px;
  margin: 0 0 5px;
}
.track-header p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.track-header > small {
  margin-left: auto;
  white-space: nowrap;
  color: var(--muted);
}
.lesson-path {
  list-style: none;
  padding: 14px 0 0;
  margin: 0;
}
.lesson-path li {
  position: relative;
  padding: 8px 0 12px;
}
.lesson-path li:not(:last-child):before {
  content: "";
  position: absolute;
  left: 20px;
  top: 45px;
  bottom: -15px;
  border-left: 2px dashed #dce7e1;
}
.lesson-path button {
  position: relative;
  text-align: left;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 0;
  width: 100%;
  background: none;
  min-height: 48px;
}
.lesson-node {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 15px;
  background: #e2eee7;
  color: #37654e;
  font-size: 22px;
  border: 2px solid #8fae9c;
}
.locked .lesson-node {
  background: #f1f3f4;
  color: #7a8589;
  border-color: #e1e6e8;
}
.completed .lesson-node {
  background: #4d7b62;
  color: white;
  border-color: #4d7b62;
}
.lesson-label {
  font-size: 14px;
  font-weight: 600;
}
.lesson-label small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  padding-top: 1px;
}
.lesson-path li > p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0 56px;
}
.map-footnote {
  color: var(--muted);
  font-size: 12px;
  margin-top: 24px;
}
.lesson-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.lesson-heading {
  max-width: 840px;
  margin-bottom: 40px;
}
.lesson-heading p {
  color: var(--muted);
}
.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.95fr);
  gap: 40px;
  align-items: start;
}
.lesson-reading {
  min-width: 0;
}
.reading-section {
  margin-bottom: 34px;
}
.section-index {
  font-size: 11px;
  color: #769182;
  letter-spacing: 1px;
}
.reading-section h2 {
  font-size: 22px;
  margin: 8px 0 15px;
}
.reading-section p {
  line-height: 1.95;
  font-size: 15px;
  color: #3d4c50;
  white-space: pre-wrap;
}
.exercise-panel {
  background: white;
  border-radius: 20px;
  padding: 28px;
  min-width: 0;
}
.exercise-panel h2 {
  font-size: 23px;
  margin: 10px 0;
}
.exercise-panel > .muted {
  font-size: 13px;
}
.exercise-panel h3 {
  margin: 25px 0 18px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
  min-width: 0;
}
legend {
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 10px;
  line-height: 1.7;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dfe5e7;
  border-radius: 10px;
  font-weight: 400;
  font-size: 13px;
  min-height: 44px;
  cursor: pointer;
  margin: 7px 0;
}
.quiz-option:has(:checked) {
  border-color: #4084c8;
  background: #eff6fd;
}
.quiz-option input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin: 4px 0 0;
  accent-color: var(--blue);
}
.practice-field {
  margin-bottom: 16px;
}
.practice-context {
  font-size: 12px;
}
.exercise-panel #lesson-submit {
  margin-top: 20px;
}
.result {
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  background: #fff5e4;
}
.result.passed {
  background: #edf6ef;
}
.result h3 {
  margin-top: 0;
}
.result p,
.result li {
  font-size: 13px;
}
.result ul {
  padding-left: 18px;
}
.result li {
  padding: 4px 0;
}
.result h4 {
  font-size: 14px;
  margin: 18px 0 6px;
}
.check-pass {
  color: var(--green);
}
.check-fail {
  color: var(--danger);
}
.result .primary {
  white-space: normal;
}
.empty-state {
  max-width: 650px;
  margin: 70px auto;
  text-align: center;
}
.empty-state h1 {
  margin-top: 20px;
}
.empty-state p {
  line-height: 1.9;
  color: var(--muted);
}
.loading {
  padding: 70px 0;
  text-align: center;
  color: var(--muted);
}
.notes-heading h1 {
  margin-top: 15px;
}
.notes-sheet {
  padding: 28px;
  background: white;
  border-radius: 18px;
}
.notes-sheet textarea {
  border-color: #dbe3e5;
  margin-top: 10px;
  background: #fffefb;
}
.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.notes-toolbar .primary {
  margin-left: auto;
}
dialog {
  max-width: min(620px, 92vw);
  border: 0;
  border-radius: 18px;
  padding: 30px;
  color: var(--ink);
  box-shadow: 0 12px 80px #1b302a30;
}
dialog::backdrop {
  background: #26393255;
}
dialog a {
  overflow-wrap: anywhere;
}
dialog p {
  font-size: 14px;
}
.dialog-close {
  display: block;
  margin-left: auto;
  margin-bottom: 20px;
  background: #edf0f1;
}
@media (min-width: 1500px) {
  .auth-story {
    padding-left: max(7%, calc((100vw - 1240px) / 2));
  }
}
@media (max-width: 1100px) {
  .topbar {
    gap: 14px;
  }
  .topbar .brand small {
    display: none;
  }
  .account {
    gap: 4px;
  }
  .topbar nav {
    gap: 0;
  }
  .nav-button {
    padding: 10px;
  }
  .lesson-layout {
    gap: 26px;
  }
  .story-foot {
    flex-direction: column;
    gap: 3px;
  }
  .auth-story {
    padding: 30px 7%;
  }
}
@media (max-width: 800px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-story {
    min-height: auto;
    padding: 24px 7%;
  }
  .story-copy {
    margin-top: 26px;
  }
  .story-copy h1 {
    font-size: 36px;
  }
  .story-copy p {
    font-size: 14px;
  }
  .welcome-island {
    position: absolute;
    width: 220px;
    height: 175px;
    min-height: 0;
    right: 8px;
    bottom: 30px;
    transform: scale(0.76);
    transform-origin: right bottom;
    opacity: 0.85;
  }
  .story-copy {
    max-width: 80%;
  }
  .story-foot {
    padding-top: 15px;
    max-width: 52%;
    font-size: 10px;
  }
  .auth-panel {
    padding: 32px 7% 40px;
  }
  .auth-card {
    max-width: 470px;
  }
  .auth-story .scene-caption {
    font-size: 9px;
  }
  .topbar {
    padding: 13px 20px;
    gap: 10px;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .topbar .brand {
    font-size: 14px;
  }
  .account #account-name {
    max-width: 95px;
  }
  .account {
    margin-left: auto;
  }
  .account .pill {
    font-size: 10px;
    padding: 3px 6px;
  }
  .account .text-button {
    font-size: 12px;
  }
  .map-heading h1 {
    font-size: 28px;
  }
  .academy-map {
    grid-template-columns: 1fr;
  }
  .lesson-layout {
    grid-template-columns: 1fr;
  }
  .lesson-reading {
    max-width: none;
  }
  .app-footer {
    flex-direction: column;
    gap: 4px;
  }
  .progress-summary {
    min-width: 135px;
  }
  .map-heading {
    gap: 20px;
  }
  .lesson-heading {
    margin-bottom: 28px;
  }
  main {
    padding: 30px 20px;
  }
  .notes-toolbar {
    gap: 12px;
  }
  .notes-toolbar .primary {
    width: 100%;
    margin-left: 0;
  }
}
@media (max-width: 480px) {
  .auth-story .brand small {
    display: none;
  }
  .story-copy {
    max-width: 100%;
  }
  .story-copy p {
    max-width: 75%;
  }
  .welcome-island {
    right: -25px;
    bottom: 30px;
    transform: scale(0.6);
  }
  .story-copy h1 {
    font-size: 32px;
  }
  .story-foot {
    font-size: 10px;
  }
  .map-heading {
    display: block;
  }
  .progress-summary {
    display: grid;
    grid-template-columns: 95px 1fr;
    align-items: center;
    gap: 3px 10px;
    margin-top: 20px;
  }
  .progress-summary strong {
    grid-row: span 2;
    font-size: 29px;
  }
  .progress-summary progress {
    margin: 0;
  }
  .progress-summary small {
    grid-column: 2;
  }
  .continue-strip {
    padding: 20px;
    display: block;
    margin-bottom: 24px;
  }
  .continue-strip .primary {
    margin-top: 18px;
    width: 100%;
  }
  .track {
    padding: 20px;
  }
  .track-header > small {
    display: none;
  }
  .track-header h2 {
    font-size: 18px;
  }
  .lesson-label {
    font-size: 13px;
  }
  .lesson-path li > p {
    font-size: 11px;
  }
  .topbar {
    padding: 10px 14px;
  }
  .topbar .brand {
    gap: 6px;
    font-size: 12px;
  }
  .brand-mark {
    width: 27px;
    height: 29px;
  }
  .account #account-name {
    max-width: 70px;
    font-size: 11px;
  }
  .account .pill {
    display: none;
  }
  main {
    padding: 26px 16px;
  }
  .exercise-panel {
    padding: 22px 18px;
  }
  .notes-sheet {
    padding: 20px 16px;
  }
  .notes-heading h1 {
    font-size: 28px;
  }
  .lesson-top {
    justify-content: space-between;
    gap: 5px;
  }
  .lesson-top .pill {
    font-size: 10px;
  }
  .lesson-heading h1 {
    font-size: 27px;
  }
  .nav-button {
    font-size: 13px;
    padding: 9px 12px;
  }
  .auth-panel {
    padding-top: 25px;
  }
  .tabline {
    margin-bottom: 23px;
  }
}
@media (max-width: 480px) {
  .welcome-island {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 300px);
    height: 250px;
    min-height: 250px;
    max-height: none;
    transform: none;
    opacity: 1;
    flex: none;
    margin: 4px auto 0;
  }
  .story-copy p {
    max-width: 100%;
  }
  .story-foot {
    max-width: 100%;
    flex-direction: row;
    gap: 12px;
    font-size: 10px;
  }
  .auth-story .scene-caption {
    font-size: 9px;
  }
  .story-copy {
    margin-top: 24px;
  }
  .story-copy h1 {
    margin-bottom: 16px;
  }
  .story-copy p {
    margin-bottom: 0;
  }
}
.mode-heading {
  margin-bottom: 32px;
  max-width: 760px;
}
.mode-heading h1 {
  margin: 15px 0;
}
.learning-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  border-block: 1px solid var(--line);
  padding: 20px 0;
  margin: 0 0 30px;
}
.learning-stats > div {
  min-width: 110px;
}
.learning-stats dt {
  font-size: 12px;
  color: var(--muted);
}
.learning-stats dd {
  margin: 5px 0 0;
  font-size: 25px;
  font-weight: 650;
}
.mission-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mission-card {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px;
  background: white;
  border-radius: 18px;
}
.case-number {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}
.mission-card > div {
  flex: 1;
}
.mission-card h2 {
  font-size: 21px;
  margin-bottom: 8px;
}
.mission-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 7px;
}
.mission-card small {
  color: var(--green);
}
.activity-section {
  margin-top: 40px;
}
.activity-section h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.activity-section > p {
  font-size: 13px;
}
.activity-section ol {
  padding: 0;
  list-style: none;
}
.activity-section li {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 14px;
}
.activity-section li small {
  color: var(--muted);
}
.review-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 24px;
}
.review-card {
  padding: 28px;
  background: white;
  border-radius: 18px;
}
.review-card h2 {
  font-size: 21px;
  margin: 10px 0 20px;
}
.review-feedback {
  font-size: 14px;
  margin: 18px 0 0;
  white-space: pre-wrap;
}
.review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.case-artifacts {
  min-width: 0;
}
.topbar nav {
  gap: 1px;
}
.topbar .brand small {
  display: none;
}
.topbar {
  gap: 15px;
}
.nav-button {
  padding-inline: 12px;
}
@media (max-width: 800px) {
  .topbar nav {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 4px;
  }
  .nav-button {
    flex-shrink: 0;
  }
  .review-list {
    grid-template-columns: 1fr;
  }
  .mission-card {
    flex-wrap: wrap;
    gap: 14px;
    padding: 24px;
  }
  .case-number {
    width: 100%;
  }
  .mission-card > div {
    flex-basis: 100%;
  }
  .mission-card > button {
    width: 100%;
  }
  .learning-stats {
    gap: 18px;
  }
  .learning-stats > div {
    min-width: 90px;
  }
}
.lobby-layout,
.room-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}
.room-entry,
.room-list,
.teaching-console,
.policy-panel,
.evidence-submit,
.match-history,
.match-review:not(:empty) {
  background: white;
  padding: 28px;
  border-radius: 18px;
  min-width: 0;
}
.room-entry h2,
.room-list h2,
.room-tools h2,
.evidence-submit h2,
.match-history h2,
.match-review h2 {
  font-size: 22px;
}
.room-entry .muted,
.room-tools .muted,
.evidence-submit .muted {
  font-size: 13px;
}
.room-entry form {
  margin-top: 25px;
}
.room-entry #create-room .primary {
  margin-top: 16px;
}
.inline-form {
  display: flex;
  gap: 10px;
  align-items: start;
}
.inline-form input {
  min-width: 0;
  flex: 1;
}
.inline-form button {
  flex-shrink: 0;
}
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.section-toolbar h2 {
  margin-bottom: 0;
}
.room-list ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.room-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.room-list li p {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}
.quiet-empty {
  padding: 35px 0;
  color: var(--muted);
}
.quiet-empty h3 {
  color: var(--ink);
}
.quiet-empty p {
  font-size: 14px;
}
.rules-strip {
  margin-top: 28px;
  padding: 24px 0;
  border-block: 1px solid var(--line);
}
.rules-strip h2 {
  font-size: 20px;
}
.rules-strip p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.reconnect-strip {
  background: #e6efe9;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 28px;
}
.reconnect-strip p {
  font-size: 13px;
}
.room-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.room-title h1 {
  font-size: 30px;
  margin: 12px 0;
}
.room-title h1 span {
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--muted);
}
.danger-button {
  color: #9b3035;
  background: #faebeb;
}
.scope-note {
  font-size: 12px;
  color: var(--muted);
}
.arena-scene {
  position: relative;
  background: #e9f1eb;
  border-radius: 20px;
  padding: 25px 30px 42px;
  margin: 25px 0 18px;
}
.phase-badge {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
}
.phase-badge strong {
  font-size: 15px;
}
.phase-badge span {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.phase-badge small {
  color: var(--muted);
}
.station-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 800px;
  margin: auto;
}
.island-station {
  text-align: center;
  padding-top: 12px;
}
.island-station h2 {
  font-size: 19px;
  margin: 8px 0 4px;
}
.island-station p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 7px;
}
.island-station > strong {
  font-size: 22px;
  font-weight: 650;
}
.island-station > small {
  display: block;
  color: var(--muted);
}
.mini-island {
  position: relative;
  width: 220px;
  height: 135px;
  margin: auto;
}
.mini-island:before {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 5px;
  right: 5px;
  height: 65px;
  background: #b4ceb6;
  border-radius: 50%;
  box-shadow: 0 9px #8dad99;
}
.mini-house {
  position: absolute;
  bottom: 40px;
  left: 63px;
  width: 86px;
  height: 63px;
  background: #fff8e1;
  border: 2px solid #4b6d56;
  border-radius: 6px;
  display: grid;
  place-items: center;
}
.mini-house:before {
  content: "";
  position: absolute;
  top: -31px;
  left: -12px;
  width: 106px;
  height: 32px;
  background: #608d72;
  clip-path: polygon(50% 0, 100% 90%, 100% 100%, 0 100%, 0 90%);
}
.mini-house span {
  font-size: 22px;
  color: #57765f;
}
.mini-tree {
  position: absolute;
  bottom: 43px;
  right: 31px;
  width: 9px;
  height: 37px;
  background: #688369;
  border-radius: 5px;
}
.mini-tree:before {
  content: "";
  position: absolute;
  width: 36px;
  height: 51px;
  left: -13px;
  top: -28px;
  background: #8aaf8a;
  border-radius: 45%;
}
.other-station .mini-island:before {
  background: #c4d3cc;
  box-shadow: 0 9px #9ab1a4;
}
.other-station .mini-house:before {
  background: #7b9090;
}
.empty-island {
  height: 135px;
  display: grid;
  place-items: center;
  color: #89a38f;
  font-size: 48px;
  font-weight: 300;
}
.empty-station h2 {
  font-size: 16px;
  color: var(--muted);
}
.arena-scene .scene-caption {
  bottom: 12px;
}
.room-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.room-buttons #room-sync {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.room-tools h2 {
  margin: 10px 0;
}
.command-templates {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.command-templates button {
  font-size: 11px;
  padding: 8px 12px;
  background: #edf3ef;
  font-weight: 500;
}
.room-tools textarea {
  font-family: ui-monospace, "Microsoft YaHei", monospace;
  font-size: 13px;
}
.room-tools form .primary {
  margin-top: 14px;
}
.room-tools details {
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}
.room-tools summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--ink);
}
.policy-glossary dt {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  margin-top: 10px;
  color: var(--ink);
}
.policy-glossary dd {
  margin: 4px 0 0;
  font-size: 12px;
}
.evidence-submit {
  margin-top: 25px;
}
.match-history,
.match-review:not(:empty) {
  margin-top: 25px;
}
.match-history pre,
.match-review pre {
  max-height: 330px;
  overflow: auto;
}
.match-history svg {
  width: 100%;
  max-height: 240px;
}
.chart-label {
  font-size: 12px;
  color: var(--muted);
}
.event-list {
  padding-left: 20px;
  font-size: 12px;
  color: var(--muted);
}
.event-list li {
  padding: 6px 0;
}
.match-history details {
  font-size: 12px;
}
.match-history summary {
  cursor: pointer;
  padding: 12px 0;
  min-height: 44px;
}
.coach-panel {
  margin-top: 32px;
  background: #edf2f5;
  border-radius: 18px;
  padding: 28px;
}
.coach-panel h2 {
  font-size: 22px;
  margin: 12px 0;
}
.coach-panel > p {
  font-size: 13px;
  color: var(--muted);
  max-width: 820px;
}
.coach-panel textarea {
  background: white;
  min-height: 90px;
  max-width: 900px;
}
.coach-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  font-weight: 400;
  margin: 15px 0;
  max-width: 820px;
  min-height: 44px;
}
.coach-consent input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.coach-answer {
  background: white;
  border-radius: 12px;
  padding: 18px;
  margin-top: 18px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.coach-answer:empty {
  display: none;
}
.coach-status {
  font-size: 12px;
  margin: 14px 0 0;
  color: var(--muted);
}
@media (max-width: 800px) {
  .lobby-layout,
  .room-tools {
    grid-template-columns: 1fr;
  }
  .room-title {
    display: block;
  }
  .room-title > div:last-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .room-entry,
  .room-list,
  .teaching-console,
  .policy-panel,
  .evidence-submit,
  .match-history,
  .match-review:not(:empty) {
    padding: 22px 18px;
  }
  .station-pair {
    gap: 8px;
  }
  .mini-island {
    width: 145px;
    height: 120px;
  }
  .mini-house {
    left: 27px;
    bottom: 38px;
    width: 75px;
    height: 55px;
  }
  .mini-house:before {
    width: 95px;
  }
  .mini-tree {
    right: 10px;
  }
  .island-station h2 {
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  .island-station p {
    font-size: 10px;
  }
  .island-station > strong {
    font-size: 19px;
  }
  .arena-scene {
    padding: 20px 8px 40px;
  }
  .phase-badge {
    gap: 10px;
  }
  .phase-badge strong {
    font-size: 12px;
  }
  .empty-station h2 {
    font-size: 13px;
  }
  .empty-station p {
    font-size: 11px;
  }
  .room-title h1 {
    font-size: 25px;
  }
  .room-buttons #room-sync {
    margin-left: 0;
    flex-basis: 100%;
  }
  .coach-panel {
    padding: 24px 18px;
  }
  .inline-form {
    flex-wrap: wrap;
  }
  .inline-form button {
    width: 100%;
  }
  .phase-badge span {
    font-size: 23px;
  }
  .room-tools #terminal-send {
    white-space: normal;
    width: 100%;
  }
}
.handbook-pane {
  background: white;
  border-radius: 18px;
  padding: 28px;
}
.handbook-search {
  max-width: 780px;
  margin-bottom: 24px;
}
.handbook-status {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0;
}
.handbook-entry {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.handbook-entry > summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 650;
}
.handbook-entry > summary small {
  font-weight: 400;
  color: var(--muted);
}
.handbook-entry > p {
  font-size: 13px;
  margin-top: 18px;
}
.handbook-entry section {
  margin: 22px 0;
}
.handbook-entry h3 {
  font-size: 17px;
  margin-bottom: 12px;
}
.handbook-entry section p {
  font-size: 14px;
  line-height: 1.9;
}
.handbook-entry li {
  font-size: 12px;
  margin: 8px 0;
}
.review-due {
  font-size: 11px;
}
.topbar nav {
  overflow-x: auto;
  min-width: 0;
}
.nav-button {
  white-space: nowrap;
}
@media (max-width: 800px) {
  .handbook-pane {
    padding: 22px 18px;
  }
}
.request-builder {
  background: #f2f6f3;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.request-builder .request-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.request-builder label {
  font-size: 12px;
}
.request-builder select {
  font-size: 12px;
  padding: 8px;
}
.request-builder p {
  font-size: 11px;
  margin: 10px 0 0;
}
.request-builder > button {
  margin-top: 14px;
  width: 100%;
  font-size: 12px;
}
.chart-self {
  color: #387a58;
  font-weight: 650;
}
.chart-opponent {
  color: #a8703e;
  font-weight: 650;
}
.real-scene-host:has(canvas) + #room-live .mini-island,
.real-scene-host:has(canvas) + #room-live .empty-island {
  display: none;
}
.real-scene-host:has(canvas) + #room-live .island-station {
  padding-top: 15px;
}
.real-scene-host:has(canvas) + #room-live .arena-scene {
  margin-top: 0;
  padding-top: 15px;
  background: #eef3ef;
}
.scene-section {
  margin: 0 0 28px;
}
.real-scene-host {
  height: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #e8f0eb;
  margin-bottom: 16px;
}
.scene-fallback {
  display: grid;
  place-items: center;
  padding: 30px;
  min-height: 240px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.scene-help {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.real-scene-host canvas {
  display: block;
  max-width: 100%;
}
@media (max-width: 800px) {
  .real-scene-host {
    height: 240px;
  }
}
.tactical-resources{padding:22px;border-radius:16px;background:#f4eddf;margin:0 0 20px}.tactical-resources h3{font-size:17px;margin-bottom:10px}.tactical-resources p,.tactical-resources li,.observed-hints li{font-size:12px;color:var(--muted)}.tactical-meters{display:flex;gap:25px;flex-wrap:wrap;margin:16px 0}.tactical-meters dt{font-size:11px;color:var(--muted)}.tactical-meters dd{font-size:20px;font-weight:650;margin:5px 0 0}
/* Reference-only atlas: quiet directory and a focused, single-column reader. */
.atlas-library { max-width: 1120px; margin: 0 auto; }
.atlas-boundary { max-width: 88ch; font-size: 14px; color: var(--green); }
.atlas-search { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, .65fr) auto auto; align-items: end; gap: 14px; padding: 24px; border-radius: 18px; background: #fff; margin-bottom: 20px; }
.atlas-search > div { min-width: 0; }
.atlas-search > p { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin: 0; }
#atlas-domain-description, #atlas-notice, #atlas-status { font-size: 14px; overflow-wrap: anywhere; }
#atlas-status { margin: 16px 0 8px; font-weight: 600; }
.atlas-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 28px; }
.atlas-card { min-width: 0; padding: 24px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.atlas-card-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; color: var(--muted); font-size: 12px; }
.atlas-card-meta small { color: var(--green); }
.atlas-card h2 { margin: 8px 0; font-size: 20px; }
.atlas-open { background: none; text-align: left; border-radius: 4px; padding: 5px 0; color: var(--ink); font-size: inherit; width: 100%; }
.atlas-card > p { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.atlas-read-hint { color: var(--blue); font-size: 12px; }
.atlas-results .quiet-empty { grid-column: 1 / -1; }
.atlas-reader { max-width: 780px; margin: 0 auto; overflow-wrap: anywhere; }
.atlas-reader-heading { margin: 24px 0; }
.atlas-reader h1 { margin-top: 12px; }
.atlas-reader-heading > .muted { font-size: 13px; }
.atlas-objective { font-size: 18px; line-height: 1.8; }
.atlas-objective strong { display: block; font-size: 12px; color: var(--green); margin-bottom: 6px; }
.atlas-jump { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.atlas-jump a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.atlas-reading-section { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.atlas-reading-section h2 { font-size: 20px; margin-bottom: 18px; }
.atlas-reading-section p { white-space: pre-wrap; line-height: 1.95; }
.atlas-reading-section p:last-child { margin-bottom: 0; }
.atlas-example, .atlas-question { background: #fff; padding: 24px; border: 1px solid var(--line); border-radius: 16px; margin: 24px 0 0; }
.atlas-question { background: #edf4ef; }
.atlas-question small { display: block; color: var(--muted); margin-top: 16px; }
.atlas-references { padding-left: 22px; }
.atlas-references li { margin-bottom: 18px; }
.atlas-references a { display: inline-block; padding: 8px 0; min-height: 44px; }
.atlas-references small { display: block; color: var(--muted); }
#atlas-back-bottom { margin-top: 24px; }
@media (max-width: 1000px) {
  .atlas-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .atlas-search button { width: 100%; }
}
@media (max-width: 600px) {
  .atlas-search { padding: 18px; gap: 14px 10px; }
  .atlas-query-field, .atlas-domain-field { grid-column: 1 / -1; }
  .atlas-results { grid-template-columns: minmax(0, 1fr); }
  .atlas-reader-heading { margin-top: 18px; }
  .atlas-example, .atlas-question { padding: 20px; }
  .atlas-reading-section h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
