/* 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; }

@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-ext.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* «Creuza a colori» (2026-09-29): warm white, ink, the balloons' red, yellow and blue. Cards have an ink outline and
   a solid offset shadow; titles are Archivo condensed. Every module reads these tokens. */
:root {
  --bg: #fffdf7;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f1e6;
  --surface-3: #ebe5d6;
  --ink: #1d1f24;
  --ink-2: #3a3d45;
  --muted: #5f636b;
  --line: rgba(29, 31, 36, 0.10);
  --line-strong: rgba(29, 31, 36, 0.78);
  --accent: #c8371f;
  --accent-ink: #ffffff;
  --accent-soft: #fde3dc;
  --accent-deep: #9c2a16;
  --sea: #2458a6;
  --sea-soft: #dde8f7;
  --navy: #2458a6;
  --gold: #f7c23b;
  --gold-soft: #fdf0c8;
  --ok: #1f7a4d;
  --ok-soft: #dcf1e4;
  --warn: #7a5200;
  --warn-soft: #fdf0c8;
  --danger: #b3261e;
  --danger-soft: #fbe0dc;
  --outline: #1d1f24;
  --card-border: 2px solid var(--outline);
  --card-shadow: 4px 4px 0 var(--outline);
  --press-shadow: 1px 1px 0 var(--outline);
  --shadow-1: 3px 3px 0 var(--outline);
  --shadow-2: 4px 4px 0 var(--outline);
  --shadow-3: 6px 6px 0 var(--outline);
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Archivo", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --display-stretch: 70%;
  --header-h: 56px;
  --nav-h: 68px;
  --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: #121418; --bg-elev: #17191e; --surface: #1c1f24; --surface-2: #262a31; --surface-3: #30353d;
    --ink: #f5f1e6; --ink-2: #d6d2c7; --muted: #a3a097; --line: rgba(245, 241, 230, 0.10); --line-strong: rgba(245, 241, 230, 0.6);
    --accent: #ff7a5c; --accent-ink: #121418; --accent-soft: #3b211b; --accent-deep: #ff9a82; --sea: #7fa8f0; --sea-soft: #1d2a40; --navy: #2458a6;
    --gold: #f7c23b; --gold-soft: #3a3016;
    --ok: #62c496; --ok-soft: #173427; --warn: #f0c35c; --warn-soft: #3a3016; --danger: #ff8a78; --danger-soft: #3d201c;
    --outline: #000000; --card-border: 2px solid rgba(245, 241, 230, 0.22);
    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); font-stretch: var(--display-stretch);}
