/* ============================================================
   DESIGN TOKENS — "Alpine Day"
   Sunny sky-blue daylight for everyday screens; starlit navy for
   the reward peaks. Every colour has exactly one job — if you need
   a colour that isn't here, the answer is usually a token that
   already exists, not a new literal.
   ============================================================ */
:root {
  /* Day surfaces */
  --bg-top:       #8FD0F2;   /* sky blue, sky-ward */
  --bg-bottom:    #DFF3FB;   /* horizon haze */
  --surface:      #FFFFFF;   /* cards */
  --surface-sunk: #EAF6FC;   /* inset panels, chips */
  --on-dark:      #F7FBFF;   /* text/icons on dark or coloured fills */

  /* Night surfaces — peak moments only */
  --night:        #142033;   /* night-sky navy */
  --night-2:      #1E2E47;   /* raised night surface */
  --glow:         #FFD166;   /* firelight — never used on day */

  /* Ink */
  --ink:          #20242E;   /* cool near-black */
  --ink-soft:     #3F4C63;
  --ink-mute:     #66748C;
  --on-dark-mute: rgba(247,251,255,.62);  /* muted text ON night surfaces */
  --hairline:     #CFE4F0;

  /* Accents — one job each */
  --action:       #FF8A3D;   /* campfire orange — CTAs ONLY */
  --action-deep:  #EA6A1F;
  --brand:        #C93345;   /* pokito red — brand voice only */
  --grow:         #3DA35D;   /* progress, done, success */
  --grow-deep:    #2C7A44;
  --mist:         #86C9B5;   /* calm / info */
  --gold:         #FFC93C;   /* points & rewards on day (fills only) */
  --gold-deep:    #8A6508;   /* gold as TEXT on light — #FFC93C fails contrast */
  --danger:       #B3261E;   /* errors — no longer borrows brand red */

  /* Scenery — the world outside the cards */
  --mtn-far:      #BFDCF0;
  --mtn-near:     #8FB4D8;
  --snow:         #F4FAFF;
  --hill:         #A8D8A0;
  --hill-2:       #7FC489;
  --tree-dark:    #2E7D4F;
  --tree-mid:     #3E8E5A;
  --tree-light:   #55A868;
  --trunk:        #8C6239;

  --radius-card: 18px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 3px rgba(23,42,58,.06), 0 6px 16px rgba(23,42,58,.05);
  --shadow-2: 0 2px 6px rgba(23,42,58,.08), 0 14px 32px rgba(23,42,58,.10);
  --ease:     cubic-bezier(.2,.8,.3,1);
  --dur-fast: 140ms;
  --dur:      260ms;
}

/* Reset default browser styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Overall page.
   The gradient + contour art live on a single fixed ::before layer rather
   than on the body itself — background-attachment: fixed is unreliable on
   iOS Safari, and a fixed pseudo-element behaves identically everywhere. */
body {
  font-family: 'Chill Sans', sans-serif;
  background-color: var(--bg-bottom);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 46% at 50% 4%, rgba(255,252,235,.55) 0%, rgba(255,252,235,0) 70%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

/* The horizon. A snow-capped mountain range anchored to the bottom of the
   viewport, so the reading area stays clean paper and the world sits where a
   horizon belongs. Content scrolls over it; opaque cards simply occlude the
   peaks, which is what gives the screen depth. Mountains never move, so they
   stay a cheap CSS background — everything that animates lives in #scenery.
   Fills mirror the --mtn-* / --snow tokens (data-URIs can't read CSS vars). */
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(240px, 46vh, 430px);
  z-index: -2;
  pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 500' preserveAspectRatio='xMidYMax slice'><path fill='%23BFDCF0' d='M0 500L0 265L110 185L205 245L325 145L445 235L560 175L685 255L800 165L915 245L1035 185L1135 240L1200 205L1200 500Z'/><path fill='%23F4FAFF' d='M325 145L295 170L305 163L315 172L326 164L338 172L355 168Z'/><path fill='%23F4FAFF' d='M800 165L771 187L781 180L791 189L801 181L813 189L830 186Z'/><path fill='%238FB4D8' d='M0 500L0 365L95 300L185 355L305 255L425 360L545 295L665 370L785 275L905 365L1015 305L1120 370L1200 330L1200 500Z'/><path fill='%23F4FAFF' d='M95 300L68 318L78 312L87 320L97 313L109 320L121 316Z'/><path fill='%23F4FAFF' d='M305 255L275 280L287 272L298 283L309 274L321 284L335 281Z'/><path fill='%23F4FAFF' d='M545 295L515 311L526 305L536 314L547 306L559 315L575 314Z'/><path fill='%23F4FAFF' d='M785 275L753 300L764 293L775 302L786 294L799 303L817 299Z'/><path fill='%23F4FAFF' d='M1015 305L985 321L995 315L1004 323L1014 316L1026 324L1046 324Z'/></svg>") bottom center / cover no-repeat;
}

/* ---- SCENERY — the living layer ------------------------------------
   Everything that moves lives here: green hills, swaying trees, a grazing
   deer, a fox, and an eagle crossing the sky. Sits between the mountains
   (body::after, -2) and content, so opaque cards occlude it like the old
   treeline. All animations are transform-only (composited); the global
   reduced-motion guard at the bottom of this file neutralises every one,
   leaving the unanimated "postcard" poses. */
#scenery {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.scenery-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(170px, 30vh, 300px);
}

/* Trees sway from the trunk base; three duration variants plus per-tree
   delays (inline in the markup) keep the forest from moving in lockstep. */
#scenery .tree {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: tree-sway 6.4s ease-in-out infinite;
}
#scenery .tree--s1 { animation-duration: 5.3s; }
#scenery .tree--s2 { animation-duration: 6.4s; }
#scenery .tree--s3 { animation-duration: 7.6s; }

@keyframes tree-sway {
  0%, 100% { transform: rotate(-1.4deg); }
  50%      { transform: rotate(1.8deg) skewX(1.1deg); }
}

/* Deer: long idle, then a dip to graze with a few nibbles; ears flick on
   their own clock. Pivot sits at the neck joint. */
.deer-head {
  transform-box: fill-box;
  transform-origin: 85% 96%;
  animation: deer-graze 16s ease-in-out infinite;
}
.deer-ear {
  transform-box: fill-box;
  transform-origin: 20% 100%;
  animation: deer-ear 9s ease-in-out infinite;
}

@keyframes deer-graze {
  0%, 55%, 78%, 100% { transform: rotate(0deg); }
  60%                { transform: rotate(-56deg); }
  63%, 67%, 71%      { transform: rotate(-60deg); }
  65%, 69%           { transform: rotate(-52deg); }
}
@keyframes deer-ear {
  0%, 90%, 94%, 100% { transform: rotate(0deg); }
  92%                { transform: rotate(-22deg); }
}

/* Fox: sitting; the tail swishes now and then, the head tilts rarely. */
.fox-tail {
  transform-box: fill-box;
  transform-origin: 97% 40%;
  animation: fox-tail 7s ease-in-out infinite;
}
.fox-head {
  transform-box: fill-box;
  transform-origin: 40% 92%;
  animation: fox-head 21s ease-in-out infinite;
}

@keyframes fox-tail {
  0%, 38%, 72%, 100% { transform: rotate(0deg); }
  46%                { transform: rotate(10deg); }
  56%                { transform: rotate(-6deg); }
  64%                { transform: rotate(4deg); }
}
@keyframes fox-head {
  0%, 40%, 60%, 100% { transform: rotate(0deg); }
  46%, 54%           { transform: rotate(-5deg); }
}

/* Eagle: one slow crossing of the sky per ~minute, with a gentle thermal
   bob and the occasional wing beat. The unanimated base position (66%
   across, upper sky) doubles as the reduced-motion "parked" pose. */
.eagle {
  position: absolute;
  top: 11vh;
  left: 66%;
  width: 92px;
  height: auto;
  animation: eagle-glide 55s linear infinite;
  will-change: transform;
}
.eagle-bob {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: eagle-bob 6s ease-in-out infinite alternate;
}
.eagle-wing {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: eagle-flap 18s ease-in-out infinite;
}

