:root {
  --sky: #bfe8f7;
  --sky-deep: #7ccbe2;
  --cream: #fff8e8;
  --grass: #a8d96f;
  --leaf: #43a86f;
  --pond: #54bfd3;
  --sun: #ffd36a;
  --coral: #f47c6b;
  --berry: #b65ba5;
  --ink: #263238;
  --soft-ink: #52646a;
  --grownup-bg: #fbf8f2;
  --grownup-surface: #ffffff;
  --grownup-border: #d8cdbd;
  --grownup-muted: #6f6254;
  --trust: #0d7668;
  --trust-dark: #09584e;
  --blue: #315f8f;
  --danger: #9f3325;
  --soft-shadow: 0 18px 42px rgba(38, 50, 56, 0.12);
  --button-shadow: 0 7px 0 rgba(38, 50, 56, 0.12);
  --path-sand: #f6d99b;
  --rail: #50616a;
  --rail-light: #7e8b8f;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(191, 232, 247, 0.82) 0%, rgba(255, 248, 232, 0.92) 54%, #f3ead9 100%);
  font-family: "Nunito", "Trebuchet MS", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid rgba(255, 211, 106, 0.9);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.4rem;
  padding: 1rem 1.35rem;
}

.brand-lockup,
.game-header-actions,
.grownup-toolbar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.user-button {
  min-width: 2.5rem;
  min-height: 2.5rem;
}

.auth-gate {
  min-height: calc(100vh - 5.4rem);
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.auth-panel {
  width: min(100%, 28rem);
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 248, 232, 0.94);
  box-shadow: var(--soft-shadow);
  padding: 1.25rem;
}

.auth-panel h2 {
  margin-bottom: 0.45rem;
  font-size: 1.8rem;
}

.auth-panel p {
  color: var(--soft-ink);
  line-height: 1.45;
}

.brand-orb {
  width: 3.2rem;
  height: 3.2rem;
  border: 4px solid #ffffff;
  border-radius: 20px;
  background:
    linear-gradient(135deg, var(--sun), var(--coral));
  box-shadow: var(--button-shadow);
}

.brand {
  margin: 0 0 0.15rem;
  color: var(--trust-dark);
  font-size: 0.85rem;
  font-weight: 900;
}

.game-header h1,
.grownup-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 3.8vw, 2.8rem);
  line-height: 1;
}

