/* TheGuide · design system (2026-09). One stylesheet for the whole app.
   Mobile first; desktop gets a side rail from 960px. Light and dark themes. */

@font-face { font-family: "Manrope"; src: url("/fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --bg: #f6f3ee;
  --bg-elev: #fbf9f6;
  --surface: #ffffff;
  --surface-2: #f1ede6;
  --surface-3: #e9e3d9;
  --ink: #13262c;
  --ink-2: #3c4d52;
  --muted: #6c797c;
  --line: rgba(19, 38, 44, 0.09);
  --line-strong: rgba(19, 38, 44, 0.16);
  --accent: #d2603a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe5da;
  --accent-deep: #a8472a;
  --sea: #1f6f78;
  --sea-soft: #dcecec;
  --navy: #13303a;
  --gold: #f0c27d;
  --ok: #2f7d5a;
  --ok-soft: #dff0e6;
  --warn: #9a6a14;
  --warn-soft: #fbefd6;
  --danger: #b3372b;
  --danger-soft: #f9e0dc;
  --shadow-1: 0 1px 2px rgba(19, 38, 44, 0.05), 0 2px 8px rgba(19, 38, 44, 0.05);
  --shadow-2: 0 6px 24px rgba(19, 38, 44, 0.10), 0 2px 6px rgba(19, 38, 44, 0.05);
  --shadow-3: 0 18px 50px rgba(19, 38, 44, 0.18);
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --header-h: 56px;
  --nav-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a1f; --bg-elev: #122127; --surface: #15252c; --surface-2: #1b2e35; --surface-3: #22373f;
    --ink: #eef3f2; --ink-2: #c6d2d2; --muted: #93a4a6; --line: rgba(238, 243, 242, 0.09); --line-strong: rgba(238, 243, 242, 0.18);
    --accent: #ec7a52; --accent-soft: #3a2620; --accent-deep: #f39a78; --sea: #5fb4ba; --sea-soft: #173a3f; --navy: #0b2129;
    --ok: #62c496; --ok-soft: #173427; --warn: #e8b85c; --warn-soft: #3a2e17; --danger: #f08678; --danger-soft: #3d201c;
    --shadow-1: 0 1px 2px rgba(0,0,0,.3); --shadow-2: 0 8px 24px rgba(0,0,0,.35); --shadow-3: 0 18px 50px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; font-weight: 750; }
p { margin: 0 0 .75em; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button, a, input, select, label, summary { touch-action: manipulation; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 3px; border-radius: 6px; }
main:focus-visible, #main:focus-visible { outline: none; }
.sr-only, .ws-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 300; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow-2); }
.skip-link:focus { top: calc(10px + var(--safe-top)); }
.tg-i { width: 20px; height: 20px; flex: none; }
ul, ol { padding-left: 1.2em; }
dl { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); }

/* ---------- Shell ---------- */
.app-header {
  position: sticky; top: 0; z-index: 40; height: calc(var(--header-h) + var(--safe-top)); padding: var(--safe-top) var(--gutter) 0;
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.app-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }
.brand-symbol { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: #f7efe3; font: italic 600 21px/1 var(--display); padding-bottom: 3px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.brand-dot { color: var(--accent); }
.brand-logo { display: block; height: 38px; width: auto; }
.auth-brand .brand-logo { height: 40px; padding: 6px 12px; border-radius: 14px; background: #fdf6e8; box-sizing: content-box; }
.app-city { display: none; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.app-header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 750; letter-spacing: .02em; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.icon-button { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); background: transparent; text-decoration: none; transition: background .15s; }
.icon-button:hover { background: var(--surface-2); }
.icon-button svg { width: 20px; height: 20px; }

.workspace { min-height: calc(100dvh - var(--header-h) - var(--safe-top)); padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 24px); }
main { display: block; min-width: 0; overflow-x: clip; max-width: 760px; margin: 0 auto; padding: 8px var(--gutter) 24px; outline: none; animation: page-in .28s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.app-footer { display: none; }
.loading { display: flex; align-items: center; gap: 12px; padding: 48px 4px; color: var(--muted); font-weight: 650; }
.loading::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--nav-h) + var(--safe-bottom)); padding: 6px 8px var(--safe-bottom);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.app-bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 700; border-radius: var(--r-md); transition: color .15s; min-width: 0; }
.app-nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-bottom-nav .app-nav-icon { width: 24px; height: 24px; padding: 0; transition: transform .2s var(--ease); }
.app-bottom-nav a::before { content: ""; position: absolute; top: 4px; width: 46px; height: 30px; border-radius: var(--r-pill); background: var(--accent-soft); opacity: 0; transform: scale(.6); transition: .2s var(--ease); z-index: -1; }
.app-bottom-nav a.active { color: var(--accent-deep); }
.app-bottom-nav a.active::before { opacity: 1; transform: scale(1); }
@media (prefers-color-scheme: dark) { .app-bottom-nav a.active { color: var(--accent); } }
.app-bottom-nav a:active .app-nav-icon { transform: scale(.9); }
.nav-count { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.nav-count:is(:empty) { display: none; }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px); z-index: 400; transform: translate(-50%, 20px); width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--bg); font-weight: 650; font-size: 14px; box-shadow: var(--shadow-3); opacity: 0; pointer-events: none; transition: .25s var(--ease); }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

.personal-tracking-banner { position: sticky; top: calc(var(--header-h) + var(--safe-top)); z-index: 35; margin: 0 auto; max-width: 760px; padding: 8px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 750; font-size: 13px; }
.personal-tracking-banner a { text-decoration: none; }
.personal-tracking-banner button { padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-weight: 750; font-size: 12px; }

