:root {
  --green: #183f36;
  --deep: #102e27;
  --gold: #e7b443;
  --cream: #faf7ed;
  --ink: #1a332c;
  --line: #dedfd6;
  font-family: Heebo, Arial, sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
  background: #ece5d5;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #d6a62d;
  outline-offset: 5px;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:hover {
  filter: brightness(1.04);
}
a {
  color: inherit;
}
button,
dialog {
  transition:
    background 0.2s,
    opacity 0.2s,
    transform 0.2s;
}
button:active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
#world,
#entrance {
  position: fixed;
  inset: 0;
}
#world canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#entrance {
  background: url("/assets/entrance.jpg") center center/cover no-repeat;
  z-index: 3;
}
.entrance-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      270deg,
      rgba(10, 35, 27, 0.77),
      rgba(10, 35, 27, 0.33) 41%,
      transparent 73%
    ),
    linear-gradient(0deg, rgba(10, 35, 27, 0.32), transparent 25%);
}
.topbar {
  position: fixed;
  z-index: 12;
  top: 22px;
  inset-inline: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 249, 242, 0.95);
  padding: 14px 22px;
  border: 1px solid #ffffff7a;
  border-radius: 18px;
  box-shadow: 0 6px 30px #14372a12;
  backdrop-filter: blur(20px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: right;
  background: none;
  font-weight: 800;
  font-size: 23px;
  padding: 0;
}
.brand svg {
  width: 42px;
  height: 42px;
}
.brand small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1px;
  color: #64766e;
}
.topbar nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
.topbar nav > button {
  background: none;
  font-size: 14px;
  font-weight: 600;
}
.icon-button {
  border: 1px solid #cbd3cb !important;
  border-radius: 50%;
  width: 33px;
  height: 33px;
}
.welcome {
  position: absolute;
  right: 7%;
  top: 50%;
  transform: translateY(-36%);
  color: #fff9ed;
  max-width: 540px;
}
.eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.sun {
  color: #edc15c;
  margin-left: 8px;
  font-size: 22px;
}
h1,
h2,
p {
  margin: 0;
}
.welcome h1 {
  font-size: clamp(48px, 5.5vw, 84px);
  line-height: 1.13;
  font-weight: 800;
  letter-spacing: -2px;
  margin: 22px 0;
}
.welcome p {
  font-size: 20px;
  opacity: 0.9;
  margin-bottom: 34px;
}
.primary {
  background: var(--gold);
  padding: 15px 27px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 5px 15px #163b2012;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  color: #183b31;
  min-height: 50px;
}
.button-spark {
  font-size: 21px;
}
.text-button {
  background: none;
  color: inherit;
  border-bottom: 1px solid #ffffff70;
  padding: 7px 0;
  font-size: 15px;
  margin-right: 25px;
}
.entrance-foot {
  position: absolute;
  bottom: 28px;
  inset-inline: 40px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 13px;
}
.location {
  position: fixed;
  right: 44px;
  top: 140px;
  z-index: 4;
  pointer-events: none;
  text-shadow: 0 1px 9px #fff;
  background: linear-gradient(270deg, #faf7eddf, #faf7ed90, transparent);
  padding: 17px 20px 22px 50px;
  border-right: 3px solid var(--gold);
}
.location h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 5px 0;
}
.location p {
  font-size: 15px;
  color: #506356;
}
.bottom-bar {
  position: fixed;
  z-index: 5;
  bottom: 24px;
  left: 30px;
  right: 30px;
  border: 1px solid #fff9;
  background: rgba(250, 249, 242, 0.96);
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 20px;
  backdrop-filter: blur(20px);
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
}
.breadcrumbs button {
  background: none;
  font-size: 14px;
  padding: 5px 0;
}
.breadcrumbs button[aria-current] {
  font-weight: 800;
}
.breadcrumbs span {
  color: #abb2a7;
}
.quiet-button {
  background: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 7px;
}
.quiet-button:hover {
  background: #e6eadd;
}
.scene-caption {
  position: fixed;
  z-index: 4;
  bottom: 105px;
  left: 50%;
  transform: translateX(-50%);
  background: #173d35e6;
  color: #fffdf5;
  border: 1px solid #ffffff30;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 13px;
  white-space: nowrap;
}
dialog {
  padding: 0;
  border: 1px solid #fff;
  border-radius: 22px;
  background: var(--cream);
  color: var(--ink);
  max-height: calc(100dvh - 70px);
  width: min(1120px, calc(100vw - 60px));
  box-shadow: 0 30px 100px #092a2966;
}
dialog::backdrop {
  background: #102d27a8;
  backdrop-filter: blur(9px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px 36px 20px;
  gap: 20px;
}
.dialog-head h2 {
  font-size: 32px;
  letter-spacing: -0.7px;
  margin: 7px 0;
}
.dialog-head p {
  font-size: 15px;
  color: #758076;
}
.close {
  font: 32px Arial;
  background: transparent;
  border-radius: 50%;
  height: 38px;
  width: 38px;
  flex-shrink: 0;
}
.close:hover {
  background: #e4e6db;
}
.gallery-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 15px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #dce1d5;
  border-radius: 10px;
  width: 430px;
  padding: 0 14px;
}
.search span {
  font-size: 28px;
}
.search input {
  background: none;
  border: 0;
  width: 100%;
  outline: none;
  padding: 12px 0;
  font-size: 15px;
  color: var(--green);
}
#result-count {
  font-size: 14px;
  color: #6c7b6b;
  white-space: nowrap;
}
.filters {
  display: flex;
  gap: 8px;
  padding: 20px 36px 25px;
  overflow: auto;
}
.filters button {
  background: #e9ece3;
  border: 1px solid transparent;
  white-space: nowrap;
  padding: 9px 17px;
  border-radius: 30px;
  font-size: 14px;
}
.filters button[aria-pressed="true"] {
  background: var(--green);
  color: white;
}
.card-topic {
  font-size: 12px;
  color: #7c826f;
}
.gallery-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 36px;
  font-size: 13px;
  color: #6b786a;
}
.gallery-footer a {
  text-underline-offset: 4px;
}
#empty {
  padding: 45px;
  text-align: center;
  color: #6b786a;
}
#player {
  max-width: 1020px;
  background: #faf8f0;
}
.player-top {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.video-frame {
  aspect-ratio: 16/9;
  background: #102a25;
}
.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
#help {
  width: min(510px, calc(100vw - 36px));
  padding: 32px;
}
#help > .close {
  position: absolute;
  left: 15px;
  top: 12px;
}
#help h2 {
  font-size: 29px;
  margin: 10px 0 16px;
  line-height: 1.4;
}
#help p {
  font-size: 16px;
  line-height: 1.8;
  color: #657264;
}
.help-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 15px 0;
  font-size: 14px;
}
#help > .primary {
  margin-top: 16px;
  width: 100%;
}
#toast {
  position: fixed;
  z-index: 40;
  bottom: 115px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  background: #173e36;
  color: white;
  padding: 15px 24px;
  border-radius: 12px;
  box-shadow: 0 5px 20px #153e3333;
  font-size: 15px;
  max-width: 90vw;
  text-align: center;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%);
  transition: 0.2s;
}
#loader {
  position: fixed;
  z-index: 15;
  inset: 0;
  background: #faf7edf2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.loader-book {
  font-size: 48px;
  color: var(--gold);
  animation: spin 3s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
