/* =========================================================================
   Où est le poulet — v2.0 "Dusk" design system
   =========================================================================
   One idea: hide-and-seek happens at dusk. The chrome is warm near-black so
   the bright OSM map reads as the single hero surface; every floating control
   shares one dark-glass treatment; there is exactly one button language with
   four variants (primary / secondary / ghost / danger) and one display face
   (Fredoka — self-hosted, so the "no third-party requests" privacy stance
   holds and the SW can cache it).

   Tokens first. Change these, change everything.
   ========================================================================= */

@font-face {
  font-family: 'Fredoka';
  src: url('/vendor/fonts/fredoka.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* -- colour: warm charcoal scale + brand rouge + gold ------------------ */
  --ink-950: #16120f;                  /* app background            */
  --ink-900: #1f1a15;                  /* cards, tray, modals       */
  --ink-800: #2a231c;                  /* inputs, secondary buttons */
  --ink-700: #382e25;                  /* pressed / hover raised    */
  --line:        rgba(246,239,227,.09);
  --line-strong: rgba(246,239,227,.17);
  --text:  #f6efe3;
  --dim:   #b9aa97;
  --faint: #857868;

  --rouge:       #d94f5e;              /* brand action red (lifted for dark) */
  --rouge-press: #b23a48;              /* original brand rouge = pressed     */
  --rouge-soft:  rgba(217,79,94,.16);
  --gold:      #f2b134;
  --gold-soft: rgba(242,177,52,.14);
  --green:  #3f9d5d;
  --danger: #8c2f3a;                   /* deep wine — destructive fill */

  --cold: #4363d8;
  --cool: #42d4f4;
  --warm: #f2b134;
  --hot:  #d94f5e;

  --glass: rgba(20,16,13,.82);         /* every floating map control */

  /* -- shape + depth ----------------------------------------------------- */
  --r-s: 10px;  --r-m: 14px;  --r-l: 22px;  --r-pill: 999px;
  --shadow-1: 0 2px 10px rgba(0,0,0,.35);
  --shadow-2: 0 12px 40px rgba(0,0,0,.55);

  /* -- type -------------------------------------------------------------- */
  --f-display: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, Menlo, monospace;

  /* -- layout ------------------------------------------------------------ */
  /* Tray height. Floor must clear the tallest state's content — headline +
     copy + setup steps (or scoreboard) + big button + tools + gaps + padding
     measures ~215px — else #panel-mid (the only flexible row) clips the
     headline. (v2.0.1: floor raised from 196px, which clipped on phones
     where 25vh resolved low.) */
  --panel-h: clamp(226px, 27vh, 248px);
  --panel-clearance: calc(var(--panel-h) + env(safe-area-inset-bottom));
}
/* v2.3: the kitty bar adds a row to the tray — grow the token, and every
   tray-anchored control (recentre, toast, POI chip) rides up with it. */
body.kitty-on { --panel-h: clamp(262px, 31vh, 284px); }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--f-body);
  background: var(--ink-950);
  color: var(--text);
  overflow-x: hidden;
}
.hidden { display: none !important; }
.screen { min-height: 100%; }

/* -- motion primitives (display:none → shown restarts these for free) ---- */
@keyframes rise-in  { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade-in  { from { opacity: 0; } }
@keyframes pop-in   { from { opacity: 0; transform: scale(.94) translateY(8px); } }
@keyframes drop-in  { from { opacity: 0; transform: translateY(-12px); } }
@keyframes pulse    { 50% { opacity: .6; } }
@keyframes zone-flash { 0%,100% { opacity: 1; } 25%,75% { opacity: .25; } 50% { opacity: 1; } }

/* =========================================================================
   Landing flow (welcome / create-name / join-code / join-name)
   ========================================================================= */
#screen-welcome, #screen-create-name, #screen-join-code, #screen-join-name {
  overflow-y: auto;
  animation: rise-in .3s ease both;
  background:
    radial-gradient(140% 46% at 50% -6%, var(--gold-soft), transparent 70%),
    var(--ink-950);
}
.card-inner {
  max-width: 420px;
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  min-height: 100%;
  display: flex; flex-direction: column;
  position: relative;
}
h1 {
  font-family: var(--f-display);
  font-size: 2.7rem; line-height: 1.04; font-weight: 600;
  color: var(--text); text-align: center; margin-top: 8px;
  letter-spacing: .01em;
}
h1 .chick {
  font-size: 4rem; display: inline-block; margin-bottom: 10px;
  filter: drop-shadow(0 6px 24px rgba(242,177,52,.45));
  animation: chick-bob 3.2s ease-in-out infinite;
}
@keyframes chick-bob { 0%,100% { transform: translateY(0) rotate(-3deg); }
                       50%     { transform: translateY(-6px) rotate(3deg); } }
h2 {
  font-family: var(--f-display);
  font-size: 1.6rem; font-weight: 600; color: var(--text); margin-bottom: 8px;
}
.pitch, .subtle { color: var(--dim); line-height: 1.55; margin: 16px 0 26px; }
.subtle { margin: 4px 0 22px; font-size: .95rem; }
.pitch { text-align: center; }
.welcome-foot {
  margin-top: auto; padding-top: 32px;
  font-size: .78rem; color: var(--faint); line-height: 1.5; text-align: center;
}
.step {
  font-size: .74rem; font-weight: 800; letter-spacing: .14em;
  color: var(--faint); text-transform: uppercase; margin: 26px 0 4px;
}
.back {
  background: none; border: none; color: var(--dim);
  font-weight: 700; font-size: 1rem; padding: 8px 0;
  align-self: flex-start; cursor: pointer;
}
.back:active { color: var(--text); }
.rejoin { margin-bottom: 18px; }
.rejoin button {
  width: 100%; padding: 14px; border: 1.5px dashed var(--gold); border-radius: var(--r-m);
  background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: .95rem;
  cursor: pointer; font-family: var(--f-body);
}
/* v2.3.1: backgrounded-session chip. Fixed at the top of the viewport,
   sits above the landing screens' card. Hidden on the game screen (see
   showScreen). Kept subtle — it's a nudge, not a call-to-action. */