.queue-status {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.soft-button,
.grownup-button,
.primary-play-button,
.nav-link,
.grownup-toolbar button,
.actions-row button,
.panel button {
  min-height: 2.75rem;
  border: 2px solid rgba(38, 50, 56, 0.18);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 0.58rem 0.9rem;
  text-decoration: none;
  box-shadow: var(--button-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.soft-button:hover:not(:disabled),
.grownup-button:hover,
.primary-play-button:hover:not(:disabled),
.nav-link:hover,
.grownup-toolbar button:hover,
.actions-row button:hover:not(:disabled),
.panel button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(13, 118, 104, 0.45);
}

.soft-button:active:not(:disabled),
.grownup-button:active,
.primary-play-button:active:not(:disabled),
.panel button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 0 rgba(38, 50, 56, 0.14);
}

.grownup-button {
  background: var(--ink);
  color: #ffffff;
}

.primary-play-button {
  min-height: 3.25rem;
  border-color: rgba(9, 88, 78, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #dff8ed 100%);
  color: var(--trust-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.child-mode {
  min-height: calc(100vh - 5.4rem);
  padding: 0 1.25rem 7.25rem;
}

.adventure-shell {
  display: grid;
  grid-template-columns: minmax(26rem, 1.1fr) minmax(24rem, 0.9fr);
  gap: 1rem;
  max-width: 1420px;
  margin: 0 auto;
}

.world-panel,
.play-panel {
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 248, 232, 0.82);
  box-shadow: var(--soft-shadow);
}

.world-panel {
  min-height: 43rem;
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
}

.world-copy {
  max-width: 34rem;
  position: relative;
  z-index: 1;
}

.world-kicker {
  margin-bottom: 0.25rem;
  color: var(--trust-dark);
  font-weight: 900;
}

.world-copy h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 0.96;
}

.world-copy p {
  max-width: 34rem;
  color: var(--soft-ink);
  font-size: 1.08rem;
  line-height: 1.42;
}

.profile-greeting {
  display: inline-flex;
  width: fit-content;
  margin: 0.2rem 0 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--trust-dark) !important;
  padding: 0.28rem 0.6rem;
  font-size: 0.88rem !important;
  font-weight: 900;
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 25rem;
  margin: 0.65rem 0;
  border: 2px solid rgba(38, 50, 56, 0.12);
  border-radius: 20px;
  background: #ffffff;
  padding: 0.65rem;
  box-shadow: 0 10px 22px rgba(38, 50, 56, 0.08);
  position: relative;
  z-index: 1;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.guide-card[data-guide-state="helping"] {
  border-color: rgba(13, 118, 104, 0.3);
  box-shadow: 0 10px 22px rgba(13, 118, 104, 0.12);
}

.guide-card[data-guide-state="waiting"] {
  border-color: rgba(84, 191, 211, 0.35);
  box-shadow: 0 10px 22px rgba(84, 191, 211, 0.16);
}

.guide-card[data-guide-state="celebrating"] {
  border-color: rgba(255, 211, 106, 0.52);
  box-shadow: 0 10px 22px rgba(255, 211, 106, 0.24);
}

.guide-card p {
  margin: 0.2rem 0 0;
  color: var(--soft-ink);
}

.guide-character {
  display: grid;
  place-items: center;
  width: 4.3rem;
  height: 4.3rem;
  flex: 0 0 auto;
  border-radius: 24px 24px 18px 18px;
  background:
    radial-gradient(circle at 50% 34%, #ffffff 0 22%, transparent 23%),
    linear-gradient(180deg, var(--sun), #ffb85c);
  box-shadow: inset 0 -8px 0 rgba(166, 107, 19, 0.13);
  animation: guideFloat 3.8s ease-in-out infinite;
  position: relative;
  transition: background 180ms ease, transform 180ms ease;
}

.guide-character::after {
  content: "";
  position: absolute;
  right: -0.18rem;
  bottom: 0.72rem;
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  opacity: 0;
  transform: scale(0.7);
}

.guide-helping {
  background:
    radial-gradient(circle at 50% 34%, #ffffff 0 22%, transparent 23%),
    linear-gradient(180deg, #85dfcc, var(--trust));
}

.guide-helping::after {
  opacity: 1;
  border-radius: 0.55rem 0.55rem 0.55rem 0.12rem;
  background: #ffffff;
  transform: rotate(-12deg);
}

.guide-waiting {
  background:
    radial-gradient(circle at 50% 34%, #ffffff 0 22%, transparent 23%),
    linear-gradient(180deg, #a8e7ef, var(--pond));
  animation: guideBreathe 4.6s ease-in-out infinite;
}

.guide-waiting::after {
  left: -0.2rem;
  right: auto;
  bottom: 0.82rem;
  opacity: 1;
  border: 2px solid rgba(255, 255, 255, 0.88);
  background: transparent;
}

.guide-turn-taking {
  background:
    radial-gradient(circle at 50% 34%, #ffffff 0 22%, transparent 23%),
    linear-gradient(180deg, #df94ce, var(--berry));
}

.guide-turn-taking::after {
  opacity: 1;
  background: var(--sun);
  box-shadow: -0.7rem 0.2rem 0 rgba(255, 211, 106, 0.52);
}

.guide-celebrating {
  background:
    radial-gradient(circle at 50% 34%, #ffffff 0 22%, transparent 23%),
    linear-gradient(180deg, #ffe89a, var(--sun));
  animation: guideHop 1.5s ease-in-out infinite;
}

.guide-celebrating::after {
  opacity: 1;
  background: var(--coral);
  box-shadow: -0.65rem -0.16rem 0 var(--leaf), -0.3rem 0.62rem 0 var(--pond);
}

.guide-bridging {
  background:
    radial-gradient(circle at 50% 34%, #ffffff 0 22%, transparent 23%),
    linear-gradient(180deg, #ffb7a7, var(--coral));
}

.guide-bridging::after {
  opacity: 1;
  width: 1rem;
  height: 0.42rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0.45rem -0.28rem 0 rgba(255, 255, 255, 0.66);
}

.guide-face {
  position: relative;
  width: 2rem;
  height: 1rem;
}

.guide-face::before,
.guide-face::after {
  content: "";
  position: absolute;
  top: 0.05rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--ink);
}

.guide-face::before {
  left: 0.28rem;
}

.guide-face::after {
  right: 0.28rem;
}

.reward-tray {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 30rem;
  margin: 0.65rem 0 0.35rem;
  border: 2px dashed rgba(67, 168, 111, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.6rem;
  position: relative;
  z-index: 1;
}

.reward-tray span {
  display: block;
  color: var(--trust-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.reward-tray strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.reward-tray.has-rewards {
  border-style: solid;
  border-color: rgba(255, 211, 106, 0.55);
  background: #fff8dc;
}

.reward-stickers {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 7rem;
}

.reward-sticker {
  display: grid;
  place-items: center;
  min-width: 3.1rem;
  min-height: 2.5rem;
  border: 2px solid rgba(38, 50, 56, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(38, 50, 56, 0.1);
}

.reward-trail-star {
  background: #fff0a8;
}

.reward-helper-spark {
  background: #dff7f0;
}

.reward-calm-drop {
  background: #d8f3f8;
}

.reward-speech-leaf {
  background: #e8f7d5;
}

.reward-try-badge {
  background: #ffe0d8;
}

.daily-path {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.7rem 0 0.4rem;
  position: relative;
  z-index: 1;
}

.daily-path-step {
  display: grid;
  gap: 0.15rem;
  min-height: 3rem;
  border: 2px solid rgba(67, 168, 111, 0.32);
  border-radius: 16px;
  background: #ffffff;
  color: var(--trust-dark);
  padding: 0.55rem 0.75rem;
  text-align: left;
  overflow-wrap: anywhere;
  box-shadow: 0 5px 0 rgba(67, 168, 111, 0.16);
}

.daily-path-step strong {
  color: var(--soft-ink);
  font-size: 0.78rem;
}

.daily-path-step.selected {
  border-color: var(--sun);
  background: #fff4c9;
  box-shadow: 0 6px 0 rgba(255, 211, 106, 0.34);
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.65rem 0 0.35rem;
  position: relative;
  z-index: 2;
}

.map-label,
.map-status {
  margin: 0;
}

.map-label {
  color: var(--trust-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.map-status {
  color: var(--soft-ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.routine-trails {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.routine-trail {
  display: grid;
  gap: 0.1rem;
  min-height: 3rem;
  max-width: 12rem;
  border: 2px solid rgba(38, 50, 56, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 0.42rem 0.62rem;
  text-align: left;
  overflow-wrap: anywhere;
  box-shadow: 0 5px 0 rgba(38, 50, 56, 0.1);
}

.routine-trail span {
  font-size: 0.88rem;
  font-weight: 900;
}

.routine-trail small {
  color: var(--soft-ink);
  font-size: 0.68rem;
  line-height: 1.15;
}

.routine-trail.active {
  border-color: rgba(255, 211, 106, 0.92);
  background: #fff6d8;
}

.world-map {
  min-height: 30rem;
  margin-top: 0.75rem;
  border-radius: 30px;
  background:
    radial-gradient(circle at 83% 14%, rgba(255, 211, 106, 0.68) 0 4.5rem, transparent 4.65rem),
    linear-gradient(180deg, rgba(191, 232, 247, 0.78) 0 46%, rgba(168, 217, 111, 0.54) 47% 100%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.world-map::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 7%;
  bottom: 16%;
  height: 30%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 20% 72%, rgba(255, 248, 232, 0.32) 0 0.55rem, transparent 0.62rem),
    radial-gradient(circle at 55% 58%, rgba(255, 248, 232, 0.26) 0 0.45rem, transparent 0.52rem),
    linear-gradient(180deg, rgba(67, 168, 111, 0.48), rgba(13, 118, 104, 0.18));
  z-index: 0;
}

.world-map::after {
  content: "";
  position: absolute;
  left: 11%;
  top: 10%;
  width: 9rem;
  height: 3.2rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 62%, rgba(255, 255, 255, 0.85) 0 1.1rem, transparent 1.16rem),
    radial-gradient(circle at 42% 42%, rgba(255, 255, 255, 0.92) 0 1.65rem, transparent 1.72rem),
    radial-gradient(circle at 70% 62%, rgba(255, 255, 255, 0.84) 0 1.22rem, transparent 1.28rem);
  opacity: 0.74;
  pointer-events: none;
  z-index: 0;
}

.map-path {
  position: absolute;
  height: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e8, var(--path-sand));
  box-shadow: inset 0 0 0 2px rgba(166, 107, 19, 0.13);
  z-index: 0;
}

.map-path-one {
  left: 16%;
  right: 24%;
  top: 51%;
  transform: rotate(-8deg);
}

.map-path-two {
  left: 28%;
  right: 16%;
  top: 66%;
  transform: rotate(9deg);
}

.route-thread {
  position: absolute;
  height: 1.05rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 211, 106, 0.95), rgba(244, 124, 107, 0.95));
  box-shadow: 0 0 0 4px rgba(255, 248, 232, 0.62), 0 8px 18px rgba(38, 50, 56, 0.12);
  opacity: 0.18;
  overflow: hidden;
  transform-origin: center;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 0;
}

.route-thread::before,
.route-thread::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.route-thread::before {
  inset: 0.28rem 0.65rem;
  border-radius: inherit;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.76) 0 0.34rem,
    transparent 0.34rem 0.74rem
  );
  opacity: 0.68;
}

.route-thread.active {
  opacity: 0.92;
  animation: pathGlow 2.8s ease-in-out infinite;
}

.route-thread.active::after {
  left: 0.55rem;
  top: 50%;
  width: 0.56rem;
  height: 0.56rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--trust-dark);
  box-shadow: 0 0 0 0.18rem rgba(255, 248, 232, 0.58);
  transform: translateY(-50%);
  animation: routeMarkerTravel 3.2s ease-in-out infinite;
}

.route-thread-morning {
  left: 13%;
  right: 18%;
  top: 45%;
  transform: rotate(-7deg);
}

.route-thread-evening {
  left: 35%;
  right: 16%;
  top: 60%;
  transform: rotate(13deg);
}

.route-thread-playdate {
  left: 48%;
  right: 8%;
  top: 73%;
  transform: rotate(-11deg);
}

.moments-world {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.world-place {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  width: 8.4rem;
  min-height: 6.7rem;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: #ffffff;
  color: var(--ink);
  padding: 0.75rem 0.65rem;
  text-align: center;
  box-shadow: 0 10px 0 rgba(38, 50, 56, 0.1);
  z-index: 1;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.world-place strong {
  font-size: 0.94rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.world-place span:not(.place-icon) {
  color: var(--soft-ink);
  font-size: 0.78rem;
}

.world-place.selected {
  border-color: var(--sun);
  box-shadow: 0 10px 0 rgba(255, 211, 106, 0.42);
}

.world-place.daily {
  outline: 4px solid rgba(255, 211, 106, 0.32);
  outline-offset: 2px;
}

.world-place.routine-active {
  transform: translateY(-2px);
}

.world-place:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 0 rgba(38, 50, 56, 0.11);
}

.place-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45rem;
  border-radius: 999px;
  background: rgba(13, 118, 104, 0.1);
  color: var(--trust-dark);
  padding: 0.15rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 900;
}

.world-place[data-state="selected"] .place-status {
  background: var(--sun);
  color: #4c3910;
}

.place-icon {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 16px;
  background: var(--pond);
  box-shadow:
    inset 0 -0.28rem 0 rgba(38, 50, 56, 0.13),
    0 4px 0 rgba(38, 50, 56, 0.08);
  overflow: hidden;
  position: relative;
}

.place-icon::before,
.place-icon::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.place-icon::after {
  inset: 0.72rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
}

.place-ready {
  left: 7%;
  top: 34%;
}

.place-snack {
  left: 36%;
  top: 24%;
}

.place-transition {
  right: 7%;
  top: 33%;
}

.place-waiting {
  left: 10%;
  bottom: 9%;
}

.place-bedtime {
  left: 38%;
  bottom: 5%;
}

.place-turn {
  right: 8%;
  bottom: 7%;
}

.place-sharing {
  left: 58%;
  top: 57%;
}

.place-ready .place-icon {
  background: linear-gradient(180deg, #dff8ed, var(--grass));
}

.place-snack .place-icon {
  background: linear-gradient(180deg, #ffb39f, var(--coral));
}

.place-transition .place-icon {
  background: linear-gradient(180deg, #fff0b9, var(--sun));
}

.place-waiting .place-icon {
  background: linear-gradient(180deg, #bfe8f7, var(--pond));
}

.place-bedtime .place-icon {
  background: linear-gradient(180deg, #d88dca, var(--berry));
}

.place-turn .place-icon {
  background: linear-gradient(180deg, #bfe8f7, var(--sky-deep));
}

.place-sharing .place-icon {
  background: linear-gradient(180deg, #8ddcaa, var(--leaf));
}

.place-ready .place-icon::before {
  left: 0.58rem;
  top: 1.08rem;
  width: 1.42rem;
  height: 0.62rem;
  border-radius: 0.65rem 0.5rem 0.38rem 0.38rem;
  background: #ffffff;
  box-shadow: inset 0 -0.16rem 0 rgba(13, 118, 104, 0.14);
  transform: rotate(-12deg);
}

.place-ready .place-icon::after {
  left: 0.98rem;
  top: 0.78rem;
  width: 0.72rem;
  height: 0.5rem;
  border: 0.2rem solid #ffffff;
  border-bottom: 0;
  border-radius: 0.8rem 0.8rem 0 0;
  background: transparent;
  transform: rotate(-12deg);
}

.place-snack .place-icon::before {
  left: 0.75rem;
  top: 0.92rem;
  width: 1.16rem;
  height: 1.12rem;
  border-radius: 48% 48% 54% 54%;
  background: #fff8e8;
  box-shadow: inset -0.16rem -0.14rem 0 rgba(159, 51, 37, 0.15);
}

.place-snack .place-icon::after {
  left: 1.34rem;
  top: 0.55rem;
  width: 0.6rem;
  height: 0.38rem;
  border-radius: 70% 0 70% 0;
  background: var(--leaf);
  transform: rotate(-22deg);
}

.place-transition .place-icon::before {
  left: 0.66rem;
  top: 0.58rem;
  width: 1.28rem;
  height: 1.45rem;
  border: 0.26rem solid rgba(255, 255, 255, 0.92);
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(36deg);
}

.place-transition .place-icon::after {
  left: 0.78rem;
  bottom: 0.52rem;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: rgba(76, 57, 16, 0.42);
  box-shadow:
    0.54rem -0.3rem 0 rgba(76, 57, 16, 0.32),
    1.02rem -0.02rem 0 rgba(76, 57, 16, 0.28);
}

.place-waiting .place-icon::before {
  left: 0.5rem;
  right: 0.5rem;
  top: 1rem;
  height: 0.92rem;
  border: 0.2rem solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.place-waiting .place-icon::after {
  left: 1.55rem;
  top: 0.54rem;
  width: 0.18rem;
  height: 1.18rem;
  border-radius: 999px;
  background: rgba(9, 88, 78, 0.58);
  box-shadow:
    0.25rem 0.08rem 0 rgba(9, 88, 78, 0.46),
    0.48rem 0.2rem 0 rgba(9, 88, 78, 0.34);
  transform: rotate(-12deg);
}

.place-bedtime .place-icon::before {
  left: 0.64rem;
  top: 0.55rem;
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 50%;
  background: #fff8e8;
}

.place-bedtime .place-icon::after {
  left: 0.98rem;
  top: 0.44rem;
  width: 1.18rem;
  height: 1.18rem;
  border-radius: 50%;
  background: var(--berry);
  box-shadow:
    -0.82rem 1.12rem 0 -0.42rem rgba(255, 255, 255, 0.8),
    0.24rem 1.32rem 0 -0.46rem rgba(255, 255, 255, 0.78);
}

.place-turn .place-icon::before {
  left: 0.52rem;
  top: 0.68rem;
  width: 1.12rem;
  height: 0.72rem;
  border: 0.22rem solid rgba(255, 255, 255, 0.92);
  border-right-color: transparent;
  border-radius: 999px;
  transform: rotate(-12deg);
}

.place-turn .place-icon::after {
  right: 0.5rem;
  bottom: 0.62rem;
  width: 1.12rem;
  height: 0.72rem;
  border: 0.22rem solid rgba(255, 255, 255, 0.9);
  border-left-color: transparent;
  border-radius: 999px;
  transform: rotate(-12deg);
}

.place-sharing .place-icon::before {
  left: 0.48rem;
  right: 0.48rem;
  top: 0.9rem;
  height: 0.88rem;
  border-radius: 0.32rem 0.52rem 0.3rem 0.3rem;
  background: #ffffff;
  box-shadow: inset 0 -0.18rem 0 rgba(13, 118, 104, 0.14);
}

.place-sharing .place-icon::after {
  left: 0.72rem;
  bottom: 0.58rem;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0.92rem 0 0 var(--ink);
}

.play-panel {
  min-height: 43rem;
  padding: 1rem;
}

.play-empty {
  display: grid;
  place-items: center;
  min-height: 39.5rem;
  border: 3px dashed rgba(38, 50, 56, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  padding: 2rem;
  text-align: center;
}

.play-empty h2 {
  margin: 0.6rem 0 0.35rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.play-empty p {
  max-width: 27rem;
  color: var(--soft-ink);
  font-size: 1rem;
  line-height: 1.45;
}

.empty-planet {
  width: 7.6rem;
  height: 7.6rem;
  border-radius: 38px;
  background:
    linear-gradient(180deg, var(--sun), var(--coral));
  box-shadow: inset 0 -14px 0 rgba(38, 50, 56, 0.1), var(--button-shadow);
}

.play-topline,
.play-title-row,
.adventure-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.stage-chip,
.session-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 900;
}

.stage-chip {
  background: #ffffff;
  color: var(--trust-dark);
  border: 2px solid rgba(13, 118, 104, 0.24);
}

.session-chip {
  background: rgba(255, 255, 255, 0.64);
  color: var(--soft-ink);
}

.play-title-row {
  align-items: flex-start;
  margin: 0.8rem 0;
}

.play-title-row h2 {
  margin-bottom: 0.2rem;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1;
}

.play-title-row p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 1rem;
  line-height: 1.35;
}

.practice-surface {
  display: grid;
  grid-template-columns: minmax(13rem, 0.9fr) minmax(14rem, 1fr);
  gap: 1rem;
  min-height: 18rem;
  margin: 1rem 0;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 10px 0 rgba(38, 50, 56, 0.08);
}

.scene-sky {
  min-height: 15.5rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, var(--sky) 0 58%, var(--grass) 59% 100%);
  overflow: hidden;
  position: relative;
}

.scene-sun {
  position: absolute;
  width: 4.2rem;
  height: 4.2rem;
  right: 1.2rem;
  top: 1rem;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 10px rgba(255, 211, 106, 0.24);
}

.scene-hill {
  position: absolute;
  bottom: -1.2rem;
  width: 13rem;
  height: 6rem;
  border-radius: 50% 50% 0 0;
  background: rgba(67, 168, 111, 0.7);
}

.scene-hill-one {
  left: -2rem;
}

.scene-hill-two {
  right: -1rem;
  bottom: -1.8rem;
  background: rgba(84, 191, 211, 0.55);
}

.practice-content {
  display: grid;
  align-content: center;
}

.practice-content h3 {
  margin-bottom: 0.45rem;
  color: var(--trust-dark);
  font-size: 1.15rem;
}

.practice-content p {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.42;
}

.decision-text {
  margin: 0;
  color: var(--blue);
  font-weight: 900;
}

.practice-surface.first-then-mode {
  grid-template-columns: minmax(13rem, 0.8fr) minmax(18rem, 1.2fr);
}

.first-then-game {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.75rem;
  border: 3px solid rgba(255, 211, 106, 0.7);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.92), rgba(223, 248, 237, 0.94));
  padding: 0.85rem;
}

.trail-topline,
.trail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.trail-topline span {
  color: var(--trust-dark);
  font-size: 0.88rem;
  font-weight: 900;
}

.trail-topline strong {
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue);
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.trail-board {
  --trail-progress: 0%;
  position: relative;
  min-height: 12rem;
  overflow: hidden;
  isolation: isolate;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 211, 106, 0.75) 0 9%, transparent 10%),
    linear-gradient(180deg, rgba(124, 203, 226, 0.62) 0 48%, rgba(168, 217, 111, 0.58) 49% 100%);
}

.trail-board::before,
.trail-board::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.trail-board::before {
  left: -7%;
  right: -7%;
  bottom: 22%;
  height: 38%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 20% 78%, rgba(255, 248, 232, 0.38) 0 0.42rem, transparent 0.5rem),
    radial-gradient(circle at 58% 62%, rgba(255, 248, 232, 0.28) 0 0.34rem, transparent 0.42rem),
    linear-gradient(180deg, rgba(67, 168, 111, 0.36), rgba(13, 118, 104, 0.16));
  z-index: 0;
}

.trail-board::after {
  right: 8%;
  top: 1.1rem;
  width: 2.7rem;
  height: 3.9rem;
  border-radius: 0.3rem;
  background:
    linear-gradient(90deg, transparent 0 1.1rem, rgba(80, 97, 106, 0.58) 1.1rem 1.35rem, transparent 1.35rem),
    linear-gradient(180deg, transparent 0 0.25rem, var(--sun) 0.25rem 1.25rem, transparent 1.25rem);
  filter: drop-shadow(0 0.18rem 0 rgba(38, 50, 56, 0.12));
  opacity: 0.78;
  z-index: 1;
}

.trail-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 48%;
  height: 0.9rem;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e8, var(--path-sand));
  box-shadow: inset 0 0 0 2px rgba(38, 50, 56, 0.1);
  z-index: 1;
}

.trail-line::before,
.trail-line::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.trail-line::before {
  left: 0;
  top: 0;
  width: var(--trail-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--sun));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.32);
  transition: width 240ms ease;
}

.trail-line::after {
  inset: 0.28rem 0.55rem;
  border-radius: inherit;
  background: repeating-linear-gradient(
    90deg,
    rgba(76, 57, 16, 0.34) 0 0.22rem,
    transparent 0.22rem 0.58rem
  );
  opacity: 0.44;
}

.trail-guide {
  position: absolute;
  left: clamp(8%, var(--trail-progress), 92%);
  top: 21%;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 3px solid #ffffff;
  border-radius: 22px 22px 17px 17px;
  background: linear-gradient(180deg, var(--sun), var(--coral));
  box-shadow: 0 8px 0 rgba(38, 50, 56, 0.1);
  transform: translateX(-50%);
  transition: left 240ms ease, transform 180ms ease;
  z-index: 2;
}

.first-then-game[data-result="correct"] .trail-guide,
.first-then-game[data-result="complete"] .trail-guide {
  transform: translateX(-50%) translateY(-0.25rem);
}

.trail-guide span,
.trail-guide span::before,
.trail-guide span::after {
  display: block;
  border-radius: 999px;
  background: var(--ink);
}

.trail-guide span {
  position: relative;
  width: 1.3rem;
  height: 0.22rem;
  margin-top: 0.7rem;
  background: transparent;
}

.trail-guide span::before,
.trail-guide span::after {
  content: "";
  position: absolute;
  top: -0.55rem;
  width: 0.32rem;
  height: 0.32rem;
}

.trail-guide span::before {
  left: 0.05rem;
}

.trail-guide span::after {
  right: 0.05rem;
}

.trail-slots {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.8rem, 1fr));
  gap: 0.55rem;
  z-index: 3;
}

.trail-slot {
  display: grid;
  gap: 0.25rem;
  min-height: 4.4rem;
  border: 2px dashed rgba(38, 50, 56, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.55rem;
  text-align: center;
  position: relative;
}

.trail-slot span {
  color: var(--soft-ink);
  font-size: 0.75rem;
  font-weight: 900;
}

.trail-slot strong {
  align-self: center;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.1;
}

.trail-slot.filled {
  border-style: solid;
  border-color: rgba(67, 168, 111, 0.5);
  background:
    linear-gradient(180deg, #ffffff, #f3ffe8);
  box-shadow: 0 6px 0 rgba(67, 168, 111, 0.14);
}

.trail-slot.filled::after {
  content: "";
  position: absolute;
  right: 0.46rem;
  top: 0.46rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 0.18rem rgba(67, 168, 111, 0.16);
}

.trail-slot.hint {
  border-color: var(--sun);
  animation: slotPulse 1.1s ease-in-out infinite;
}

.trail-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.trail-tile {
  min-width: 6.5rem;
  min-height: 3.25rem;
  border: 2px solid rgba(13, 118, 104, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f6fff6);
  color: var(--trust-dark);
  padding: 0.55rem 0.9rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  box-shadow:
    inset 0 -0.18rem 0 rgba(13, 118, 104, 0.08),
    0 7px 0 rgba(13, 118, 104, 0.15);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.trail-tile:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(13, 118, 104, 0.4);
}

.trail-tile:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow:
    inset 0 -0.08rem 0 rgba(13, 118, 104, 0.09),
    0 3px 0 rgba(13, 118, 104, 0.17);
}

.trail-feedback {
  margin: 0;
  color: var(--blue);
  font-weight: 900;
  line-height: 1.35;
}

.practice-surface.wait-glow-mode {
  grid-template-columns: minmax(13rem, 0.8fr) minmax(18rem, 1.2fr);
}

.wait-glow-game {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.75rem;
  overflow: hidden;
  border: 3px solid rgba(84, 191, 211, 0.45);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(219, 247, 250, 0.9));
  padding: 0.85rem;
}

.glow-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.glow-topline span {
  color: var(--trust-dark);
  font-size: 0.88rem;
  font-weight: 900;
}

.glow-topline strong {
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue);
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.glow-board {
  --glow-progress: 0%;
  display: grid;
  gap: 0.7rem;
  min-height: 15rem;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 211, 106, 0.62) 0 11%, transparent 12%),
    linear-gradient(180deg, rgba(124, 203, 226, 0.58) 0 55%, rgba(84, 191, 211, 0.2) 56% 100%);
  padding: 1rem;
}

.glow-board::before,
.glow-board::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.glow-board::before {
  left: 8%;
  right: 8%;
  bottom: 0.6rem;
  height: 3.4rem;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(255, 255, 255, 0.34) 0 20%, transparent 22%),
    repeating-radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.22) 0 0.18rem, transparent 0.2rem 0.92rem),
    linear-gradient(180deg, rgba(84, 191, 211, 0.48), rgba(13, 118, 104, 0.18));
  z-index: 0;
}

.glow-board::after {
  right: 1.3rem;
  bottom: 1.2rem;
  width: 0.2rem;
  height: 2.9rem;
  border-radius: 999px;
  background: rgba(9, 88, 78, 0.52);
  box-shadow:
    -0.48rem 0.18rem 0 rgba(9, 88, 78, 0.4),
    -0.86rem 0.42rem 0 rgba(9, 88, 78, 0.3),
    0.42rem 0.25rem 0 rgba(9, 88, 78, 0.35);
  transform: rotate(-8deg);
  z-index: 0;
}

.glow-ring {
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  --glow-size: 3rem;
  --glow-shadow: 0.6rem;
  width: 10rem;
  height: 10rem;
  border: 0.7rem solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 211, 106, 0.46) 0 38%, rgba(255, 248, 232, 0.72) 39% 100%);
  box-shadow:
    0 0 0 0.7rem rgba(84, 191, 211, 0.16),
    0 16px 0 rgba(38, 50, 56, 0.08);
  position: relative;
  z-index: 1;
}

.glow-ring::before,
.glow-ring::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.glow-ring::before {
  inset: -1.05rem;
  border: 0.18rem solid rgba(255, 248, 232, 0.56);
  border-radius: 50%;
  opacity: 0.7;
}

.glow-ring::after {
  left: 15%;
  right: 15%;
  bottom: -1.08rem;
  height: 0.72rem;
  border-radius: 50%;
  background: rgba(38, 50, 56, 0.12);
}

.glow-orb {
  width: var(--glow-size);
  height: var(--glow-size);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff 0 17%, var(--sun) 18% 100%);
  box-shadow: 0 0 var(--glow-shadow) rgba(255, 211, 106, 0.82);
  transition: width 220ms ease, height 220ms ease, box-shadow 220ms ease;
  z-index: 1;
}

.glow-bell {
  position: absolute;
  right: 0.7rem;
  bottom: 0.6rem;
  width: 2.3rem;
  height: 2rem;
  border-radius: 1.2rem 1.2rem 0.45rem 0.45rem;
  background: var(--berry);
  box-shadow: inset 0 -0.45rem 0 rgba(38, 50, 56, 0.12);
  transform-origin: 50% 0.1rem;
  z-index: 2;
}

.glow-bell::before,
.glow-bell::after {
  content: "";
  position: absolute;
}

.glow-bell::before {
  left: 0.78rem;
  top: -0.38rem;
  width: 0.74rem;
  height: 0.55rem;
  border: 0.18rem solid rgba(255, 255, 255, 0.86);
  border-bottom: 0;
  border-radius: 0.7rem 0.7rem 0 0;
}

.glow-bell::after {
  left: 0.92rem;
  bottom: -0.24rem;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  background: #fff8e8;
  box-shadow: 0 0.12rem 0 rgba(38, 50, 56, 0.12);
}

.glow-meter {
  align-self: end;
  height: 1.1rem;
  overflow: hidden;
  border: 2px solid rgba(38, 50, 56, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  position: relative;
  z-index: 1;
}

.glow-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pond), var(--sun));
  transition: width 220ms ease;
}

.glow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.glow-action {
  min-width: 6.5rem;
  min-height: 3.25rem;
  border: 2px solid rgba(49, 95, 143, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f3fbff);
  color: var(--blue);
  padding: 0.55rem 0.9rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  box-shadow:
    inset 0 -0.18rem 0 rgba(49, 95, 143, 0.07),
    0 7px 0 rgba(49, 95, 143, 0.13);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.glow-action:hover:not(:disabled) {
  border-color: rgba(49, 95, 143, 0.42);
  transform: translateY(-2px);
}

.glow-action:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow:
    inset 0 -0.08rem 0 rgba(49, 95, 143, 0.08),
    0 3px 0 rgba(49, 95, 143, 0.15);
}

.wait-glow-game[data-paused="true"] .glow-ring {
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 0.7rem rgba(255, 211, 106, 0.18),
    0 16px 0 rgba(38, 50, 56, 0.08);
}

.wait-glow-game[data-result="complete"] .glow-bell {
  animation: bellRing 420ms ease-in-out 2;
}

.glow-feedback {
  margin: 0;
  color: var(--blue);
  font-weight: 900;
  line-height: 1.35;
}

.practice-surface.share-train-mode {
  grid-template-columns: minmax(13rem, 0.8fr) minmax(18rem, 1.2fr);
}

.share-train-game {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.75rem;
  overflow: hidden;
  border: 3px solid rgba(67, 168, 111, 0.46);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(223, 248, 237, 0.94));
  padding: 0.85rem;
}

.train-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.train-topline span {
  color: var(--trust-dark);
  font-size: 0.88rem;
  font-weight: 900;
}

.train-topline strong {
  border-radius: 999px;
  background: #ffffff;
  color: var(--trust-dark);
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.share-train-game[data-turn="partner"] .train-topline strong {
  color: var(--blue);
}

.train-board {
  min-height: 13.5rem;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  background:
    radial-gradient(circle at 82% 22%, rgba(255, 211, 106, 0.62) 0 11%, transparent 12%),
    linear-gradient(180deg, rgba(191, 232, 247, 0.72) 0 54%, rgba(168, 217, 111, 0.62) 55% 100%);
  position: relative;
  isolation: isolate;
}

.train-board::before,
.train-board::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.train-board::before {
  left: 1.1rem;
  bottom: 29%;
  width: 3.4rem;
  height: 4.1rem;
  border-radius: 0.5rem 0.5rem 0 0;
  background:
    linear-gradient(90deg, transparent 0 0.42rem, rgba(80, 97, 106, 0.56) 0.42rem 0.68rem, transparent 0.68rem 2.7rem, rgba(80, 97, 106, 0.56) 2.7rem 2.96rem, transparent 2.96rem),
    linear-gradient(180deg, transparent 0 0.65rem, rgba(255, 248, 232, 0.92) 0.65rem 1.75rem, transparent 1.75rem),
    linear-gradient(180deg, rgba(244, 124, 107, 0.84), rgba(159, 51, 37, 0.32));
  box-shadow: 0 0.35rem 0 rgba(38, 50, 56, 0.1);
  opacity: 0.9;
  z-index: 0;
}

.train-board::after {
  left: -8%;
  right: -8%;
  bottom: 0;
  height: 32%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 28% 72%, rgba(255, 248, 232, 0.28) 0 0.42rem, transparent 0.5rem),
    linear-gradient(180deg, rgba(67, 168, 111, 0.34), rgba(13, 118, 104, 0.12));
  z-index: 0;
}

.train-track {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 27%;
  height: 1.8rem;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      transparent 0 0.35rem,
      var(--rail) 0.35rem 0.58rem,
      transparent 0.58rem 1.12rem,
      var(--rail-light) 1.12rem 1.35rem,
      transparent 1.35rem
    );
  z-index: 1;
}

.train-track::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  top: 0.26rem;
  bottom: 0.26rem;
  background: repeating-linear-gradient(
    90deg,
    rgba(76, 57, 16, 0.28) 0 0.34rem,
    transparent 0.34rem 1.02rem
  );
}

