/* Colours used across the app, defined once so they're easy to change */
:root {
  --carolina: #4b9cd3;   /* Carolina blue */
  --navy: #13294b;       /* navy */
  --white: #ffffff;
  --background: #eef5fb; /* a very pale Carolina blue for the page behind the cards */
  --muted: #5a6b80;      /* softer navy-grey for small labels */
}

/* Basic page settings */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--background);
  color: var(--navy);
}

/* The bar across the top */
.top-bar {
  background: var(--navy);
  color: var(--white);
  padding: 14px 20px;
  /* In full-screen mode, leave room for the phone's clock and battery at the top */
  padding-top: calc(14px + env(safe-area-inset-top));
  position: sticky; /* stays at the top when you scroll */
  top: 0;
  display: flex;                   /* puts the name and Log out on one line... */
  justify-content: space-between;  /* ...pushed to opposite ends */
  align-items: center;
}

/* Make sure anything marked "hidden" really is hidden */
[hidden] {
  display: none !important;
}

.top-bar h1 {
  margin: 0;
  font-size: 1.4rem;
}

/* Keep content a comfortable width, even on big screens */
main {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* White boxes: the prompt box and the login box */
.prompt-card,
.card {
  background: var(--white);
  border-top: 5px solid var(--carolina);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.prompt-label {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.prompt-text {
  margin: 8px 0 20px;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Big, thumb-friendly button */
.big-button {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: var(--carolina);
  color: var(--navy); /* navy reads more clearly than white on Carolina blue */
  cursor: pointer;
}

.big-button:active {
  transform: scale(0.98);
}

/* Feed */
h2 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.empty-feed {
  color: var(--muted);
  text-align: center;
  padding: 30px 0;
}

/* ---------- Login screen ---------- */

.card {
  text-align: left;
}

.card-title {
  font-size: 1.4rem;
  margin: 0 0 4px;
}

.card-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
}

label {
  display: block;
  font-weight: 600;
  margin: 14px 0 6px;
}

input {
  width: 100%;
  padding: 14px;
  font-size: 1rem; /* 16px or more stops iPhones zooming in when you tap the box */
  border: 2px solid #c9dcec;
  border-radius: 10px;
  color: var(--navy);
}

input:focus {
  outline: none;
  border-color: var(--carolina);
}

.hint {
  margin: 6px 0 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* The second, outlined button ("Create account") */
.big-button.secondary {
  margin-top: 10px;
  background: var(--white);
  border: 2px solid var(--navy);
}

.big-button:disabled {
  opacity: 0.6;
}

/* Messages under the login form */
.message {
  margin: 16px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #e3f0fa;
}

.message.error {
  background: #fde8e8;
  color: #8a1c1c;
}

/* Small "Log out" link-style button in the top bar */
.text-button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: var(--white);
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

.welcome {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Photo preview ---------- */

.preview-image {
  display: block;
  width: 100%;
  max-height: 60vh;      /* never taller than 60% of the screen */
  object-fit: cover;     /* fill the space neatly without stretching */
  border-radius: 12px;
  margin-bottom: 12px;
}

/* ---------- Feed posts ---------- */

.post {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;            /* keeps the photo inside the rounded corners */
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.post-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;         /* every photo gets the same tidy shape */
  object-fit: cover;
  background: #dbe9f5;         /* pale blue placeholder while the photo loads */
}

.post-info {
  padding: 12px 16px 14px;
}

.post-top {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.post-time {
  font-size: 0.85rem;
  color: var(--muted);
}

.post-prompt {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--navy);
  font-weight: 600;
  padding-left: 8px;
  border-left: 3px solid var(--carolina); /* Carolina blue accent; navy text stays easy to read */
}

/* ---------- Points ---------- */

/* Puts "Logged in as…" and the points badge on one line, at opposite ends */
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.status-row .welcome {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;   /* long emails get "…" instead of squashing the badge */
  white-space: nowrap;
}

.points {
  margin: 0;
  flex-shrink: 0;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;      /* pill shape */
}

/* ---------- Reactions ---------- */

.reaction-bar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.reaction {
  flex: 1;                      /* four equal-width buttons */
  padding: 8px 0;
  font-size: 1rem;
  background: var(--background);
  color: var(--navy);
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

/* Reactions you've given: Carolina blue outline */
.reaction.mine {
  border-color: var(--carolina);
  background: #dcecf8;
  font-weight: 700;
}

/* On your own posts the buttons just show counts */
.reaction:disabled {
  cursor: default;
  opacity: 0.75;
}

/* ---------- Location switch ---------- */

.location-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.location-switch input {
  width: 22px;               /* big enough to tap easily */
  height: 22px;
  accent-color: var(--carolina);
  flex-shrink: 0;
}

.hint-inline {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Feed / Map tabs ---------- */

.tabs {
  display: flex;
  background: var(--white);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.tab {
  flex: 1;
  padding: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--navy);
  cursor: pointer;
}

.tab.active {
  background: var(--navy);
  color: var(--white);
}

/* ---------- Map ---------- */

.map {
  height: 65vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.map-popup {
  max-height: 300px;
  overflow-y: auto;
}

.map-popup-item {
  margin-bottom: 10px;
}

.map-popup-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #dbe9f5;
}

.map-popup-item p {
  margin: 4px 0 0 !important;   /* Leaflet adds big gaps around paragraphs */
  color: var(--navy);
}

.map-popup-prompt {
  font-size: 0.8rem;
  color: var(--muted) !important;
}

/* ---------- Location opt-in card (Map tab) ---------- */

.optin-card {
  background: var(--white);
  border-top: 5px solid var(--carolina);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.optin-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 1.05rem;
}

#optin-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Comments ---------- */

.comments {
  margin-top: 12px;
  border-top: 1px solid #e3edf6;
  padding-top: 10px;
}

.comment {
  margin: 0 0 6px;
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;      /* very long words wrap instead of spilling out */
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.comment-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
}

.comment-send {
  padding: 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  background: var(--carolina);
  color: var(--navy);
  cursor: pointer;
}

.comment-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.comment-note {
  margin: 4px 0 0 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

.error-text {
  color: #8a1c1c;
}

/* "Hasn't dropped yet" explanation under the prompt */
.prompt-hint {
  margin: -8px 0 4px;
  text-align: center;
}

/* ---------- Name screen ---------- */

.profile-save {
  margin-top: 20px;
}

/* Small underlined "Edit" next to your name */
.link-button {
  background: none;
  border: none;
  padding: 0 0 0 6px;
  font-size: 0.85rem;
  color: var(--navy);
  text-decoration: underline;
  cursor: pointer;
}

/* =====================================================================
   CHRISTMAS THEME (seasonal)
   Turned on by class="christmas" on <body> in index.html.
   To switch it off after the holidays, just remove that class.
   ===================================================================== */

body.christmas {
  --navy: #14532d;          /* navy becomes a deep Christmas green everywhere */
  --festive-red: #c62828;
  --background: #eef6f0;    /* a hint of green instead of blue behind the cards */
}

/* Green wallpaper with snowflakes, Santa hats and reindeer in the top bar */
body.christmas .top-bar {
  background-color: var(--navy);
  background-image: url("theme/christmas.svg");
  background-size: auto 100%;   /* the pattern fits the bar's height exactly */
  background-repeat: repeat-x;
  background-position: left bottom;
}

/* Red stripes on the white cards instead of Carolina blue */
body.christmas .prompt-card,
body.christmas .card,
body.christmas .optin-card {
  border-top-color: var(--festive-red);
}

/* Main buttons in Christmas red with white writing */
body.christmas .big-button:not(.secondary),
body.christmas .comment-send {
  background: var(--festive-red);
  color: var(--white);
}

/* Reactions you've given: red outline instead of Carolina blue */
body.christmas .reaction.mine {
  border-color: var(--festive-red);
  background: #fde8e8;
}

/* Solid green behind "Log out" so the pattern doesn't make it hard to read */
body.christmas .text-button {
  background: var(--navy);
}

/* Red stripe next to the prompt on each post */
body.christmas .post-prompt {
  border-left-color: var(--festive-red);
}

/* Feed/Map tab, points badge and text pick up the green automatically (--navy). */

/* 🔥 streak next to a name on posts */
.streak {
  margin-left: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #c2410c;            /* warm orange, dark enough to read on white */
  white-space: nowrap;
}

/* ---------- Friends ---------- */

.tab {
  padding: 10px 4px;           /* three tabs now, so a little less padding */
  font-size: 0.95rem;
}

.friend-code {
  margin: 4px 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-align: center;
}

.person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #e3edf6;
}

.person-row:first-child {
  border-top: none;
}

.person-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.person-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.small-button {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}

.small-button.primary {
  background: var(--navy);
  color: var(--white);
}

.empty-feed-button {
  margin-top: -10px;
}

/* "✅ Verified" / "Not verified" / "⏳ Checking photo…" under the prompt on posts */
.verify-badge {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.verify-badge.ok {
  color: #1b7a3d;            /* green, readable on white */
  font-weight: 700;
}

/* ---------- Who reacted (hold an emoji on your own post) ---------- */

/* Your own post's emojis: not tappable to react, but you can hold them */
.reaction.own-post {
  cursor: default;
  -webkit-touch-callout: none;   /* no iPhone pop-up menu when holding */
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* Dark see-through background behind the pop-up */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;         /* the box slides up from the bottom, like phone menus */
  justify-content: center;
  z-index: 2000;                 /* above the map */
}

.sheet {
  background: var(--white);
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
}

.sheet-row {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid #e3edf6;
  font-weight: 600;
}

.sheet .big-button {
  margin-top: 14px;
}

/* ---------- "What are points?" pop-up ---------- */

.points-wrap {
  position: relative;            /* the pop-up is placed relative to the bubble */
  flex-shrink: 0;
}

/* The points bubble is now a button: keep it looking the same */
button.points {
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.points-info {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, 90vw);
  background: var(--navy);       /* same green (or navy) as the bubble */
  color: var(--white);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  z-index: 1500;
  animation: pop-in 0.2s ease-out;
}

/* little pointer arrow up to the bubble */
.points-info::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 22px;
  border: 7px solid transparent;
  border-top: none;
  border-bottom-color: var(--navy);
}

.points-info-title {
  margin: 0;
  font-weight: 700;
}

/* The explanation starts folded away, then smoothly expands */
.points-info-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
}

.points-info.expanded .points-info-body {
  max-height: 65vh;               /* tall list: scroll inside the pop-up */
  overflow-y: auto;
  padding-right: 8px;            /* room so the scroll bar doesn't cover the numbers */
  opacity: 1;
}

.points-info-body p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Post menu (⋯): delete / report ---------- */

.post-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-more {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  padding: 2px 6px;
  color: var(--muted);
  cursor: pointer;
}

.sheet-text {
  margin: 4px 0 6px;
}

.sheet-button {
  margin-top: 10px;
}

/* Red "Delete" button (also red outside the Christmas theme) */
.big-button.danger {
  background: #c62828;
  color: var(--white);
}

/* ---------- Calendar ---------- */

.tab {
  font-size: 0.82rem;            /* four tabs now */
  padding: 10px 2px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-arrow {
  background: none;
  border: 2px solid var(--navy);
  color: var(--navy);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);  /* 7 days a week */
  gap: 4px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 4px;
}

.calendar-day {
  position: relative;
  aspect-ratio: 1 / 1;           /* square days */
  border-radius: 8px;
  background: var(--background);
  background-size: cover;        /* the day's photo fills the square */
  background-position: center;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--navy);
}

.calendar-day.blank {
  background: none;
}

.calendar-day.future {
  opacity: 0.45;
}

.calendar-day.today {
  outline: 2px solid var(--navy);
}

.calendar-day.has-post {
  cursor: pointer;
}

.calendar-number {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* On a photo, put the number in a little white bubble so it's readable */
.calendar-day.has-post .calendar-number {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 0 4px;
}

.calendar-photo {
  display: block;
  width: 100%;
  max-height: 55vh;
  object-fit: contain;
  border-radius: 12px;
  background: var(--background);
  margin-top: 8px;
}

/* Warning above the Post button about photo checking */
.post-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff6e0;           /* soft yellow */
  color: #6b4a00;                /* dark enough to read */
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Your own comments can be tapped to edit or delete */
.comment.my-comment {
  cursor: pointer;
}

.comment.my-comment::after {
  content: " ✎";
  color: var(--muted);
  font-size: 0.8rem;
}

/* =====================================================================
   DARK MODE
   Turns on automatically when the phone is set to Dark Mode
   (iPhone: Settings -> Display & Brightness -> Dark).
   Works with the Christmas theme too (its green top bar stays the same).
   ===================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000000;       /* page behind the cards: black */
    --muted: #9fb0c3;            /* small grey labels, lighter so they read on dark */
    --card: #111a27;             /* cards and pop-ups: very dark navy */
    --ink: #f2f6fa;              /* main text: near white */
    --line: #26354b;             /* thin divider lines */
  }

  body.christmas {
    --background: #0d1a13;       /* dark with a hint of green */
  }

  body {
    color: var(--ink);
  }

  /* Cards, tabs and pop-ups */
  .prompt-card,
  .card,
  .optin-card,
  .post,
  .tabs,
  .sheet,
  .points-info {
    background: var(--card);
  }

  /* Text that was navy on white cards becomes light */
  .post-prompt,
  .tab,
  .link-button,
  .calendar-arrow,
  .calendar-day,
  .map-popup-item p,
  .small-button {
    color: var(--ink);
  }

  .tab.active,
  .small-button.primary {
    color: var(--white);
  }

  .calendar-arrow,
  .small-button {
    border-color: var(--ink);
    background: transparent;
  }

  .small-button.primary {
    background: var(--navy);
    border-color: var(--navy);
  }

  /* Text boxes */
  input {
    background: var(--background);
    border-color: var(--line);
    color: var(--ink);
  }

  /* Outlined buttons ("Retake", "Cancel", "Create account"...) */
  .big-button.secondary {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
  }

  /* Messages */
  .message {
    background: #1e3a52;
  }

  .message.error {
    background: #4a1d1d;
    color: #ffb4b4;
  }

  .error-text {
    color: #ff9c9c;
  }

  /* Reactions */
  .reaction {
    background: #243242;
    color: var(--ink);
  }

  .reaction.mine {
    background: #1f3b55;
  }

  body.christmas .reaction.mine {
    background: #4a1d1d;
  }

  /* Placeholders and divider lines */
  .post-image,
  .map-popup-item img,
  .calendar-photo {
    background: #243242;
  }

  .comments,
  .person-row,
  .sheet-row {
    border-color: var(--line);
  }

  /* Coloured labels, brightened for dark backgrounds */
  .verify-badge.ok {
    color: #6fd68f;
  }

  .streak {
    color: #ff9b5c;
  }

  .post-warning {
    background: #3a2f12;
    color: #f5d48a;
  }

  /* Day numbers on calendar photos keep their white bubble with dark text */
  .calendar-day.has-post .calendar-number {
    color: #13294b;
  }

  .calendar-day.today {
    outline-color: var(--ink);
  }
}

/* ---------- First-time tutorial ---------- */

.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 3000;
}

.tutorial-card {
  background: var(--card, var(--white));
  border-radius: 20px;
  padding: 28px 22px 18px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  animation: pop-in 0.25s ease-out;
}

.tutorial-icon {
  font-size: 3rem;
  margin: 0;
}

.tutorial-title {
  margin: 8px 0;
  font-size: 1.4rem;
}

.tutorial-text {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.tutorial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.tutorial-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.35;
}

.tutorial-dots span.active {
  background: var(--navy);
  opacity: 1;
}

.tutorial-skip {
  margin-top: 12px;
  padding: 6px;
}

/* ---------- Pull down to refresh ---------- */

.pull-indicator {
  position: fixed;
  top: calc(60px + env(safe-area-inset-top));   /* just below the top bar */
  left: 50%;
  transform: translate(-50%, -40px);
  opacity: 0;
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  z-index: 1200;
  pointer-events: none;
  transition: opacity 0.15s;
}

@media (prefers-color-scheme: dark) {
  .tutorial-dots span.active {
    background: var(--ink);
  }
}

/* ---------- ☰ menu and sidebar ---------- */

.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-button {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2500;
}

.sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 82vw);
  background: var(--card, var(--white));
  padding: calc(20px + env(safe-area-inset-top)) 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
  animation: slide-in 0.2s ease-out;
}

@keyframes slide-in {
  from { transform: translateX(-100%); }
  to   { transform: none; }
}

.sidebar-title {
  margin: 0 8px 12px;
  font-size: 1.4rem;
  font-weight: 800;
}

.sidebar-item {
  display: block;
  text-align: left;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 14px 10px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-item:active {
  background: var(--background);
}

/* My profile + Log out sit together at the bottom of the menu */
.sidebar-profile {
  margin-top: auto;              /* pushed to the bottom */
}

.sidebar-logout {
  color: var(--muted);
}

/* ---------- Profile, leaderboard, blocked list (bottom pop-ups) ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}

.stat {
  background: var(--background);
  border-radius: 12px;
  padding: 10px 12px;
}

.stat-number {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
}

.stat-label {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.leader-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line, #e3edf6);
}

.leader-row.me {
  font-weight: 800;
}

.leader-rank {
  font-weight: 800;
  color: var(--muted);
}

.leader-points {
  font-weight: 700;
}

.segmented {
  display: flex;
  background: var(--background);
  border-radius: 999px;
  padding: 3px;
  margin: 6px 0 4px;
}

.segmented button {
  flex: 1;
  border: none;
  background: none;
  padding: 8px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}

.segmented button.active {
  background: var(--navy);
  color: var(--white);
}

/* "Delete my account": small and red, under Log out */
.sidebar-delete {
  color: #c62828;
  font-size: 0.9rem;
  padding-top: 6px;
}

@media (prefers-color-scheme: dark) {
  .sidebar-delete {
    color: #ff9c9c;
  }
}

/* ---------- Locked until you post ---------- */

.reaction.locked {
  opacity: 0.45;
}

.comment-locked {
  margin: 6px 0 0;
}

.lock-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card, var(--white));
  border-left: 4px solid var(--carolina);
  font-size: 0.9rem;
  font-weight: 600;
}

