/* =========================================================
   TABIFLOW TITANIUM LANDING SYSTEM
   File: C:\Dev\tabiflow-ai\Public\styles\styles.css
   Scope:
   - Header
   - Hero
   - Feature Row
   - Travel Tools
   - Planner Entry
   - Footer
   ========================================================= */

/* =========================
   1) ROOT TOKENS
   ========================= */
:root{
  --bg: #07111a;
  --bg-elev: rgba(255,255,255,0.05);
  --bg-elev-2: rgba(255,255,255,0.08);
  --surface: rgba(7,17,26,0.72);
  --surface-strong: rgba(10,20,31,0.88);
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.16);
  --text: #f4f7fb;
  --muted: rgba(244,247,251,0.76);
  --soft: rgba(244,247,251,0.58);
  --accent: #b8d7ff;
  --accent-strong: #d6e7ff;
  --success: #9ee6b8;
  --shadow-lg: 0 18px 46px rgba(0,0,0,0.28);
  --shadow-md: 0 10px 28px rgba(0,0,0,0.22);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --container: 1120px;
  --tf-max-width: 1200px;
  --tf-side-padding: 20px;
  --header-h: 72px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 56px;
}

/* =========================
   2) RESET / BASE
   ========================= */
*,
*::before,
*::after{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

html,
body{
  margin:0;
  padding:0;
  min-height:100%;
}

body{
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--text);
   background: var(--bg);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}

img{
  max-width:100%;
  display:block;
}

a{
  color:inherit;
  text-decoration:none;
}

button,
input,
select,
textarea{
  font:inherit;
}

button{
  cursor:pointer;
}

/* =========================
   3) BACKGROUND SYSTEM
   ========================= */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  background-image:
    linear-gradient(180deg, rgba(3,8,13,0.15) 0%, rgba(3,8,13,0.55) 100%),
    var(--seasonal-hero-image, url("../assets/backgrounds/seasons/spring/japan-spring.webp"));
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  transform:scale(1.03);
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(circle at top right, rgba(184,215,255,0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(255,255,255,0.05), transparent 24%);
}

/* =========================
   4) LAYOUT HELPERS
   ========================= */
.page-shell,
.site-shell{
  width:min(calc(100% - 24px), var(--container));
  margin-inline:auto;
}

.section{
  padding:var(--space-6) 0;
}

.section-tight{
  padding:var(--space-5) 0;
}

.stack-sm > * + *{
  margin-top:var(--space-3);
}

.stack-md > * + *{
  margin-top:var(--space-4);
}

.stack-lg > * + *{
  margin-top:var(--space-5);
}

/* =========================
   5) HEADER
   Expected hooks:
   .site-header
   .header-inner
   .brand
   .brand-mark
   .brand-text
   .header-actions
   .menu-toggle
   [data-mobile-drawer]
   ========================= */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  min-height:var(--header-h);
  backdrop-filter:blur(16px);
  background:var(--tf-header-bg, rgba(5,12,18,0.38));
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.header-inner{
  width:min(calc(100% - 24px), var(--container));
  min-height:var(--header-h);
  margin-inline:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brand-mark{
  width:40px;
  height:40px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
  border:1px solid var(--line);
  box-shadow:var(--shadow-md);
  flex:0 0 auto;
}

.brand-text{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.brand-title{
  font-size:15px;
  font-weight:700;
  letter-spacing:0.02em;
}

.brand-subtitle{
  font-size:12px;
  color:var(--soft);
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.menu-toggle{
  min-width:46px;
  min-height:46px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.06);
  color:var(--text);
  display:none;
  align-items:center;
  justify-content:center;
}

[data-mobile-drawer]{
  display:none;
}

/* =========================
   6) BUTTONS
   Expected hooks:
   .btn
   .btn-ghost
   .btn-block
   .btn-icon
   ========================= */
.btn{
  min-height:48px;
  border:0;
  border-radius:999px;
  padding:12px 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:linear-gradient(180deg, rgba(232,241,255,0.96), rgba(205,223,246,0.94));
  color:#07111a;
  font-weight:700;
  letter-spacing:0.01em;
  box-shadow:var(--shadow-md);
  transition:transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.btn:hover,
.btn:focus-visible{
  transform:translateY(-1px);
}

.btn:active{
  transform:translateY(0);
}

.btn-ghost{
  background:rgba(255,255,255,0.06);
  color:var(--text);
  border:1px solid var(--line);
  box-shadow:none;
}

.btn-block{
  width:100%;
}

.btn-icon{
  width:48px;
  min-width:48px;
  padding-inline:0;
}

/* =========================
   7) HERO
   Expected hooks:
   .hero
   .hero-card
   .hero-eyebrow
   .hero-title
   .hero-subtitle
   .hero-actions
   .feature-pills
   .feature-pill
   ========================= */
.hero{
  padding:clamp(28px, 7vw, 72px) 0 24px;
}

.hero-card{
  width:min(100%, 840px);
  padding:clamp(22px, 5vw, 40px);
  border-radius:28px;
  background:linear-gradient(180deg, rgba(8,18,28,0.44), rgba(8,18,28,0.26));
  border:1px solid rgba(255,255,255,0.10);
  box-shadow:var(--shadow-lg);
  backdrop-filter:blur(10px);
}

.hero-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.06);
  color:var(--accent-strong);
  border:1px solid rgba(255,255,255,0.08);
  font-size:12px;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
}

.hero-title{
  margin:14px 0 10px;
  font-size:clamp(32px, 5.6vw, 48px);
  line-height:1.08;
  letter-spacing:-0.026em;
  max-width:14ch;
}

.hero-subtitle{
  margin:0;
  max-width:56ch;
  font-size:clamp(15.5px, 2.4vw, 18px);
  line-height:1.55;
  color:var(--muted);
}

.hero-actions{
  margin-top:22px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.feature-pills{
  margin-top:18px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.feature-pill{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.08);
  color:var(--text);
  font-size:13px;
  white-space:nowrap;
}

/* =========================
   8) FEATURE ROW
   Expected hooks:
   .feature-row
   .feature-grid
   .feature-card
   ========================= */
.feature-row{
  padding:10px 0 6px;
}

.feature-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.feature-card{
  min-height:96px;
  padding:16px;
  border-radius:20px;
  background:linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:var(--shadow-md);
}

.feature-card strong{
  display:block;
  margin-bottom:6px;
  font-size:15px;
  line-height:1.24;
  letter-spacing:-0.01em;
}

.feature-card p{
  margin:0;
  color:var(--muted);
  font-size:13.5px;
  line-height:1.55;
}

.tutorial-intro{
  max-width:76ch;
  margin:0 0 14px;
  color:var(--muted);
  font-size:13.5px;
  line-height:1.5;
}

.tutorial-guide-grid{
  align-items:stretch;
}

@media (min-width: 900px){
  .tutorial-guide-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr));
  }

  .tutorial-card-wide{
    grid-column:span 2;
  }
}

.tutorial-row-shell{
  display:grid;
  grid-template-columns:0.75fr 1.45fr 0.7fr 0.7fr;
  gap:6px;
  margin:10px 0 !important;
}

.tutorial-row-shell span{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 8px;
  border:1px solid rgba(184,215,255,0.16);
  border-radius:999px;
  background:rgba(220,234,255,0.08);
  color:rgba(244,248,252,0.88);
  font-size:11px;
  font-weight:800;
  line-height:1;
  text-transform:uppercase;
}

.tutorial-phrase-list{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
  margin:12px 0 0;
  padding:0;
  list-style:none;
}

.tutorial-phrase-list li{
  display:grid;
  gap:2px;
  min-width:0;
  padding:10px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  background:rgba(255,255,255,0.055);
}

.tutorial-road-sign-list{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  margin-top:12px;
}

.tutorial-road-sign-item{
  min-width:0;
  margin:0;
  padding:9px 8px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  background:rgba(255,255,255,0.06);
}

.tutorial-road-sign-item img{
  display:block;
  width:42px;
  height:42px;
  margin:0 auto 7px;
  object-fit:contain;
}

.tutorial-road-sign-item figcaption{
  display:grid;
  gap:3px;
  text-align:center;
}

.tutorial-road-sign-note{
  color:rgba(244,248,252,0.62);
  font-size:11px;
  line-height:1.35;
}

.tutorial-disclaimer{
  margin-top:10px !important;
  color:rgba(244,248,252,0.6) !important;
  font-size:11.5px !important;
}

body[data-visual-mode="high-contrast"] .tutorial-row-shell span,
body[data-visual-mode="high-contrast"] .tutorial-phrase-list li,
body[data-visual-mode="high-contrast"] .tutorial-road-sign-item{
  border-color:rgba(255,255,255,0.26);
  background:#07111f;
}

/* =========================
   9) TRAVEL TOOLS
   Expected hooks:
   .travel-tools
   .section-heading
   .tool-list
   .tool-card
   .tool-icon
   .tool-content
   .tool-title
   .tool-sub
   .tool-arrow
   ========================= */
.travel-tools{
  padding:18px 0 8px;
}

.section-heading{
  margin:0 0 16px;
  font-size:clamp(20px, 2.4vw, 24px);
  font-weight:700;
  letter-spacing:-0.02em;
  line-height:1.15;
}

.tool-list{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

/* future-ready (tablet+) */
@media (min-width: 768px){
  .tool-list{
    grid-template-columns:1fr;
  }
}

.tool-card{
  width:100%;
  min-height:84px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:16px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,0.10);
  background:linear-gradient(180deg, rgba(10,20,31,0.88), rgba(9,17,27,0.74));
  box-shadow:var(--shadow-md);
  transition:transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tool-card:hover,
.tool-card:focus-visible{
  transform:translateY(-2px);
  border-color:rgba(255,255,255,0.22);
  background:linear-gradient(180deg, rgba(18,30,44,0.96), rgba(10,20,31,0.88));
}

.tool-card.primary{
  background:linear-gradient(180deg, rgba(18,36,54,0.98), rgba(10,20,31,0.88));
  border:1px solid rgba(184,215,255,0.25);
  box-shadow:0 12px 36px rgba(0,0,0,0.35);
}

.tool-icon{
  width:48px;
  height:48px;
  flex:0 0 48px;
  border-radius:16px;
  display:grid;
  place-items:center;
  font-size:21px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.10);
}

.tool-content{
  min-width:0;
  flex:1 1 auto;
}

.tool-title{
  font-size:15px;
  font-weight:700;
  line-height:1.24;
  letter-spacing:-0.01em;
}

.tool-sub{
  margin-top:4px;
  font-size:13.5px;
  color:var(--muted);
  line-height:1.5;
}

.tool-arrow{
  flex:0 0 auto;
  color:var(--soft);
  font-size:18px;
}

/* =========================
   9b) LEARNING PREVIEW
   Expected hooks:
   .learning-preview
   .learning-preview-grid
   .learning-preview-card
   .learning-phrase-list
   .road-sign-preview-list
   ========================= */
.learning-preview{
  padding:18px 0 10px;
}

.learning-preview-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
}

.section-kicker{
  margin:0 0 6px;
  color:rgba(184,215,255,0.78);
  font-size:11px;
  font-weight:800;
  letter-spacing:0.12em;
  line-height:1;
}

.learning-preview-note{
  max-width:42ch;
  margin:0 0 16px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.learning-preview-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

@media (min-width: 900px){
  .learning-preview-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

.learning-preview-card{
  min-width:0;
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(184,215,255,0.14);
  background:linear-gradient(180deg, rgba(8,16,27,0.9), rgba(7,13,22,0.8));
  box-shadow:0 14px 34px rgba(0,0,0,0.26);
}

.learning-card-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.learning-card-label{
  color:rgba(184,215,255,0.82);
  font-size:11px;
  font-weight:850;
  letter-spacing:0.1em;
  text-transform:uppercase;
}

.learning-card-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 9px;
  border-radius:999px;
  border:1px solid rgba(184,215,255,0.18);
  color:rgba(244,248,252,0.76);
  background:rgba(255,255,255,0.055);
  font-size:11px;
  font-weight:750;
}

.learning-preview-card h3{
  margin:0 0 8px;
  color:var(--text);
  font-size:17px;
  line-height:1.15;
  letter-spacing:-0.01em;
}

.learning-preview-card p{
  margin:0;
  color:var(--muted);
  font-size:13.2px;
  line-height:1.52;
}

.learning-phrase-list{
  display:grid;
  gap:8px;
  margin:13px 0 0;
  padding:0;
  list-style:none;
}

.learning-phrase-list li{
  display:grid;
  gap:2px;
  padding:10px;
  border-radius:14px;
  background:rgba(255,255,255,0.055);
  border:1px solid rgba(255,255,255,0.07);
}

.learning-phrase-ja{
  color:#f8fbff;
  font-size:15px;
  font-weight:750;
  line-height:1.25;
}

.learning-phrase-romaji,
.road-sign-preview-ja{
  color:rgba(184,215,255,0.78);
  font-size:11.5px;
  font-weight:750;
  line-height:1.25;
}

.learning-phrase-en,
.road-sign-preview-en{
  color:rgba(244,248,252,0.76);
  font-size:12px;
  line-height:1.35;
}

.road-sign-preview-list{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  margin-top:13px;
}

.road-sign-preview-item{
  min-width:0;
  margin:0;
  padding:8px 7px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.06);
}

.road-sign-preview-item img{
  display:block;
  width:38px;
  height:38px;
  margin:0 auto 7px;
  object-fit:contain;
}

.road-sign-preview-item figcaption{
  display:grid;
  gap:2px;
  text-align:center;
}

.learning-card-disclaimer{
  margin-top:10px !important;
  color:rgba(244,248,252,0.58) !important;
  font-size:11.5px !important;
}

.learning-preview-fallback{
  color:rgba(244,248,252,0.68);
  font-size:12.5px;
  line-height:1.4;
}

body[data-visual-mode="dark"] .learning-preview-card{
  background:linear-gradient(180deg, rgba(6,12,21,0.96), rgba(5,10,18,0.92));
  border-color:rgba(210,228,255,0.18);
}

body[data-visual-mode="high-contrast"] .learning-preview-card{
  background:#020712;
  border-color:rgba(255,255,255,0.34);
}

body[data-visual-mode="high-contrast"] .learning-card-chip,
body[data-visual-mode="high-contrast"] .learning-phrase-list li,
body[data-visual-mode="high-contrast"] .road-sign-preview-item{
  border-color:rgba(255,255,255,0.24);
  background:#07111f;
}

@media (max-width: 720px){
  .learning-preview{
    padding:14px 0 8px;
  }

  .learning-preview-head{
    display:block;
    margin-bottom:12px;
  }

  .learning-preview-note{
    margin-bottom:0;
    font-size:12.8px;
  }

  .learning-preview-card{
    padding:14px;
    border-radius:18px;
  }

  .road-sign-preview-list{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .road-sign-preview-item img{
    width:34px;
    height:34px;
  }
}

/* =========================
   10) PLANNER ENTRY
   Expected hooks:
   .planner-entry
   .planner-entry-card
   .planner-entry-copy
   .planner-entry-actions
   ========================= */
.planner-entry{
  padding:16px 0 8px;
}

.planner-entry-card{
  padding:20px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border:1px solid rgba(255,255,255,0.10);
  box-shadow:var(--shadow-md);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.planner-entry-copy{
  min-width:0;
  flex:1 1 auto;
}

.planner-entry-copy h2,
.planner-entry-copy h3{
  margin:0 0 8px;
  font-size:22px;
  line-height:1.1;
  letter-spacing:-0.02em;
}

.planner-entry-copy p{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.planner-entry-actions{
  width:100%;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

/* =========================
   11) FOOTER
   Expected hooks:
   .site-footer
   .footer-inner
   .footer-links
   ========================= */
.site-footer{
  padding:28px 0 36px;
}

.footer-inner{
  width:min(calc(100% - 24px), var(--container));
  margin-inline:auto;
  padding-top:20px;
  border-top:1px solid rgba(255,255,255,0.08);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.footer-copy{
  color:var(--soft);
  font-size:13px;
}

.footer-links{
  display:flex;
  align-items:center;
  gap:10px 12px;
  flex-wrap:wrap;
}

.footer-links a{
  color:var(--muted);
  font-size:13px;
}

.footer-links a:hover,
.footer-links a:focus-visible{
  color:var(--text);
}

.hero-card > .muted.small,
.travel-tools > .site-shell > .muted.small{
  max-width:74ch;
  font-size:12.5px;
  line-height:1.5;
  color:rgba(244,247,251,0.66);
}

.feature-card .muted.small{
  margin-top:8px;
  font-size:12.5px;
  line-height:1.45;
  color:rgba(244,247,251,0.62);
}

.footer-legal{
  flex:1 1 100%;
  max-width:980px;
  display:grid;
  gap:8px;
}

.footer-legal p{
  margin:0;
  max-width:100ch;
  font-size:12px;
  line-height:1.5;
  color:rgba(244,247,251,0.58);
}

/* =========================
   12) MOBILE MENU / DRAWER (TITANIUM CLEAN)
   SINGLE OWNER: [data-mobile-drawer]
   ========================= */

[data-mobile-overlay]{
  position:fixed;
  inset:0;
  background:rgba(2,7,11,0.56);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity 180ms ease;
  z-index:70;
}

[data-mobile-drawer]{
  position:fixed;
  top:calc(var(--header-h) + 8px);
  left:12px;
  right:12px;

  display:block;

  padding:12px;
  border-radius:22px;
  background:rgba(9,17,27,0.98);
  border:1px solid rgba(255,255,255,0.10);
  box-shadow:var(--shadow-lg);

  opacity:0;
  visibility:hidden;
  pointer-events:none;

  transform:translateY(-10px);
  transition:opacity 180ms ease, transform 180ms ease;

  z-index:80;
  backdrop-filter:blur(10px);
}

/* NAV CONTENT */

[data-mobile-drawer] nav,
[data-mobile-drawer] .drawer-links{
  display:grid;
  gap:8px;
}

[data-mobile-drawer] a,
[data-mobile-drawer] button{
  min-height:48px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid transparent;
  background:rgba(255,255,255,0.04);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

[data-mobile-drawer] .drawer-links{
  display:grid;
  gap:8px;
}

/* ACTIVE STATE */

body.nav-open{
  overflow:hidden;
  touch-action:none;
}

body.nav-open [data-mobile-overlay]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

body.nav-open [data-mobile-drawer]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}

/* ACTIVE STATE */

body.nav-open{
  overflow:hidden;
  touch-action:none;
}

body.nav-open [data-mobile-overlay]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

body.nav-open [data-mobile-drawer]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
/* =========================
   13) UTILITIES
   ========================= */
.hidden{
  display:none !important;
}

.visually-hidden{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0, 0, 0, 0) !important;
  border:0 !important;
}

.text-muted{
  color:var(--muted);
}

.center{
  text-align:center;
}

/* =========================
   14) TABLET
   ========================= */
@media (max-width: 860px){
  .feature-grid{
    grid-template-columns:1fr;
  }

  .tutorial-phrase-list,
  .tutorial-road-sign-list{
    grid-template-columns:1fr;
  }

  .planner-entry-card{
    flex-direction:column;
    align-items:flex-start;
  }

  .planner-entry-actions{
    width:100%;
  }

  .planner-entry-actions .btn{
    flex:1 1 220px;
  }
}

/* =========================
   15) MOBILE
   ========================= */
@media (max-width: 640px){
  :root{
    --header-h: 66px;
  }

  .page-shell,
  .site-shell,
  .header-inner,
  .footer-inner{
    width:min(calc(100% - 16px), var(--container));
  }

  .site-header{
    min-height:var(--header-h);
  }

  .header-inner{
    min-height:var(--header-h);
  }

  .menu-toggle{
    display:inline-flex;
  }

  .header-actions .desktop-only{
    display:none !important;
  }

  .hero{
    padding:16px 0 10px;
  }

  .hero-card{
    border-radius:24px;
    padding:18px 16px;
  }

  .hero-title{
    max-width:14ch;
    font-size:clamp(26px, 6.8vw, 30px);
    line-height:1.12;
    letter-spacing:-0.02em;
  }

  .hero-actions{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }

  .hero-actions .btn{
    width:100%;
    min-height:44px;
    padding:10px 14px;
    font-size:14px;
  }

  .feature-pills{
    gap:6px;
  }

  .feature-pill{
    max-width:100%;
    white-space:normal;
  }

  .feature-row{
    padding:10px 0 6px;
  }

  .tool-card{
    min-height:76px;
    padding:13px;
    border-radius:18px;
  }

  .tool-title{
    font-size:15px;
  }

  .tool-sub{
    font-size:13.5px;
  }

  .planner-entry{
    padding:16px 0 8px;
  }

  .planner-entry-card{
    padding:18px;
    border-radius:22px;
  }

  .planner-entry-copy h2,
  .planner-entry-copy h3{
    font-size:20px;
  }

  .footer-inner{
    padding-top:14px;
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  
}

  /* 🔒 TITANIUM: HERO TITLE BALANCE */
.hero-title{
  max-width:14ch;
  font-size:clamp(26px, 6.8vw, 30px);
  line-height:1.12;
}
.hero-title{
  letter-spacing:-0.02em;
}

 .hero-actions{
  flex-direction:column;
  align-items:stretch;
  gap:8px;
}

  .hero-actions .btn{
    width:100%;
    min-height:44px;
    padding:10px 14px;
    font-size:14px;
  }

  .feature-pills{
  gap:6px;
}

  .feature-pill{
    max-width:100%;
    white-space:normal;
  }

.tool-card{
  min-height:76px;
  padding:13px;
  border-radius:18px;
}

  .tool-title{
    font-size:15px;
  }

  .tool-sub{
    font-size:13.5px;
  }

  .planner-entry-card{
    padding:18px;
    border-radius:22px;
  }

  .planner-entry-copy h2,
  .planner-entry-copy h3{
    font-size:20px;
  }

  .footer-inner{
  padding-top:14px;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  }
}

/* =========================
   16) SMALL MOBILE
   ========================= */
@media (max-width: 430px){
  body{
    font-size:15px;
  }

  .brand-title{
    font-size:14px;
  }

  .brand-subtitle{
    font-size:11px;
  }

  .feature-card{
    padding:12px;
    min-height:unset;
    border-radius:18px;
  }

  .feature-card strong{
    display:block;
    margin-bottom:6px;
    font-size:15px;
    line-height:1.24;
  }

  .feature-card p{
    margin:0;
    color:var(--muted);
    font-size:13.5px;
    line-height:1.55;
  }

  .travel-tools{
    padding:18px 0 8px;
  }

  .tool-icon{
    width:44px;
    height:44px;
    flex-basis:44px;
    border-radius:14px;
    font-size:19px;
  }

  .tool-badge{
    display:inline-block;
    font-size:11px;
    padding:4px 8px;
    margin-bottom:8px;
    border-radius:999px;
    background:rgba(184,215,255,0.15);
    color:var(--accent);
    border:1px solid rgba(184,215,255,0.25);
    letter-spacing:0.3px;
  }

  .planner-entry-actions{
    width:100%;
    flex-direction:column;
    align-items:center;
    gap:10px;
  }

  .planner-entry-actions .btn{
    width:100%;
    max-width:320px;
    margin:0 auto;
    min-height:44px;
    padding:10px 18px;
    font-size:14px;
    border-radius:999px;
  }

  .footer-links{
    display:flex;
    align-items:center;
    gap:10px 12px;
    flex-wrap:wrap;
  }
}
/* 🔒 TITANIUM: PLANNER BUTTON SIZE LOCK */
.planner-entry-actions .btn{
  width:100%;
  max-width:320px;
  margin:0 auto;
  min-height:44px;
  padding:10px 18px;
  font-size:14px;
  border-radius:999px;
}
/* FORCE Titanium legacy buttons — FINAL */

button.titanium-legacy-btn,
.titanium-legacy-btn.btn,
.titanium-legacy-btn.btn-ghost {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 8px 14px !important;
  border-radius: 999px !important;

  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;

  color: #fff !important;
  font-size: 14px;
  cursor: pointer;

  backdrop-filter: blur(8px);

  transition: all 0.2s ease;
}

button.titanium-legacy-btn:hover,
.titanium-legacy-btn.btn:hover,
.titanium-legacy-btn.btn-ghost:hover {
  background: rgba(255,255,255,0.18) !important;
  transform: translateY(-1px);
}
/* =========================================
   TABIFLOW — PLANNER CLEAN RESET
   (Overrides legacy safely)
========================================= */

#planner,
#planner * {
  box-sizing: border-box;
}

/* kill legacy spacing conflicts */
#planner .panel-row,
#planner .panel-actions {
  all: unset;
  display: block;
}

/* normalize inputs */
#planner input,
#planner select,
#planner textarea {
  font-family: inherit;
}

/* remove any leftover ghost UI */
#planner .planner-more,
#planner [class*="more"],
#planner [class*="menu"] {
  display: none !important;
}