.train-pieces {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 34%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
  z-index: 2;
}

.train-piece {
  display: grid;
  place-items: center;
  min-height: 4.1rem;
  border: 3px dashed rgba(38, 50, 56, 0.18);
  border-radius: 18px 18px 10px 10px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 900;
  position: relative;
  box-shadow: inset 0 -0.2rem 0 rgba(38, 50, 56, 0.04);
}

.train-piece::before,
.train-piece::after {
  content: "";
  position: absolute;
  bottom: -0.68rem;
  width: 0.7rem;
  height: 0.7rem;
  border: 0.12rem solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: var(--ink);
}

.train-piece::before {
  left: 18%;
}

.train-piece::after {
  right: 18%;
}

.train-piece.filled {
  border-style: solid;
  border-color: rgba(67, 168, 111, 0.42);
  background:
    linear-gradient(90deg, transparent 0 0.82rem, rgba(255, 255, 255, 0.64) 0.82rem 1.42rem, transparent 1.42rem),
    linear-gradient(180deg, #ffffff, #dff8ed);
  color: var(--trust-dark);
  box-shadow: 0 7px 0 rgba(67, 168, 111, 0.13);
}

.train-piece.partner {
  border-color: rgba(84, 191, 211, 0.48);
  background:
    linear-gradient(90deg, transparent 0 0.82rem, rgba(255, 255, 255, 0.66) 0.82rem 1.42rem, transparent 1.42rem),
    linear-gradient(180deg, #ffffff, #dff7fa);
  color: var(--blue);
}

.share-train-game[data-repair="true"] .train-board {
  box-shadow: inset 0 0 0 0.45rem rgba(255, 211, 106, 0.22);
}

.train-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.train-action {
  min-width: 8rem;
  min-height: 3.25rem;
  border: 2px solid rgba(13, 118, 104, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7fff4);
  color: var(--trust-dark);
  padding: 0.55rem 0.9rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  box-shadow:
    inset 0 -0.18rem 0 rgba(13, 118, 104, 0.07),
    0 7px 0 rgba(13, 118, 104, 0.13);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.train-action:hover:not(:disabled) {
  border-color: rgba(13, 118, 104, 0.42);
  transform: translateY(-2px);
}

.train-action:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow:
    inset 0 -0.08rem 0 rgba(13, 118, 104, 0.08),
    0 3px 0 rgba(13, 118, 104, 0.15);
}

.train-feedback {
  margin: 0;
  color: var(--blue);
  font-weight: 900;
  line-height: 1.35;
}

.practice-surface.journey-mode {
  grid-template-columns: minmax(13rem, 0.75fr) minmax(18rem, 1.25fr);
}

.journey-step {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(12rem, 0.78fr) minmax(17rem, 1.22fr);
  gap: 1rem;
  overflow: hidden;
  border: 3px solid rgba(124, 203, 226, 0.48);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(223, 248, 237, 0.92));
  padding: 0.9rem;
}

.journey-step[data-stage="reflection"] {
  border-color: rgba(255, 211, 106, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.96), rgba(255, 244, 201, 0.94));
}