.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(5, 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; font-stretch: var(--display-stretch);}
.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(--card-shadow); border: var(--card-border); }
.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; font-stretch: var(--display-stretch);}
.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; font-stretch: var(--display-stretch);}
.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 (#explore): one story from top to bottom (docs/ECOSISTEMA_V2.md §4) ----------
   Slots in order: alert, hero, quick, groups, foryou, events, museums, business, community, plan.
   Every section uses the same header (.home-head) and the same carousel (.home-rail); empty slots take no space. */
.home { display: flex; flex-direction: column; gap: 28px; padding-top: 6px; }
.home > *, .home-slot > * { min-width: 0; }
.home-slot { display: flex; flex-direction: column; gap: 28px; }
.home-slot:empty, .home-weather:empty { display: none; }
.home-section { display: block; min-width: 0; }
.home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.home-head h2 { font: 650 21px/1.2 var(--display); letter-spacing: -0.01em; margin: 0; min-width: 0; font-stretch: var(--display-stretch);}
.home-more { flex: none; display: inline-flex; align-items: center; gap: 2px; font-weight: 750; font-size: 13.5px; color: var(--accent-deep); text-decoration: none; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .home-more { color: var(--accent); } }
.home-more .tg-i { width: 15px; height: 15px; }
/* Sections that still bring their own header (.app-section-title) look like the shared one. */
.home .app-section-title { margin: 0 0 12px; align-items: baseline; }
.home .app-section-title .app-kicker { display: none; }
.home .app-section-title h2 { font: 650 21px/1.2 var(--display); letter-spacing: -0.01em; margin: 0; font-stretch: var(--display-stretch);}
.home .app-section-title .text-button { flex: none; padding: 0; font-size: 13.5px; white-space: nowrap; }
.home-rail { --rail-w: min(76%, 272px); display: grid; grid-auto-flow: column; grid-auto-columns: var(--rail-w); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px var(--gutter) 10px; margin: 0 calc(-1 * var(--gutter)) -10px; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.home-rail::-webkit-scrollbar { display: none; }
.home-rail > * { scroll-snap-align: start; min-width: 0; }
.home-rail > .tg-card { height: 100%; }
/* Hero: greeting and context, the proposal of the moment, search. */
.home-hero { display: grid; gap: 12px; }
.home-hello { margin: 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.home-title { font: 650 clamp(28px, 8.2vw, 40px)/1.06 var(--display); letter-spacing: -0.02em; margin: -8px 0 0; font-variation-settings: "opsz" 96; overflow-wrap: anywhere; font-stretch: var(--display-stretch);}
.home-weather { margin: -2px 0 0; display: flex; }
.home-pick { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 8px; border-radius: var(--r-xl); padding: 18px 18px 16px; color: #f3efe8; background: radial-gradient(120% 90% at 100% 0%, #3a6fc0 0%, transparent 60%), linear-gradient(160deg, #2458a6 0%, #1d4a8f 100%); box-shadow: var(--shadow-2); }
@media (prefers-color-scheme: dark) { .home-pick { border: 1px solid var(--line); } }
.home-pick-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.home-pick-title { font: 650 25px/1.1 var(--display); letter-spacing: -0.015em; margin: 0; overflow-wrap: anywhere; font-stretch: var(--display-stretch);}
.home-pick-sub { margin: 0; color: rgba(243,239,232,.82); font-size: 14px; }
.home-pick-steps { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 4px; }
.home-pick-steps li { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 14px; color: rgba(243,239,232,.9); }
.home-pick-time { flex: none; min-width: 42px; font-weight: 800; font-size: 12.5px; color: var(--gold); font-variant-numeric: tabular-nums; }
.home-pick-step { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-pick-steps .is-more { color: rgba(243,239,232,.65); font-size: 13px; padding-left: 52px; }
.home-pick-why { display: flex; gap: 6px; align-items: flex-start; margin: 2px 0 0; color: rgba(243,239,232,.78); font-size: 13px; }
.home-pick-why .tg-i { width: 15px; height: 15px; margin-top: 2px; color: var(--gold); }
.home-pick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.home-pick-actions .button { min-height: 44px; padding: 0 14px; font-size: 14px; gap: 6px; }
.home-pick-actions .button .tg-i { width: 17px; height: 17px; }
.home-pick .home-pick-go { background: #fff; color: var(--navy); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.home-pick .home-pick-go:hover { background: var(--gold); }
.home-pick .home-pick-propose { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.home-pick .home-pick-propose:hover { background: rgba(255,255,255,.2); }
.home-pick.is-route .tg-time-chips { margin: 6px 0 0; }
.home-pick.is-skeleton { min-height: 184px; align-content: start; }
.home-pick.is-skeleton .home-skel-line { background: rgba(255,255,255,.14); }
.tg-time-chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 320px; }
.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); transition: .15s; }
.tg-time-chip:hover, .tg-time-chip:focus-visible { background: #fff; color: var(--navy); }
.home-search { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 8px 0 16px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--card-shadow); border: var(--card-border); text-decoration: none; color: var(--muted); font-weight: 650; font-size: 14.5px; min-width: 0; }
.home-search-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-search-count { flex: none; font-size: 11px; font-weight: 800; color: var(--sea); background: var(--sea-soft); border-radius: var(--r-pill); padding: 6px 10px; }
/* Quick actions: six round shortcuts in one row. */
.home-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: -8px -4px 0; }
.home-quick-item { --q: var(--sea); display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 4px 0; text-decoration: none; color: var(--ink-2); border-radius: var(--r-md); }
.home-quick-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--q) 13%, var(--surface)); color: color-mix(in srgb, var(--q) 78%, var(--ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--q) 16%, transparent); transition: transform .12s var(--ease); }
.home-quick-icon .tg-i { width: 23px; height: 23px; }
.home-quick-item:active .home-quick-icon { transform: scale(.92); }
.home-quick-label { max-width: 100%; font-size: 11.5px; font-weight: 750; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-quick-item.is-food { --q: #c4502c; }
.home-quick-item.is-drink { --q: #a0457a; }
.home-quick-item.is-night { --q: #4b58a0; }
.home-quick-item.is-culture { --q: #7a5a92; }
.home-quick-item.is-nature { --q: #3d8a4f; }
.home-quick-item.is-trips { --q: #2458a6; }
@media (max-width: 380px) {
  .home-pick { padding: 18px 16px 16px; }
  .home-pick-propose-more { display: none; }
  .home-quick { gap: 0; margin: -8px calc(-0.5 * var(--gutter)) 0; }
  .home-quick-icon { width: 46px; height: 46px; }
  .home-quick-label { font-size: 11px; }
}
/* «Per te» asks for the quiz with a quiet line: the proposal of the moment stays the loudest thing on the page. */
#home-slot-foryou .tg-invite { margin: 0 0 12px; background: var(--accent-soft); color: var(--ink); box-shadow: none; border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent); }
#home-slot-foryou .tg-invite-link { padding: 10px 12px; gap: 10px; }
#home-slot-foryou .tg-invite:has(.tg-invite-close) .tg-invite-link { padding-right: 48px; }
#home-slot-foryou .tg-invite-art { width: 38px; height: 38px; border-radius: 12px; background: var(--surface); color: var(--accent-deep); }
#home-slot-foryou .tg-invite-copy strong { font-size: 14px; }
#home-slot-foryou .tg-invite-copy small { color: var(--ink-2); }
#home-slot-foryou .tg-invite-close { background: transparent; color: var(--muted); }
/* Alert (urgent notices of the Comune), notes and compact cards of the modules. */
.home-alert { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 12px 8px 12px 14px; border-radius: var(--r-lg); background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 22%, transparent); }
.home-alert-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--danger) 14%, var(--surface)); }
.home-alert-icon svg { width: 20px; height: 20px; }
.home-alert-copy { min-width: 0; display: grid; gap: 1px; }
.home-alert-copy strong { font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.home-alert-copy span { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-alert-open { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--danger); }
.home-alert-open svg { width: 18px; height: 18px; }
.home-alert-open::after { content: ""; position: absolute; inset: 0; }
.home-alert-more { position: relative; z-index: 1; grid-column: 2 / 4; justify-self: start; font-size: 12.5px; font-weight: 750; color: var(--danger); text-decoration: underline; text-underline-offset: 3px; }
.home-note { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 700; text-align: left; }
.home-note > span { flex: 1; }
.home-note svg { width: 16px; height: 16px; flex: none; }
.home-feature { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 10px 12px 12px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); text-decoration: none; color: var(--ink); }
.home-feature-art { width: 76px; height: 76px; border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; background: linear-gradient(160deg, #2458a6 0%, #1d4a8f 100%); }
.home-feature-art svg { width: 100%; height: 100%; }
.home-feature-copy { display: grid; gap: 3px; min-width: 0; }
.home-feature-kicker { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { .home-feature-kicker { color: var(--accent); } }
.home-feature-kicker svg { width: 14px; height: 14px; }
.home-feature-copy strong { font-size: 15.5px; line-height: 1.25; }
.home-feature-copy small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.home-feature-chev { color: var(--muted); }
.home-feature-chev svg { width: 18px; height: 18px; }
.home-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-grid3 > * { min-width: 0; }
.home-grid3 .social-home-card { flex: none; width: auto; height: auto; aspect-ratio: 3 / 4; }
.home-plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); color: var(--ink-2); text-decoration: none; }
.home-plan-copy { flex: 1; min-width: 0; display: grid; gap: 1px; }
.home-plan-copy strong { font-size: 14px; color: var(--ink); }
.home-plan-copy small { font-size: 12.5px; color: var(--muted); }
.home-plan-cta { flex: none; font-size: 13px; font-weight: 750; color: var(--sea); }
/* Home by audience (web/audience.js): the «Home: …» chip, the card that asks or proposes, the link lists, the places. */
.home-audience-chip { justify-self: start; margin: -4px 0 0; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--sea-soft); color: var(--sea); font-weight: 800; font-size: 13px; }
.home-audience-card { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); }
.home-audience-card.is-suggestion { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); }
.home-audience-text { margin: 0; font-weight: 800; font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.home-audience-note { margin: 0; font-size: 13px; color: var(--ink-2); }
.home-audience-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.home-audience-auto { margin-top: 10px; width: 100%; }
.home-links { list-style: none; margin: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); overflow: hidden; }
.home-links li + li { border-top: 1px solid var(--line); }
.home-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px 10px 14px; color: var(--ink); text-decoration: none; }
.home-link > .tg-i { flex: none; width: 18px; height: 18px; color: var(--muted); }
.home-link-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sea-soft); color: var(--sea); }
.home-link-icon .tg-i { width: 21px; height: 21px; }
.home-link.is-sos .home-link-icon { background: var(--danger-soft); color: var(--danger); }
.home-link-copy { flex: 1; min-width: 0; display: grid; gap: 1px; }
.home-link-copy strong { font-size: 15px; line-height: 1.3; }
.home-link-copy small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.home-place-card { display: grid; align-content: start; gap: 4px; min-height: 120px; padding: 14px; text-align: left; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); border-top: 6px solid var(--cover, var(--sea)); color: var(--ink); }
.home-place-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.home-place-card strong { font-size: 16px; line-height: 1.25; }
.home-place-card small { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.home-place-card small .tg-i { width: 15px; height: 15px; }
/* «Vivi qui?» on the welcome screen (first entry only, optional). */
.setup-live { margin: 0; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.setup-live legend { padding: 0 4px; font-size: 15px; }
.setup-live legend small { color: var(--muted); font-weight: 600; }
.setup-live .setup-helper { margin: 2px 0 10px; }
.setup-live-options { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-live-option { position: relative; display: inline-flex; }
.setup-live-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.setup-live-option span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 2px solid var(--line); font-weight: 750; font-size: 14px; }
.setup-live-option input:checked + span { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); border-color: var(--ink); }
.setup-live-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Skeletons: the shell is on screen at once, content arrives slot by slot. */
.home-skel-line, .home-skel-card i, .home-skel-card b { display: block; border-radius: 8px; background: var(--surface-3); animation: home-shimmer 1.4s ease-in-out infinite; }
.home-skel-line { height: 14px; width: 80%; }
.home-skel-line.is-title { height: 22px; width: 55%; }
.home-skel-line.is-kicker { height: 10px; width: 30%; }
.home-skel-line.is-short { width: 40%; }
.home-pick.is-skeleton .home-skel-line.is-title { height: 26px; width: 75%; }
.home-skel-card { display: grid; gap: 10px; padding-bottom: 12px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: var(--card-border); }
.home-skel-card i { aspect-ratio: 16 / 9; border-radius: 0; }
.home-skel-card b { height: 12px; margin: 0 14px; width: 70%; }
.home-skel-card b + b { width: 45%; }
@keyframes home-shimmer { 50% { opacity: .55; } }
.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(--card-shadow); border: var(--card-border); 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); font-stretch: var(--display-stretch);}
.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-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: var(--card-border); box-shadow: var(--card-shadow); text-decoration: none; }
.app-cta-card > span:nth-child(2) { flex: 1; }
.app-cta-card strong { display: block; font-size: 15px; }
.app-cta-card small { color: var(--muted); font-size: 13px; }
.iris-avatar { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: conic-gradient(from 210deg, #c8371f, #f7c23b, #2458a6, #c8371f); 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%, #c8371f 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; font-stretch: var(--display-stretch);}
.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; font-stretch: var(--display-stretch);}
.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: var(--card-border); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--card-shadow); }
.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: #c8371f; }
.tg-map-dot-cultura { background: #765b87; }
.tg-map-dot-ristoro { background: #b57640; }
.tg-map-dot-serate { background: #a4466f; }
.tg-map-dot-natura { background: #3d8a4f; }
.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); font-stretch: var(--display-stretch);}
.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; font-stretch: var(--display-stretch);}
.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(--card-shadow); border: var(--card-border); 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 answers (services/iris_brain.py): cards from The Guide's data, actions and follow-up chips under the bubble. */
.iris-extra { display: grid; gap: 10px; min-width: 0; margin: -2px 0 4px; animation: pop .25s var(--ease); }
.iris-cards { display: grid; grid-auto-flow: column; grid-auto-columns: min(88%, 320px); gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 2px 2px 6px; scrollbar-width: none; }
.iris-cards::-webkit-scrollbar { display: none; }
.iris-cards > * { scroll-snap-align: start; min-width: 0; display: grid; }
.iris-cards .tg-card.is-compact .tg-cover { min-height: 100px; }
.iris-cards .tg-cover-badge { display: none; }
.iris-cards .tg-card-sub { -webkit-line-clamp: 1; }
.iris-extra .tg-plan { margin: 0; max-width: 560px; }
.iris-mini-card a { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); color: var(--ink); text-decoration: none; }
.iris-mini-card small { color: var(--muted); }
.iris-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.iris-action { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink-2); font-size: 13px; font-weight: 750; text-decoration: none; }
.iris-action .tg-i { width: 16px; height: 16px; }
.iris-actions .grp-propose-chip { height: 34px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: 13px; }
.iris-follow { display: flex; flex-wrap: wrap; gap: 6px; }
.iris-follow .chip-button { box-shadow: inset 0 0 0 1.5px var(--line); background: transparent; }
.iris-route-hint { margin: 8px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.iris-route-hint::before { content: "⚡ "; }
.iris-route-hint.is-ai { color: var(--ok); }
.iris-route-hint.is-ai::before { content: "✦ "; }
.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(--card-shadow); border: var(--card-border); }
.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: var(--card-border); box-shadow: var(--card-shadow); 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; font-stretch: var(--display-stretch);}
.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: var(--card-border); box-shadow: var(--card-shadow); }
.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: var(--card-border); 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; font-stretch: var(--display-stretch);}
.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: var(--card-border); }
.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%, #3a6fc0 0%, transparent 60%), linear-gradient(160deg, #2458a6 0%, #1d4a8f 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; font-stretch: var(--display-stretch);}
.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, #c8371f, #f7c23b, #2458a6, #c8371f); color: #fff; }
.setup-welcome-mark svg { width: 26px; height: 26px; }
.setup-form { background: var(--surface); border-radius: var(--r-xl); padding: 20px 18px; border: var(--card-border); box-shadow: var(--card-shadow); }
.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); font-stretch: var(--display-stretch);}
.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; }
/* Welcome screen v2 and the taste prompt (web/onboarding.js, docs/ECOSISTEMA_V2.md §1) */
.setup-v2 .setup-form { display: grid; gap: 14px; }
.setup-default-line { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px; border-radius: var(--r-md); background: var(--sea-soft); color: var(--ink); font-size: 14.5px; line-height: 1.5; font-weight: 600; }
.setup-default-line > svg { flex: none; width: 22px; height: 22px; color: var(--sea); margin-top: 1px; }
.setup-default-line .setup-link { font-size: inherit; padding: 0; }
.setup-nowrap { white-space: nowrap; }
.setup-legal-note, .legal-variant { margin: 0 0 16px; }
.setup-offers { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.setup-offers-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); }
.setup-offers-icon svg { width: 20px; height: 20px; }
.setup-offers-copy { flex: 1; min-width: 0; }
.setup-offers-copy strong { display: block; font-size: 15px; line-height: 1.3; }
.setup-offers-copy small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.setup-switch { position: relative; flex: none; width: 52px; height: 32px; }
.setup-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.setup-switch-ui { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--surface-3); transition: background .2s; }
.setup-switch-ui::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.setup-switch input:checked + .setup-switch-ui { background: var(--ok); }
.setup-switch input:checked + .setup-switch-ui::after { transform: translateX(20px); }
.setup-switch input:focus-visible + .setup-switch-ui { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.setup-terms-box { padding: 14px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); }
.setup-terms-check input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.setup-terms-check .setup-link { font-size: inherit; padding: 0; }
.setup-v2 .setup-submit, .setup-v2 .setup-local-note, .setup-v2 .setup-error, .setup-v2 .setup-status { margin: 0; }
.setup-taste { display: grid; min-height: calc(100dvh - 190px); align-content: center; }
.setup-taste-card { text-align: center; padding: 28px 20px 22px; border-radius: var(--r-xl); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); }
.setup-taste-art { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: conic-gradient(from 210deg, #c8371f, #f7c23b, #2458a6, #c8371f); box-shadow: var(--shadow-2); }
.setup-taste-art svg { width: 34px; height: 34px; }
.setup-taste-card h1 { font: 650 clamp(28px, 8vw, 36px)/1.08 var(--display); margin: 6px 0 10px; letter-spacing: -0.02em; outline: none; font-stretch: var(--display-stretch);}
.setup-taste-card > p { color: var(--muted); margin: 0 auto 18px; max-width: 34ch; line-height: 1.5; }
.setup-taste-actions { display: grid; gap: 10px; margin-bottom: 14px; }
.setup-taste-actions svg { width: 18px; height: 18px; }
.setup-taste .setup-status { margin: 0 0 14px; text-align: left; }
/* Informativa and Termini (web/app-legal.js) */
.legal-doc { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.legal-doc h3 { font: 650 19px/1.25 var(--display); color: var(--ink); margin: 24px 0 8px; font-stretch: var(--display-stretch);}
.legal-doc h4 { font-size: 14.5px; color: var(--ink); margin: 14px 0 4px; }
.legal-doc p { margin: 0 0 10px; }
.legal-doc ul, .legal-doc ol { margin: 0 0 10px; padding-left: 20px; }
.legal-doc li { margin: 0 0 6px; }
.legal-doc strong { color: var(--ink); }
.legal-meta { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.legal-summary { margin: 0 0 18px; padding: 16px; border-radius: var(--r-md); background: var(--sea-soft); color: var(--ink); }
.legal-summary h3 { margin: 0 0 8px; font-size: 18px; }
.legal-summary ul { margin: 0; padding-left: 18px; }
.legal-summary li { margin: 0 0 6px; }
.legal-cards { list-style: none; padding: 0 !important; display: grid; gap: 10px; margin: 8px 0 14px !important; }
.legal-card { margin: 0 !important; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.legal-card > strong { display: block; font-size: 14.5px; margin-bottom: 6px; }
.legal-card dl { display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 13.5px; line-height: 1.45; }
.legal-card dt { color: var(--muted); font-weight: 700; }
.legal-card dd { margin: 0; min-width: 0; }
.legal-ph { background: var(--warn-soft); color: var(--ink); border-radius: 4px; padding: 0 4px; font-weight: 700; }
.legal-doc .dialog-note { margin-top: 18px; }

/* ---------- Nearby (geo) ---------- */
.geo-workspace { display: block; }
.geo-choice-panel, .geo-position-panel { background: var(--surface); border-radius: var(--r-lg); padding: 16px; border: var(--card-border); box-shadow: var(--card-shadow); 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); font-stretch: var(--display-stretch);}
.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: var(--card-border); box-shadow: var(--card-shadow); }
.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: var(--card-border); box-shadow: var(--card-shadow); }
.ws-metric strong { display: block; font: 650 28px/1 var(--display); font-stretch: var(--display-stretch);}
.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); font-stretch: var(--display-stretch);}
.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: var(--card-border); box-shadow: var(--card-shadow); }
.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: var(--card-border); box-shadow: var(--card-shadow); }
.phase-number { font: italic 600 30px/1 var(--display); color: var(--accent); font-stretch: var(--display-stretch);}
.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) {
  .home-pick { padding: 22px 24px 20px; }
  .home-pick-title { font-size: 28px; }
  .home-quick { gap: 10px; margin: -6px 0 0; }
  .home-quick-icon { width: 54px; height: 54px; }
  .home-quick-label { font-size: 12.5px; }
  .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; }
  .home-rail { --rail-w: calc((100% - 24px) / 3); padding: 2px 0 10px; margin: 0 0 -10px; scroll-padding: 0; }
  .home-grid3 .social-home-card { aspect-ratio: 4 / 3; }
  .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%, #3a6fc0 0%, transparent 60%), linear-gradient(160deg, #2458a6 0%, #1d4a8f 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; font-stretch: var(--display-stretch);}
