:root {
  color-scheme: dark;
  --ink: #f7f3ea;
  --muted: rgba(247, 243, 234, 0.76);
  --line: rgba(255, 255, 255, 0.16);
  --deep: #0d1723;
  --sea: #123c4b;
  --bronze: #c8833d;
  --olive: #6f8a4a;
  --coral: #d96d52;
  --panel: rgba(13, 23, 35, 0.9);
  --panel-strong: rgba(9, 16, 25, 0.96);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  --gear-clearance: 60px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #10161d;
  color: var(--ink);
  overflow-x: hidden;
  touch-action: manipulation;
}

button {
  font: inherit;
  color: inherit;
}

.app {
  min-height: 100svh;
  width: 100%;
  position: relative;
  background:
    linear-gradient(180deg, rgba(9, 15, 24, 0.18), rgba(9, 15, 24, 0.96) 430px),
    #10161d;
}

.audio-toggle {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  top: calc(env(safe-area-inset-top) + 12px);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  background: rgba(8, 16, 25, 0.9);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.audio-toggle.is-on {
  border-color: rgba(243, 176, 93, 0.7);
  box-shadow: 0 8px 18px rgba(224, 111, 79, 0.2);
}

.app-version {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 16, 25, 0.72);
  color: rgba(247, 243, 234, 0.68);
  padding: 0.2rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  pointer-events: none;
}

.audio-toggle-label {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gear-menu {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 10px);
  right: max(12px, env(safe-area-inset-right));
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.gear-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 16, 25, 0.92);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.gear-menu-panel {
  display: none;
  min-width: 172px;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 16, 25, 0.96);
  box-shadow: var(--shadow);
}

.gear-menu.is-open .gear-menu-panel {
  display: grid;
  gap: 0.5rem;
}

.gear-menu .audio-toggle,
.gear-menu-item {
  position: static;
  width: 100%;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  border-radius: 8px;
  background: rgba(15, 31, 43, 0.9);
  box-shadow: none;
}

.gear-menu-item {
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.auth-tabs button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 25, 38, 0.86);
  color: var(--ink);
  font-weight: 900;
}

.auth-tabs button.is-active {
  background: #79d2c8;
  border-color: #79d2c8;
  color: #071018;
}

.admin-slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-slider-row input[type="range"] {
  width: 100%;
}

.noscript {
  padding: 1rem;
}

.hero {
  position: relative;
  min-height: 380px;
  width: 100%;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.home-hero {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  padding-bottom: 18px;
}

.hero-shade,
.challenge-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 13, 21, 0.2), rgba(7, 13, 21, 0.78) 74%, #10161d),
    linear-gradient(90deg, rgba(7, 13, 21, 0.2), rgba(7, 13, 21, 0.68));
  pointer-events: none;
}

.topbar,
.page-top,
.challenge-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(env(safe-area-inset-top) + 14px) max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
}

.page-top,
.challenge-header {
  padding-right: calc(max(16px, env(safe-area-inset-right)) + var(--gear-clearance));
}

.topbar {
  padding-right: calc(max(16px, env(safe-area-inset-right)) + var(--gear-clearance));
}

.home-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  padding-top: 0;
  padding-right: max(16px, env(safe-area-inset-right));
  align-items: end;
  gap: 0.75rem;
}

.home-topbar h1 {
  white-space: nowrap;
}

.home-topbar .profile-chip {
  justify-self: end;
  max-width: min(150px, 34vw);
}

.hero h1,
.page-shell h1,
.challenge-header h1 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1;
}

.challenge-header h1 {
  font-size: 1rem;
  line-height: 1.15;
}

.eyebrow,
.speaker,
.question-count {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 22px;
  max-width: 580px;
}

.hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.45;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

.quiet-button,
.back-button,
.secondary-action,
.story-button,
.choice-button,
.primary-action {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 22, 0.66);
  color: var(--ink);
  padding: 0.72rem 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.quiet-button,
.back-button.compact {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
}