.bg-chip {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px;
  z-index: 2200;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-pill);
  background: var(--glass); color: var(--text);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-2);
  font-family: var(--f-body); font-size: .88rem; font-weight: 600;
  cursor: pointer; text-align: left;
}
.bg-chip .bg-ico { font-size: 1.05rem; }
.bg-chip b { color: var(--gold); font-weight: 700; }
.bg-chip:active { background: var(--ink-800); }
.field { display: block; margin-bottom: 16px; }
.field input {
  width: 100%; padding: 15px 14px; font-size: 1.05rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-m);
  background: var(--ink-800); color: var(--text); outline: none;
  caret-color: var(--rouge);
}
.field input::placeholder { color: var(--faint); }
.field input:focus { border-color: var(--rouge); }
#input-join-code {
  font-family: var(--f-display); text-transform: uppercase;
  letter-spacing: .32em; font-weight: 600; font-size: 1.5rem; text-align: center;
}
.error { margin-top: 12px; color: #ff8d84; font-weight: 600; }

/* =========================================================================
   Buttons — ONE system. Variants: primary / secondary / ghost / danger.
   Sizes: default / big / mini. Min tap height 44px on all defaults.
   ========================================================================= */
.btn {
  font-family: var(--f-body);
  padding: 11px 18px; min-height: 44px;
  font-size: 1rem; font-weight: 700;
  border-radius: var(--r-m); border: none; cursor: pointer;
  background: var(--ink-800); color: var(--text);          /* secondary = default */
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: transform .08s ease, background-color .15s ease, opacity .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(.97); background: var(--ink-700); }
.btn.big  { padding: 15px 18px; font-size: 1.06rem; width: 100%; border-radius: 16px; }
.btn.full { width: 100%; }
.btn.mini { padding: 8px 12px; min-height: 38px; font-size: .88rem; border-radius: var(--r-s); }
.btn.big + .btn.big { margin-top: 12px; }

.btn.primary {
  background: var(--rouge); color: #fff; box-shadow: 0 4px 18px rgba(217,79,94,.35);
}
.btn.primary:active { background: var(--rouge-press); }
.btn.danger {
  background: var(--danger); color: #ffd9d4; box-shadow: inset 0 0 0 1px rgba(255,141,132,.25);
}
.btn.danger:active { background: #75242e; }
.btn.ghost {
  background: transparent; box-shadow: none; color: var(--dim); font-weight: 600;
}
.btn.ghost:active { background: var(--ink-800); }
.btn:disabled, .btn.primary:disabled {
  background: var(--ink-800); color: var(--faint);
  box-shadow: inset 0 0 0 1px var(--line); cursor: default; transform: none;
}

/* =========================================================================
   Game screen — the map is the hero; chrome floats in one glass language
   ========================================================================= */
#screen-game {
  display: flex; flex-direction: column;
  position: relative; height: 100%;
  background: var(--ink-950);
  padding-top: env(safe-area-inset-top);
}
#map { flex: 1; z-index: 1; background: #262019; min-height: 0; }
#map.drawing { cursor: crosshair; }

/* One glass recipe for every floating control */
.glass, #map-status, #top-actions button, #btn-recentre {
  background: var(--glass); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  border: none;
}

/* Top-left: the game code chip (tap = copy invite link). Identity only —
   phase status lives in the tray headline where it has room to breathe. */
#map-status {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px;
  z-index: 1100; height: 44px; padding: 0 14px 0 10px; border-radius: var(--r-pill);
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  animation: drop-in .3s ease both;
}
#map-status .chick-sm { font-size: 1.15rem; }
#ms-code {
  font-family: var(--f-display); font-weight: 600;
  letter-spacing: .18em; font-size: .95rem; transform: translateY(.5px);
}

/* Top-right: [Invite] (lobby only) + [players count]. Two controls max. */
#top-actions {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px;
  z-index: 1100; display: flex; gap: 8px; align-items: center;
  animation: drop-in .3s ease both;
}
#top-actions button {
  height: 44px; min-width: 44px; padding: 0 14px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: var(--r-pill); cursor: pointer;
  font-family: var(--f-body); font-weight: 700; font-size: .92rem;
}
#top-actions button:active { background: rgba(43,35,28,.95); }
#top-actions .ico { width: 17px; height: 17px; }
/* v2.3.1 — unread badge on the top-right activity button. iOS-style pill
   riding on the top-right corner of the button. Hidden entirely when count
   is 0 so the button doesn't wear an empty bubble. */
#btn-top-activity { position: relative; }
.unread-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--rouge); color: #fff;
  font-family: var(--f-body); font-weight: 800; font-size: .72rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--ink-950);
  pointer-events: none;
}
/* v2.3.1 — the poulet's shout button (top-right cluster). Same glass
   language as its neighbours; only visible when the host has enabled
   broadcasts and I'm the poulet in-game. */
#btn-top-broadcast .ico { width: 18px; height: 18px; }

.ico { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em; }