.journey-scene {
  min-height: 15.5rem;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 211, 106, 0.95) 0 13%, transparent 14%),
    linear-gradient(180deg, rgba(191, 232, 247, 0.8) 0 55%, rgba(168, 217, 111, 0.66) 56% 100%);
  position: relative;
}

.journey-path {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 20%;
  height: 1rem;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.95);
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px rgba(38, 50, 56, 0.08);
}

.journey-gate {
  position: absolute;
  right: 14%;
  bottom: 21%;
  width: 5.4rem;
  height: 6.4rem;
  border: 0.7rem solid rgba(49, 95, 143, 0.78);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: rgba(255, 255, 255, 0.28);
}

.journey-helper {
  position: absolute;
  left: 15%;
  bottom: 28%;
  display: grid;
  place-items: center;
  width: 4.3rem;
  height: 4.3rem;
  border: 3px solid #ffffff;
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(180deg, var(--sun), var(--coral));
  box-shadow: 0 8px 0 rgba(38, 50, 56, 0.1);
  animation: guideFloat 3.8s ease-in-out infinite;
  z-index: 2;
}

.journey-helper span,
.journey-helper span::before,
.journey-helper span::after {
  display: block;
  border-radius: 999px;
  background: var(--ink);
}

.journey-helper span {
  position: relative;
  width: 1.4rem;
  height: 0.24rem;
  margin-top: 0.75rem;
  background: transparent;
}

