/* ═══════════════════════════════════════════
   Memoroam — Days Tab v2
   Consolidated stylesheet for the redesigned Days tab. Transplanted 1:1
   from the sandbox (docs/days-sandbox/css/{base,deck,plan,map,add-sheet,
   custom-form,banner-picker}.css) with these adaptations:

   - All cat-tile / cat-banner asset URLs rewritten from sandbox-relative
     paths to the R2 CDN (https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev)
   - `.toast` / `.toast-action` → `.dt-toast` / `.dt-toast-action`
     (avoids collision with prod's existing toast helpers)
   - `.scrim` → `.dt-scrim` (avoids collision with prod scrim patterns)
   - Sandbox-only header chrome (`.app-*`, `.dock*`, `.phone`, `.screen`,
     `.route-trip-pills`, `.blank-title`, `.itin-tab-bar`) dropped — prod
     supplies these from its own stylesheets
   - `body{}` / `*{}` resets dropped (already in variables.css)
   - `.fab` retains a sheet-scoped override so the custom-form FAB anchors
     inside its sheet rather than the viewport
   - Memory-tag flow CSS skipped — sandbox memory-tag flow deferred to
     prod's polaroid memory rework
   ═══════════════════════════════════════════ */

/* Shared aliases used by the transplanted rules. The sandbox's base.css
   defined these as alias variables — bringing them in here keeps the rest
   of the file 1:1 with sandbox without polluting variables.css. */
:root{
  --paper:var(--card);
  --ink:var(--text);
  --ink-2:var(--text);
  --line:var(--border);
  --line-2:var(--border);
  --eyebrow-rust:#B5604A;
  --accent:#4A8C8A;
  --teal:#4A8C8A;
  --teal-deep:#2F6664;
}
html[data-theme="dark"]{
  --teal-deep:#7CC4B8;
}

/* ─── View container — flex chain rooted at .page-scroll ───
   The sandbox's .view sat in a `.views` host that flex:1'd to fill the
   .screen, with .view position:absolute inset:0 inside it. Prod has no
   `.views` host — instead the chain is page-scroll > #rAiSection >
   #itinTabHost > #itinTabContent > .view. None of those middle links
   are flex containers in prod's normal stylesheet, so `.view`'s flex:1
   has nothing to grow into.

   The `:has()` rules below detect when Days v2 is rendered (a `.view`
   exists as a child of #itinTabContent) and turn the entire chain into
   a flex column for that one tab. Top chrome (h1 + pills + tab bar)
   keeps its natural height via flex-shrink:0; .view flex:1 fills the
   rest. Other tabs (Overview / Notes / Links / Financials) are
   unaffected — their content flows naturally as before.

   `.view` itself uses negative margins to escape .page-scroll's
   `padding:0 18px 110px`, so the deck/plan/map renders edge-to-edge
   like the sandbox (no visible "box" inside the page padding). */
#pageRoute .page-scroll:has(#itinTabContent > .view){
  display:flex;flex-direction:column;
}
#pageRoute .page-scroll:has(#itinTabContent > .view) > #rAiSection,
#pageRoute .page-scroll:has(#itinTabContent > .view) #itinTabHost,
#pageRoute .page-scroll:has(#itinTabContent > .view) #itinTabContent{
  flex:1 1 auto;
  display:flex;flex-direction:column;
  min-height:0;
}
#pageRoute .page-scroll:has(#itinTabContent > .view) #itinTabContent{
  padding:0;
}
/* Tab bar above #itinTabContent stays at natural height — flex-shrink:0
   prevents the flex column from compressing it. */
#pageRoute .page-scroll:has(#itinTabContent > .view) #itinTabBar{
  flex-shrink:0;
}

#itinTabContent > .view{
  flex:1 1 auto;
  position:relative;
  display:flex;flex-direction:column;
  background:var(--paper);
  overflow:hidden;
  /* Escape page-scroll's padding (0 18px 110px) so .view fills edge-to-edge.
     The 110px bottom cancels the FAB-clearance pad — Days v2's own FAB
     and map-peek manage their own clearance inside .view via
     `position:absolute` + `bottom: 108px / 0`. */
  margin-left:-18px;
  margin-right:-18px;
  margin-bottom:-110px;
  min-height:0;
}

/* ─── Immersive plan/map views ───
   Sandbox parity: tapping a postcard's "Start planning" or the map peek
   should fill the ENTIRE phone viewport with the plan/map view —
   hiding the page header (Travel Planner h1 + pill rail + tab bar) AND
   the bottom nav so the back arrow at top-left + the map-peek at bottom
   are the only chrome. The :has() selectors key off the view IDs
   (#dtPlanView / #dtMapView), so this kicks in automatically — no
   class-management JS required. */
#pageRoute:has(.view#dtPlanView) .blank-page-header,
#pageRoute:has(.view#dtMapView)  .blank-page-header,
#pageRoute:has(.view#dtPlanView) .route-search-wrap,
#pageRoute:has(.view#dtMapView)  .route-search-wrap,
#pageRoute:has(.view#dtPlanView) .route-trip-pills,
#pageRoute:has(.view#dtMapView)  .route-trip-pills,
#pageRoute:has(.view#dtPlanView) .route-pill-no-match,
#pageRoute:has(.view#dtMapView)  .route-pill-no-match,
#pageRoute:has(.view#dtPlanView) #itinTabBar,
#pageRoute:has(.view#dtMapView)  #itinTabBar{
  display:none;
}

/* ─── Deck view: animated collapse of heading + trip pill rail ───
   The Days deck IS the day selector, but on smaller phones the
   "Travel Planner" h1 + trip pill rail eat enough vertical space to
   force the postcard into a clipped layout. Smoothly collapse that
   chrome only while the deck is showing so postcards can fully render.
   Tab bar + bottom nav stay so users can still swipe between
   Overview/Days/Financials/Notes.

   Animated via max-height + opacity + paddings/margins (display:none
   would prevent the transition). The route-search-wrap / route-pill-
   no-match are usually display:none anyway when the rail is empty
   — :not([style*="display: none"]) skips them so they don't jump
   during the collapse if they were never visible. */
#pageRoute .blank-page-header,
#pageRoute .route-search-wrap,
#pageRoute .route-trip-pills,
#pageRoute .route-pill-no-match{
  overflow:hidden;
  transition:
    max-height .32s cubic-bezier(.32,.72,0,1),
    opacity .22s ease,
    padding .32s cubic-bezier(.32,.72,0,1),
    margin .32s cubic-bezier(.32,.72,0,1);
}
/* Open state: max-height generous enough to comfortably contain the
   natural rendered height of each piece of chrome. */
#pageRoute .blank-page-header{max-height:240px;}
#pageRoute .route-search-wrap{max-height:80px;}
#pageRoute .route-trip-pills{max-height:120px;}
#pageRoute .route-pill-no-match{max-height:80px;}

/* Collapsed state when the deck view is the active tab. */
#pageRoute:has(.view#dtDeckView) .blank-page-header,
#pageRoute:has(.view#dtDeckView) .route-search-wrap,
#pageRoute:has(.view#dtDeckView) .route-trip-pills,
#pageRoute:has(.view#dtDeckView) .route-pill-no-match{
  max-height:0;
  opacity:0;
  padding-top:0;
  padding-bottom:0;
  margin-top:0;
  margin-bottom:0;
}

/* Tab bar slides up + gets a small breathing margin where the chrome
   used to sit. Same transition timing so the whole header collapses
   in one motion. */
#pageRoute #itinTabBar{
  transition:margin-top .32s cubic-bezier(.32,.72,0,1);
}
#pageRoute:has(.view#dtDeckView) #itinTabBar{
  margin-top:calc(env(safe-area-inset-top, 0px) + 6px);
}

/* Hide the bottom nav while immersive. Restored automatically the moment
   the user taps back to deck (since the .view ID changes and the :has()
   no longer matches). Also expand #pageRoute to the full viewport since
   the 76px reserved for the hidden nav is now free. */