#btn-recentre {
  position: absolute; z-index: 1100;
  width: 46px; height: 46px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  bottom: calc(14px + var(--panel-h) + env(safe-area-inset-bottom));
  right: 12px;
}
#btn-recentre:active { transform: scale(.94); }
#btn-recentre .ico { width: 21px; height: 21px; }

/* Poulet status ribbon + seeker warmth bar — same shape, semantic colours */
#poulet-banner, #warmth-bar {
  position: absolute; top: calc(64px + env(safe-area-inset-top)); left: 12px; right: 12px;
  z-index: 1100; padding: 10px 14px; border-radius: var(--r-m); text-align: center;
  font-weight: 800; font-size: .92rem; color: #fff;
  box-shadow: var(--shadow-1); animation: drop-in .25s ease both;
}
#poulet-banner { background: var(--green); }
#poulet-banner.out { background: #b3261e; animation: pulse 1s infinite; }
#warmth-bar { letter-spacing: .05em; }
#warmth-bar.cold { background: var(--cold); }
#warmth-bar.cool { background: var(--cool); color: #10303a; }
#warmth-bar.warm { background: var(--warm); color: #3d2c05; }
#warmth-bar.hot  { background: var(--hot);  animation: pulse 1s infinite; }

#toast {
  position: absolute; bottom: calc(14px + var(--panel-clearance)); left: 50%;
  transform: translateX(-50%); z-index: 1300;
  background: var(--ink-800); color: var(--text); padding: 11px 16px;
  border-radius: var(--r-m); font-weight: 600; font-size: .92rem;
  max-width: 88%; text-align: center;
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-strong);
  animation: toast-in .25s ease both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
/* v2.3.4: the persistent-notification variant — lingers 60 s, tap to
   dismiss. Cursor + a subtle glass hint so the affordance is discoverable
   without shouting "close ✕" over the content. Padded right for a small
   ✕ pseudo-element hint. */
#toast.toast-notify {
  cursor: pointer;
  padding-right: 34px;
  position: absolute;
}
#toast.toast-notify::after {
  content: "✕";
  position: absolute;
  right: 12px; top: 50%; transform: translateY(-50%);
  font-size: .82rem; font-weight: 700; opacity: .55;
}

/* Drawing mode — full-width glass drawbar at the top */
#drawbar {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px;
  z-index: 1100; border-radius: var(--r-l); padding: 14px 14px 12px;
  background: var(--glass); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  animation: drop-in .3s ease both;
}
#drawbar-text {
  display: block; font-family: var(--f-display); font-weight: 600;
  margin-bottom: 2px; font-size: 1rem;
}
#drawbar-hint {
  display: block; font-weight: 500; font-size: .78rem; color: var(--dim);
  margin-top: 2px;
}
.drawbar-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.drawbar-buttons .btn { flex: 1 1 auto; min-width: 64px; }

/* Numbered draft-vertex dots — instant feedback for every tap */
.vertex-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--rouge); border: 2.5px solid #fff;
  color: #fff; font-size: .7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 6px rgba(0,0,0,.45);
  cursor: grab;
}
.zone-flash { animation: zone-flash .7s ease; }

/* =========================================================================
   Bottom tray — fixed height; headline + copy + (host lobby) setup steps +
   one primary action + tools. The only opaque chrome on the game screen.
   ========================================================================= */
#panel {
  background: var(--ink-900);
  border-radius: var(--r-l) var(--r-l) 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,.45), inset 0 1px 0 var(--line);
  padding: 12px 16px calc(10px + env(safe-area-inset-bottom));
  z-index: 1200; flex: none;
  /* min-height (not height) — safety net so oversized text (Dynamic Type,
     long timer strings) grows the tray instead of clipping the headline. */
  min-height: calc(var(--panel-h) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
  animation: rise-in .3s ease both;
}

#panel-mid {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  text-align: center;
}
#panel-title {
  font-family: var(--f-display); font-weight: 600;
  font-size: 1.22rem; line-height: 1.2; color: var(--text);
  animation: rise-in .25s ease both;
}
#panel-title .timer {
  font-variant-numeric: tabular-nums; color: var(--gold); letter-spacing: .03em;
}
#panel-title .timer.urgent { color: var(--rouge); animation: pulse 1s infinite; }
#panel-copy {
  margin: 0; font-size: .86rem; color: var(--dim); line-height: 1.35; padding: 0 4px;
}
#panel-copy b { color: var(--text); font-weight: 700; }
#scoreboard {
  align-self: center; padding: 4px 12px; margin-bottom: 2px;
  background: var(--gold-soft); border-radius: var(--r-pill);
  font-size: .78rem; font-weight: 700; color: var(--gold); flex: none;
}
#scoreboard b { color: var(--gold); }

/* Host-lobby setup steps: 1 Zone · 2 Options · 3 Roles. Tappable shortcuts;
   the highlighted chip always matches what the primary button offers. */