.primary-action,
.story-button {
  width: 100%;
  background: linear-gradient(90deg, #f3b05d, #e06f4f);
  color: #170d09;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 22px rgba(216, 111, 69, 0.24);
}

.secondary-action {
  width: 100%;
  background: rgba(25, 58, 64, 0.72);
}

button:disabled,
.text-input:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.compact-action {
  width: auto;
  min-height: 38px;
  padding: 0.5rem 0.75rem;
}

.danger-action {
  background: rgba(98, 29, 34, 0.82);
  border-color: rgba(255, 138, 124, 0.36);
}

.choice-button {
  width: 100%;
  text-align: left;
  background: rgba(16, 41, 51, 0.86);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-stats {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: calc(env(safe-area-inset-top) + 12px) calc(max(16px, env(safe-area-inset-right)) + var(--gear-clearance)) 0 max(16px, env(safe-area-inset-left));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

.stats-strip div,
.reward-metrics div,
.result-grid div,
.challenge-targets div {
  background: rgba(12, 23, 35, 0.94);
  padding: 0.85rem 0.7rem;
  min-width: 0;
}

.stats-strip span,
.reward-metrics span,
.result-grid span,
.challenge-targets span,
.reward-line span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.stats-strip strong,
.reward-metrics strong,
.result-grid strong,
.challenge-targets strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.15rem;
}

.home-stats div {
  padding: 0.68rem 0.62rem;
  text-align: center;
  justify-items: center;
}

.home-stats strong {
  font-size: 1.02rem;
}

.content-stack {
  display: grid;
  gap: 1rem;
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 24px);
  max-width: 820px;
  margin: 0 auto;
}

.control-band {
  display: grid;
  gap: 0.55rem;
}

.control-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.segment {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 32, 44, 0.9);
  font-weight: 800;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.control-band:nth-of-type(2) .segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segment.is-active {
  color: #0e151b;
  background: #79d2c8;
  border-color: #79d2c8;
}

.quick-actions,
.section-header {
  display: grid;
  gap: 0.7rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.45rem;
}

.story-list {
  display: grid;
  gap: 1rem;
}

.story-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 24, 35, 0.92);
  box-shadow: var(--shadow);
}

.story-card-image {
  min-height: 148px;
  background-image:
    linear-gradient(180deg, rgba(9, 15, 24, 0.04), rgba(9, 15, 24, 0.42)),
    var(--cover);
  background-size: cover;
  background-position: center;
}

.story-card-body {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
}

.story-card-kicker {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: #9fd2c8;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.story-card h3,
.collection-block h2 {
  margin: 0;
  font-size: 1.24rem;
}

.story-card p,
.story-text-block p,
.collection-block p {
  margin: 0;
  color: rgba(247, 243, 234, 0.82);
  line-height: 1.48;
}

.page-shell {
  min-height: 100svh;
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 0 16px calc(env(safe-area-inset-bottom) + 24px);
  background-image:
    linear-gradient(180deg, rgba(8, 14, 22, 0.46), rgba(8, 14, 22, 0.96) 360px),
    var(--page-image);
  background-position: center top;
  background-size: cover;
}

.page-top {
  padding-left: 0;
  padding-right: var(--gear-clearance);
}

.story-text-block,
.collection-block {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.story-text-block h1,
.result-shell h1,
.reward-shell h1 {
  font-size: 1.9rem;
  line-height: 1.05;
}

.choice-stack {
  display: grid;
  gap: 0.75rem;
}

.challenge-targets,
.reward-metrics,
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-grid {
  grid-template-columns: repeat(2, 1fr);
}

.challenge-screen {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background-image: var(--page-image);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

.challenge-header {
  align-items: flex-start;
}

.combo-chip {
  min-width: 48px;
  min-height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #071018;
  font-weight: 900;
}

.progress-track {
  position: relative;
  z-index: 1;
  height: 10px;
  margin: 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.progress-track span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), #f3b05d);
}

.problem-zone {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 1rem;
  text-align: center;
}

.problem {
  width: 100%;
  max-width: 560px;
  padding: 1.2rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 13, 21, 0.78);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow);
}

.answer-display {
  width: min(100%, 360px);
  min-height: 64px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 900;
}

.feedback {
  min-height: 1.5rem;
  margin: 0;
  font-weight: 900;
}

.feedback.is-good {
  color: #8ee0a1;
}