/* ---------- Typography helpers ---------- */
.eyebrow, .app-kicker, .personal-overline, .ws-kicker, .commercial-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { .eyebrow, .app-kicker, .personal-overline, .ws-kicker, .commercial-kicker { color: var(--accent); } }
.app-page-intro, .page-heading, .ws-page-header { padding: 14px 0 18px; }
.app-page-title, .page-heading h1, .ws-page-header h1, .tg-map-page-heading h1 { font: 650 clamp(28px, 7.5vw, 38px)/1.08 var(--display); letter-spacing: -0.02em; margin: 6px 0 8px; font-variation-settings: "opsz" 72; }
.app-page-subtitle, .page-heading p { color: var(--muted); font-size: 15px; max-width: 56ch; margin: 0; }
.muted, .tiny { color: var(--muted); }
.tiny { font-size: 12px; line-height: 1.45; margin-top: 10px; }
.lead { font-size: 17px; line-height: 1.5; color: var(--ink); font-weight: 600; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-weight: 750; font-size: 15px; text-decoration: none; letter-spacing: -.005em; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); transition: transform .12s var(--ease), background .15s, box-shadow .15s; }
.button:hover { background: var(--accent-deep); }
.button:active { transform: scale(.97); }
.button .tg-i, .button svg { width: 18px; height: 18px; }
.button.secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.button.secondary:hover { background: var(--surface-2); }
.button.ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
.button.ghost:hover { background: var(--surface-2); }
.button.small { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.button.full { width: 100%; }
.button.personal-destructive, .personal-danger.button { background: var(--danger); box-shadow: none; }
.text-button { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; font-weight: 750; font-size: 14px; color: var(--accent-deep); text-decoration: none; background: none; }
@media (prefers-color-scheme: dark) { .text-button { color: var(--accent); } }
.text-button .tg-i { width: 16px; height: 16px; }
.personal-danger, .text-button.personal-danger { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.chip, .interest-buttons button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: 13.5px; box-shadow: inset 0 0 0 1.5px var(--line); white-space: nowrap; transition: .15s; }
.chip[aria-pressed="true"], .interest-buttons button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip-button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 750; text-decoration: none; }
.chip-button .tg-i { width: 15px; height: 15px; }
.chip-button:hover { background: var(--surface-3); }
.chip-button.is-done { background: var(--ok-soft); color: var(--ok); }
.tg-icon-bubble { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); flex: none; }
.tg-icon-bubble .tg-i { width: 24px; height: 24px; }

