.mobile-menu-trigger {
  position: fixed;
  z-index: 6;
  display: grid;
  justify-items: center;
  width: 70px;
  padding: 0;
  border: 0;
  border-radius: 26px 26px 13px 13px;
  background: transparent;
  touch-action: none;
  user-select: none;
}
.mobile-menu-trigger[aria-expanded="true"] { visibility: hidden; }
.mobile-menu-face {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid #456c51;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 30%, #fffaf0 10%, #f6ebd5 80%);
  box-shadow: 0 3px 9px #1b392b36, inset 0 0 0 2px #fffaf0;
  pointer-events: none;
}
.mobile-menu-face img { width: 46px; height: 46px; object-fit: contain; }
.mobile-menu-label {
  position: relative;
  margin-top: -3px;
  padding: 2px 7px 3px;
  border: 1px solid #b6c6b0;
  border-radius: 999px;
  background: #fffaf0;
  color: var(--green-dark);
  box-shadow: 0 2px 5px #1b392b20;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
}
.mobile-menu::backdrop { background: #21372955; }
.mobile-menu {
  position: fixed;
  top: auto;
  right: 0;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 0;
  height: max-content;
  margin: 0 auto;
  width: min(calc(100% - 12px), 460px);
  max-height: calc(100dvh - 20px);
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--ink);
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 5px 13px;
  border: 1px solid #e1cda8;
  border-radius: 25px;
  background: radial-gradient(ellipse at 49% 43%, #fcf8e8 10%, #fffaf0 70%, #f8edda 100%);
  box-shadow: inset 0 0 0 3px #fffcf5, 0 -6px 24px #22382b28;
}
.mobile-menu[open] { display: flex; }
.mobile-menu h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 32px;
  margin: 3px 40px 6px;
  padding: 0;
  font-size: 18px;
  letter-spacing: .035em;
}
.mobile-menu h2 img { width: 30px; height: 30px; object-fit: contain; }
.mobile-menu-close {
  position: absolute;
  inset: 7px 8px auto auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--green-dark);
  background: radial-gradient(circle, #f3e8d2 51%, transparent 53%);
  font-size: 25px;
  line-height: 1;
}
.mobile-menu-hint { color: var(--muted); font-size: 12px; }
.mobile-menu-wheel {
  position: relative;
  --wheel-size: min(calc(100vw - 24px), 316px, max(260px, calc(100dvh - 96px)));
  flex: none;
  width: var(--wheel-size);
  height: var(--wheel-size);
  touch-action: none;
  user-select: none;
}
.mobile-menu-ring {
  position: absolute;
  inset: 15.2%;
  border: 2px dotted #c9ac76;
  border-radius: 50%;
  background: radial-gradient(circle, #edf0db, #f6ebd4 72%);
  box-shadow: 0 0 0 12px #f6edd957;
  pointer-events: none;
}
.mobile-menu-marker {
  position: absolute;
  z-index: 1;
  top: 1px;
  left: 50%;
  width: 7px;
  height: 7px;
  translate: -50% 0;
  border-radius: 50%;
  background: #ab7937;
  pointer-events: none;
}
.mobile-menu-sparkles { position: absolute; inset: 0; pointer-events: none; }
.mobile-menu-sparkles i { position: absolute; color: #b4894d; font: 15px/1 system-ui; }
.mobile-menu-sparkles i:nth-child(1) { inset: 9% auto auto 12%; }
.mobile-menu-sparkles i:nth-child(2) { inset: 12% 11% auto auto; }
.mobile-menu-sparkles i:nth-child(3) { inset: auto auto 10% 10%; }
.mobile-menu-sparkles i:nth-child(4) { inset: auto 12% 9% auto; }
.mobile-menu-wheel .primary-nav a {
  position: absolute;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  width: 62px;
  min-height: 0;
  line-height: 1.2;
  height: 62px;
  padding: 2px 1px;
  border: 1px solid #decfaf;
  border-radius: 50%;
  background: var(--odk-tile, #fff8e8);
  box-shadow: inset 0 0 0 2px #fffcf6bf, 0 2px 0 #d9c6a6;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}
.mobile-menu-wheel .primary-nav a:is([data-nav="sounds"],[data-nav="study-room"]) { --odk-tile: #edf2e3; }
.mobile-menu-wheel .primary-nav a:is([data-nav="textbook"],[data-nav="roleplay"]) { --odk-tile: #f8e8df; }
.mobile-menu-wheel .primary-nav a:is([data-nav="travel"],[data-nav="practice"]) { --odk-tile: #e9f1ed; }
.mobile-menu-wheel .primary-nav a:is([data-nav="challenge"],[data-nav="courses"]) { --odk-tile: #faedcf; }
.mobile-menu-wheel .primary-nav a img { width: 36px; height: 36px; object-fit: contain; pointer-events: none; }
.mobile-menu-wheel .primary-nav a[data-highlight] {
  z-index: 1;
  border-color: #557956;
  box-shadow: inset 0 0 0 2px #fffdf5, 0 0 0 2px #a5ba93, 0 3px 6px #36543a26;
}
.mobile-menu-confirm {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: 0;
  place-content: center;
  width: 94px;
  height: 94px;
  color: var(--green-dark);
  text-decoration: none;
  padding: 4px 8px 6px;
  border: 1px solid #aab98c;
  border-radius: 50%;
  background: #edf2de;
  box-shadow: inset 0 0 0 3px #faf8e9, 0 3px 0 #cbd2ae;
}
.mobile-menu-confirm img { width: 35px; height: 35px; object-fit: contain; }
.mobile-menu-confirm strong { font-size: 14px; }
.mobile-menu-confirm span { color: var(--green); font-size: 12px; font-weight: 700; }

.mobile-menu-wheel .primary-nav { display: contents; }
.mobile-menu-wheel .primary-nav a[aria-current] { background: var(--odk-tile, #fff8e8); }
.mobile-menu-trigger, .mobile-menu-close { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mobile-menu-hint { margin: 0; }
.site-header { padding-block-start: env(safe-area-inset-top); }
.site-footer { padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); }
.mobile-menu-ready .site-footer { padding-bottom: max(5.5rem, calc(5rem + env(safe-area-inset-bottom))); }
.mobile-menu-ready .reward-toast { z-index: 7; }
#view-home { padding-block-start: 0; }
.home-welcome.page-intro { grid-template-columns: minmax(0, 1fr); }
.home-welcome h1 { font-size: clamp(1.45rem, 5.8vw, 3rem); }
.home-welcome .hero-image, .home-welcome .eyebrow { display: none; }
.home-welcome-intro { font-size: .9rem; }
.home-room-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  align-items: center;
  gap: .6rem;
  padding: .42rem;
  border: 1px solid #ddcdb2;
  border-radius: 16px;
  background: #f4eddf;
  text-decoration: none;
}
.home-room-scene { min-width: 0; aspect-ratio: 640 / 420; }
.home-room-scene .room-showcase-caption { display: none; }
.home-room-copy h2 { margin: 0 0 .24rem; font-size: clamp(.94rem, 3.9vw, 1.25rem); text-wrap: wrap; }
.home-room-copy p { margin: 0 0 .16rem; color: var(--muted); font-size: clamp(.75rem, 2.8vw, .88rem); line-height: 1.45; }
.home-room-copy .text-link { font-size: .81rem; text-decoration: underline; }
@media (max-width: 355px), (max-height: 430px) {
.mobile-menu-wheel .primary-nav a { width: 57px; height: 57px; }
.mobile-menu-wheel .primary-nav a img { width: 31px; height: 31px; }
}
.mobile-menu-trigger {
  --menu-safe-top: env(safe-area-inset-top, 0px);
  --menu-safe-bottom: env(safe-area-inset-bottom, 0px);
  --menu-safe-left: env(safe-area-inset-left, 0px);
  --menu-safe-right: env(safe-area-inset-right, 0px);
}
body.mobile-menu-open { overflow: hidden; }