.feedback.is-bad {
  color: #ffb199;
}

.keypad {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.75rem 16px calc(env(safe-area-inset-bottom) + 16px);
  background: rgba(7, 13, 21, 0.86);
  border-top: 1px solid var(--line);
}

.keypad button {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(22, 36, 51, 0.94);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 900;
}

.keypad .submit-key {
  background: var(--accent);
  color: #071018;
}

.keypad.has-sign .submit-key {
  grid-column: 1 / -1;
}

.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reward-pill {
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  background: rgba(121, 210, 200, 0.16);
  border: 1px solid rgba(121, 210, 200, 0.4);
  color: #bdf4ed;
  font-weight: 800;
}

.reward-pill.relic {
  background: rgba(243, 176, 93, 0.15);
  border-color: rgba(243, 176, 93, 0.45);
  color: #ffd699;
}

.mode-table {
  display: grid;
  gap: 0.5rem;
}

.mode-row,
.reward-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 42px;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.reward-line {
  grid-template-columns: 1fr auto;
}

.mode-row:last-child,
.reward-line:last-child {
  border-bottom: 0;
}

.mode-row small {
  color: var(--muted);
  font-weight: 700;
}

.notice {
  border: 1px solid rgba(121, 210, 200, 0.38);
  border-radius: 8px;
  background: rgba(25, 75, 76, 0.78);
  color: #d7fffa;
  padding: 0.8rem 0.9rem;
  font-weight: 800;
}

.profile-chip {
  min-height: 48px;
  display: grid;
  grid-template-columns: 32px minmax(0, auto);
  align-items: center;
  gap: 0.5rem;
  max-width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 22, 0.68);
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  font-weight: 900;
  cursor: pointer;
}

.profile-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.2), transparent 30%),
    rgba(8, 18, 30, 0.72);
  overflow: hidden;
}

.avatar-card.tiny {
  width: 32px;
  border-radius: 6px;
}

.avatar-card.small {
  width: 66px;
}

.avatar-card.large {
  width: min(180px, 60vw);
}

.avatar-portrait {
  width: 100%;
  height: 100%;
  background-image: url("assets/avatars/divine-parent-sheet.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
}

.gear-badges {
  position: absolute;
  inset: auto 4px 4px 4px;
  display: flex;
  justify-content: center;
  gap: 0.2rem;
  pointer-events: none;
}

.gear-badges img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(5, 11, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.avatar-card.tiny .gear-badges,
.avatar-card.small .gear-badges {
  display: none;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.bottom-nav-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 0.25rem;
}

.hero-actions {
  position: relative;
  z-index: 1;
  padding: 0 max(16px, env(safe-area-inset-left));
}

.nav-grid button,
.parent-option {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 31, 43, 0.9);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.field-label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.text-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 22, 0.86);
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-weight: 800;
  text-transform: none;
}

.parent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.parent-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.parent-option {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.45rem;
  text-align: center;
}

.parent-option span,
.parent-option small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.parent-option.is-active,
.camper-card.is-active {
  border-color: #79d2c8;
  box-shadow: 0 0 0 2px rgba(121, 210, 200, 0.2);
}

.profile-list,
.store-grid,
.equipped-gear-list {
  display: grid;
  gap: 0.75rem;
}

.camper-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 25, 38, 0.82);
  color: var(--ink);
  padding: 0.7rem;
  text-align: left;
}

button.camper-card {
  cursor: pointer;
}

.camper-card h3,
.quest-board h3,
.store-card h3 {
  margin: 0;
  font-size: 1rem;
}

.camper-card p {
  margin: 0.16rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.camper-card small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-weight: 800;
}

.equipped-gear-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 25, 38, 0.82);
  padding: 0.68rem;
}

.equipped-gear-card img {
  width: 58px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.equipped-gear-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.equipped-gear-card p,
.empty-state {
  margin: 0.25rem 0 0;
  color: rgba(247, 243, 234, 0.82);
  line-height: 1.35;
}

.split-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.section-title-row,
.admin-user-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.section-title-row {
  align-items: center;
}

.admin-user-card {
  display: grid;
  gap: 0.8rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 25, 38, 0.82);
}