#setup-steps { display: flex; gap: 6px; flex: none; }
.step-chip {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 4px 4px; border-radius: var(--r-pill);
  border: none; background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--faint); font-family: var(--f-body);
  font-weight: 700; font-size: .8rem; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.step-chip .n {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--ink-700); color: var(--dim);
  display: flex; align-items: center; justify-content: center;
  font-size: .66rem; font-weight: 800;
}
.step-chip.done { color: var(--dim); background: var(--ink-800); box-shadow: none; }
.step-chip.done .n { background: var(--green); color: #fff; }
.step-chip.next {
  color: var(--text); box-shadow: inset 0 0 0 1.5px var(--rouge);
}
.step-chip.next .n { background: var(--rouge); color: #fff; }

#primary-action { flex: none; }

/* =========================================================================
   v2.3 — chicken kitty bar. Top row of the tray: always on screen for every
   player, never over the map. One row: 🍻 · depleting track · $ left ·
   (+ Drink, poulet/finders only). Colour states green → amber → red → dry
   live on the row and tint fill + amount together.
   ========================================================================= */
#kitty-row {
  flex: none; display: flex; align-items: center; gap: 10px;
  min-height: 30px; padding: 2px 2px 6px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  animation: rise-in .25s ease both;
}
.kitty-ico { font-size: 1rem; flex: none; }
.kitty-track {
  flex: 1; height: 10px; border-radius: var(--r-pill);
  background: var(--ink-800);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
#kitty-fill {
  height: 100%; border-radius: var(--r-pill);
  transition: width .45s cubic-bezier(.2,.8,.3,1), background-color .3s ease;
}
#kitty-row.green #kitty-fill { background: var(--green); }
#kitty-row.amber #kitty-fill { background: var(--gold); }
#kitty-row.red   #kitty-fill { background: var(--rouge); }
#kitty-row.dry   .kitty-track { box-shadow: inset 0 0 0 1.5px rgba(217,79,94,.55); }
#kitty-amount {
  flex: none; font-family: var(--f-display); font-weight: 600;
  font-size: .92rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
#kitty-row.green #kitty-amount { color: #7fc795; }
#kitty-row.amber #kitty-amount { color: var(--gold); }
#kitty-row.red   #kitty-amount { color: var(--rouge); }
#kitty-row.dry   #kitty-amount { color: var(--rouge); animation: pulse 1.4s infinite; }
#btn-kitty-drink {
  flex: none; border: none; cursor: pointer;
  padding: 4px 10px; min-height: 26px; border-radius: var(--r-pill);
  background: var(--rouge-soft); color: var(--rouge);
  font-family: var(--f-body); font-weight: 800; font-size: .74rem;
  box-shadow: inset 0 0 0 1px rgba(217,79,94,.4);
  white-space: nowrap;
}
#btn-kitty-drink:active { background: var(--rouge); color: #fff; }

/* Tools row: Settings · Instructions · Leave — one ghost treatment */
#panel-tools { display: flex; gap: 4px; flex: none; align-items: stretch; }
#panel-tools .btn {
  flex: 1; padding: 8px 4px; min-height: 40px; font-size: .84rem;
  white-space: nowrap;
}
#panel-tools .btn .ico { width: 1.1em; height: 1.1em; }
#panel-tools #btn-leave { color: #cf8d85; }

/* =========================================================================
   Modals — one card treatment (options / players / instructions / game-over
   / found / consent)
   ========================================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(10,8,6,.66);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade-in .2s ease both;
}
.overlay .card {
  background: var(--ink-900); border-radius: var(--r-l); padding: 22px 20px;
  max-width: 420px; width: 100%; text-align: center;
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-strong);
  max-height: 88vh; overflow-y: auto; position: relative;
  animation: pop-in .25s cubic-bezier(.2, .8, .3, 1.15) both;
}
/* v2.2.5: div.big, not .big — this is the emoji hero (🐔/📸/📍) sizing rule.
   The bare selector tied with .btn.big on specificity and, being later in the
   file, won: every `btn big` inside an overlay (location consent, take-a-photo)
   rendered its LABEL at 3rem — a button filling a third of the modal. Scoped
   to the div, the buttons fall back to the standard .btn.big pill (15px/1.06rem,
   same as "Create a game" / "Invite friends"). */
.overlay div.big { font-size: 3rem; }
.overlay h2 { margin: 8px 0 10px; }
.overlay p { line-height: 1.5; margin-bottom: 12px; color: var(--dim); }
.overlay p b { color: var(--text); }
.overlay .btn { width: 100%; margin-top: 8px; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; font-size: 1.3rem; color: var(--faint); cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:active { background: var(--ink-700); color: var(--text); }
/* v2.2.1: compact variant — quick one-note explainers (pubs & bars). Feels
   like a small sheet, not a takeover: narrower card, inline emoji title,
   single short paragraph, right-sized button. */
.overlay .card.compact { max-width: 300px; padding: 18px 18px 16px; }
.card.compact h2 { margin: 0 0 8px; font-size: 1.08rem; }
.card.compact p { font-size: .88rem; line-height: 1.45; margin-bottom: 2px; }
.card.compact .btn { margin-top: 14px; padding: 10px 14px; font-size: .95rem; }
.modal-title {
  font-family: var(--f-display); font-weight: 600; color: var(--text);
  font-size: 1.2rem; margin-bottom: 14px; text-align: left;
}

/* -- options modal ------------------------------------------------------- */
.opt-section {
  text-align: left; margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.opt-section:last-child { border-bottom: none; margin-bottom: 4px; padding-bottom: 0; }
.opt-label, .opt-field > span, .help-faq-title {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em;
  color: var(--faint); margin-bottom: 8px; display: block;
}
.opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .opt-row { grid-template-columns: 1fr; } }

.opt-field { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; }
.opt-field > span { margin-bottom: 0; }
.opt-field select {
  width: 100%; padding: 11px 30px 11px 12px;
  font-size: .95rem; font-weight: 600; color: var(--text);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-s);
  background: var(--ink-800);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%23b9aa97' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 7px;
}
.opt-field select:focus { border-color: var(--rouge); outline: none; }