.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: var(--card-border); 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; }
.auth-link { display: flex; width: fit-content; margin: 10px auto 0; }
.auth-lead { margin: 0 0 6px; font-size: 14px; line-height: 1.45; }
.auth-notice { margin: 10px 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: var(--card-border); box-shadow: var(--card-shadow); }
.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, #c8371f, #f7c23b, #2458a6, #c8371f); 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; }
}

/* ---------- Header on phones ----------
 * Logo + city chip + actions must always fit the screen: the city chip shrinks (ellipsis), the
 * status pill is hidden on narrow screens, and the page itself never scrolls sideways. */
html, body { overflow-x: clip; }
.app-header > * { min-width: 0; }
.app-brand, .app-header-actions { flex: none; }
.app-header .app-city.city-switch { flex: 0 1 auto; min-width: 0; }
@media (max-width: 600px) {
  .app-header { gap: 6px; }
  .app-header #connection { display: none; }
  .app-header .app-city.city-switch { margin-left: 0; max-width: none; }
  .app-header-actions { gap: 0; }
}
@media (max-width: 350px) {
  .app-header .brand-logo { height: 32px; }
  .app-header [data-action="about"] { display: none; }
}

/* ---------- Amici (#amici): segments Gruppi | Community (docs/ECOSISTEMA_V2.md §4) ---------- */
.amici-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 12px; min-height: 66px; }
.amici-title { font: 650 clamp(28px, 7.5vw, 36px)/1.08 var(--display); letter-spacing: -0.02em; margin: 0; font-stretch: var(--display-stretch);}
.amici-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); margin: 0 0 16px; }
.amici-seg-link { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 40px; border-radius: var(--r-pill); text-decoration: none; font-weight: 750; font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
.amici-seg-link[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.amici-seg-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; }
.amici-body { min-width: 0; }
/* The community feed keeps its actions (new post, notifications, profile); the segment is its title. */
.amici-page .social-top .social-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.amici-page { position: relative; }
.amici-page .social-top { position: absolute; top: 10px; right: 0; margin: 0; padding: 0; border: 0; background: none; justify-content: flex-end; }
.amici-page .grp-page > .app-page-intro:first-child { display: none; }

/* ---------- Tu (#tu): profile, choices and everything that was in «Altro» ---------- */
.tu-profile { padding: 4px 0 6px; }
.tu-plain-head { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.tu-plain-head h1 { font: 650 28px/1.1 var(--display); font-stretch: var(--display-stretch);}
.tu-tastes-box:empty { display: none; }
.tu-tastes { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); text-decoration: none; color: var(--ink); min-width: 0; }
.tu-taste-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tu-taste { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 750; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .tu-taste { color: var(--accent); } }
.tu-taste.is-more { background: var(--surface-2); color: var(--muted); }
.tu-tastes-edit { flex: none; display: inline-flex; align-items: center; gap: 2px; font-weight: 750; font-size: 13px; color: var(--muted); }
.tu-tastes-edit .tg-i, .tu-tastes > .tg-i { width: 16px; height: 16px; }
.tu-tastes.is-empty { background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.tu-tastes.is-empty > span { flex: 1; min-width: 0; }
.tu-tastes.is-empty strong { display: block; font-size: 14.5px; }
.tu-tastes.is-empty small { color: var(--ink-2); font-size: 12.5px; }
.tu-tastes.is-empty > .tg-i:first-child { width: 22px; height: 22px; color: var(--accent-deep); }
.tu-count { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 800; }
.app-more-grid > button, .app-more-grid > .tu-account-line { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; text-align: left; color: inherit; }
.app-more-grid > * + * { border-top: 1px solid var(--line); }
.app-more-grid > button:active { background: var(--surface-2); }
.tu-account-line small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tu-danger strong { color: var(--danger); }
.tu-danger .app-menu-icon { color: var(--danger); }
.tu-page .app-account-card, .tu-page .app-cta-card { margin: 6px 0 18px; }
.tu-subpage .app-back { margin-top: 8px; }
.tu-subpage .app-page-intro { padding-bottom: 12px; }
/* The section brings its own heading: on this page the title above says it already. */
.tu-subpage .personal-section-heading > :is(h2, .personal-overline) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ======================================================================================================
   «Creuza a colori» — the signature of the app (2026-09-29). Tokens are at the top; these rules give the shared
   components their shape: condensed uppercase titles, ink-outlined cards and buttons with a solid offset shadow
   that "presses" on tap, a flat bottom bar with Iris in the middle.
   ====================================================================================================== */
body { font-family: var(--font); font-weight: 500; letter-spacing: 0; }
.app-page-title, .page-heading h1, .ws-page-header h1, .tg-map-page-heading h1, .home-title {
  font-weight: 900; font-stretch: 66%; text-transform: uppercase; letter-spacing: -.005em; line-height: .94; font-variation-settings: normal;
  font-size: clamp(34px, 10vw, 48px);
}
.section-title h2, .app-section-title h2, .home .app-section-title h2 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; font-size: 24px; letter-spacing: 0; line-height: 1; }
.home-pick-title, .sheet-title, .dialog-inner h2, #dialog-title { font-weight: 850; font-stretch: 70%; letter-spacing: 0; }
.eyebrow, .app-kicker, .personal-overline, .ws-kicker, .commercial-kicker { letter-spacing: .1em; font-weight: 800; }

/* Buttons: ink outline + offset shadow that presses down */
.button { border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--outline); font-weight: 800; }
.button:hover { background: var(--accent-deep); }
.button:active { transform: translate(2px, 2px); box-shadow: var(--press-shadow); }
.button.secondary { background: var(--surface); color: var(--ink); box-shadow: 3px 3px 0 var(--outline); }
.button.secondary:hover { background: var(--gold-soft); }
.button.ghost { border-color: transparent; box-shadow: none; }
.button.small { box-shadow: 2px 2px 0 var(--outline); }
.chip-button { height: 34px; border: 2px solid var(--outline); background: var(--surface); color: var(--ink); }
.chip-button:hover { background: var(--gold-soft); }
.chip-button:active { transform: translate(1px, 1px); }
@media (prefers-color-scheme: dark) {
  .button, .button.secondary, .chip-button { border-color: rgba(245, 241, 230, .28); }
}