/* ---------- Surfaces ---------- */
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.notice, .offline-banner { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 70%, var(--ink)); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; line-height: 1.45; margin: 12px 0; }
.notice p { margin: 4px 0 0; }
.notice strong { display: block; }
.error-box, .personal-error, .setup-error, .ws-form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-md); padding: 12px 14px; font-weight: 650; font-size: 14px; margin: 12px 0; }
.empty, .personal-empty, .geo-empty, .ws-empty, .tg-map-empty { text-align: center; padding: 28px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px dashed var(--line-strong); color: var(--muted); margin: 14px 0; }
.empty .tg-icon-bubble, .personal-empty .personal-empty-icon { margin: 0 auto 12px; }
.empty h2, .personal-empty h2, .tg-map-empty h3 { font: 650 22px/1.2 var(--display); color: var(--ink); margin-bottom: 6px; }
.empty p { max-width: 42ch; margin: 0 auto 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.tag, .personal-tags span { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--sea-soft); color: var(--sea); font-size: 12px; font-weight: 750; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.app-info-disclosure { margin: 18px 0; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.app-info-disclosure > summary { padding: 14px 16px; font-weight: 750; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.app-info-disclosure > summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.app-info-disclosure[open] > summary::after { content: "–"; }
.app-info-disclosure > :not(summary) { margin: 0 16px 14px; color: var(--muted); font-size: 14px; }
.section-title, .app-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title h2, .app-section-title h2 { font: 650 23px/1.15 var(--display); margin-top: 4px; }
.section-title p { color: var(--muted); margin: 4px 0 0; font-size: 14px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 750; color: var(--ink-2); margin: 10px 0; }
.field select, .field input, input[type="search"], input[type="text"], input[type="date"], input[type="number"], textarea, select {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--bg-elev); color: var(--ink); font-weight: 600; font-size: 15px; outline: none; appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236c797c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea { padding: 12px 14px; min-height: 96px; line-height: 1.45; }
.field select:focus, .field input:focus, textarea:focus, select:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 20px; height: 20px; flex: none; margin: 0; }
.checkline { display: flex; align-items: center; gap: 10px; font-weight: 650; margin: 10px 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 750; font-size: 14px; margin-bottom: 8px; padding: 0; }
.interests-label { font-weight: 750; font-size: 13px; color: var(--ink-2); margin: 16px 0 8px; }
.interest-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.app-plan-options { margin: 16px 0; border-radius: var(--r-md); background: var(--surface-2); padding: 0 14px; }
.app-plan-options > summary { padding: 14px 0; font-weight: 750; display: flex; justify-content: space-between; }
.app-plan-options > summary span { color: var(--muted); font-weight: 650; font-size: 13px; }
.app-plan-options[open] { padding-bottom: 14px; }
.budget-note, .dialog-note, .app-planner-note, .personal-helper, .setup-helper, .ws-form-note, .ws-footnote { color: var(--muted); font-size: 13px; line-height: 1.5; }
.dialog-note { display: flex; gap: 8px; align-items: flex-start; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; margin: 14px 0 8px; color: var(--ink-2); }
.dialog-note .tg-i { width: 16px; height: 16px; margin-top: 2px; }
.app-back { margin: 8px 0 -4px; }

/* ---------- Home ---------- */
.app-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.app-home > * { min-width: 0; }
.app-greeting { padding: 10px 0 14px; }
.app-greeting-hello { margin: 0 0 4px; color: var(--muted); font-weight: 700; font-size: 14px; }
.app-greeting h1 { font: 650 clamp(30px, 8.6vw, 44px)/1.04 var(--display); letter-spacing: -0.025em; font-variation-settings: "opsz" 96; }
.app-search-link { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 8px 0 18px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-weight: 650; margin-bottom: 16px; }
.app-search-link span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-search-count { font-size: 11px; font-weight: 800; color: var(--sea); background: var(--sea-soft); border-radius: var(--r-pill); padding: 6px 10px; }
.app-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 22px 20px 20px; color: #f3efe8; background: radial-gradient(120% 90% at 100% 0%, #2a6f78 0%, transparent 60%), linear-gradient(160deg, #173a45 0%, #0f2831 100%); box-shadow: var(--shadow-2); isolation: isolate; }
.app-hero .app-kicker { color: var(--gold); }
.app-hero h2 { font: 650 30px/1.05 var(--display); margin: 8px 0 8px; letter-spacing: -0.02em; }
.app-hero p { color: rgba(243,239,232,.82); font-size: 14.5px; max-width: 30ch; margin-bottom: 16px; }
.app-hero-art { position: absolute; right: -40px; bottom: -34px; width: 230px; opacity: .92; z-index: -1; pointer-events: none; }
.app-hero-art svg { width: 100%; height: auto; }
.tg-time-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; max-width: 290px; }
.tg-time-chip { height: 36px; padding: 0 14px; border-radius: var(--r-pill); display: inline-flex; align-items: center; background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-weight: 750; font-size: 13.5px; border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px); transition: .15s; }
.tg-time-chip:hover, .tg-time-chip:focus-visible { background: #fff; color: var(--navy); }
.app-hero-actions .button { background: #fff; color: var(--navy); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.app-hero-actions .button:hover { background: var(--gold); }
.app-quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 4px; }
.app-quick-actions a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; text-decoration: none; padding: 12px 4px 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: transform .12s; }
.app-quick-actions a:active { transform: scale(.96); }
.app-quick-actions strong { display: block; font-size: 12.5px; line-height: 1.2; }
.app-quick-actions small { display: none; }
.app-quick-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--sea-soft); color: var(--sea); }
.app-quick-icon.is-iris { background: var(--accent-soft); color: var(--accent-deep); }
.app-quick-icon.is-gift { background: var(--warn-soft); color: var(--warn); }
.app-quick-icon.is-heart { background: var(--danger-soft); color: var(--danger); }
.app-quick-icon .tg-i { width: 22px; height: 22px; }
.tg-chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--gutter) 6px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: none; scroll-snap-type: x proximity; }
.tg-chip-row::-webkit-scrollbar { display: none; }
.app-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 300px); gap: 14px; overflow-x: auto; padding: 8px var(--gutter) 14px; margin: 0 calc(-1 * var(--gutter)); scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.app-carousel::-webkit-scrollbar { display: none; }
.app-carousel > * { scroll-snap-align: start; }
.place-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); border: 1px solid var(--line); display: flex; flex-direction: column; }
.app-place-cover, .place-cover, .trip-cover, .sheet-hero, .fav-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; color: rgba(255,255,255,.92); background: radial-gradient(90% 80% at 85% 10%, color-mix(in srgb, var(--cover) 55%, #ffffff) 0%, transparent 60%), linear-gradient(155deg, color-mix(in srgb, var(--cover) 92%, #ffffff) 0%, var(--cover) 45%, color-mix(in srgb, var(--cover) 62%, #000000) 100%); overflow: hidden; text-align: left; }
.app-place-visual { position: absolute; inset: 12% 14% 8%; width: 72%; height: 80%; stroke-width: 2.2; filter: drop-shadow(0 2px 6px rgba(0,0,0,.12)); }
.app-place-cover:hover .app-place-visual { transform: scale(1.03); transition: transform .4s var(--ease); }
.cover-badge { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(10, 22, 27, .52); color: #fff; font-size: 12px; font-weight: 750; backdrop-filter: blur(8px); }
.cover-badge .tg-i { width: 14px; height: 14px; }
.cover-draft { position: absolute; top: 10px; right: 10px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); background: rgba(255,255,255,.9); color: #6b4a10; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; display: inline-flex; align-items: center; }
.cover-index { position: absolute; top: 12px; left: 14px; font: italic 600 40px/1 var(--display); color: rgba(255,255,255,.9); }
.place-content { padding: 14px 16px 12px; display: flex; flex-direction: column; flex: 1; }
.place-content .eyebrow { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; }
.place-content h3 { font-size: 17px; margin: 5px 0 6px; }
.place-content p { color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
.place-content .text-button { margin-top: auto; }
.app-iris-teaser, .app-manual-link, .app-cta-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 18px 0 4px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-decoration: none; }
.app-iris-teaser > span:nth-child(2), .app-manual-link > span, .app-cta-card > span:nth-child(2) { flex: 1; }
.app-iris-teaser strong, .app-manual-link strong, .app-cta-card strong { display: block; font-size: 15px; }
.app-iris-teaser small, .app-manual-link small, .app-cta-card small { color: var(--muted); font-size: 13px; }
.app-manual-link { background: transparent; box-shadow: none; border-style: dashed; margin-top: 12px; }
.app-manual-link > .tg-i:first-child { color: var(--muted); }
.iris-avatar { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: conic-gradient(from 210deg, #d2603a, #f0c27d, #1f6f78, #d2603a); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); flex: none; }
.iris-avatar .tg-i { width: 24px; height: 24px; }
.app-cta-card { background: linear-gradient(120deg, var(--accent) 0%, #e58a5c 100%); color: #fff; border: 0; box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.app-cta-card small { color: rgba(255,255,255,.85); }
.app-cta-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.app-trip-links { margin: 8px 0 4px; gap: 18px; }
.territory-notices .notice { background: var(--sea-soft); color: var(--ink); }
.territory-notices small { color: var(--muted); display: block; margin-top: 2px; }

/* ---------- Bottom sheet dialog ---------- */
#detail-dialog { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); overflow: auto; overscroll-behavior: contain; }
#detail-dialog[open] { animation: sheet-up .32s var(--ease); }
#detail-dialog::backdrop { background: rgba(8, 18, 22, .45); backdrop-filter: blur(2px); animation: fade .25s; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.dialog-inner { position: relative; padding: 10px 20px calc(24px + var(--safe-bottom)); }
.sheet-grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 10px; }
.dialog-inner.has-hero { padding-top: 0; }
.dialog-inner.has-hero .sheet-grabber { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.7); z-index: 2; }
.sheet-hero { margin: 0 -20px 14px; width: calc(100% + 40px); aspect-ratio: 16 / 8; }
.sheet-hero .app-place-visual { inset: 14% 22% 10%; width: 56%; height: 76%; }
.sheet-hero-meta { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 6px; }
.sheet-hero-meta .cover-badge, .sheet-hero-meta .cover-draft { position: static; }
.dialog-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.dialog-top h2 { font: 650 26px/1.1 var(--display); margin-top: 4px; letter-spacing: -0.015em; }
.close-dialog { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.close-dialog .tg-i { width: 18px; height: 18px; }
.has-hero .close-dialog { position: absolute; top: 12px; right: 14px; background: rgba(10,22,27,.45); color: #fff; backdrop-filter: blur(8px); z-index: 3; }
.dialog-body { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.dialog-body p { margin-bottom: .9em; }
.place-actions-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 6px; }
.action-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font-size: 12px; font-weight: 750; text-decoration: none; text-align: center; transition: .15s; }
.action-tile .tg-i { width: 22px; height: 22px; color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { .action-tile .tg-i { color: var(--accent); } }
.action-tile:active { transform: scale(.95); }
.action-tile.is-done { background: var(--ok-soft); color: var(--ok); }
.action-tile.is-done .tg-i { color: var(--ok); }
.source-link { display: inline-flex; font-size: 13px; font-weight: 750; color: var(--sea); text-decoration: none; margin-top: 4px; }
.fav-toggle[aria-pressed="true"] { color: var(--danger); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 40%, transparent); }
.request-result { padding: 16px; border-radius: var(--r-md); background: var(--ok-soft); color: var(--ok); font-size: 14px; }
.request-result strong { display: block; font-size: 16px; margin-bottom: 4px; }

/* ---------- Route ---------- */
.route-result:not(:empty) { margin-top: 18px; }
.route-card { display: block; }
.route-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.route-heading h2 { font: 650 22px/1.15 var(--display); margin-top: 4px; }
.step-label, .saved-mark { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 800; }
.saved-mark { background: var(--ok-soft); color: var(--ok); }
.saved-mark .tg-i { width: 14px; height: 14px; }
.route-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.route-meta span { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 13px; color: var(--ink-2); font-weight: 650; }
.route-meta b { color: var(--ink); font-weight: 800; }
.route-method.is-real { background: var(--ok-soft); color: var(--ok); }
.route-method.is-mixed, .route-method.is-estimate { background: var(--warn-soft); color: var(--warn); }
.route-list { list-style: none; padding: 0; margin: 16px 0 6px; }
.route-origin, .route-stop { position: relative; display: flex; gap: 14px; align-items: flex-start; }
.route-origin { align-items: center; padding: 4px 0; }
.route-origin strong { display: block; font-size: 14.5px; }
.route-origin small { color: var(--muted); font-size: 12.5px; }
.stop-number { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--cover, var(--accent)); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 0 0 4px var(--surface), 0 4px 10px rgba(0,0,0,.12); z-index: 1; }
.stop-number.is-origin { background: var(--ink); color: var(--bg); }
.stop-number.is-origin .tg-i { width: 16px; height: 16px; }
.route-stop-body { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-1); }
.route-stop-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.route-stop-top strong { font-size: 15.5px; }
.route-stop-time { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }
.route-stop-time .tg-i { width: 13px; height: 13px; }
.route-stop p { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.personal-stop-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.route-leg { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 0 10px 50px; color: var(--muted); font-size: 12.5px; font-weight: 700; min-height: 44px; }
.route-leg .tg-i { width: 16px; height: 16px; }
.route-leg-line { position: absolute; left: 16px; top: -6px; bottom: -6px; width: 2px; background-image: linear-gradient(var(--line-strong) 50%, transparent 0); background-size: 2px 8px; }
.route-leg.is-real { color: var(--sea); }
.route-leg.is-real .route-leg-line { background: var(--sea); opacity: .55; }
.route-actions { margin-top: 18px; }
.personal-route-tracking { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; padding: 16px; border-radius: var(--r-lg); background: var(--sea-soft); }
.personal-route-tracking .tg-icon-bubble { background: var(--surface); color: var(--sea); }
.personal-route-tracking h3 { font-size: 16px; }
.personal-route-tracking .actions { margin-top: 8px; }

/* ---------- Map (full screen) ---------- */
body[data-page="map"] .app-header { display: none; }
body[data-page="map"] .workspace { padding-bottom: 0; }
body[data-page="map"] main { max-width: none; padding: 0; animation: none; }
.tg-map-page { position: fixed; inset: 0 0 calc(var(--nav-h) + var(--safe-bottom)) 0; z-index: 1; background: var(--surface-2); }
.tg-map-main, .tg-map-main .tg-map-frame { position: absolute; inset: 0; }
.tg-map-frame { position: relative; overflow: hidden; }
.tg-map-canvas { position: absolute; inset: 0; background: #e8e4dc; }
.tg-map-loading, .tg-map-unavailable { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; padding: 20px; text-align: center; }
.tg-map-warning { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500; }
.tg-map-warning:not([hidden]) { display: block; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 650; box-shadow: var(--shadow-2); }
.tg-map-attribution { position: absolute; right: 0; bottom: 0; z-index: 400; display: flex; gap: 10px; padding: 2px 8px; background: color-mix(in srgb, var(--surface) 80%, transparent); font-size: 10px; border-top-left-radius: 8px; }
.tg-map-attribution a { color: var(--ink-2); }
.tg-map-page .tg-map-attribution { bottom: 96px; }
.tg-map-overlay { position: absolute; left: 0; right: 0; top: 0; z-index: 600; padding: calc(10px + var(--safe-top)) 12px 0; pointer-events: none; }
.tg-map-overlay > * { pointer-events: auto; }
.tg-map-search > div { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-2); color: var(--muted); }
.tg-map-search input { flex: 1; min-height: 0; height: 100%; border: 0; background: transparent; padding: 0; font-weight: 650; box-shadow: none !important; }
.tg-map-search input::-webkit-search-cancel-button { display: none; }
.tg-map-clear { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 20px; line-height: 1; }
.tg-map-filters { margin-top: 10px; }
.tg-chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 12px 8px; margin: 0 -12px; scrollbar-width: none; }
.tg-chip-scroll::-webkit-scrollbar { display: none; }
.tg-map-filter { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-1); font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer; color: var(--ink-2); }
.tg-map-filter input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tg-map-filter small { color: var(--muted); font-weight: 650; font-size: 11px; }
.tg-map-filter:has(input:checked) { background: var(--ink); color: var(--bg); }
.tg-map-filter:has(input:checked) small { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.tg-map-filter:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.tg-map-filter-dot, .tg-map-result-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.tg-map-dot-curated { background: #d2603a; }
.tg-map-dot-cultura { background: #765b87; }
.tg-map-dot-ristoro { background: #b57640; }
.tg-map-dot-negozi { background: #49817b; }
.tg-map-dot-servizi { background: #718352; }
.tg-map-dot-trasporti { background: #4b7397; }
.tg-map-dot-partners { background: #ad7040; }
.tg-map-page-warning { margin-top: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 650; box-shadow: var(--shadow-1); }
.tg-map-fabs { position: absolute; right: 12px; bottom: 120px; z-index: 600; display: grid; gap: 10px; }
.tg-fab { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); }
.tg-map-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 700; height: 92px; overflow: hidden; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); box-shadow: 0 -8px 30px rgba(8,18,22,.18); transition: height .32s var(--ease); display: flex; flex-direction: column; }
.tg-map-page[data-view="list"] .tg-map-sheet { height: min(72%, 640px); }
.tg-map-page[data-view="list"] .tg-map-fabs { opacity: 0; pointer-events: none; }
.tg-map-sheet-head { flex: none; padding: 8px 16px 10px; }
.tg-map-grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 10px; }
.tg-map-view-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.tg-map-view-switch button { height: 36px; border-radius: var(--r-pill); font-weight: 750; font-size: 13.5px; color: var(--muted); transition: .2s; }
.tg-map-view-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.tg-map-sheet > :not(.tg-map-sheet-head) { padding-left: 16px; padding-right: 16px; }
.tg-map-results { flex: none; }
.tg-map-page[data-view="list"] .tg-map-sheet { overflow-y: auto; overscroll-behavior: contain; }
.tg-map-page[data-view="list"] .tg-map-sheet-head { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.leaflet-control-attribution { display: none; }
.tg-map-results-heading h2 { font-size: 17px; }
.tg-map-results-heading p { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.tg-map-result-list { display: grid; }
.tg-map-result-item { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.tg-map-result { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0; text-align: left; }
.tg-map-result > span:nth-child(2) { flex: 1; min-width: 0; }
.tg-map-result strong { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-map-result small { color: var(--muted); font-size: 12.5px; }
.tg-map-result > span:last-child { color: var(--muted); }
.tg-map-read { flex: none; height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 12px; font-weight: 750; }
.tg-map-map-actions, .tg-map-note, .tg-map-list-credit { color: var(--muted); font-size: 12px; margin: 10px 0; }
.tg-map-sheet .app-info-disclosure { margin: 8px 16px; }
.tg-map-provenance { display: grid; gap: 6px; font-size: 13px; }
.tg-map-provenance strong { color: var(--ink); }
.tg-map-marker-count { display: none; }
.tg-map-route-wrap .tg-map-frame { position: relative; height: 260px; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.tg-map-route-wrap .tg-map-note { margin-top: 8px; }
.tg-map-stop-icon span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 800 13px/1 var(--font); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.leaflet-container { font: inherit; background: #e8e4dc; }
.leaflet-popup-content-wrapper { border-radius: var(--r-md); box-shadow: var(--shadow-3); background: var(--surface); color: var(--ink); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 14px 16px; font-size: 13.5px; line-height: 1.45; }
.tg-map-popup h3 { font-size: 16px; margin: 4px 0 6px; }
.tg-map-popup p { margin: 0 0 6px; color: var(--muted); }
.tg-map-popup-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.tg-map-popup .button { margin: 6px 0 4px; min-height: 36px; color: #fff; }
.tg-map-popup a { font-size: 12px; color: var(--sea); font-weight: 700; display: block; }
.tg-map-popup-demo { color: var(--warn) !important; font-weight: 750; }
.leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }
.leaflet-tooltip { border-radius: 8px; font-weight: 700; font-size: 12px; }
@media (prefers-color-scheme: dark) { .tg-map-canvas .leaflet-tile-pane { filter: brightness(.78) contrast(1.08) saturate(.8); } }
.tg-place-detail { display: grid; gap: 14px; }
.tg-place-story h3, .tg-place-practical h3, .tg-place-missing h3 { font-size: 15px; margin-bottom: 6px; }
.tg-place-practical dl { display: grid; gap: 8px; }
.tg-place-practical dl div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.tg-place-practical dt { font-size: 11.5px; font-weight: 750; color: var(--muted); }
.tg-place-practical dd { margin: 2px 0 0; font-weight: 650; }
.tg-place-missing { padding: 14px; border-radius: var(--r-md); background: var(--surface-2); color: var(--muted); }
.tg-place-provenance { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.tg-place-provenance div { display: flex; flex-wrap: wrap; gap: 12px; }
.tg-place-provenance a { color: var(--sea); font-weight: 700; }
.tg-place-loading { color: var(--muted); }

/* ---------- Iris chat ---------- */
body[data-page="iris"] .workspace { padding-bottom: 0; }
body[data-page="iris"] main { padding-bottom: 0; }
.app-iris-page { display: flex; flex-direction: column; min-height: calc(100dvh - var(--header-h) - var(--safe-top) - var(--nav-h) - var(--safe-bottom) - 8px); }
.iris-header { display: flex; align-items: center; gap: 12px; padding: 8px 0 12px; }
.iris-header h1 { font: 650 26px/1 var(--display); }
.iris-header .icon-button { margin-left: auto; background: var(--surface); box-shadow: var(--shadow-1); }
.iris-mode-badge { display: inline-flex; margin-top: 4px; font-size: 11.5px; font-weight: 750; color: var(--muted); }
.iris-mode-badge.is-ai { color: var(--ok); }
.iris-mode-badge.is-ai::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin: 4px 6px 0 0; }
.iris-card { flex: 1; display: flex; flex-direction: column; padding: 0; background: transparent; box-shadow: none; border: 0; }
.iris-welcome { padding: 30px 6px 16px; text-align: center; }
.iris-welcome h2 { font: 650 28px/1.1 var(--display); margin-bottom: 8px; }
.iris-intro { color: var(--muted); max-width: 36ch; margin: 0 auto; }
.messages { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 20px; flex: 1; }
.message { max-width: 86%; padding: 12px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid var(--line); font-size: 15px; line-height: 1.5; animation: pop .25s var(--ease); align-self: flex-start; border-bottom-left-radius: 6px; }
.message p { margin: 0; white-space: pre-wrap; }
.message.user { align-self: flex-end; background: var(--ink); color: var(--bg); border: 0; border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.message.is-ai { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.message-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.message-sources a { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 10px 0 4px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 700; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.message-sources b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--sea); color: #fff; font-size: 11px; flex: none; }
.message .chip-button { margin-top: 8px; margin-right: 6px; }
.iris-status { color: var(--muted); font-size: 13px; font-weight: 650; min-height: 0; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
.iris-dock { position: sticky; bottom: calc(var(--nav-h) + var(--safe-bottom)); z-index: 20; padding: 8px 0 12px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); background: var(--bg); box-shadow: 0 -12px 16px -8px var(--bg); }
.iris-suggestions { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.iris-suggestions::-webkit-scrollbar { display: none; }
.iris-suggestions button { flex: none; height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.iris-form { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.iris-form input { flex: 1; border: 0; background: transparent; min-height: 42px; padding: 0; box-shadow: none !important; }
.iris-form button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.iris-mode { margin: 4px 0 18px; font-size: 13px; color: var(--muted); }
.iris-mode summary { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; padding: 6px 0; }
.iris-mode summary .tg-i { width: 16px; height: 16px; }
.iris-mode p { margin: 6px 0; }

/* ---------- Trips, favourites, more, experiences ---------- */
.trip-grid, .experience-grid, .fav-list { display: grid; gap: 14px; margin: 12px 0; }
.trip-card { padding: 0; overflow: hidden; display: grid; grid-template-columns: 110px 1fr; }
.trip-cover { aspect-ratio: auto; height: 100%; min-height: 140px; }
.trip-cover .app-place-visual { inset: 18% 10% 22%; width: 80%; height: 60%; }
.trip-body { padding: 14px 14px 12px; min-width: 0; }
.topline { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.trip-card h2 { font-size: 17px; margin: 6px 0 4px; }
.trip-stats { display: flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 13px; font-weight: 700; margin: 0; }
.trip-stats .tg-i { width: 14px; height: 14px; }
.trip-stops { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trip-card .actions { margin-top: 10px; gap: 6px; }
.app-menu-group { margin: 6px 0 18px; }
.app-menu-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 4px 8px; }
.app-more-grid { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-1); overflow: hidden; }
.app-more-grid a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-decoration: none; }
.app-more-grid a + a { border-top: 1px solid var(--line); }
.app-more-grid a:active { background: var(--surface-2); }
.app-menu-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.app-menu-copy { flex: 1; min-width: 0; }
.app-menu-copy strong { display: block; font-size: 15px; }
.app-menu-copy small { color: var(--muted); font-size: 12.5px; }
.app-menu-arrow { color: var(--muted); }
.app-about-card { margin-top: 10px; }
.app-about-card h2 { font: 650 22px/1.2 var(--display); margin: 6px 0 8px; }
.app-about-card p { color: var(--muted); font-size: 14px; }
.fav-item { display: flex; gap: 14px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.fav-thumb { width: 84px; height: 84px; aspect-ratio: auto; border-radius: var(--r-md); flex: none; display: grid; place-items: center; }
.fav-thumb .app-place-visual { inset: 14%; width: 72%; height: 72%; }
.fav-item h2 { font-size: 16px; }
.fav-item p { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.fav-item .actions { margin-top: 8px; gap: 6px; }
.fav-item .button { min-height: 36px; padding: 0 12px; font-size: 13px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 12px; }
.price-row strong { font-size: 20px; }
.price-row span { color: var(--muted); font-size: 12px; }

/* ---------- Personal (journey, profile, history) ---------- */
.personal-page { display: block; }
.personal-local-note, .setup-local-note { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--r-md); background: var(--sea-soft); color: var(--sea); font-size: 13px; font-weight: 700; margin: 0 0 14px; }
.personal-local-note svg { width: 18px; height: 18px; flex: none; }
.personal-profile-summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.personal-profile-summary > div { flex: 1; min-width: 0; }
.personal-profile-summary strong { display: block; font-size: 14.5px; }
.personal-profile-summary small { color: var(--muted); font-size: 12.5px; }
.personal-summary-icon, .personal-step, .personal-empty-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); flex: none; }
.personal-summary-icon svg, .personal-step svg, .personal-empty-icon svg { width: 20px; height: 20px; }
.personal-journey-card, .personal-section { margin-bottom: 14px; }
.personal-section-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.personal-section-heading h2 { font-size: 18px; }
.personal-section-heading p { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; }
.personal-section > .personal-section-heading { display: block; }
.personal-section > .personal-section-heading h2 { margin-top: 4px; }
.personal-origin-heading { margin-top: 20px; }
.personal-duration, .personal-interest-options, .setup-interest-options { display: flex; flex-wrap: wrap; gap: 8px; }
.personal-duration label, .personal-interest-options label, .setup-interest-options label { position: relative; }
.personal-duration input, .personal-interest-options input, .setup-interest-options input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.personal-duration span, .personal-interest-options span, .setup-interest-options span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface-2); font-weight: 750; font-size: 14px; color: var(--ink-2); transition: .15s; }
.personal-duration input:checked + span, .personal-interest-options input:checked + span, .setup-interest-options input:checked + span { background: var(--ink); color: var(--bg); }
.personal-duration input:focus-visible + span, .personal-interest-options input:focus-visible + span, .setup-interest-options input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.personal-origin-status { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); margin: 0 0 10px; }
.personal-origin-status strong { display: block; font-size: 14.5px; }
.personal-origin-status small { color: var(--muted); font-size: 12.5px; }
.personal-origin-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); flex: none; }
.personal-origin-status.is-live .personal-origin-dot { background: var(--ok); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 22%, transparent); animation: pulse 2s infinite; }
.personal-origin-status.is-demo .personal-origin-dot { background: var(--warn); }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ok) 5%, transparent); } }
.personal-journey-card .button svg, .personal-propose svg { width: 18px; height: 18px; }
.personal-demo, .personal-details, .personal-data-controls, .personal-manual { margin: 12px 0; border-radius: var(--r-md); }
.personal-demo > summary, .personal-data-controls > summary { font-size: 13.5px; font-weight: 750; color: var(--accent-deep); padding: 8px 0; }
.personal-demo-options { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.personal-details > summary { display: flex; justify-content: space-between; align-items: center; font-weight: 750; padding: 6px 0; }
.personal-details > summary small { display: block; color: var(--muted); font-weight: 650; font-size: 12.5px; }
.personal-details-body { padding-top: 8px; }
.personal-manual { padding: 12px 14px; background: var(--surface); border: 1px dashed var(--line-strong); }
.personal-propose { margin-top: 14px; }
.personal-recommendation { margin-top: 18px; outline: none; }
.personal-why { display: flex; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); margin-bottom: 16px; }
.personal-why h2 { font: 650 22px/1.15 var(--display); margin: 4px 0 6px; }
.personal-why p, .personal-why li { color: var(--ink-2); font-size: 13.5px; }
.personal-why ul { margin: 6px 0 0; }
.personal-proposal-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 8px; }
.personal-proposal-actions svg { width: 18px; height: 18px; }
.personal-check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; font-size: 14px; }
.personal-check span { flex: 1; }
.personal-check strong { display: block; font-size: 14px; line-height: 1.35; }
.personal-check small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.personal-consent { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.personal-shopping { margin-top: 10px; }
.personal-save-profile { margin-top: 6px; }
.personal-tracker-status { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); margin-bottom: 12px; }
.personal-tracker-status p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.personal-tracker-status small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.personal-tracker-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); margin-top: 4px; flex: none; }
.personal-tracker-dot.is-active { background: var(--ok); animation: pulse 2s infinite; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 22%, transparent); }
.personal-tracker-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.personal-history-title { margin-top: 22px; }
.personal-visit-list { display: grid; gap: 10px; }
.personal-visit-card { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.personal-visit-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); flex: none; }
.personal-visit-icon.is-confirmed { background: var(--ok-soft); color: var(--ok); }
.personal-visit-icon svg { width: 18px; height: 18px; }
.personal-visit-copy { flex: 1; min-width: 0; }
.personal-visit-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.personal-visit-badge { font-weight: 800; color: var(--warn); }
.personal-visit-badge.is-confirmed { color: var(--ok); }
.personal-visit-card h3 { font-size: 15.5px; margin: 4px 0; }
.personal-visit-card p { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.personal-visit-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.personal-learning { margin: 18px 0; padding: 16px; border-radius: var(--r-lg); background: var(--sea-soft); }
.personal-learning strong { display: block; margin-bottom: 4px; }
.personal-learning p { color: var(--ink-2); font-size: 13.5px; }
.personal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.personal-footnote, .personal-form-footnote { margin-top: 12px; }

/* ---------- Onboarding ---------- */
body[data-page="welcome"] .app-bottom-nav { display: none; }
body[data-page="welcome"] .workspace { padding-bottom: 32px; }
.setup-page { max-width: 560px; margin: 0 auto; }
.setup-heading { position: relative; overflow: hidden; margin: 6px 0 16px; padding: 26px 20px 22px; border-radius: var(--r-xl); color: #f3efe8; background: radial-gradient(120% 90% at 100% 0%, #2a6f78 0%, transparent 60%), linear-gradient(160deg, #173a45 0%, #0f2831 100%); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 14px; }
.setup-heading .app-kicker { color: var(--gold); }
.setup-heading h1 { font: 650 clamp(30px, 8vw, 40px)/1.05 var(--display); margin: 6px 0 8px; letter-spacing: -0.02em; }
.setup-heading p { color: rgba(243,239,232,.82); margin: 0; }
.setup-welcome-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: conic-gradient(from 210deg, #d2603a, #f0c27d, #1f6f78, #d2603a); color: #fff; }
.setup-welcome-mark svg { width: 26px; height: 26px; }
.setup-form { background: var(--surface); border-radius: var(--r-xl); padding: 20px 18px; border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.setup-section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.setup-section-heading h2 { font: 650 22px/1.2 var(--display); }
.setup-section-heading span { font-size: 11.5px; font-weight: 750; color: var(--muted); background: var(--surface-2); padding: 4px 10px; border-radius: var(--r-pill); }
.setup-helper { margin: 8px 0 0; }
.setup-choice-list { display: grid; gap: 10px; margin: 18px 0; }
.setup-choice, .setup-history-choice { padding: 14px; border-radius: var(--r-md); background: var(--surface-2); }
.setup-history-choice { margin-top: 12px; background: var(--surface); }
.setup-check { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.setup-check input { margin-top: 1px; }
.setup-check + .setup-helper { padding-left: 32px; }
.setup-legal { padding: 14px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); }
.setup-legal-links { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 0 32px; }
.setup-link { color: var(--accent-deep); font-weight: 750; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.setup-status { background: var(--sea-soft); color: var(--sea); border-radius: var(--r-md); padding: 10px 12px; font-size: 13px; }
.setup-submit { margin-top: 18px; }
.setup-submit svg { width: 18px; height: 18px; }
.setup-local-note { margin: 14px 0 0; }

/* ---------- Nearby (geo) ---------- */
.geo-workspace { display: block; }
.geo-choice-panel, .geo-position-panel { background: var(--surface); border-radius: var(--r-lg); padding: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-1); margin: 12px 0; }
.geo-section-heading { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 12px; }
.geo-section-heading h2 { font: 650 20px/1.2 var(--display); }
.geo-section-heading p { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; }
.geo-step { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); font-weight: 800; font-size: 13px; flex: none; }
.geo-controls, .geo-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.geo-control-label { font-weight: 750; font-size: 13px; color: var(--ink-2); }
.geo-status { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); margin: 10px 0; }
.geo-status p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.geo-status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); margin-top: 4px; flex: none; }
.geo-status-dot.active { background: var(--ok); animation: pulse 2s infinite; }
.geo-status-dot.simulated { background: var(--warn); }
.geo-results { display: grid; gap: 10px; }
.geo-card { padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.geo-card h3 { font-size: 15.5px; margin: 4px 0; }
.geo-card p { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.geo-card-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 750; color: var(--muted); }
.geo-distance { color: var(--sea); }
.geo-sponsored { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.geo-ad-label { color: var(--warn); }
.geo-why, .geo-purpose, .geo-choice-note, .geo-consent { font-size: 12.5px; color: var(--muted); }
.geo-manual, .geo-radius-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.geo-revoke { margin-top: 6px; }
.geo-choice-state { font-weight: 750; color: var(--ink-2); font-size: 13px; }

/* ---------- Commercial ---------- */
.commercial-preferences, .commercial-route-summary, .commercial-stop { border-radius: var(--r-md); }
.commercial-preferences { padding: 12px; background: var(--surface); margin-top: 12px; }
.commercial-heading { font-weight: 750; margin: 4px 0; }
.commercial-intro, .commercial-note, .commercial-demo-note, .commercial-optional, .commercial-location-note, .commercial-operator { color: var(--muted); font-size: 12.5px; }
.commercial-opt-in, .commercial-interests label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 650; margin: 8px 0; }
.commercial-route-summary { padding: 10px 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; margin: 10px 0; }
.commercial-summary-meta { display: block; font-size: 12px; margin-top: 2px; }
.commercial-stop { margin: 8px 0; padding: 10px 12px; background: var(--warn-soft); font-size: 13px; }
.commercial-sponsored { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); }
.commercial-why { font-size: 12.5px; color: var(--ink-2); }