#map{
  transition: background 160ms ease, border-color 160ms ease, padding 160ms ease;
}

#map[data-map-open="false"]{
  padding-bottom: 10px;
}

.map-panel-body[hidden]{
  display: none !important;
}

#map[data-map-open="false"] #fit-pins-btn,
#map[data-map-open="false"] #map-detail-toggle-btn,
#map[data-map-open="false"] #hiking-toggle-btn{
  display: none;
}
/* =========================================
   TABIFLOW — PLANNER BUTTON IMPROVEMENTS
========================================= */

/* top planner toolbar button */
#build-btn{
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* planner action row */
.day-card [data-add],
.day-card [data-route]{
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* add stop = secondary */
.day-card [data-add]{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
}

/* show route = primary */
.day-card [data-route]{
  background: rgba(225,236,255,0.92);
  border: 1px solid rgba(225,236,255,0.92);
  color: #10192f;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

/* remove stop button */
.day-card [data-remove]{
  width: 44px !important;
  min-width: 44px;
  height: 44px !important;
  border-radius: 999px !important;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
}

/* button hover polish */
#build-btn:hover,
.day-card [data-add]:hover,
.day-card [data-route]:hover,
.day-card [data-remove]:hover{
  transform: translateY(-1px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* mobile tuning */
@media (max-width: 768px){
  #build-btn{
    min-height: 44px;
    font-size: 17px;
  }

  .day-card [data-add],
  .day-card [data-route]{
    min-height: 42px;
    padding: 0 16px;
    font-size: 14px;
  }

  .day-card [data-remove]{
    width: 40px !important;
    min-width: 40px;
    height: 40px !important;
    font-size: 20px;
  }
}
/* =========================================
   TABIFLOW — MOBILE PLANNER TIGHTENING
========================================= */
@media (max-width: 768px){

  .container{
    padding: 12px;
  }

  #planner,
  #map,
  .planner-ai-shell{
    padding: 12px;
    margin: 10px 0;
  }

  .tf-topbar{
    gap: 8px;
    margin-bottom: 10px;
  }

  .tf-topbar .btn{
    min-height: 42px;
    padding: 0 16px;
    font-size: 14px;
  }

  .panel-title{
    font-size: 14px;
    margin-bottom: 6px;
  }

  .tf-toolbar{
    gap: 8px;
    margin-bottom: 12px;
  }

  #days-input,
  #country-select,
  #city-select{
    min-height: 42px;
    font-size: 15px;
  }

  #build-btn{
    min-height: 42px;
    font-size: 16px;
    padding: 0 18px;
  }

  .day-card{
    padding: 10px 0 6px;
    margin-bottom: 10px;
  }

  .day-card strong{
    font-size: 15px;
  }

  .day-card input,
  .day-card select,
  .day-card textarea{
    min-height: 40px;
    font-size: 14px;
  }

  .stop-row{
    gap: 8px !important;
    margin-bottom: 6px !important;
  }

  .stop-row .input.input-sm{
    width: 84px !important;
    min-width: 84px !important;
  }

  .day-card [data-remove]{
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    font-size: 18px;
  }

  .day-card [data-add],
  .day-card [data-route]{
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .day-card [data-route]{
    box-shadow: none;
  }

  #map .btn{
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .planner-ai-shell h3{
    font-size: 16px;
    margin-bottom: 8px !important;
  }

  .planner-ai-shell .btn{
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }

  .planner-ai-shell textarea{
    min-height: 76px;
    font-size: 14px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  #ai-run-btn{
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }
}
/* =========================================
   DAY COMPRESSION
========================================= */
.day-card{
  padding: 8px 0 4px;
  margin-bottom: 8px;
}

.day-card strong{
  margin-bottom: 6px;
  display:block;
}

/* reduce vertical gap between fields */
.day-card input{
  margin-bottom: 6px;
}

.day-card .stop-row{
  margin-bottom: 4px !important;
}

.planner-setup-bar{
  margin-top: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--tf-border-soft);
  border-radius: 18px;
  background: var(--tf-bg-surface);
  overflow: hidden;
}

.planner-setup-toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.planner-setup-copy{
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.planner-setup-label{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.68;
}

.planner-setup-summary{
  font-size: 13px;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-setup-chevron{
  font-size: 16px;
  opacity: 0.7;
}

.planner-setup-body{
  padding: 0 14px 14px;
}

.planner-setup-body[hidden]{
  display: none !important;
}

.stop-row{
  border: 1px solid rgba(255,255,255,0.04);
  opacity: 0.9;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.stop-row:focus-within{
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(184,215,255,0.16);
  opacity: 1;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.stop-row.is-hold-reorder-active{
  background: rgba(184,215,255,0.11) !important;
  border-color: rgba(184,215,255,0.34);
  opacity: 1;
  box-shadow: 0 14px 28px rgba(0,0,0,0.2), 0 0 0 1px rgba(184,215,255,0.12) inset;
}

.stop-row.is-move-selected{
  background: rgba(184,215,255,0.075) !important;
  border-color: rgba(184,215,255,0.2);
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

html.hold-reorder-active,
body.hold-reorder-active{
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

.stop-row.is-notes-open{
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(184,215,255,0.2);
  opacity: 1;
}

.stop-row.is-reorder-moving{
  background: rgba(184,215,255,0.08) !important;
  border-color: rgba(184,215,255,0.24);
  box-shadow: 0 10px 22px rgba(6,14,28,0.12);
}

.day-card-toggle.is-active{
  border-color: rgba(184,215,255,0.28) !important;
  background: rgba(184,215,255,0.10) !important;
}

.day-card.is-compact-day{
  margin-bottom: 6px;
}

.day-card-toggle.is-compact{
  min-height: 0;
  box-shadow: none;
}

.day-card-toggle.is-compact:hover,
.day-card-toggle.is-compact:focus-visible{
  border-color: rgba(255,255,255,0.16) !important;
  background: rgba(255,255,255,0.05) !important;
}

.day-ai-helper-host{
  display: block;
  margin-top: 16px;
  width: 100%;
}

.day-ai-helper-host .planner-ai-shell{
  display: block;
  margin: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none;
  width: 100%;
}

.day-ai-helper-host--desktop-companion{
  margin: 10px 0 8px;
  padding: 0 10px 0 22px;
  position: relative;
}

.day-ai-helper-host--desktop-companion::before{
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(184,215,255,0),
    rgba(184,215,255,0.24) 18%,
    rgba(184,215,255,0.24) 82%,
    rgba(184,215,255,0)
  );
}

.day-ai-helper-host--desktop-companion .planner-ai-shell{
  background: rgba(255,255,255,0.022);
  border-color: rgba(255,255,255,0.065);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(5,10,20,0.08);
}

#planner-view-toggle[aria-pressed="true"]{
  background: rgba(225,236,255,0.92);
  border-color: rgba(225,236,255,0.92);
  color: #10192f;
}

.day-ai-helper-host #planner-ai-shell{
  display: block;
}

.day-ai-helper-host:empty{
  display: none;
}

.planner-ai-fallback-host{
  display: block;
  margin-top: 14px;
}

.planner-ai-fallback-host[hidden]{
  display: none !important;
}

.planner-ai-fallback-host #planner-ai-shell{
  display: block;
  margin: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

@media (min-width: 769px){
  .tf-topbar{
    margin-bottom: 14px;
  }

  .tf-topbar .btn{
    min-height: 34px;
    padding: 0 12px;
    font-size: 12.5px;
    opacity: 0.76;
  }

  .day-body.is-desktop-day-body{
    overflow: visible;
  }

  .day-body.is-desktop-day-body .stop-item{
    margin-bottom: 12px;
  }

  .day-body.is-desktop-day-body .stop-row{
    padding: 10px 12px !important;
  }

  .day-body.is-desktop-day-body .stop-row-action-list{
    z-index: 24;
    max-width: min(220px, calc(100vw - 40px));
  }
}

@media (max-width: 768px){
  body #pin-modal.location-workspace-mobile{
    position: fixed;
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: 88vh;
    overflow: auto;
    align-items: stretch;
    padding: 12px;
    box-sizing: border-box;
  }

  body #pin-modal.location-workspace-mobile .pin-modal-body,
  body #pin-modal.location-workspace-mobile .pin-selection-summary,
  body #pin-modal.location-workspace-mobile .location-workspace-section{
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 768px){
  .day-ai-helper-host--desktop-companion{
    margin: 0;
    padding: 0;
  }

  .day-ai-helper-host--desktop-companion::before{
    display: none;
  }
}

.planner-ai-input-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.planner-ai-actions-row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.planner-ai-primary-action{
  min-height: 42px;
}

.planner-ai-more-btn{
  min-height: 42px;
}

.planner-ai-secondary-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.planner-ai-secondary-actions[hidden]{
  display:none !important;
}

.planner-ai-run-btn{
  flex:1 1 auto;
}

.planner-ai-mic-btn{
  min-width:52px;
  width:52px;
  height:52px;
  border-radius:16px;
  font-size:13px;
  font-weight:700;
}

.planner-ai-mic-btn:not(.is-listening){
  letter-spacing: 0.01em;
}

.planner-ai-mic-btn.is-listening{
  background: rgba(184,215,255,0.18);
  border-color: rgba(184,215,255,0.36);
  color: var(--text);
}

.planner-ai-voice-status{
  min-height: 18px;
  margin-top: 8px;
  opacity: 0.82;
}

.planner-ai-voice-status[data-state="listening"]{
  color: var(--accent-strong);
}

.planner-ai-command-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.planner-ai-command-btn{
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 999px;
}

.planner-ai-support{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.planner-ai-support-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-bottom: 8px;
}

.planner-ai-support-label{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.78;
}

.planner-ai-support-helper{
  opacity: 0.72;
}

.planner-ai-support-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.planner-ai-support-btn{
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 999px;
}

#planner-ai-preview[data-empty="true"]{
  display: none;
}

#planner-ai-preview{
  margin-top: 12px !important;
}

#planner-ai-preview.has-ai-suggestions{
  margin-top: 10px !important;
}

#planner-ai-preview .planner-ai-suggestion-card{
  margin-top: 8px !important;
  padding: 10px !important;
  border-radius: 10px !important;
}

#planner-ai-preview .planner-ai-suggestion-card strong{
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

#planner-ai-preview .planner-ai-apply-all-wrap{
  margin-top: 10px !important;
  padding: 10px !important;
  border-radius: 10px !important;
}

#planner-ai-preview .planner-ai-apply-all-wrap[hidden]{
  display: none !important;
}

#planner-ai-preview button[data-ai-apply-plan]{
  min-height: 38px;
}

/* =========================================
   AI HELPER FRICTION REDUCTION
========================================= */

.planner-ai-shell{
  padding: 10px;
  margin: 8px 0;
}

.planner-ai-shell .planner-ai-control{
  margin-top: 0 !important;
}

.planner-ai-shell h3{
  margin-bottom: 6px !important;
  line-height: 1.2;
}

.planner-ai-shell textarea{
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.planner-ai-shell .btn{
  min-height: 36px;
}

.planner-ai-actions-row{
  gap: 6px;
  margin-bottom: 8px;
}

.planner-ai-input-row{
  gap: 8px;
}

.planner-ai-primary-action,
.planner-ai-more-btn{
  min-height: 38px;
}

.planner-ai-secondary-actions{
  gap: 6px;
}

.planner-ai-run-btn{
  min-height: 38px;
}

.planner-ai-mic-btn{
  min-width: 46px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.planner-ai-voice-status{
  min-height: 16px;
  margin-top: 6px;
}

.planner-ai-command-row{
  gap: 6px;
  margin-top: 8px;
}

.planner-ai-command-btn{
  min-height: 34px;
  padding: 0 11px;
}

.planner-ai-support{
  margin-top: 8px;
  padding-top: 8px;
}

.planner-ai-support-copy{
  gap: 2px;
  margin-bottom: 6px;
}

.planner-ai-support-actions{
  gap: 6px;
}

.planner-ai-support-btn{
  min-height: 34px;
  padding: 0 11px;
}

#planner-ai-preview{
  margin-top: 9px !important;
}

#planner-ai-preview.has-ai-suggestions{
  margin-top: 8px !important;
}

#planner-ai-preview .planner-ai-suggestion-card{
  margin-top: 6px !important;
  padding: 9px !important;
}

#planner-ai-preview .planner-ai-apply-all-wrap{
  margin-top: 8px !important;
  padding: 9px !important;
}

@media (max-width: 768px){
  .planner-ai-shell{
    padding: 8px;
    margin: 6px 0;
    border-radius: 14px;
  }

  .planner-ai-shell h3{
    font-size: 14px;
    margin-bottom: 4px !important;
  }

  .planner-ai-shell .btn{
    min-height: 34px;
    font-size: 12px;
  }

  .planner-ai-shell textarea{
    min-height: 58px;
    font-size: 13px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .planner-ai-actions-row{
    gap: 5px;
    margin-bottom: 6px;
  }

  .planner-ai-input-row{
    gap: 6px;
  }

  .planner-ai-primary-action,
  .planner-ai-more-btn,
  .planner-ai-run-btn{
    min-height: 36px;
  }

  .planner-ai-secondary-actions{
    gap: 5px;
  }

  .planner-ai-mic-btn{
    min-width: 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 11px;
  }

  .planner-ai-voice-status{
    min-height: 14px;
    margin-top: 4px;
    font-size: 10.5px;
  }

  .planner-ai-command-row{
    gap: 4px;
    margin-top: 6px;
  }

  .planner-ai-command-btn{
    min-height: 30px;
    padding: 0 9px;
    font-size: 10px;
  }

  .planner-ai-support{
    margin-top: 6px;
    padding-top: 6px;
  }

  .planner-ai-support-copy{
    margin-bottom: 5px;
  }

  .planner-ai-support-label{
    font-size: 10.5px;
  }

  .planner-ai-support-helper{
    font-size: 10.5px;
  }

  .planner-ai-support-actions{
    gap: 4px;
  }

  .planner-ai-support-btn{
    min-height: 30px;
    padding: 0 9px;
    font-size: 10px;
  }

  #planner-ai-preview{
    margin-top: 7px !important;
  }

  #planner-ai-preview .planner-ai-suggestion-card{
    margin-top: 5px !important;
    padding: 8px !important;
  }
}
/* =========================================
   BUTTON HIERARCHY FIX
========================================= */

/* secondary action */
.day-card [data-add]{
  opacity: 0.7;
  font-size: 13px;
  padding: 0 12px;
}

/* primary action */
.day-card [data-route]{
  font-weight: 600;
}

/* spacing between buttons */
.day-card .btn{
  gap: 8px;
}

.day-card .day-control-btn{
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1;
  border-radius: 999px;
  font-weight: 600;
}

.day-card .day-stops-toggle,
.day-card .day-add-btn{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  box-shadow: none;
}

.day-card .day-route-btn{
  min-height: 40px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 650;
  background: rgba(225,236,255,0.9);
  border: 1px solid rgba(225,236,255,0.88);
  color: #10192f;
  box-shadow: 0 6px 14px rgba(0,0,0,0.14);
}

@media (max-width: 640px){
  .day-card .day-control-btn{
    min-height: 38px;
    padding: 0 13px;
    font-size: 12.5px;
  }

  .day-card .day-route-btn{
    min-height: 38px;
    padding: 0 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  }
}
/* =========================================
   DAY HEADER IMPROVEMENT
========================================= */

.day-card strong{
  font-size: 15px;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 4px;
}

/* make title feel attached to Day */
.day-card [data-day-title]{
  margin-top: 2px;
  margin-bottom: 0;
}
/* =========================================
   STOP ACTION GROUP
========================================= */

.stop-actions,
.stop-row-actions{
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
  position: relative;
}

.stop-row-primary-actions{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}

.stop-row-inline-move,
.stop-row-route-trigger{
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.46;
}

/* Final destination stop — route button is intentionally muted/disabled-looking */
.stop-row-route-trigger.is-final-stop{
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}

/* ── Site tabs ───────────────────────────────────────────────────────────── */
.tabs-hidden { display: none !important; }

.site-tabs {
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-tabs-inner {
  display: flex;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--tf-side-padding);
}

.site-tab {
  flex: 1;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--soft);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease;
  text-align: center;
}

.site-tab.is-active {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* Hide tab buttons that don't have content yet — remove rule per tab when ready */
.site-tab[data-tab="japan"],
.site-tab[data-tab="community"] {
  display: none;
}

/* ── Learn tab — Japanese phrases ─────────────────────────────────────────── */
.learn-header {
  padding: 24px 0 8px;
}

.learn-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}

.learn-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.learn-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.learn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
  white-space: nowrap;
}

.learn-pill:hover {
  color: var(--text);
  background: var(--bg-elev-2);
}

.learn-pill.is-active {
  color: #07111a;
  background: var(--accent);
  border-color: var(--accent);
}

.learn-pill-count {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
}

.learn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-bottom: 32px;
}