body:has(#pageRoute .view#dtPlanView) .bottom-nav,
body:has(#pageRoute .view#dtMapView)  .bottom-nav{
  display:none;
}
body:has(#pageRoute .view#dtPlanView) #pageRoute,
body:has(#pageRoute .view#dtMapView)  #pageRoute{
  height:100vh;
}

/* Plan view only: breathing room above the hero ribbon so the back
   button gets its own header strip area rather than overlapping the
   hero. 80px clears the 36px back button (top:14) plus a 30px gap.
   Map view does NOT get this padding — the map should fill the entire
   .view edge-to-edge, with the back button overlaid directly on top
   of the map (sandbox parity). */
#itinTabContent > .view#dtPlanView{
  padding-top:calc(env(safe-area-inset-top, 0px) + 80px);
}

/* Back arrow — overlay top-left of plan + map view. Cream pill backdrop
   matches the postcard's .pc-hero-edit pencil so the affordances feel
   of-a-piece. Sits at z-index:20 above the plan-hero and Leaflet panes.
   safe-area-inset-top respected for installed PWA / TWA. */
.dt-back{
  position:absolute;
  top:calc(env(safe-area-inset-top, 0px) + 14px);
  left:18px;z-index:20;
  width:36px;height:36px;border-radius:50%;
  display:grid;place-items:center;
  background:rgba(245,239,228,.85);
  border:1px solid rgba(28,23,19,.08);
  color:#1C1713;cursor:pointer;
  box-shadow:0 2px 6px rgba(28,23,19,.10);
  transition:background .15s, transform .12s;
}
.dt-back svg{width:16px;height:16px;}
.dt-back:hover{background:rgba(245,239,228,.98);}
.dt-back:active{transform:scale(.94);}
html[data-theme="dark"] .dt-back{
  background:rgba(28,23,19,.55);
  border-color:rgba(255,255,255,.12);
  color:#F5EFE4;
}

/* Plan-hero day pill moves to top-right since the back button now
   occupies top-left. Overrides the sandbox default of top:12px;left:12px. */
.plan-hero .plan-hero-day-pill{
  left:auto;
  right:12px;
}

/* ════════════════════════════════════════════
   DAY DECK
   ════════════════════════════════════════════ */
.deck-strip{
  display:flex;align-items:center;gap:18px;padding:18px 22px 22px;
  overflow-x:auto;scrollbar-width:none;
}
.deck-strip::-webkit-scrollbar{display:none;}

.day-pip{
  flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:9px;
  padding:2px 2px;background:none;border:none;
  transition:transform .2s cubic-bezier(.32,.72,0,1);
}
.day-pip-num{
  font-family:'IBM Plex Mono',monospace;font-size:11px;font-weight:500;
  color:var(--muted);letter-spacing:.08em;
  transition:color .2s, font-weight .2s;
}
.day-pip.active{transform:translateY(-1px);}
.day-pip.active .day-pip-num{color:var(--text);font-weight:700;}

.day-pip-status{
  width:18px;height:18px;border-radius:50%;
  display:grid;place-items:center;
  border:1.5px solid rgba(28,23,19,.14);background:transparent;
  transition:background .2s, border-color .2s, box-shadow .2s;
}
html[data-theme="dark"] .day-pip-status{border-color:rgba(255,255,255,.16);}
.day-pip-status svg{
  width:10px;height:10px;opacity:0;transition:opacity .2s;
  stroke-width:2.2;
}
.day-pip.underway .day-pip-status{background:#EBD2A4;border-color:#EBD2A4;}
.day-pip.complete .day-pip-status{background:#4FA37F;border-color:#4FA37F;}
.day-pip.complete .day-pip-status svg{color:#FFFFFF;opacity:1;stroke-width:2.6;}
.day-pip.active .day-pip-status{box-shadow:0 4px 10px rgba(28,23,19,.08);}
html[data-theme="dark"] .day-pip.underway .day-pip-status{background:#C4A876;border-color:#C4A876;}
html[data-theme="dark"] .day-pip.underway .day-pip-status svg{color:#3E2A0E;}
html[data-theme="dark"] .day-pip.complete .day-pip-status{background:#3F8B6A;border-color:#3F8B6A;}
html[data-theme="dark"] .day-pip.complete .day-pip-status svg{color:#FFFFFF;}

.deck-shell{flex:1;position:relative;overflow:hidden;padding:8px 0 0;}
.deck-track{display:flex;height:100%;align-items:flex-start;}
.deck-track.dragging,.deck-track.snap{will-change:transform;}
.deck-track.dragging{transition:none !important;}
.deck-track.snap{transition:transform .42s cubic-bezier(.32,.72,0,1);}

.postcard{
  /* Fixed height — fills the deck-shell minus a 24px bottom + 8px top
     gap. User feedback: the card should be the same height regardless
     of content; few stops show empty space inside the stops region,
     many stops scroll within it. (improvements doc 21) */
  flex:0 0 calc(100% - 44px);
  height:calc(100% - 32px);
  margin:0 8px 24px;border-radius:24px;background:var(--paper-2);
  box-shadow:var(--shadow-card);
  position:relative;overflow:hidden;
  display:flex;flex-direction:column;
  transition:transform .35s cubic-bezier(.32,.72,0,1), opacity .35s;
  transform:scale(.96);opacity:.65;
}
.postcard.is-active{transform:none;opacity:1;}
.postcard::after{
  content:"";position:absolute;inset:0;border-radius:24px;
  box-shadow:inset 0 0 0 1px rgba(28,23,19,.08);
  pointer-events:none;
}
html[data-theme="dark"] .postcard::after{box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);}

/* RIBBON HERO — vibe gradient (default) or banner image (when day.banner set) */
.pc-hero{height:70px;flex:0 0 70px;position:relative;overflow:hidden;}
.pc-hero[data-vibe="dawn"]{background:linear-gradient(180deg, #C7DAE3 0%, #E2C7A8 60%, #C9967A 100%);}
.pc-hero[data-vibe="warm"]{background:linear-gradient(180deg, #F4D6A8 0%, #E2A876 60%, #B5683E 100%);}
.pc-hero[data-vibe="cool"]{background:linear-gradient(180deg, #B5C8D9 0%, #8FAACC 60%, #5C739A 100%);}
.pc-hero[data-vibe="forest"]{background:linear-gradient(180deg, #D4D9C5 0%, #93A380 60%, #5A6B47 100%);}
.pc-hero[data-vibe="dusk"]{background:linear-gradient(180deg, #E8B5C4 0%, #B57A8A 60%, #6B4250 100%);}
.pc-hero[data-vibe="empty"]{background:linear-gradient(180deg, #EFE7D8, #E5DAC6);}
html[data-theme="dark"] .pc-hero[data-vibe="empty"]{background:linear-gradient(180deg, #2A251D, #1F1B15);}
.pc-hero[data-vibe]:not([data-vibe="empty"])::after{
  content:"";position:absolute;inset:0;
  background:radial-gradient(80% 100% at 30% 0%, rgba(255,210,140,.30), transparent 60%);
}

/* Banner image hero */
.pc-hero[data-banner]{background-size:cover;background-position:center;background-repeat:no-repeat;}
.pc-hero[data-banner][data-vibe]:not([data-vibe="empty"])::after{
  background:linear-gradient(180deg, transparent 60%, var(--paper-2) 100%);
  z-index:2;
}
.pc-hero[data-banner]::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:1;
}
.pc-hero[data-banner][data-vibe="cool"]::before{background:linear-gradient(180deg, rgba(181,200,217,.50) 0%, rgba(143,170,204,.50) 60%, rgba(92,115,154,.50) 100%);}
.pc-hero[data-banner][data-vibe="dawn"]::before{background:linear-gradient(180deg, rgba(199,218,227,.50) 0%, rgba(226,199,168,.50) 60%, rgba(201,150,122,.50) 100%);}
.pc-hero[data-banner][data-vibe="warm"]::before{background:linear-gradient(180deg, rgba(244,214,168,.50) 0%, rgba(226,168,118,.50) 60%, rgba(181,104,62,.50) 100%);}
.pc-hero[data-banner][data-vibe="forest"]::before{background:linear-gradient(180deg, rgba(212,217,197,.50) 0%, rgba(147,163,128,.50) 60%, rgba(90,107,71,.50) 100%);}
.pc-hero[data-banner][data-vibe="dusk"]::before{background:linear-gradient(180deg, rgba(232,181,196,.50) 0%, rgba(181,122,138,.50) 60%, rgba(107,66,80,.50) 100%);}

.pc-hero-edit{
  position:absolute;top:14px;right:14px;width:30px;height:30px;
  display:grid;place-items:center;border-radius:50%;
  background:rgba(245,239,228,.85);border:1px solid rgba(28,23,19,.08);
  color:#1C1713;cursor:pointer;z-index:3;
  box-shadow:0 2px 6px rgba(28,23,19,.10);
  transition:background .15s ease, transform .12s ease;
}
.pc-hero-edit:hover{background:rgba(245,239,228,.98);}
.pc-hero-edit:active{transform:scale(.94);}
.pc-hero-edit svg{width:14px;height:14px;}
html[data-theme="dark"] .pc-hero-edit{background:rgba(28,23,19,.55);border-color:rgba(255,255,255,.12);color:#F5EFE4;}
html[data-theme="dark"] .pc-hero-edit:hover{background:rgba(28,23,19,.75);}

/* Body fills the postcard minus the hero. flex:1 + min-height:0 lets
   .pc-stops below grow to fill remaining space and scroll on overflow. */
.pc-body{flex:1;padding:12px 22px 12px;display:flex;flex-direction:column;gap:6px;min-height:0;}
.pc-meta{display:flex;flex-direction:column;align-items:flex-start;gap:3px;}
.pc-day{font-family:'IBM Plex Mono',monospace;font-size:11px;font-weight:600;color:var(--eyebrow-rust);letter-spacing:.12em;text-transform:uppercase;}
.pc-date{font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--muted);letter-spacing:.12em;}

.pc-pills{display:flex;flex-wrap:wrap;gap:6px;}
.pc-pill{
  display:inline-flex;align-items:center;gap:5px;
  padding:4px 10px 4px 8px;border-radius:99px;
  background:rgba(184,96,74,.06);border:1px solid rgba(184,96,74,.14);
  font-family:'DM Sans',sans-serif;font-size:11.5px;font-weight:500;color:var(--text);
}
html[data-theme="dark"] .pc-pill{background:rgba(232,184,113,.06);border-color:rgba(232,184,113,.16);}
.pc-pill svg{width:11px;height:11px;color:var(--eyebrow-rust);opacity:.7;}
html[data-theme="dark"] .pc-pill svg{color:var(--gold-soft);}

.pc-stops{
  margin-top:2px;border-top:1px dashed rgba(28,23,19,.14);
  padding-top:8px;display:flex;flex-direction:column;gap:5px;
  /* Fills available body space (flex:1) and scrolls internally when
     content exceeds that space. The deck's swipe handler now defers
     to native vertical scroll inside this list (improvements doc 21).
     overscroll-behavior:contain keeps the vertical scroll from
     leaking to the page-scroll. */
  flex:1;min-height:0;
  overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
/* Hide scrollbar so the dashed divider stays the only ruler between
   the meta block and the stops list. */
.pc-stops::-webkit-scrollbar{display:none;}
html[data-theme="dark"] .pc-stops{border-top-color:rgba(255,255,255,.10);}
.pc-stop-row{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:10px;}
.pc-stop-time{font-family:'IBM Plex Mono',monospace;font-size:11px;font-weight:500;color:var(--muted);letter-spacing:.04em;}
.pc-stop-name{font-size:13px;font-weight:500;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pc-stop-row.is-now .pc-stop-time,
.pc-stop-row.is-now .pc-stop-name{color:#1F8A4A;font-weight:700;}
.pc-stop-row.is-now .pc-stop-time::before{
  content:"";display:inline-block;
  width:6px;height:6px;border-radius:50%;
  background:#1F8A4A;margin-right:6px;vertical-align:1px;
  animation:nowPulse 2.4s ease-in-out infinite;
}
html[data-theme="dark"] .pc-stop-row.is-now .pc-stop-time,
html[data-theme="dark"] .pc-stop-row.is-now .pc-stop-name{color:#5BC57C;}
html[data-theme="dark"] .pc-stop-row.is-now .pc-stop-time::before{background:#5BC57C;}
@keyframes nowPulse{0%,100%{opacity:1;}50%{opacity:0;}}
@media (prefers-reduced-motion: reduce){
  .pc-stop-row.is-now .pc-stop-time::before{animation:none;}
  .tl-block.is-now .tl-name::before{animation:none;}
}

.pc-stop-icon{width:22px;height:22px;border-radius:6px;display:grid;place-items:center;color:#FFF;}
.pc-stop-icon svg{width:13px;height:13px;}
.pc-stop-icon.food      {background:linear-gradient(135deg,#B5604A,#EAB09E);}
.pc-stop-icon.sights    {background:linear-gradient(135deg,#3D5A6E,#89B5C4);}
.pc-stop-icon.activities{background:linear-gradient(135deg,#5B6E50,#ABC4A0);}
.pc-stop-icon.shopping  {background:linear-gradient(135deg,#9A6538,#DFB291);}
.pc-stop-icon.nature    {background:linear-gradient(135deg,#3F7768,#8FC4B3);}
.pc-stop-icon.transit   {background:linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.pc-stop-icon.other     {background:linear-gradient(135deg,#736F63,#BAB3A0);}
.pc-stop-icon.food      {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/food.webp') center/cover no-repeat,linear-gradient(135deg,#B5604A,#EAB09E);}
.pc-stop-icon.sights    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/sights.webp') center/cover no-repeat,linear-gradient(135deg,#3D5A6E,#89B5C4);}
.pc-stop-icon.activities{background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/activities.webp') center/cover no-repeat,linear-gradient(135deg,#5B6E50,#ABC4A0);}
.pc-stop-icon.shopping  {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/shopping.webp') center/cover no-repeat,linear-gradient(135deg,#9A6538,#DFB291);}
.pc-stop-icon.nature    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/nature.webp') center/cover no-repeat,linear-gradient(135deg,#3F7768,#8FC4B3);}
.pc-stop-icon.transit   {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/transit.webp') center/cover no-repeat,linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.pc-stop-icon.other     {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/other.webp') center/cover no-repeat,linear-gradient(135deg,#736F63,#BAB3A0);}
.pc-stop-icon > svg{opacity:0;}

.pc-more{
  font-size:11.5px;font-style:italic;color:var(--muted);padding:6px 0 0 58px;
  background:none;border:none;text-align:left;cursor:pointer;
  transition:color .15s;
}
.pc-more:hover{color:var(--text);}

/* CTA row sits naturally below the stops list. Compact padding so it
   doesn't steal height from the stops list. */
.pc-cta{margin-top:4px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:4px;}
.pc-cta-btn{
  flex:1;padding:11px 18px;border-radius:14px;background:var(--ink);color:var(--paper);
  font-size:13.5px;font-weight:600;letter-spacing:.01em;
  display:flex;align-items:center;justify-content:center;gap:8px;
  transition:transform .12s, box-shadow .15s;border:none;cursor:pointer;
}
.pc-cta-btn:active{transform:scale(.97);}
.pc-cta-btn svg{width:14px;height:14px;}
.pc-cta-links{
  width:40px;height:40px;border-radius:50%;border:1px solid var(--border);
  background:transparent;display:grid;place-items:center;color:var(--ink);
  position:relative;cursor:pointer;
  transition:background .15s, border-color .15s;
}
.pc-cta-links:hover{background:rgba(28,23,19,.04);}
html[data-theme="dark"] .pc-cta-links:hover{background:rgba(255,255,255,.04);}
.pc-cta-links svg{width:18px;height:18px;}

/* Empty state body — fills the card so the empty postcard is the
   same fixed height as a populated one. User feedback (#21): card
   height should be consistent regardless of content. */
.pc-empty-body{padding:18px 22px 22px;display:flex;flex-direction:column;flex:1;min-height:0;position:relative;}
.empty-content{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:14px;text-align:center;padding:14px 0 4px;
}
.empty-prompt{
  font-family:'DM Sans',sans-serif;font-size:15px;font-weight:500;
  color:var(--text);line-height:1.4;max-width:240px;
}
/* Compact pill — overrides .pc-cta-btn { flex:1 } which was stretching
   the button vertically inside .empty-content's column flexbox. */
.empty-cta{
  flex:0 0 auto;
  align-self:center;
  width:auto;
  padding:11px 22px;
  font-size:14px;
}
/* Folder affordance pinned to bottom-right of the empty card so the
   user can still reach saved places + trip links without leaving the
   Days tab. Mirrors the populated card's .pc-cta-links sizing. */
.empty-folder{
  position:absolute;
  bottom:14px;
  right:14px;
}

/* ════════════════════════════════════════════
   PLAN VIEW — timeline + Spots + Schedule sheet
   ════════════════════════════════════════════ */
.plan-hero{margin:8px 18px 12px;border-radius:18px;box-shadow:var(--shadow-card);}
.plan-hero[data-banner][data-vibe]:not([data-vibe="empty"])::after{background:none;}
.plan-hero-day-pill{
  position:absolute;top:12px;left:12px;z-index:3;
  padding:6px 12px;border-radius:99px;
  background:rgba(245,239,228,.85);border:1px solid rgba(28,23,19,.08);
  color:#1C1713;
  font-family:'IBM Plex Mono',monospace;font-size:10px;font-weight:600;
  letter-spacing:.15em;text-transform:uppercase;
  box-shadow:0 2px 6px rgba(28,23,19,.10);
}
html[data-theme="dark"] .plan-hero-day-pill{background:rgba(28,23,19,.55);border-color:rgba(255,255,255,.12);color:#F5EFE4;}

.plan-scroll{flex:1;overflow-y:auto;padding-bottom:170px;-ms-overflow-style:none;scrollbar-width:none;}
.plan-scroll::-webkit-scrollbar{display:none;}

.timeline{padding:0 18px;display:flex;flex-direction:column;}

.tl-block{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center;}
.tl-block + .tl-block{margin-top:8px;}
.tl-block.dragging{z-index:5;position:relative;transition:none;}
.tl-block.dragging .tl-card{box-shadow:0 14px 32px rgba(28,23,19,.22);background:var(--paper-2);}
.timeline.is-dragging .tl-gap{opacity:.18;transition:opacity .18s ease;pointer-events:none;}

.tl-time{
  font-family:'IBM Plex Mono',monospace;
  font-size:13px;font-weight:600;color:var(--ink);
  text-align:right;letter-spacing:-.01em;line-height:1;
  font-variant-numeric:tabular-nums;
}
.tl-card{
  background:var(--paper-2);border:1px solid var(--line);border-radius:14px;
  padding:9px 10px;display:grid;grid-template-columns:36px 1fr auto auto;gap:8px;
  align-items:center;box-shadow:0 1px 2px rgba(28,23,19,.03);
  position:relative;cursor:pointer;
  transition:transform .15s, box-shadow .15s, background .25s, border-color .25s;
}
.tl-card.is-visited{background:rgba(232,235,228,.7);border-color:rgba(143,181,174,.32);}
html[data-theme="dark"] .tl-card.is-visited{background:rgba(143,181,174,.12);border-color:rgba(143,181,174,.22);}
.tl-card.is-visited .tl-name{color:var(--ink);}
.tl-card.is-visited .tl-meta{opacity:.92;}

.timeline.is-dragging .tl-time.is-projecting{color:#1F8A4A;opacity:.7;font-weight:600;}
html[data-theme="dark"] .timeline.is-dragging .tl-time.is-projecting{color:#5BC57C;}

.tl-block.is-now .tl-time,
.tl-block.is-now .tl-name{color:#1F8A4A;font-weight:700;}
.tl-block.is-now .tl-name::before{
  content:"";display:inline-block;
  width:6px;height:6px;border-radius:50%;
  background:#1F8A4A;margin-right:6px;vertical-align:1px;
  animation:nowPulse 2.4s ease-in-out infinite;
}
html[data-theme="dark"] .tl-block.is-now .tl-time,
html[data-theme="dark"] .tl-block.is-now .tl-name{color:#5BC57C;}
html[data-theme="dark"] .tl-block.is-now .tl-name::before{background:#5BC57C;}

.tl-tick{
  width:28px;height:28px;display:grid;place-items:center;
  background:transparent;border:0;border-radius:50%;
  color:#5C8580;opacity:.85;cursor:pointer;
  transition:background .15s, color .15s, opacity .15s, transform .12s;
}
.tl-tick svg{width:20px;height:20px;stroke-width:1.7;}
.tl-tick:active{transform:scale(.92);}
.tl-tick:hover{opacity:1;background:rgba(143,181,174,.1);}
html[data-theme="dark"] .tl-tick{color:#9BCEC5;}
.tl-tick-spacer{width:28px;height:28px;}

.tl-mem-pip{
  background:rgba(143,181,174,.18);border:0;
  display:inline-flex;align-items:center;gap:4px;
  padding:2px 7px 2px 6px;border-radius:99px;
  color:#5C8580;font-family:'IBM Plex Mono',monospace;
  font-size:10px;font-weight:700;cursor:pointer;line-height:1;
  transition:background .15s, transform .12s;
}
.tl-mem-pip svg{width:10px;height:10px;}
.tl-mem-pip:active{transform:scale(.94);}
.tl-mem-pip:hover{background:rgba(143,181,174,.28);}
html[data-theme="dark"] .tl-mem-pip{background:rgba(143,181,174,.22);color:#9BCEC5;}

.tl-pin-inline{
  background:transparent;border:0;padding:0;
  width:16px;height:16px;display:inline-grid;place-items:center;
  color:var(--muted);opacity:.7;cursor:pointer;border-radius:5px;
  transition:opacity .15s, color .15s, background .15s;
}
.tl-pin-inline svg{width:12px;height:12px;}
.tl-pin-inline:hover{opacity:1;background:rgba(28,23,19,.05);}
.tl-pin-inline:active{opacity:1;color:var(--accent);}
html[data-theme="dark"] .tl-pin-inline:hover{background:rgba(255,255,255,.05);}

.tl-card:active{transform:scale(.99);}
.tl-cat{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:#FFF;flex-shrink:0;}
.tl-cat svg{width:18px;height:18px;}
.tl-cat.food,       .spot-card-tile.food      {background:linear-gradient(135deg,#B5604A,#EAB09E);}
.tl-cat.sights,     .spot-card-tile.sights    {background:linear-gradient(135deg,#3D5A6E,#89B5C4);}
.tl-cat.activities, .spot-card-tile.activities{background:linear-gradient(135deg,#5B6E50,#ABC4A0);}
.tl-cat.shopping,   .spot-card-tile.shopping  {background:linear-gradient(135deg,#9A6538,#DFB291);}
.tl-cat.nature,     .spot-card-tile.nature    {background:linear-gradient(135deg,#3F7768,#8FC4B3);}
.tl-cat.transit,    .spot-card-tile.transit   {background:linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.tl-cat.other,      .spot-card-tile.other     {background:linear-gradient(135deg,#736F63,#BAB3A0);}

.tl-cat.food      {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/food.webp') center/cover no-repeat,linear-gradient(135deg,#B5604A,#EAB09E);}
.spot-card-tile.food      {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/category/food.webp') center/cover no-repeat,linear-gradient(135deg,#B5604A,#EAB09E);}
.tl-cat.sights    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/sights.webp') center/cover no-repeat,linear-gradient(135deg,#3D5A6E,#89B5C4);}
.spot-card-tile.sights    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/category/sights.webp') center/cover no-repeat,linear-gradient(135deg,#3D5A6E,#89B5C4);}
.tl-cat.activities{background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/activities.webp') center/cover no-repeat,linear-gradient(135deg,#5B6E50,#ABC4A0);}
.spot-card-tile.activities{background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/category/activities.webp') center/cover no-repeat,linear-gradient(135deg,#5B6E50,#ABC4A0);}
.tl-cat.shopping  {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/shopping.webp') center/cover no-repeat,linear-gradient(135deg,#9A6538,#DFB291);}
.spot-card-tile.shopping  {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/category/shopping.webp') center/cover no-repeat,linear-gradient(135deg,#9A6538,#DFB291);}
.tl-cat.nature    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/nature.webp') center/cover no-repeat,linear-gradient(135deg,#3F7768,#8FC4B3);}
.spot-card-tile.nature    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/category/nature.webp') center/cover no-repeat,linear-gradient(135deg,#3F7768,#8FC4B3);}
.tl-cat.transit   {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/transit.webp') center/cover no-repeat,linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.spot-card-tile.transit   {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/category/transit.webp') center/cover no-repeat,linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.tl-cat.other     {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/other.webp') center/cover no-repeat,linear-gradient(135deg,#736F63,#BAB3A0);}
.spot-card-tile.other     {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/category/other.webp') center/cover no-repeat,linear-gradient(135deg,#736F63,#BAB3A0);}
.tl-cat > svg,
.spot-card-tile > svg{opacity:0;}

.tl-info{display:flex;flex-direction:column;gap:1px;min-width:0;justify-content:center;}
.tl-name{font-size:13.5px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2;}
.tl-meta{font-size:11px;color:var(--muted);display:flex;gap:6px;align-items:center;flex-wrap:wrap;line-height:1.2;}
.tl-meta .dot{width:2.5px;height:2.5px;border-radius:50%;background:var(--muted);display:inline-block;}
.tl-meta .star{color:var(--gold);font-weight:600;}
.tl-handle{width:24px;height:24px;display:grid;place-items:center;color:var(--muted);opacity:.45;cursor:grab;touch-action:none;}
.tl-handle:active{cursor:grabbing;}
.tl-handle svg{width:14px;height:14px;}
.tl-handle.is-locked{opacity:.18;cursor:default;pointer-events:none;}

.tl-gap{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center;padding:8px 0;}
.tl-gap.has-actions{grid-template-columns:42px 1fr auto;}
.tl-gap-icon{display:flex;justify-content:flex-end;align-items:center;color:var(--muted);opacity:.7;}
.tl-gap-icon svg{width:16px;height:16px;}
.tl-gap-meta{
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;font-weight:600;color:var(--muted);
  letter-spacing:.12em;text-transform:uppercase;
  font-variant-numeric:tabular-nums;
  display:flex;align-items:center;gap:7px;flex-wrap:wrap;
}
.tl-gap-meta .sep{opacity:.45;}

.tl-gap-explain{
  display:inline-grid;place-items:center;width:16px;height:16px;margin-left:2px;
  border:none;background:transparent;cursor:pointer;
  color:var(--muted);opacity:.55;border-radius:50%;
  transition:opacity .15s, color .15s, background .15s;
}
.tl-gap-explain svg{width:11px;height:11px;}
.tl-gap-explain:hover{opacity:1;color:var(--text);}
.tl-gap-explain:active{transform:scale(.92);}

.tl-gap-actions{display:flex;align-items:center;gap:6px;min-width:0;}
.tl-gap-nav{
  width:32px;height:32px;display:grid;place-items:center;
  border:1px solid var(--line);background:var(--paper-2);
  border-radius:50%;cursor:pointer;color:var(--muted);
  transition:background .15s, color .15s, border-color .15s, transform .12s;
}
.tl-gap-nav svg{width:15px;height:15px;}
.tl-gap-nav:hover{background:rgba(74,140,138,.10);border-color:rgba(74,140,138,.35);color:var(--accent);}
.tl-gap-nav:active{transform:scale(.94);}
html[data-theme="dark"] .tl-gap-nav{background:rgba(255,255,255,.04);}

.tl-gap-mode{
  position:relative;width:28px;height:28px;display:grid;place-items:center;
  background:none;border:none;cursor:pointer;
  color:var(--muted);opacity:.7;border-radius:50%;
  transition:background .15s, color .15s, opacity .15s, transform .12s;
}
.tl-gap-mode svg{width:16px;height:16px;}
.tl-gap-mode:hover{background:rgba(28,23,19,.05);opacity:1;}
.tl-gap-mode:active{transform:scale(.92);color:var(--text);opacity:1;}
html[data-theme="dark"] .tl-gap-mode:hover{background:rgba(255,255,255,.06);}
.tl-gap-mode.is-auto-flash{animation:gapModeFlash 4s linear forwards;}
@keyframes gapModeFlash{
  0%, 8%    {color:#4A9D5F;}
  9%, 20%   {color:var(--muted);}
  21%, 28%  {color:#4A9D5F;}
  29%, 40%  {color:var(--muted);}
  41%, 48%  {color:#4A9D5F;}
  49%, 60%  {color:var(--muted);}
  61%, 68%  {color:#4A9D5F;}
  69%, 80%  {color:var(--muted);}
  81%, 88%  {color:#4A9D5F;}
  89%, 100% {color:var(--muted);}
}
@media (prefers-reduced-motion: reduce){.tl-gap-mode.is-auto-flash{animation:none;}}

.tl-gap-info{
  width:16px;height:16px;display:grid;place-items:center;
  background:none;border:none;cursor:pointer;
  color:var(--muted);opacity:.85;border-radius:50%;
  transition:opacity .15s, color .15s;
}
.tl-gap-info svg{width:12px;height:12px;}
.tl-gap-info:active{opacity:1;color:var(--text);}

/* Plan view — Your day / Spots two-section layout */
.plan-section{margin:14px 0 36px;}
.plan-section-head{padding:0 18px 8px;display:flex;align-items:baseline;justify-content:space-between;gap:10px;}
.plan-section-label{
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.18em;
  text-transform:uppercase;color:var(--muted);font-weight:600;
}
.plan-section-label b{color:var(--text);font-weight:700;}
.plan-section-hint{font-family:'DM Sans',sans-serif;font-size:11px;color:var(--muted);}

.your-day-cue{
  margin:0 0 8px;padding:14px 16px;
  border:1.5px dashed rgba(28,23,19,.10);border-radius:14px;
  text-align:center;color:var(--muted);font-size:12.5px;line-height:1.45;
}
html[data-theme="dark"] .your-day-cue{border-color:rgba(255,255,255,.10);}
.your-day-cue b{color:var(--text);font-weight:600;}

.spots-empty{
  margin:0 18px;padding:14px 16px;
  border:1.5px dashed rgba(28,23,19,.10);border-radius:14px;
  text-align:center;color:var(--muted);font-size:12.5px;
}
html[data-theme="dark"] .spots-empty{border-color:rgba(255,255,255,.10);}

.spots-filter{display:flex;align-items:center;gap:8px;padding:0 18px 8px;}
.spots-filter-search-btn{
  flex-shrink:0;width:28px;height:28px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--paper-2);border:1px solid var(--line);
  color:var(--muted);cursor:pointer;
  transition:background .15s, color .15s, border-color .15s, transform .12s;
}
.spots-filter-search-btn svg{width:13px;height:13px;}
.spots-filter-search-btn:active{transform:scale(.94);}
html[data-theme="dark"] .spots-filter-search-btn{background:rgba(255,255,255,.04);}
.spots-filter.is-searching .spots-filter-search-btn{
  background:rgba(74,140,138,.10);border-color:rgba(74,140,138,.32);color:var(--accent);
}

.spots-filter-chips{
  flex:1;min-width:0;display:flex;align-items:center;gap:6px;
  overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;
}
.spots-filter-chips::-webkit-scrollbar{display:none;}
.spots-filter-search{
  flex:1;min-width:0;display:none;align-items:center;
  background:var(--paper-2);border:1px solid var(--line);border-radius:99px;
  transition:border-color .2s, box-shadow .2s;
}
html[data-theme="dark"] .spots-filter-search{background:rgba(255,255,255,.04);}
.spots-filter-search:focus-within{border-color:rgba(74,140,138,.45);box-shadow:0 0 0 3px rgba(74,140,138,.10);}
.spots-filter-search-input{
  flex:1;min-width:0;border:none;background:transparent;outline:none;
  font-family:'DM Sans',sans-serif;font-size:12.5px;color:var(--text);
  padding:5px 4px 5px 12px;
}
.spots-filter-search-input::placeholder{color:var(--muted);}
.spots-filter-search-close{
  width:24px;height:24px;flex-shrink:0;margin-right:3px;
  display:flex;align-items:center;justify-content:center;
  border:none;background:transparent;border-radius:50%;cursor:pointer;
  color:var(--muted);transition:background .15s,color .15s;
}
.spots-filter-search-close svg{width:11px;height:11px;}
.spots-filter-search-close:hover{background:rgba(28,23,19,.06);color:var(--text);}
html[data-theme="dark"] .spots-filter-search-close:hover{background:rgba(255,255,255,.08);}
.spots-filter.is-searching .spots-filter-chips{display:none;}
.spots-filter.is-searching .spots-filter-search{display:flex;}

.spots-filter-chip{
  flex-shrink:0;padding:5px 12px;border-radius:99px;
  background:var(--paper-2);border:1px solid var(--line);
  display:inline-flex;align-items:center;gap:7px;
  font-family:'DM Sans',sans-serif;font-size:12px;font-weight:500;
  color:var(--text);cursor:pointer;
  transition:background .15s, color .15s, border-color .15s, transform .12s;
}
.spots-filter-chip:active{transform:scale(.96);}
.spots-filter-chip::before{
  content:"";width:6px;height:6px;border-radius:50%;flex-shrink:0;background:transparent;
}
.spots-filter-chip.food::before      {background:#B5604A;}
.spots-filter-chip.sights::before    {background:#3D5A6E;}
.spots-filter-chip.activities::before{background:#5B6E50;}
.spots-filter-chip.shopping::before  {background:#9A6538;}
.spots-filter-chip.nature::before    {background:#3F7768;}
.spots-filter-chip.transit::before   {background:#4E5A6B;}
.spots-filter-chip.other::before     {background:#736F63;}
.spots-filter-chip.is-all::before{display:none;}
.spots-filter-chip.is-active{color:#FFF;border-color:transparent;}
.spots-filter-chip.is-active::before{visibility:hidden;}
.spots-filter-chip.is-all.is-active     {background:var(--teal);}
.spots-filter-chip.food.is-active       {background:linear-gradient(135deg,#B5604A,#EAB09E);}
.spots-filter-chip.sights.is-active     {background:linear-gradient(135deg,#3D5A6E,#89B5C4);}
.spots-filter-chip.activities.is-active {background:linear-gradient(135deg,#5B6E50,#ABC4A0);}
.spots-filter-chip.shopping.is-active   {background:linear-gradient(135deg,#9A6538,#DFB291);}
.spots-filter-chip.nature.is-active     {background:linear-gradient(135deg,#3F7768,#8FC4B3);}
.spots-filter-chip.transit.is-active    {background:linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.spots-filter-chip.other.is-active      {background:linear-gradient(135deg,#736F63,#BAB3A0);}
html[data-theme="dark"] .spots-filter-chip{background:rgba(255,255,255,.04);}

.spots-empty-search{
  margin:4px 18px 6px;padding:14px;
  border:1px dashed var(--line);border-radius:12px;
  text-align:center;color:var(--muted);font-size:12.5px;
}
html[data-theme="dark"] .spots-empty-search{border-color:rgba(255,255,255,.10);}

.spots-strip{
  display:flex;gap:10px;padding:0 18px 6px;
  overflow-x:auto;scroll-snap-type:x proximity;
  scrollbar-width:none;-ms-overflow-style:none;
}
.spots-strip::-webkit-scrollbar{display:none;}

.spot-card{
  flex:0 0 154px;
  background:var(--paper-2);border:1px solid var(--line);border-radius:14px;
  padding:10px 12px 12px;
  display:flex;flex-direction:column;gap:8px;
  scroll-snap-align:start;position:relative;cursor:pointer;
  box-shadow:0 1px 2px rgba(28,23,19,.03);
  transition:transform .18s, box-shadow .18s;
}
.spot-card:active{transform:scale(.97);box-shadow:0 4px 12px rgba(28,23,19,.10);}

.spot-card-tile{
  width:100%;height:54px;border-radius:10px;
  display:grid;place-items:center;color:#FFF;position:relative;
}
.spot-card-tile svg{width:22px;height:22px;}
.spot-card-eye{
  position:absolute;top:5px;right:5px;
  width:22px;height:22px;display:grid;place-items:center;
  background:rgba(255,247,237,.92);border:0;border-radius:50%;
  color:var(--ink);cursor:pointer;
  box-shadow:0 1px 3px rgba(28,23,19,.18);
  transition:transform .15s, background .15s;
}
.spot-card-eye svg{width:12px;height:12px;}
.spot-card-eye:active{transform:scale(.92);background:#FFF;}
html[data-theme="dark"] .spot-card-eye{background:rgba(40,36,30,.92);color:var(--ink);}

.spot-card-name{
  font-size:13px;font-weight:600;color:var(--ink);line-height:1.25;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;min-height:2.4em;
}
.spot-card-meta{
  font-size:11px;color:var(--muted);
  display:flex;gap:5px;align-items:center;flex-wrap:wrap;
}
.spot-card-meta .star{color:var(--gold);font-weight:600;}
.spot-card-meta .dot{width:2.5px;height:2.5px;border-radius:50%;background:var(--muted);display:inline-block;}

.spot-card.is-scheduling{animation:spotPlace .42s cubic-bezier(.4,0,.2,1) forwards;pointer-events:none;}
@keyframes spotPlace{
  0%{transform:scale(1) translateY(0);opacity:1;}
  35%{transform:scale(1.06) translateY(-4px);opacity:1;}
  100%{transform:scale(.55) translateY(-46px);opacity:0;}
}

.tl-card.just-scheduled{animation:stopArrive .9s ease-out;}
@keyframes stopArrive{
  0%{background:#E1ECEA;border-color:#9BCEC5;}
  100%{background:var(--paper-2);border-color:var(--line);}
}

/* Map peek strip — pinned bottom of plan/map view */
.map-peek{
  position:absolute;left:0;right:0;bottom:0;
  border-top:1px solid var(--line);background:var(--paper);
  padding:8px 18px 14px;z-index:10;
}
.map-peek-handle{width:36px;height:4px;border-radius:2px;background:rgba(28,23,19,.18);margin:0 auto 8px;}
html[data-theme="dark"] .map-peek-handle{background:rgba(255,255,255,.18);}
.map-peek-row{display:flex;align-items:center;gap:12px;}
.map-thumb{
  width:44px;height:44px;border-radius:10px;
  background:#FBF6EC url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/map-tiles/terrain.webp') center/120% no-repeat;
  position:relative;overflow:hidden;flex-shrink:0;border:1px solid var(--line);
}
.map-meta{flex:1;display:flex;flex-direction:column;gap:2px;}
.map-title{font-size:13px;font-weight:600;color:var(--ink);}
.map-sub{font-size:11.5px;color:var(--muted);}
.map-expand{
  width:36px;height:36px;border-radius:50%;background:var(--ink);color:var(--paper);
  display:grid;place-items:center;border:none;cursor:pointer;
}
.map-expand svg{width:14px;height:14px;}

.map-tick{
  width:36px;height:36px;border-radius:50%;
  background:rgba(28,23,19,.06);color:var(--text);
  display:grid;place-items:center;flex-shrink:0;border:none;cursor:pointer;
  transition:background .18s, color .18s, transform .15s;
}
html[data-theme="dark"] .map-tick{background:rgba(255,255,255,.08);}
.map-tick svg{width:16px;height:16px;}
.map-tick:active{transform:scale(.92);}
.map-tick.is-complete{background:#B8D4CE;color:#2F6664;}
html[data-theme="dark"] .map-tick.is-complete{background:rgba(143,181,174,.32);color:#9BCEC5;}

.fab-add{
  position:absolute;right:22px;bottom:108px;
  background:var(--text);color:var(--card);border-radius:30px;
  padding:13px 20px 13px 16px;display:flex;align-items:center;gap:8px;
  font-size:14px;font-weight:600;border:none;cursor:pointer;
  box-shadow:0 12px 28px rgba(28,23,19,.30);z-index:5;
  transition:transform .12s, box-shadow .15s;
}
.fab-add:active{transform:scale(.96);}
.fab-add svg{width:14px;height:14px;}

/* Re-anchor prod's .fab inside the add sheet so the custom-form FAB
   floats at the bottom of the sheet, not the viewport. Scoped to
   #dtAddSheet so trip-form's #addSheet (which shares the .add-sheet
   class) is unaffected. */
#dtAddSheet .fab{
  position:absolute;
  bottom:60px;right:22px;
  width:50px;height:50px;
  z-index:52;
}
/* Sandbox parity: the + icon inside the FAB needs an explicit white
   stroke at 2.5px to match the sandbox's punchy look — without this,
   the SVG inherits currentColor (dark text) on the dark button and
   reads as a thin grey ghost rather than a crisp white plus. */
#dtAddSheet .fab svg{
  width:20px;height:20px;
  stroke:#FFF;stroke-width:2.5;fill:none;
}

/* Spot details popup */
.spot-details-popup{
  position:absolute;top:50%;left:50%;
  width:min(86%, 340px);max-height:74%;overflow:auto;
  transform:translate(-50%, -50%) scale(.94);opacity:0;
  background:var(--paper-2);border-radius:18px;
  padding:18px 18px 20px;z-index:1200;
  box-shadow:var(--shadow-deep);
  transition:transform .22s cubic-bezier(.32,.72,0,1), opacity .18s ease;
  -ms-overflow-style:none;scrollbar-width:none;
}
.spot-details-popup::-webkit-scrollbar{display:none;}
.spot-details-popup.open{transform:translate(-50%, -50%) scale(1);opacity:1;}
.spot-details-head{
  display:grid;grid-template-columns:48px 1fr;gap:12px;
  align-items:center;margin-bottom:14px;
}
.spot-details-head .spot-card-tile{
  width:48px;height:48px;aspect-ratio:auto;border-radius:12px;flex:none;
}
.spot-details-head .spot-card-tile svg{width:22px;height:22px;}
.spot-details-text{display:flex;flex-direction:column;gap:3px;min-width:0;}
.spot-details-name{
  font-family:'Playfair Display',serif;font-size:18px;font-weight:600;
  color:var(--ink);line-height:1.2;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.spot-details-meta{
  font-family:'DM Sans',sans-serif;font-size:12px;color:var(--muted);
  display:flex;align-items:center;gap:6px;
}
.spot-details-meta .star{color:var(--gold);font-weight:600;}
.spot-details-body{border-top:1px solid var(--border);padding-top:12px;}
.spot-details-empty{
  font-family:'DM Sans',sans-serif;font-size:13px;color:var(--muted);
  text-align:center;padding:8px 0 4px;font-style:italic;
}
.spot-details-body .as-item-expand{padding:0;}

/* Estimates disclaimer */
.est-disclaimer{
  position:absolute;top:50%;left:50%;
  width:min(88%, 360px);max-height:80%;overflow:auto;
  transform:translate(-50%, -50%) scale(.94);opacity:0;
  background:var(--paper);border-radius:20px;
  padding:22px 22px 20px;z-index:1200;
  box-shadow:var(--shadow-deep);
  transition:transform .24s cubic-bezier(.32,.72,0,1), opacity .18s ease;
  -ms-overflow-style:none;scrollbar-width:none;
}
.est-disclaimer::-webkit-scrollbar{display:none;}
.est-disclaimer.open{transform:translate(-50%, -50%) scale(1);opacity:1;}
html[data-theme="dark"] .est-disclaimer{background:var(--paper-2);}
.est-disclaimer-head{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.est-disclaimer-icon{
  width:32px;height:32px;flex-shrink:0;padding:7px;border-radius:50%;
  background:rgba(234, 176, 158, .35);color:#9A4F36;
}
html[data-theme="dark"] .est-disclaimer-icon{background:rgba(234, 176, 158, .18);color:#EAB09E;}
.est-disclaimer-title{
  font-family:'Playfair Display',serif;
  font-size:18px;font-weight:600;color:var(--text);line-height:1.2;
}
.est-disclaimer-body{
  font-family:'DM Sans',sans-serif;
  font-size:13.5px;line-height:1.55;color:var(--muted);
  margin:6px 0 16px;
}
.est-disclaimer-body p{margin:0 0 9px;}
.est-disclaimer-body p:last-child{margin-bottom:0;}
.est-disclaimer-toggle{
  display:flex;align-items:flex-start;gap:11px;
  padding:12px;margin-bottom:14px;
  background:var(--paper-2);border:1px solid var(--line);
  border-radius:12px;cursor:pointer;transition:background .15s;
}
.est-disclaimer-toggle:hover{background:rgba(28,23,19,.04);}
html[data-theme="dark"] .est-disclaimer-toggle{background:rgba(255,255,255,.03);}
html[data-theme="dark"] .est-disclaimer-toggle:hover{background:rgba(255,255,255,.06);}
.est-disclaimer-toggle input[type="checkbox"]{
  appearance:none;-webkit-appearance:none;
  width:18px;height:18px;flex-shrink:0;margin-top:1px;
  border:1.5px solid var(--line);border-radius:5px;
  background:var(--paper);cursor:pointer;
  transition:background .15s, border-color .15s;position:relative;
}
.est-disclaimer-toggle input[type="checkbox"]:checked{background:var(--accent);border-color:var(--accent);}
.est-disclaimer-toggle input[type="checkbox"]:checked::after{
  content:"";position:absolute;left:5px;top:1px;
  width:5px;height:10px;border:solid #FFF;
  border-width:0 2px 2px 0;transform:rotate(45deg);
}
.est-disclaimer-toggle-meta{flex:1;min-width:0;}
.est-disclaimer-toggle-label{
  font-family:'DM Sans',sans-serif;font-size:13.5px;font-weight:600;
  color:var(--text);margin-bottom:2px;
}
.est-disclaimer-toggle-sub{
  font-family:'DM Sans',sans-serif;font-size:11.5px;color:var(--muted);line-height:1.4;
}
.est-disclaimer-cta{
  width:100%;padding:12px;
  border:none;border-radius:12px;cursor:pointer;
  background:var(--ink);color:var(--paper);
  font-family:'DM Sans',sans-serif;font-size:14px;font-weight:600;
  transition:transform .12s, background .15s, opacity .15s;
}
.est-disclaimer-cta:active{transform:scale(.98);}
.est-disclaimer-cta:hover{opacity:.92;}
html[data-theme="dark"] .est-disclaimer-cta{background:var(--paper);color:var(--ink);}

/* ════════════════════════════════════════════
   MAP RAISED VIEW
   ════════════════════════════════════════════ */
.map-raised{flex:1;background:var(--paper);position:relative;overflow:hidden;}
.day-leaflet{
  position:absolute;inset:0;z-index:1;
  background:#F5F1E8;
}

/* No route polyline by design — pins pulse instead so each location
   reads as a "place worth going to" rather than a node on a delivery
   route. */
.day-pin{background:transparent !important;border:0;}
.day-pin-bubble{
  width:32px;height:32px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--teal);color:#FFF;
  font-family:'DM Sans',sans-serif;font-size:13px;font-weight:700;
  border:2px solid #FFF;
  box-shadow:0 4px 10px rgba(28,23,19,.30);
  transition:box-shadow .25s ease;cursor:pointer;
}
.day-pin-bubble.food      {background:linear-gradient(135deg,#B5604A,#EAB09E);}
.day-pin-bubble.sights    {background:linear-gradient(135deg,#3D5A6E,#89B5C4);}
.day-pin-bubble.activities{background:linear-gradient(135deg,#5B6E50,#ABC4A0);}
.day-pin-bubble.shopping  {background:linear-gradient(135deg,#9A6538,#DFB291);}
.day-pin-bubble.nature    {background:linear-gradient(135deg,#3F7768,#8FC4B3);}
.day-pin-bubble.transit   {background:linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.day-pin-bubble.other     {background:linear-gradient(135deg,#736F63,#BAB3A0);}
.day-pin.is-active .day-pin-bubble{
  box-shadow:
    0 0 0 3px var(--accent),
    0 0 18px 4px rgba(74,140,138,.55),
    0 4px 12px rgba(28,23,19,.40);
}
.day-pin-bubble{position:relative;z-index:2;}

/* Ambient pulse — two concentric rings ripple outward from each pin on
   a 2.4s loop. The `--i` custom property staggers neighbouring pins so
   they don't all pulse in lockstep. The .lag wave runs half a cycle
   behind so each pin always has a ring mid-flight. Color matches the
   pin's category so the eye reads "this kind of place is here". */
.day-pin-wave{
  position:absolute;top:50%;left:50%;
  width:28px;height:28px;border-radius:50%;
  border:1.5px solid currentColor;
  transform:translate(-50%,-50%) scale(.9);
  opacity:0;pointer-events:none;z-index:1;
  animation:dt-pin-wave 2.4s cubic-bezier(.22,.7,.25,1) infinite;
  animation-delay:calc(var(--i,0) * .28s);
}
.day-pin-wave.lag{animation-delay:calc(var(--i,0) * .28s + 1.2s);}
.day-pin-wave.food      {color:#B5604A;}
.day-pin-wave.sights    {color:#3D5A6E;}
.day-pin-wave.activities{color:#5B6E50;}
.day-pin-wave.shopping  {color:#9A6538;}
.day-pin-wave.nature    {color:#3F7768;}
.day-pin-wave.transit   {color:#4E5A6B;}
.day-pin-wave.other     {color:#736F63;}
@keyframes dt-pin-wave{
  0%  {transform:translate(-50%,-50%) scale(.9);opacity:.55;}
  70% {opacity:.10;}
  100%{transform:translate(-50%,-50%) scale(1.7);opacity:0;}
}
@media (prefers-reduced-motion: reduce){
  .day-pin-wave{animation:none;display:none;}
}

.map-notice{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  background:var(--paper);border:1px solid var(--line);
  border-radius:14px;padding:16px 20px;
  max-width:280px;text-align:center;
  box-shadow:0 8px 24px rgba(28,23,19,.10);z-index:5;
}
.map-notice-title{
  font-family:'Playfair Display',serif;font-size:17px;font-weight:600;
  color:var(--ink);margin-bottom:4px;
}
.map-notice-body{font-size:12.5px;color:var(--muted);line-height:1.45;}
.map-notice.is-small{
  top:18px;left:50%;transform:translateX(-50%);
  padding:8px 14px;max-width:none;
}
.map-notice.is-small .map-notice-body{font-size:11.5px;}

.map-card{
  position:absolute;left:18px;right:18px;bottom:108px;background:var(--paper);
  border-radius:18px;padding:14px;
  display:flex;flex-direction:column;
  box-shadow:var(--shadow-deep);z-index:5;
  transform:translateY(0);transition:transform .25s cubic-bezier(.32,.72,0,1), opacity .2s;
}
.map-card.hidden{transform:translateY(120%);opacity:0;}
.map-card-head{display:grid;grid-template-columns:48px 1fr auto;gap:12px;align-items:center;}
.map-card .tl-cat{width:48px;height:48px;border-radius:14px;font-size:20px;}
.map-card .tl-name{font-size:15px;}
.map-card-sub{font-size:11.5px;color:var(--muted);margin-top:2px;}
.map-card-eye{
  width:36px;height:36px;border-radius:50%;
  background:rgba(28,23,19,.06);
  display:grid;place-items:center;color:var(--ink);
  border:0;cursor:pointer;
  transition:background .18s, color .18s;
}
html[data-theme="dark"] .map-card-eye{background:rgba(255,255,255,.08);}
.map-card-eye svg{width:18px;height:18px;}
.map-card-eye:active{transform:scale(.94);}
.map-card-eye.is-active{background:var(--accent);color:#FFF;}
.map-card-expand-wrap{
  max-height:0;overflow:hidden;
  transition:max-height .32s cubic-bezier(.32,.72,0,1), padding .32s ease;
  padding-top:0;
}
.map-card.is-expanded .map-card-expand-wrap{max-height:340px;padding-top:12px;}
.map-card-expand-empty{
  font-size:12px;color:var(--muted);font-style:italic;
  padding:8px 4px 4px;text-align:center;
}
.leaflet-control-attribution{
  background:rgba(255,247,237,.85) !important;
  font-size:10px !important;color:var(--muted) !important;
  border-radius:0 0 0 6px !important;padding:2px 6px !important;
}
.leaflet-control-attribution a{color:var(--ink) !important;}

/* ════════════════════════════════════════════
   SHARED SCRIM + TOAST (Days v2-namespaced)
   ════════════════════════════════════════════ */
.dt-scrim{
  position:absolute;inset:0;background:rgba(28,23,19,.45);
  backdrop-filter:blur(2px);z-index:50;opacity:0;pointer-events:none;
  transition:opacity .25s;
}
.dt-scrim.in{opacity:1;pointer-events:all;}

.dt-toast{
  position:absolute;left:50%;bottom:210px;transform:translateX(-50%) translateY(20px);
  background:rgba(28,23,19,.95);color:#F5EFE4;padding:10px 18px;border-radius:30px;
  font-size:12.5px;font-weight:500;opacity:0;pointer-events:none;
  transition:transform .25s cubic-bezier(.32,.72,0,1), opacity .2s;
  z-index:1300;display:flex;align-items:center;gap:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.3);
}
.dt-toast svg{width:14px;height:14px;color:var(--gold-soft);}
.dt-toast.in{opacity:1;transform:translateX(-50%) translateY(0);}
.dt-toast[data-type="success"]{background:#2F4E4A;}
.dt-toast[data-type="success"] svg{color:#B8D4CE;}
.dt-toast[data-type="remove"]{background:#5C2F30;}
.dt-toast[data-type="remove"] svg{color:#E8B5B5;}
.dt-toast-action{
  font-family:'DM Sans',sans-serif;font-size:12px;font-weight:700;
  color:var(--gold-soft);text-decoration:underline;
  background:none;border:none;padding:0;margin-left:8px;letter-spacing:.02em;
  text-underline-offset:2px;cursor:pointer;
}
.dt-toast[data-type="success"] .dt-toast-action{color:#B8D4CE;}
.dt-toast[data-type="remove"] .dt-toast-action{color:#E8B5B5;}

/* ════════════════════════════════════════════
   ADD SHEET (Days v2)
   Scoped to #dtAddSheet so it doesn't bleed onto the trip-form sheet
   (#addSheet) which also uses the .add-sheet class. The trip-form sheet
   has its own .add-sheet rule in trip-form.css with different layout
   semantics (overlay-anchored, max-height:96vh, auto-height body).
   ════════════════════════════════════════════ */
#dtAddSheet{
  position:absolute;left:0;right:0;bottom:0;height:82%;
  background:var(--paper);border-radius:24px 24px 0 0;
  padding:8px 20px 24px;display:flex;flex-direction:column;
  box-shadow:var(--shadow-deep);z-index:51;
  transform:translateY(100%);transition:transform .35s cubic-bezier(.32,.72,0,1);
}
#dtAddSheet.in{transform:translateY(0);}
#dtAddSheet .add-sheet-handle{width:42px;height:5px;border-radius:3px;background:rgba(28,23,19,.18);margin:6px auto 14px;}
html[data-theme="dark"] #dtAddSheet .add-sheet-handle{background:rgba(255,255,255,.18);}

.as-tabs{
  display:flex;gap:4px;padding:4px;background:rgba(28,23,19,.05);border-radius:14px;margin-bottom:14px;
}
html[data-theme="dark"] .as-tabs{background:rgba(255,255,255,.06);}
.as-tab{flex:1;padding:9px 0;border-radius:10px;border:none;background:transparent;cursor:pointer;font-size:12.5px;font-weight:600;color:var(--muted);transition:all .15s;}
.as-tab.active{background:var(--paper);color:var(--ink);box-shadow:0 1px 3px rgba(28,23,19,.10);}
html[data-theme="dark"] .as-tab.active{background:var(--paper-2);}

.as-search{display:flex;align-items:center;gap:10px;padding:12px 14px;background:rgba(28,23,19,.04);border-radius:14px;margin-bottom:14px;}
html[data-theme="dark"] .as-search{background:rgba(255,255,255,.05);}
.as-search svg{width:16px;height:16px;color:var(--muted);}
.as-search input{flex:1;border:none;background:transparent;outline:none;font-family:'DM Sans',sans-serif;font-size:14px;color:var(--ink);}
.as-search input::placeholder{color:var(--muted);}

.as-cat-pills{
  display:flex;gap:6px;
  margin:0 0 14px;
  overflow-x:auto;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding:1px 1px 4px;
}
.as-cat-pills::-webkit-scrollbar{display:none;}
.as-cat-pill{
  flex-shrink:0;
  padding:7px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:transparent;
  cursor:pointer;
  font-family:'DM Sans',sans-serif;
  font-size:12.5px;font-weight:600;
  color:var(--muted);
  white-space:nowrap;
  transition:background .15s, color .15s, border-color .15s, transform .15s;
}
.as-cat-pill:active{transform:scale(.96);}
.as-cat-pill.active{
  background:var(--ink);
  color:var(--paper);
  border-color:var(--ink);
}
html[data-theme="dark"] .as-cat-pill.active{
  background:var(--paper);
  color:var(--ink);
  border-color:var(--paper);
}

.as-section-row{padding:8px 4px 10px;}
.as-section-left{
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.18em;
  text-transform:uppercase;color:var(--muted);font-weight:600;
}
.as-section-left b{color:var(--text);font-weight:700;}
.as-section-count{color:var(--text);font-weight:700;}
.as-list{display:flex;flex-direction:column;gap:8px;flex:1;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none;}
.as-list::-webkit-scrollbar{display:none;}

.as-item{
  display:flex;flex-direction:column;flex-shrink:0;
  border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.5);
  transition:background .2s, border-color .2s;overflow:hidden;
  animation:as-item-fade-in .26s cubic-bezier(.32,.72,0,1) both;
}
@keyframes as-item-fade-in{
  from{opacity:0;transform:translateY(6px);}
  to{opacity:1;transform:translateY(0);}
}
@media (prefers-reduced-motion: reduce){
  .as-item{animation:none;}
}
html[data-theme="dark"] .as-item{background:rgba(255,255,255,.03);}
.as-item.added-state{border-color:rgba(184,212,206,.55);background:rgba(184,212,206,.10);}
html[data-theme="dark"] .as-item.added-state{border-color:rgba(143,181,174,.30);background:rgba(143,181,174,.06);}
.as-item.is-expanded{background:var(--paper-2);border-color:var(--border);}
.as-item-body{display:flex;align-items:center;gap:11px;padding:14px 12px;cursor:pointer;}
.as-item .as-item-thumb{flex-shrink:0;}
.as-item .as-item-info{flex:1;min-width:0;}
.as-item-chev{
  width:16px;height:16px;color:var(--muted);opacity:.5;flex-shrink:0;
  transition:transform .55s cubic-bezier(.22,.7,.25,1);
}
.as-item.is-expanded .as-item-chev{transform:rotate(180deg);}

.as-added-tag{
  display:inline-flex;align-items:center;
  background:rgba(184,212,206,.45);color:#2F6664;
  padding:2px 8px;border-radius:99px;
  font-family:'DM Sans',sans-serif;font-size:10.5px;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase;
}
html[data-theme="dark"] .as-added-tag{background:rgba(143,181,174,.20);color:#9BCEC5;}
.as-added-tag.just-added{animation:addedTagReveal .55s cubic-bezier(.22,.7,.25,1) both;}
@keyframes addedTagReveal{
  0%   { opacity:0; transform:translateX(-6px) scale(.85); }
  60%  { opacity:1; transform:translateX(0) scale(1.05); }
  100% { opacity:1; transform:translateX(0) scale(1); }
}

.as-item-expand-wrap{
  max-height:0;overflow:hidden;opacity:0;
  transition:max-height .6s cubic-bezier(.22,.7,.25,1), opacity .45s ease;
}
.as-item.is-expanded .as-item-expand-wrap{max-height:800px;opacity:1;}

.as-item-thumb{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;color:#FFF;flex-shrink:0;}
.as-item-thumb svg{width:22px;height:22px;}
.as-item-thumb.food      {background:linear-gradient(135deg,#B5604A,#EAB09E);}
.as-item-thumb.sights    {background:linear-gradient(135deg,#3D5A6E,#89B5C4);}
.as-item-thumb.activities{background:linear-gradient(135deg,#5B6E50,#ABC4A0);}
.as-item-thumb.shopping  {background:linear-gradient(135deg,#9A6538,#DFB291);}
.as-item-thumb.nature    {background:linear-gradient(135deg,#3F7768,#8FC4B3);}
.as-item-thumb.transit   {background:linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.as-item-thumb.other     {background:linear-gradient(135deg,#736F63,#BAB3A0);}
.as-item-thumb.food      {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/food.webp') center/cover no-repeat,linear-gradient(135deg,#B5604A,#EAB09E);}
.as-item-thumb.sights    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/sights.webp') center/cover no-repeat,linear-gradient(135deg,#3D5A6E,#89B5C4);}
.as-item-thumb.activities{background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/activities.webp') center/cover no-repeat,linear-gradient(135deg,#5B6E50,#ABC4A0);}
.as-item-thumb.shopping  {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/shopping.webp') center/cover no-repeat,linear-gradient(135deg,#9A6538,#DFB291);}
.as-item-thumb.nature    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/nature.webp') center/cover no-repeat,linear-gradient(135deg,#3F7768,#8FC4B3);}
.as-item-thumb.transit   {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/transit.webp') center/cover no-repeat,linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.as-item-thumb.other     {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/other.webp') center/cover no-repeat,linear-gradient(135deg,#736F63,#BAB3A0);}
.as-item-thumb > svg{opacity:0;}

.as-item-info{display:flex;flex-direction:column;gap:2px;min-width:0;}
.as-item-name{font-size:14px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.as-item-meta{font-size:11.5px;color:var(--muted);display:flex;gap:6px;align-items:center;flex-wrap:wrap;min-height:14px;}
.as-item-meta .star{color:var(--gold);font-weight:600;}

.as-item-bookmark{
  width:34px;height:34px;border-radius:50%;
  background:transparent;border:1px solid var(--border);
  color:var(--muted);display:grid;place-items:center;flex-shrink:0;cursor:pointer;
  transition:background .15s, color .15s, border-color .15s, transform .12s;
}
.as-item-bookmark:hover{background:rgba(28,23,19,.04);color:var(--text);}
.as-item-bookmark:active{transform:scale(.92);}
.as-item-bookmark svg{width:14px;height:14px;}
.as-item-bookmark.saved{
  color:var(--eyebrow-rust);border-color:rgba(184,96,74,.30);background:rgba(184,96,74,.05);
}
html[data-theme="dark"] .as-item-bookmark.saved{
  color:var(--gold-soft);border-color:rgba(232,184,113,.32);background:rgba(232,184,113,.06);
}

.as-item-add{
  position:relative;
  width:34px;height:34px;border-radius:50%;
  background:var(--text);color:var(--card);
  display:grid;place-items:center;flex-shrink:0;border:none;cursor:pointer;
  overflow:hidden;
  transition:background-color .55s cubic-bezier(.22,.7,.25,1),
             color .55s cubic-bezier(.22,.7,.25,1),
             transform .15s ease;
}
.as-item-add:active{transform:scale(.94);}

.as-item-remove{
  width:34px;height:34px;border-radius:50%;
  background:transparent;border:1px solid var(--border);
  color:var(--muted);display:grid;place-items:center;flex-shrink:0;cursor:pointer;
  transition:background .18s, color .18s, border-color .18s, transform .12s;
}
.as-item-remove:hover{background:rgba(184,96,74,.06);color:var(--eyebrow-rust);border-color:rgba(184,96,74,.28);}
.as-item-remove:active{transform:scale(.92);}
.as-item-remove svg{width:14px;height:14px;}
html[data-theme="dark"] .as-item-remove:hover{background:rgba(232,184,113,.06);color:var(--gold-soft);border-color:rgba(232,184,113,.30);}

.as-tab.bumping{animation:as-tab-bump .42s cubic-bezier(.22,.7,.25,1);}
@keyframes as-tab-bump{0%{transform:scale(1);}40%{transform:scale(1.08);}100%{transform:scale(1);}}

.as-item-meta .as-meta-state{color:var(--muted);font-weight:500;}
.as-item-meta .as-meta-state.scheduled{color:var(--text);font-weight:600;}
.as-item-add .icon{
  position:absolute;inset:0;display:grid;place-items:center;
  transition:transform .55s cubic-bezier(.22,.7,.25,1), opacity .35s ease;
}
.as-item-add .icon svg{width:14px;height:14px;}
.as-item-add .icon-plus{opacity:1;transform:scale(1) rotate(0deg);}
.as-item-add .icon-tick{opacity:0;transform:scale(.3) rotate(-90deg);}
.as-item-add.added{background:#B8D4CE;color:#2F6664;}
.as-item-add.added .icon-plus{opacity:0;transform:scale(.3) rotate(90deg);}
.as-item-add.added .icon-tick{opacity:1;transform:scale(1) rotate(0deg);}
html[data-theme="dark"] .as-item-add.added{background:rgba(143,181,174,.30);color:#9BCEC5;}

.as-item-expand{
  border-top:1px dashed var(--border);
  padding:14px 14px 16px;
  display:flex;flex-direction:column;gap:10px;
}
.as-expand-desc{
  font-family:'DM Sans',sans-serif;font-size:13px;line-height:1.5;color:var(--text);
}
.as-expand-row{
  display:flex;align-items:center;gap:10px;
  padding:6px 0;background:none;border:none;text-align:left;width:100%;
  font-family:'DM Sans',sans-serif;font-size:12.5px;color:var(--muted);
}
.as-expand-row.is-action{cursor:pointer;color:var(--text);}
.as-expand-row.is-action:hover{color:var(--accent);}
.as-expand-icon{
  width:24px;height:24px;border-radius:6px;background:rgba(28,23,19,.05);
  display:grid;place-items:center;color:var(--muted);flex-shrink:0;
}
html[data-theme="dark"] .as-expand-icon{background:rgba(255,255,255,.06);}
.as-expand-icon svg{width:13px;height:13px;}
.as-expand-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.as-expand-attrib{
  font-family:'IBM Plex Mono',monospace;font-size:9px;color:var(--muted);
  letter-spacing:.05em;padding-top:4px;text-align:right;opacity:.7;
}

.as-empty{
  flex:1;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:40px 16px;text-align:center;color:var(--muted);font-size:13px;
}

/* ════════════════════════════════════════════
   CUSTOM-ENTRY FORM
   ════════════════════════════════════════════ */
.cf-form{
  flex:1;display:flex;flex-direction:column;gap:14px;
  padding:4px 0 76px;overflow-y:auto;
  -ms-overflow-style:none;scrollbar-width:none;
  animation:cfFormIn .38s cubic-bezier(.22,.7,.25,1) both;
}
.cf-form::-webkit-scrollbar{display:none;}
@keyframes cfFormIn{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:translateY(0);}}

.cf-back{
  width:34px;height:34px;border-radius:50%;border:none;cursor:pointer;
  background:rgba(28,23,19,.05);color:var(--ink);
  display:grid;place-items:center;flex-shrink:0;align-self:flex-start;
  transition:transform .15s,background .15s;
}
.cf-back:active{transform:scale(.94);}
.cf-back svg{width:16px;height:16px;}
html[data-theme="dark"] .cf-back{background:rgba(255,255,255,.06);}

.cf-preview{
  display:flex;align-items:center;gap:11px;
  padding:14px 12px;border-radius:14px;
  background:rgba(28,23,19,.04);
  border:1px dashed rgba(28,23,19,.18);
}
html[data-theme="dark"] .cf-preview{background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.14);}
.cf-preview-name{
  font-size:14px;font-weight:600;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.cf-preview-name.is-placeholder{color:var(--muted);font-weight:500;font-style:italic;}
.cf-preview-meta{font-size:11.5px;color:var(--muted);margin-top:2px;}

.cf-section{display:flex;flex-direction:column;gap:8px;}
.cf-label{
  font-family:'IBM Plex Mono',monospace;font-size:10px;
  letter-spacing:.08em;text-transform:uppercase;color:var(--muted);
}
.cf-label-opt{margin-left:2px;opacity:.55;font-weight:400;}

.cf-input{
  width:100%;border:none;outline:none;
  background:rgba(28,23,19,.04);border-radius:12px;padding:13px 14px;
  font-family:'DM Sans',sans-serif;font-size:15px;color:var(--ink);
  transition:background .15s;box-sizing:border-box;
}
html[data-theme="dark"] .cf-input{background:rgba(255,255,255,.05);}
.cf-input:focus{background:rgba(28,23,19,.07);}
html[data-theme="dark"] .cf-input:focus{background:rgba(255,255,255,.08);}
.cf-input::placeholder{color:var(--muted);}
.cf-textarea{min-height:60px;resize:none;line-height:1.45;font-size:14px;}

.cf-chips{
  display:flex;gap:8px;overflow-x:auto;
  -ms-overflow-style:none;scrollbar-width:none;padding-bottom:2px;
}
.cf-chips::-webkit-scrollbar{display:none;}
.cf-chip{
  display:flex;align-items:center;gap:6px;flex-shrink:0;
  padding:8px 14px;border-radius:99px;border:1px solid transparent;cursor:pointer;
  background:rgba(28,23,19,.04);color:var(--ink);
  font-family:'DM Sans',sans-serif;font-size:13px;font-weight:500;
  transition:background .15s,color .15s,transform .12s;
}
.cf-chip:active{transform:scale(.95);}
html[data-theme="dark"] .cf-chip{background:rgba(255,255,255,.05);}
.cf-chip svg{width:14px;height:14px;}
.cf-chip.active{background:var(--text);color:var(--card);}
html[data-theme="dark"] .cf-chip.active{background:var(--card);color:var(--text);}

.cf-submit{
  position:absolute;left:20px;right:20px;bottom:20px;
  background:var(--text);color:var(--card);
  border:none;cursor:pointer;border-radius:30px;padding:15px 22px;
  font-family:'DM Sans',sans-serif;font-size:15px;font-weight:600;
  display:flex;align-items:center;justify-content:center;gap:8px;
  box-shadow:0 8px 22px rgba(28,23,19,.25);
  transition:transform .12s,opacity .15s;
  animation:cfFormIn .38s cubic-bezier(.22,.7,.25,1) both;
  animation-delay:.08s;
}
.cf-submit:active{transform:scale(.985);}
.cf-submit:disabled{opacity:.4;cursor:not-allowed;box-shadow:none;}
.cf-submit svg{width:14px;height:14px;}

/* ════════════════════════════════════════════
   BANNER PICKER
   ════════════════════════════════════════════ */
.banner-sheet{
  position:absolute;left:0;right:0;bottom:0;
  background:var(--paper);border-radius:24px 24px 0 0;
  padding:8px 20px 28px;display:flex;flex-direction:column;
  box-shadow:var(--shadow-deep);z-index:51;max-height:72%;overflow-y:auto;
  transform:translateY(100%);transition:transform .35s cubic-bezier(.32,.72,0,1);
}
.banner-sheet.in{transform:translateY(0);}
.banner-sheet-handle{width:42px;height:5px;border-radius:3px;background:rgba(28,23,19,.18);margin:6px auto 14px;}
html[data-theme="dark"] .banner-sheet-handle{background:rgba(255,255,255,.18);}
.banner-sheet-head{margin-bottom:4px;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}
.banner-sheet-title{font-family:'Playfair Display',serif;font-size:22px;font-weight:600;color:var(--ink);}
.banner-sheet-sub{font-family:'DM Sans',sans-serif;font-size:12px;color:var(--muted);margin-top:2px;}
.banner-sheet-clear{
  flex-shrink:0;margin-top:8px;
  font-family:'DM Sans',sans-serif;font-size:12px;font-weight:500;
  color:var(--muted);background:none;border:none;cursor:pointer;
  padding:6px 10px;border-radius:8px;
  transition:background .15s ease, color .15s ease;
}
.banner-sheet-clear:hover{background:rgba(28,23,19,.05);color:var(--text);}
html[data-theme="dark"] .banner-sheet-clear:hover{background:rgba(255,255,255,.06);}
.banner-sheet-section{
  margin-top:18px;
  font-family:'IBM Plex Mono',monospace;font-size:10px;font-weight:600;
  color:var(--muted);letter-spacing:.18em;text-transform:uppercase;
  margin-bottom:10px;
}
.banner-grid{display:grid;grid-template-columns:1fr;gap:12px;}
.banner-tile{
  position:relative;aspect-ratio:3/1;border-radius:12px;overflow:hidden;
  cursor:pointer;border:2px solid transparent;
  transition:transform .15s ease, border-color .15s ease;
}
.banner-tile:active{transform:scale(.97);}
.banner-tile.selected{border-color:var(--accent,#4A8C8A);box-shadow:0 0 0 4px rgba(74,140,138,.18);}
.banner-tile-img{position:absolute;inset:0;background-size:cover;background-position:center;}
.banner-tile-label{
  position:absolute;left:8px;bottom:6px;
  padding:3px 8px;border-radius:6px;
  background:rgba(245,239,228,.92);
  font-family:'IBM Plex Mono',monospace;font-size:9px;font-weight:600;
  color:#1C1713;letter-spacing:.12em;
  border:1px solid rgba(28,23,19,.06);
}
html[data-theme="dark"] .banner-tile-label{background:rgba(28,23,19,.7);color:#F5EFE4;border-color:rgba(255,255,255,.08);}
.banner-tile-check{
  position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:50%;
  background:var(--accent,#4A8C8A);color:#fff;display:none;place-items:center;
}
.banner-tile-check svg{width:13px;height:13px;}
.banner-tile.selected .banner-tile-check{display:grid;}

/* ════════════════════════════════════════════
   SCHEDULE SHEET
   ════════════════════════════════════════════ */
.schedule-sheet{
  position:absolute;left:0;right:0;bottom:0;
  background:var(--paper);border-radius:24px 24px 0 0;
  padding:8px 20px 28px;display:flex;flex-direction:column;
  box-shadow:var(--shadow-deep);z-index:51;max-height:78%;overflow-y:auto;
  transform:translateY(100%);transition:transform .35s cubic-bezier(.32,.72,0,1);
}
.schedule-sheet.in{transform:translateY(0);}
.schedule-sheet-handle{width:42px;height:5px;border-radius:3px;background:rgba(28,23,19,.18);margin:6px auto 14px;}
html[data-theme="dark"] .schedule-sheet-handle{background:rgba(255,255,255,.18);}

.ss-head{display:flex;align-items:center;gap:12px;margin-bottom:8px;}
.ss-head-tile{
  width:48px;height:48px;border-radius:12px;display:grid;place-items:center;color:#FFF;flex-shrink:0;
}
.ss-head-tile svg{width:22px;height:22px;}
.ss-head-tile.food      {background:linear-gradient(135deg,#B5604A,#EAB09E);}
.ss-head-tile.sights    {background:linear-gradient(135deg,#3D5A6E,#89B5C4);}
.ss-head-tile.activities{background:linear-gradient(135deg,#5B6E50,#ABC4A0);}
.ss-head-tile.shopping  {background:linear-gradient(135deg,#9A6538,#DFB291);}
.ss-head-tile.nature    {background:linear-gradient(135deg,#3F7768,#8FC4B3);}
.ss-head-tile.transit   {background:linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.ss-head-tile.other     {background:linear-gradient(135deg,#736F63,#BAB3A0);}
.ss-head-tile.food      {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/food.webp') center/cover no-repeat,linear-gradient(135deg,#B5604A,#EAB09E);}
.ss-head-tile.sights    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/sights.webp') center/cover no-repeat,linear-gradient(135deg,#3D5A6E,#89B5C4);}
.ss-head-tile.activities{background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/activities.webp') center/cover no-repeat,linear-gradient(135deg,#5B6E50,#ABC4A0);}
.ss-head-tile.shopping  {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/shopping.webp') center/cover no-repeat,linear-gradient(135deg,#9A6538,#DFB291);}
.ss-head-tile.nature    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/nature.webp') center/cover no-repeat,linear-gradient(135deg,#3F7768,#8FC4B3);}
.ss-head-tile.transit   {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/transit.webp') center/cover no-repeat,linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.ss-head-tile.other     {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/other.webp') center/cover no-repeat,linear-gradient(135deg,#736F63,#BAB3A0);}
.ss-head-tile > svg{opacity:0;}

.ss-head-text{display:flex;flex-direction:column;gap:2px;min-width:0;}
.ss-head-name{font-family:'Playfair Display',serif;font-size:19px;font-weight:600;color:var(--ink);line-height:1.2;}
.ss-head-meta{font-family:'DM Sans',sans-serif;font-size:12px;color:var(--muted);display:flex;gap:6px;align-items:center;}
.ss-head-meta .star{color:var(--gold);font-weight:600;}
.ss-head-pin{
  margin-left:auto;flex-shrink:0;
  width:36px;height:36px;display:grid;place-items:center;
  background:var(--paper-2);border:1px solid var(--line);border-radius:50%;
  color:var(--ink);cursor:pointer;
  transition:transform .15s, background .15s;
}
.ss-head-pin svg{width:18px;height:18px;}
.ss-head-pin:active{transform:scale(.94);background:var(--card);}

.ss-warning{
  margin:0 0 6px;text-align:center;
  font-family:'DM Sans',sans-serif;font-size:12px;font-weight:500;
  color:#B5604A;line-height:1.45;
  display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;
}
.ss-warning b{color:#B5604A;font-weight:700;}
.ss-warning svg{width:13px;height:13px;flex-shrink:0;}
.ss-cta.is-disabled{
  background:rgba(28,23,19,.30);color:rgba(255,255,255,.85);
  cursor:not-allowed;pointer-events:none;
}
html[data-theme="dark"] .ss-cta.is-disabled{background:rgba(255,255,255,.18);}

.ss-times{display:flex;align-items:flex-end;justify-content:center;gap:18px;margin:32px 0 16px;}
.ss-time-side{
  position:relative;cursor:pointer;border:none;background:transparent;
  display:flex;flex-direction:column;align-items:center;gap:10px;
  padding:0 6px 10px;
  border-bottom:1.5px solid var(--line);
  transition:border-color .2s ease;
}
.ss-time-side:focus-within{border-color:var(--teal);}
.ss-time-label{
  font-family:'IBM Plex Mono',monospace;font-size:10px;font-weight:600;
  color:var(--muted);letter-spacing:.22em;text-transform:uppercase;
}
.ss-time-value{
  font-family:'IBM Plex Mono',monospace;font-size:38px;font-weight:600;
  color:var(--ink);letter-spacing:-.02em;line-height:1;
  font-variant-numeric:tabular-nums;
}
.ss-time-side.is-active{border-color:var(--teal);}
.ss-time-side.is-active .ss-time-label{color:var(--teal-deep);}
.ss-time-side.is-locked{
  cursor:default;border-bottom-style:dotted;border-bottom-color:rgba(28,23,19,.18);
}
.ss-time-side.is-locked .ss-time-value{color:var(--muted);}

.ss-time-arrow{
  flex-shrink:0;margin-bottom:14px;
  font-family:'DM Sans',sans-serif;font-size:18px;font-weight:300;
  color:var(--muted);
}
.ss-times-wrap{position:relative;}

.ss-picker{
  position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:5;
  background:var(--paper);border:1px solid var(--line);border-radius:14px;
  overflow:hidden;
  max-height:200px;overflow-y:auto;
  box-shadow:0 14px 32px rgba(28,23,19,.18),
             inset 0 0 0 1px rgba(255,255,255,.4);
  -ms-overflow-style:none;scrollbar-width:thin;
  transform-origin:top center;
  animation:pickerIn .18s cubic-bezier(.32,.72,0,1) both;
}
@keyframes pickerIn{from{opacity:0;transform:translateY(-4px) scaleY(.96);}to{opacity:1;transform:translateY(0) scaleY(1);}}
.ss-picker-row{
  width:100%;
  padding:11px 18px;
  font-family:'IBM Plex Mono',monospace;font-size:14px;font-weight:500;
  color:var(--text);text-align:center;
  font-variant-numeric:tabular-nums;letter-spacing:-.005em;
  cursor:pointer;background:none;border:none;
  transition:background .12s, color .12s;
}
.ss-picker-row + .ss-picker-row{border-top:1px solid rgba(28,23,19,.04);}
html[data-theme="dark"] .ss-picker-row + .ss-picker-row{border-top-color:rgba(255,255,255,.04);}
.ss-picker-row:hover{background:rgba(74,140,138,.06);color:var(--teal-deep);}
.ss-picker-row.is-selected{background:var(--teal);color:#FFF;font-weight:700;}

.ss-duration{
  text-align:center;margin:0 0 4px;
  font-family:'IBM Plex Mono',monospace;font-size:11px;font-weight:600;
  color:var(--teal-deep);letter-spacing:.08em;text-transform:uppercase;
}
html[data-theme="dark"] .ss-duration{color:#9BCEC5;}

.ss-cta{
  margin-top:22px;padding:14px 22px;border-radius:99px;border:none;cursor:pointer;
  background:var(--text);color:var(--card);
  font-family:'DM Sans',sans-serif;font-size:14px;font-weight:600;
  display:flex;align-items:center;justify-content:center;gap:8px;
  transition:transform .12s, opacity .15s;width:100%;
}
.ss-cta:active{transform:scale(.985);}
.ss-cta svg{width:14px;height:14px;}

.ss-cta.ss-cta-unlock{
  background:transparent;color:#5C8580;
  border:1.5px solid rgba(143,181,174,.55);
}
.ss-cta.ss-cta-unlock:hover{background:rgba(143,181,174,.08);}
html[data-theme="dark"] .ss-cta.ss-cta-unlock{color:#9BCEC5;}

.ss-actions{margin-top:14px;display:flex;align-items:center;justify-content:center;gap:14px;}
.ss-action{
  background:none;border:none;cursor:pointer;
  font-family:'DM Sans',sans-serif;font-size:12.5px;font-weight:500;
  color:var(--muted);padding:6px 4px;
  transition:color .15s;
}
.ss-action:active{color:var(--text);}

/* ════════════════════════════════════════════
   LINKS POPOVER (Resources)
   ════════════════════════════════════════════ */
.links-pop{
  position:absolute;left:14px;right:14px;bottom:90px;
  background:var(--paper);border-radius:18px;padding:14px 14px 12px;
  box-shadow:var(--shadow-deep), 0 0 0 1px rgba(28,23,19,.06);
  z-index:6;
  transform:translateY(8px) scale(.96);opacity:0;pointer-events:none;
  transition:transform .25s cubic-bezier(.32,.72,0,1), opacity .2s;
  height:62%;display:flex;flex-direction:column;
}
html[data-theme="dark"] .links-pop{box-shadow:var(--shadow-deep), 0 0 0 1px rgba(255,255,255,.06);}
.links-pop.in{transform:translateY(0) scale(1);opacity:1;pointer-events:all;}

.links-pop-tabs{
  display:flex;gap:4px;padding:4px;background:rgba(28,23,19,.05);
  border-radius:12px;margin-bottom:10px;flex-shrink:0;
}
html[data-theme="dark"] .links-pop-tabs{background:rgba(255,255,255,.06);}
.links-pop-tab{
  flex:1;padding:8px 0;border:none;cursor:pointer;background:transparent;
  border-radius:8px;
  font-family:'DM Sans',sans-serif;font-size:12.5px;font-weight:500;
  color:var(--muted);transition:background .2s,color .2s;
}
.links-pop-tab.active{
  background:var(--paper);color:var(--ink);font-weight:600;
  box-shadow:0 1px 2px rgba(28,23,19,.06);
}
html[data-theme="dark"] .links-pop-tab.active{background:var(--paper-2);}

.links-pop-search{
  position:relative;display:flex;align-items:center;
  margin-bottom:10px;flex-shrink:0;
  background:rgba(28,23,19,.04);border-radius:10px;
  transition:background .2s, box-shadow .2s;
}
html[data-theme="dark"] .links-pop-search{background:rgba(255,255,255,.05);}
.links-pop-search:focus-within{
  background:var(--paper);
  box-shadow:0 0 0 1px rgba(74,140,138,.35), 0 1px 2px rgba(28,23,19,.04);
}
html[data-theme="dark"] .links-pop-search:focus-within{background:var(--paper-2);}
.links-pop-search-icon{
  width:14px;height:14px;flex-shrink:0;color:var(--muted);
  margin:0 4px 0 10px;
}
.links-pop-search-input{
  flex:1;min-width:0;border:none;background:transparent;outline:none;
  font-family:'DM Sans',sans-serif;font-size:13px;color:var(--text);
  padding:8px 6px;
}
.links-pop-search-input::placeholder{color:var(--muted);}
.links-pop-search-clear{
  width:24px;height:24px;flex-shrink:0;margin-right:4px;
  display:none;align-items:center;justify-content:center;
  border:none;background:transparent;border-radius:6px;cursor:pointer;
  color:var(--muted);transition:background .15s,color .15s;
}
.links-pop-search-clear svg{width:12px;height:12px;}
.links-pop-search-clear:hover{background:rgba(28,23,19,.06);color:var(--text);}
html[data-theme="dark"] .links-pop-search-clear:hover{background:rgba(255,255,255,.08);}
.links-pop-search.has-value .links-pop-search-clear{display:flex;}

.links-pop-frame{flex:1;min-height:0;overflow:hidden;position:relative;}
.links-pop-track{
  position:absolute;inset:0;
  transition:transform .35s cubic-bezier(.32,.72,0,1);
  touch-action:pan-y;
}
.links-pop-track.dragging{transition:none;}
.links-pop-panel{
  position:absolute;top:0;bottom:0;width:100%;
  overflow-y:auto;
  -ms-overflow-style:none;scrollbar-width:none;
  display:flex;flex-direction:column;gap:6px;
}
.links-pop-panel:nth-child(2){left:100%;}
.links-pop-panel::-webkit-scrollbar{display:none;}
.links-pop-panel > *{flex-shrink:0;}

.links-pop-item{
  display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px;
  border:1px solid var(--border);background:transparent;text-align:left;cursor:pointer;
  transition:background .15s;font-family:inherit;color:inherit;
}
.links-pop-item:hover{background:rgba(28,23,19,.03);}
html[data-theme="dark"] .links-pop-item:hover{background:rgba(255,255,255,.03);}
.links-pop-item.is-static, .links-pop-item.is-static:hover{
  background:transparent;cursor:default;
}
.links-pop-item-icon{
  width:32px;height:32px;border-radius:9px;background:rgba(74,140,138,.08);
  display:grid;place-items:center;color:var(--accent);flex-shrink:0;
}
.links-pop-item-icon svg{width:14px;height:14px;}
.links-pop-item-icon.food      {background:linear-gradient(135deg,#B5604A,#EAB09E);color:#FFF;}
.links-pop-item-icon.sights    {background:linear-gradient(135deg,#3D5A6E,#89B5C4);color:#FFF;}
.links-pop-item-icon.activities{background:linear-gradient(135deg,#5B6E50,#ABC4A0);color:#FFF;}
.links-pop-item-icon.shopping  {background:linear-gradient(135deg,#9A6538,#DFB291);color:#FFF;}
.links-pop-item-icon.nature    {background:linear-gradient(135deg,#3F7768,#8FC4B3);color:#FFF;}
.links-pop-item-icon.transit   {background:linear-gradient(135deg,#4E5A6B,#A0ABBA);color:#FFF;}
.links-pop-item-icon.other     {background:linear-gradient(135deg,#736F63,#BAB3A0);color:#FFF;}
.links-pop-item-icon.food      {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/food.webp') center/cover no-repeat,linear-gradient(135deg,#B5604A,#EAB09E);}
.links-pop-item-icon.sights    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/sights.webp') center/cover no-repeat,linear-gradient(135deg,#3D5A6E,#89B5C4);}
.links-pop-item-icon.activities{background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/activities.webp') center/cover no-repeat,linear-gradient(135deg,#5B6E50,#ABC4A0);}
.links-pop-item-icon.shopping  {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/shopping.webp') center/cover no-repeat,linear-gradient(135deg,#9A6538,#DFB291);}
.links-pop-item-icon.nature    {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/nature.webp') center/cover no-repeat,linear-gradient(135deg,#3F7768,#8FC4B3);}
.links-pop-item-icon.transit   {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/transit.webp') center/cover no-repeat,linear-gradient(135deg,#4E5A6B,#A0ABBA);}
.links-pop-item-icon.other     {background:url('https://pub-4c49f58d7f0043e784013c29090057d1.r2.dev/banners/tiles/category/other.webp') center/cover no-repeat,linear-gradient(135deg,#736F63,#BAB3A0);}
.links-pop-item-icon > svg{opacity:0;}
.links-pop-item-meta{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1;}
.links-pop-item-title{
  font-size:13px;font-weight:600;color:var(--text);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.links-pop-item-domain{
  font-family:'IBM Plex Mono',monospace;font-size:10px;color:var(--muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* ═══ Memory-tag bottom sheet (mark-as-visited → pin a memory) ═══
   Ported from docs/days-sandbox/css/memory-tag.css. Two phases:
     1) prompt   — Skip / Add a photo
     2) preview  — polaroid + note + Save
   Polaroid styling mirrors `.pmf-polaroid-frame` in css/memories.css. */

.memory-sheet{
  position:absolute;left:0;right:0;bottom:0;z-index:1100;
  background:var(--paper-2);
  border-top-left-radius:24px;border-top-right-radius:24px;
  box-shadow:var(--shadow-deep);
  padding:14px 18px calc(env(safe-area-inset-bottom, 0px) + 22px);
  transform:translateY(100%);
  transition:transform .32s cubic-bezier(.32,.72,0,1);
  max-height:82%;overflow:auto;
  -ms-overflow-style:none;scrollbar-width:none;
}
.memory-sheet::-webkit-scrollbar{display:none;}
.memory-sheet.open{transform:translateY(0);}
.memory-sheet::before{
  content:'';display:block;width:36px;height:4px;border-radius:2px;
  background:rgba(28,23,19,.18);margin:0 auto 14px;
}
[data-theme="dark"] .memory-sheet::before{background:rgba(255,255,255,.22);}

.mt-phase{display:flex;flex-direction:column;gap:14px;}

/* ── Prompt phase ── */
.mt-head{display:flex;align-items:center;gap:12px;}
.mt-tick-badge{
  width:38px;height:38px;border-radius:50%;
  background:#8FB5AE;color:#FFF;display:grid;place-items:center;
  box-shadow:0 2px 8px rgba(143,181,174,.35);flex-shrink:0;
}
.mt-tick-badge svg{width:18px;height:18px;stroke-width:2.6;}
[data-theme="dark"] .mt-tick-badge{background:#5C8580;}
.mt-head-title{display:flex;flex-direction:column;gap:2px;min-width:0;}
.mt-head-eyebrow{
  font-family:'IBM Plex Mono',monospace;font-size:9.5px;font-weight:600;
  color:#5C8580;letter-spacing:.2em;text-transform:uppercase;
}
[data-theme="dark"] .mt-head-eyebrow{color:#8FB5AE;}
.mt-head-name{
  font-family:'Playfair Display',serif;font-size:20px;font-weight:600;
  color:var(--text);line-height:1.2;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

.mt-prompt{display:flex;flex-direction:column;gap:4px;padding:4px 0 2px;}
.mt-prompt-title{
  font-family:'DM Sans',sans-serif;font-size:15px;font-weight:600;
  color:var(--text);
}
.mt-prompt-sub{
  font-family:'DM Sans',sans-serif;font-size:12.5px;color:var(--muted);
  line-height:1.45;
}

/* CTAs — Skip is a quiet text link; Add a photo / Save is the loud button. */
.mt-ctas{display:flex;align-items:center;gap:10px;padding-top:6px;}
.mt-btn-skip{
  background:none;border:0;
  font-family:'DM Sans',sans-serif;font-size:14px;font-weight:600;
  color:var(--muted);padding:10px 6px;cursor:pointer;
  transition:color .15s;
}
.mt-btn-skip:active{color:var(--text);}
.mt-btn-add, .mt-btn-save{
  flex:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:13px 16px;border-radius:14px;border:0;cursor:pointer;
  background:var(--text);color:var(--paper-2);
  font-family:'DM Sans',sans-serif;font-size:14px;font-weight:600;
  box-shadow:0 6px 18px rgba(28,23,19,.18);
  transition:transform .15s, box-shadow .15s;
}
.mt-btn-add:active, .mt-btn-save:active{transform:scale(.985);}
.mt-btn-add svg, .mt-btn-save svg{width:16px;height:16px;}
[data-theme="dark"] .mt-btn-add, [data-theme="dark"] .mt-btn-save{
  background:var(--paper-2);color:var(--text);
}

/* ── Preview phase: polaroid + note ── */
.mt-polaroid-stage{
  display:flex;align-items:center;justify-content:center;
  padding:10px 24px 4px;
}
.mt-polaroid{
  background:#FFF;
  padding:12px 12px 22px;border-radius:2px;
  width:min(220px, 58vw);
  box-shadow:0 3px 8px rgba(0,0,0,.07), 0 14px 36px rgba(0,0,0,.15);
  transform:rotate(-1.4deg);position:relative;
}
.mt-polaroid-tape{
  position:absolute;top:-9px;left:50%;transform:translateX(-50%);
  width:54px;height:16px;border-radius:1px;
  background:rgba(230,215,180,.72);
  background-image:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(200,185,150,.35) 2px,rgba(200,185,150,.35) 3px);
  box-shadow:0 1px 3px rgba(0,0,0,.09);
  z-index:5;
}
.mt-polaroid-photo{
  width:100%;aspect-ratio:1;border-radius:1px;overflow:hidden;
  position:relative;background:#e8e0d4;
}
.mt-polaroid-photo img{width:100%;height:100%;object-fit:cover;display:block;}
.mt-polaroid-vignette{
  position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse at center,transparent 55%,rgba(0,0,0,.24) 100%);
}
.mt-polaroid-caption{padding:8px 2px 0;}
.mt-polaroid-city{
  font-family:'Playfair Display',serif;font-size:13px;
  color:#a89e8a;font-style:italic;line-height:1;
}
.mt-polaroid-date{
  font-family:'IBM Plex Mono',monospace;font-size:7.5px;
  color:#c0b8a8;margin-top:3px;letter-spacing:.05em;
}

.mt-tag-summary{
  display:flex;align-items:center;gap:6px;padding:0 4px;
  font-family:'DM Sans',sans-serif;font-size:12.5px;color:var(--muted);
  justify-content:center;
}
.mt-tag-summary b{color:var(--text);font-weight:600;}
.mt-tag-glyph{display:inline-flex;color:var(--muted);}
.mt-tag-glyph svg{width:12px;height:12px;}
.mt-tag-sep{opacity:.55;}

.mt-note-input{
  width:100%;border:0;background:transparent;
  border-bottom:1px solid var(--border);
  padding:8px 4px 10px;
  font-family:'DM Sans',sans-serif;font-size:14px;color:var(--text);
  resize:none;outline:none;line-height:1.45;
}
.mt-note-input::placeholder{color:var(--muted);font-style:italic;}
.mt-note-input:focus{border-bottom-color:#4A8C8A;}

/* ── List phase: per-stop memories manager ── */
.mt-list-head{padding:2px 0 6px;position:relative;}
.mt-list-done{
  position:absolute;top:-2px;right:-4px;
  background:transparent;border:0;padding:8px 10px;
  font-family:'DM Sans',sans-serif;font-size:13px;font-weight:600;
  color:#4A8C8A;cursor:pointer;
  transition:opacity .15s;
}
.mt-list-done:active{opacity:.7;}
.mt-list-eyebrow{
  font-family:'IBM Plex Mono',monospace;font-size:9.5px;font-weight:600;
  color:#5C8580;letter-spacing:.2em;text-transform:uppercase;
  margin-bottom:4px;
}
[data-theme="dark"] .mt-list-eyebrow{color:#9BCEC5;}
.mt-list-title{
  font-family:'Playfair Display',serif;font-size:20px;font-weight:600;
  color:var(--text);line-height:1.2;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.mt-list-count{
  font-family:'DM Sans',sans-serif;font-size:11.5px;color:var(--muted);
  margin-top:3px;
}

.mt-list-grid{
  display:flex;flex-direction:column;gap:8px;
  margin:6px 0 10px;
}
.mt-list-row{
  display:grid;grid-template-columns:54px 1fr auto;gap:12px;
  align-items:center;padding:8px;border-radius:12px;
  background:var(--paper-2);border:1px solid var(--border);
}
[data-theme="dark"] .mt-list-row{background:rgba(255,255,255,.03);}
.mt-list-thumb{
  width:54px;height:54px;border-radius:9px;overflow:hidden;
  background:#e8e0d4;flex-shrink:0;
  box-shadow:0 1px 3px rgba(0,0,0,.08);
}
.mt-list-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.mt-list-text{display:flex;flex-direction:column;gap:3px;min-width:0;}
.mt-list-date{
  font-family:'IBM Plex Mono',monospace;font-size:10.5px;font-weight:600;
  color:var(--muted);letter-spacing:.05em;
}
.mt-list-note{
  font-family:'DM Sans',sans-serif;font-size:13px;color:var(--text);
  line-height:1.35;
  overflow:hidden;text-overflow:ellipsis;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
.mt-list-delete{
  width:30px;height:30px;display:grid;place-items:center;
  background:transparent;border:0;border-radius:50%;
  color:var(--muted);opacity:.55;cursor:pointer;
  transition:background .15s, color .15s, opacity .15s;
}
.mt-list-delete:active{
  background:rgba(181,96,74,.12);color:#B5604A;opacity:1;
}
.mt-list-delete svg{width:14px;height:14px;stroke-width:2;}

.mt-list-add{
  width:100%;display:inline-flex;align-items:center;justify-content:center;
  gap:8px;padding:13px 16px;border-radius:14px;
  background:transparent;border:1px dashed rgba(143,181,174,.5);
  color:#5C8580;cursor:pointer;
  font-family:'DM Sans',sans-serif;font-size:14px;font-weight:600;
  transition:background .15s, border-color .15s;
}
.mt-list-add:active{
  background:rgba(143,181,174,.08);
  border-color:rgba(143,181,174,.7);
}
.mt-list-add svg{width:16px;height:16px;}
[data-theme="dark"] .mt-list-add{
  color:#9BCEC5;border-color:rgba(143,181,174,.4);
}