@keyframes eagle-glide {
  from { transform: translateX(calc(-66vw - 120px)); }
  to   { transform: translateX(46vw); }
}
@keyframes eagle-bob {
  from { transform: translateY(-7px) rotate(-2deg); }
  to   { transform: translateY(7px) rotate(2.5deg); }
}
@keyframes eagle-flap {
  0%, 86%, 100% { transform: rotate(0deg); }
  88%, 92%, 96% { transform: rotate(-9deg); }
  90%, 94%      { transform: rotate(7deg); }
}

/* pokito illustration */
.pokito-logo {
    width: 250px; /* Increased from 150px */
    max-width: 100%; /* Keeps it from overflowing on small phones */
    margin-bottom: 15px;
}

/* Start button — THE primary CTA. Campfire orange: red is pokito's speaking
   voice (story box, chat bubbles, slogan), orange is you taking action. */
.start-btn {
  background: linear-gradient(165deg, #FFA35C 0%, var(--action) 55%, var(--action-deep) 100%);
  color: var(--on-dark);
  border: none;
  padding: 17px 40px;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Chill Sans', sans-serif;
  border-radius: var(--radius-pill);
  cursor: pointer;
  letter-spacing: .5px;
  box-shadow: 0 6px 18px rgba(234,106,31,.28);
  transition: box-shadow var(--dur) var(--ease), filter var(--dur-fast) var(--ease);
}

.start-btn:hover {
  box-shadow: 0 8px 24px rgba(234,106,31,.36);
  filter: brightness(1.04);
}

/* Onboarding combined form container */
.onboarding-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  align-self: flex-end;
}