@media (min-width: 600px) {
  .learn-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .learn-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.learn-card {
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: background 140ms ease, border-color 140ms ease;
}

.learn-card:hover {
  background: var(--bg-elev-2);
  border-color: var(--line-strong);
}

.learn-card-ja {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.3;
}

.learn-card-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
  line-height: 1.4;
}

.learn-card-romaji {
  font-style: italic;
}

.learn-card-en {
  color: var(--text);
}

.learn-card-context {
  font-size: 12px;
  color: var(--soft);
  margin: 0;
  line-height: 1.4;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

/* Section toggle (Phrases / Road Signs) */
.learn-section-toggle {
  display: flex;
  gap: 8px;
  padding: 12px 0 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.learn-section-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.learn-section-btn:hover {
  color: var(--text);
  background: var(--bg-elev-2);
}

.learn-section-btn.is-active {
  color: #07111a;
  background: var(--accent);
  border-color: var(--accent);
}

.learn-section-count {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}

.learn-disclaimer {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: rgba(255, 198, 88, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}

/* Road sign cards */
.learn-signs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-bottom: 32px;
}

@media (min-width: 600px) {
  .learn-signs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .learn-signs-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.learn-sign-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: background 140ms ease, border-color 140ms ease;
}

.learn-sign-card:hover {
  background: var(--bg-elev-2);
  border-color: var(--line-strong);
}

.learn-sign-image {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  overflow: hidden;
}

.learn-sign-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.learn-sign-image.is-missing {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--line);
}

.learn-sign-image.is-missing::after {
  content: "🚸";
  font-size: 28px;
  opacity: 0.5;
}

.learn-sign-body {
  flex: 1;
  min-width: 0;
}

.learn-sign-ja {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
  line-height: 1.3;
}

.learn-sign-en {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 4px;
  font-weight: 500;
}

.learn-sign-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
  line-height: 1.4;
}

.learn-sign-kana {
  /* differentiated weight from romaji */
}

.learn-sign-romaji {
  font-style: italic;
}

.learn-sign-meaning {
  font-size: 12px;
  color: var(--soft);
  margin: 6px 0 0;
  line-height: 1.45;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

/* ── Trip tracker bar ─────────────────────────────────────────────────────── */
.trip-tracker-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10,20,31,0.97);
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 9000;
  backdrop-filter: blur(8px);
}

.trip-tracker-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.trip-tracker-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-tracker-sub {
  font-size: 11px;
  color: var(--soft);
}

.trip-tracker-btn {
  background: rgba(184,215,255,0.12);
  border: 0.5px solid rgba(184,215,255,0.25);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

/* ── First-use disclaimer overlay ───────────────────────────────────────── */
#tabiflow-disclaimer-overlay, #tabiflow-template-ack-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.disclaimer-modal {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-lg);
}

.disclaimer-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}

.disclaimer-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.disclaimer-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.disclaimer-confirm-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  margin-top: 4px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
}

.disclaimer-legal-link {
  font-size: 11px;
  color: var(--soft);
  text-align: center;
  text-decoration: underline;
  opacity: 0.7;
}

/* ── Template selector — mobile only ─────────────────────────────────────── */
.template-selector-mobile {
  margin-top: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
}

.template-selector-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.template-selector-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.template-theme-select {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: inherit;
  cursor: pointer;
}

.template-load-btn {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  white-space: nowrap;
}

.template-selector-status {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.75;
  min-height: 16px;
}

/* Hide on desktop — template selector is mobile only */
@media (min-width: 769px) {
  .template-selector-mobile {
    display: none;
  }
}

/* V2Panel: template selector — build-reference dashed-blue border (Screen B). */
html.tf-v2panel .template-selector-mobile {
  border: 1.5px dashed #38bdf8;
  background: rgba(56,189,248,.05);
  border-radius: 11px;
  padding: 11px;
  margin-top: 12px;
}
html.tf-v2panel .template-selector-kicker {
  color: #38bdf8;
  opacity: 1;
}
html.tf-v2panel .template-theme-select {
  background: #101a30;
  border-color: #28344f;
}

/* ── Pin modal: paste section promoted above Advanced ────────────────────── */
.pin-paste-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* On desktop hide the promoted paste section — Advanced section handles it */
@media (min-width: 769px) {
  .pin-paste-section {
    display: none;
  }
  /* Show the paste field inside Advanced on desktop */
  #pin-advanced #pin-gmap-desktop-only {
    display: block;
  }
}

/* ── Hold popup — tabbed redesign ────────────────────────────────────────── */
.hold-popup-sheet {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow-y: auto;
}

/* Tabs */
.hold-popup-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--line);
}

.hold-popup-tab {
  flex: 1;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 140ms ease;
  text-align: center;
}

.hold-popup-tab.is-active {
  background: rgba(184,215,255,0.12);
  border-color: rgba(184,215,255,0.2);
  color: var(--accent-strong);
}

/* Tab panels */
.hold-popup-tab-panels {
  flex: 1;
  min-height: 0;
}

.hold-popup-panel {
  display: none;
  padding: 14px 16px;
}

.hold-popup-panel.is-active {
  display: block;
}

.hold-popup-tab-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Location tab */
.hold-popup-saved-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}

.hold-popup-saved-address {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  word-break: break-word;
}

.hold-popup-change-btn {
  align-self: flex-start;
  font-size: 13px;
}

.hold-popup-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hold-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hold-popup-continue-btn {
  width: 100%;
  font-size: 14px;
  font-weight: 600;
}

.hold-popup-maps-btn {
  width: 100%;
  font-size: 13px;
}

/* Tags tab */
.hold-popup-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hold-popup-tag-chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  cursor: pointer;
  transition: all 120ms ease;
  white-space: nowrap;
}

.hold-popup-tag-chip.is-selected {
  background: rgba(184,215,255,0.15);
  border-color: rgba(184,215,255,0.3);
  color: var(--accent-strong);
}

/* Copy row */
.hold-popup-copy-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.hold-popup-copy-label {
  font-size: 11px;
  white-space: nowrap;
}

.hold-popup-copy-select {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 6px 8px;
}

.hold-popup-copy-btn {
  font-size: 12px;
  padding: 5px 10px;
  white-space: nowrap;
}

/* Notes tab */
.hold-popup-notes-input {
  min-height: 100px;
  font-size: 14px;
  resize: vertical;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
}

.hold-popup-notes-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.hold-popup-notes-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Inline status */
.hold-popup-inline-status {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Footer */
.hold-popup-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-strong);
  position: sticky;
  bottom: 0;
}

.hold-popup-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.hold-popup-time-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  min-width: 52px;
}

.hold-popup-time-display {
  font-size: 16px;
  font-weight: 700;
  min-width: 64px;
  text-align: center;
  color: var(--accent-strong);
}

.hold-popup-save-btn {
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-md);
}

/* AI button in template selector */
.template-ai-btn {
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(184,215,255,0.2);
  color: var(--accent);
}

/* ── Mobile place helper: saved location summary ─────────────────────────── */
.mobile-place-saved-summary{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 4px;
}

.mobile-place-saved-pin-status{
  font-size: 12px;
  opacity: 0.7;
  letter-spacing: 0.01em;
}

.mobile-place-saved-address{
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
  color: var(--color-text, #fff);
  opacity: 0.95;
}

.mobile-place-stop.has-saved-location .mobile-place-stop-head{
  margin-bottom: 0;
}

.stop-row-inline-move[disabled]{
  opacity: 0.18 !important;
  pointer-events: none;
}

.stop-actions .btn,
.stop-row-icon-btn{
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 999px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stop-row-btn{
  opacity: 0.44;
  transition: opacity 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.stop-row-action-list{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  width: 168px;
  min-width: 168px;
  padding: 8px;
  gap: 6px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(10,20,31,0.95);
  box-shadow: 0 10px 22px rgba(0,0,0,0.2);
  z-index: 6;
  box-sizing: border-box;
}

.stop-row-actions-trigger{
  display:inline-flex;
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  padding: 0 !important;
  align-items:center;
  justify-content:center;
  letter-spacing: 0;
  font-size: 18px;
  line-height: 1;
}

.stop-row-actions.is-open .stop-row-action-list{
  display: flex;
}

.stop-row-action-list.is-open-upward{
  top: auto;
  bottom: calc(100% + 10px);
}

.stop-row-action-list.is-open-leftward{
  right: auto;
  left: 0;
}

.stop-row-action-menu-btn{
  width: 100%;
  min-width: 0;
  min-height: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 10px !important;
  border-radius: 10px;
  opacity: 1;
}

.stop-row-action-list .stop-row-action-menu-btn{
  display: flex !important;
  width: 100%;
  visibility: visible;
  opacity: 1;
  flex: 0 0 38px;
}

.stop-row-action-icon{
  width: 16px;
  min-width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.stop-row-action-label{
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.stop-row-action-list .stop-row-action-label{
  display: inline-block !important;
  visibility: visible;
  opacity: 1;
  white-space: nowrap;
}

.day-stops-toggle{
  min-height: 36px;
  margin: 2px 0 14px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
}

.planner-jump-helper{
  position: fixed;
  right: 14px;
  bottom: 16px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,20,31,0.88);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
  z-index: 30;
}

.planner-jump-helper.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.stop-row:hover .stop-row-btn,
.stop-row:focus-within .stop-row-btn,
.stop-row-btn.has-value,
.stop-row.has-notes [data-toggle-notes],
.stop-row.has-pin [data-pin]{
  opacity: 0.92;
}

.stop-row{
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.stop-row.is-browse-anchor{
  background: rgba(255,255,255,0.055) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
  border-color: rgba(255,255,255,0.12);
  opacity: 1;
}

.stop-row.is-browse-neighbor{
  background: rgba(255,255,255,0.02) !important;
  box-shadow: none;
  border-color: rgba(255,255,255,0.06);
  opacity: 0.82;
}

.day-body.has-open-action-strip .stop-row.is-browse-anchor:not(.is-action-strip-owner),
.day-body.has-open-action-strip .stop-row.is-move-selected:not(.is-action-strip-owner){
  background: rgba(255,255,255,0.02) !important;
  box-shadow: none !important;
  border-color: rgba(255,255,255,0.06) !important;
}

.day-body.has-open-action-strip .stop-row:not(.is-action-strip-owner) .stop-row-btn.has-value,
.day-body.has-open-action-strip .stop-row:not(.is-action-strip-owner).has-notes [data-toggle-notes],
.day-body.has-open-action-strip .stop-row:not(.is-action-strip-owner).has-pin [data-pin]{
  opacity: 0.58;
  background: rgba(255,255,255,0.032) !important;
  border-color: rgba(255,255,255,0.055) !important;
  box-shadow: none !important;
}

.day-body.has-open-action-strip .stop-row.is-action-strip-owner{
  background: rgba(184,215,255,0.075) !important;
  border-color: rgba(184,215,255,0.16) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.stop-row:hover .stop-row-inline-move,
.stop-row:focus-within .stop-row-inline-move,
.stop-row:hover .stop-row-route-trigger,
.stop-row:focus-within .stop-row-route-trigger{
  opacity: 0.82;
}

.stop-row-remove-btn{
  opacity: 0.18;
  pointer-events: auto;
}

.stop-row:hover .stop-row-remove-btn,
.stop-row:focus-within .stop-row-remove-btn{
  opacity: 0.62;
}

/* pin button */
[data-pin]{
  background: rgba(255,255,255,0.06);
}

/* remove button */
[data-remove]{
  background: rgba(255,255,255,0.08);
}

/* hover */
.stop-actions .btn:hover{
  transform: translateY(-1px);
}.time-pill {
  min-width: 58px;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  font-size: 12px;
  cursor: pointer;
  opacity: 0.48;
  transition: opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

.time-pill.has-value{
  opacity: 0.94;
}

.time-slot{
  flex: 0 0 auto;
  width: 58px;
  min-width: 58px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
  border-radius: 12px;
  transition: width 180ms ease, min-width 180ms ease;
}

.time-slot.is-open{
  width: 74px;
  min-width: 74px;
}

.stop-row:hover .time-pill,
.stop-row:focus-within .time-pill,
.stop-row.has-time .time-pill{
  opacity: 0.94;
}

[data-toggle-notes]{
  min-height: 36px;
  padding-inline: 10px !important;
  font-size: 12px;
}

.stop-row:not(.has-notes):not(:focus-within):not(:hover) [data-toggle-notes]{
  background: rgba(255,255,255,0.03);
}

.stop-row:not(.has-pin):not(:focus-within):not(:hover) [data-pin]{
  background: rgba(255,255,255,0.04);
}

.stop-row.has-notes [data-toggle-notes],
.stop-row.has-pin [data-pin],
.stop-row.has-time .time-pill{
  border-color: rgba(255,255,255,0.14);
}

.time-inline-picker {
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height 180ms ease, opacity 160ms ease, margin-bottom 180ms ease;
}

.time-slot.is-open .time-inline-picker{
  max-height: 112px;
  opacity: 1;
  margin-bottom: 6px;
}

.time-slot.is-open .time-pill{
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
  pointer-events: none;
}

.time-inline-select {
  width: 100%;
  min-height: 88px;
  padding: 4px 3px;
  border-radius: 10px;
  outline: 0;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  appearance: none;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.time-inline-select:focus {
  background: rgba(255,255,255,0.12);
  border-color: rgba(184,215,255,0.28);
}

.time-inline-select option {
  min-height: 26px;
  padding: 4px 2px;
  background: rgba(10,20,31,0.96);
  color: var(--text);
}

@media (min-width: 769px){
  .day-card.is-active-day{
    margin-bottom: 4px;
  }

  .day-body.is-active-day-body{
    padding-bottom: 2px;
  }

  .day-body.is-active-day-body > div:first-child{
    margin-bottom: 10px !important;
  }

  .day-body.is-active-day-body .stop-item{
    margin-bottom: 10px !important;
  }

  .day-body.is-active-day-body .stop-row{
    padding: 7px 10px !important;
    border-radius: 11px !important;
  }

  .day-body.is-active-day-body .stop-notes-wrap{
    margin-top: 6px !important;
    padding-left: 2px !important;
  }

  .day-body.is-active-day-body .stop-row.is-notes-open + .stop-notes-wrap{
    padding: 10px 2px 0 !important;
  }

  .day-body.is-active-day-body textarea[data-notes]{
    min-height: 54px !important;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .day-body.is-active-day-body .stop-notes-wrap textarea[data-notes]{
    border-radius: 12px;
    border-color: rgba(184,215,255,0.14);
    background: rgba(255,255,255,0.045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .day-body.is-active-day-body .day-stops-toggle{
    margin: 0 0 12px;
  }

  .day-body.is-active-day-body > div:last-child{
    margin-top: 2px;
  }

  .stop-row-actions{
    gap: 0;
    margin-left: 12px;
    padding-right: 4px;
  }

  .stop-row-primary-actions{
    gap: 6px;
    margin-left: auto;
  }

  .stop-row-inline-move{
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    font-size: 11px;
    opacity: 0.38;
  }

  .stop-row-action-list{
    width: 172px;
    min-width: 172px;
  }

  .stop-row-action-notes{
    background: rgba(255,255,255,0.045);
    border-color: rgba(255,255,255,0.09);
    opacity: 0.54;
  }

  .stop-row-action-pin,
  .stop-row-action-delete{
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
  }

  .stop-row-action-delete{
    opacity: 0.38;
  }

  .stop-row:hover .stop-row-action-delete,
  .stop-row:focus-within .stop-row-action-delete,
  .stop-row-action-delete.has-value{
    opacity: 0.6;
  }

  .stop-row:hover .stop-row-action-notes,
  .stop-row:focus-within .stop-row-action-notes,
  .stop-row-action-notes.has-value{
    opacity: 0.94;
  }

  .stop-row-action-notes.has-value{
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.07);
  }

  .stop-row-action-notes.is-open{
    border-color: rgba(184,215,255,0.26);
    background: rgba(184,215,255,0.14);
    color: rgba(255,255,255,0.98);
    opacity: 1;
  }

  .stop-row:hover .stop-row-action-pin,
  .stop-row:focus-within .stop-row-action-pin,
  .stop-row-action-pin.has-value{
    opacity: 0.88;
  }
}

@media (max-width: 768px){
  .planner-ai-shell{
    padding: 10px;
    margin: 8px 0;
    border-radius: 16px;
    background: rgba(15, 22, 32, 0.68);
    border-color: rgba(255,255,255,0.1);
  }

  .planner-ai-shell h3{
    font-size: 15px;
    margin-bottom: 6px !important;
    opacity: 0.9;
  }

  .planner-ai-input-row{
    gap: 8px;
  }

  .planner-setup-bar{
    margin-bottom: 10px;
    border-radius: 16px;
  }

  #map[data-map-open="false"]{
    padding: 10px 12px;
  }

  #map[data-map-open="false"] .panel-row{
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    min-height: 42px;
  }

  #map[data-map-open="false"] .panel-title{
    margin: 0;
    font-size: 13px;
    opacity: 0.82;
  }

  #map[data-map-open="false"] .panel-actions{
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
  }

  #map[data-map-open="false"] #map-toggle-btn{
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
  }

  .planner-setup-toggle{
    padding: 11px 12px;
  }

  .planner-setup-summary{
    font-size: 12px;
  }

  .planner-setup-body{
    padding: 0 12px 12px;
  }

  .planner-ai-actions-row{
    gap: 6px;
    margin-bottom: 8px;
  }

  .planner-ai-command-row{
    gap: 5px;
    margin-top: 7px;
    opacity: 0.88;
  }

  .planner-ai-command-btn{
    min-height: 32px;
    padding: 0 10px;
    font-size: 10.5px;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.84);
  }

  .planner-ai-support{
    margin-top: 7px;
    padding-top: 7px;
    border-top-color: rgba(255,255,255,0.06);
  }

  .planner-ai-support-actions{
    gap: 5px;
  }

  .planner-ai-support-btn{
    min-height: 32px;
    padding: 0 10px;
    font-size: 10.5px;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.82);
  }

  .planner-ai-support-copy{
    gap: 2px;
    margin-bottom: 6px;
  }

  .planner-ai-support-label{
    font-size: 11px;
    letter-spacing: 0.05em;
    opacity: 0.68;
  }

  .planner-ai-support-helper{
    font-size: 11px;
    opacity: 0.62;
  }

  .planner-ai-primary-action{
    flex: 1 1 auto;
  }

  .planner-ai-more-btn{
    min-width: 72px;
  }

  .planner-ai-secondary-actions{
    width: 100%;
    gap: 6px;
  }

  .planner-ai-secondary-actions .btn{
    flex: 1 1 calc(50% - 6px);
  }

  .planner-ai-mic-btn{
    min-width: 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 12px;
  }

  .planner-ai-voice-status{
    min-height: 16px;
    margin-top: 6px;
    font-size: 11px;
  }

  #planner-ai-preview{
    margin-top: 8px !important;
  }

  #planner-ai-preview.has-ai-suggestions{
    margin-top: 8px !important;
  }

  #planner-ai-preview .planner-ai-suggestion-card{
    margin-top: 6px !important;
    padding: 8px !important;
    border-radius: 9px !important;
  }

  #planner-ai-preview .planner-ai-suggestion-card strong{
    font-size: 12px;
  }

  #planner-ai-preview .planner-ai-apply-all-wrap{
    margin-top: 8px !important;
    padding: 8px !important;
    border-radius: 9px !important;
  }

  .day-card.is-compact-day{
    margin-bottom: 4px;
  }

  .day-card-toggle.is-compact{
    padding: 9px 10px !important;
    border-radius: 12px !important;
  }

  .stop-row-actions{
    gap: 0;
    position: relative;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .stop-row-primary-actions{
    gap: 5px;
    margin-left: auto;
  }

  .stop-row-inline-move{
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    opacity: 0.66;
  }

  .stop-row-btn{
    opacity: 0.62;
  }

  .stop-row-remove-btn{
    opacity: 0.34;
    pointer-events: auto;
  }

  .time-pill{
    min-width: 52px;
    padding: 4px 7px;
    font-size: 11px;
    opacity: 0.6;
  }

  .time-inline-picker{
    width: 100%;
  }

  .time-slot.is-open{
    width: 70px;
    min-width: 70px;
  }

  .stop-row-action-list{
    width: min(172px, calc(100vw - 32px));
    min-width: 154px;
    max-width: calc(100vw - 34px);
    z-index: 3;
    gap: 7px;
  }

  .stop-item.has-open-actions{
    padding-bottom: 112px;
  }

  .stop-row-actions.is-open .stop-row-action-list{
    display: flex;
  }

  .stop-row-actions-trigger{
    display:inline-flex !important;
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 999px;
    opacity: 0.98;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.96);
    flex: 0 0 auto;
    touch-action: manipulation;
  }

  .stop-row-actions{
    align-self: center;
    padding-bottom: 2px;
  }

  .stop-row-action-menu-btn{
    touch-action: manipulation;
  }

  .stop-row-action-notes{
    margin: 0;
  }

  .stop-row-action-delete{
    opacity: 0.9 !important;
  }

  .stop-row-actions.is-open .stop-row-actions-trigger{
    background: rgba(184,215,255,0.18);
    border-color: rgba(184,215,255,0.28);
    color: rgba(255,255,255,0.96);
  }

  .day-stops-toggle{
    width: auto;
    min-height: 34px;
    margin: 2px 0 12px;
    padding: 0 11px;
    font-size: 12px;
  }

  .planner-jump-helper{
    right: 12px;
    bottom: 12px;
    min-height: 34px;
    padding: 0 11px;
    font-size: 11px;
  }
}