/* Header and bottom bar */
.app-header { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.app-bottom-nav { background: var(--surface); border-top: 2px solid var(--outline); backdrop-filter: none; -webkit-backdrop-filter: none; align-items: center; }
.app-bottom-nav a { font-size: 11px; font-weight: 800; }
.app-bottom-nav a::before { background: var(--gold); top: 3px; height: 32px; }
.app-bottom-nav a.active { color: var(--ink); }
.app-bottom-nav a[data-nav="iris"] { align-self: start; justify-self: center; width: 58px; height: 58px; margin-top: -22px; border-radius: 50%; background: var(--gold); color: #1d1f24; border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--outline); gap: 0; }
.app-bottom-nav a[data-nav="iris"] .app-nav-icon { width: 28px; height: 28px; }
.app-bottom-nav a[data-nav="iris"] .app-nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.app-bottom-nav a[data-nav="iris"]::before { display: none; }
.app-bottom-nav a[data-nav="iris"].active { background: var(--accent); color: #fff; }
.app-bottom-nav a[data-nav="iris"]:active { transform: translate(2px, 2px); box-shadow: var(--press-shadow); }
@media (prefers-color-scheme: dark) { .app-bottom-nav { border-top-color: rgba(245, 241, 230, .18); } .app-bottom-nav a.active { color: var(--gold); } .app-bottom-nav a.active::before { background: var(--gold-soft); } }
.nav-count { background: var(--accent); border-color: var(--surface); }

/* Home: the evening pick is a blue block */
.home-pick { background: var(--navy); color: #ffffff; border: var(--card-border); box-shadow: var(--card-shadow); }
.home-pick-kicker { color: var(--gold); }
.home-pick-sub, .home-pick-steps li { color: rgba(255, 255, 255, .88); }
.app-cta-card { background: var(--accent); color: #fff; border: var(--card-border); box-shadow: var(--card-shadow); }

/* Bottom sheet */
#detail-dialog { border-top: 2px solid var(--outline); box-shadow: none; }
.sheet-grabber { width: 44px; height: 6px; background: var(--ink); opacity: .85; }
#detail-dialog::backdrop { background: rgba(29, 31, 36, .45); }

/* Inputs */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { border-radius: var(--r-sm); }
.field input, .field select, .field textarea { border: 2px solid var(--line-strong); background: var(--surface); }

/* Tu: four tiles (Creuza) */
.tu-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 6px 0 22px; }
.tu-tile { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 14px; min-height: 118px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); text-decoration: none; color: var(--ink); transition: transform .12s var(--ease), box-shadow .12s; }
.tu-tile:active { transform: translate(3px, 3px); box-shadow: var(--press-shadow); }
.tu-tile-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--ink); }
.tu-tile-icon .tg-i, .tu-tile-icon svg { width: 22px; height: 22px; }
.tu-tile-copy { display: grid; gap: 2px; }
.tu-tile-copy strong { font-size: 16px; font-weight: 850; }
.tu-tile-copy small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.tu-tile.is-accent { background: var(--accent); color: #fff; }
.tu-tile.is-accent .tu-tile-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.tu-tile.is-accent small { color: rgba(255, 255, 255, .85); }
.tu-tile .tu-count { position: absolute; top: 12px; right: 12px; }
@media (prefers-color-scheme: dark) { .tu-tile.is-accent { color: #121418; } .tu-tile.is-accent small { color: rgba(18, 20, 24, .8); } .tu-tile.is-accent .tu-tile-icon { color: #121418; background: rgba(18,20,24,.12); } }