.journey-helper span::before,
.journey-helper span::after {
  content: "";
  position: absolute;
  top: -0.58rem;
  width: 0.34rem;
  height: 0.34rem;
}

.journey-helper span::before {
  left: 0.07rem;
}

.journey-helper span::after {
  right: 0.07rem;
}

.journey-spark {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 0.45rem rgba(255, 211, 106, 0.22);
}

.journey-spark-one {
  left: 33%;
  top: 27%;
}

.journey-spark-two {
  right: 22%;
  top: 42%;
}

.journey-copy {
  display: grid;
  align-content: center;
  gap: 0.55rem;
}

.journey-kicker {
  margin: 0;
  color: var(--trust-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.journey-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1;
}

.journey-copy p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 1rem;
  line-height: 1.38;
}

.journey-guide-text {
  color: var(--blue) !important;
  font-weight: 900;
}

.journey-card-note {
  border: 2px solid rgba(13, 118, 104, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  padding: 0.7rem;
}

.journey-card-note strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--trust-dark);
}

.journey-card-note ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--soft-ink);
}

.journey-card-note li {
  margin: 0.22rem 0;
}

.journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.grownup-log-action {
  background: rgba(255, 255, 255, 0.72);
  color: var(--soft-ink);
}

.adventure-meta {
  display: none;
  margin-top: 0.9rem;
  border-top: 2px solid rgba(38, 50, 56, 0.08);
  padding-top: 0.85rem;
  color: var(--soft-ink);
  font-size: 0.9rem;
}