body.in-school .room-only {
  display: none;
}
body.in-classroom .room-only {
  display: initial;
}
@media (max-width: 700px) {
  .topbar {
    top: 12px;
    inset-inline: 12px;
    padding: 12px 14px;
    border-radius: 13px;
  }
  .brand {
    font-size: 19px;
    gap: 7px;
  }
  .brand svg {
    width: 32px;
    height: 36px;
  }
  .brand small {
    font-size: 10px;
  }
  .topbar nav {
    gap: 8px;
  }
  .topbar nav > button {
    font-size: 12px;
  }
  .icon-button {
    width: 28px;
    height: 28px;
  }
  .welcome {
    right: 28px;
    left: 28px;
    top: auto;
    bottom: 105px;
    transform: none;
  }
  .welcome h1 {
    font-size: 55px;
    line-height: 1.15;
    margin: 17px 0;
  }
  .welcome p {
    font-size: 18px;
    margin-bottom: 26px;
  }
  .welcome .primary {
    padding: 14px 19px;
    font-size: 16px;
    gap: 18px;
  }
  .text-button {
    margin-right: 18px;
    font-size: 14px;
  }
  #entrance {
    background-position: 46% center;
  }
  .entrance-shade {
    background: linear-gradient(0deg, #0c2d25ef, #0c2d2560 65%, #0c2d2505);
  }
  .entrance-foot {
    inset-inline: 25px;
    bottom: 24px;
    font-size: 11px;
    gap: 15px;
  }
  .location {
    top: 106px;
    right: 16px;
    padding: 10px 13px 14px 30px;
  }
  .location h1 {
    font-size: 23px;
  }
  .location p {
    font-size: 13px;
  }
  .bottom-bar {
    bottom: 12px;
    inset-inline: 12px;
    gap: 5px;
    padding: 10px;
  }
  .breadcrumbs {
    gap: 7px;
  }
  .breadcrumbs button,
  .quiet-button {
    font-size: 12px;
  }
  .bottom-bar #motion-button {
    display: none;
  }
  .scene-caption {
    bottom: 86px;
    font-size: 11px;
    padding: 9px 13px;
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }
  .dialog-head {
    padding: 23px 20px 18px;
  }
  .dialog-head h2 {
    font-size: 25px;
    line-height: 1.4;
  }
  .dialog-head p {
    font-size: 14px;
  }
  .gallery-tools {
    padding: 0 20px;
  }
  .search {
    width: 100%;
  }
  .search input {
    font-size: 14px;
  }
  .filters {
    padding: 18px 20px;
  }
  .gallery-footer {
    padding: 18px;
    flex-direction: column;
    gap: 10px;
  }
  .player-top {
    padding: 8px 13px;
  }
  .help-row {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 390px) {
  .welcome h1 {
    font-size: 48px;
  }
  .welcome .primary {
    font-size: 14px;
    padding: 14px;
  }
  .text-button {
    margin-right: 10px;
  }
  .topbar nav > button {
    font-size: 11px;
  }
  .brand small {
    display: none;
  }
}
.video-frame {
  height: min(52dvh, 56.25vw, 560px);
  aspect-ratio: auto;
}
@media (max-width: 700px) {
  .location {
    max-width: calc(100vw - 32px);
  }
}
.location {
  top: 125px;
  padding: 12px 16px 15px 35px;
  right: 32px;
  max-width: 310px;
  background: linear-gradient(270deg, #faf7eddf, #faf7ed90, transparent);
}
.location h1 {
  font-size: 24px;
}
.location p {
  font-size: 13px;
}
.joystick {
  display: none;
  position: fixed;
  z-index: 7;
  left: 25px;
  bottom: 128px;
  width: 108px;
  height: 108px;
  border: 1px solid #fff8;
  border-radius: 50%;
  background: #faf7ed33;
  backdrop-filter: blur(4px);
  touch-action: none;
  direction: ltr;
  user-select: none;
}
.joystick-knob {
  position: absolute;
  left: 32px;
  top: 32px;
  height: 44px;
  width: 44px;
  border: 1px solid #fff9;
  border-radius: 50%;
  background: #faf7edc9;
  box-shadow: 0 2px 10px #142d2720;
  pointer-events: none;
}
.joystick-label {
  position: absolute;
  top: 118px;
  left: 0;
  right: 0;
  text-align: center;
  color: #334e41;
  font-size: 12px;
}
.scene-caption {
  font-size: 12px;
  background: #faf7ede8;
  color: #385242;
  border: 1px solid #ffffff80;
  border-radius: 6px;
  bottom: 108px;
  padding: 9px 16px;
}
.topbar {
  border-radius: 12px;
}
.bottom-bar {
  border-radius: 9px;
}
#loader p {
  max-width: 280px;
  line-height: 1.7;
  text-align: center;
}
#loader .loader-book {
  animation: none;
}
@media (pointer: coarse) {
  .joystick {
    display: block;
  }
}
@media (max-width: 700px) {
  .joystick {
    display: block;
    left: 18px;
    bottom: 140px;
    width: 100px;
    height: 100px;
  }
  .joystick-knob {
    left: 28px;
    top: 28px;
  }
  .joystick-label {
    top: 107px;
  }
  .location {
    top: 94px;
    right: 15px;
    padding: 9px 12px 12px 22px;
    max-width: 230px;
  }
  .location h1 {
    font-size: 20px;
  }
  .location p {
    font-size: 12px;
  }
  .scene-caption {
    bottom: 82px;
    font-size: 10px;
    max-width: 90vw;
    white-space: normal;
    text-align: center;
  }
  .topbar {
    border-radius: 9px;
  }
  .bottom-bar {
    padding: 9px;
  }
}
.travel-button {
  position: fixed;
  bottom: 105px;
  right: 30px;
  z-index: 8;
  font-size: 14px;
  padding: 13px 21px;
}
.topbar a {
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid #ddd9cd;
  border-radius: 6px;
}
.topbar nav {
  gap: 10px;
}
@media (max-width: 700px) {
  .topbar {
    padding: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar nav {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }
  .topbar .brand {
    margin: auto;
  }
  .topbar a {
    font-size: 11px;
    padding: 8px;
  }
  .location {
    top: 140px !important;
    max-width: 245px;
  }
  .travel-button {
    bottom: 92px;
    right: 14px;
    padding: 12px 16px;
    font-size: 13px;
  }
}
@media (max-width: 700px) {
  .topbar nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .topbar nav a {
    font-size: 10px;
    padding: 7px;
  }
  .topbar nav #library-button {
    font-size: 11px;
  }
  .location {
    top: 150px !important;
  }
}
body .topbar {
  top: 18px;
  inset-inline: 24px;
  padding: 11px 18px;
  background: #faf7edf0;
  border-radius: 12px;
}
body .brand {
  font-size: 20px;
}
body .brand svg {
  width: 34px;
  height: 36px;
}
body .location {
  top: 112px;
  right: 28px;
  padding: 9px 14px;
  max-width: 240px;
  background: #faf7edc9;
  border-right: 2px solid #d9b65b;
  border-radius: 4px;
}
body .location h1 {
  font-size: 21px;
}
body .location p {
  font-size: 12px;
}
body .scene-caption {
  left: 30px;
  transform: none;
}
body .travel-button {
  background: #234b3d;
  color: #fff9eb;
  box-shadow: 0 4px 20px #112e2429;
  border: 1px solid #ffffff50;
}
#school-map {
  position: fixed;
  z-index: 10;
  left: 30px;
  bottom: 104px;
  width: 285px;
  background: #faf8ef;
  border: 1px solid #d8dfd4;
  border-radius: 12px;
  box-shadow: 0 10px 40px #183f362b;
  padding: 16px;
}
#school-map canvas {
  width: 100%;
  height: auto;
  display: block;
}
.map-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}
.map-head button {
  background: none;
  font-size: 25px;
  width: 35px;
  height: 35px;
}
.map-actions {
  display: flex;
  gap: 8px;
}
.map-actions button {
  background: #e5eadd;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  flex: 1;
}
.map-actions button:last-child {
  background: #284b3f;
  color: #fff;
}
body .location p {
  font-size: 14px;
}
body .topbar nav > button,
body .quiet-button,
body .breadcrumbs button {
  font-size: 14px;
}
@media (max-width: 700px) {
  #school-map {
    left: 12px;
    bottom: 83px;
    width: 260px;
  }
  body .topbar {
    flex-wrap: nowrap;
  }
  body .topbar nav {
    width: auto;
    gap: 12px;
  }
  body .brand {
    margin: 0;
  }
  body .brand small {
    display: none;
  }
  body .brand svg {
    width: 28px;
  }
  body .topbar nav #library-button {
    font-size: 14px;
  }
  body .location {
    top: 82px !important;
  }
  body .bottom-bar {
    flex-wrap: wrap;
    gap: 5px 15px;
  }
  body .breadcrumbs {
    flex: 1 1 100%;
  }
  body .travel-button {
    bottom: 122px;
  }
  body .joystick {
    bottom: 152px;
  }
  body .joystick-label {
    font-size: 14px;
  }
  body .bottom-bar .quiet-button {
    padding: 7px 8px;
    font-size: 14px;
  }
}
@media (max-width: 700px) {
  body .topbar {
    top: 10px;
    inset-inline: 10px;
    padding: 9px 12px;
  }
  body .topbar nav {
    flex-wrap: nowrap;
  }
  body .brand {
    font-size: 18px;
  }
  body .location {
    top: 126px !important;
    right: 14px;
    padding: 6px 10px;
    max-width: 190px;
  }
  body .location h1 {
    font-size: 17px;
  }
  body .location p {
    display: none;
  }
  body .scene-caption {
    display: none;
  }
  body .travel-button {
    bottom: 98px;
    max-width: 190px;
    padding: 12px 17px;
  }
}
@media (max-width: 700px) {
  body .location {
    top: 82px !important;
  }
  body .travel-button {
    bottom: 122px;
  }
}
body .location {
  pointer-events: none;
}
.campus-map {
  max-height: calc(100dvh - 160px);
  overflow: auto;
  width: 310px !important;
}
.campus-map canvas {
  max-height: 240px;
  object-fit: contain;
}
.grade-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}
.grade-picker button {
  border: 1px solid #d4dbd2;
  border-radius: 7px;
  background: #f6f3e9;
  padding: 7px 0;
  font: 600 15px Heebo;
  color: #294d40;
}
.grade-picker button[aria-pressed="true"] {
  background: #294d40;
  color: #fff;
}
.campus-map p {
  font-size: 13px;
  margin: 10px 0;
  text-align: center;
  color: #50675a;
}
.campus-map .map-actions {
  flex-wrap: wrap;
  gap: 5px;
}
.campus-map .map-actions button {
  font-size: 12px;
  padding: 9px;
}
.campus-map #map-quick {
  background: #294d40;
  color: #fff;
}
.route-status {
  position: fixed;
  bottom: 116px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  align-items: center;
  background: #f8f5eced;
  color: #284b3f;
  padding: 8px 15px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 3px 20px #102d2410;
  z-index: 8;
}
.route-status[hidden] {
  display: none;
}
.route-status button {
  border: 0;
  border-bottom: 1px solid #82968b;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
body #empty {
  padding: 48px 26px;
  font-size: 20px;
  line-height: 1.8;
  text-align: center;
  max-width: 650px;
  margin: auto;
}
@media (max-width: 700px) {
  .campus-map {
    width: 280px !important;
    bottom: 155px !important;
    max-height: calc(100dvh - 245px);
  }
  .campus-map canvas {
    max-height: 180px;
  }
  .route-status {
    bottom: 215px;
    font-size: 12px;
    width: max-content;
    max-width: 90vw;
  }
  .campus-map .map-actions button {
    font-size: 12px;
  }
  .campus-map .map-head {
    margin-bottom: 6px;
  }
  body .location h1 {
    font-size: 25px;
  }
}
.unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 20px 36px 32px;
}
.unit-card {
  text-align: right;
  background: #fffdf7;
  border: 1px solid #dfe3d8;
  border-radius: 16px;
  padding: 24px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.unit-card:hover {
  background: #f4f5e9;
  box-shadow: 0 7px 24px #254b3910;
}
.unit-top,
.unit-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.unit-number {
  font-size: 13px;
  color: #687c6c;
}
.unit-mark {
  font-size: 26px;
  font-weight: 600;
  color: #8a7047;
  font-family: Georgia, serif;
}
.unit-card h3 {
  font-size: 25px;
  margin: 20px 0 8px;
}
.unit-card p {
  color: #657566;
  font-size: 15px;
  line-height: 1.7;
  max-width: 350px;
}
.unit-foot {
  margin-top: 25px;
  border-top: 1px solid #e5e7db;
  padding-top: 16px;
  font-size: 12px;
  flex-wrap: wrap;
}
.unit-foot strong {
  font-size: 14px;
  color: #294d40;
}
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 36px 30px;
}
.lesson-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fffdf7;
  border: 1px solid #dce2d7;
  border-radius: 13px;
  padding: 18px;
  text-align: right;
}
.lesson-card:hover {
  background: #f1f3e7;
}
.lesson-number {
  font-size: 28px;
  color: #9a8156;
  font-weight: 500;
  min-width: 38px;
}
.lesson-copy {
  flex: 1;
}
.lesson-card h3 {
  font-size: 19px;
  line-height: 1.5;
  margin: 4px 0;
}
.lesson-card p {
  font-size: 14px;
  line-height: 1.65;
  color: #657566;
}
.lesson-card img {
  width: 150px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
}
.lesson-cta {
  display: block;
  color: #294d40;
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
}
#player {
  max-width: 1160px;
  width: calc(100vw - 48px);
}
.lesson-heading {
  padding: 4px 30px 24px;
  border-bottom: 1px solid #e1e4d8;
}
.lesson-heading h2 {
  font-size: 28px;
  line-height: 1.45;
  margin: 8px 0;
}
.lesson-heading p {
  color: #64765e;
  line-height: 1.8;
  font-size: 16px;
}
.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 26px;
  padding: 24px 30px 30px;
}
.lesson-main {
  min-width: 0;
}
.phase-label {
  font-size: 12px;
  font-weight: 700;
  color: #8b724d;
  display: block;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.lesson-main .video-frame {
  border-radius: 12px;
  overflow: hidden;
}
.lesson-note {
  border-right: 3px solid #ad986b;
  background: #f0eddf;
  padding: 15px 18px;
  margin-top: 18px;
  border-radius: 6px;
}
.lesson-note b {
  font-size: 13px;
  color: #64725f;
}
.lesson-note p {
  font-size: 16px;
  line-height: 1.9;
  margin-top: 5px;
}
.watch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.watch-actions .primary {
  background: #294d40;
  color: #fff9ec;
  font-size: 15px;
  gap: 10px;
  padding: 12px 18px;
}
.watch-actions a {
  font-size: 13px;
  text-underline-offset: 4px;
}
.lesson-sidebar {
  background: #f0f0e4;
  border-radius: 12px;
  padding: 18px;
  align-self: start;
}
.lesson-sidebar summary {
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
}
.lesson-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.lesson-sidebar nav button {
  text-align: right;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  line-height: 1.6;
  font-size: 13px;
  padding: 10px;
}
.lesson-sidebar nav button[aria-current] {
  background: #294d40;
  color: #fff9eb;
}
.lesson-sidebar nav button:hover {
  border-color: #b1bca5;
}
.learning-note {
  font-size: 12px;
  color: #78816e;
  line-height: 1.8;
  margin-top: 20px;
}
.lesson-next {
  border-top: 1px solid #d9dfd0;
  margin-top: 26px;
  padding-top: 20px;
}
.lesson-next p {
  font-size: 13px;
  color: #70806a;
  line-height: 1.7;
}
.next-lesson-button {
  background: none;
  padding: 10px 0;
  color: #294d40;
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}
.next-lesson-button:hover {
  text-decoration: underline;
}
.practice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.practice-top button {
  font-size: 12px;
}
#practice-progress {
  width: 100%;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 9px;
  margin: 14px 0 24px;
  overflow: hidden;
}
#practice-progress::-webkit-progress-bar {
  background: #e2e6d9;
}
#practice-progress::-webkit-progress-value {
  background: #688060;
}
#practice-progress::-moz-progress-bar {
  background: #688060;
}
#question-heading {
  font-size: 23px;
  line-height: 1.6;
  margin: 0 0 15px;
}
.math-expression {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  text-align: center;
  background: #f0eddf;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px !important;
  color: #294d40;
  unicode-bidi: isolate;
}
#question-body {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.answer-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffdf7;
  border: 1px solid #d5ddcc;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 18px;
}
.answer-choice:has(input:checked) {
  background: #e4ead9;
  border-color: #658257;
}
.answer-choice:focus-within {
  outline: 2px solid #ad894e;
  outline-offset: 2px;
}
.answer-choice input {
  accent-color: #294d40;
  width: 18px;
  height: 18px;
}
.answer-choice span {
  unicode-bidi: isolate;
}
.quiz-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.quiz-controls .primary,
#advance-question {
  background: #294d40;
  color: #fff9eb;
  font-size: 15px;
  padding: 11px 19px;
}
.answer-feedback:not(:empty) {
  padding: 16px;
  border-radius: 9px;
  margin: 18px 0;
  line-height: 1.9;
}
.answer-feedback.correct {
  background: #e4eddc;
  color: #28503a;
}
.answer-feedback.incorrect {
  background: #f2e6d0;
  color: #6e4d25;
}
#question-hint {
  background: #eeecdf;
  padding: 12px 16px;
  border-radius: 8px;
  line-height: 1.8;
  margin-top: 14px;
}
#practice-result {
  text-align: center;
  padding: 35px 20px;
}
.success-symbol {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #dfead6;
  color: #315535;
  font-size: 30px;
  margin: 0 auto 20px;
}
#practice-result h3 {
  font-size: 24px;
  margin: 0 0 12px;
}
#practice-result p {
  line-height: 1.9;
  color: #687a61;
}
#retry-practice {
  margin-top: 16px;
  text-decoration: underline;
}
#player h2:focus,
#question-heading:focus,
#practice-result:focus {
  outline: none;
}
@media (max-width: 700px) {
  .unit-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 16px 24px;
  }
  .unit-card {
    padding: 20px;
  }
  .unit-card h3 {
    font-size: 23px;
    margin-top: 12px;
  }
  .unit-foot {
    margin-top: 16px;
  }
  .lesson-list {
    padding: 0 16px 20px;
  }
  .lesson-card {
    gap: 12px;
    padding: 16px;
  }
  .lesson-number {
    font-size: 23px;
    min-width: 25px;
    align-self: flex-start;
  }
  .lesson-card img {
    display: none;
  }
  .lesson-card h3 {
    font-size: 17px;
  }
  .lesson-card p {
    font-size: 13px;
  }
  #player {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .lesson-heading {
    padding: 0 18px 18px;
  }
  .lesson-heading h2 {
    font-size: 22px;
  }
  .lesson-heading p {
    font-size: 14px;
  }
  .lesson-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }
  .lesson-sidebar {
    order: 2;
  }
  .lesson-sidebar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .lesson-note {
    padding: 12px 14px;
  }
  .lesson-note p {
    font-size: 15px;
  }
  .watch-actions {
    gap: 14px;
  }
  .watch-actions .primary {
    width: 100%;
    font-size: 14px;
  }
  .watch-actions a {
    margin: auto;
  }
  .lesson-next {
    margin-top: 20px;
  }
  .next-lesson-button {
    font-size: 15px;
  }
  #question-heading {
    font-size: 21px;
  }
  .answer-choice {
    font-size: 17px;
  }
  .quiz-controls {
    flex-wrap: wrap;
  }
  .practice-top {
    flex-wrap: wrap;
  }
  .math-expression {
    font-size: 30px;
  }
  .learning-note {
    margin-top: 12px;
  }
}
.lesson-main .video-frame {
  height: auto;
  aspect-ratio: 16/9;
  position: relative;
}
.lesson-main .video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#music-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
#music-button .music-note {
  font-size: 20px;
  line-height: 1;
}
#music-button[data-state="playing"] {
  background: #e3ecdf;
  color: #214c3d;
}
#music-button[data-state="muted"] .music-note {
  opacity: 0.5;
  text-decoration: line-through;
}
@media (max-width: 700px) {
  body .bottom-bar {
    column-gap: 7px;
  }
  body .bottom-bar .quiet-button {
    font-size: 12px;
    min-height: 38px;
    padding: 6px;
  }
  #music-button {
    margin-inline-start: auto;
  }
}