.onboarding-form-label {
  font-family: 'Chill Sans', sans-serif;
  font-size: 14px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.onboarding-name-input {
  font-family: 'Chill Sans', sans-serif;
  font-size: 18px;
  border: 2px solid var(--hairline);
  border-radius: 24px;
  padding: 12px 20px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.onboarding-name-input:focus {
  border-color: var(--action);
}

/* Hide chat screen by default */
.chat-screen {
  display: none;
  height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: transparent;
}

/* Chat message bubble from pokito */
.pokito-message {
  background-color: var(--brand);
  color: var(--on-dark);
  padding: 16px 24px;
  border-radius: 20px;
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 500px;
  white-space: pre-wrap;
}

/* Input area at bottom */
.chat-input {
  display: flex;
  gap: 10px;
}

/* Text input field */
.chat-input input {
  padding: 14px 20px;
  font-size: 18px;
  font-family: 'Chill Sans', sans-serif;
  border: 2px solid var(--ink);
  border-radius: 30px;
  width: 300px;
  background-color: var(--surface);
}

/* Send button */
.send-btn {
  background-color: var(--night);
  color: var(--on-dark);
  border: none;
  padding: 14px 28px;
  font-size: 18px;
  font-family: 'Chill Sans', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Parent message bubble */
.parent-message {
    align-self: flex-end; /* Right-aligned */
    background-color: var(--action); /* Brand Orange */
    color: white;
    padding: 12px 18px;
    border-radius: 18px 18px 2px 18px; /* Rounded with a small "tail" on the bottom right */
    font-family: 'Chill Sans', sans-serif;
    font-size: 18px;
    margin: 8px 0;
    max-width: 80%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    word-wrap: break-word;
}

/* Chat messages container */
.chat-messages {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  margin-bottom: 30px;
}

/* Adventure screen */
.adventure-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 100px;
  background: transparent;
  min-height: 100vh;
}

/* Story introduction box */
.story-box {
  background-color: var(--brand);
  color: var(--on-dark);
  padding: 24px;
  border-radius: 20px;
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
  width: 100%;
  margin-bottom: 30px;
  text-align: center;
}

/* Individual task card */
.task-card {
  background-color: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 16px;
  max-width: 600px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

/* Task card when completed */
.task-card.completed {
  background-color: var(--grow);
  border-color: var(--grow);
  color: var(--on-dark);
}

/* Task text */
.task-text {
  font-size: 18px;
  line-height: 1.4;
}

/* Labeled rows inside the task text (Was / Wo / Werkzeug) */
.task-label {
  font-weight: 700;
}

.task-row + .task-row {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}

.task-card.completed .task-row + .task-row {
  color: rgba(247,251,255,.72);
}

/* Points display */
.points-box {
  margin-top: 20px;
  font-size: 28px;
  color: var(--ink);
  font-weight: bold;
}

/* Adventure complete screen */
/* The dusk peak. Also serves #register-prompt-screen — same post-adventure
   moment, so it deliberately shares the treatment. */
.complete-screen {
  display: none;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 120% 80% at 50% 32%, #243C5E 0%, var(--night) 62%);
  padding: 40px;
  text-align: center;
  overflow: hidden;
}

/* Contour lines again, but drawn in firelight instead of ink. */
.complete-screen::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(240px, 46vh, 430px);
  pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='xMidYMax slice'><path fill='%231D3050' d='M0 400L0 190L110 120L205 175L325 85L445 165L560 110L685 180L800 100L915 170L1035 115L1135 165L1200 135L1200 400Z'/><path fill='%23203756' d='M0 400L0 268C90 232 150 248 236 214C330 177 402 226 500 206C596 186 660 232 764 210C860 190 928 234 1030 212C1108 195 1156 224 1200 214L1200 400Z'/><path fill='%23172A44' d='M0 400L0 318M-35.8 269.5a15.8 35.1 0 1 0 31.7 0a15.8 35.1 0 1 0 -31.7 0ZM-21.7 318h3.5V269.5h-3.5ZM-5.2 318L14.6 261.9L34.5 318ZM25.5 318L46.0 225.1L66.5 318ZM66.1 318L80.1 225.7L94.1 318ZM80.0 318L99.9 264.9L119.8 318ZM121.1 318L133.2 254.7L145.3 318ZM148.8 318L163.5 256.2L178.1 318ZM183.1 264.0a14.2 39.1 0 1 0 28.4 0a14.2 39.1 0 1 0 -28.4 0ZM195.8 318h3.1V264.0h-3.1ZM219.9 318L232.1 258.9L244.4 318ZM242.9 318L256.6 232.9L270.3 318ZM265.0 318L284.3 231.5L303.6 318ZM298.2 318L313.1 235.3L328.0 318ZM314.9 318L334.3 233.3L353.7 318ZM364.0 318L376.4 247.9L388.8 318ZM384.8 283.5a11.4 24.9 0 1 0 22.7 0a11.4 24.9 0 1 0 -22.7 0ZM395.0 318h2.5V283.5h-2.5ZM412.9 318L426.1 223.0L439.3 318ZM439.7 318L452.6 244.2L465.5 318ZM461.8 318L474.7 248.7L487.7 318ZM483.3 318L498.1 253.2L513.0 318ZM513.5 318L526.6 222.1L539.8 318ZM536.2 318L555.2 234.0L574.2 318ZM585.1 269.8a10.2 34.9 0 1 0 20.3 0a10.2 34.9 0 1 0 -20.3 0ZM594.0 318h2.5V269.8h-2.5ZM614.5 318L629.1 263.4L643.7 318ZM637.7 318L651.8 254.1L666.0 318ZM664.2 318L677.8 223.7L691.4 318ZM697.4 318L710.4 259.1L723.5 318ZM722.4 318L738.1 222.6L753.7 318ZM748.9 318L763.4 222.0L778.0 318ZM784.2 268.6a10.2 35.8 0 1 0 20.4 0a10.2 35.8 0 1 0 -20.4 0ZM793.2 318h2.5V268.6h-2.5ZM805.6 318L824.2 257.5L842.8 318ZM837.5 318L853.0 260.6L868.6 318ZM868.8 318L884.1 264.3L899.5 318ZM898.7 318L911.5 225.7L924.4 318ZM919.9 318L934.9 232.4L949.8 318ZM949.6 318L965.1 223.5L980.6 318ZM988.1 282.7a10.9 25.6 0 1 0 21.8 0a10.9 25.6 0 1 0 -21.8 0ZM997.7 318h2.5V282.7h-2.5ZM1005.5 318L1024.6 251.2L1043.7 318ZM1047.6 318L1060.1 270.8L1072.6 318ZM1074.8 318L1090.0 249.2L1105.1 318ZM1098.1 318L1113.3 267.9L1128.5 318ZM1126.8 318L1140.8 239.3L1154.7 318ZM1158.4 318L1171.3 236.0L1184.3 318ZM1186.3 274.8a13.5 31.3 0 1 0 27.0 0a13.5 31.3 0 1 0 -27.0 0ZM1198.4 318h3.0V274.8h-3.0ZM1212.3 318L1225.8 254.5L1239.4 318ZL1200 318L1200 400Z'/><path fill='%230E1B30' d='M0 400L0 392M-41.8 345.9a21.8 33.4 0 1 0 43.6 0a21.8 33.4 0 1 0 -43.6 0ZM-22.4 392h4.8V345.9h-4.8ZM2.7 392L22.8 264.1L42.8 392ZM41.1 392L62.0 259.8L82.9 392ZM73.6 392L102.6 295.9L131.6 392ZM122.8 392L148.3 317.4L173.7 392ZM163.9 392L191.7 294.0L219.5 392ZM236.3 331.9a15.6 43.5 0 1 0 31.3 0a15.6 43.5 0 1 0 -31.3 0ZM250.2 392h3.4V331.9h-3.4ZM270.7 392L293.7 269.1L316.7 392ZM316.3 392L336.3 276.8L356.3 392ZM340.3 392L369.8 263.4L399.3 392ZM387.4 392L413.9 320.3L440.4 392ZM434.6 392L458.4 305.0L482.2 392ZM484.9 338.9a17.4 38.5 0 1 0 34.7 0a17.4 38.5 0 1 0 -34.7 0ZM500.3 392h3.8V338.9h-3.8ZM510.1 392L538.1 272.8L566.2 392ZM571.5 392L590.9 272.9L610.3 392ZM610.7 392L635.2 283.0L659.6 392ZM655.1 392L679.2 318.2L703.2 392ZM694.3 392L721.7 270.1L749.2 392ZM752.0 344.2a19.5 34.6 0 1 0 39.1 0a19.5 34.6 0 1 0 -39.1 0ZM769.4 392h4.3V344.2h-4.3ZM788.0 392L810.5 324.8L833.0 392ZM819.5 392L847.6 321.8L875.6 392ZM876.7 392L902.5 276.2L928.2 392ZM928.8 392L948.6 311.4L968.3 392ZM959.1 392L986.7 298.9L1014.4 392ZM1010.9 347.9a16.0 31.9 0 1 0 31.9 0a16.0 31.9 0 1 0 -31.9 0ZM1025.1 392h3.5V347.9h-3.5ZM1035.8 392L1058.2 322.2L1080.5 392ZM1080.4 392L1102.8 261.6L1125.3 392ZM1118.6 392L1138.1 284.6L1157.6 392ZM1158.6 392L1176.9 289.2L1195.3 392ZM1198.1 392L1216.7 297.6L1235.4 392ZL1200 392L1200 400Z'/></svg>") bottom center / cover no-repeat;
}

/* Everything real sits above the contour wash */
.complete-screen > * {
  position: relative;
  z-index: 1;
}

/* Complete screen heading */
.complete-screen h1 {
  color: var(--on-dark);
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(255,209,102,.22);
}

/* Complete screen subtitle */
.complete-subtitle {
  color: var(--action);
  font-size: 22px;
  margin-bottom: 40px;
}

/* Register prompt screen */
.register-prompt-text {
  color: var(--on-dark);
  font-size: 16px;
  margin-bottom: 12px;
}

.register-prompt-login {
  color: var(--on-dark);
  font-size: 14px;
  margin-top: 14px;
}

.register-prompt-login a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
}

.register-skip-link {
  color: var(--on-dark-mute);
  font-size: 14px;
  display: block;
  margin-top: 10px;
  text-decoration: underline;
}

/* Final points box — the single loudest object in the app. Glowing gold
   against the dusk, with a shine that sweeps across once on arrival. */
.final-points {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #FFDF7E 0%, var(--gold) 55%, #E5A81F 100%);
  color: #4A3505;
  padding: 36px 56px;
  border-radius: 28px;
  margin-bottom: 40px;
  box-shadow:
    0 10px 40px rgba(255,201,60,.30),
    0 0 0 1px rgba(255,255,255,.35) inset;
}

.final-points p {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .5px;
  opacity: .78;
}

.final-points h2 {
  font-size: 88px;
  font-weight: 900;
  line-height: 1;
  margin: 6px 0 0;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.final-points::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(100deg,
      transparent 0%, rgba(255,255,255,.75) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: shine-sweep 1.5s var(--ease) .45s 1 both;
}

@keyframes shine-sweep {
  from { left: -60%; }
  to   { left: 130%; }
}

/* Camera button on task card */
.camera-btn {
  margin-left: auto;
  font-size: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Photo thumbnail after upload */
.task-thumbnail {
  width: 100%;
  border-radius: 12px;
  margin-top: 12px;
  object-fit: cover;
  max-height: 200px;
}

.finish-btn {
  margin-top: 20px;
  background-color: var(--night);
  color: var(--on-dark);
  border: none;
  padding: 14px 40px;
  font-size: 18px;
  font-family: 'Chill Sans', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  margin-bottom: 40px;
  transition: background-color 0.2s ease;
}

.finish-btn:hover {
  background-color: var(--action-deep);
}

/* Reserve tasks held back until the user asks for "Weitere Aufgabe" */
.task-card--hidden {
  display: none;
}

/* Secondary action: pull one more task. Green reads as "more/go" against the
   dark "Abenteuer beenden" button. */
.more-task-btn {
  margin-top: 20px;
  align-items: center;
  gap: 8px;
  background-color: var(--grow);
  color: var(--on-dark);
  border: none;
  padding: 14px 40px;
  font-size: 18px;
  font-family: 'Chill Sans', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.more-task-btn:hover {
  background-color: var(--grow-deep);
}


/* ===================================================================== */
/* SEQUENTIAL PLAY — single-card player                                   */
/* ===================================================================== */
.play-progress {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

/* The active task card behaves like a normal card but isn't click-to-toggle */
.task-card.play-card {
  cursor: default;
  align-items: flex-start;
}

.play-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 600px;
  margin-top: 16px;
}

.play-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  padding: 14px 8px;
  font-size: 17px;
  font-family: 'Chill Sans', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.play-action-btn:disabled { opacity: 0.4; cursor: default; }

.play-action-btn--later {
  background-color: var(--surface);
  color: var(--ink);
  border: 2px solid var(--ink);
}
.play-action-btn--photo {
  background-color: var(--action);
  color: var(--on-dark);
}
.play-action-btn--done {
  background-color: var(--grow);
  color: var(--on-dark);
}

.play-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
}
.play-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.play-nav-label {
  font-size: 15px;
  color: var(--ink-soft);
  min-width: 110px;
  text-align: center;
}

.play-alldone {
  font-size: 22px;
  font-weight: 700;
  color: var(--grow);
  text-align: center;
  padding: 40px 20px;
}

/* "Aufgabe hinzufügen" — reveal another task from the reserve */
.play-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  background-color: var(--surface);
  color: var(--grow);
  border: 2px solid var(--grow);
  padding: 12px 28px;
  font-size: 16px;
  font-family: 'Chill Sans', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.play-add-btn:hover {
  background-color: var(--grow);
  color: var(--on-dark);
}
.play-add-btn--big {
  font-size: 18px;
  padding: 16px 36px;
}

/* "All current tasks done — add more?" reserve state */
.play-reserve {
  text-align: center;
  padding: 36px 20px 8px;
}
.play-reserve-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--grow);
  margin-bottom: 8px;
}
.play-reserve-sub {
  font-size: 16px;
  color: var(--ink-soft);
}


/* ===== FR-07: STORYBOOK BUTTON ===== */
.storybook-btn {
  background-color: var(--action);
  color: var(--on-dark);
  border: none;
  padding: 16px 40px;
  font-size: 20px;
  font-family: 'Chill Sans', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 1px;
  margin-bottom: 16px;
  transition: background-color 0.2s ease;
}

.storybook-btn:hover {
  background-color: var(--action-deep);
}

/* ===== FR-07: STORYBOOK SCREEN ===== */
.storybook-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  background: transparent;
  min-height: 100vh;
}

.storybook-cover {
  text-align: center;
  margin-bottom: 32px;
}

.storybook-cover .pokito-logo {
  width: 200px;
  margin-bottom: 16px;
}