.admin-user-card h3,
.admin-user-card p {
  margin: 0;
}

.admin-user-card p,
.admin-user-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-user-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-user-metrics div {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem;
  background: rgba(7, 14, 22, 0.58);
}

.admin-user-metrics span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-metrics strong {
  overflow-wrap: anywhere;
}

.admin-user-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.store-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0.8rem;
}

.store-card img {
  width: 82px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.store-card p {
  margin: 0.25rem 0 0;
  color: rgba(247, 243, 234, 0.82);
  line-height: 1.35;
}

.store-card .price {
  color: #ffd699;
  font-weight: 900;
}

.store-card button {
  grid-column: 1 / -1;
}

.quest-board {
  display: grid;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quest-board:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.quest-board .camper-card {
  background: rgba(16, 41, 51, 0.86);
}

.settings-submenu {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-submenu h3 {
  margin: 0;
  font-size: 1rem;
}

.settings-submenu p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.toggle-list {
  display: grid;
  gap: 0.55rem;
}

.toggle-row {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 25, 38, 0.86);
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  text-align: left;
  cursor: pointer;
}

.toggle-row span {
  font-weight: 900;
}

.toggle-row strong {
  min-width: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  padding: 0.28rem 0.48rem;
  text-align: center;
  font-size: 0.8rem;
}

.toggle-row.is-on {
  border-color: rgba(121, 210, 200, 0.72);
  background: rgba(21, 66, 66, 0.86);
}

.toggle-row.is-on strong {
  background: #79d2c8;
  color: #071018;
}

.side-card .story-card-image {
  min-height: 120px;
}

@media (min-width: 720px) {
  .hero {
    min-height: 460px;
  }

  .hero h1 {
    font-size: 2.9rem;
  }

  .story-card {
    grid-template-columns: minmax(230px, 0.8fr) 1fr;
  }

  .story-card-image {
    min-height: 100%;
  }

  .page-shell {
    padding-left: max(24px, calc((100vw - 820px) / 2));
    padding-right: max(24px, calc((100vw - 820px) / 2));
  }

  .problem {
    font-size: 3.6rem;
  }

  .keypad {
    max-width: 620px;
    width: 100%;
    justify-self: center;
    border: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
  }

  .parent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .store-card {
    grid-template-columns: 96px minmax(0, 1fr) 132px;
  }

  .store-card img {
    width: 96px;
  }

  .store-card button {
    grid-column: auto;
  }
}

@media (max-width: 390px) {
  .hero h1,
  .page-shell h1 {
    font-size: 1.9rem;
  }

  .segment {
    font-size: 0.86rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .stats-strip strong,
  .reward-metrics strong,
  .result-grid strong,
  .challenge-targets strong {
    font-size: 1rem;
  }

  .nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parent-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-actions {
    grid-template-columns: 1fr;
  }
}

.panorama-block {
  gap: 0.75rem;
}

.panorama-thumb-button {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 22, 0.66);
  color: var(--ink);
  padding: 0.65rem;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.panorama-thumb-image {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 8px;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px var(--line);
}

.panorama-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #05090f;
  overflow: hidden;
  overscroll-behavior: contain;
}

.panorama-close {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  right: max(12px, env(safe-area-inset-right));
  z-index: 103;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(5, 9, 15, 0.78);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.panorama-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #0c1420;
  touch-action: none;
}

.panorama-viewport-full {
  height: 100svh;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.panorama-image {
  position: absolute;
  inset: 0;
  background-size: 260% 165%;
  background-repeat: repeat-x;
  filter: saturate(1.08) contrast(1.04);
  will-change: background-position, background-size;
}

.panorama-viewport-full .panorama-image {
  background-size: auto 100%;
}

.panorama-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.02);
  pointer-events: none;
}

.panorama-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.panorama-controls-floating {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  z-index: 102;
  max-width: 360px;
  margin: 0 auto;
}

.panorama-controls-floating .quiet-button {
  min-height: 48px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(5, 9, 15, 0.72);
  font-size: 1.25rem;
  line-height: 1;
}

@media (hover: none), (pointer: coarse) {
  .panorama-controls-floating {
    display: none;
  }
}