.opt-toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.opt-toggle input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--rouge); }
.opt-toggle span { display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }
.opt-toggle b  { color: var(--text); font-weight: 700; }
.opt-toggle em { font-style: normal; color: var(--dim); font-size: .82rem; }

.opt-hint { font-size: .82rem; color: var(--dim); margin-top: 6px; }

/* v2.3 — segmented control (endgame mode). Two cells, one pill container;
   the chosen cell wears the rouge ring like a picked player row. */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 12px; border-radius: var(--r-m); border: none; cursor: pointer;
  background: var(--ink-800); text-align: left;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-family: var(--f-body);
  transition: box-shadow .15s ease, background-color .15s ease;
}
.seg-btn b  { color: var(--text); font-size: .9rem; font-weight: 700; }
.seg-btn em { font-style: normal; color: var(--dim); font-size: .74rem; }
.seg-btn.on {
  background: var(--rouge-soft);
  box-shadow: inset 0 0 0 1.5px var(--rouge);
}
.seg-btn.on b { color: #ffb9c0; }
.seg-btn:disabled { opacity: .55; cursor: default; }

/* v2.3 — kitty amount config (revealed by the toggle) */
#kitty-config {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  animation: rise-in .2s ease both;
}
.kitty-cur {
  font-family: var(--f-display); font-weight: 600; font-size: 1.3rem;
  color: var(--gold);
}
#kitty-config input {
  width: 110px; padding: 10px 12px;
  font-family: var(--f-display); font-weight: 600; font-size: 1.15rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-s);
  background: var(--ink-800); color: var(--text); outline: none;
  caret-color: var(--rouge);
}
#kitty-config input:focus { border-color: var(--rouge); }
#kitty-config input::placeholder { color: var(--faint); }
.kitty-config-hint { font-size: .82rem; color: var(--dim); }
#btn-options-save { margin-top: 4px; }
.opt-code-row { display: flex; align-items: center; gap: 10px; }
.opt-code {
  font-family: var(--f-display); font-weight: 600;
  letter-spacing: .24em; font-size: 1.25rem; color: var(--gold);
  background: var(--ink-800); padding: 9px 12px; border-radius: var(--r-s); flex: 1;
  text-align: center; box-shadow: inset 0 0 0 1px var(--line);
}

/* -- players modal ------------------------------------------------------- */
.modal-hint {
  text-align: left; font-size: .84rem; color: var(--dim); line-height: 1.4;
  margin: -6px 0 10px;
}
.modal-hint b { color: var(--gold); }
#players-modal-list { list-style: none; margin: 0 0 6px; text-align: left; }
#players-modal-list li {
  display: flex; align-items: center; gap: 10px; padding: 11px 8px;
  border-bottom: 1px solid var(--line); font-size: .95rem;
  border-radius: var(--r-s);
}
#players-modal-list li.pickable { cursor: pointer; }
#players-modal-list li.pickable:active { background: var(--ink-800); }
#players-modal-list li.picked {
  background: var(--rouge-soft); border-bottom-color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--rouge);
}
#players-modal-list li:last-child { border-bottom: none; }
#players-modal-list .dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255,255,255,.25);
}
#players-modal-list .pname {
  flex: 1; min-width: 0; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#players-modal-list .ptag {
  flex: none; font-size: .62rem; font-weight: 800; letter-spacing: .06em;
  color: var(--dim); background: var(--ink-800); padding: 3px 7px;
  border-radius: 7px; box-shadow: inset 0 0 0 1px var(--line);
}
#players-modal-list .ptag.poulet { color: #3d2c05; background: var(--gold); box-shadow: none; }
#players-modal-list .ptag.found  { color: #fff; background: var(--green); box-shadow: none; }
#players-modal-list .score-badge {
  flex: none; font-size: .72rem; font-weight: 800; color: var(--gold);
  background: var(--gold-soft); padding: 3px 7px; border-radius: 8px;
}
#players-modal-list .kick {
  flex: none; border: none; background: none; color: var(--faint);
  cursor: pointer; padding: 6px;
  display: flex; align-items: center;
}
#players-modal-list .kick .ico { width: 17px; height: 17px; }
#players-modal-list .kick:active { color: var(--rouge); }
#players-modal-list .offline { opacity: .45; }
.role-chooser { text-align: left; padding: 12px; margin: 4px 0 12px; border-radius: var(--r-m); background: var(--ink-900); border: 1px solid var(--line); }
.role-chooser > label:first-child { display: block; color: var(--text); font-weight: 800; margin-bottom: 7px; }
.role-picker-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 10px; margin-bottom: 18px; }
.role-picker-row select { min-width: 0; width: 100%; height: 54px; background: var(--ink-800); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; }
.role-picker-row .btn { min-height: 54px; margin: 0; padding-block: 0; }
.team-mode-toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; color: var(--text); cursor: pointer; }
.team-mode-toggle span { display: grid; gap: 2px; }
.team-mode-toggle small { color: var(--dim); font-weight: 500; }
.team-mode-toggle input { width: 42px; height: 24px; accent-color: var(--gold); }
.team-controls { text-align: left; margin-bottom: 12px; }
.team-controls #team-count-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dim); font-weight: 700; margin-bottom: 12px; }
.team-controls select, .team-player-select { background: var(--ink-800); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.team-controls #team-count { min-width: 86px; min-height: 46px; padding: 8px 14px; font-size: 1rem; }
#btn-distribute-teams { margin-bottom: 12px; }
.team-controls .modal-hint { margin-top: 0; margin-bottom: 16px; line-height: 1.45; }
#team-board { display: grid; gap: 8px; margin: 10px 0; }
.team-card { position: relative; border: 1px solid var(--line); background: var(--ink-900); border-radius: var(--r-m); padding: 9px; min-height: 52px; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.team-card.drag-over { border: 2px solid var(--gold); background: var(--gold-soft); transform: scale(1.015); }
.team-card-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.team-card-head input { flex: 1; min-width: 0; color: var(--text); background: var(--ink-800); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: 700 .95rem var(--f-body); }
.team-card-head input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.team-name-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 700 .95rem var(--f-body); text-align: left; }
.team-name-button:not(:disabled) { cursor: text; }
.team-name-button .team-edit-icon { color: var(--gold); font-size: 1rem; }
.team-drop-hint { display: none; position: absolute; inset: 5px; place-items: center; border: 2px dashed var(--gold); border-radius: 10px; background: color-mix(in srgb, var(--ink-900) 82%, var(--gold)); color: var(--gold); font-weight: 900; z-index: 2; pointer-events: none; }
.team-card.drag-over .team-drop-hint { display: grid; }
.team-member-row { position: relative; display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.team-member { display: inline-flex; flex: 1; min-width: 0; padding: 7px 10px; border-radius: var(--r-pill); background: var(--ink-700); color: var(--text); font-size: .86rem; cursor: grab; }
.team-switch-button { flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--gold); font-size: 1.35rem; font-weight: 800; }
.team-switch-menu { position: absolute; z-index: 4; top: 41px; right: 0; display: grid; min-width: 150px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink-800); box-shadow: 0 10px 24px #0008; }
.team-switch-menu button { padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; font: 700 .83rem var(--f-body); }
.team-switch-menu button:disabled { color: var(--faint); }
.team-drop-zone { display: grid; place-items: center; min-height: 18px; color: var(--faint); font-size: .8rem; font-weight: 700; }
.team-waiting { border-color: var(--rouge); }
#players-modal-list .player-group-heading { min-height: 0; padding: 14px 2px 6px; border: 0; background: transparent; color: var(--gold); font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
#players-modal-list .player-group-heading > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#players-modal-list .player-group-heading .group-found-pill { color: #fff; letter-spacing: 0; text-transform: none; }

/* -- instructions modal -------------------------------------------------- */
.help-body { text-align: left; }
.help-steps { list-style: none; margin: 0 0 16px; }
.help-steps li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .92rem; line-height: 1.45; color: var(--dim);
  padding: 5px 0;
}
.help-steps li > span { flex: none; font-size: 1.05rem; width: 24px; text-align: center; }
.help-steps li > div  { flex: 1; min-width: 0; }
.help-steps b { color: var(--text); }
details.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
details.faq:last-of-type { border-bottom: none; }
details.faq summary {
  font-weight: 700; font-size: .92rem; color: var(--text); cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: 4px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "▾"; margin-left: auto; color: var(--faint);
  transition: transform .15s ease;
}
details.faq[open] summary::after { transform: rotate(180deg); }
details.faq p { font-size: .86rem; color: var(--dim); line-height: 1.5; margin: 8px 0 0; }
details.faq b { color: var(--text); }