.adventure-meta p {
  margin: 0;
}

.bridge-card {
  display: none;
  margin-top: 0.9rem;
  border: 2px solid rgba(84, 191, 211, 0.26);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.85rem;
}

.bridge-card h3 {
  margin-bottom: 0.5rem;
  color: var(--trust-dark);
}

.bridge-card p {
  margin: 0.35rem 0;
}

.aac-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: rgba(255, 248, 232, 0.96);
  box-shadow: var(--soft-shadow);
  padding: 0.75rem;
  z-index: 4;
}

.aac-bar h3,
.aac-bar p {
  margin: 0;
}

.aac-bar p {
  color: var(--soft-ink);
  font-size: 0.86rem;
}

.aac-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.aac-buttons button {
  min-height: 3rem;
  border: 2px solid rgba(13, 118, 104, 0.22);
  border-radius: 16px;
  background: #ffffff;
  color: var(--trust-dark);
  padding: 0.55rem 0.9rem;
  font-size: 1rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  box-shadow: 0 6px 0 rgba(13, 118, 104, 0.14);
}

.grownup-mode {
  min-height: 100vh;
  background: var(--grownup-bg);
  padding: 1rem;
}

.grownup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1420px;
  margin: 0 auto 1rem;
  border: 1px solid var(--grownup-border);
  border-radius: 8px;
  background: var(--grownup-surface);
  padding: 1rem;
}