.storybook-title {
  font-size: 36px;
  color: var(--brand);
  margin-bottom: 8px;
}

.storybook-hero {
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 8px;
}

.storybook-intro {
  background-color: var(--brand);
  color: var(--on-dark);
  padding: 24px;
  border-radius: 20px;
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
  width: 100%;
  margin-bottom: 32px;
  text-align: center;
}

.storybook-chapters {
  width: 100%;
  max-width: 600px;
}

.storybook-footer {
  text-align: center;
  margin-top: 16px;
  margin-bottom: 32px;
}

.storybook-footer p {
  font-size: 18px;
  color: var(--action);
}

.storybook-footer h2 {
  font-size: 60px;
  line-height: 1;
  margin: 8px 0;
  color: var(--gold-deep);
}

/* ===== FR-07: STORYBOOK CHAPTERS ===== */
.storybook-chapter {
  background-color: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
}

.chapter-number {
  font-size: 14px;
  color: var(--action);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.chapter-text {
  font-size: 18px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 12px;
}

.chapter-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  margin-bottom: 16px;
}

.chapter-badge.completed {
  background-color: var(--grow);
  color: var(--on-dark);
}

.chapter-badge.skipped {
  background-color: var(--hairline);
  color: var(--ink-mute);
}

.chapter-photo {
  width: 100%;
  border-radius: 12px;
  margin-top: 8px;
  max-height: 300px;
  object-fit: cover;
}

/* --- PROFILE PICTURE --- */
.profile-pic-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  background: var(--hairline);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.profile-pic-placeholder {
  font-size: 48px;
}

.profile-pic-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-pic-edit {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 16px;
  background: var(--night);
  color: white;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- PROFILE SCREEN STYLING --- */
.profile-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
  padding: 28px 20px 40px;
  font-family: 'Chill Sans', sans-serif;
  min-height: 100vh;
}

#profile-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-screen h2 {
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 0;
  margin-bottom: 15px;
}

.profile-input {
  width: 90%;
  max-width: 380px;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  font-family: 'Chill Sans', sans-serif;
  font-size: 16px;
}


.checkbox-group label {
  display: block; /* Forces checkboxes to their own lines */
  margin-bottom: 8px;
  font-size: 18px;
  cursor: pointer;
}

/* style.css - New rules for choice menus */

/* THE MENU CONTAINER: Align everything right in the chat stream */
.pokito-choice-container {
    display: flex;
    flex-direction: column;
    gap: 8px; /* space between choice buttons */
    margin: 15px 0;
    max-width: 90%; /* don't hit the left edge */
    
    /* THE MAGIC: Move the entire container to the right */
    align-self: flex-end; 
}

/* THE CHOICE BUTTONS (age, tools, etc) */
.choice-item-btn {
    background-color: var(--surface); /* transparent/white default */
    border: 2px solid var(--hairline); /* light outline */
    color: var(--ink); /* dark text */

    /* Sizing and Shape - matching parent bubbles */
    padding: 12px 20px;
    border-radius: 24px;

    font-family: 'Chill Sans', sans-serif;
    font-size: 18px;
    cursor: pointer;
    text-align: left;
    width: fit-content; /* Only as wide as the text! */
    align-self: flex-end; /* right align individual buttons inside container */
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* THE HIGHLIGHT: What happens when selected */
.choice-item-btn.selected {
    /* Fill with Brand Red/Orange */
    background-color: var(--action); /* Brand Orange */
    border-color: var(--action);
    color: white; /* White text looks sharp against color */
}

/* THE CONFIRMATION BUTTON (Weiter) */
.confirm-btn {
    background-color: var(--night);
    color: var(--on-dark);
    border: none;

    padding: 14px 28px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 10px; /* space from choice buttons */
    align-self: flex-end;
    transition: background-color 0.2s ease;
}

/* style.css Refinements for total consistency */

/* --- A. UNIVERSAL PARENT TEXT BUBBLES ---
   Used when the parent types text (like the name) */
.parent-message {
    align-self: flex-end; /* right-aligned */
    
    /* Let's make this match the 'Selected' choice button look */
    background-color: var(--action); /* Brand Orange */
    color: white; /* White text looks best on orange */
    
    padding: 12px 18px;
    border-radius: 20px 20px 0px 20px; /* bubble tail on right bottom */
    
    font-family: 'Chill Sans', sans-serif;
    font-size: 18px;
    max-width: 80%;
}

/* --- B. UNIVERSAL CHOICE CONTAINERS ---
   Used for Interest Buttons (Step 1) AND Path Buttons (Step 2) */
.pokito-choice-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
    max-width: 95%;
    
    /* ALWAYS align choices right */
    align-self: flex-end; 
}

/* --- C. UNIVERSAL CHOICE BUTTONS (age / tools / locations) ---
   We use this class name in JS for Interests AND Paths */
.choice-item-btn {
    background-color: var(--surface); /* unselected */
    border: 2px solid var(--hairline);
    color: var(--ink);

    padding: 12px 20px;
    border-radius: 24px;

    font-family: 'Chill Sans', sans-serif;
    font-size: 18px;
    cursor: pointer;
    text-align: left;
    width: fit-content;

    /* individual buttons stack to the right inside container */
    align-self: flex-end;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* --- D. UNIVERSAL SELECTION HIGHLIGHT --- */
.choice-item-btn.selected {
    background-color: var(--action); /* Brand Orange */
    border-color: var(--action);
    color: white;
}

.choice-item-btn:active {
    transform: scale(0.98);
    filter: brightness(0.9);
}

/* --- DASHBOARD STYLES --- */

.dashboard-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px 40px;
    min-height: 100vh;
}

/* Dashboard header: logo left */
.dashboard-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 380px;
    margin-bottom: 10px;
}

.dashboard-logo {
    width: 82%;
    margin-bottom: 12px;
}

.dashboard-slogan {
    font-family: 'Chill Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;   /* bold keeps brand red ≥3:1 (large text) on the sky */
    color: var(--brand);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.onboarding-tagline {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0 auto 12px auto;
    max-width: 300px;
    text-align: center;
    white-space: pre-line;
}

/* Points card */
/* HERO TIER — the one card on the dashboard that outranks everything else.
   Deepest shadow, largest radius, warm tint. */
.points-card {
    background: linear-gradient(160deg, var(--surface) 0%, #FBFDFF 100%);
    border-radius: 22px;
    padding: 18px 20px;
    width: 90%;
    max-width: 380px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: var(--shadow-2);
    margin-bottom: 20px;
    box-sizing: border-box;
}

.points-card-left {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
    flex: 1;
}

.points-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.points-card-value {
    font-size: 2.6rem;
    font-weight: 900;          /* Chill Sans Ultra — the number is the point */
    color: var(--ink);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

/* The level emoji was a bare glyph floating in the card. As a medallion with
   a gold ring it reads as something you EARNED. */
.points-card-badge {
    flex-shrink: 0;
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    line-height: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 34%, #FFF6E0 0%, #F7E3B8 100%);
    box-shadow:
      0 0 0 3px var(--gold),
      0 0 0 5px rgba(255,201,60,.28),
      inset 0 2px 5px rgba(120,85,10,.18);
}

/* Level display inside points card */
.level-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--grow-deep);
    margin-top: 10px;
}

.level-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(61,163,93,.14);
    border-radius: var(--radius-pill);
    margin-top: 6px;
    overflow: hidden;
}

.level-bar-fill {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, var(--grow-deep) 0%, var(--grow) 55%, var(--mist) 100%);
    border-radius: var(--radius-pill);
    transition: width 0.9s var(--ease);
    overflow: hidden;
}

/* A slow light sweep so progress reads as alive rather than as a static bar. */
.level-bar-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
        transparent 30%, rgba(255,255,255,.38) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: level-shimmer 5s var(--ease) 1.4s infinite;
}