/* -- game-over / found modal --------------------------------------------- */
#gameover .big { animation: chick-bob 3.2s ease-in-out infinite; display: inline-block; }
#gameover-photo {
  max-width: 100%; max-height: 210px; border-radius: 4px;
  margin: 6px 0 16px; border: 6px solid #fff; border-bottom-width: 24px;
  transform: rotate(-2deg);                       /* the trophy polaroid */
  box-shadow: var(--shadow-2);
}
#gameover-scores {
  margin: 8px 0 14px; text-align: left; background: var(--ink-800); padding: 12px;
  border-radius: var(--r-s); font-size: .92rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
#gameover-scores b { font-size: .9rem; color: var(--gold); }
#gameover-scores .row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--text); }
.gameover-waiting {
  display: flex; align-items: center; gap: 12px; text-align: left;
  margin: 10px 0 4px; padding: 13px 14px; border-radius: var(--r-m);
  background: var(--ink-800); box-shadow: inset 0 0 0 1px var(--line);
}
.gameover-waiting span { color: var(--dim); font-size: .86rem; line-height: 1.35; }
.waiting-pulse {
  flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 0 rgba(242,177,52,.42);
  animation: waiting-pulse 1.7s ease-out infinite;
}
@keyframes waiting-pulse { 70% { box-shadow: 0 0 0 8px rgba(242,177,52,0); } 100% { box-shadow: 0 0 0 0 rgba(242,177,52,0); } }
.again-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.again-row .btn { flex: 1 1 0; min-width: 88px; padding: 12px 6px; font-size: .9rem; margin-top: 0; }
/* v2.3.3: sarcastic subtitle on the game-over card when the poulet bailed.
   Italic, dim, tight leading — reads as a wry postscript to the headline
   rather than a second statement of fact. */
.gameover-bail {
  margin: -4px 0 14px;
  font-style: italic; color: var(--dim);
  font-size: .92rem; line-height: 1.35;
}
/* v2.3.3: bail-only "new poulet" primary. Full-width, sits in place of the
   three rotation buttons. */
#btn-again-new-poulet { width: 100%; margin-top: 0; margin-bottom: 8px; }
/* v2.3.1: "Change settings for the next round" — sits under the poulet
   rotation buttons, ghost-styled so the primary "Play again as..." row
   stays the headline. */