.subject-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}
.subject-picker[hidden] {
  display: none;
}
.subject-picker button {
  border: 1px solid #cbd7d0;
  background: #f4f6ee;
  color: #244b40;
  border-radius: 14px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.subject-picker button[aria-pressed="true"] {
  background: #214c40;
  color: #fffdf4;
  border-color: #214c40;
}
.subject-picker button:focus-visible {
  outline: 3px solid #d3a943;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .subject-picker {
    gap: 8px;
  }
  .subject-picker button {
    flex: 1;
    padding: 12px 8px;
    font-size: 14px;
  }
}

#look-mode {
  background: #214c40;
  color: #fffdf4;
  border-radius: 9px;
  padding: 10px 14px;
}
.look-pad {
  display: none;
  position: fixed;
  right: 24px;
  bottom: 145px;
  width: 100px;
  height: 100px;
  z-index: 7;
  border-radius: 50%;
  border: 1px solid #fff9;
  background: #faf7ed55;
  color: #274b3e;
  touch-action: none;
  user-select: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 24px;
  line-height: 0.9;
  backdrop-filter: blur(4px);
}
.look-pad-label {
  position: absolute;
  top: 109px;
  width: 100%;
  font-size: 12px;
  line-height: 1.4;
}
.look-crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px;
  border: 2px solid white;
  border-radius: 50%;
  background: #244b4077;
  box-shadow: 0 0 3px #0008;
  pointer-events: none;
  z-index: 8;
}
.look-crosshair.on-target {
  background: #e8b744;
  width: 14px;
  height: 14px;
  margin: -7px;
}
.look-hint {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  color: #fffdf4;
  background: #214c40e8;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  z-index: 8;
  pointer-events: none;
}
.free-look .scene-caption {
  visibility: hidden;
}
@media (pointer: coarse), (max-width: 700px) {
  #look-mode {
    display: none;
  }
  .look-pad {
    display: flex;
  }
  .scene-caption {
    display: none;
  }
}
@media (pointer: coarse), (max-width: 700px) {
  body .joystick,
  .look-pad {
    bottom: 205px;
  }
}
@media (max-height: 550px) and (pointer: coarse),
  (max-height: 550px) and (max-width: 700px) {
  body .joystick,
  .look-pad {
    bottom: 135px;
    width: 76px;
    height: 76px;
  }
  body .joystick-knob {
    left: 16px;
    top: 16px;
  }
  body .joystick-label,
  .look-pad-label {
    top: 82px;
  }
}