/* ---------- Workspaces (operators, PA) ---------- */
.ws-workspace { display: block; }
.ws-page-header p { color: var(--muted); }
.ws-context-note, .ws-closed { padding: 12px 14px; border-radius: var(--r-md); background: var(--sea-soft); color: var(--ink-2); font-size: 13.5px; margin: 10px 0; }
.ws-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
.ws-metric { padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.ws-metric strong { display: block; font: 650 28px/1 var(--display); }
.ws-metric span, .ws-metric small { color: var(--muted); font-size: 12.5px; }
.ws-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 22px 0 10px; }
.ws-section-heading h2 { font: 650 20px/1.2 var(--display); }
.ws-request-list, .ws-content-list, .ws-catalog-grid, .ws-territory-grid { display: grid; gap: 10px; }
.ws-request-card, .ws-content-card, .ws-catalog-card, .ws-editor-section, .ws-editorial-aside, .ws-archive, .ws-distribution { padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.ws-card-top, .ws-card-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.ws-card-bottom { margin-top: 10px; }
.ws-request-info { font-size: 13.5px; color: var(--ink-2); }
.ws-status { display: inline-flex; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 800; align-items: center; background: var(--surface-2); color: var(--ink-2); }
.ws-status-pending, .ws-status-draft { background: var(--warn-soft); color: var(--warn); }
.ws-status-confirmed, .ws-status-published { background: var(--ok-soft); color: var(--ok); }
.ws-status-cancelled, .ws-status-archived { background: var(--danger-soft); color: var(--danger); }
.ws-actions, .ws-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ws-form { display: grid; gap: 4px; }
.ws-form-intro, .ws-body-copy { color: var(--muted); font-size: 13.5px; }
.ws-bars { display: grid; gap: 8px; }
.ws-bar-item { display: grid; gap: 4px; font-size: 13px; }
.ws-bar-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ws-bar-track > * { display: block; height: 100%; background: var(--sea); border-radius: 4px; }
.ws-flow { color: var(--muted); font-size: 13px; }
.ws-empty-compact { padding: 14px; }

/* ---------- Roadmap ---------- */
.phase-list { display: grid; gap: 12px; margin: 12px 0; }
.phase-card { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.phase-number { font: italic 600 30px/1 var(--display); color: var(--accent); }
.phase-card h2, .phase-card h3 { font-size: 17px; margin: 6px 0; }
.phase-card p, .phase-card li { color: var(--ink-2); font-size: 13.5px; }
.phase-proof { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; }
.phase-expand { margin-top: 8px; }

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .app-quick-actions small { display: block; color: var(--muted); font-size: 11.5px; }
  .app-hero { padding: 28px 28px 26px; }
  .app-hero-art { width: 300px; right: -30px; }
  .experience-grid { grid-template-columns: repeat(2, 1fr); }
  .ws-metrics { grid-template-columns: repeat(4, 1fr); }
  #detail-dialog { margin: auto; border-radius: var(--r-xl); max-height: 88dvh; }
  .sheet-grabber { display: none; }
  .has-hero .sheet-hero { border-radius: 0; }
}
@media (min-width: 960px) {
  :root { --gutter: 28px; }
  .app-header { padding-left: calc(104px + var(--gutter)); }
  .app-city { display: inline-flex; }
  .app-bottom-nav { top: 0; bottom: 0; right: auto; width: 96px; height: auto; grid-template-columns: 1fr; grid-auto-rows: 76px; align-content: start; padding: calc(80px + var(--safe-top)) 10px 20px; border-top: 0; border-right: 1px solid var(--line); }
  .app-bottom-nav a::before { top: 8px; width: 56px; height: 34px; }
  .workspace { padding-left: 96px; padding-bottom: 40px; }
  .app-footer { display: flex; justify-content: space-between; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); color: var(--muted); font-size: 12px; }
  #toast { bottom: 24px; }
  .app-carousel { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 8px 0 14px; }
  .trip-grid { grid-template-columns: repeat(2, 1fr); }
  .tg-map-page { inset: 0 0 0 96px; }
  .tg-map-overlay { right: auto; width: 420px; }
  .tg-map-sheet { left: 12px; right: auto; bottom: 12px; top: 136px; width: 400px; height: auto !important; border-radius: var(--r-xl); overflow-y: auto; }
  .tg-map-sheet-head { position: sticky; top: 0; z-index: 2; background: var(--surface); }
  .tg-map-page .tg-map-attribution { bottom: 0; }
  .tg-map-fabs { bottom: 24px; }
  .tg-map-page[data-view="list"] .tg-map-fabs { opacity: 1; pointer-events: auto; }
  .iris-dock { bottom: 0; }
  .app-iris-page { min-height: calc(100dvh - var(--header-h) - 40px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Accesso e account ---------- */
body[data-page="auth"] .app-bottom-nav, body[data-page="auth"] .app-header { display: none; }
body[data-page="auth"] .workspace { padding-bottom: 24px; padding-left: 0; }
body[data-page="auth"] main { max-width: 520px; padding-top: calc(12px + var(--safe-top)); }
.auth-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 26px 22px 150px; color: #f3efe8; background: radial-gradient(120% 90% at 100% 0%, #2a6f78 0%, transparent 60%), linear-gradient(160deg, #173a45 0%, #0f2831 100%); box-shadow: var(--shadow-2); isolation: isolate; }
.auth-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -0.03em; margin-bottom: 26px; }
.auth-brand .brand-symbol { background: #f3efe8; color: var(--navy); }
.auth-hero h1 { font: 650 clamp(30px, 8.4vw, 40px)/1.05 var(--display); letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-hero p { color: rgba(243,239,232,.82); max-width: 32ch; margin: 0; }
.auth-hero-art { position: absolute; right: -30px; bottom: -40px; width: 300px; z-index: -1; opacity: .95; }
.auth-hero-art svg { width: 100%; height: auto; }
.auth-card { position: relative; margin: -60px 10px 0; padding: 18px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); margin-bottom: 8px; }
.auth-tabs button { height: 40px; border-radius: var(--r-pill); font-weight: 750; font-size: 14px; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.auth-form .field small { font-weight: 600; font-size: 12px; }
.auth-form .button { margin-top: 10px; }
.auth-terms { align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.auth-terms .setup-link { font-size: 13.5px; }
.auth-note, .auth-footnote { text-align: center; margin: 12px 0 0; }
.app-account-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; margin: 0 0 8px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.app-android-card .account-copy { flex: 1 1 180px; min-width: 0; }
#android-update-note.is-update { color: var(--accent-deep); font-weight: 700; overflow-wrap: anywhere; }
.account-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; background: conic-gradient(from 210deg, #d2603a, #f0c27d, #1f6f78, #d2603a); flex: none; }
.account-copy { flex: 1; min-width: 0; }
.account-copy strong { display: block; font-size: 15.5px; }
.account-copy small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.account-actions { display: flex; gap: 12px; align-items: center; width: 100%; justify-content: flex-end; }
@media (min-width: 560px) { .account-actions { width: auto; } }
.account-avatar.is-android { background: var(--sea); }
.account-avatar.is-android .tg-i { width: 22px; height: 22px; }
.app-android-download { margin: 0 0 8px; }

/* Management portals (PA, attività) use the width of a computer screen. */
@media (min-width: 1200px) {
  body:is([data-page="pa"], [data-page="business"], [data-page="orders"]) main { max-width: 1180px; }
}