.again-settings {
  display: inline-flex; align-items: center; gap: 8px;
  width: 100%; margin: 4px 0 12px; padding: 10px 14px;
  background: transparent; color: var(--dim);
  border: 1px solid var(--line-strong); border-radius: var(--r-m);
  font-family: var(--f-body); font-size: .88rem; font-weight: 600;
  cursor: pointer; justify-content: center;
}
.again-settings .ico { width: 16px; height: 16px; }
.again-settings:active { background: var(--ink-800); color: var(--text); }
/* v2.3.1: banner shown in the Options sheet when opened between rounds. */
.opt-replay-note {
  margin: 0 0 14px; padding: 10px 12px;
  background: var(--gold-soft); border: 1px solid var(--line-strong);
  border-radius: var(--r-s); color: var(--gold);
  font-size: .84rem; line-height: 1.4;
}
/* v2.3.1: the Options sheet can now open ON TOP of the game-over overlay
   ("Change settings for the next round"). #gameover is later in the DOM, so
   without a bump it would win the same-z-index tie. */
#options-modal { z-index: 2010; }

/* v2.3.1 — poulet broadcast composer. Preset chips in a wrapping row above
   the free-text field; both send the same RPC. Themed in gold to match the
   "chicken kitty" family and stand apart from the drink logger's rouge. */
.bc-presets {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 8px 0 12px;
}
.bc-preset {
  padding: 8px 12px; border-radius: var(--r-pill);
  background: var(--gold-soft); color: var(--gold);
  border: 1px solid var(--line-strong);
  font-family: var(--f-body); font-weight: 700; font-size: .84rem;
  cursor: pointer;
}
.bc-preset:disabled { opacity: .55; cursor: not-allowed; }
.bc-preset:active { background: var(--gold); color: #3d2c05; }
.bc-input {
  width: 100%; padding: 12px 14px; font-size: 1rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-m);
  background: var(--ink-800); color: var(--text); outline: none;
  font-family: var(--f-body);
}
.bc-input:focus { border-color: var(--gold); }
.bc-input:disabled { opacity: .55; }
.bc-cooldown {
  margin: 10px 0 0; color: var(--dim); font-size: .84rem;
  font-weight: 600; text-align: center;
}
#found-status { color: var(--dim); font-weight: 600; margin-top: 12px; }

/* -- reconnect banner + SW-update pill ----------------------------------- */
#reconnect-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2500;
  padding: calc(6px + env(safe-area-inset-top)) 12px 6px;
  background: var(--gold); color: #3d2c05; font-weight: 800; text-align: center;
  font-size: .88rem;
}
#sw-update {
  position: fixed; z-index: 2400;
  left: 50%; transform: translateX(-50%);
  top: calc(64px + env(safe-area-inset-top));
  padding: 9px 15px; border-radius: var(--r-pill);
  background: var(--glass); color: var(--text); border: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-weight: 700; font-size: .82rem; cursor: pointer;
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-strong);
  animation: drop-in .3s ease both;
  max-width: calc(100% - 24px);
}
#btn-share-results { margin-bottom: 12px; }

/* -- map markers (drawn over the light map — stay light-legible) ---------
   v2.1 pin: each remote player is ONE object — a colour anchor dot at the
   exact position, name chip hanging just below, joined by a tail. Own
   position keeps the classic blue halo dot (.pmarker) — the Maps convention
   users already know. The chip is solid near-black (not translucent) so it
   holds up on bright roads, grey buildings and green parks alike. */
.pmarker { border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4); }