/* =========================================
   ACTIVE DAY + STATUS CALMING OVERRIDES
========================================= */

.day-card[data-active-day="true"] .day-card-toggle.is-active{
  border-color: rgba(208,228,255,0.42) !important;
  background: linear-gradient(180deg, rgba(184,215,255,0.14), rgba(184,215,255,0.09)) !important;
  box-shadow: 0 10px 24px rgba(6, 14, 28, 0.12);
}

.day-card.is-compact-day .day-card-toggle.is-compact{
  border-color: rgba(255,255,255,0.08) !important;
  background: rgba(255,255,255,0.03) !important;
}

.day-card-toggle{
  gap: 10px !important;
}

.day-card-toggle > div{
  gap: 2px !important;
}

.day-card-toggle > div > div:first-child{
  line-height: 1.2;
}

.day-card-toggle > div > div:last-child{
  line-height: 1.1;
}

.day-card[data-active-day="true"] .day-card-toggle > div > div:first-child{
  opacity: 0.98;
}

.day-card[data-active-day="true"] .day-card-toggle > div > div:last-child{
  opacity: 0.74;
}

.planner-ai-placeholder-card{
  border-radius: 9px !important;
  background: rgba(255,255,255,0.032) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: none !important;
}

.planner-ai-placeholder-card strong{
  font-size: 12.5px !important;
  line-height: 1.28 !important;
}

.planner-ai-placeholder-card .muted.small{
  line-height: 1.32;
  opacity: 0.74;
}

.planner-ai-placeholder-card pre{
  margin-top: 8px !important;
  padding: 8px 9px !important;
  border-radius: 10px !important;
  font-size: 12px;
  line-height: 1.35;
}

.planner-ai-placeholder-card button[data-apply-support-suggestion]{
  margin-top: 8px !important;
  min-height: 34px;
}

.planner-ai-placeholder-card ul{
  margin-top: 8px !important;
}

.planner-ai-placeholder-card li{
  margin-bottom: 4px !important;
}

.planner-ai-result-details{
  margin-top: 8px;
}

.planner-ai-result-details summary{
  cursor: pointer;
  list-style: none;
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.82;
}

.planner-ai-result-details summary::-webkit-details-marker{
  display: none;
}

.planner-ai-result-details summary::before{
  content: "+ ";
  opacity: 0.72;
}

.planner-ai-result-details[open] summary::before{
  content: "− ";
}

@media (max-width: 768px){
  .day-card[data-active-day="true"] .day-card-toggle.is-active{
    box-shadow: 0 8px 18px rgba(6, 14, 28, 0.1);
  }

  .day-card-toggle{
    gap: 8px !important;
  }

  .day-card-toggle > div{
    gap: 1px !important;
  }

  .planner-ai-placeholder-card{
    border-radius: 8px !important;
  }

  .planner-ai-placeholder-card strong{
    font-size: 12px !important;
  }

  .planner-ai-placeholder-card .muted.small{
    font-size: 11px;
  }

  .planner-ai-placeholder-card pre{
    margin-top: 7px !important;
    padding: 7px 8px !important;
    font-size: 11px;
  }

  .planner-ai-placeholder-card button[data-apply-support-suggestion]{
    margin-top: 7px !important;
    min-height: 32px;
  }

  .planner-ai-result-details summary{
    font-size: 11px;
  }
}

.day-stop-summary.has-draft-rows{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.day-stop-summary-draft{
  font-size: 0.92em;
  opacity: 0.62;
}

.stop-item.is-draft-stop-item .stop-row.is-draft-row{
  border-style: dashed;
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.018) !important;
}

.stop-item.is-draft-stop-item .stop-row.is-draft-row .input::placeholder{
  color: rgba(255,255,255,0.46);
}

.stop-item.is-draft-stop-item .time-pill:not(.has-value){
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.025);
}

.stop-place-results{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(9, 16, 26, 0.92);
}

.stop-place-results[hidden]{
  display: none !important;
}

.stop-place-result{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.94);
  text-align: left;
  cursor: pointer;
}

.stop-place-result:hover,
.stop-place-result:focus-visible{
  background: rgba(184,215,255,0.12);
  border-color: rgba(184,215,255,0.24);
  outline: none;
}

.stop-place-result .result-main{
  font-size: 13px;
  font-weight: 600;
}

.stop-place-result .result-sub{
  font-size: 11.5px;
  opacity: 0.7;
}

.pin-selection-summary{
  margin-top: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(184,215,255,0.16);
  background:
    radial-gradient(circle at 10% 0%, rgba(184,215,255,0.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.024));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.pin-selection-summary.is-empty{
  border-color: rgba(255,255,255,0.075);
  background: linear-gradient(180deg, rgba(255,255,255,0.036), rgba(255,255,255,0.018));
}

.pin-selection-summary-kicker{
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pin-selection-summary-label{
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.94);
}

.pin-selection-summary-address{
  margin-top: 4px;
  line-height: 1.4;
  color: rgba(236, 242, 250, 0.74);
}

.pin-selection-summary-support{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}

.pin-provider-chip,
.pin-readiness-line,
.pin-status-chip,
.pin-coordinate-detail,
.pin-confirmation-line,
.pin-lock-line{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.pin-provider-chip{
  color: rgba(238, 245, 255, 0.9);
  border: 1px solid rgba(184,215,255,0.18);
  background: rgba(184,215,255,0.09);
}

.pin-readiness-line{
  color: rgba(226, 237, 250, 0.76);
  border: 1px solid rgba(255,255,255,0.075);
  background: rgba(255,255,255,0.04);
}

.pin-status-chip{
  color: rgba(238, 245, 255, 0.86);
  border: 1px solid rgba(184,215,255,0.14);
  background: rgba(184,215,255,0.065);
}

.pin-coordinate-detail{
  color: rgba(218, 228, 242, 0.5);
  border: 1px solid rgba(255,255,255,0.055);
  background: rgba(5, 11, 19, 0.22);
}

.pin-confirmation-line{
  flex-basis: 100%;
  justify-content: flex-start;
  min-height: 30px;
  line-height: 1.35;
  color: rgba(238, 245, 255, 0.72);
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.035);
}

.pin-lock-line{
  color: rgba(220, 236, 255, 0.9);
  border: 1px solid rgba(184,215,255,0.18);
  background: rgba(184,215,255,0.09);
}

.pin-lock-line::before{
  content: "🔒";
  margin-right: 5px;
}

#pin-location-unlock[hidden]{
  display: none !important;
}

.pin-workspace-status{
  flex-basis: 100%;
  padding: 0 4px;
  color: rgba(190, 219, 255, 0.68);
}

.pin-lock-symbol-btn{
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  justify-content: center;
  border-radius: 999px !important;
  font-size: 14px !important;
}

.pin-symbol-action-btn{
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  justify-content: center;
  border-radius: 999px !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

.pin-selection-summary-actions .pin-symbol-action-btn,
.pin-quick-action.pin-symbol-action-btn{
  flex: 0 0 34px;
}

.location-unlock-confirm{
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border-radius: 14px;
  border: 1px solid rgba(184,215,255,0.13);
  background: rgba(184,215,255,0.055);
}

.location-unlock-confirm[hidden]{
  display: none !important;
}

.location-unlock-confirm span{
  flex: 1 1 150px;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(231, 240, 252, 0.76);
}

.pin-selection-summary-actions{
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pin-drop-mode-status{
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 13px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  background: rgba(250, 204, 21, 0.09);
  color: rgba(255, 243, 194, 0.92);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pin-drop-mode-status[hidden]{
  display: none !important;
}

#pin-drop-tabiflow-map.is-active{
  color: rgba(255, 247, 210, 0.96) !important;
  border-color: rgba(250, 204, 21, 0.34) !important;
  background: rgba(250, 204, 21, 0.13) !important;
}

#pin-cancel-drop-tabiflow-map{
  color: rgba(236, 242, 250, 0.66) !important;
}

.pin-advanced{
  margin-top: 6px;
}

.pin-advanced > summary{
  min-height: 34px !important;
  padding: 0 12px !important;
  font-size: 12px;
  opacity: 0.82;
}

.pin-selection-summary-actions [hidden]{
  display: none !important;
}

.pin-paste-helper{
  margin-top: 6px;
  line-height: 1.35;
}

.location-workspace-section{
  margin-top: 12px;
  padding: 11px;
  border-radius: 16px;
  border: 1px solid rgba(184,215,255,0.075);
  background: rgba(255,255,255,0.022);
}

.location-details-input,
.pin-search-input,
.location-reservation-input{
  width: 100%;
  margin-top: 6px;
  color: rgba(241,246,252,0.88) !important;
  border-color: rgba(184,215,255,0.105) !important;
  background: linear-gradient(180deg, rgba(8, 14, 24, 0.86), rgba(6, 11, 19, 0.76)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.location-details-input{
  min-height: 66px !important;
  max-height: 96px;
  resize: vertical;
}

.location-helper-text,
.location-private-hint{
  margin-top: 6px;
  color: rgba(218, 228, 242, 0.48);
}

.location-tag-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.location-tags-summary{
  list-style: none;
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(184,215,255,0.085);
  background: rgba(255,255,255,0.026);
  color: rgba(229,238,250,0.68);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.location-tags-summary::-webkit-details-marker{
  display: none;
}

.location-meta-section[open] .location-tag-grid{
  margin-top: 9px;
}

.location-tag-btn,
.stop-row-meta-chip{
  border-radius: 999px !important;
}

.location-tag-btn{
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: rgba(229,238,250,0.64) !important;
  border-color: rgba(184,215,255,0.085) !important;
  background: rgba(255,255,255,0.024) !important;
}

.location-tag-btn.is-selected{
  color: rgba(242,247,255,0.9) !important;
  border-color: rgba(184,215,255,0.2) !important;
  background: rgba(184,215,255,0.085) !important;
}

.location-reservation-section{
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,0.055);
}

.location-reservation-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.location-reservation-wide{
  grid-column: 1 / -1;
}

.stop-row-meta-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.stop-row-meta-chip{
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(184,215,255,0.095);
  background: rgba(184,215,255,0.045);
  color: rgba(232,241,255,0.64);
  font-size: 9.5px;
  font-weight: 600;
}

#pin-modal[data-location-locked="true"] .pin-search-shell{
  opacity: 0.72;
}

#pin-modal[data-location-locked="true"] .location-details-input,
#pin-modal[data-location-locked="true"] .location-reservation-input,
#pin-modal[data-location-locked="true"] .location-tag-btn{
  opacity: 0.68;
}

@media (max-width: 768px){
  .day-stop-summary.has-draft-rows{
    gap: 3px;
  }
}

.day-mobile-sticky-add-wrap{
  display: none;
}

@media (max-width: 768px){
  .day-mobile-sticky-add-wrap{
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: flex-end;
    z-index: 12;
    margin: 0;
    padding: 8px 0 10px;
    pointer-events: none;
  }

  .day-mobile-sticky-add{
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    opacity: 0.78;
    border-radius: 999px;
    background: rgba(12,20,30,0.9);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 24px rgba(5,10,18,0.18);
    pointer-events: auto;
  }
}

/* =========================================
   PHASE 3D — MOBILE PLANNER SURFACE RESET
========================================= */
@media (max-width: 768px){
  #planner{
    background: rgba(12, 18, 28, 0.86);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 10px 26px rgba(0,0,0,0.22);
  }

  .tf-topbar{
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 8px;
  }

  .tf-topbar .btn{
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    color: rgba(244,247,251,0.74);
    opacity: 0.86;
  }

  .tf-topbar .btn:hover,
  .tf-topbar .btn:focus-visible{
    transform: none;
    background: rgba(255,255,255,0.055);
    color: rgba(244,247,251,0.84);
  }

  #planner .panel-title{
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.62;
    margin-bottom: 2px;
  }

  .planner-setup-bar{
    margin-top: 8px;
    margin-bottom: 9px;
    border-radius: 15px;
    border-color: var(--tf-border-soft);
    background: var(--tf-bg-surface);
  }

  .planner-setup-toggle{
    padding: 10px 12px;
    gap: 10px;
  }

  .planner-setup-label{
    font-size: 10.5px;
    letter-spacing: 0.08em;
    opacity: 0.58;
  }

  .planner-setup-summary{
    font-size: 12px;
    opacity: 0.8;
  }

  .planner-setup-body{
    padding: 0 12px 12px;
  }

  .tf-toolbar{
    gap: 7px;
    margin-top: 8px;
    margin-bottom: 8px;
  }

  #days-input,
  #country-select,
  #city-select,
  #planner .day-card input,
  #planner .day-card select,
  #planner .day-card textarea{
    min-height: 36px;
    border-radius: 12px;
    background: var(--tf-bg-elevated);
    border-color: var(--tf-border-soft);
    box-shadow: none;
    color: var(--tf-text-primary);
  }

  #planner .day-card input::placeholder,
  #planner .day-card textarea::placeholder{
    color: var(--tf-text-muted);
  }

  #build-btn{
    min-height: 36px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    border-radius: 999px;
  }

  .day-card{
    padding: 5px 0 3px;
    margin-bottom: 7px;
  }

  .day-card-toggle.is-active{
    padding: 11px 12px !important;
    border-radius: 15px !important;
    background: rgba(184,215,255,0.08) !important;
    border-color: rgba(184,215,255,0.18) !important;
    box-shadow: none !important;
  }

  .day-card-toggle.is-compact{
    padding: 8px 10px !important;
    border-radius: 12px !important;
  }

  .day-card[data-active-day="true"] .day-card-toggle.is-active{
    box-shadow: none !important;
  }

  .day-mobile-sticky-add-wrap{
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    margin-bottom: 6px;
  }

  .day-mobile-sticky-add,
  .day-card .day-add-btn{
    min-height: 34px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(255,255,255,0.045);
    border-color: rgba(255,255,255,0.08);
    box-shadow: none;
    opacity: 0.88;
  }

  .day-card .day-route-btn{
    min-height: 35px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 650;
    border-radius: 999px;
    box-shadow: none !important;
  }

  .day-body.is-active-day-body .stop-item,
  .day-card .stop-item{
    margin-bottom: 8px !important;
  }

  .day-body.is-active-day-body .stop-row,
  .day-card .stop-row{
    padding: 6px 8px !important;
    border-radius: 10px !important;
    gap: 6px !important;
    min-height: 0;
  }

  .stop-row{
    border-color: rgba(255,255,255,0.045);
    background: rgba(255,255,255,0.018) !important;
  }

  .stop-row .input{
    min-height: 34px !important;
    margin-bottom: 0;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 10px;
  }

  .time-slot{
    width: 50px;
    min-width: 50px;
    border-radius: 10px;
  }

  .time-slot.is-open{
    width: 64px;
    min-width: 64px;
  }

  .time-pill{
    min-width: 50px;
    padding: 3px 6px;
    font-size: 10.5px;
    border-radius: 9px;
    opacity: 0.72;
  }

  .time-inline-select{
    min-height: 82px;
    font-size: 11px;
  }

  .stop-row-primary-actions{
    gap: 4px;
  }

  .stop-row-route-trigger,
  .stop-row-actions-trigger,
  .stop-row-btn{
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 13px;
    border-radius: 999px;
    padding: 0 !important;
  }

  .stop-row-actions-trigger{
    font-size: 16px;
  }

  .stop-row-btn{
    opacity: 0.7;
  }

  .stop-row-action-list{
    width: min(162px, calc(100vw - 28px));
    min-width: 150px;
    padding: 7px;
    gap: 5px;
    border-radius: 12px;
  }

  .stop-row-action-menu-btn{
    min-height: 34px;
    height: 34px;
    padding: 0 9px !important;
    gap: 8px;
  }

  .stop-row-action-icon{
    font-size: 13px;
  }

  .stop-row-action-label{
    font-size: 12px;
  }

  .planner-mobile-browse-helper,
  .day-stops-toggle{
    margin-bottom: 8px;
  }

  .planner-mobile-browse-helper{
    padding: 1px 2px 0;
  }

  .planner-mobile-browse-helper [data-browse-range]{
    font-size: 11px !important;
    color: rgba(244,247,251,0.64) !important;
  }

  .day-control-btn.day-stops-toggle{
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(255,255,255,0.038);
    border-color: rgba(255,255,255,0.075);
    color: rgba(244,247,251,0.78);
  }

  .planner-ai-shell,
  .day-ai-helper-host .planner-ai-shell{
    margin-top: 8px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.06);
    box-shadow: none;
  }

  .planner-ai-shell{
    opacity: 0.92;
  }

  .planner-ai-shell h3{
    font-size: 13px !important;
    margin-bottom: 3px !important;
    opacity: 0.74;
  }

  .planner-ai-shell textarea{
    min-height: 54px !important;
    font-size: 12.5px !important;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
  }

  .planner-ai-shell .btn{
    min-height: 32px !important;
    font-size: 11px !important;
    padding: 0 10px !important;
  }

  .planner-ai-command-btn,
  .planner-ai-support-btn{
    min-height: 28px !important;
    font-size: 9.8px !important;
    padding: 0 8px !important;
  }

  #map{
    margin-top: 8px;
  }
}