.grownup-header p {
  margin-bottom: 0;
  color: var(--grownup-muted);
}

.grownup-toolbar label,
.control-grid label {
  display: grid;
  gap: 0.25rem;
  color: var(--grownup-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.advanced-child-control {
  min-width: 12rem;
}

.advanced-child-control summary {
  min-height: 2.45rem;
  border: 1px solid var(--grownup-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--grownup-muted);
  padding: 0.58rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.advanced-child-control label {
  margin-top: 0.45rem;
}

input,
select {
  min-height: 2.45rem;
  border: 1px solid var(--grownup-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0.45rem 0.6rem;
}

.grownup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1420px;
  margin: 0 auto;
}

.panel {
  border: 1px solid var(--grownup-border);
  border-radius: 8px;
  background: var(--grownup-surface);
  padding: 0.95rem;
}

.setup-panel {
  grid-column: span 2;
}

.insights-panel {
  grid-column: span 2;
}

.section-heading {
  margin-bottom: 0.75rem;
}

.section-heading h2,
.tool-block h3 {
  margin-bottom: 0.2rem;
}

.muted,
.section-heading p {
  color: var(--grownup-muted);
}

.list {
  display: grid;
  gap: 0.55rem;
}

.routine-item,
.plan-item {
  display: grid;
  width: 100%;
  gap: 0.2rem;
  text-align: left;
  box-shadow: none;
}

.routine-item span,
.plan-item span {
  color: var(--grownup-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tool-block {
  margin-top: 1rem;
  border-top: 1px solid var(--grownup-border);
  padding-top: 1rem;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.setup-grid {
  margin-top: 0.75rem;
}

.profile-status {
  display: grid;
  gap: 0.18rem;
  border: 1px solid rgba(49, 95, 143, 0.18);
  border-radius: 8px;
  background: #f7fbff;
  padding: 0.72rem;
}

.profile-status.ready {
  border-color: rgba(13, 118, 104, 0.24);
  background: #f4fbf7;
}

.profile-status strong {
  color: var(--trust-dark);
}

.profile-status span {
  color: var(--grownup-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.practice-history {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--grownup-border);
  padding-top: 0.75rem;
  color: var(--grownup-muted);
  font-size: 0.88rem;
}

.practice-history strong {
  color: var(--ink);
}

.practice-history p {
  margin: 0;
}

.pilot-status-panel {
  grid-column: span 2;
}

.pilot-status-summary {
  display: grid;
  gap: 0.65rem;
  border: 1px solid rgba(49, 95, 143, 0.18);
  border-radius: 8px;
  background: #f7fbff;
  padding: 0.8rem;
}

.pilot-status-summary.ready {
  border-color: rgba(13, 118, 104, 0.24);
  background: #f4fbf7;
}

.pilot-status-summary.needs-attention {
  border-color: rgba(184, 105, 43, 0.24);
  background: #fff8ef;
}

.pilot-status-head {
  display: grid;
  gap: 0.2rem;
}

.pilot-status-head strong {
  color: var(--trust-dark);
}

.pilot-status-head span,
.pilot-audit,
.pilot-consent-copy {
  color: var(--grownup-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.pilot-consent-copy {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0;
}

.pilot-consent-copy p,
.pilot-audit {
  margin: 0;
}

.pilot-checklist {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pilot-check-item {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) auto;
  gap: 0.15rem 0.5rem;
  border: 1px solid rgba(49, 95, 143, 0.14);
  border-radius: 8px;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
}

.pilot-check-item span {
  color: var(--ink);
  font-weight: 700;
}

.pilot-check-item strong {
  color: var(--grownup-muted);
  font-size: 0.78rem;
  text-transform: capitalize;
}

.pilot-check-item small {
  grid-column: 1 / -1;
  color: var(--grownup-muted);
  line-height: 1.35;
}

.pilot-check-item.ready {
  border-color: rgba(13, 118, 104, 0.2);
}

.pilot-check-item.blocked {
  border-color: rgba(184, 43, 43, 0.22);
}

.pilot-consent-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pilot-technical-details {
  margin-top: 0.75rem;
}

.pilot-technical-details summary {
  cursor: pointer;
  color: var(--trust-dark);
  font-weight: 700;
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check-row input {
  min-height: auto;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.7rem 0;
}

.insight-box {
  margin-top: 0.65rem;
  color: var(--grownup-muted);
  font-size: 0.86rem;
}

.insight-box p,
.insight-box ul {
  margin-bottom: 0.45rem;
}

.insights-v2 {
  display: grid;
  gap: 0.75rem;
}

.insights-summary,
.insight-section {
  border: 1px solid rgba(216, 205, 189, 0.9);
  border-radius: 8px;
  background: #fffdf8;
  padding: 0.8rem;
}

.insights-summary {
  border-color: rgba(13, 118, 104, 0.22);
  background: #f4fbf7;
}

.insights-summary.empty {
  border-color: rgba(49, 95, 143, 0.18);
  background: #f7fbff;
}

.insights-summary h3,
.insight-section h3 {
  margin-bottom: 0.35rem;
  color: var(--trust-dark);
  font-size: 1rem;
}

.insights-summary p,
.insight-section li,
.insight-raw-note {
  color: var(--grownup-muted);
  font-size: 0.88rem;
  line-height: 1.42;
}

.insight-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.insight-stat {
  display: grid;
  gap: 0.12rem;
  border: 1px solid rgba(13, 118, 104, 0.14);
  border-radius: 8px;
  background: #ffffff;
  padding: 0.55rem;
}

.insight-stat span {
  color: var(--grownup-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.insight-stat strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.insight-section ul {
  margin: 0;
  padding-left: 1.1rem;
}

.insight-section li {
  margin: 0.35rem 0;
}

.insight-raw-note {
  margin: 0;
  border-top: 1px solid rgba(216, 205, 189, 0.8);
  padding-top: 0.6rem;
  font-size: 0.8rem;
}

pre {
  max-height: 22rem;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid #e5ddcf;
  border-radius: 8px;
  background: #fbfaf6;
  padding: 0.65rem;
  color: #3d3428;
  font-size: 0.78rem;
}

.error {
  color: var(--danger);
}

.quiet-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes guideFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.35rem);
  }
}

@keyframes guideBreathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.96);
  }
}

@keyframes guideHop {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  40% {
    transform: translateY(-0.32rem) rotate(-2deg);
  }
  70% {
    transform: translateY(-0.12rem) rotate(2deg);
  }
}

@keyframes pathGlow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.14);
  }
}

@keyframes routeMarkerTravel {
  0%,
  100% {
    transform: translate(0, -50%) scale(0.9);
  }
  50% {
    transform: translate(18rem, -50%) scale(1);
  }
}

@keyframes slotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 211, 106, 0);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 211, 106, 0.24);
  }
}