.pin-anchor { transition: transform .3s linear; }   /* dots glide, not teleport */
.leaflet-zoom-anim .pin-anchor { transition: none; }
.pin {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transform: translate(-50%, -8px);   /* dot centre sits on the position */
  pointer-events: none;
  transition: opacity .25s ease, filter .25s ease;
}
.pin.poulet { transform: translate(-50%, -15px); }
.pin.stale { opacity: .35; filter: grayscale(.8); }
.pin-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.45);
}
.pin-dot.poulet {                     /* the star gets a gold-ringed badge */
  width: 30px; height: 30px; background: #fff;
  border: 2.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.plabel {
  position: relative;
  background: #211b16; border-radius: var(--r-pill);
  padding: 3px 9px 4px;
  font-size: .72rem; font-weight: 700; color: #fff; letter-spacing: .01em;
  box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 0 0 1px rgba(246,239,227,.14);
}
.plabel::before {                     /* tail up to the anchor dot */
  content: ''; position: absolute; top: -3px; left: 50%;
  width: 7px; height: 7px; background: #211b16;
  transform: translateX(-50%) rotate(45deg);
}
.plabel-txt {
  display: block; max-width: 128px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pin.poulet .plabel {
  color: var(--gold);
  box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 0 0 1.5px var(--gold);
}
/* v2.3 (all_find): a finder's pin — green-ringed chip + ✓ in the label says
   "out of the hunt" at map glance, in either team's colour language. */
.pin.found .plabel {
  color: #9fdcb0;
  box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 0 0 1.5px var(--green);
}
.leaflet-div-icon { background: transparent; border: none; }

/* -- v2.2: pubs & bars POI markers ---------------------------------------
   Venue icons share the marker rule (solid near-black — a marker needs full
   opacity) with amber Lucide glyphs: beer = pub, martini = bar. Fixed-size
   divIcons, so they render at full size at every zoom — never dots. On the
   clean Voyager basemap (v2.2.1) they are the only POIs on the map, so the
   glyph gets a touch more room and the gold ring a touch more presence. */
.poi {
  width: 28px; height: 28px; border-radius: 50%;
  background: #211b16;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 0 0 1.5px rgba(242,177,52,.65);
  cursor: pointer;
}
.poi svg { width: 16px; height: 16px; }
.poi.bar { color: #f4cf7a; }          /* lighter straw tint — glyph does the work */
.poi-anchor { animation: fade-in .25s ease both; }

/* Venue-name popup — same dark treatment as the name chips */
.poi-popup .leaflet-popup-content-wrapper {
  background: #211b16; color: var(--text); border-radius: var(--r-m);
  box-shadow: 0 2px 10px rgba(0,0,0,.4), inset 0 0 0 1px var(--line-strong);
  font-family: var(--f-body); font-size: .82rem; font-weight: 600;
}
.poi-popup .leaflet-popup-content { margin: 8px 12px; line-height: 1.3; }
.poi-popup .leaflet-popup-tip { background: #211b16; }

/* Drawing-mode toggle — glass pill, bottom-centre of the map */
#poi-draw-toggle {
  position: absolute; z-index: 1100;
  bottom: calc(14px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  background: var(--glass); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  font-weight: 700; font-size: .9rem; white-space: nowrap;
  cursor: pointer; animation: rise-in .3s ease both;
}
#poi-draw-toggle input {
  width: 19px; height: 19px; flex: none; accent-color: var(--gold);
  cursor: pointer;
}

/* v2.2.3 — tiny in-flight ring for venue fetches. Shown (via app.js) when a
   request has been pending > 150 ms; a static gold ring under
   prefers-reduced-motion, which still reads as "busy". v2.2.4: hosted by the
   drawing pill (Phase A) and the on-map chip below (Phase B) — the Settings
   row no longer has one. */
.poi-spin {
  display: inline-block; width: 13px; height: 13px; flex: none;
  border: 2px solid var(--gold-soft); border-top-color: var(--gold);
  border-radius: 50%; vertical-align: -2px;
  animation: poi-spin-rot .7s linear infinite;
}
@keyframes poi-spin-rot { to { transform: rotate(360deg); } }

/* v2.2.4 — on-map venue-loading chip, bottom-centre above the tray, same
   glass language as the drawing pill. It shares the toast's slot on purpose:
   the chip hides the instant a fetch resolves, which is exactly when any
   resolution toast would appear — so they never coexist. Clear of the
   recentre button (right) and the tray (above it). */
#poi-map-loading {
  position: absolute; z-index: 1200;
  bottom: calc(14px + var(--panel-h) + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 15px; border-radius: var(--r-pill);
  background: var(--glass); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  font-weight: 700; font-size: .88rem; white-space: nowrap;
  animation: rise-in .3s ease both;
}

/* =========================================================================
   v2.3 — log-a-drink modal fields + activity timeline bottom sheet
   ========================================================================= */
.drink-amount-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 0 10px;
}
.drink-amount-row .kitty-cur { font-size: 1.6rem; }
#input-drink-amount {
  width: 130px; padding: 10px 12px; text-align: center;
  font-family: var(--f-display); font-weight: 600; font-size: 1.5rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-m);
  background: var(--ink-800); color: var(--text); outline: none;
  caret-color: var(--rouge);
}
#input-drink-amount:focus { border-color: var(--rouge); }
#input-drink-amount::placeholder { color: var(--faint); }
.drink-label {
  width: 100%; padding: 11px 12px; font-size: .95rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-s);
  background: var(--ink-800); color: var(--text); outline: none;
  caret-color: var(--rouge); font-family: var(--f-body);
}
.drink-label:focus { border-color: var(--rouge); }
.drink-label::placeholder { color: var(--faint); }
.drink-remaining {
  font-size: .8rem !important; color: var(--faint) !important;
  margin: 10px 0 2px !important;
}

/* Bottom-sheet overlay variant — the tray's visual language, lifted into a
   modal: full-width card docked to the bottom, top corners rounded. */
.overlay.sheet { align-items: flex-end; padding: 0; }
.overlay.sheet .card {
  max-width: 560px; border-radius: var(--r-l) var(--r-l) 0 0;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  max-height: 72vh; display: flex; flex-direction: column;
  text-align: left;
  animation: sheet-up .3s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes sheet-up { from { opacity: 0; transform: translateY(48px); } }

#timeline-list {
  list-style: none; margin: 0; padding: 0 2px;
  overflow-y: auto; min-height: 120px; flex: 1;
  overscroll-behavior: contain;
}
#timeline-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 4px; border-bottom: 1px solid var(--line);
  font-size: .9rem; line-height: 1.4; color: var(--dim);
}
#timeline-list li:last-child { border-bottom: none; }
.tl-time {
  flex: none; font-family: var(--f-mono); font-size: .74rem; font-weight: 600;
  color: var(--faint); font-variant-numeric: tabular-nums;
  padding-top: 2px; min-width: 44px; white-space: nowrap;
}
.tl-ico { flex: none; font-size: .95rem; width: 22px; text-align: center; }
.tl-text { flex: 1; min-width: 0; overflow-wrap: break-word; }
.tl-text b { color: var(--text); font-weight: 700; }
.tl-photo {
  flex: none; width: 38px; height: 38px; object-fit: cover;
  border-radius: 8px; border: 2px solid #fff;
  box-shadow: var(--shadow-1); transform: rotate(2deg);
}
.tl-empty { font-size: .88rem; color: var(--faint); line-height: 1.5; padding: 16px 4px 8px; }

/* Leaflet attribution — keep it legible but quiet on the light map */
.leaflet-control-attribution { font-size: .62rem !important; opacity: .85; }

/* -- accessibility -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
