:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #22252a;
  --muted: #6b7280;
  --accent: #1a5fb4;
  --accent-2: #c01c28;
  --ok: #2ec27e;
  --line: #e5e1d8;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #17191d;
    --card: #22252b;
    --ink: #eceae5;
    --muted: #9aa0aa;
    --line: #33363d;
  }
}
:root[data-theme='dark'] {
  --bg: #17191d;
  --card: #22252b;
  --ink: #eceae5;
  --muted: #9aa0aa;
  --line: #33363d;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overscroll-behavior-y: none;
}
.hidden { display: none !important; }

/* The app was built for thumbs, where nothing has a cursor, so this was never
   noticed: browsers give <a href> the hand and every other control an arrow.
   On a laptop that reads as "not clickable". One rule for the native controls,
   then the rows that take a delegated click without being buttons. */
button, summary, label[for], select, [role="button"],
input[type="checkbox"], input[type="radio"], input[type="file"],
.stop[data-stop-id], .exp-card, .thread-row, .msg-row .snail-avatar,
#acting-banner, .kid-swap, .reason-pill, .wx-pill,
#app-header .brand { cursor: pointer; } /* the wordmark opens the dictionary */
button:disabled { cursor: default; }

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}
.tripcode-form { display: flex; gap: 0.5rem; }
.tripcode-form input {
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  width: min(55vw, 240px);
  text-align: center;
}
.tripcode-form button {
  padding: 0 1.2rem;
  border-radius: var(--radius);
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
}
.profile-btn {
  display: block;
  width: min(70vw, 320px);
  margin: 0.5rem auto;
  padding: 1rem;
  font-size: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}

#app { display: flex; flex-direction: column; height: 100dvh; }

#app-header {
  text-align: center;
  padding: calc(0.5rem + env(safe-area-inset-top)) 0 0.45rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  line-height: 1;
}
@font-face {
  font-family: 'Delius Unicase';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/vendor/fonts/delius-unicase-700.ttf') format('truetype');
}

.brand {
  font-family: 'Delius Unicase', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(100deg, #046a38 0%, #1a5fb4 45%, #da291c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#app-header .brand { font-size: 1.08rem; }
.screen .brand { font-size: 1.9rem; display: block; }
.screen .edition {
  display: block;
  font-size: 0.82rem; font-style: italic; letter-spacing: 0.14em;
  color: var(--muted); margin-top: 0.2rem;
}
.screen h1 { font-size: 1.9rem; }
.screen .snail-mark { font-size: 2.6rem; display: block; margin-bottom: 0.4rem; }
#app-header .edition {
  margin-left: 0.45em;
  font-size: 0.78rem;
  font-style: italic;
  letter-spacing: 0.14em;
  color: var(--muted);
}
#panels { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.panel { padding: 0.8rem 0.8rem 1.5rem; min-height: 100%; overflow-x: hidden; }
#panels { overflow-x: hidden; }

#tabbar {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--card);
}
#tabbar .tab-row { display: flex; }
/* The tab row keeps its original height — the credit line lives BELOW it, in
   the strip the home indicator already reserves, so no icon moves for it. */
#made-by {
  border: 0; background: none; font: inherit; font-size: 0.58rem;
  color: var(--muted); opacity: .5; letter-spacing: .02em;
  text-align: center; width: 100%;
  padding: 0 0 max(0.2rem, calc(env(safe-area-inset-bottom) - 1.05rem));
}
#made-by:active { opacity: 1; color: var(--accent-2); }
#tabbar .tab-row button {
  flex: 1;
  padding: 0.5rem 0 0.6rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.68rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
#tabbar .tab-row button span { font-size: 1.25rem; }
#tabbar .tab-row button { font-size: 0.62rem; }
#tabbar .tab-row button.active { color: var(--accent); font-weight: 600; }