/* PHASE 3E — MOBILE WORKING SURFACES COMPLETION */
@media (max-width: 768px){
  .time-pill{
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 54px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border-color: rgba(198, 221, 248, 0.14);
    background: rgba(196, 214, 236, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    color: rgba(244, 247, 252, 0.88);
  }

  .time-pill::before{
    content: "◷";
    font-size: 10px;
    opacity: 0.58;
    transform: translateY(-0.5px);
  }

  .time-pill-label{
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.01em;
  }

  .time-slot{
    display: flex;
    align-items: stretch;
  }

  .time-pill-kicker{
    display: none;
  }

  .stop-row.has-time .time-pill,
  .stop-row:hover .time-pill,
  .stop-row:focus-within .time-pill{
    border-color: rgba(198, 221, 248, 0.2);
    background: rgba(196, 214, 236, 0.1);
  }

  .time-slot.is-open .time-inline-picker{
    border-radius: 13px;
    border: 1px solid rgba(176, 214, 255, 0.16);
    background: rgba(8, 15, 25, 0.84);
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  }

  .time-inline-select{
    padding: 6px 0;
    border-radius: 13px;
    background: transparent;
  }

  .stop-row-actions{
    overflow: visible;
  }

  .stop-row-action-list{
    top: calc(100% + 2px);
    right: -2px;
    padding: 6px;
    border-radius: 13px;
    border: 1px solid rgba(193, 221, 255, 0.14);
    background: rgba(10, 16, 26, 0.96);
    box-shadow: 0 12px 26px rgba(0,0,0,0.24);
  }

  .stop-row-action-list::before{
    content: "";
    position: absolute;
    top: -5px;
    right: 14px;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    border-top: 1px solid rgba(193, 221, 255, 0.14);
    border-left: 1px solid rgba(193, 221, 255, 0.14);
    background: rgba(10, 16, 26, 0.96);
  }

  .stop-row-action-list.is-open-upward::before{
    top: auto;
    bottom: -6px;
    transform: rotate(225deg);
  }

  .stop-row-action-list.is-open-leftward::before{
    right: auto;
    left: 14px;
  }

  .stop-row-action-menu-btn{
    min-height: 36px;
    border-radius: 11px;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    background: rgb(18, 28, 42);
    border: 1px solid rgba(255,255,255,0.045);
  }

  .stop-row-action-menu-btn.stop-row-action-delete{
    background: rgb(18, 28, 42);
    border-color: rgba(255,255,255,0.045);
  }

  .stop-row-action-icon{
    width: 14px;
    text-align: center;
    color: rgba(232, 241, 255, 0.68);
    font-size: 12px;
  }

  .stop-row-action-label{
    font-weight: 600;
    color: rgba(245,247,251,0.88);
  }

  .stop-notes-wrap{
    padding-left: 0 !important;
  }

  .stop-notes-surface{
    margin-left: 2px;
    padding: 8px 9px 9px;
    border-radius: 14px;
    border: 1px solid rgba(182, 215, 255, 0.12);
    background: rgba(255,255,255,0.025);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }

  .stop-notes-surface-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .stop-notes-kicker{
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(231, 241, 255, 0.58);
  }

  .stop-notes-close{
    min-height: 28px !important;
    padding: 0 9px !important;
    font-size: 10.5px !important;
    border-radius: 999px;
    color: rgba(238,244,255,0.74);
    background: rgba(255,255,255,0.04);
  }

  .stop-notes-input,
  .day-body.is-active-day-body .stop-notes-wrap textarea[data-notes]{
    min-height: 68px !important;
    padding: 10px 11px 11px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(11, 17, 26, 0.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
    line-height: 1.45;
  }

  .stop-notes-input::placeholder{
    color: rgba(239,244,251,0.42);
  }

  #pin-modal{
    align-items: flex-end;
    padding: 10px;
  }

  #pin-modal.location-workspace-desktop{
    position: fixed;
    inset: auto auto auto auto;
    width: min(520px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow: auto;
    align-items: stretch;
    padding: 18px;
    z-index: 80;
  }

  #pin-modal.location-workspace-desktop .modal-header{
    cursor: grab;
  }

  #pin-modal.location-workspace-desktop.is-dragging .modal-header{
    cursor: grabbing;
  }

  #pin-modal.location-workspace-mobile{
    inset: auto 0 0 0;
    max-height: min(88vh, 820px);
    overflow: auto;
  }

  #pin-modal .modal-header{
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  #pin-modal .modal-header .modal-title{
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
  }

  .pin-modal-body{
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #pin-modal.location-workspace-desktop .pin-modal-body{
    max-height: calc(100vh - 132px);
    overflow: auto;
    padding-right: 2px;
  }

  .pin-search-shell{
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(181, 215, 255, 0.12);
    background:
      linear-gradient(180deg, rgba(184,215,255,0.08), rgba(255,255,255,0.035));
  }

  .pin-search-copy{
    margin-bottom: 8px;
  }

  .pin-search-kicker{
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(232, 241, 255, 0.58);
  }

  .pin-search-title{
    margin-top: 2px;
    font-size: 13px;
    font-weight: 650;
    color: rgba(247,250,255,0.92);
  }

  .pin-search-label{
    margin-bottom: 6px;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(232,241,255,0.58);
  }

  .pin-search-row{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .pin-search-input{
    min-height: 38px !important;
    border-radius: 13px !important;
    background: rgba(7, 13, 22, 0.46) !important;
    border-color: rgba(255,255,255,0.07) !important;
  }

  .pin-voice-btn{
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 13px;
    background: rgba(184,215,255,0.12);
    border-color: rgba(184,215,255,0.2);
    color: rgba(248,250,255,0.92);
  }

  .pin-voice-status{
    min-height: 16px;
    margin-top: 6px;
    color: rgba(226, 236, 249, 0.62);
  }

  .pin-quick-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }

  .pin-quick-action{
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
  }

  .stop-place-results{
    margin-top: 0;
    padding: 4px 0 0;
  }

  .stop-place-result{
    border-radius: 13px;
    background: rgba(255,255,255,0.032);
  }

  .pin-selection-summary{
    margin-top: 0;
    padding: 12px;
    border-radius: 16px;
    border-color: rgba(190, 219, 255, 0.12);
    background: rgba(255,255,255,0.035);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }

  .pin-selection-summary-main{
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 11px;
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(190,220,255,0.08), rgba(255,255,255,0.025));
    border: 1px solid rgba(190,220,255,0.08);
  }

  .pin-selection-summary-label{
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: rgba(248,250,255,0.94);
  }

  .pin-selection-summary-address{
    margin-top: 0;
    color: rgba(236, 242, 250, 0.78);
    line-height: 1.45;
    letter-spacing: 0.005em;
  }

  .pin-selection-summary-support{
    margin-top: 2px;
    color: rgba(190, 219, 255, 0.52);
    line-height: 1.35;
  }

  .pin-selection-summary-actions{
    margin-top: 12px;
  }

  .pin-selection-summary-actions .btn{
    min-height: 31px !important;
    padding: 0 10px !important;
    border-radius: 999px;
    font-size: 11px !important;
    background: rgba(255,255,255,0.035);
    border-color: rgba(255,255,255,0.06);
  }

  .pin-advanced{
    margin-top: 2px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    padding: 6px;
  }

  .pin-advanced > summary{
    width: 100%;
    justify-content: flex-start;
    background: transparent !important;
    border-color: transparent !important;
    padding-left: 6px !important;
    color: rgba(235,241,249,0.76);
  }

  .pin-advanced[open] > summary{
    margin-bottom: 8px;
  }

  .pin-advanced .input{
    min-height: 36px !important;
    border-radius: 12px !important;
    background: rgba(7, 13, 22, 0.4) !important;
  }

  .pin-footer-actions{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 2px;
  }

  .pin-footer-actions .btn{
    min-height: 34px !important;
    border-radius: 999px;
    padding: 0 12px !important;
  }

  .pin-footer-actions #pin-clear{
    background: rgba(255,255,255,0.035);
    border-color: rgba(255,255,255,0.06);
    color: rgba(238, 243, 250, 0.7);
  }

  .planner-ai-input-row{
    align-items: stretch;
  }

  .planner-ai-mic-btn{
    min-width: 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.045);
    border-color: rgba(255,255,255,0.08);
    color: rgba(244,247,251,0.86);
    font-size: 14px !important;
  }

  .planner-ai-run-btn{
    flex: 1 1 auto;
  }
}

/* PHASE 3G — MOBILE GRAPHIC LANGUAGE LOCK */
@media (max-width: 768px){
  #planner .panel-title,
  #map .panel-title,
  .planner-setup-label,
  .planner-toolbar-label,
  .stop-notes-kicker,
  .pin-search-kicker,
  .pin-search-label,
  .pin-selection-summary-kicker{
    font-size: 10px !important;
    font-weight: 650 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    line-height: 1.15 !important;
    color: rgba(232, 239, 248, 0.58) !important;
  }

  .planner-ai-title,
  #pin-modal .modal-title,
  .pin-search-title,
  .pin-selection-summary-label{
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.005em !important;
    line-height: 1.2 !important;
    color: rgba(246, 249, 252, 0.92) !important;
  }

  .planner-setup-summary,
  .day-stop-summary,
  .day-stop-summary-draft,
  [data-browse-range],
  #route-hint,
  .pin-selection-summary-address,
  .pin-voice-status,
  .planner-ai-voice-status,
  .pin-paste-helper,
  .planner-ai-placeholder-card .muted.small{
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    color: rgba(233, 239, 247, 0.62) !important;
  }

  #build-btn,
  #ai-run-btn,
  #pin-save,
  .day-card .day-route-btn,
  #planner-view-toggle,
  #map-toggle-btn{
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
  }

  .day-control-btn.day-stops-toggle,
  .pin-quick-action,
  .pin-selection-summary-actions .btn,
  #route-open-link,
  #map .panel-actions .btn,
  .stop-notes-close,
  .pin-footer-actions #pin-clear,
  .planner-ai-mic-btn{
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
  }

  .stop-row-action-label{
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.2 !important;
  }

  .time-pill-label{
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.01em !important;
  }

  #planner .input::placeholder,
  #planner textarea::placeholder,
  #pin-modal .input::placeholder,
  #planner-ai-shell textarea::placeholder{
    font-size: 12.5px !important;
    font-weight: 400 !important;
    color: rgba(237, 242, 249, 0.42) !important;
    letter-spacing: 0 !important;
  }

  .label,
  .planner-toolbar-label{
    font-size: 10px !important;
    font-weight: 650 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: rgba(232, 239, 248, 0.58) !important;
  }

  .input,
  textarea,
  select{
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.005em;
  }

  .time-pill{
    color: rgba(245, 247, 251, 0.88);
    background: rgba(196, 214, 236, 0.075);
    border-color: rgba(198, 221, 248, 0.12);
  }

  .time-pill::before{
    opacity: 0.46;
  }

  .planner-mobile-browse-helper [data-browse-range]{
    color: rgba(233, 239, 247, 0.62) !important;
  }

  .stop-row-action-list{
    z-index: 64;
  }

  .day-mobile-sticky-add-wrap{
    z-index: 12;
  }

  .stop-row-action-menu-btn,
  .stop-row-action-menu-btn.stop-row-action-delete{
    background: rgb(18, 28, 42);
    border-color: rgba(255,255,255,0.045);
  }

  .stop-row-action-icon{
    font-size: 11.5px;
    color: rgba(232, 241, 255, 0.62);
  }

  .stop-notes-surface{
    background: rgba(255,255,255,0.022);
    border-color: rgba(182, 215, 255, 0.1);
  }

  .stop-notes-input,
  .day-body.is-active-day-body .stop-notes-wrap textarea[data-notes]{
    background: rgba(11, 17, 26, 0.26);
  }

  .pin-search-shell,
  .pin-selection-summary{
    background: rgba(255,255,255,0.03);
  }

  .pin-selection-summary-main{
    background: linear-gradient(180deg, rgba(190,220,255,0.06), rgba(255,255,255,0.02));
  }

  .planner-ai-shell,
  .day-ai-helper-host .planner-ai-shell{
    background: rgba(255,255,255,0.018);
    border-color: rgba(255,255,255,0.055);
  }

  .planner-ai-title{
    margin-bottom: 4px !important;
  }

  #map .panel-actions .btn{
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
  }
}

/* PHASE 3H — MOBILE FINAL FINISH */
@media (max-width: 768px){
  .stop-row-action-list{
    top: calc(100% - 2px);
    right: 2px;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  }

  .stop-row-action-list::before{
    top: -4px;
    right: 12px;
    width: 8px;
    height: 8px;
  }

  .stop-row-action-list.is-open-upward{
    bottom: calc(100% + 4px);
  }

  .stop-row-action-list.is-open-upward::before{
    bottom: -4px;
  }

  .stop-row-action-menu-btn{
    min-height: 34px;
    padding: 0 10px !important;
  }

  .stop-row-action-menu-btn + .stop-row-action-menu-btn{
    margin-top: 3px;
  }

  .time-slot.is-open{
    width: 72px;
    min-width: 72px;
  }

  .time-slot.is-open .time-inline-picker{
    margin-bottom: 4px;
    border-radius: 12px;
    border-color: rgba(194, 219, 248, 0.12);
    background: linear-gradient(180deg, rgba(18, 25, 37, 0.96), rgba(10, 16, 25, 0.92));
    box-shadow:
      0 10px 22px rgba(0,0,0,0.2),
      inset 0 1px 0 rgba(255,255,255,0.04);
  }

  .time-inline-select{
    min-height: 84px;
    padding: 5px 4px;
    border-radius: 12px;
    color: rgba(245,248,252,0.88);
  }

  .time-inline-select option{
    min-height: 24px;
    padding: 4px 3px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(11, 17, 26, 0.96);
    color: rgba(245,248,252,0.88);
  }

  .time-inline-select:focus{
    background: transparent;
    border-color: rgba(194, 219, 248, 0.18);
  }

  #map{
    border-color: rgba(255,255,255,0.05);
  }

  #map .panel-row{
    align-items: center;
  }

  #map .panel-actions{
    gap: 6px;
  }

  #map .leaflet-control-container .leaflet-top,
  #map .leaflet-control-container .leaflet-bottom{
    z-index: 18;
  }

  #map .leaflet-bar,
  #map .leaflet-control-zoom{
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.18) !important;
    background: rgba(13, 20, 30, 0.88) !important;
    backdrop-filter: blur(10px);
  }

  #map .leaflet-control-zoom a{
    width: 34px !important;
    height: 34px !important;
    line-height: 32px !important;
    border: 0 !important;
    background: rgba(13, 20, 30, 0.88) !important;
    color: rgba(244,247,251,0.88) !important;
    font-size: 18px !important;
    font-weight: 500;
  }

  #map .leaflet-control-zoom a + a{
    border-top: 1px solid rgba(255,255,255,0.06) !important;
  }

  #map .leaflet-control-zoom a:hover,
  #map .leaflet-control-zoom a:focus-visible{
    background: rgba(25, 35, 48, 0.92) !important;
    color: rgba(250,251,255,0.96) !important;
  }

  #map .leaflet-control-attribution{
    border-radius: 10px;
    background: rgba(13, 20, 30, 0.74);
    color: rgba(230,236,244,0.58);
    padding: 2px 6px;
  }

  #map .leaflet-control-attribution a{
    color: rgba(235,240,247,0.7);
  }
}

/* PHASE 3I — MOBILE MAP STABILITY / SCROLL SYNC REPAIR */
@media (max-width: 768px){
  #map{
    overflow: visible;
    contain: layout style;
  }

  #map .map-panel-body{
    overflow: visible;
    overscroll-behavior: contain;
  }

  #map-canvas,
  #map .leaflet-container{
    touch-action: pan-y pinch-zoom;
  }

  #map .leaflet-container{
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* PHASE 4A — DESKTOP DESIGN-LANGUAGE CARRYOVER */
@media (min-width: 769px){
  body .container{
    max-width: 1380px;
    padding: 24px 24px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.7fr);
    gap: 18px 20px;
    align-items: start;
  }

  body #planner{
    grid-column: 1;
    margin: 0;
    padding: 18px 18px 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(14, 21, 31, 0.9), rgba(11, 18, 28, 0.82));
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 18px 36px rgba(0,0,0,0.24);
  }

  body #map{
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    padding: 16px;
    border-radius: 24px;
    position: sticky;
    top: 20px;
    background: linear-gradient(180deg, rgba(14, 21, 31, 0.9), rgba(11, 18, 28, 0.84));
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 18px 36px rgba(0,0,0,0.24);
  }

  body .tf-topbar{
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  body .tf-topbar .btn{
    min-height: 34px;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(244,247,251,0.72);
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.07);
    box-shadow: none;
    opacity: 0.92;
  }

  body .tf-topbar .btn:hover,
  body .tf-topbar .btn:focus-visible{
    transform: none;
    color: rgba(244,247,251,0.86);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.11);
  }

  body #planner .panel-title,
  body #map .panel-title,
  body .planner-setup-label,
  body .stop-notes-kicker,
  body .pin-search-kicker{
    font-size: 10.5px;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(244,247,251,0.52);
  }

  body .planner-setup-bar{
    margin: 10px 0 12px;
    border-radius: 20px;
    background: var(--tf-bg-surface);
    border-color: var(--tf-border-soft);
  }

  body .planner-setup-toggle{
    padding: 13px 15px;
  }

  body .planner-setup-summary,
  body .day-stop-summary,
  body .day-stop-summary-draft,
  body .muted.small,
  body #route-hint,
  body [data-browse-range]{
    font-size: 12px;
    line-height: 1.4;
    color: rgba(244,247,251,0.62);
  }

  body .tf-toolbar{
    display: grid;
    grid-template-columns: 70px minmax(90px, 110px) minmax(110px, 130px) minmax(130px, 1fr) minmax(180px, 1fr) 128px;
    gap: 10px;
    align-items: center;
    margin: 6px 0 2px;
  }

  body .planner-toolbar-label{
    margin: 0;
    align-self: center;
  }

  body #days-input,
  body #country-select,
  body #city-select,
  body #planner .day-card input,
  body #planner .day-card select,
  body #planner .day-card textarea,
  body .planner-ai-shell textarea,
  body .pin-search-input,
  body #pin-gmap,
  body #pin-label-manual,
  body #pin-lat,
  body #pin-lng{
    min-height: 42px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    color: rgba(244,247,251,0.94);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  body #planner .day-card input::placeholder,
  body #planner .day-card textarea::placeholder,
  body .planner-ai-shell textarea::placeholder,
  body .pin-search-input::placeholder,
  body #pin-gmap::placeholder,
  body #pin-label-manual::placeholder,
  body #pin-lat::placeholder,
  body #pin-lng::placeholder{
    color: rgba(244,247,251,0.42);
  }

  body #build-btn,
  body .planner-ai-run-btn,
  body #pin-save{
    min-height: 42px !important;
    padding: 0 18px !important;
    border-radius: 999px;
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: 0.015em;
  }

  body #planner-view-toggle,
  body #map .btn,
  body .day-control-btn.day-stops-toggle,
  body .pin-quick-action,
  body #pin-open-link,
  body #pin-selection-change,
  body #pin-close,
  body #pin-clear{
    min-height: 34px !important;
    padding: 0 12px !important;
    border-radius: 999px;
    font-size: 12px !important;
    font-weight: 600;
    color: rgba(244,247,251,0.78);
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
    box-shadow: none;
  }

  body .day-card{
    margin-bottom: 10px;
    padding: 4px 0;
  }

  body .day-card-toggle{
    border-radius: 18px !important;
  }

  body .day-card-toggle.is-active{
    padding: 14px 16px !important;
    background: linear-gradient(180deg, rgba(184,215,255,0.08), rgba(255,255,255,0.025)) !important;
    border-color: rgba(184,215,255,0.2) !important;
    box-shadow: none !important;
  }

  body .day-card-toggle.is-compact{
    padding: 11px 14px !important;
    background: rgba(255,255,255,0.02) !important;
    border-color: rgba(255,255,255,0.07) !important;
  }

  body .day-card[data-active-day="true"] .day-card-toggle > div > div:first-child,
  body .day-card-toggle > div > div:first-child{
    font-size: 15px;
    letter-spacing: -0.015em;
    font-weight: 700;
  }

  body .day-body.is-desktop-day-body{
    overflow: visible;
    padding: 8px 0 2px;
  }

  body .day-body.is-desktop-day-body > div:first-child{
    margin-bottom: 12px !important;
  }

  body .day-body.is-desktop-day-body .stop-item{
    margin-bottom: 10px !important;
  }

  body .day-body.is-desktop-day-body .stop-row{
    padding: 9px 11px !important;
    border-radius: 14px !important;
    gap: 8px !important;
    background: rgba(255,255,255,0.018) !important;
    border: 1px solid rgba(255,255,255,0.05);
  }

  body .time-slot{
    width: 74px;
    min-width: 74px;
  }

  body .time-pill{
    min-width: 74px;
    min-height: 42px;
    padding: 5px 10px;
    border-radius: 14px;
    opacity: 0.88;
  }

  body .time-pill-label{
    font-size: 12px;
    font-weight: 700;
  }

  body .time-pill-kicker{
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(244,247,251,0.46);
  }

  body .stop-row .input{
    min-height: 42px !important;
    border-radius: 14px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 600;
  }

  body .stop-row-primary-actions{
    gap: 6px;
  }

  body .stop-row-route-trigger,
  body .stop-row-actions-trigger,
  body .stop-row-btn{
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 999px;
    font-size: 16px;
  }

  body .stop-row-action-list{
    width: 188px;
    min-width: 188px;
    padding: 7px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(14,21,31,0.98), rgba(10,16,24,0.96));
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 16px 34px rgba(0,0,0,0.28);
  }

  body .stop-row-action-list .stop-row-action-menu-btn{
    min-height: 36px;
    padding: 0 10px !important;
    border-radius: 11px;
    gap: 9px;
    background: rgb(18, 28, 42);
    border-color: rgba(255,255,255,0.06);
  }

  body .stop-row-action-list .stop-row-action-label{
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  body .stop-row-action-list .stop-row-action-icon{
    font-size: 13px;
    opacity: 0.76;
  }

  body .stop-notes-surface{
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18,24,35,0.92), rgba(13,19,29,0.9));
    border-color: rgba(255,255,255,0.07);
  }

  body .stop-notes-input{
    min-height: 92px !important;
    font-size: 14px;
  }

  body .day-ai-helper-host--desktop-companion{
    margin: 6px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
  }

  body .day-ai-helper-host--desktop-companion::before{
    color: rgba(244,247,251,0.46);
    letter-spacing: 0.14em;
  }

  body .planner-ai-shell,
  body .day-ai-helper-host .planner-ai-shell{
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(14,21,31,0.72), rgba(12,18,28,0.62));
    border-color: rgba(255,255,255,0.07);
    box-shadow: none;
    opacity: 0.96;
  }

  body .planner-ai-shell h3{
    font-size: 12px !important;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(244,247,251,0.52);
    margin-bottom: 8px !important;
  }

  body .planner-ai-input-row{
    gap: 10px;
  }

  body .planner-ai-mic-btn{
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
  }

  body #map .panel-row{
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
  }

  body #map .panel-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  body #map-canvas{
    height: 360px;
    border-radius: 18px;
  }

  body #map .map-panel-body{
    padding-top: 2px;
  }

  body #route-link-wrap{
    margin-top: 12px !important;
  }

  body .pin-search-shell,
  body .pin-selection-summary,
  body .pin-advanced{
    border-radius: 16px;
  }

  body .modal{
    width: min(760px, 78vw);
    border-radius: 22px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(15,22,32,0.98), rgba(11,18,28,0.96));
  }
}
/* PHASE 4D - MOBILE ACTION LANGUAGE LOCK */
@media (max-width: 768px){
  body .stop-item.has-open-actions{
    padding-bottom: 8px;
  }

  body .stop-row-action-list{
    top: auto;
    bottom: calc(100% + 6px);
    right: calc(100% - 2px);
    left: auto;
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 24px);
    padding: 5px;
    gap: 5px;
    border-radius: 14px;
  }

  body .stop-row-action-list::before{
    top: auto;
    bottom: -4px;
    right: 16px;
    left: auto;
    transform: rotate(225deg);
  }

  body .stop-row-action-list.is-open-upward{
    top: auto;
    bottom: calc(100% + 6px);
  }

  body .stop-row-action-list.is-open-leftward{
    right: calc(100% - 2px);
    left: auto;
  }

  body .stop-row-action-list.is-open-upward::before,
  body .stop-row-action-list.is-open-leftward::before{
    top: auto;
    bottom: -4px;
    right: 16px;
    left: auto;
    transform: rotate(225deg);
  }

  body .stop-row-action-list .stop-row-action-menu-btn{
    width: 38px !important;
    min-width: 38px !important;
    min-height: 38px;
    padding: 0 !important;
    gap: 0;
    justify-content: center !important;
    position: relative;
    overflow: visible;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  }

  body .stop-row-action-list .stop-row-action-label{
    display: none !important;
  }

  body .stop-row-action-list .stop-row-action-icon{
    width: auto;
    min-width: 0;
    font-size: 13px;
  }

  body .stop-row-action-list .stop-row-action-menu-btn.is-hint-active{
    background: rgb(28, 43, 63);
    border-color: rgba(213, 229, 255, 0.12);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
    transform: translateY(-1px);
  }

  body .stop-row-action-list .stop-row-action-menu-btn.is-delete-armed{
    background: rgb(74, 27, 40);
    border-color: rgba(255, 150, 171, 0.22);
  }

  body .stop-row-action-list .stop-row-action-menu-btn.is-delete-armed .stop-row-action-icon{
    color: rgba(255, 215, 223, 0.92);
  }

  .stop-row-action-bubble{
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(214, 228, 248, 0.12);
    background: rgba(10, 16, 25, 0.96);
    box-shadow: 0 10px 22px rgba(0,0,0,0.22);
    color: rgba(239, 244, 251, 0.88);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    pointer-events: none;
  }

  .stop-row-content{
    position: relative;
  }

  .stop-row-event-main{
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
  }

  .stop-row-event-main .input{
    min-width: 0;
  }

  .stop-number-badge{
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(184, 215, 255, 0.18);
    background: rgba(13, 23, 38, 0.92);
    color: rgba(246, 249, 252, 0.9);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    user-select: none;
  }

  .stop-row-place-preview{
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    padding: 7px 10px 8px;
    border-radius: 12px;
    border: 1px solid rgba(184, 209, 242, 0.12);
    background: linear-gradient(180deg, rgba(20, 28, 42, 0.82), rgba(13, 20, 31, 0.72));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    box-sizing: border-box;
  }

  .stop-row-place-preview-kicker{
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(232, 241, 255, 0.5);
  }

  .stop-row-place-preview-main{
    font-size: 13px;
    line-height: 1.32;
    font-weight: 600;
    color: rgba(244, 247, 252, 0.92);
  }

  .stop-row-place-preview-address{
    font-size: 12px;
    line-height: 1.35;
    color: rgba(228, 236, 248, 0.7);
  }

  .stop-row-pin-address{
    font-size: 12px;
    line-height: 1.35;
    color: rgba(229, 236, 246, 0.72);
    padding: 0 2px;
    white-space: normal;
    word-break: break-word;
  }
}
/* PHASE 4E - SETUP SURFACE REORGANIZATION */
body .planner-setup-flow{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body .planner-setup-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body .planner-setup-head-copy{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body .planner-setup-head-title{
  font-size: 13px;
  line-height: 1.2;
  font-weight: 650;
  color: rgba(244, 247, 251, 0.9);
}

body .planner-setup-head-summary{
  font-size: 12px;
  line-height: 1.42;
  color: rgba(232, 239, 248, 0.56);
}

body .planner-overview-chip{
  align-self: flex-start;
  min-height: 28px !important;
  padding: 0 11px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: rgba(240, 245, 251, 0.68);
  background: rgba(255,255,255,0.024);
  border-color: rgba(255,255,255,0.07);
  box-shadow: none;
}

body .planner-overview-chip:hover,
body .planner-overview-chip:focus-visible{
  transform: none;
  color: rgba(240, 245, 251, 0.82);
  background: rgba(255,255,255,0.04);
}

body .planner-setup-fields{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

body .planner-setup-field{
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 10px 11px 11px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.055);
  background: linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.016));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

body .planner-setup-field-city{
  min-width: 0;
}

body .planner-setup-field-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body .planner-country-chip{
  min-height: 26px !important;
  width: auto;
  min-width: 0;
  padding: 0 10px !important;
  border-radius: 999px;
  font-size: 10.5px !important;
  font-weight: 600;
  color: rgba(231, 238, 247, 0.6);
  background: rgba(255,255,255,0.022);
  border-color: rgba(255,255,255,0.06);
  box-shadow: none;
}

body .planner-setup-actions{
  display: flex;
}

body .planner-setup-actions #build-btn{
  width: 100%;
}