@keyframes level-shimmer {
    0%   { transform: translateX(-100%); }
    55%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.level-label {
    font-size: 0.7rem;
    color: var(--ink-mute);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

/* KPI stats row */
.stats-row {
    display: flex;
    gap: 10px;
    width: 90%;
    max-width: 380px;
    margin-bottom: 20px;
}

/* QUIET TIER — supporting numbers. Hairline instead of a shadow, so they
   sit behind the hero card in the visual stack instead of competing. */
.stat-card {
    flex: 1;
    background: rgba(255,255,255,.66);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink-mute);
    margin-top: 2px;
}

/* With the nav bar gone, the stat tiles ARE the way into the history
   screen — give them (and the points card → profile) press feedback. */
.points-card,
.stat-card-link {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.points-card:active,
.stat-card-link:active {
    transform: scale(.97);
}

/* Start button on dashboard */
.dashboard-start-btn {
    width: 90%;
    max-width: 380px;
    margin-bottom: 8px;
}


/* --- Dashboard History Section --- */
.dashboard-history {
    width: 90%;
    max-width: 380px;
    margin-top: 8px;
    margin-bottom: 10px;
    text-align: left;
}

.dashboard-history h3 {
    font-family: 'Chill Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--ink-soft);
    margin-bottom: 12px;
    text-align: center;
}

/* Adventure history cards */
.adventure-card {
    background: var(--surface);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-card);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition: transform 0.1s;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 12px;
}

.adventure-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-2);
}

.adventure-card-thumb {
    grid-row: 1 / 2;
    grid-column: 1;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--surface-sunk);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.adventure-card-thumb img {
    width: 40px;
    height: auto;
}

.adventure-card-info {
    grid-row: 1 / 2;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.adventure-card-path {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adventure-card-date {
    font-size: 0.8rem;
    color: var(--ink-mute);
    margin-top: 2px;
}

.adventure-card-meta {
    grid-row: 1 / 2;
    grid-column: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
}

.adventure-card-points {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--action-deep);
}

/* Empty state */
.adventure-card-empty {
    text-align: center;
    color: var(--ink-mute);
    font-style: italic;
    padding: 20px;
}

/* --- HISTORY SCREEN --- */
.history-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding: 28px 20px 40px;
    background: transparent;
    overflow-y: auto;
}

/* ============================================
   OP ECONOMY — ADVENTURE TIMER
   ============================================ */

/* Header row of the adventure screen: overflow menu (⋯) + elapsed time.
   Secondary actions like printing live behind the ⋯ so the play card keeps
   only the actions that belong to the current moment. */
.adventure-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}

.adventure-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;              /* comfortable outdoor / gloved tap target */
  padding: 0;
  border: none;
  border-radius: 50%;
  /* Dark ink on the light adventure screen: a ⋯ nobody sees means printing
     effectively disappears. */
  background: rgba(0,0,0,0.08);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.adventure-menu-btn:hover,
.adventure-menu-btn:focus-visible {
  background: rgba(0,0,0,0.18);
}

/* Same problem the ⋯ button already had: this sits on the LIGHT adventure
   screen, so near-white text on a translucent-black chip was unreadable.
   Dark ink on a pale chip instead. */
.adventure-timer-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px var(--hairline);
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font-family: 'Chill Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.adventure-timer-label {
  color: var(--ink-soft);
  font-weight: 400;
}

/* ============================================
   OP ECONOMY — PARENT VERIFICATION SCREEN
   ============================================ */
.verify-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px 24px;
  background: transparent;
  gap: 16px;
  text-align: center;
}

.verify-title {
  font-family: 'Chill Sans', sans-serif;
  font-size: 28px;
  color: var(--ink);
  margin: 0;
}

.verify-subtitle {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 340px;
  margin: 0;
  line-height: 1.5;
}

.verify-time-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.verify-time-input {
  width: 90px;
  font-size: 36px;
  font-family: 'Chill Sans', sans-serif;
  text-align: center;
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface);
  color: var(--ink);
}

.verify-time-unit {
  font-family: 'Chill Sans', sans-serif;
  font-size: 22px;
  color: var(--ink);
}

.verify-task-count {
  font-size: 16px;
  color: var(--grow);
  font-weight: bold;
  margin: 0;
}

.op-earn-btn {
  background-color: var(--grow);
  color: var(--on-dark);
  font-family: 'Chill Sans', sans-serif;
  font-size: 22px;
  padding: 16px 48px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 8px;
  width: 100%;
  max-width: 420px;
  transition: background-color 0.2s ease;
}

.op-earn-btn:hover {
  background-color: var(--grow-deep);
}

/* ============================================
   PRINT LAYOUT (@media print)
   The #print-area div is hidden on screen and
   only shows up when the user prints.
   ============================================ */

/* Hide the print area on screen */
#print-area {
  display: none;
}

@media print {

  /* Step 1: Hide everything on the page */
  body * {
    display: none !important;
    visibility: hidden !important;
  }

  /* Step 1b: `body *` does NOT match pseudo-elements, so the fixed sky and
     horizon layers would otherwise print on every adventure sheet. Kill them
     explicitly and force a plain white page. */
  body::before,
  body::after,
  .complete-screen::before {
    display: none !important;
    content: none !important;
    background: none !important;
  }

  /* The living scenery is a real DOM child, so `body *` already hides it —
     kept explicit so nobody has to re-derive that when editing this list. */
  #scenery {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  /* Step 2: Show only the print area */
  #print-area {
    display: block !important;
    visibility: visible !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-family: Georgia, serif;
    color: var(--ink);
    background: var(--surface);
    padding: 32px 40px;
    box-sizing: border-box;
  }

  #print-area * {
    display: block !important;
    visibility: visible !important;
  }

  /* Header */
  .print-header {
    text-align: center;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 16px;
    margin-bottom: 24px;
  }

  .print-logo {
    display: inline-block !important;
    width: 180px;
    margin: 0 auto 8px auto;
  }

  .print-slogan {
    font-family: 'Chill Sans', sans-serif;
    font-size: 10pt;
    color: var(--brand);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 10px 0;
  }

  .print-header p {
    font-size: 11pt;
    color: var(--ink-soft);
    margin: 0;
  }

  /* Story box */
  .print-story {
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 24px;
    font-size: 11.5pt;
    line-height: 1.7;
    background: var(--surface-sunk);
  }

  /* Treasure map */
  .print-map {
    display: block !important;
    margin: 0 auto 28px auto;
    width: 320px;
    height: 230px;
  }

  /* Tasks section */
  .print-tasks h2 {
    font-family: 'Chill Sans', sans-serif;
    font-size: 14pt;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 8px;
    color: var(--ink);
  }

  .print-task {
    display: flex !important;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
    page-break-inside: avoid;
  }

  /* The empty tickbox for pen-and-paper use */
  .print-checkbox {
    display: inline-block !important;
    width: 20px;
    min-width: 20px;
    height: 20px;
    border: 1.5px solid var(--ink-mute);
    border-radius: 4px;
    margin-top: 2px;
    flex-shrink: 0;
  }

  .print-task p {
    font-size: 11.5pt;
    line-height: 1.5;
    margin: 0;
  }

  /* Footer */
  .print-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 12px;
    border-top: 1px solid var(--hairline);
    font-size: 9pt;
    color: var(--ink-mute);
    letter-spacing: 0.5px;
  }

} /* end @media print */

/* ============================================
   EXPLORE SCREEN
   ============================================ */

/* ── Outer container ── */
.explore-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  padding: 28px 20px 40px;
  background: transparent;
  overflow: hidden;
}

/* ── VIEW 1: Browse list ── */
.explore-browse-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 380px;
  overflow-y: auto;
  padding-bottom: 24px;
}