/* ΤΩΡΑ */
.now-time { font-size: 1.6rem; font-weight: 700; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.now-time small { color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.now-title {
  text-align: center;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0.4rem 0 0.6rem;
}
.now-title::before { content: '— '; color: var(--muted); font-weight: 400; }
.now-title::after { content: ' —'; color: var(--muted); font-weight: 400; }
.pill {
  font-size: 0.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
}
.wx-pill { cursor: pointer; }
.wx-pill small { color: var(--muted); }
.head-pills { margin-left: auto; display: flex; gap: 0.45rem; align-items: center; }
/* right-aligned when it fits; falls back to left when it overflows, so the
   earliest hours stay reachable instead of being clipped off-screen */
.wx-strip {
  display: flex; gap: 0.7rem; margin: 0.35rem 0 0.1rem;
  overflow-x: auto; scrollbar-width: none;
  justify-content: flex-start;
}
.wx-strip::-webkit-scrollbar { display: none; }
@supports (justify-content: safe flex-end) {
  .wx-strip { justify-content: safe flex-end; }
}
.wx-hour { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
#weather-panel, #sun-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  margin: 0.5rem auto;
  max-width: 430px;   /* neat centered card on big screens, aligned columns inside */
}
.wx-now {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.2rem;
}
.wx-day {
  display: grid;
  grid-template-columns: 82px 1fr 26px 58px 48px;
  align-items: center;
  column-gap: 0.4rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.wx-day.sun { grid-template-columns: 82px 1fr 78px 78px; }
.wx-day:last-child { border-bottom: 0; }
.wx-day.today { font-weight: 700; }
.wx-day.past { opacity: 0.65; }
.wx-base { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-temps { text-align: right; }
.wx-rain { color: var(--accent); font-size: 0.78rem; text-align: right; }
.wx-actual { grid-column: 1 / -1; font-size: 0.75rem; color: var(--muted); padding-left: 82px; }

#map-wrap { position: relative; margin-bottom: 0.7rem; }
#map { height: 21vh; border-radius: var(--radius); }
/* top/bottom are set inline when expanding, from the measured header and tab
   bar, so both stay visible and usable. z-index sits below the overlays. */
#map-wrap.full {
  position: fixed; left: 0; right: 0; top: 0; bottom: 0;
  z-index: 2400;
  margin: 0;
  background: var(--bg);
}
#map-wrap.full #map { height: 100%; border-radius: 0; }
#map-expand {
  position: absolute;
  right: 10px; top: 10px;
  z-index: 1000;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
#map-wrap.full #map-expand { top: 10px; }
#map-center {
  position: absolute;
  right: 10px; top: 58px;
  z-index: 1000;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
#map-wrap.full #map-center { top: 58px; }
#map-fit {
  position: absolute;
  right: 10px; top: 106px;
  z-index: 1000;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
/* The basemap switch is a Leaflet control, so it lives inside whichever map
   it belongs to. On the Now map it queues under the three buttons and only
   shows expanded — satellite on the strip is a dark smudge; on the day map
   it has the corner to itself. */
.map-layer-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
#map .leaflet-top.leaflet-right { top: 144px; }
#map-wrap:not(.full) .map-layer-btn { display: none; }
.leaflet-control-scale-line { background: rgba(255, 255, 255, 0.7); color: #222; }
/* the pins' popup: the stop button looks like ours, not the browser's */
.pin-open {
  margin-top: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}
.leaflet-popup-content a { margin-left: 0.4rem; font-size: 0.85rem; }
/* leg distances sit on the route line */
.route-label span {
  display: inline-block;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a5fb4;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stop {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.5rem;
}
.stop.next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stop.done { border-left: 4px solid var(--ok); opacity: 0.8; }
.stop.done .stop-name { color: var(--muted); }
.stop.done .stop-name::before { content: '✓ '; color: var(--ok); font-weight: 800; }
.stop.skipped { border-left: 4px solid var(--line); opacity: 0.55; }
.stop.skipped .stop-name { color: var(--muted); font-style: italic; }
.stop.skipped .stop-name::before { content: '✗ '; color: var(--muted); }
.stop-main { flex: 1; min-width: 0; }
.stop-name { font-weight: 600; }
.stop-sub { font-size: 0.78rem; color: var(--muted); margin-top: 1px; }
.stop-actions { display: flex; gap: 0.35rem; align-items: center; }
.btn-nav, .btn-done, .btn-checkin, .btn-skip, .btn-undo {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 1.05rem;
  text-decoration: none;
}
.btn-checkin { background: var(--accent); border-color: var(--accent); }
.geo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.15rem; height: 1.15rem; margin-left: 0.35rem; padding: 0 0.22rem;
  border-radius: 0.6rem; border: 1px solid var(--line);
  font-size: 0.7rem; font-weight: 700; line-height: 1;
  color: var(--muted); background: var(--bg); vertical-align: middle;
}
.geo-badge.geo-area, .geo-badge.geo-none { color: #b5651d; border-color: #b5651d; }
.btn-nav.nav-vague { border-style: dashed; opacity: 0.75; }
.btn-skip { color: var(--muted); }
.btn-undo { color: var(--muted); font-size: 0.95rem; }
.status-sel { border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); height: 36px; }

/* ΠΛΑΝΟ */
.day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.6rem; padding: 0.3rem 0.6rem; }
.day summary { padding: 0.5rem 0.2rem; cursor: pointer; position: relative; padding-right: 44px; }
.btn-snail-day {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 1rem;
}
.day summary small { color: var(--muted); }
.btn-add-stop { margin: 0.4rem 0 0.5rem; background: none; border: 1px dashed var(--muted); color: var(--muted); border-radius: 999px; padding: 0.3rem 0.9rem; }

/* ΒΟΗΘΟΣ */
#panel-chat { display: flex; flex-direction: column; height: 100%; padding-bottom: 0.5rem; }
#chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; padding-bottom: 0.5rem; }
.bubble {
  max-width: 85%;
  padding: 0.55rem 0.8rem;
  border-radius: 16px;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble small { display: block; font-size: 0.68rem; opacity: 0.7; }
.bubble.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.assistant a { color: var(--accent); word-break: break-all; }
.bubble code {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 4px;
  font-size: 0.85em;
}
.bubble.typing { color: var(--muted); }
.msg-row { display: flex; align-items: flex-end; gap: 0.4rem; max-width: 92%; }
.msg-row .bubble { max-width: 100%; }
.snail-avatar {
  font-size: 1.25rem;
  line-height: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-empty { text-align: center; color: var(--muted); padding: 2.2rem 1.5rem; }
.chat-empty h3 { color: var(--ink); margin: 0.6rem 0 0.3rem; }
.chat-empty p { font-size: 0.92rem; max-width: 320px; margin: 0 auto; }
/* Starter questions: one tap sends a real question. They sit under the intro
   as chips, not a list, so they read as examples rather than a menu. */
.chat-starters { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin: 1.1rem auto 0; max-width: 340px; }
.chat-starter {
  font: inherit; font-size: 0.86rem; cursor: pointer;
  padding: 0.45rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--card); color: var(--accent);
}
.chat-starter:active { background: var(--accent); color: #fff; }
.chat-starters-hint { font-size: 0.76rem; margin-top: 0.7rem; opacity: 0.8; }
.snail-hero { width: 130px; height: auto; display: block; margin: 0 auto; }
#chat-form { display: flex; gap: 0.5rem; }
#chat-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 1rem;
  /* pill at one line, rounded box once it grows */
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
  min-height: 42px;   /* never collapses, even measured while hidden */
  max-height: 40vh;   /* long thoughts stay scrollable, never eat the screen */
}
/* buttons stay pinned to the bottom as the box grows upward */
#chat-form { align-items: flex-end; }
#chat-form button {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
#chat-mic, #chat-plus, #chat-attach { background: var(--card) !important; border: 1px solid var(--line) !important; color: var(--muted) !important; }
#chat-plus { font-size: 1.35rem; font-weight: 300; }
#chat-mic.rec { background: var(--accent-2) !important; border-color: var(--accent-2) !important; color: #fff !important; animation: micpulse 1.2s infinite; }
@keyframes micpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 28, 40, 0.5); }
  50% { box-shadow: 0 0 0 9px rgba(192, 28, 40, 0); }
}

/* ΗΜΕΡΟΛΟΓΙΟ */
.journal-nav { display: flex; gap: 0.3rem; overflow-x: auto; padding-bottom: 0.5rem; }
.jday {
  min-width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.jday.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.prompt-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 0.7rem;
  margin: 0.5rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.prompt-card button, .journal-actions button {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}
.journal-actions { display: flex; gap: 0.4rem; margin: 0.4rem 0 0.8rem; flex-wrap: wrap; }
.feed-item {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}
.btn-checkin-edit {
  position: absolute;
  right: 8px; top: 8px;
  border: 0;
  background: none;
  font-size: 0.9rem;
  opacity: 0.6;
  padding: 4px;
}
.feed-item small { display: block; color: var(--muted); font-size: 0.7rem; margin-top: 2px; }
.feed-item.photo img { width: 100%; border-radius: 10px; display: block; margin-bottom: 0.3rem; }
.empty { color: var(--muted); text-align: center; padding: 1.5rem 0; }

/* ΠΕΡΙΣΣΟΤΕΡΑ */
#panel-more h3 { margin: 1rem 0 0.5rem; }
.scoreboard { display: flex; gap: 0.6rem; }
.score { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; padding: 0.7rem; }
.score-emoji { font-size: 1.8rem; }
.score-num { font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.nata-row { display: flex; flex-direction: column; gap: 0.35rem; }
/* The treat's name opens pictures of it — a link, but one that reads as the
   heading it is: the app's ink, a quiet underline as the only tell. */
.treat-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.nata-card {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.4rem 0.55rem;
  font-size: 0.9rem;
  min-width: 0;
}
/* Wrap before truncating: a name is the one thing on this card that must be
   read whole, and «Γλυκερία» beside a count and two buttons cannot fit a
   half-width card on a portrait phone. Two lines beats an ellipsis. */
.nata-who { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.nata-count { font-weight: 800; font-size: 1.05rem; min-width: 1.4em; text-align: right; }
.nata-ctl { display: flex; gap: 0.3rem; flex-shrink: 0; }
.nata-minus, .nata-btn {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9rem;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
/* Two-across only when each card gets a real width. 430px caught a Plus/Max
   phone in portrait and squeezed four cards into ~200px each; 640px means
   iPad or landscape, where two columns actually have room. */
@media (min-width: 640px) {
  .nata-row { display: grid; grid-template-columns: 1fr 1fr; }
}
.nata-btn { background: var(--ok); border-color: var(--ok); color: #fff; }
.mission {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.6rem 0.7rem; margin-bottom: 0.45rem;
}
.mission-main { flex: 1; }
.awarded { font-size: 1rem; }
.btn-award, .btn-mission-edit { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font-size: 1.15rem; }
.mission-actions { display: flex; gap: 0.3rem; }
.wallet-item {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.6rem 2.4rem 0.6rem 0.7rem; margin-bottom: 0.45rem; font-size: 0.92rem;
}
.btn-wallet-edit { position: absolute; right: 8px; top: 8px; border: 0; background: none; font-size: 1rem; }
.switch-profile { margin: 1.5rem 0; text-align: center; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }

/* Points: penalties, audit log, reasons */
.score { position: relative; }
.btn-penalty {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.8rem;
  color: var(--accent-2);
}
.btn-log {
  width: 100%;
  margin: 0.45rem 0;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem;
  font-size: 0.85rem;
}
#points-log {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
  margin-bottom: 0.6rem;
  max-height: 40vh;
  overflow-y: auto;
}
.log-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.87rem;
}
.log-row:last-child { border-bottom: 0; }
.log-row small { display: block; color: var(--muted); font-size: 0.72rem; }
.log-row.revoked > div { opacity: 0.45; }
.log-revoke { border: 0; background: none; font-size: 1rem; }
.pill-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.reason-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 0.3rem 0.4rem 0.3rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.reason-pill.sel { border-color: var(--accent); background: var(--accent); color: #fff; }
.reason-x { border: 0; background: none; color: var(--muted); font-size: 0.75rem; padding: 2px 5px; }
.reason-pill.sel .reason-x { color: #fff; }
#pen-reason {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.pen-points-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.pen-points-row input {
  width: 80px;
  padding: 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

/* easter eggs 🤫 */
.egg-drop {
  position: fixed;
  top: -2rem;
  z-index: 5000;
  pointer-events: none;
  animation: eggfall 2.4s linear forwards;
}
@keyframes eggfall {
  to { transform: translateY(110vh) rotate(340deg); }
}
.egg-parade {
  position: fixed;
  left: -14rem;
  font-size: 1.25rem;
  font-weight: 800;
  z-index: 5000;
  pointer-events: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  animation: eggsnail 4.5s ease-in-out forwards;
}
.egg-snail {
  position: fixed;
  bottom: 84px;
  left: -3rem;
  font-size: 2.2rem;
  z-index: 5000;
  pointer-events: none;
  animation: eggsnail 6s linear forwards;
}
@keyframes eggsnail {
  to { transform: translateX(115vw); }
}

/* Kid handover */
#acting-banner {
  background: linear-gradient(90deg, #f9c74f33, #f9844a33);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.handover { display: flex; gap: 0.5rem; margin: 0.6rem 0 0.2rem; }
.handover-btn {
  flex: 1;
  border: 1px dashed var(--accent);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.55rem 0.5rem;
  font-size: 0.85rem;
}

/* Ρυθμίσεις */
.settings { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.55rem 0.75rem; font-size: 0.95rem;
}
.seg { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg-btn { border: 0; background: var(--bg); color: var(--muted); padding: 0.4rem 0.7rem; font-size: 0.82rem; }
.seg-btn.active { background: var(--accent); color: #fff; }
.setting-btn {
  display: block; width: 100%;
  text-align: left; line-height: 1.35;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.65rem 0.75rem; color: var(--ink); font-size: 0.95rem;
}
.setting-btn small { color: var(--muted); }

/* Μηνύματα οικογένειας */
#msg-stack {
  position: fixed;
  top: calc(3rem + env(safe-area-inset-top));
  left: 50%; transform: translateX(-50%);
  width: min(92vw, 420px);
  z-index: 4000;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.msg-banner {
  background: var(--card);
  border: 1px solid var(--accent);
  border-left-width: 5px;
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  cursor: pointer;
}
.msg-from { display: block; font-weight: 700; font-size: 0.8rem; margin-bottom: 2px; }

#sheet .sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 3000;
}
#sheet .sheet-body {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  z-index: 3001;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
}
#sheet h4 { margin-bottom: 0.6rem; }
.sheet-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
}
.sheet-btn.danger { color: var(--accent-2); border-color: var(--accent-2); }
/* the cancel row has bare text, not a .sheet-label — since .sheet-btn became a
   flex container for the 📋 affordance, centering needs justify-content. */
.sheet-btn.cancel { justify-content: center; text-align: center; color: var(--muted); border-style: dashed; }
.sheet-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); justify-content: center; }
/* a destructive confirm wears the weight of what it does */
.sheet-btn.primary.danger-fill { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
/* Cancel left, confirm right — the iOS convention for a two-button choice, so
   the thumb finds "go" where every other dialog on the phone puts it. */
.sheet-row { display: flex; gap: .5rem; }
.sheet-row .sheet-btn { flex: 1; margin: 0; justify-content: center; text-align: center; }
.sheet-row .sheet-btn .sheet-label { text-align: center; }
.sheet-row .sheet-btn.cancel { flex: 0 0 38%; }
.sheet-input { width: 100%; box-sizing: border-box; resize: none; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem;
  margin: .2rem 0 .6rem; line-height: 1.4; min-height: 2.6rem; }
.sheet-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sheet-field { display: block; margin-bottom: .55rem; }
.sheet-field-label { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; margin: 0 0 .25rem .1rem; }
.sheet-field .sheet-input { margin: 0; }
/* a tick per family member (the treats editor's «who counts it») */
.sheet-checks { display: flex; flex-wrap: wrap; gap: .35rem .5rem; }
.sheet-check { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .6rem; border: 1px solid var(--line);
  border-radius: 999px; font-size: .92rem; background: var(--card); }
.sheet-check:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.sheet-check input { margin: 0; accent-color: var(--accent); }
input.sheet-input { height: 2.6rem; }

#toast {
  position: fixed;
  bottom: calc(70px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 2000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Εμπειρίες */
.exp-lead { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.7rem; }
.exp-card {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.7rem 0.85rem; margin-bottom: 0.5rem; color: var(--ink);
}
.exp-card.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.exp-title { display: block; font-weight: 700; font-size: 1rem; }
.exp-sub { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.exp-gen { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.exp-gen-btn {
  border: 1px dashed var(--accent); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 0.4rem 0.8rem; font-size: 0.85rem;
}
.exp-gen-btn:disabled { opacity: 0.5; }
.exp-back { border: 0; background: none; color: var(--accent); font-size: 0.95rem; padding: 0.2rem 0; margin-bottom: 0.3rem; }
.exp-intro { font-size: 0.95rem; margin-bottom: 0.8rem; }
.exp-h { margin: 1.1rem 0 0.5rem; }
.station {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.55rem 0.75rem; margin-bottom: 0.45rem;
}
.station summary { display: flex; gap: 0.6rem; align-items: center; cursor: pointer; }
.station-n {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.station-sign { display: block; color: var(--muted); font-size: 0.72rem; font-style: italic; }
.station p { font-size: 0.92rem; margin-top: 0.5rem; line-height: 1.45; }
.station-look { color: var(--accent); }
.station-wow { color: var(--muted); }
.hunt-item {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.5rem 0.7rem; margin-bottom: 0.4rem; font-size: 0.9rem;
}
.hunt-item.done { border-color: var(--ok); }
.hunt-item.done .hunt-text { color: var(--muted); }
.hunt-tick {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1rem;
}
.hunt-item.done .hunt-tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.hunt-text { flex: 1; }
.hunt-pts { color: var(--muted); font-size: 0.78rem; }
.exp-qs { display: flex; flex-direction: column; gap: 0.4rem; }
.exp-q {
  text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 0.55rem 0.75rem; font-size: 0.9rem;
}
.btn-stop-edit {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Τώρα: today's journal so far */
#now-feed { margin-top: 1rem; }
.feed-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 0.35rem;
}
.feed-more { border: 0; background: none; color: var(--accent); font-size: 0.82rem; }
.mini-feed {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.4rem 0.6rem; margin-bottom: 0.3rem; font-size: 0.85rem;
}
.mini-feed small { color: var(--muted); font-size: 0.7rem; margin-left: 0.4rem; }
.exp-top { display: flex; align-items: center; justify-content: space-between; }
.exp-del { border: 1px solid var(--line); background: var(--card); border-radius: 50%; width: 34px; height: 34px; font-size: 0.9rem; }
.exp-gen-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.exp-gen-btn small { color: var(--muted); font-size: 0.68rem; }

/* boot splash — never show a blank page */
#splash { gap: 0.6rem; }
.splash-snail { font-size: 3rem; animation: splashbob 1.6s ease-in-out infinite; }
@keyframes splashbob { 0%,100% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
.splash-text { color: var(--muted); font-size: 0.95rem; }
#splash-retry {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 0.5rem 1.2rem; font-size: 0.95rem;
}

/* experience preview / custom */
.exp-prev { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.8rem; margin-bottom: 0.8rem; }
.prev-row { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.3rem 0; font-size: 0.92rem; }
.prev-row span { color: var(--muted); }
.prev-list { margin: 0 0 0.9rem 1.1rem; font-size: 0.9rem; line-height: 1.6; }
.prev-label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
#exp-hints {
  width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 0.6rem 0.8rem; font-size: 0.92rem; font-family: inherit;
}
.prev-actions { display: flex; gap: 0.5rem; margin-top: 0.8rem; align-items: center; }
.prev-go { flex: 1; border: 0; background: var(--accent); color: #fff; border-radius: var(--radius); padding: 0.75rem; font-size: 1rem; }
.prev-go:disabled { opacity: 0.7; }
.prev-cancel { color: var(--muted); }
.exp-gen-btn.custom { border-style: solid; border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* read-only demo */
/* read-only demo */
/* Two languages, one bar: side by side with a middot where there is room,
   stacked where there is not. The English line is a step quieter so the Greek
   one still reads first on a Greek phone, without being hidden. */
#demo-bar {
  background: linear-gradient(90deg, #1a5fb433, #2ec27e33);
  border-bottom: 1px solid var(--line);
  text-align: center; padding: 0.4rem 0.7rem; font-size: 0.78rem;
  display: flex; flex-wrap: wrap; gap: 0 0.5rem; align-items: baseline; justify-content: center;
}
#demo-bar a#demo-mine { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
#demo-bar span[lang="en"] { color: var(--muted); }
#demo-bar span[lang="en"]::before { content: "·"; margin-right: 0.5rem; }
@media (max-width: 30rem) {
  #demo-bar span { flex: 0 0 100%; }
  #demo-bar span[lang="en"]::before { content: none; }
}
body.demo .btn-checkin, body.demo .btn-done, body.demo .btn-stop-edit,
body.demo .btn-add-stop, body.demo .status-sel, body.demo .btn-snail-day,
body.demo .btn-skip, body.demo .btn-undo { display: none !important; }

/* custom experience form */
#cx-name {
  width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 0.7rem 0.9rem; font-size: 1rem; margin-bottom: 0.3rem;
}
.cx-days { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; }
.cx-day {
  flex: 0 0 auto; width: 66px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 0.45rem 0.2rem;
}
.cx-day.sel { border-color: var(--accent); background: var(--accent); color: #fff; }
.cx-dow { font-size: 0.66rem; text-transform: uppercase; opacity: 0.8; }
.cx-num { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.cx-mon { font-size: 0.66rem; opacity: 0.8; }
.cx-lbl { font-size: 0.6rem; opacity: 0.75; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-times { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
#cx-time {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 0.45rem 0.8rem; font-size: 0.95rem;
}
.cx-quick {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 0.45rem 0.8rem; font-size: 0.85rem;
}
.cx-quick.sel { border-color: var(--accent); background: var(--accent); color: #fff; }

/* kid device mode */
#kid-bar {
  background: linear-gradient(90deg, #f9c74f33, #2ec27e33);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: flex-start; gap: 0.4rem;
  padding: 0.35rem 0.7rem; font-size: 0.8rem;
  overflow-x: auto; scrollbar-width: none;
}
@supports (justify-content: safe center) {
  #kid-bar { justify-content: safe center; }
}
.kid-swap {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 0.28rem 0.7rem; font-size: 0.85rem;
}
.kid-swap.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.profile-btn.kid { font-size: 1.6rem; padding: 1.3rem; }
#profile-screen h1 small { font-size: 0.55em; color: var(--muted); font-style: italic; }
body.kidmode .btn-stop-edit, body.kidmode .btn-add-stop, body.kidmode .status-sel,
body.kidmode .btn-skip, body.kidmode .btn-undo { display: none !important; }

/* «γράφει…» indicator */
.bubble.typing { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.88rem; }
.dots { display: inline-flex; gap: 3px; }
.dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  display: inline-block; animation: dotpulse 1.2s infinite ease-in-out;
}
.dots i:nth-child(2) { animation-delay: 0.18s; }
.dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes dotpulse { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
#chat-form button[type="submit"]:disabled { opacity: 0.45; }

/* day summary + quiz */
.summary-text {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.7rem 0.85rem; margin-bottom: 0.7rem; font-size: 0.92rem; line-height: 1.5;
  max-height: 42vh; overflow-y: auto; white-space: pre-wrap;
}
.quiz-q { font-size: 1.02rem; font-weight: 600; margin-bottom: 0.7rem; }
.quiz-opt.right { border-color: var(--ok); background: var(--ok); color: #fff; }
.quiz-opt.wrong { border-color: var(--accent-2); color: var(--accent-2); }
.quiz-feedback { padding: 0.5rem 0.2rem; font-weight: 600; }
.quiz-feedback small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.quiz-score { font-size: 2rem; font-weight: 800; text-align: center; color: var(--accent); }
.quiz-why { text-align: center; color: var(--muted); margin-bottom: 0.6rem; }

/* experiences grouped: today / upcoming / lived */
.exp-group { margin-bottom: 1rem; }
.exp-group-h {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin: 0 0 0.4rem 0.15rem;
}
.exp-card { position: relative; }
.exp-card.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.exp-card.past { opacity: 0.72; border-left: 4px solid var(--ok); }
.exp-card.future { border-style: dashed; }
.exp-badge {
  float: right; font-size: 0.66rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; margin-left: 0.4rem;
}
.exp-badge.now { background: var(--accent); color: #fff; }
.exp-badge.past { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.exp-badge.arch { background: var(--bg); color: var(--muted); border: 1px dashed var(--line); }
.exp-card.archived { opacity: 0.6; border-left: 4px dashed var(--line); }
.exp-card.archived .exp-title { text-decoration: line-through; text-decoration-color: var(--muted); }
.exp-group.archived { margin-top: 1rem; }
.exp-badge.soon { background: var(--bg); color: var(--muted); border: 1px dashed var(--line); }
.exp-toggle-all {
  float: right; border: 1px solid var(--line); background: var(--card); color: var(--accent);
  border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 600;
}

/* update pill — single line, never wraps */
#update-pill {
  position: fixed;
  top: calc(0.6rem + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 6000;
  display: inline-flex; align-items: center; gap: 0.4rem;
  max-width: calc(100vw - 2rem);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: pillin 0.25s ease-out;
}
#update-pill .up-text { overflow: hidden; text-overflow: ellipsis; }
#update-pill .up-spin { display: inline-block; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pillin { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.mr-detail.build-label { color: var(--ok); font-weight: 600; }
.mr-detail.build-label.stale { color: var(--accent-2); }

/* day route overview */
.daymap-btn {
  display: block; width: 100%; margin: 0 0 0.6rem;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 0.5rem; font-size: 0.9rem;
}
.btn-daymap-day { position: absolute; right: 42px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font-size: 1rem; }
#daymap { position: fixed; inset: 0; z-index: 4000; background: var(--bg); display: flex; flex-direction: column; }
.dm-head { display: flex; align-items: center; justify-content: space-between; padding: calc(0.6rem + env(safe-area-inset-top)) 0.8rem 0.6rem; border-bottom: 1px solid var(--line); background: var(--card); }
.dm-close { border: 0; background: none; font-size: 1.2rem; color: var(--muted); }
#dm-map { height: 42vh; }
.dm-body { flex: 1; overflow-y: auto; padding: 0.7rem 0.8rem calc(1rem + env(safe-area-inset-bottom)); }
.dm-total { font-size: 1.05rem; text-align: center; margin-bottom: 0.6rem; }
.dm-btn { display: block; text-align: center; text-decoration: none; background: #34a853; color: #fff; border-radius: var(--radius); padding: 0.6rem; font-weight: 600; margin-bottom: 0.8rem; }
.dm-btn small { display: block; font-weight: 400; opacity: 0.9; font-size: 0.72rem; }
.dm-leg { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.dm-leg.slow { background: #f9c74f22; }
.dm-leg em { color: var(--accent-2); font-style: normal; font-size: 0.78rem; }
.dm-leg-n { color: var(--muted); font-size: 0.7rem; min-width: 34px; }
.dm-leg-txt { flex: 1; min-width: 0; }
.dm-leg-num { white-space: nowrap; font-weight: 600; }
.dm-next { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.dm-nav { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.6rem; font-size: 0.75rem; }
.dm-nav a { color: var(--accent); text-decoration: none; font-weight: 600; }
.dm-note { color: var(--muted); font-size: 0.72rem; margin-top: 0.8rem; }
.dm-pin span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 0.8rem; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
/* on the Now map the pins also say where the day stands */
.dm-pin.done span { background: #6b7c93; opacity: 0.85; }
.dm-pin.skipped span { background: #9aa4b1; opacity: 0.7; text-decoration: line-through; }
.dm-pin.next span { background: #d64545; box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.28), 0 1px 4px rgba(0,0,0,.4); }
.dm-pin.vague span { border: 2px dashed rgba(255,255,255,.85); }
.dm-routebtns { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.dm-routebtns .dm-btn { flex: 1; margin-bottom: 0; }
.dm-btn.a { background: #1f1f1f; }
.dm-wazenote { margin: 0 0 0.8rem; }
.dm-h { margin: 1rem 0 0.4rem; font-size: 0.85rem; color: var(--muted); }
.dm-next { display: block; }
.dm-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.45rem 0.6rem; margin-bottom: 0.35rem; font-size: 0.85rem; background: var(--card);
}
.dm-nav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-nav-name small { color: var(--muted); }
.dm-nav-links { display: flex; gap: 0.5rem; flex-shrink: 0; }
.dm-nav-links a { text-decoration: none; font-size: 1.15rem; }
.dm-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  margin-top: 1rem; padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--muted);
}
.dm-legend b { font-size: 0.95rem; }
.dm-legend-slow { color: var(--accent-2); }

/* the inline Google Maps pin used on plan rows */
.gpin { display: inline-block; width: 11px; height: 15px; vertical-align: -2px; }
.btn-nav .gpin { width: 15px; height: 21px; vertical-align: middle; }

/* header buttons: messages + settings, anchored top-right */
#app-header { position: relative; }
/* No gap between the two glyphs: with bare icons a 6px gap plus two 34pt
   squares read as a hole. The buttons abut; each has its own tap target. */
#hdr-btns { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  margin-top: calc(env(safe-area-inset-top) / 2); display: flex; align-items: center; gap: 0; }
/* Bare glyphs: the boxed pill made two icons read as two more buttons in a
   header that is otherwise all wordmark. Same 34pt target, no chrome. */
#hdr-btns button { width: 34px; height: 34px; border-radius: 10px; border: 0;
  background: none; font-size: 1.15rem; position: relative; padding: 0; }
#hdr-btns button:active { background: var(--line); }
/* Inline to the right of the glyph, vertically centred — a top-right corner
   badge poked above the header and got clipped, and the header must not grow
   to fit it. The button widens to hold both. */
/* The button is a fixed 34pt square with no badge — the same as its
   neighbour, so the two glyphs sit together. Only when unread mail exists
   does it grow to hold the count; the gap in the header is the count, never
   an empty slot reserved for it. */
/* The badge is a sibling AFTER the 💬, between it and the ⚙️. Hidden, it
   takes no space at all and the two glyphs abut; shown, it is the only thing
   between them. No :has() — the previous rule leaned on it, and iOS Safari
   before 15.4 ignores it, which is exactly a phone that kept the gap. Tapping
   the badge opens messages, same as the glyph. */
#msg-badge { min-width: 16px; height: 16px; border-radius: 8px; margin: 0 4px 0 -2px;
  background: var(--accent-2); color: #fff; font-size: .62rem; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
#msg-badge.hidden { display: none; }
/* Demo only: the two template flags, left of the 💬. Real links, so the
   browser gives them the hand and a long-press offers "open in new tab". The
   flag you are on is full strength; the other is dimmed, not hidden — it is
   the invitation. */
/* the edition is the demo switcher: a small caret says it opens something */
#app-header .edition.switch { cursor: pointer; white-space: nowrap; }
#app-header .edition.switch::after { content: '\25BE'; font-style: normal; font-size: 1.25em; line-height: 1; vertical-align: -0.1em; margin-left: 0.25em; color: var(--accent); }
.sheet-label small { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; letter-spacing: 0; }

/* settings as a full page */
#settings-page { position: fixed; inset: 0; z-index: 2500; background: var(--bg);
  display: flex; flex-direction: column; }
#settings-body { flex: 1; overflow-y: auto; padding: .8rem .8rem calc(1.2rem + env(safe-area-inset-bottom)); }
#settings-body h3 { margin: .9rem 0 .5rem; }
.setting-btn.danger { color: var(--accent-2); }

/* conversation overlay */
#convo { position: fixed; inset: 0; z-index: 2600; background: var(--bg); display: flex; flex-direction: column; }
/* The threads list is a page, not a popup — the same shell as a conversation,
   one level up. */
#threads { position: fixed; inset: 0; z-index: 2590; background: var(--bg); display: flex; flex-direction: column; }
#threads-list { flex: 1; overflow-y: auto; padding: .6rem .8rem calc(1rem + env(safe-area-inset-bottom)); }
.thread-row { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .8rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink);
  font: inherit; text-align: left; margin-bottom: .6rem; }
.thread-row:active { background: var(--bg); }
.thread-emoji { font-size: 1.5rem; width: 36px; text-align: center; flex: 0 0 auto; }
.thread-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-name { font-weight: 600; }
.thread-last { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-unread { flex: 0 0 auto; min-width: 22px; height: 22px; border-radius: 11px; background: var(--accent-2);
  color: #fff; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.threads-empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }
.convo-head { display: flex; align-items: center; gap: .6rem; padding: calc(.6rem + env(safe-area-inset-top)) .8rem .6rem;
  border-bottom: 1px solid var(--line); background: var(--card); }
.convo-head b { flex: 1; text-align: center; }
.convo-head button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 1.1rem; }
#convo-log { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .45rem; }
.convo-msg { max-width: 78%; align-self: flex-start; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px; padding: .5rem .7rem; }
.convo-msg.mine { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: #fff;
  border-radius: 14px 14px 4px 14px; }
.convo-msg.mine .convo-ts { color: rgba(255,255,255,.75); }
.convo-text { font-size: .95rem; white-space: pre-wrap; word-break: break-word; }
.convo-ts { font-size: .68rem; color: var(--muted); text-align: right; margin-top: 2px; }
#convo-form { display: flex; gap: .5rem; padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card); }
#convo-input { flex: 1; font: inherit; font-family: inherit; padding: .65rem .8rem; border-radius: 20px; border: 1px solid var(--line);
  resize: none; overflow-y: auto; line-height: 1.35; min-height: 42px; max-height: 30vh;
  background: var(--bg); color: var(--ink); }
#convo-form { align-items: flex-end; }
#convo-form button { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 1rem; }
#convo-mic { background: var(--bg) !important; border: 1px solid var(--line) !important; color: var(--ink) !important; }
#convo-mic.rec { background: var(--accent-2) !important; border-color: var(--accent-2) !important; color: #fff !important; animation: micpulse 1.2s infinite; }

/* ⋯ tab: iOS-style grouped inset list */
.more-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 .8rem; overflow: hidden; }
/* Sections shown inline on the Άλλα list: same card, same spacing as a group,
   so Πόντοι and Νάτα read as part of the list rather than bolted above it. */
.more-inline { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 .8rem; padding: .2rem .9rem .8rem; }
.more-inline h3 { margin: .6rem 0 .5rem; }
.more-row { display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .8rem .9rem; border: 0; background: none; color: var(--ink); font: inherit; text-align: left;
  border-bottom: 1px solid var(--line); min-height: 52px; }
.more-group .more-row:last-child { border-bottom: 0; }
.more-row:active { background: var(--bg); }
/* The "new mission" entry is a mission card in shape so it sits flush with
   the list, but a button in behaviour — reset the browser button chrome. */
.mission-new { width: 100%; border: 1px dashed var(--line); background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; }
.mission-new:active { background: var(--bg); }
.mr-icon { font-size: 1.35rem; width: 34px; text-align: center; flex: 0 0 auto; }
.mr-body { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mr-label { font-weight: 600; }
.mr-detail { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-chev { color: var(--muted); font-size: 1.3rem; flex: 0 0 auto; }
/* An action pill inside a More row — tapping it acts, tapping the rest of the
   row still opens the section. Sized to be a finger target, not a badge. */
.mr-pill { flex: 0 0 auto; font-size: .8rem; font-weight: 600; padding: .35rem .6rem;
  border-radius: 999px; background: var(--accent); color: #fff; margin-right: .2rem; }
.mr-pill:active { filter: brightness(.9); }

/* section page header: ‹ back, centered title */
.page-head { display: flex; align-items: center; margin: -0.2rem 0 .6rem; }
.page-back { border: 0; background: none; color: var(--accent); font: inherit; font-size: 1rem; padding: .3rem .4rem .3rem 0; }
.page-head b { flex: 1; text-align: center; font-size: 1.02rem; }
.page-back-spacer { width: 3.2rem; }
.settings-head { padding: calc(.6rem + env(safe-area-inset-top)) .8rem .6rem; margin: 0;
  border-bottom: 1px solid var(--line); background: var(--card); }

/* inline copy affordance on sheet rows */
.sheet-btn { display: flex; align-items: center; gap: .5rem; }
.sheet-label { flex: 1; text-align: left; }
.sheet-copy { flex: 0 0 auto; padding: .25rem .45rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); font-size: .9rem; }

/* emoji picker — sits above the composer, recents first */
#emoji-pop { position: fixed; inset: 0; z-index: 2700; }
.emoji-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.emoji-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 52vh; overflow-y: auto;
  background: var(--card); border-top: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: .7rem .8rem calc(.8rem + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0,0,0,.25);
}
.emoji-group h5 { margin: .5rem 0 .35rem; font-size: .72rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.emoji-group:first-child h5 { margin-top: 0; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; }
.emoji-btn { font-size: 1.6rem; line-height: 1; padding: .35rem 0; border: 0;
  background: none; border-radius: 10px; }
.emoji-btn:active { background: var(--bg); }
#convo-emoji { background: var(--bg) !important; border: 1px solid var(--line) !important; color: var(--ink) !important; }
#update-pill.waiting .up-spin { animation: none; }

/* kids in read-only messaging: no composer, a route back to missions */
.convo-muted { padding: .8rem .9rem calc(.9rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card);
  font-size: .9rem; color: var(--muted); text-align: center; }
.convo-muted b { color: var(--ink); }
.convo-muted button { display: block; width: 100%; margin-top: .6rem; padding: .7rem;
  font: inherit; font-weight: 600; border: 0; border-radius: 12px;
  background: var(--accent); color: #fff; }
.setting-row.wrap { flex-wrap: wrap; gap: .4rem; }
.setting-row.wrap .seg { flex-wrap: wrap; }

/* navigation brand marks — centred by flexbox, never by baseline guesswork:
   the three logos fill their viewBoxes differently, so vertical-align nudges
   line up one pair and break the other. */
.navmark { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
svg.navmark path[fill="currentColor"] { color: var(--ink); }
/* Apple's mark sits smaller inside its box than Google's — a hair larger so
   the three read as the same size. */
.dm-nav-links a .navmark, .dm-legend .navmark { width: 20px; height: 20px; }
svg.navmark[viewBox="0 0 24 24"] { transform: scale(1.08); }
.waze-w { display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 6px;
  background: #05C8F7; color: #fff; font-weight: 800; font-size: .78rem;
  letter-spacing: -.02em; }
/* every host of a mark centres it */
.dm-nav-links a { display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; }
.dm-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.dm-legend b { display: inline-flex; align-items: center; }
.dm-btn { display: flex !important; flex-direction: column; align-items: center; justify-content: center; }
.dm-btn .navmark { margin-bottom: .15rem; }

/* ---------- λίστα: ν' αγοράσουμε / να φάμε / να κάνουμε ---------- */
.list-btn {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  margin: 0 0 .6rem; padding: .55rem .7rem; font: inherit; font-size: .9rem;
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  background: var(--card); color: var(--ink); border-radius: var(--radius);
  text-align: left;
}
.list-btn-day { margin: .1rem 0 .5rem; }
.list-count {
  margin-left: auto; flex: 0 0 auto; min-width: 2.4rem; text-align: center;
  font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--accent); color: #fff; border-radius: 999px; padding: .12rem .45rem;
}
.list-count.all-done { background: var(--ok); }

#checklist, #guide {
  position: fixed; inset: 0; z-index: 4200; background: var(--bg);
  display: flex; flex-direction: column; padding: .7rem .7rem 0;
  padding-top: calc(.7rem + env(safe-area-inset-top));
}
#guide { z-index: 4300; }
.cl-head { flex: 0 0 auto; }

.cl-filters, .cl-guides { flex: 0 0 auto; display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .5rem; }
.cl-chip {
  flex: 0 0 auto; font: inherit; font-size: .8rem; padding: .3rem .6rem;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; white-space: nowrap;
}
.cl-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cl-guide {
  flex: 0 0 auto; font: inherit; font-size: .82rem; padding: .35rem .7rem;
  border: 1px dashed var(--accent); background: var(--card); color: var(--accent);
  border-radius: 999px; white-space: nowrap; display: flex; align-items: center; gap: .35rem;
}
.cl-guide small { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }

.cl-body { flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overflow-y: auto; display: flex; flex-direction: column; gap: .4rem; }
.cl-item {
  display: flex; align-items: flex-start; gap: .55rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .5rem .55rem;
}
.cl-item.done { opacity: .55; }
.cl-item.skipped { opacity: .5; border-style: dashed; }
.cl-item.done .cl-title, .cl-item.skipped .cl-title { text-decoration: line-through; }

.cl-check { flex: 0 0 auto; position: relative; display: block; padding: .1rem; cursor: pointer; }
.cl-check input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.cl-box {
  display: grid; place-items: center; width: 26px; height: 26px;
  border: 2px solid var(--line); border-radius: 7px; color: transparent; font-size: .9rem;
}
.cl-check input:checked + .cl-box { background: var(--ok); border-color: var(--ok); color: #fff; }
.cl-check input:focus-visible + .cl-box { outline: 2px solid var(--accent); outline-offset: 2px; }

.cl-main { flex: 1 1 auto; min-width: 0; }
.cl-title { font-size: .95rem; }
.cl-note { font-size: .8rem; color: var(--muted); margin-top: .12rem; }
.cl-tag {
  display: inline-block; margin-top: .25rem; font-size: .66rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: .05rem .4rem;
}
.cl-tag.skip { color: var(--accent-2); border-color: var(--accent-2); }
.cl-actions { flex: 0 0 auto; display: flex; align-items: center; gap: .15rem; }
.cl-actions button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: .85rem;
}
.cl-del { color: var(--accent-2) !important; }

.cl-add {
  flex: 0 0 auto; display: flex; gap: .35rem; padding: .55rem 0;
  padding-bottom: calc(.9rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}
.cl-add select, .cl-add input {
  font: inherit; font-size: .9rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--ink); padding: .45rem .5rem;
}
.cl-add select { flex: 0 0 auto; max-width: 8.5rem; }
.cl-add input { flex: 1 1 auto; min-width: 0; }
.cl-add button {
  flex: 0 0 auto; width: 2.7rem; font-size: 1.2rem; border: 0;
  border-radius: 10px; background: var(--accent); color: #fff;
}
.cl-foot { font-size: .72rem; color: var(--muted); padding: 0 .1rem .25rem; }

/* ---------- οδηγός ραφιού ---------- */
.g-body { flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(3.5rem + env(safe-area-inset-bottom)); }
.g-sub { font-size: .88rem; color: var(--muted); margin-bottom: .9rem; }
.g-h {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 1.1rem 0 .5rem; display: flex; align-items: center; gap: .6rem;
}
.g-h::after { content: ''; flex: 1; height: 1px; background: var(--line); order: 1; }

.g-decoder { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.g-drow {
  display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr; gap: .5rem;
  padding: .45rem .6rem; background: var(--card); border-bottom: 1px solid var(--line);
}
.g-drow:last-child { border-bottom: 0; }
.g-dpt { font-weight: 700; font-size: .88rem; }
.g-dpt.good { color: var(--ok); }
.g-den { font-size: .82rem; color: var(--muted); }
@media (max-width: 26rem) { .g-drow { grid-template-columns: 1fr; gap: .05rem; } }

.g-items { display: flex; flex-direction: column; gap: .45rem; }
.g-item {
  display: flex; gap: .6rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .65rem;
}
.g-item.star { border-left: 4px solid var(--accent-2); }
.g-item-main { flex: 1 1 auto; min-width: 0; }
.g-pt { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.g-alt { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: none; }
.g-el { font-size: .9rem; font-weight: 600; color: var(--accent); margin-top: .1rem; }
.g-en { font-weight: 400; color: var(--muted); }
.g-note { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.g-star {
  display: inline-block; margin-top: .3rem; font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2);
}
/* Fixed width, or the widest price pill ("1,50–3 €") pushes its row's box out
   of line with the rest and the column of ticks reads as crooked. */
.g-item-side {
  flex: 0 0 4.6rem; width: 4.6rem;
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
}
.g-price {
  font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .12rem .35rem; white-space: nowrap;
}
.g-check { margin: 0; }
.g-check .cl-box { width: 30px; height: 30px; }
.g-item.got { opacity: .55; }
.g-item.got .g-pt { text-decoration: line-through; }
.g-tally {
  flex: 0 0 auto; order: 2; font-size: .7rem; font-weight: 700; letter-spacing: 0; text-transform: none;
  font-variant-numeric: tabular-nums; background: var(--accent); color: #fff;
  border-radius: 999px; padding: .1rem .45rem;
}
.g-legend { font-size: .76rem; color: var(--muted); margin: -.2rem 0 .55rem; }

.g-rules { display: flex; flex-direction: column; gap: .45rem; }
.g-rule { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: baseline; font-size: .86rem; }
.g-rule b { color: var(--accent-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- τίτλοι τέλους (easter egg κάτω από τα tabs) ---------- */
#credits { position: fixed; inset: 0; z-index: 5000; background: #0b0f14; color: #f2efe9; overflow: hidden; }
.cr-sky { position: absolute; inset: 0; overflow: hidden; }
.cr-heart { position: absolute; bottom: -8%; opacity: 0; animation: crfloat 9s linear infinite; }
@keyframes crfloat {
  0% { transform: translateY(0) scale(.8); opacity: 0; }
  12% { opacity: .75; }
  85% { opacity: .35; }
  100% { transform: translateY(-115vh) scale(1.15); opacity: 0; }
}
.cr-close {
  position: absolute; top: calc(.6rem + env(safe-area-inset-top)); right: .7rem; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(242,239,233,.25);
  background: rgba(11,15,20,.6); color: #f2efe9; font-size: 1rem;
}
.cr-roll {
  position: relative; z-index: 1; height: 100%; overflow-y: auto; text-align: center;
  padding: 5vh 1.4rem calc(1.8rem + env(safe-area-inset-bottom));
  justify-content: center;
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  animation: crup 1.1s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes crup { from { transform: translateY(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.cr-mark { font-size: 2.3rem; line-height: 1; }
.cr-title { font-family: 'Delius Unicase', Georgia, serif; font-size: 1.9rem; margin: .3rem 0 0; letter-spacing: .02em; }
.cr-ed { font-size: .85rem; opacity: .6; font-style: italic; margin-bottom: 1.45rem; }
.cr-block { margin-bottom: .95rem; }
.cr-role {
  display: block; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; opacity: .5;
}
.cr-who { display: block; font-size: 1rem; font-weight: 600; margin-top: .14rem; }
.cr-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  margin: .9rem 0 1.3rem; max-width: 21.5rem;
}
.cr-stat {
  min-width: 4.4rem; padding: .42rem .3rem; border: 1px solid rgba(242,239,233,.16); border-radius: 12px;
}
.cr-stat b { display: block; font-size: 1.18rem; font-variant-numeric: tabular-nums; }
.cr-stat span { font-size: .6rem; opacity: .6; }
.cr-love { font-size: .97rem; line-height: 1.58; margin-bottom: .5rem; }
.cr-fine { font-size: .66rem; opacity: .42; line-height: 1.55; margin: 0; }
.cr-pop {
  position: fixed; z-index: 3; pointer-events: none; font-size: 1.15rem;
  transform: translate(-50%, -50%); animation: crpop .95s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes crpop {
  0% { transform: translate(-50%, -50%) scale(.35); opacity: 1; }
  70% { opacity: .95; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(25deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .cr-roll { animation: none; } .cr-pop { animation-duration: .01s; } }

/* ---------- λεξικό: η ίδια η λέξη ---------- */
#dict {
  position: fixed; inset: 0; z-index: 4200; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; padding: .7rem .7rem 0;
  padding-top: calc(.7rem + env(safe-area-inset-top));
}
.dict-head { flex: 0 0 auto; }
.dict-body { flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
.dict-entry {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1rem 1.3rem; max-width: 34rem; margin: 0 auto;
}
.dict-word {
  font-family: 'Delius Unicase', Georgia, serif; font-size: 2rem; margin: 0;
  letter-spacing: .01em; color: var(--accent);
}
.dict-say { font-size: .85rem; color: var(--muted); margin: .15rem 0 1rem; }
.dict-def { font-size: .95rem; line-height: 1.65; margin: 0 0 .8rem; }
.dict-n { font-weight: 700; color: var(--accent-2); margin-right: .3rem; }
.dict-lab {
  font-size: .62rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin: 1.1rem 0 .4rem;
}
.dict-list { margin: 0 0 .8rem; padding-left: 1.1rem; }
.dict-list li { font-size: .9rem; line-height: 1.6; margin-bottom: .3rem; }
.dict-ex {
  font-size: .95rem; font-style: italic; line-height: 1.6; margin: 0 0 .8rem;
  border-left: 3px solid var(--accent); padding-left: .7rem; color: var(--ink);
}
.dict-cred { font-size: .74rem; color: var(--muted); font-style: italic; margin: 1.4rem 0 0; }
/* Sits as one more card in the settings flex column, which already spaces its
   children — the group's own bottom margin would double the gap. */
.settings-refresh { margin: 0; }

/* ---------- τα ψιλά γράμματα ---------- */
.cr-nerd {
  font: inherit; font-size: .78rem; color: #f2efe9; background: rgba(242,239,233,.08);
  border: 1px solid rgba(242,239,233,.28); border-radius: 999px;
  padding: .45rem 1rem; margin: 1.25rem 0 1rem;
}
#nerd {
  position: fixed; inset: 0; z-index: 5100; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; padding: .7rem 0 0;
  padding-top: calc(.7rem + env(safe-area-inset-top));
}
.nerd-head { flex: 0 0 auto; }
/* Generous tail: the last line sat under the home indicator on an installed
   PWA, and a trailing margin is not always counted in scrollable overflow. */
.nerd-body {
  flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch;
  overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  /* Full-width scroller, content centred by padding. A 34rem-wide box with
     auto margins leaves dead gutters on an iPad: touching them scrolls
     nothing, and iOS then swallows the next gesture until you tap. */
  width: 100%; max-width: none; margin: 0;
  padding-left: max(0px, calc((100% - 34rem) / 2));
  padding-right: max(0px, calc((100% - 34rem) / 2));
}
.nerd-body::after { content: ''; display: block; height: 1px; }
.nerd-intro { font-size: .95rem; line-height: 1.65; margin-bottom: 1rem; }
.nerd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-bottom: .5rem; }
@media (max-width: 24rem) { .nerd-grid { grid-template-columns: repeat(2, 1fr); } }
.nerd-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: .5rem .3rem; text-align: center;
}
.nerd-stat b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.nerd-stat span { font-size: .6rem; color: var(--muted); }
.nerd-h {
  font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 1.4rem 0 .5rem; display: flex; align-items: center; gap: .6rem;
}
.nerd-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.nerd-line { font-size: .92rem; line-height: 1.65; margin-bottom: .5rem; }
.nerd-chart {
  display: flex; align-items: flex-end; gap: 2px; height: 110px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .5rem 1.1rem;
}
.nerd-bar { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; }
.nerd-fill { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 0; }
.nerd-bar.night .nerd-fill { background: var(--accent-2); }
.nerd-bar em {
  position: absolute; bottom: -1rem; left: 50%; transform: translateX(-50%);
  font-size: .55rem; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums;
}
.nerd-cap { font-size: .68rem; color: var(--muted); margin: .35rem 0 0; }
.nerd-fine { font-size: .7rem; color: var(--muted); font-style: italic; margin: 1.6rem 0 0; padding-bottom: .5rem; }

/* ---------- τέλος ταξιδιού ---------- */
#retro {
  position: fixed; inset: 0; z-index: 4200; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; padding: .7rem 0 0;
  padding-top: calc(.7rem + env(safe-area-inset-top));
}
.retro-body {
  flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch;
  overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  /* Full-width scroller, content centred by padding. A 34rem-wide box with
     auto margins leaves dead gutters on an iPad: touching them scrolls
     nothing, and iOS then swallows the next gesture until you tap. */
  width: 100%; max-width: none; margin: 0;
  padding-left: max(0px, calc((100% - 34rem) / 2));
  padding-right: max(0px, calc((100% - 34rem) / 2));
}
.retro-tabs { display: flex; gap: .4rem; margin-bottom: .6rem; }
.retro-tab {
  flex: 1; font: inherit; font-size: .82rem; padding: .5rem .4rem;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 12px;
}
.retro-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.retro-sub { font-size: .84rem; color: var(--muted); line-height: 1.55; margin-bottom: .7rem; }
.retro-prog { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.retro-prog span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.retro-progtxt { font-size: .74rem; color: var(--muted); margin: .3rem 0 1rem; font-variant-numeric: tabular-nums; }

.retro-q {
  display: flex; gap: .6rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .8rem .75rem; margin-bottom: .6rem;
}
.retro-q.done { border-left: 4px solid var(--ok); }
.retro-n {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--bg);
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; color: var(--muted);
}
.retro-main { flex: 1 1 auto; min-width: 0; }
.retro-prompt { font-size: .98rem; font-weight: 600; line-height: 1.4; }
.retro-hint { font-size: .76rem; color: var(--muted); margin-top: .15rem; }

.retro-opts { display: flex; flex-direction: column; gap: .3rem; margin-top: .6rem; }
.retro-opt {
  font: inherit; font-size: .86rem; text-align: left; padding: .45rem .6rem;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px;
}
.retro-opt.mine { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.retro-scale { display: flex; gap: .35rem; margin-top: .6rem; }
.retro-num {
  flex: 1; font: inherit; font-size: 1rem; padding: .5rem 0; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.retro-num.mine { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700; }
.retro-text { display: flex; gap: .35rem; margin-top: .6rem; align-items: flex-end; }
.retro-ta {
  flex: 1; font: inherit; font-size: .9rem; resize: none; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: .45rem .55rem;
}
.retro-save {
  flex: 0 0 auto; font: inherit; font-size: .78rem; padding: .5rem .7rem; border: 0;
  border-radius: 10px; background: var(--accent); color: #fff;
}
.retro-sealed {
  margin-top: .6rem; font-size: .76rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 10px; padding: .4rem .55rem;
}
.retro-said { margin-top: .7rem; display: flex; flex-direction: column; gap: .45rem; }
.retro-say { font-size: .86rem; line-height: 1.45; }
.retro-say b { display: block; font-size: .74rem; color: var(--muted); }
.retro-tally { margin-top: .7rem; display: flex; flex-direction: column; gap: .3rem; }
.retro-bar {
  position: relative; display: flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); border-radius: 8px; padding: .3rem .45rem; overflow: hidden;
}
.retro-bar-f {
  position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); opacity: .16; z-index: 0;
}
.retro-bar.win .retro-bar-f { background: var(--ok); opacity: .28; }
.retro-bar-l { position: relative; z-index: 1; flex: 1; font-size: .82rem; }
.retro-bar-n { position: relative; z-index: 1; font-size: .82rem; }
.retro-foot { font-size: .72rem; color: var(--muted); font-style: italic; margin-top: .8rem; }
.nerd-share {
  display: block; width: 100%; margin: 1.6rem 0 .4rem; padding: .6rem; font: inherit; font-size: .9rem;
  border: 1px solid var(--accent); border-radius: var(--radius); background: var(--card); color: var(--accent);
}
.nerd-fleet { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .6rem; }
.nerd-fl {
  display: flex; justify-content: space-between; align-items: baseline; gap: .6rem;
  font-size: .85rem; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: .35rem .55rem;
}
.nerd-fl b { font-variant-numeric: tabular-nums; }

/* ---------- επισκέψεις ---------- */
#stats {
  position: fixed; inset: 0; z-index: 4200; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; padding: .7rem 0 0;
  padding-top: calc(.7rem + env(safe-area-inset-top));
}
.stats-body {
  flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch;
  overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  /* Full-width scroller, content centred by padding. A 34rem-wide box with
     auto margins leaves dead gutters on an iPad: touching them scrolls
     nothing, and iOS then swallows the next gesture until you tap. */
  width: 100%; max-width: none; margin: 0;
  padding-left: max(0px, calc((100% - 34rem) / 2));
  padding-right: max(0px, calc((100% - 34rem) / 2));
}
.st-seg { display: flex; gap: .35rem; margin-bottom: .8rem; }
.st-seg-b {
  flex: 1; font: inherit; font-size: .8rem; padding: .45rem .3rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.st-seg-b.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.st-rows { display: flex; flex-direction: column; gap: .3rem; }
.st-row {
  display: flex; align-items: baseline; gap: .5rem; font-size: .85rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .4rem .55rem;
}
.st-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-row span small { color: var(--muted); font-size: .7rem; }
.st-row b { font-variant-numeric: tabular-nums; }
.st-row i { font-style: normal; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
#statd {
  position: fixed; inset: 0; z-index: 4300; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; padding: .7rem 0 0;
  padding-top: calc(.7rem + env(safe-area-inset-top));
}
.st-row.tap { cursor: pointer; }
.st-row.tap:active { background: var(--bg); }
.st-row em { font-style: normal; color: var(--muted); flex: 0 0 auto; }
.st-cf {
  display: flex; align-items: center; justify-content: center; gap: .45rem; flex-wrap: wrap;
  margin: 1.6rem 0 .2rem; padding: .65rem; font-size: .9rem; text-decoration: none;
  border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--card); color: var(--accent);
}
.st-cf small { color: var(--muted); font-size: .7rem; }
.st-cf:active { background: var(--bg); }
.st-cf { justify-content: space-between; text-align: left; }
.st-cf-t { flex: 1; min-width: 0; }
.st-cf-copy {
  flex: 0 0 auto; font: inherit; font-size: .95rem; line-height: 1;
  padding: .35rem .5rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.st-cf-copy:active { background: var(--accent); color: #fff; border-color: var(--accent); }
#stst {
  position: fixed; inset: 0; z-index: 4300; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; padding: .7rem 0 0;
  padding-top: calc(.7rem + env(safe-area-inset-top));
}
.st-story {
  display: block; width: 100%; margin: 0 0 .8rem; padding: .7rem; font: inherit; font-size: .92rem;
  border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; text-align: left;
}
.st-story small { display: block; opacity: .85; font-size: .7rem; margin-top: .1rem; }
/* The keepsake report sits under the story's: same block, quieter colour, so
   the two read as a pair rather than two shouts. */
.st-story.alt { background: var(--card); color: var(--accent); border: 1px solid var(--accent); }
/* The laptop dashboard: a link styled as the same block, ink on card, so the
   three read as one stack — full page, story, keepsake. */
a.st-story.full { text-decoration: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
a.st-story.full small { color: var(--muted); opacity: 1; }
.st-story.alt small { color: var(--muted); opacity: 1; }
#stks {
  position: fixed; inset: 0; z-index: 4300; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; padding: .7rem 0 0;
  padding-top: calc(.7rem + env(safe-area-inset-top));
}
/* Leads: strangers asking for a trip. Accent border so a new one is the
   first thing the eye lands on when the dashboard opens. */
.st-leads .st-row { border-color: var(--accent); }
.st-leads .st-row span { white-space: normal; }
.st-leads .st-row.answered { border-color: var(--line); opacity: .6; }
.nerd-h small { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }

/* The overlays' side padding moved onto the scroller, so their headers need
   their own inset — and the same centring, so the ‹ Πίσω lines up. */
#stats > .page-head, #statd > .page-head, #stst > .page-head, #stks > .page-head,
#nerd > .page-head, #retro > .page-head {
  padding-left: max(.7rem, calc((100% - 34rem) / 2));
  padding-right: max(.7rem, calc((100% - 34rem) / 2));
}
.ptr {
  height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: .74rem; color: var(--muted); transition: height .18s ease;
}

/* The demo's "not here" panel — Επισκέψεις is the one section a sandbox
   cannot honestly show, so it explains itself instead of rendering empty. */
.demo-note { padding: 18px 16px; line-height: 1.5; }
.demo-note p { margin: 0 0 12px; }
.demo-note .muted { color: var(--muted, #6b7280); font-size: 0.92em; }

/* the veil while a demo switches — over everything, including the sheet */
#demo-switching {
  position: fixed; inset: 0;
  z-index: 5000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.4rem;
  padding: 2rem;
  text-align: center;
  background: var(--bg);
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.2s ease;
}
#demo-switching.on { opacity: 1; }
#demo-switching .emoji { font-size: 3.2rem; animation: demo-bob 1.2s ease-in-out infinite; }
#demo-switching h2 { margin: 0.4rem 0 0; font-size: 1.3rem; }
#demo-switching p { margin: 0; color: var(--muted); }
@keyframes demo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { #demo-switching .emoji { animation: none; } }

/* ---------- the tour (three cards on first opening) ---------- */
#intro {
  position: fixed; inset: 0; z-index: 3200;
  background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
}
#intro .intro-body {
  width: 100%; max-width: 480px;
  background: var(--card); color: var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 0 calc(.9rem + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
}
@media (min-width: 600px) {
  #intro { align-items: center; }
  #intro .intro-body { border-radius: var(--radius); }
}
#intro .intro-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
#intro .intro-track::-webkit-scrollbar { display: none; }
#intro .intro-card {
  flex: 0 0 100%; scroll-snap-align: start; box-sizing: border-box;
  padding: .4rem 1.4rem .6rem; text-align: center; min-height: 12.5rem;
}
#intro .intro-icon { font-size: 2.6rem; line-height: 1; margin-bottom: .5rem; }
#intro h3 { margin: 0 0 .4rem; font-size: 1.15rem; text-wrap: balance; }
#intro p { margin: 0 auto; max-width: 30rem; color: var(--muted); line-height: 1.45; }
#intro .intro-dots { display: flex; justify-content: center; gap: .4rem; margin: .5rem 0 .8rem; }
#intro .intro-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; }
#intro .intro-dots i.on { background: var(--accent); transform: scale(1.25); }
#intro .intro-row { display: flex; gap: .5rem; padding: 0 1rem; }
#intro .intro-row button {
  flex: 1; padding: .8rem; font-size: 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
#intro .intro-skip { flex: 0 0 34%; color: var(--muted); border-style: dashed; }
#intro .intro-next { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { #intro .intro-track { scroll-behavior: auto; } #intro .intro-dots i { transition: none; } }