@media (max-width: 768px){
  body .planner-setup-bar{
    margin-top: 8px;
    margin-bottom: 10px;
  }

  body .planner-setup-toggle{
    padding: 11px 12px;
  }

  body .planner-setup-body{
    padding: 0 12px 12px;
  }

  body .planner-setup-flow{
    gap: 10px;
  }

  body .planner-setup-head-title{
    font-size: 12.5px;
  }

  body .planner-setup-head-summary{
    font-size: 11.5px;
    line-height: 1.38;
    color: rgba(232, 239, 248, 0.5);
  }

  body .planner-overview-chip{
    min-height: 26px !important;
    padding: 0 10px !important;
    font-size: 10.5px !important;
  }

  body .planner-setup-fields{
    gap: 8px;
  }

  body .planner-setup-field{
    padding: 9px 10px 10px;
    gap: 6px;
    border-radius: 14px;
  }

  body .planner-country-chip{
    min-height: 24px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }

  body .planner-setup-actions #build-btn{
    min-height: 40px !important;
  }
}

@media (min-width: 769px){
  body .planner-setup-body{
    padding: 0 15px 15px;
  }

  body .planner-setup-flow{
    gap: 13px;
  }

  body .planner-setup-fields{
    grid-template-columns: minmax(0, 132px) minmax(0, 1fr);
    align-items: stretch;
  }

  body .planner-setup-actions{
    justify-content: flex-start;
  }

  body .planner-setup-actions #build-btn{
    width: auto;
    min-width: 158px;
  }
}

/* PHASE 4F - PLANNER BOX / DAY BOX REORGANIZATION */
body .planner-command-strip{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 10px 11px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.055);
  background: linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.014));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  position: relative;
  overflow: visible;
}

body .planner-command-group{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

body .planner-command-btn{
  min-height: 30px !important;
  padding: 0 11px !important;
  border-radius: 999px;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: rgba(236, 242, 250, 0.7);
  background: rgba(255,255,255,0.026);
  border-color: rgba(255,255,255,0.065);
  box-shadow: none;
}

body .planner-command-btn:hover,
body .planner-command-btn:focus-visible{
  transform: none;
  color: rgba(244, 248, 252, 0.86);
  background: rgba(255,255,255,0.042);
}

body .planner-command-btn.is-placeholder,
body .planner-command-btn[disabled]{
  color: rgba(225, 234, 246, 0.34);
  background: rgba(255,255,255,0.014);
  border-color: rgba(255,255,255,0.04);
  opacity: 1;
  cursor: not-allowed;
}

body .planner-email-options-shell{
  position: absolute;
  z-index: 36;
  pointer-events: none;
}

body .planner-email-options-panel,
body .planner-email-options-note{
  pointer-events: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,22,33,0.98), rgba(10,16,25,0.96));
  box-shadow: 0 18px 36px rgba(0,0,0,0.28);
  backdrop-filter: blur(14px);
}

body .planner-email-options-panel{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

body .planner-email-options-header{
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 4px 6px;
}

body .planner-email-options-title{
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244,247,251,0.7);
}

body .planner-email-options-subtitle{
  font-size: 12px;
  line-height: 1.45;
  color: rgba(225,234,246,0.62);
}

body .planner-email-options-btn{
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 11px 12px !important;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.055);
  background: rgba(255,255,255,0.026);
  color: rgba(241,245,251,0.92);
  box-shadow: none;
  text-align: left;
}

body .planner-email-options-btn:hover,
body .planner-email-options-btn:focus-visible{
  transform: none;
  background: rgba(255,255,255,0.045);
  border-color: rgba(184,215,255,0.14);
}

body .planner-email-options-btn-title{
  font-size: 13px;
  line-height: 1.3;
  font-weight: 650;
}

body .planner-email-options-btn-copy{
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(225,234,246,0.62);
}

body .planner-email-options-note{
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(237,243,250,0.9);
}

body .planner-email-options-note.is-success{
  border-color: rgba(158,230,184,0.22);
  color: rgba(218,246,228,0.94);
}

body .planner-email-options-note.is-warning{
  border-color: rgba(246,208,111,0.22);
  color: rgba(250,235,188,0.94);
}

body .days-root{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body .day-card{
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(20, 27, 40, 0.86), rgba(14, 20, 32, 0.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.022);
  overflow: hidden;
}

body .day-card.is-active-day,
body .day-card.is-compact-day{
  background: linear-gradient(180deg, rgba(21, 29, 42, 0.86), rgba(13, 19, 30, 0.8));
}

body .day-card-toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0 !important;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.045);
  background: linear-gradient(180deg, rgba(255,255,255,0.032), rgba(255,255,255,0.018));
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}

body .day-card.is-compact-day .day-card-toggle{
  padding: 11px 13px;
}

body .day-card-copy{
  min-width: 0;
}

body .day-card-title{
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: rgba(245, 248, 252, 0.92);
}

body .day-card .day-stop-summary{
  margin-top: 2px;
  font-size: 11px !important;
  line-height: 1.35;
  color: rgba(227, 235, 246, 0.58);
  opacity: 1 !important;
}

body .day-card .day-stop-summary-draft{
  color: rgba(227, 235, 246, 0.46);
}

body .day-card-copy > div:last-child{
  font-size: 10.5px !important;
  line-height: 1.3;
  color: rgba(219, 228, 240, 0.44);
  opacity: 1 !important;
}

body .day-card-chevron{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  color: rgba(232, 238, 248, 0.56);
  opacity: 1 !important;
}

body .day-body{
  padding: 14px 15px 15px;
  background: transparent;
}

body .day-body.is-active-day-body,
body .day-body.is-desktop-day-body{
  background: transparent;
}

body .day-title-row{
  margin-bottom: 12px !important;
}

body .day-title-input{
  min-height: 42px;
}

body .day-footer-actions{
  align-items: center;
  margin-top: 2px;
}

body .day-move-controls{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body .day-move-btn{
  min-width: 34px !important;
  width: 34px;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 999px;
  font-size: 13px !important;
  font-weight: 700;
  color: rgba(236, 242, 250, 0.78);
  background: rgba(255,255,255,0.022);
  border-color: rgba(255,255,255,0.055);
}

body .day-move-btn:hover,
body .day-move-btn:focus-visible{
  color: rgba(244, 248, 252, 0.92);
  background: rgba(255,255,255,0.04);
  border-color: rgba(184,215,255,0.16);
}

body .day-move-btn[disabled]{
  opacity: 0.34;
  cursor: not-allowed;
}

body .day-body .day-control-btn{
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 999px;
  font-size: 11px !important;
}

body .day-body .day-add-btn{
  color: rgba(236, 242, 250, 0.68);
  background: rgba(255,255,255,0.024);
  border-color: rgba(255,255,255,0.06);
}

body .day-body .day-route-btn{
  min-width: 108px;
  box-shadow: none;
}

body .day-mobile-sticky-add-wrap{
  margin-bottom: 12px;
}

@media (max-width: 768px){
  .day-body.is-active-day-body .stop-row.is-move-selected,
  .day-card .stop-row.is-move-selected{
    background: linear-gradient(180deg, rgba(184,215,255,0.11), rgba(184,215,255,0.055)) !important;
    border-color: rgba(184,215,255,0.26) !important;
    box-shadow:
      0 10px 22px rgba(0,0,0,0.16),
      inset 0 0 0 1px rgba(184,215,255,0.1),
      inset 3px 0 0 rgba(184,215,255,0.22);
  }

  .day-body.is-active-day-body .stop-row.is-move-selected .input,
  .day-card .stop-row.is-move-selected .input{
    border-color: rgba(184,215,255,0.15);
    background: rgba(255,255,255,0.032);
  }

  body .planner-command-strip{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 9px 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 15px;
  }

  body .planner-command-group{
    justify-content: space-between;
    gap: 6px;
  }

  body .planner-command-group > *{
    flex: 1 1 calc(33.333% - 4px);
  }

  body .planner-command-btn{
    width: 100%;
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 10.5px !important;
  }

  body .planner-email-options-panel,
  body .planner-email-options-note{
    border-radius: 16px;
  }

  body .planner-email-options-panel{
    padding: 7px;
  }

  body .planner-email-options-btn{
    padding: 10px 11px !important;
    border-radius: 13px;
  }

  body .planner-email-options-btn-title{
    font-size: 12.5px;
  }

  body .planner-email-options-btn-copy,
  body .planner-email-options-subtitle,
  body .planner-email-options-note{
    font-size: 11.5px;
  }

  body .days-root{
    gap: 10px;
  }

  body .day-card{
    border-radius: 18px;
  }

  body .day-card-toggle{
    padding: 12px 13px;
    gap: 10px;
  }

  body .day-card.is-compact-day .day-card-toggle{
    padding: 10px 12px;
  }

  body .day-card-title{
    font-size: 14px !important;
  }

  body .day-card .day-stop-summary{
    font-size: 10.5px !important;
  }

  body .day-card-copy > div:last-child{
    font-size: 10px !important;
  }

  body .day-body{
    padding: 12px 12px 13px;
  }

  body .day-title-row{
    margin-bottom: 11px !important;
  }

  body .day-title-input{
    min-height: 40px;
    min-width: 0 !important;
  }

  body .day-body .day-control-btn{
    min-height: 32px !important;
    padding: 0 11px !important;
    font-size: 10.5px !important;
  }

  body .day-body .day-route-btn{
    min-width: 102px;
  }
}

@media (min-width: 769px){
  body .planner-command-strip{
    padding: 10px 12px;
  }

  body .planner-command-group{
    gap: 8px;
  }

  body .planner-command-btn{
    min-height: 31px !important;
    padding: 0 12px !important;
  }

  body .day-card{
    border-radius: 22px;
  }

  body .day-card-toggle{
    padding: 14px 16px;
  }

  body .day-body{
    padding: 15px 16px 16px;
  }
}

/* PHASE 4G - PLANNER BOX / DAY BOX VISUAL CLEANUP */
body .planner-command-strip{
  gap: 8px;
  padding: 9px 10px;
  border-radius: 15px;
  border-color: rgba(255,255,255,0.048);
  background: linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.012));
}

body .planner-command-group{
  gap: 6px;
}

body .planner-command-btn{
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 10.5px !important;
  color: rgba(232, 239, 248, 0.66);
  background: rgba(255,255,255,0.022);
  border-color: rgba(255,255,255,0.055);
}

body .planner-command-btn.is-placeholder,
body .planner-command-btn[disabled]{
  color: rgba(225, 234, 246, 0.28);
  background: rgba(255,255,255,0.012);
}

body .day-card{
  border-color: rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(19, 26, 38, 0.82), rgba(13, 18, 28, 0.76));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
}

body .day-card.is-active-day,
body .day-card.is-compact-day{
  background: linear-gradient(180deg, rgba(20, 27, 39, 0.82), rgba(12, 18, 28, 0.78));
}

body .day-card-toggle{
  border-bottom-color: rgba(255,255,255,0.038);
  background: linear-gradient(180deg, rgba(255,255,255,0.024), rgba(255,255,255,0.014));
}

body .day-card-title{
  color: rgba(243, 247, 252, 0.9);
}

body .day-card .day-stop-summary{
  color: rgba(224, 232, 244, 0.54);
}

body .day-card .day-stop-summary-draft{
  color: rgba(224, 232, 244, 0.42);
}

body .day-card-chevron{
  color: rgba(228, 236, 247, 0.5);
}

body .day-title-row{
  margin-bottom: 10px !important;
}

body .day-title-editor{
  min-width: 0;
}

body .day-title-editor-kicker{
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(225, 233, 245, 0.42);
  padding: 0 2px;
}

body .day-title-input{
  min-height: 40px;
  color: rgba(240, 245, 251, 0.86);
}

body .time-pill{
  background: linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.012));
  border-color: rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
}

body .time-pill::before{
  opacity: 0.5;
}

body .time-pill-label{
  color: rgba(231, 239, 248, 0.64);
}

body .time-pill-kicker{
  color: rgba(219, 228, 240, 0.36);
}

body .time-pill.has-value .time-pill-label,
body .stop-row.has-time .time-pill .time-pill-label{
  color: rgba(242, 246, 252, 0.92);
}

body .time-pill.has-value .time-pill-kicker,
body .stop-row.has-time .time-pill .time-pill-kicker{
  color: rgba(227, 235, 246, 0.52);
}

@media (max-width: 768px){
  body .planner-command-strip{
    gap: 7px;
    padding: 8px 9px;
    margin-top: 9px;
    margin-bottom: 9px;
    border-radius: 14px;
  }

  body .planner-command-group{
    gap: 5px;
  }

  body .planner-command-group > *{
    flex: 1 1 calc(33.333% - 4px);
  }

  body .planner-command-btn{
    min-height: 26px !important;
    padding: 0 7px !important;
    font-size: 10px !important;
  }

  body .day-card{
    border-radius: 17px;
  }

  body .day-card-toggle{
    padding: 11px 12px;
  }

  body .day-card.is-compact-day .day-card-toggle{
    padding: 9px 11px;
  }

  body .day-card-title{
    font-size: 13.5px !important;
  }

  body .day-body{
    padding: 11px 11px 12px;
  }

  body .day-title-row{
    margin-bottom: 9px !important;
  }

  body .day-title-editor-kicker{
    font-size: 9.5px;
  }

  body .day-title-input{
    min-height: 38px;
  }

  body .time-pill{
    min-height: 34px;
  }

  body .time-pill-label{
    font-size: 10px;
  }

  body .time-pill-kicker{
    font-size: 8.5px;
  }
}

@media (min-width: 769px){
  body .planner-command-btn{
    min-height: 29px !important;
  }
}