@keyframes bellRing {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-7deg);
  }
  75% {
    transform: rotate(7deg);
  }
}

@media (max-width: 1180px) {
  .adventure-shell,
  .grownup-grid {
    grid-template-columns: 1fr;
  }

  .insights-panel {
    grid-column: auto;
  }

  .setup-panel {
    grid-column: auto;
  }

  .world-panel,
  .play-panel {
    min-height: auto;
  }

  .world-map {
    min-height: 32rem;
  }
}

@media (max-width: 760px) {
  .game-header,
  .grownup-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .child-mode {
    padding: 0 0.7rem 12.5rem;
  }

  .insight-stats,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .world-panel,
  .play-panel {
    border-radius: 22px;
    padding: 0.75rem;
  }

  .world-map {
    min-height: auto;
    background: rgba(255, 255, 255, 0.35);
    padding: 0.7rem;
  }

  .map-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .routine-trails {
    justify-content: stretch;
  }

  .routine-trail {
    max-width: none;
    flex: 1 1 9rem;
  }

  .daily-path-step,
  .routine-trail,
  .soft-button,
  .grownup-button {
    min-height: 3rem;
  }

  .map-path,
  .route-thread,
  .world-map::before,
  .world-map::after {
    display: none;
  }

  .moments-world {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .world-place {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 5.6rem;
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
  }

  .world-place span:not(.place-icon) {
    grid-column: 2;
  }

  .place-status {
    grid-column: 2;
  }

  .practice-surface,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .practice-surface.first-then-mode {
    grid-template-columns: 1fr;
  }

  .practice-surface.wait-glow-mode {
    grid-template-columns: 1fr;
  }

  .practice-surface.share-train-mode {
    grid-template-columns: 1fr;
  }

  .practice-surface.journey-mode,
  .journey-step {
    grid-template-columns: 1fr;
  }

  .journey-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .journey-actions button {
    width: 100%;
  }

  .trail-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .trail-choices {
    display: grid;
    grid-template-columns: 1fr;
  }

  .trail-tile {
    width: 100%;
  }

  .glow-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .glow-action {
    width: 100%;
  }

  .train-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .train-action {
    width: 100%;
  }

  .train-pieces {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    bottom: 23%;
  }

  .train-board {
    min-height: 18rem;
  }

  .play-title-row,
  .play-topline,
  .adventure-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-play-button,
  .play-actions button {
    width: 100%;
  }

  .aac-bar {
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.6rem;
    display: grid;
    grid-template-columns: minmax(6.6rem, 0.74fr) minmax(0, 1.26fr);
    align-items: center;
    gap: 0.55rem;
    max-height: 42vh;
    overflow: auto;
    border-radius: 20px;
    padding: 0.6rem;
  }

  .aac-bar h3 {
    font-size: 1rem;
    line-height: 1.05;
  }

  .aac-bar p {
    font-size: 0.76rem;
    line-height: 1.15;
  }

  .aac-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0.42rem;
  }

  .aac-buttons button {
    width: 100%;
    min-height: 3rem;
    padding: 0.46rem 0.35rem;
    font-size: 0.94rem;
  }
}