.explore-header {
  width: 100%;
  z-index: 10;
  background: rgba(234,246,252,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0 0 12px;
}

.explore-header h2 {
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.explore-sort-toggle {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.explore-sort-btn {
  flex: 1;
  padding: 7px 14px;
  border: 1.5px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.explore-sort-btn.active {
  background: rgba(255,138,61,.10);
  border-color: var(--action);
  color: var(--action);
}

.explore-sort-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.explore-filter {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  border: 2px solid var(--hairline);
  border-radius: 50px;
  font-family: 'Chill Sans', sans-serif;
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.explore-filter:focus {
  border-color: var(--action);
}

.explore-list {
  width: 100%;
  padding: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Browse location cards */
.explore-location-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.15s;
}

.explore-location-card:active {
  box-shadow: var(--shadow-1);
  opacity: 0.95;
}

.explore-card-main {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
}

.explore-card-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.explore-location-name {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 2px;
}

.explore-location-region {
  font-size: 0.78rem;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explore-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.explore-path-badge {
  background: var(--surface-sunk);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-family: 'Chill Sans', sans-serif;
  padding: 3px 8px;
  border-radius: 50px;
  white-space: nowrap;
}

.explore-type-badge {
  font-size: 0.65rem;
  font-family: 'Chill Sans', sans-serif;
  padding: 2px 7px;
  border-radius: 50px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.explore-type-hike {
  background: rgba(61,163,93,.14);
  color: var(--grow-deep);
}
.explore-type-park {
  background: rgba(134,201,181,.25);
  color: #3F6070;
}

.explore-dist-text {
  font-size: 0.72rem;
  color: var(--ink-mute);
}

.explore-browse-chevron {
  font-size: 1.2rem;
  color: var(--hairline);
  line-height: 1;
}

.explore-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-mute);
  font-size: 1rem;
}

/* ── VIEWS 2 & 3: Detail views (shared) ── */
.explore-detail-view {
  min-height: 100vh;
  overflow-y: auto;
  padding-bottom: 24px;
  background: transparent;
}

.explore-detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(234,246,252,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--hairline);
}

.explore-back-btn {
  background: none;
  border: none;
  font-family: 'Chill Sans', sans-serif;
  font-size: 1rem;
  color: var(--action-deep);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.explore-detail-title {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1.1rem;
  color: var(--ink);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── VIEW 2: Location detail ── */
.explore-location-info-block {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px 8px;
}

.explore-info-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--surface);
  border-radius: 50px;
  padding: 6px 12px;
  box-shadow: var(--shadow-1);
  font-family: 'Chill Sans', sans-serif;
}

.explore-info-icon {
  font-size: 0.95rem;
}

.explore-location-description {
  padding: 8px 16px 16px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

.explore-section-label {
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 8px 16px 6px;
}

/* Path cards inside location detail */
.explore-path-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  margin: 0 12px 14px;
  padding: 16px;
  box-shadow: var(--shadow-1);
}

.explore-path-card-name {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.3;
}

.explore-path-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

.explore-diff-badge {
  font-size: 0.72rem;
  font-family: 'Chill Sans', sans-serif;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: capitalize;
  color: white;
  font-weight: 700;
}

.explore-diff-leicht { background: var(--grow); }
.explore-diff-mittel { background: var(--action); }
.explore-diff-schwer { background: var(--brand); }

.explore-stat-chip {
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--surface-sunk);
  padding: 4px 10px;
  border-radius: 50px;
  font-family: 'Chill Sans', sans-serif;
}

.explore-path-card-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 14px;
}

.explore-path-card-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.explore-btn-secondary {
  background: var(--surface);
  border: 2px solid var(--hairline);
  color: var(--ink-soft);
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.explore-btn-secondary:active {
  background: var(--surface-sunk);
}

.explore-btn-primary {
  background: var(--action);
  border: none;
  color: white;
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 50px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.explore-btn-primary:active {
  filter: brightness(0.9);
}

/* ── Mode selection cards ── */
.mode-selection-label {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.mode-cards-row {
  display: flex;
  gap: 10px;
}

.mode-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px 14px;
  background: var(--surface);
  border: 2px solid var(--hairline);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.mode-card:active {
  background: var(--surface-sunk);
}

.mode-card.selected {
  border-color: var(--action);
  background: rgba(255,138,61,.10);
  box-shadow: 0 0 0 1px var(--action);
}

.mode-card-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.mode-card-title {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.mode-card-desc {
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-mute);
  line-height: 1.3;
}

/* ── VIEW 3: Path detail / timeline ── */
.explore-path-stats-top {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0;
}

.explore-timeline {
  padding: 20px 16px 0;
}

.explore-timeline-entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.explore-timeline-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
}

.explore-timeline-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.explore-timeline-line {
  width: 2px;
  flex: 1;
  min-height: 32px;
  background: var(--hairline);
  margin-top: 4px;
}

.explore-timeline-content {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 24px;
  flex: 1;
}

.explore-timeline-last .explore-timeline-content {
  padding-bottom: 4px;
}

.explore-timeline-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 4px;
  flex-shrink: 0;
}

.explore-timeline-text {
  flex: 1;
  min-width: 0;
}

.explore-timeline-name {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.explore-timeline-desc {
  font-size: 0.83rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.explore-starten-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 20px 16px 0;
  padding: 14px;
  background: var(--action);
  border: none;
  border-radius: 50px;
  color: white;
  font-family: 'Chill Sans', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.explore-starten-btn:active {
  filter: brightness(0.9);
}

/* ============================================================
   PROFILE MANAGEMENT SCREEN
   ============================================================ */

.profile-manage-wrapper {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Account Overview Card */
.profile-account-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
}

.profile-avatar-circle {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  background: var(--action);
  color: var(--on-dark);
  font-family: 'Chill Sans', sans-serif;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.profile-overview-info {
  flex: 1;
  min-width: 0;
}

.profile-account-name {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1.25rem;
  color: var(--night-2);
  margin: 0 0 2px;
}

.profile-account-email {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 2px;
  word-break: break-all;
}

.profile-member-since {
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin: 0;
}

/* Section Card */
.profile-section-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-1);
}

.profile-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Chill Sans', sans-serif;
  font-size: 1rem;
  color: var(--night-2);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}

.profile-section-icon {
  display: flex;
  align-items: center;
  color: var(--action);
}

.profile-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Field Display */
.profile-field-group {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}

.profile-field-label {
  font-size: 0.72rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.profile-field-value {
  font-size: 0.95rem;
  color: var(--night-2);
}

.profile-field-readonly {
  color: var(--ink-mute);
  font-style: italic;
}

/* Edit Button */
.profile-edit-btn {
  background: none;
  border: 1px solid var(--action);
  color: var(--action);
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
}

.profile-edit-btn:active {
  background: var(--action);
  color: var(--on-dark);
}

/* Edit Mode */
.profile-edit-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.profile-inline-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface-sunk);
  box-sizing: border-box;
}

.profile-inline-input:focus {
  outline: none;
  border-color: var(--action);
  background: var(--surface);
}

.profile-edit-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.profile-save-btn {
  flex: 1;
  padding: 10px;
  background: var(--action);
  color: var(--on-dark);
  border: none;
  border-radius: 8px;
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.profile-save-btn:disabled {
  opacity: 0.6;
}

.profile-cancel-btn {
  flex: 1;
  padding: 10px;
  background: var(--surface-sunk);
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Children Cards */
.profile-child-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1.5px solid var(--hairline);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s;
}

.profile-child-card.active {
  border-color: var(--action);
  background: rgba(255,138,61,.08);
}

.profile-child-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.profile-child-name {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1rem;
  color: var(--night-2);
}

.profile-child-age {
  font-size: 0.8rem;
  color: var(--ink-mute);
}

.profile-child-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.profile-child-action-btn {
  background: none;
  border: 1px solid var(--hairline);
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}

.profile-child-edit-btn {
  border-color: var(--action);
  color: var(--action);
}

.profile-child-edit-btn:active {
  background: var(--action);
  color: var(--on-dark);
}

.profile-child-delete-btn {
  border-color: var(--danger);
  color: var(--danger);
}

.profile-child-delete-btn:active {
  background: var(--danger);
  color: var(--on-dark);
}

.profile-active-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.7rem;
  background: var(--action);
  color: var(--on-dark);
  padding: 2px 8px;
  border-radius: 8px;
  font-family: 'Chill Sans', sans-serif;
}

/* Newsletter Toggle */
.profile-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.profile-toggle-label {
  font-size: 0.95rem;
  color: var(--night-2);
}

.profile-toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.profile-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--hairline);
  border-radius: 26px;
  transition: 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--surface);
  border-radius: 50%;
  transition: 0.2s;
}

.profile-toggle-switch input:checked + .toggle-slider {
  background: var(--action);
}

.profile-toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Action Buttons */
.profile-actions-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.profile-action-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: none;
}

.profile-logout-btn {
  background: var(--night-2);
  color: var(--on-dark);
}

.profile-reset-btn {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger) !important;
}

/* Anonymous profile cards */
.profile-card-body .profile-input {
  width: 100%;
  max-width: none;
}

.profile-card-cta {
  margin-top: 8px;
}