/* PHASE 5A - DESKTOP PLANNER / MAP WORKSPACE FOUNDATION */
@media (min-width: 769px){
  body .container{
    max-width: 1540px;
    padding: 26px 24px 44px;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(500px, 0.96fr);
    grid-template-rows: auto auto;
    gap: 24px 26px;
    align-items: start;
  }

  body #planner{
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    padding: 20px 20px 18px;
    min-height: calc(100vh - 92px);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(13, 20, 30, 0.94), rgba(10, 16, 26, 0.9));
    border-color: rgba(255,255,255,0.09);
    box-shadow: 0 24px 52px rgba(0,0,0,0.24);
  }

  body .planner-ai-shell{
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    align-self: start;
    background: linear-gradient(180deg, rgba(13, 20, 30, 0.82), rgba(10, 16, 26, 0.74));
  }

  body #map{
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    padding: 20px 20px 18px;
    min-height: calc(100vh - 92px);
    border-radius: 28px;
    position: sticky;
    top: 22px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
      linear-gradient(180deg, rgba(18, 27, 40, 0.98), rgba(11, 18, 29, 0.95)),
      radial-gradient(circle at top right, rgba(184,215,255,0.08), transparent 34%);
    border-color: rgba(184,215,255,0.12);
    box-shadow: 0 28px 60px rgba(0,0,0,0.28);
  }

  body #map[data-map-open="false"]{
    padding-bottom: 18px;
  }

  body #map .panel-row{
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.055);
  }

  body #map .panel-actions{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 270px;
  }

  body #map-toggle-btn{
    display: none;
  }

  body #map .panel-actions .btn{
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    color: rgba(236,242,250,0.72);
    background: rgba(255,255,255,0.028);
    border-color: rgba(255,255,255,0.065);
  }

  body #map .panel-actions .btn:hover,
  body #map .panel-actions .btn:focus-visible{
    color: rgba(244,248,252,0.9);
    background: rgba(255,255,255,0.046);
    border-color: rgba(255,255,255,0.11);
  }

  body #map.is-pin-drop-active{
    border-color: rgba(250, 204, 21, 0.34);
    box-shadow:
      0 0 0 3px rgba(250, 204, 21, 0.10),
      0 28px 60px rgba(0,0,0,0.28);
  }

  body #map.is-pin-drop-active #map-canvas{
    border-color: rgba(250, 204, 21, 0.42);
    box-shadow:
      inset 0 0 0 2px rgba(250, 204, 21, 0.13),
      0 18px 38px rgba(0,0,0,0.18);
  }

  body #map .map-panel-body,
  body #map .map-panel-body[hidden]{
    display: flex !important;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
    padding-top: 2px;
  }

  body #map-canvas{
    flex: 1 1 auto;
    min-height: 640px;
    height: auto;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.07);
    background:
      linear-gradient(180deg, rgba(8, 13, 22, 0.56), rgba(8, 13, 22, 0.32));
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.03),
      0 18px 38px rgba(0,0,0,0.18);
  }

  body .map-workspace-footer{
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 15px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.018));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  }

  body .selected-stop-panel{
    position: relative;
    overflow: hidden;
    gap: 12px;
  }

  body .selected-stop-panel::before{
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 14% 0%, rgba(184,215,255,0.11), transparent 32%),
      linear-gradient(135deg, rgba(255,255,255,0.032), transparent 44%);
    opacity: 0.95;
  }

  body .selected-stop-empty,
  body .selected-stop-detail{
    position: relative;
    z-index: 1;
  }

  body .selected-stop-detail{
    display: flex;
    flex-direction: column;
    gap: 13px;
    animation: selectedStopPanelIn 220ms ease-out both;
  }

  body .selected-stop-detail-head{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
  }

  body .selected-stop-time{
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(184,215,255,0.12);
    background: rgba(184,215,255,0.06);
    color: rgba(238, 245, 255, 0.82);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.03em;
  }

  body .selected-stop-detail-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body .selected-stop-detail-item{
    min-width: 0;
    padding: 10px 11px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.055);
    background: rgba(4, 10, 18, 0.18);
  }

  body .selected-stop-detail-item--wide{
    grid-column: 1 / -1;
  }

  body .selected-stop-detail-item span{
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(221, 232, 247, 0.46);
  }

  body .selected-stop-detail-item strong{
    display: block;
    font-size: 12.5px;
    line-height: 1.45;
    font-weight: 600;
    color: rgba(240, 245, 252, 0.82);
  }

  body .selected-stop-notes-editor{
    width: 100%;
    min-height: 82px;
    resize: vertical;
    border-radius: 13px;
    border: 1px solid rgba(184,215,255,0.14);
    background: rgba(4, 10, 18, 0.42);
    color: rgba(241,246,253,0.92);
    padding: 9px 10px;
    font: inherit;
    font-size: 12.5px;
    line-height: 1.45;
    outline: none;
  }

  body .selected-stop-notes-editor::placeholder{
    color: rgba(221,232,247,0.44);
  }

  body .selected-stop-notes-editor:focus{
    border-color: rgba(184,215,255,0.34);
    box-shadow: 0 0 0 3px rgba(99, 139, 204, 0.12);
  }

  body .selected-stop-notes-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }

  body .selected-stop-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body .selected-stop-delete-confirm{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 9px;
    border-radius: 16px;
    border: 1px solid rgba(255, 150, 171, 0.18);
    background: rgba(124, 37, 52, 0.14);
  }

  body .selected-stop-delete-confirm span,
  body .selected-stop-delete-note{
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 225, 231, 0.82);
  }

  body .selected-stop-delete-note{
    padding: 8px 10px;
    border-radius: 13px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.065);
  }

  body .selected-stop-action{
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    color: rgba(236,242,250,0.74);
    background: rgba(255,255,255,0.035);
    border-color: rgba(255,255,255,0.075);
  }

  body .selected-stop-action:hover,
  body .selected-stop-action:focus-visible{
    color: rgba(247,250,255,0.94);
    background: rgba(184,215,255,0.075);
    border-color: rgba(184,215,255,0.18);
  }

  body .selected-stop-action:disabled,
  body .selected-stop-action[aria-disabled="true"]{
    cursor: default;
    color: rgba(236,242,250,0.46);
    background: rgba(255,255,255,0.022);
    border-color: rgba(255,255,255,0.045);
  }

  body .selected-stop-action--danger{
    color: rgba(255, 220, 226, 0.86);
    border-color: rgba(255, 140, 160, 0.18);
    background: rgba(124, 37, 52, 0.16);
  }

  body .selected-stop-action--danger:hover,
  body .selected-stop-action--danger:focus-visible{
    color: rgba(255, 238, 242, 0.96);
    border-color: rgba(255, 150, 171, 0.28);
    background: rgba(124, 37, 52, 0.28);
  }

  @keyframes selectedStopPanelIn{
    from{
      opacity: 0;
      transform: translateX(14px);
    }
    to{
      opacity: 1;
      transform: translateX(0);
    }
  }

  body .map-workspace-footer-kicker{
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(221, 232, 247, 0.5);
  }

  body .map-workspace-footer-title{
    font-size: 15px;
    line-height: 1.3;
    font-weight: 650;
    color: rgba(244,247,251,0.92);
  }

  body .map-workspace-footer-copy{
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(225, 234, 246, 0.68);
  }

  body #route-hint,
  body #route-link-wrap{
    margin-top: 0 !important;
  }

  body #route-link-wrap .btn{
    width: 100%;
    justify-content: center;
  }

  body .days-root{
    padding-right: 2px;
  }

  body .day-card{
    border-radius: 22px;
    border-color: rgba(255,255,255,0.052);
    background: linear-gradient(180deg, rgba(18, 24, 36, 0.84), rgba(11, 17, 27, 0.8));
  }

  body .day-body.is-desktop-day-body{
    padding: 10px 0 2px;
  }

  body .day-body.is-desktop-day-body .stop-item{
    margin-bottom: 11px !important;
  }

  body .day-body.is-desktop-day-body .stop-row{
    padding: 9px 11px !important;
    border-radius: 14px !important;
    gap: 8px !important;
    background: rgba(255,255,255,0.017) !important;
    border: 1px solid rgba(255,255,255,0.046);
  }

  body .stop-row-action-bubble{
    display: none !important;
  }
}

@media (max-width: 768px){
  body .map-workspace-footer{
    display: none;
  }

  body .selected-stop-panel{
    display: none !important;
  }
}

/* PHASE 5B.2 - HORIZONTAL SYMBOL ROW MENU LOCK */
body .stop-row-actions{
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

body .stop-row-action-list,
body .stop-row-action-list.is-open-upward,
body .stop-row-action-list.is-open-leftward{
  top: 50% !important;
  right: calc(100% + 6px) !important;
  bottom: auto !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  display: none;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: min(196px, calc(100vw - 104px));
  min-height: 42px;
  padding: 4px !important;
  gap: 4px !important;
  border-radius: 999px !important;
  z-index: 34;
  white-space: nowrap;
  overflow: visible;
}

body .stop-row-actions.is-open .stop-row-action-list{
  display: inline-flex !important;
}

body .stop-row-action-list::before,
body .stop-row-action-list.is-open-upward::before,
body .stop-row-action-list.is-open-leftward::before{
  display: none !important;
}

body .stop-row-action-list .stop-row-action-menu-btn{
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  flex: 0 0 38px !important;
  padding: 0 !important;
  gap: 0 !important;
  justify-content: center !important;
  border-radius: 999px !important;
}

body .stop-row-action-list .stop-row-action-icon{
  width: auto !important;
  min-width: 0 !important;
  font-size: 15px !important;
}

body .stop-row-action-list .stop-row-action-label,
body .stop-row-action-bubble{
  display: none !important;
}

body .stop-row-delete-helper{
  position: absolute;
  right: 6px;
  bottom: calc(100% + 7px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 170px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(214, 228, 248, 0.18);
  background: rgb(8, 16, 27);
  box-shadow:
    0 14px 28px rgba(0,0,0,0.42),
    0 0 0 1px rgba(255,255,255,0.035) inset;
  color: rgb(244, 248, 252);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: 0.01em;
  pointer-events: none;
  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@media (min-width: 769px){
  body .stop-row-action-list{
    background: rgba(8, 16, 27, 0.96);
    border-color: rgba(184,215,255,0.12);
    box-shadow: 0 14px 30px rgba(0,0,0,0.24);
  }
}

@media (max-width: 768px){
  body .stop-row-action-list,
  body .stop-row-action-list.is-open-upward,
  body .stop-row-action-list.is-open-leftward{
    right: calc(100% + 5px) !important;
    max-width: min(184px, calc(100vw - 94px));
    min-height: 40px;
    padding: 3px !important;
    gap: 3px !important;
  }

  body .stop-row-action-list .stop-row-action-menu-btn{
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    flex-basis: 36px !important;
  }
}

/* PHASE 5C.2 - LOCATION WORKSPACE SURFACES */
@media (min-width: 769px){
  body #pin-modal.location-workspace-desktop{
    position: fixed;
    inset: auto auto auto auto;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    transform: none !important;
    overflow: auto;
    align-items: stretch;
    padding: 18px;
    z-index: 80;
    box-shadow: 0 28px 70px rgba(0,0,0,0.34);
  }

  body #pin-modal.location-workspace-desktop .modal-header{
    cursor: grab;
  }

  body #pin-modal.location-workspace-desktop.is-dragging .modal-header{
    cursor: grabbing;
  }

  body #pin-modal.location-workspace-desktop.is-dropping-pin{
    pointer-events: none;
  }

  body #pin-modal.location-workspace-desktop.is-dropping-pin #pin-cancel-drop-tabiflow-map,
  body #pin-modal.location-workspace-desktop.is-dropping-pin .modal-header{
    pointer-events: auto;
  }

  body #map.is-pin-drop-active::after{
    content: "Tap the map to place this pin";
    position: absolute;
    left: 28px;
    right: 28px;
    top: 86px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.34);
    background: rgba(10, 16, 27, 0.88);
    color: rgba(255, 247, 210, 0.96);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 28px rgba(0,0,0,0.24);
    pointer-events: none;
  }

  body #pin-modal.location-workspace-desktop .pin-modal-body{
    max-height: calc(100vh - 148px);
    overflow: auto;
    padding-right: 2px;
  }
}

body #pin-modal .pin-advanced{
  border-color: rgba(255,255,255,0.045);
  background: rgba(255,255,255,0.014);
}

body #pin-modal .pin-advanced > summary{
  color: rgba(226, 236, 248, 0.58);
}

body #pin-modal .pin-advanced[open]{
  padding: 8px;
}

body #pin-modal .pin-advanced label,
body #pin-modal .pin-paste-helper{
  color: rgba(218, 228, 242, 0.46) !important;
}

body #pin-modal .pin-advanced .input{
  color: rgba(228, 238, 249, 0.7) !important;
  border-color: rgba(184,215,255,0.07) !important;
  background: rgba(6, 11, 19, 0.58) !important;
}

body #pin-modal .pin-footer-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.055);
}

body #pin-modal #pin-clear{
  margin-right: auto;
  color: rgba(255, 221, 226, 0.62) !important;
  border-color: rgba(255, 150, 171, 0.12) !important;
  background: rgba(124, 37, 52, 0.08) !important;
}

body #pin-modal #pin-save{
  margin-left: auto;
}

body #pin-modal .location-reservation-input option{
  color: #eef5ff;
  background: #101722;
}

@media (max-width: 768px){
  body #pin-modal.location-workspace-mobile{
    position: fixed !important;
    inset: auto auto 10px 10px !important;
    width: calc(100vw - 20px) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 20px) !important;
    max-height: 88vh !important;
    margin: 0 !important;
    transform: none !important;
    overflow: auto !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
  }

  body #pin-modal.location-workspace-mobile .pin-modal-body,
  body #pin-modal.location-workspace-mobile .pin-search-shell,
  body #pin-modal.location-workspace-mobile .pin-selection-summary,
  body #pin-modal.location-workspace-mobile .location-workspace-section,
  body #pin-modal.location-workspace-mobile .pin-advanced{
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body #pin-modal.location-workspace-mobile .location-reservation-grid{
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   TABIFLOW — R3D ROW ACTION MENU VISUAL OWNERSHIP FIX
   Purpose:
   - Keep R3C logic intact.
   - Make opened ⋮ actions read as a popover owned by ⋮.
   - Stop the action strip from looking like inline row buttons.
   ========================================================= */

body .stop-row-actions{
  position: relative !important;
  isolation: isolate;
}

/* Closed row remains [ time ] [ event ] [ ⇄ ] [ ⋮ ].
   Open menu is an overlay/popover, not an inline row extension. */
body .stop-row-action-list,
body .stop-row-action-list.is-open-upward,
body .stop-row-action-list.is-open-leftward{
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;

  display: none;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;

  width: auto !important;
  min-width: 0 !important;
  max-width: min(196px, calc(100vw - 40px));
  min-height: 42px;

  padding: 4px !important;
  gap: 4px !important;

  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  background: rgb(8, 13, 22) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.42) !important;

  z-index: 240 !important;
  white-space: nowrap;
  overflow: visible;
}

/* Only display when the ⋮ owner is open. */
body .stop-row-actions.is-open .stop-row-action-list{
  display: inline-flex !important;
}

/* Upward placement remains a popover above ⋮, not an inline row strip. */
body .stop-row-action-list.is-open-upward{
  top: auto !important;
  bottom: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
}

/* Leftward class should not turn it into an inline strip.
   Right-align keeps the popover extending inward from ⋮. */
body .stop-row-action-list.is-open-leftward{
  right: 0 !important;
  left: auto !important;
}

/* Small owner pointer. */
body .stop-row-action-list::before{
  content: "";
  position: absolute;
  top: -5px;
  right: 13px;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: rgb(8, 13, 22) !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-left: 1px solid rgba(255,255,255,0.08) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.42) !important;
  display: block !important;
  pointer-events: none;
}

body .stop-row-action-list.is-open-upward::before{
  top: auto;
  bottom: -5px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

/* Symbol-only menu buttons. */
body .stop-row-action-list .stop-row-action-menu-btn{
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  flex: 0 0 38px !important;

  padding: 0 !important;
  gap: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  border-radius: 999px !important;
  background: rgb(18, 28, 42) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35) !important;

  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  position: relative;
  z-index: 1;
}

body .stop-row-action-list .stop-row-action-menu-btn:hover,
body .stop-row-action-list .stop-row-action-menu-btn:focus-visible{
  background: rgb(28, 43, 63) !important;
  border-color: rgba(184,215,255,0.34) !important;
  transform: none !important;
}

body .stop-row-action-list .stop-row-action-icon{
  width: auto !important;
  min-width: 0 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  color: rgba(244, 248, 255, 0.98) !important;
  opacity: 1 !important;
}

body .stop-row-action-list .stop-row-action-label,
body .stop-row-action-bubble{
  display: none !important;
}

/* Make the ⋮ owner visibly related to the popover without turning the actions into row buttons. */
body .stop-row-actions.is-open .stop-row-actions-trigger{
  background: rgba(184,215,255,0.18) !important;
  border-color: rgba(184,215,255,0.30) !important;
  color: rgba(255,255,255,0.98) !important;
  box-shadow: 0 0 0 1px rgba(184,215,255,0.08) inset;
}

/* Mobile keeps the same symbol popover, but tighter. */
@media (max-width: 768px){
  body .stop-row-action-list,
  body .stop-row-action-list.is-open-upward,
  body .stop-row-action-list.is-open-leftward{
    top: auto !important;
    right: 0 !important;
    bottom: calc(100% + 8px) !important;
    left: auto !important;
    max-width: min(184px, calc(100vw - 28px));
    min-height: 40px;
    padding: 3px !important;
    gap: 3px !important;
  }

  body .stop-row-action-list .stop-row-action-menu-btn{
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    flex-basis: 36px !important;
  }

  body .stop-row-action-list::before{
    top: auto;
    bottom: -5px;
    right: 13px;
    border-left: 0;
    border-top: 0;
    border-right: 1px solid rgba(184,215,255,0.14);
    border-bottom: 1px solid rgba(184,215,255,0.14);
  }
}

/* Phase 5E.3: one shared helper bubble for symbol controls. */
body .symbol-helper-bubble{
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10020;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(260px, calc(100vw - 16px));
  min-height: 28px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(214, 228, 248, 0.22);
  background: rgb(8, 13, 22);
  box-shadow:
    0 16px 34px rgba(0,0,0,0.48),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  color: rgb(244, 248, 255);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

body .symbol-helper-bubble.is-visible{
  opacity: 1;
  transform: translateY(0);
}

body .symbol-helper-bubble[data-helper-mode="mobile"]{
  min-height: 32px;
  padding: 8px 12px;
  border-radius: 16px;
  white-space: normal;
  background: rgb(8, 13, 22);
}

body .symbol-helper-bubble[hidden]{
  display: none !important;
}

@media (min-width: 769px){
  body .stop-row-action-list .stop-row-action-menu-btn{
    background: rgb(18, 28, 42) !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35) !important;
    position: relative;
    z-index: 1;
  }

  body .stop-row-action-list .stop-row-action-menu-btn:hover,
  body .stop-row-action-list .stop-row-action-menu-btn:focus-visible{
    background: rgb(28, 43, 63) !important;
    border-color: rgba(184,215,255,0.34) !important;
  }

  body .stop-row-action-list .stop-row-action-icon{
    opacity: 1 !important;
    color: rgba(244,248,252,0.94) !important;
  }

  body .symbol-helper-bubble,
  body .stop-row-delete-helper{
    background: rgb(8, 13, 22) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body .symbol-helper-bubble{
    pointer-events: none !important;
    z-index: 10020;
  }

  body .symbol-helper-bubble.is-visible{
    opacity: 1 !important;
  }
}

/* Phase 5E.3D: mobile tap/press mirrors desktop hover by lighting the active symbol. */
body [data-route].is-symbol-helper-active,
body [data-stop-actions-toggle].is-symbol-helper-active,
body [data-time-toggle].is-symbol-helper-active,
body [data-toggle-notes].is-symbol-helper-active,
body [data-pin].is-symbol-helper-active,
body [data-location-lock-toggle].is-symbol-helper-active,
body [data-remove].is-symbol-helper-active,
body [data-day-route].is-symbol-helper-active,
body #fit-pins-btn.is-symbol-helper-active,
body #pin-modal .pin-symbol-action-btn.is-symbol-helper-active,
body #pin-modal .pin-lock-symbol-btn.is-symbol-helper-active,
body #pin-modal #pin-clear.is-symbol-helper-active,
body #pin-voice-btn.is-symbol-helper-active,
body #ai-voice-btn.is-symbol-helper-active{
  opacity: 1 !important;
  color: rgba(255,255,255,0.98) !important;
  background: rgba(184,215,255,0.18) !important;
  border-color: rgba(184,215,255,0.32) !important;
  box-shadow: 0 8px 18px rgba(73,142,255,0.16);
}

/* Phase 5D.2: temporary route direction cue for the existing ⇄ action. */
body .stop-row.is-route-cue-source,
body .stop-row.is-route-cue-target{
  position: relative;
  opacity: 1;
}

body .stop-row.is-route-cue-source{
  border-color: rgba(184,215,255,0.36) !important;
  box-shadow: 0 8px 18px rgba(73, 142, 255, 0.14);
}

body .stop-row.is-route-cue-target{
  border-color: rgba(184,215,255,0.22) !important;
  background: rgba(184,215,255,0.055) !important;
}

body .stop-row.is-route-cue-source::after{
  content: "↓";
  position: absolute;
  right: 46px;
  bottom: -18px;
  z-index: 4;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(184,215,255,0.28);
  background: rgba(9, 16, 28, 0.94);
  color: rgba(226, 236, 248, 0.92);
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

@media (max-width: 768px){
  body .stop-row.is-route-cue-source::after{
    right: 42px;
    bottom: -17px;
    width: 19px;
    height: 19px;
    font-size: 12px;
  }
}

/* FINAL LOCK — ROW ACTION MENU SOLID BACKPLATE
   Purpose: live screenshot showed row lines bleeding through the opened ⋮ menu.
   This creates a true opaque capsule behind the action buttons on desktop + mobile. */
body .stop-row-actions.is-open .stop-row-action-list{
  background: #08101b !important;
  background-color: #08101b !important;
  opacity: 1 !important;
  isolation: isolate !important;
  pointer-events: auto !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow:
    0 18px 42px rgba(0,0,0,0.58),
    0 0 0 1px rgba(255,255,255,0.06) inset !important;
}

/* Solid capsule plate that covers the gaps between the circular buttons. */
body .stop-row-actions.is-open .stop-row-action-list::after{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  border-radius: inherit !important;
  background: #08101b !important;
  background-color: #08101b !important;
  opacity: 1 !important;
  pointer-events: none !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035) !important;
}

/* Keep the existing pointer arrow above the backplate if present. */
body .stop-row-actions.is-open .stop-row-action-list::before{
  z-index: 1 !important;
  background: #08101b !important;
  background-color: #08101b !important;
  opacity: 1 !important;
}

/* Keep every action button above the solid capsule and fully opaque. */
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-menu-btn{
  position: relative !important;
  z-index: 2 !important;
  background: #121c2a !important;
  background-color: #121c2a !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.38) !important;
}