body.christmas .lock-banner {
  border-left-color: var(--festive-red);
}

/* ---------- ⚡ Challenges ---------- */

.challenge-card {
  margin-bottom: 14px;
  border-top-color: #f2b705;     /* a gold stripe so challenges stand out */
}

body.christmas .challenge-card {
  border-top-color: #f2b705;
}

.challenge-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.challenge-buttons {
  display: flex;
  gap: 8px;
}

.challenge-buttons .big-button {
  flex: 1;
}

.challenge-buttons .big-button.secondary {
  margin-top: 0;                 /* line up with Accept */
}

/* Live challenge card */
.challenge-prompt {
  margin: 4px 0 6px;
  text-align: left;
}

.challenge-card .prompt-label {
  text-align: left;
}

.challenge-attempts {
  margin-bottom: 10px;
}

.challenge-attempt {
  margin: 4px 0;
  font-size: 0.9rem;
}

/* Challenge result: both photos side by side */
.challenge-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 10px;
}

.challenge-photo {
  border-radius: 12px;
  overflow: hidden;
  background: var(--background);
  border: 3px solid transparent;
  text-align: center;
}

.challenge-photo.winner {
  border-color: #f2b705;           /* gold frame for the winner */
}

.challenge-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--background);
}

.challenge-no-photo {
  margin: 0;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.challenge-photo-label {
  margin: 6px 0;
  font-weight: 700;
  font-size: 0.9rem;
}

.challenge-flag {
  display: block;
  margin: 0 0 10px;
  padding: 0;
}

/* ---------- ⚡ Challenges screen (its own page) ---------- */

/* The one-line gold shortcut on the main screen */
.challenge-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: none;
  border-left: 5px solid #f2b705;
  border-radius: 14px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.challenge-entry-title {
  font-weight: 700;
  white-space: nowrap;
}

.challenge-entry-status {
  flex: 1;
  color: var(--muted);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.challenge-entry.urgent {
  background: #fff4cc;               /* soft gold when something needs you */
}

.challenge-entry.urgent .challenge-entry-status {
  color: var(--navy);
  font-weight: 700;
}

.challenge-entry-arrow {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
}

.challenge-screen-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.challenge-back {
  font-size: 1rem;
  font-weight: 700;
}

.challenge-screen-title {
  margin: 0;
  font-size: 1.3rem;
  color: var(--navy);
}

.challenge-empty {
  margin: 0 0 14px;
  text-align: center;
}

.challenge-done-today {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.challenge-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--line, #e3ebf3);
  background: none;
  color: var(--ink, var(--navy));
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.challenge-history-row:last-child {
  border-bottom: none;
}

.challenge-history-row:disabled {
  cursor: default;
  opacity: 0.7;
}

.challenge-history-main,
.challenge-history-day {
  margin: 0;
}

.challenge-history-day {
  color: var(--muted);
  font-size: 0.85rem;
}

.challenge-rules {
  margin: 0;
  padding-left: 20px;
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  .challenge-entry {
    background: var(--card);
    color: var(--ink);
  }
  .challenge-entry.urgent {
    background: #3d3410;
  }
  .challenge-entry.urgent .challenge-entry-status,
  .challenge-screen-title {
    color: var(--ink);
  }
}

/* ---------- Centered "Sunpin" in the top bar ---------- */
.top-bar {
  position: sticky;
}

.top-bar h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;            /* taps go to the buttons underneath */
}

/* ---------- 👤 Friend profiles and head-to-head ---------- */

/* A tappable name in a friends list */
.person-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--line, #c9d6e3);
  text-underline-offset: 3px;
}

.leader-row.tappable {
  cursor: pointer;
}

.stat-grid.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.head-to-head {
  margin: 14px 0 6px;
  padding: 14px;
  border-radius: 14px;
  border-left: 5px solid #f2b705;
  background: var(--background);
}

.head-to-head .optin-title {
  margin: 0 0 8px;
}

.h2h-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.h2h-side {
  margin: 0;
  font-weight: 700;
  color: var(--muted);
}

.h2h-number {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
}

.head-to-head .hint {
  text-align: center;
  margin: 6px 0 0;
}

.rules-heading {
  margin: 14px 0 4px;
  font-weight: 800;
}

.rules-heading:first-child {
  margin-top: 4px;
}

/* Dark mode: the selected tab in Carolina blue so it stands out on black */
@media (prefers-color-scheme: dark) {
  body:not(.christmas) .tab.active {
    background: var(--carolina);
    color: var(--navy);
  }
}

/* Small "Blocked users" link at the bottom of My profile */
.profile-blocked-link {
  display: block;
  margin: 14px auto 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Side menu: a thin light-blue line under each item, dividing them (owner, 2026-12-04) */
.sidebar-item {
  border-radius: 0;
  border-bottom: 1px solid var(--carolina);
  align-self: flex-start;        /* only as wide as the words, so the line ends with them */
  padding: 4px 0;                /* line sits close under the words */
  margin: 10px 0 10px 10px;
}

.sidebar-logout,
.sidebar-delete {
  border-bottom: none;           /* no line under Log out or Delete my account */
}

.sidebar {
  gap: 0;                        /* the lines do the spacing now */
}

.sidebar-item.sidebar-profile {
  margin-top: auto;              /* keep My profile + Log out at the bottom */
}

/* ---------- My profile (row style, 2026-12-04) ---------- */

.profile-sheet > .optin-title {
  margin-bottom: 0;
  font-size: 1.3rem;
}

.profile-since {
  margin: 2px 0 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.profile-code {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--background);
}

.profile-code .profile-label {
  font-size: 0.8rem;
}

.profile-code-number {
  margin: 2px 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 2px;
}

.profile-rows {
  margin-bottom: 6px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line, #e3ebf3);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-label {
  margin: 0;
  color: var(--muted);
}

.profile-value {
  margin: 0;
  font-weight: 700;
}

.profile-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 8px 0 4px;
}

.profile-link {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Logo + top bar (2026-12-04, owner's logo designs) ----------
   "sunpin" in lowercase, heavy rounded letters, with a Carolina-blue map pin as
   the dot on the i.
   Light mode: white top bar, navy letters (owner's design 2).
   Dark mode:  navy top bar, white letters (owner's design 3). */

.logo {
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--navy);
}

.logo-i {
  position: relative;
  display: inline-block;
}

.logo-pin {
  position: absolute;
  left: 50%;
  bottom: 0.68em;                /* sits where the dot of the i would be */
  width: 0.42em;
  height: 0.52em;
  transform: translateX(-50%);
  fill: var(--carolina);
}

/* Light mode: white bar with navy ☰, logo and Log out */
.top-bar {
  background: var(--white);
  color: var(--navy);
  border-bottom: 1px solid #dfe8f1;
}

.top-bar .menu-button {
  color: var(--navy);
}

.top-bar .text-button {
  color: var(--navy);
  border-color: rgba(19, 41, 75, 0.35);
}

.top-bar .back-link {
  color: var(--navy) !important;
}

/* Dark mode: navy bar with white logo and buttons */
@media (prefers-color-scheme: dark) {
  .top-bar {
    background: var(--navy);
    color: var(--white);
    border-bottom: none;
  }
  .logo,
  .top-bar .menu-button,
  .top-bar .text-button,
  .top-bar .back-link {
    color: var(--white) !important;
  }
  .top-bar .text-button {
    border-color: rgba(255, 255, 255, 0.5);
  }
}

/* Challenges screen header: ‹ Back | Challenges (centred) | record (2026-12-04) */
.challenge-screen-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.challenge-screen-title {
  text-align: center;
}

.challenge-back {
  justify-self: start;
}

.challenge-record-top {
  justify-self: end;
  text-align: right;
  line-height: 1.1;
}

.challenge-record-number {
  display: block;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
}

.challenge-record-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  .challenge-record-number {
    color: var(--ink);
  }
}

/* Name on a post: tap to open their profile */
.post-author-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

/* Friend profile: "You vs Ana" box with a gold edge, like a challenge */
.profile-h2h {
  margin-top: 10px;
  border-left: 4px solid #f2b705;
  border-radius: 0 12px 12px 0;
}

.profile-h2h-note {
  margin: 2px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Streak bonus list in the points pop-up */
.points-info-subtitle {
  font-weight: 700;
  margin-top: 12px !important;
}

.streak-tiers {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  margin-top: 4px;
}

.streak-tiers p {
  margin: 0 !important;
  padding: 3px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.streak-tier-bonus {
  font-weight: 700;
  text-align: right;
  color: var(--carolina);
}

.points-info-note {
  font-size: 0.8rem !important;
  opacity: 0.8;
}

/* Quick-post countdown on the prompt card (first hour after the drop) */
.quick-bonus {
  margin: 10px auto 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e6f1fa;           /* pale Carolina blue */
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  font-variant-numeric: tabular-nums;  /* digits don't jiggle as they count down */
}

.quick-bonus.hot {
  background: #fff4cc;           /* gold for the biggest (+25) bonus */
}

@media (prefers-color-scheme: dark) {
  .quick-bonus {
    background: #1e3a52;
    color: var(--ink);
  }
  .quick-bonus.hot {
    background: #3d3410;
  }
}

/* Points list inside the "How Sunpin works" screens (light card) */
.tutorial-points {
  text-align: left;
  margin: 4px 0 12px;
}

.tutorial-points .points-info-subtitle {
  margin: 8px 0 2px !important;
  font-size: 0.9rem;
}

.tutorial-points .streak-tiers p {
  border-bottom-color: var(--line, #e3ebf3);
  font-size: 0.88rem;
}

.tutorial-points .streak-tier-bonus {
  color: var(--navy);
}

@media (prefers-color-scheme: dark) {
  .tutorial-points .streak-tier-bonus {
    color: var(--carolina);
  }
}

/* The real logo image in the top bar (2026-12-04): navy letters in light mode,
   white in dark mode (picture/source in index.html and privacy.html). */
.logo picture,
.logo-img {
  display: block;
}

.logo-img {
  height: 36px;
  width: auto;
}

/* The top-bar logo is tappable (back to the main feed) */
.top-bar .logo {
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ===== LANDING PAGE (logged out) ===== */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 8px 8px;
}
.landing-logo {
  width: min(260px, 70vw);
  height: auto;
}
.landing-tagline {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 10px 0 22px;
}
.landing-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  width: 100%;
  max-width: 420px;
  text-align: left;
}
.landing-features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card, var(--white));
  border-left: 4px solid var(--carolina);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.35;
}
.landing-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.landing-buttons {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  bottom: 0;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: var(--background);
}
.landing-buttons .big-button { margin: 0; }
.auth-back { display: block; margin: 0 0 8px; padding: 0; }
.auth-switch { text-align: center; margin: 14px 0 0; }
/* On the landing page the big logo is enough: hide the small one in the top bar. */
body:has(#login-screen:not([hidden]) #landing-view:not([hidden])) .top-bar .logo {
  visibility: hidden;
}

/* ===== POINTS STORE, INVITES, SHARE MY FIND, TODAY'S FINDS (2026-12-04) ===== */
.store-balance { text-align: center; margin: 4px 0 14px; }
.store-balance-number { font-size: 2rem; font-weight: 800; margin: 0; }
.store-balance .hint { margin: 2px 0 0; }
.store-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line, #d7e3ee);
  border-left: 4px solid var(--carolina);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.store-item.soon { opacity: 0.6; border-left-color: var(--muted); }
.store-item-info { flex: 1; }
.store-item-info .hint { margin: 2px 0 0; }
.store-item-name { font-weight: 700; margin: 0; }
.store-item-have { font-size: 0.85rem; color: var(--carolina); font-weight: 600; margin: 4px 0 0; }
.store-buy { white-space: nowrap; }
.store-buy:disabled { opacity: 0.55; }
.points-store-link { display: block; margin: 8px 0 0; font-weight: 700; }

.invite-big { font-size: 1.15rem; font-weight: 800; text-align: center; margin: 0 0 12px; }
.invite-dots { display: flex; justify-content: center; gap: 14px; margin: 0 0 10px; }
.invite-dot {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--carolina);
  font-weight: 800; color: var(--carolina);
}
.invite-dot.done { background: var(--carolina); border-style: solid; color: var(--navy); }

.landing-invited {
  background: var(--carolina);
  color: var(--navy);
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 18px;
  max-width: 420px;
}

.share-preview {
  display: block;
  width: min(240px, 60vw);
  margin: 4px auto 14px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
a.big-button { display: block; text-align: center; text-decoration: none; }

.todays-finds { font-size: 0.95rem; font-weight: 600; margin: 6px 0 0; opacity: 0.9; }
#share-find-button { margin-top: 10px; }

/* ===== LOGGED-OUT PAGES: one colour from top to bottom (owner, 2026-12-04) =====
   The whole page matches the top bar: white in light mode, navy in dark mode. */
body:has(#login-screen:not([hidden])) {
  --landing-bg: var(--white);
  background: var(--landing-bg);
}
body:has(#login-screen:not([hidden])) .top-bar { border-bottom: none; }
body:has(#login-screen:not([hidden])) .landing-buttons { background: var(--landing-bg); }
/* feature cards: pale Carolina blue so they still stand out on white */
.landing-features li {
  background: #eef5fb;
}
@media (prefers-color-scheme: dark) {
  body:has(#login-screen:not([hidden])) { --landing-bg: var(--navy); }
  .landing-features li { background: rgba(255, 255, 255, 0.07); }
}

/* Small share icon in the bottom-right corner of your own photos (2026-12-04) */
.post-photo { position: relative; }
.post-share {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(19, 41, 75, 0.6);   /* see-through navy, readable on any photo */
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.post-share:active { transform: scale(0.92); }

/* ✔️ after the prompt on verified posts */
.verified-tick { font-size: 0.85em; white-space: nowrap; }

/* Keep the top bar above everything that scrolls under it (points bubble, photo
   share icons...). Pop-ups, the side menu and sheets are higher still. */
.top-bar { z-index: 1000; }

/* Friends tab: "Copy my code" and "Copy invite link" side by side */
.copy-buttons { display: flex; gap: 10px; }
.copy-buttons .big-button { flex: 1; margin: 0; padding-left: 8px; padding-right: 8px; font-size: 0.95rem; }

/* ===== POLISH PASS (2026-12-04) ===== */

/* Top bar: just ☰ and the logo (Log out lives in the ☰ menu), slightly see-through
   with a soft blur so the page scrolls nicely underneath. */
#logout-button { display: none !important; }
.top-bar {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}
@media (prefers-color-scheme: dark) {
  .top-bar { background: rgba(19, 41, 75, 0.94); }
}

/* Side menu: the real logo instead of the word "Sunpin" */
.sidebar-logo { height: 30px; width: auto; display: block; }

/* Photos fade in when they've loaded, instead of popping in */
.post-image { opacity: 0; transition: opacity 0.35s ease; }
.post-image.loaded { opacity: 1; }

/* Every button gives a tiny "press" when tapped, like a native app */
button, .big-button { -webkit-tap-highlight-color: transparent; }
button:not(:disabled):active { transform: scale(0.97); }
.big-button { transition: transform 0.08s ease, background-color 0.15s ease; }

/* Bottom pop-ups: a small grab handle on top, and they slide up smoothly */
.sheet { position: relative; padding-top: 26px; animation: sheet-up 0.22s ease-out; }
.sheet::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 40px;
  height: 5px;
  margin-left: -20px;
  border-radius: 3px;
  background: rgba(19, 41, 75, 0.18);
}
@keyframes sheet-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}
@media (prefers-color-scheme: dark) {
  .sheet::before { background: rgba(255, 255, 255, 0.25); }
}

/* Cards: a little more breathing room between them, softer shadow */
.post { box-shadow: 0 1px 3px rgba(19, 41, 75, 0.06), 0 6px 18px rgba(19, 41, 75, 0.06); }

/* "You're all caught up ✨" at the bottom of the feed */
.feed-end {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 28px;
}

/* Numbers that tick (points, countdowns) don't wobble as digits change */
.points, .quick-bonus, .store-balance-number, .challenge-record-top { font-variant-numeric: tabular-nums; }

/* Respect "Reduce Motion" in iPhone settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Sign-up code step: big, spaced-out digits */
.code-input {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.code-help { text-align: center; margin-top: 10px; }