.profile-card-hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.profile-login-row {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

.profile-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--action);
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Inline Messages */
.profile-inline-msg {
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 8px;
  text-align: center;
}

.profile-success-msg {
  background: rgba(61,163,93,.12);
  color: var(--grow-deep);
}

.profile-error-msg {
  background: rgba(179,38,30,.10);
  color: var(--danger);
}

/* Password Form */
.profile-password-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ============================================================
   PARENT REGISTRATION & AUTH COMPONENTS
   ============================================================ */

.parent-reg-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  border-radius: 16px;
  margin: 8px 0;
  width: 100%;
  box-sizing: border-box;
}

.parent-reg-container h3 {
  font-family: 'Chill Sans', sans-serif;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0;
}

.reg-label {
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 4px 0 2px;
}

.reg-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.95rem;
  background: var(--surface);
  transition: border-color 0.2s;
}

.reg-input:focus {
  outline: none;
  border-color: var(--action);
}

.reg-error {
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--danger);
  min-height: 16px;
  display: block;
}

.reg-checkbox-label {
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  cursor: pointer;
}

.reg-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--action);
}

/* Step indicator dots */
.reg-step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.reg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hairline);
  transition: background 0.2s;
}

.reg-dot.active {
  background: var(--action);
  transform: scale(1.2);
}

.reg-dot.done {
  background: var(--grow-deep);
}

/* Password field */
.reg-password-wrap {
  position: relative;
  width: 100%;
}

.reg-password-wrap .reg-input {
  padding-right: 70px;
}

.reg-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--action);
  cursor: pointer;
  padding: 4px 8px;
}

.reg-strength-text {
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.78rem;
  min-height: 16px;
  display: block;
}

/* Button row (back + next) */
.reg-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.reg-btn-row .confirm-btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.95rem;
}

/* Skip / back link */
.reg-skip-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-family: 'Chill Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-mute);
  text-decoration: underline;
  cursor: pointer;
}

.reg-skip-link:hover {
  color: var(--ink-soft);
}

/* OTP digit inputs */
.otp-input-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}

.otp-digit {
  width: 52px;
  height: 60px;
  text-align: center;
  font-family: 'Chill Sans', sans-serif;
  font-size: 1.8rem;
  border: 2px solid var(--hairline);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--action);
}

.verification-badge {
  display: inline-block;
  background: var(--grow-deep);
  color: var(--on-dark);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---- UGC Landmark Submission Overlay ---- */

.ugc-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.ugc-modal {
  background: var(--night);
  border-radius: 16px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.ugc-modal h3 {
  color: var(--on-dark);
  font-family: 'Chill Sans', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.ugc-modal p {
  color: var(--on-dark);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.ugc-modal input,
.ugc-modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: var(--night-2);
  color: var(--on-dark);
  font-size: 0.95rem;
  margin-bottom: 12px;
  outline: none;
}

.ugc-modal input:focus,
.ugc-modal textarea:focus {
  border-color: var(--action);
}

.ugc-modal .primary-btn {
  width: 100%;
  padding: 12px;
  background: var(--action);
  color: var(--on-dark);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
}

.ugc-modal .secondary-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--on-dark-mute);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Star rating */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.star-rating .star {
  font-size: 2rem;
  color: rgba(247,251,255,.28);
  cursor: pointer;
  transition: color 0.15s;
}

.star-rating .star.active {
  color: var(--action);
}

.star-rating .star:hover {
  color: var(--action);
}

/* ============================================================
   MOTION
   Two layers: micro-feedback everywhere, and real moments at the
   three peaks (task done / level-up / final score). Everything
   here is guarded by prefers-reduced-motion at the bottom.
   ============================================================ */

/* ---- Layer 1: micro ---------------------------------------- */

/* Every tappable thing gets the same press response. Previously only
   .choice-item-btn had any, so most of the app felt dead under the thumb. */
button:active,
.play-action-btn:active,
.mode-card:active,
.explore-location-card:active,
.adventure-card:active {
  transform: scale(.97);
}

button,
.play-action-btn,
.mode-card {
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease),
              filter var(--dur-fast) var(--ease);
}

/* Screen / list entry */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.dashboard-screen .points-card,
.dashboard-screen .stats-row,
.dashboard-screen .dashboard-start-btn,
.explore-list > *,
.dashboard-history .adventure-card,
.tasks-container > * {
  /* backwards, not both: rise-in ends at the natural style anyway, and a
     lingering forwards fill would pin transform:none — swallowing the
     :active press feedback on the now-tappable points card. */
  animation: rise-in var(--dur) var(--ease) backwards;
}

/* Small stagger so rows arrive as a sequence, not a block */
.dashboard-screen .points-card       { animation-delay: 40ms; }
.dashboard-screen .stats-row         { animation-delay: 90ms; }
.dashboard-screen .dashboard-start-btn { animation-delay: 140ms; }
.explore-list > *:nth-child(1)  { animation-delay: 30ms; }
.explore-list > *:nth-child(2)  { animation-delay: 60ms; }
.explore-list > *:nth-child(3)  { animation-delay: 90ms; }
.explore-list > *:nth-child(4)  { animation-delay: 120ms; }
.explore-list > *:nth-child(n+5){ animation-delay: 150ms; }
.dashboard-history .adventure-card:nth-child(1) { animation-delay: 30ms; }
.dashboard-history .adventure-card:nth-child(2) { animation-delay: 60ms; }
.dashboard-history .adventure-card:nth-child(3) { animation-delay: 90ms; }
.dashboard-history .adventure-card:nth-child(n+4) { animation-delay: 120ms; }

/* ---- Layer 2, peak 1: task done ---------------------------- */

.task-card {
  position: relative;
  transition: box-shadow var(--dur) var(--ease);
}

/* The stamp lands first, then the card departs — hence the delay on
   card-depart. JS waits for this to finish before re-rendering. */
.task-card--stamped {
  animation: card-depart 420ms var(--ease) 200ms both;
  pointer-events: none;
}

.task-card--stamped::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 900;
  color: var(--grow);
  background: rgba(255,255,255,.92);
  border: 5px solid var(--grow);
  border-radius: 50%;
  animation: stamp-land 300ms cubic-bezier(.2,1.6,.4,1) both;
}

@keyframes stamp-land {
  from { opacity: 0; transform: scale(2.1) rotate(-16deg); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: scale(1) rotate(-8deg); }
}

@keyframes card-depart {
  from { opacity: 1; transform: none; }
  25%  { transform: translateY(-10px) scale(1.02); }
  to   { opacity: 0; transform: translateY(-90px) scale(.94); }
}

/* The "+10 OP" chip that arcs away toward the balance */
.op-chip {
  position: fixed;
  z-index: 900;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: #4A3505;
  font-family: 'Chill Sans', sans-serif;
  font-size: 20px;
  font-weight: 900;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(255,201,60,.45);
  animation: op-fly 900ms var(--ease) both;
}

@keyframes op-fly {
  from { opacity: 0; transform: translate(-50%, 0) scale(.7); }
  18%  { opacity: 1; transform: translate(-50%, -14px) scale(1.12); }
  38%  { transform: translate(-50%, -26px) scale(1); }
  to   { opacity: 0; transform: translate(-50%, -132px) scale(.82); }
}

/* ---- Layer 2, peak 2: level-up ----------------------------- */

/* Shares the complete screen's skyline — same place, same moment. */
.levelup-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px;
  text-align: center;
  background: radial-gradient(ellipse 100% 70% at 50% 42%, #2B4468 0%, var(--night) 65%);
  animation: fade-in 260ms var(--ease) both;
  cursor: pointer;
}