/* Keep icons readable and non-glassy. */
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-icon{
  opacity: 1 !important;
  color: rgba(246,249,252,0.96) !important;
}

/* Keep helper tooltip solid as final cascade insurance. */
body .symbol-helper-bubble,
body .symbol-helper-bubble[data-helper-mode="mobile"],
body .stop-row-delete-helper{
  background: #080d16 !important;
  background-color: #080d16 !important;
  opacity: 0;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body .symbol-helper-bubble.is-visible{
  opacity: 1 !important;
}

/* Landing city selector native option contrast. */
.planner-entry #prefecture-select option,
.planner-entry #city-select option,
.planner-entry .planner-city-select option{
  color: #10192f;
  background: #ffffff;
}

.planner-entry #prefecture-select option:checked,
.planner-entry #city-select option:checked,
.planner-entry .planner-city-select option:checked{
  color: #ffffff;
  background: #2563eb;
}

/* Planner setup location selector native option contrast. */
.planner-setup-bar #country-select option,
.planner-setup-bar #prefecture-select option,
.planner-setup-bar #city-select option,
.planner-setup-bar .select option{
  color: #10192f;
  background: #ffffff;
}

.planner-setup-bar #country-select option:checked,
.planner-setup-bar #prefecture-select option:checked,
.planner-setup-bar #city-select option:checked,
.planner-setup-bar .select option:checked{
  color: #ffffff;
  background: #2563eb;
}

/* Template theme selector native option contrast. */
#template-theme-select option,
.template-theme-select option{
  color: #10192f;
  background: #ffffff;
}

#template-theme-select option:checked,
.template-theme-select option:checked{
  color: #ffffff;
  background: #2563eb;
}

/* FINAL TABIFLOW LOCK — CALM ROW ACTION MENU
   One solid menu surface. No stacked helper bubble over open menu. */

body .stop-row-actions.is-open .stop-row-action-list{
  background: #08101b !important;
  background-color: #08101b !important;
  border: 1px solid rgba(184,215,255,0.16) !important;
  box-shadow: 0 18px 42px rgba(0,0,0,0.52) !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate !important;
}

/* Remove extra internal plate feeling; the capsule itself is the surface. */
body .stop-row-actions.is-open .stop-row-action-list::after{
  display: none !important;
}

/* Icons should sit inside the capsule, not look like four separate glass bubbles. */
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-menu-btn{
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Solid but quiet hover/focus only. */
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-menu-btn:hover,
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-menu-btn:focus-visible,
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-menu-btn.is-hint-active{
  background: #132033 !important;
  background-color: #132033 !important;
  border-color: rgba(184,215,255,0.18) !important;
  box-shadow: none !important;
}

/* Keep icons readable. */
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-icon{
  opacity: 1 !important;
  color: rgba(246,249,252,0.96) !important;
}

/* FINAL HIT LOCK — ROW ACTION MENU OWNS ITS WHOLE VISIBLE AREA
   Gap clicks inside the open capsule must hit the menu surface, not row controls behind it. */
body .stop-row-actions.is-open .stop-row-action-list{
  pointer-events: auto !important;
  z-index: 10000 !important;
}

body .stop-row-actions.is-open .stop-row-action-list::after{
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  border-radius: inherit !important;
  background: transparent !important;
  pointer-events: auto !important;
}

body .stop-row-actions.is-open .stop-row-action-list::before{
  z-index: 3 !important;
}

body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-menu-btn{
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

body .stop-row:has(.stop-row-actions.is-open){
  position: relative;
  z-index: 10000 !important;
}

body .stop-row-actions.is-open{
  position: relative;
  z-index: 10001 !important;
}

/* FINAL LOCK — ROW ACTION MENU CLICK SHIELD
   Every point inside the visible ⋮ popup capsule belongs to the popup.
   Gap clicks are swallowed and must never hit row controls behind it. */

body .stop-row-actions.is-open{
  z-index: 520 !important;
  isolation: isolate !important;
}

body .stop-row-actions.is-open .stop-row-action-list{
  pointer-events: auto !important;
  isolation: isolate !important;
  z-index: 521 !important;
}

/* Real hit shield for the full visible capsule, including gaps between icons. */
body .stop-row-actions.is-open .stop-row-action-list::after{
  content: "" !important;
  position: absolute !important;
  inset: -2px !important;
  display: block !important;
  border-radius: inherit !important;
  background: #08101b !important;
  background-color: #08101b !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 0 !important;
  box-shadow:
    0 18px 42px rgba(0,0,0,0.52),
    0 0 0 1px rgba(255,255,255,0.06) inset !important;
}

/* Keep optional pointer arrow above shield but non-clickable. */
body .stop-row-actions.is-open .stop-row-action-list::before{
  z-index: 1 !important;
  pointer-events: none !important;
}

/* Buttons must remain above the shield and clickable. */
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-menu-btn{
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

/* Icons remain readable and do not steal button hit testing. */
body .stop-row-actions.is-open .stop-row-action-list .stop-row-action-icon{
  position: relative !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

/* LANDING LOCK — LOCATION CONTROL GROUP + CONTROLLED READABILITY MODES */
body[data-visual-mode="photo"] .planner-entry-card,
body:not([data-visual-mode]) .planner-entry-card{
  background: linear-gradient(180deg, rgba(8, 16, 27, 0.94), rgba(7, 13, 22, 0.9));
  border-color: rgba(184, 215, 255, 0.18);
  box-shadow: 0 22px 52px rgba(0,0,0,0.42);
  backdrop-filter: blur(10px);
}

body[data-visual-mode="dark"]{
  background: #050a12;
}

body[data-visual-mode="dark"]::before{
  background-image:
    linear-gradient(180deg, rgba(2, 6, 11, 0.72) 0%, rgba(2, 6, 11, 0.88) 100%),
    var(--seasonal-hero-image, url("../assets/backgrounds/seasons/spring/japan-spring.webp"));
  filter: saturate(0.78) brightness(0.72);
}

body[data-visual-mode="dark"]::after{
  background:
    radial-gradient(circle at top right, rgba(184,215,255,0.06), transparent 26%),
    linear-gradient(180deg, rgba(2,6,11,0.28), rgba(2,6,11,0.48));
}

body[data-visual-mode="dark"] .planner-entry-card{
  background: linear-gradient(180deg, rgba(6, 12, 21, 0.98), rgba(5, 10, 18, 0.96));
  border-color: rgba(210, 228, 255, 0.22);
  box-shadow: 0 24px 60px rgba(0,0,0,0.56);
}

body[data-visual-mode="high-contrast"]{
  --text: #ffffff;
  --muted: #e6edf7;
  --accent: #dceaff;
  --accent-strong: #ffffff;
  background: #02050a;
}

body[data-visual-mode="high-contrast"]::before{
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.96) 100%),
    var(--seasonal-hero-image, url("../assets/backgrounds/seasons/spring/japan-spring.webp"));
  filter: grayscale(0.4) brightness(0.36);
}

body[data-visual-mode="high-contrast"]::after{
  background: linear-gradient(180deg, rgba(0,0,0,0.42), rgba(0,0,0,0.64));
}

body[data-visual-mode="high-contrast"] .planner-entry-card{
  background: #020712;
  border-color: rgba(255,255,255,0.36);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 24px 64px rgba(0,0,0,0.72);
}

.planner-entry .location-control-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  max-width: 520px;
}

.planner-entry .location-control-field{
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.planner-entry .planner-picker-label{
  display: block;
  color: rgba(232, 240, 250, 0.88);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body .planner-entry #prefecture-select.planner-city-select,
body .planner-entry #city-select.planner-city-select,
body .planner-entry .planner-city-select{
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(184, 215, 255, 0.24);
  background: #111c2b;
  color: #f5f8fc;
  padding: 0 38px 0 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 46px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24), 0 0 0 1px rgba(255,255,255,0.035) inset;
  appearance: auto;
}

body .planner-entry #prefecture-select.planner-city-select:focus-visible,
body .planner-entry #city-select.planner-city-select:focus-visible,
body .planner-entry .planner-city-select:focus-visible{
  outline: 3px solid rgba(184, 215, 255, 0.44);
  outline-offset: 2px;
  border-color: rgba(220, 234, 255, 0.62);
}

.visual-mode-control{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 14px 0 0;
  padding: 6px;
  border: 1px solid rgba(184, 215, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 11, 19, 0.72);
}

.visual-mode-control legend{
  float: left;
  margin: 0 2px 0 6px;
  padding: 0;
  color: rgba(232, 240, 250, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 28px;
}

.visual-mode-control label{
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  cursor: pointer;
}

.visual-mode-control input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visual-mode-control span{
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(232, 240, 250, 0.82);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.visual-mode-control input:checked + span{
  background: #dceaff;
  border-color: rgba(255,255,255,0.72);
  color: #07111f;
}

.visual-mode-control input:focus-visible + span{
  outline: 3px solid rgba(184, 215, 255, 0.48);
  outline-offset: 2px;
}

body[data-visual-mode="high-contrast"] .visual-mode-control{
  border-color: rgba(255,255,255,0.38);
  background: #030813;
}

body[data-visual-mode="high-contrast"] .planner-entry #prefecture-select.planner-city-select,
body[data-visual-mode="high-contrast"] .planner-entry #city-select.planner-city-select,
body[data-visual-mode="high-contrast"] .planner-entry .planner-city-select{
  background: #020712;
  border-color: rgba(255,255,255,0.42);
  color: #ffffff;
}

@media (max-width: 720px){
  .planner-entry .location-control-grid{
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: none;
  }

  body .planner-entry #prefecture-select.planner-city-select,
  body .planner-entry #city-select.planner-city-select,
  body .planner-entry .planner-city-select{
    height: 50px;
    border-radius: 14px;
    line-height: 50px;
    font-size: 16px;
  }

  .visual-mode-control{
    width: 100%;
    border-radius: 18px;
  }

  .visual-mode-control legend{
    width: 100%;
    margin: 0 0 2px 4px;
    line-height: 1.2;
  }

  .visual-mode-control label{
    flex: 1 1 auto;
  }

  .visual-mode-control span{
    justify-content: center;
    width: 100%;
  }
}

/* LANDING LOCK — MOBILE HOW-IT-WORKS BOTTOM SHEET */
.howto-mobile-trigger,
.howto-sheet-backdrop,
.howto-bottom-sheet{
  display: none;
}

#mobile-howto{
  scroll-margin-top: calc(var(--header-h) + 28px);
}

@media (min-width: 769px){
  #mobile-howto{
    padding-top: 18px;
  }
}

.howto-bottom-sheet[hidden],
.howto-sheet-backdrop[hidden]{
  display: none !important;
}

@media (max-width: 768px){
  body.howto-sheet-open{
    overflow: hidden;
  }

  #mobile-howto .section-heading,
  #mobile-howto .feature-grid{
    display: none;
  }

  #mobile-howto{
    padding: 8px 0 4px;
  }

  .howto-mobile-trigger{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 14px;
    min-height: 70px;
    padding: 14px 16px;
    border: 1px solid rgba(184, 215, 255, 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(8, 16, 27, 0.94), rgba(7, 13, 22, 0.9));
    color: var(--text);
    box-shadow: 0 14px 34px rgba(0,0,0,0.26);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .howto-mobile-trigger strong,
  .howto-mobile-trigger em{
    display: block;
  }

  .howto-mobile-trigger strong{
    font-size: 15px;
    line-height: 1.2;
  }

  .howto-mobile-trigger em{
    margin-top: 4px;
    color: rgba(232, 240, 250, 0.72);
    font-size: 12.5px;
    font-style: normal;
    line-height: 1.35;
  }

  .howto-mobile-trigger > span:last-child{
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(220, 234, 255, 0.12);
    color: rgba(244, 248, 252, 0.92);
    font-size: 12px;
    font-weight: 800;
  }

  .howto-mobile-trigger:focus-visible{
    outline: 3px solid rgba(184, 215, 255, 0.48);
    outline-offset: 3px;
  }

  .howto-sheet-backdrop{
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: block;
    background: rgba(0, 0, 0, 0.56);
  }

  .howto-bottom-sheet{
    position: fixed;
    inset: auto 10px calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 10031;
    display: block;
    max-height: min(74vh, 640px);
    color: var(--text);
    pointer-events: none;
  }

  .howto-sheet-panel{
    display: flex;
    max-height: inherit;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(184, 215, 255, 0.2);
    border-radius: 24px;
    background: #07101c;
    box-shadow: 0 26px 70px rgba(0,0,0,0.58);
    overflow: auto;
    pointer-events: auto;
  }

  .howto-sheet-header{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .howto-sheet-header .eyebrow{
    margin: 0 0 4px;
    color: rgba(232, 240, 250, 0.68);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .howto-sheet-header h2{
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
  }

  .howto-sheet-close{
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(184, 215, 255, 0.18);
    border-radius: 999px;
    background: rgba(220, 234, 255, 0.1);
    color: rgba(244, 248, 252, 0.92);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .howto-sheet-close:focus-visible,
  .howto-sheet-done:focus-visible{
    outline: 3px solid rgba(184, 215, 255, 0.48);
    outline-offset: 3px;
  }

  .howto-sheet-steps{
    display: grid;
    gap: 10px;
  }

  .howto-sheet-step:nth-child(5){ order: 1; }
  .howto-sheet-step:nth-child(1){ order: 2; }
  .howto-sheet-step:nth-child(6){ order: 3; }
  .howto-sheet-step:nth-child(2){ order: 4; }
  .howto-sheet-step:nth-child(3){ order: 5; }
  .howto-sheet-step:nth-child(4){ order: 6; }
  .howto-sheet-step:nth-child(7){ order: 7; }
  .howto-sheet-step:nth-child(8){ order: 8; }

  .howto-sheet-step{
    padding: 13px;
    border: 1px solid rgba(184, 215, 255, 0.13);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
  }

  .howto-sheet-step strong{
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.2;
  }

  .howto-sheet-step p{
    margin: 0;
    color: rgba(232, 240, 250, 0.74);
    font-size: 13px;
    line-height: 1.45;
  }

  .howto-sheet-done{
    width: 100%;
    max-width: none;
    min-height: 44px;
  }

  body[data-visual-mode="dark"] .howto-mobile-trigger,
  body[data-visual-mode="dark"] .howto-sheet-panel{
    background: #050b14;
    border-color: rgba(210, 228, 255, 0.24);
  }

  body[data-visual-mode="high-contrast"] .howto-mobile-trigger,
  body[data-visual-mode="high-contrast"] .howto-sheet-panel{
    background: #020712;
    border-color: rgba(255,255,255,0.38);
  }

  body[data-visual-mode="high-contrast"] .howto-sheet-step{
    background: #050b16;
    border-color: rgba(255,255,255,0.24);
  }

  body[data-visual-mode="high-contrast"] .howto-mobile-trigger em,
  body[data-visual-mode="high-contrast"] .howto-sheet-step p{
    color: rgba(255,255,255,0.84);
  }
}

/* FINAL LOCK - MOBILE PLANNER PAGE SCROLL
   Keep vertical page swipes owned by the document, including near the map. */
@media (max-width: 768px){
  body:has(#planner){
    min-height: 100%;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  body:has(#planner) .container,
  body:has(#planner) #planner,
  body:has(#planner) #map,
  body:has(#planner) .planner-ai-shell{
    min-height: auto;
    overflow: visible;
  }

  body:has(#planner) #map .map-panel-body{
    overflow: visible;
    overscroll-behavior-y: auto;
  }

  body:has(#planner) #map-canvas,
  body:has(#planner) #map .leaflet-container,
  body:has(#planner) #map .leaflet-pane,
  body:has(#planner) #map .leaflet-tile-pane{
    touch-action: pan-y pinch-zoom !important;
  }
}

/* MOBILE TEST FLOW - ADD REAL PLACES
   Mobile-only helper sheet for long-pressing the current visible stops. */
.mobile-place-helper-open,
.mobile-place-helper-open html{
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

#mobile-place-helper{
  display: none;
}

@media (max-width: 768px){
  #mobile-place-helper .tiny-label{
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  #mobile-place-helper .surface-title{
    font-size: 18px;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: 0;
  }

  #mobile-place-helper .body-helper{
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0;
  }

  #mobile-place-helper .stop-identity{
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
  }

  #mobile-place-helper .status-text{
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    cursor: default;
  }

  #mobile-place-helper .field-label{
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
  }

  #mobile-place-helper .input-text{
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
  }

  #mobile-place-helper .action-text{
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
  }

  #mobile-place-helper{
    display: block;
    position: fixed;
    inset: 0;
    z-index: 980;
    pointer-events: none;
  }

  .mobile-place-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(2, 7, 18, 0.54);
    pointer-events: auto;
  }

  .mobile-place-sheet{
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    max-height: min(82vh, 650px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(184, 215, 255, 0.18);
    border-radius: 20px;
    background: #07101c;
    color: rgba(246, 249, 252, 0.96);
    box-shadow: 0 24px 60px rgba(0,0,0,0.58);
    pointer-events: auto;
  }

  .mobile-place-sheet-head{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-place-eyebrow{
    color: rgba(184, 215, 255, 0.72);
  }

  .mobile-place-sheet h2{
    margin: 2px 0 0;
  }

  .mobile-place-close{
    flex: 0 0 auto;
    min-height: 38px;
  }

  .mobile-place-copy,
  .mobile-place-status{
    margin: 0;
    color: rgba(232, 240, 250, 0.76);
  }

  .mobile-place-status{
    padding: 10px 12px;
    border: 1px solid rgba(184, 215, 255, 0.16);
    border-radius: 12px;
    background: rgba(19, 32, 51, 0.92);
  }

  .mobile-place-current,
  .mobile-place-visible-list,
  .mobile-place-finish{
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-place-visible{
    border: 0;
  }

  .mobile-place-visible-list{
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mobile-place-visible summary{
    margin-bottom: 9px;
    color: rgba(232, 240, 250, 0.82);
    cursor: pointer;
  }

  .mobile-place-stop,
  .mobile-place-finish,
  .mobile-place-preview{
    padding: 12px;
    border: 1px solid rgba(184, 215, 255, 0.14);
    border-radius: 14px;
    background: rgba(255,255,255,0.045);
  }

  .mobile-place-stop.is-active{
    border-color: rgba(135, 199, 255, 0.34);
    background: rgba(19, 32, 51, 0.9);
  }

  .mobile-place-stop .mobile-place-finish{
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-place-stop-head{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
  }

  .mobile-place-stop-title{
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .mobile-place-stop-number{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(184, 215, 255, 0.18);
    background: rgba(13, 23, 38, 0.92);
    color: rgba(246, 249, 252, 0.9);
    pointer-events: none;
    user-select: none;
  }

  .mobile-place-stop-head em{
    max-width: 48%;
    color: rgba(184, 215, 255, 0.78);
    font-style: normal;
    text-align: right;
  }

  .mobile-place-label{
    display: block;
    margin-bottom: 7px;
    color: rgba(246, 249, 252, 0.9);
  }

  .mobile-place-input,
  .mobile-place-paste-input{
    width: 100%;
    margin-bottom: 10px;
    background: #0d1726 !important;
    color: rgba(246, 249, 252, 0.96) !important;
    border-color: rgba(184, 215, 255, 0.18) !important;
  }

  .mobile-place-paste-input{
    min-height: 78px;
    resize: vertical;
  }

  .mobile-place-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mobile-place-btn{
    min-height: 40px;
    padding: 7px 11px;
    border-radius: 999px;
  }

  .mobile-place-action-primary{
    border-color: rgba(135, 199, 255, 0.42) !important;
    background: rgba(78, 141, 216, 0.24) !important;
    color: rgba(246, 249, 252, 0.98) !important;
  }

  .mobile-place-action-secondary{
    border-color: rgba(184, 215, 255, 0.18) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: rgba(232, 240, 250, 0.86) !important;
  }

  .mobile-place-stop-chip{
    flex: 0 0 auto;
    min-height: 28px;
    padding: 4px 9px;
    border-color: rgba(184, 215, 255, 0.16) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(232, 240, 250, 0.8) !important;
    box-shadow: none !important;
  }

  .mobile-place-stop-chip.is-active{
    border-color: rgba(135, 199, 255, 0.38) !important;
    background: rgba(78, 141, 216, 0.2) !important;
    color: rgba(246, 249, 252, 0.96) !important;
  }

  .mobile-place-finish-title,
  .mobile-place-preview-kicker{
    margin-bottom: 7px;
    color: rgba(184, 215, 255, 0.78);
  }

  .mobile-place-preview{
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
    background: #081321;
  }

  .mobile-place-preview strong{
    display: block;
  }

  .mobile-place-preview span,
  .mobile-place-preview em{
    overflow-wrap: anywhere;
    color: rgba(232, 240, 250, 0.74);
    font-style: normal;
  }
}