.levelup-overlay::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(240px, 46vh, 430px);
  pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='xMidYMax slice'><path fill='%231D3050' d='M0 400L0 190L110 120L205 175L325 85L445 165L560 110L685 180L800 100L915 170L1035 115L1135 165L1200 135L1200 400Z'/><path fill='%23203756' d='M0 400L0 268C90 232 150 248 236 214C330 177 402 226 500 206C596 186 660 232 764 210C860 190 928 234 1030 212C1108 195 1156 224 1200 214L1200 400Z'/><path fill='%23172A44' d='M0 400L0 318M-35.8 269.5a15.8 35.1 0 1 0 31.7 0a15.8 35.1 0 1 0 -31.7 0ZM-21.7 318h3.5V269.5h-3.5ZM-5.2 318L14.6 261.9L34.5 318ZM25.5 318L46.0 225.1L66.5 318ZM66.1 318L80.1 225.7L94.1 318ZM80.0 318L99.9 264.9L119.8 318ZM121.1 318L133.2 254.7L145.3 318ZM148.8 318L163.5 256.2L178.1 318ZM183.1 264.0a14.2 39.1 0 1 0 28.4 0a14.2 39.1 0 1 0 -28.4 0ZM195.8 318h3.1V264.0h-3.1ZM219.9 318L232.1 258.9L244.4 318ZM242.9 318L256.6 232.9L270.3 318ZM265.0 318L284.3 231.5L303.6 318ZM298.2 318L313.1 235.3L328.0 318ZM314.9 318L334.3 233.3L353.7 318ZM364.0 318L376.4 247.9L388.8 318ZM384.8 283.5a11.4 24.9 0 1 0 22.7 0a11.4 24.9 0 1 0 -22.7 0ZM395.0 318h2.5V283.5h-2.5ZM412.9 318L426.1 223.0L439.3 318ZM439.7 318L452.6 244.2L465.5 318ZM461.8 318L474.7 248.7L487.7 318ZM483.3 318L498.1 253.2L513.0 318ZM513.5 318L526.6 222.1L539.8 318ZM536.2 318L555.2 234.0L574.2 318ZM585.1 269.8a10.2 34.9 0 1 0 20.3 0a10.2 34.9 0 1 0 -20.3 0ZM594.0 318h2.5V269.8h-2.5ZM614.5 318L629.1 263.4L643.7 318ZM637.7 318L651.8 254.1L666.0 318ZM664.2 318L677.8 223.7L691.4 318ZM697.4 318L710.4 259.1L723.5 318ZM722.4 318L738.1 222.6L753.7 318ZM748.9 318L763.4 222.0L778.0 318ZM784.2 268.6a10.2 35.8 0 1 0 20.4 0a10.2 35.8 0 1 0 -20.4 0ZM793.2 318h2.5V268.6h-2.5ZM805.6 318L824.2 257.5L842.8 318ZM837.5 318L853.0 260.6L868.6 318ZM868.8 318L884.1 264.3L899.5 318ZM898.7 318L911.5 225.7L924.4 318ZM919.9 318L934.9 232.4L949.8 318ZM949.6 318L965.1 223.5L980.6 318ZM988.1 282.7a10.9 25.6 0 1 0 21.8 0a10.9 25.6 0 1 0 -21.8 0ZM997.7 318h2.5V282.7h-2.5ZM1005.5 318L1024.6 251.2L1043.7 318ZM1047.6 318L1060.1 270.8L1072.6 318ZM1074.8 318L1090.0 249.2L1105.1 318ZM1098.1 318L1113.3 267.9L1128.5 318ZM1126.8 318L1140.8 239.3L1154.7 318ZM1158.4 318L1171.3 236.0L1184.3 318ZM1186.3 274.8a13.5 31.3 0 1 0 27.0 0a13.5 31.3 0 1 0 -27.0 0ZM1198.4 318h3.0V274.8h-3.0ZM1212.3 318L1225.8 254.5L1239.4 318ZL1200 318L1200 400Z'/><path fill='%230E1B30' d='M0 400L0 392M-41.8 345.9a21.8 33.4 0 1 0 43.6 0a21.8 33.4 0 1 0 -43.6 0ZM-22.4 392h4.8V345.9h-4.8ZM2.7 392L22.8 264.1L42.8 392ZM41.1 392L62.0 259.8L82.9 392ZM73.6 392L102.6 295.9L131.6 392ZM122.8 392L148.3 317.4L173.7 392ZM163.9 392L191.7 294.0L219.5 392ZM236.3 331.9a15.6 43.5 0 1 0 31.3 0a15.6 43.5 0 1 0 -31.3 0ZM250.2 392h3.4V331.9h-3.4ZM270.7 392L293.7 269.1L316.7 392ZM316.3 392L336.3 276.8L356.3 392ZM340.3 392L369.8 263.4L399.3 392ZM387.4 392L413.9 320.3L440.4 392ZM434.6 392L458.4 305.0L482.2 392ZM484.9 338.9a17.4 38.5 0 1 0 34.7 0a17.4 38.5 0 1 0 -34.7 0ZM500.3 392h3.8V338.9h-3.8ZM510.1 392L538.1 272.8L566.2 392ZM571.5 392L590.9 272.9L610.3 392ZM610.7 392L635.2 283.0L659.6 392ZM655.1 392L679.2 318.2L703.2 392ZM694.3 392L721.7 270.1L749.2 392ZM752.0 344.2a19.5 34.6 0 1 0 39.1 0a19.5 34.6 0 1 0 -39.1 0ZM769.4 392h4.3V344.2h-4.3ZM788.0 392L810.5 324.8L833.0 392ZM819.5 392L847.6 321.8L875.6 392ZM876.7 392L902.5 276.2L928.2 392ZM928.8 392L948.6 311.4L968.3 392ZM959.1 392L986.7 298.9L1014.4 392ZM1010.9 347.9a16.0 31.9 0 1 0 31.9 0a16.0 31.9 0 1 0 -31.9 0ZM1025.1 392h3.5V347.9h-3.5ZM1035.8 392L1058.2 322.2L1080.5 392ZM1080.4 392L1102.8 261.6L1125.3 392ZM1118.6 392L1138.1 284.6L1157.6 392ZM1158.6 392L1176.9 289.2L1195.3 392ZM1198.1 392L1216.7 297.6L1235.4 392ZL1200 392L1200 400Z'/></svg>") bottom center / cover no-repeat;
}

.levelup-overlay > * { position: relative; z-index: 1; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.levelup-kicker {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--glow);
  animation: rise-in 420ms var(--ease) 520ms both;
}

.levelup-medallion {
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 66px;
  line-height: 1;
  border-radius: 50%;
  margin-bottom: 18px;
  background: radial-gradient(circle at 50% 34%, #FFF6E0 0%, #F7E3B8 100%);
  box-shadow:
    0 0 0 5px var(--gold),
    0 0 0 12px rgba(255,201,60,.22),
    0 0 70px 12px rgba(255,209,102,.42);
  animation: medallion-pop 620ms cubic-bezier(.2,1.5,.4,1) 120ms both;
}

@keyframes medallion-pop {
  from { opacity: 0; transform: scale(.25) rotate(-24deg); }
  70%  { opacity: 1; transform: scale(1.12) rotate(4deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.levelup-title {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.05;
  color: var(--on-dark);
  animation: rise-in 460ms var(--ease) 620ms both;
}

.levelup-sub {
  font-size: .95rem;
  color: var(--on-dark-mute);
  margin-top: 10px;
  animation: rise-in 460ms var(--ease) 760ms both;
}

/* ---- Layer 2, peak 3: confetti ----------------------------- */

.confetti-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.confetti-piece {
  position: absolute;
  top: -14px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall var(--cfd, 2.6s) linear var(--cfdelay, 0s) both;
}

@keyframes confetti-fall {
  from { opacity: 1; transform: translateY(-10px) rotate(0deg); }
  to   { opacity: 0; transform: translateY(104vh) rotate(var(--cfr, 720deg)); }
}

/* ---- The brief "all done" beat before the verify screen ----- */

.play-alldone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  color: var(--on-dark);
  text-align: center;
  padding: 44px 24px;
  margin-top: 8px;
  border-radius: 24px;
  background: radial-gradient(ellipse 120% 90% at 50% 30%, #2B4468 0%, var(--night) 70%);
  box-shadow: 0 14px 40px rgba(16,27,46,.28);
  animation: rise-in 380ms var(--ease) both;
}

.play-alldone-emoji {
  font-size: 46px;
  line-height: 1;
  animation: medallion-pop 620ms cubic-bezier(.2,1.5,.4,1) 100ms both;
}

.play-alldone-sub {
  font-size: 15px;
  font-weight: 400;
  color: var(--on-dark-mute);
}

/* ---- Accessibility ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  button:active,
  .play-action-btn:active,
  .mode-card:active,
  .explore-location-card:active,
  .adventure-card:active {
    transform: none;
  }
}
