/* Layout: un'app da tasca. Copertina a tutto schermo → home con menu a icone → pagine con foto in testata.
   Palette presa dall'appartamento: verde salvia della camera, senape dei cuscini, cotto del pavimento. */
:root {
  --ground: #f5f2ec;
  --surface: #ffffff;
  --surface-alt: #eef0e9;
  --ink: #1f2b33;
  --muted: #66707a;
  --line: #e2ddd3;
  --sage: #5f7d5a;
  --sage-soft: #e3eadf;
  --on-sage: #ffffff;
  --mustard: #c99413;
  --terracotta: #b8603d;
  --navy: #1d2a3a;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, .78);
  --alert: #b8392a;
  --alert-soft: #fbecea;
  --c-transport: #2f62b8;
  --c-supermarket: #2f8a5c;
  --c-pharmacy: #c2412d;
  --c-food: #c07a12;
  --c-cafe: #7c4fc0;
  --c-money: #56627d;
  --c-green: #4a8a28;

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-logo: Georgia, "Times New Roman", serif;

  --gutter: 18px;
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121617;
    --surface: #1b2123;
    --surface-alt: #232b2c;
    --ink: #eef0ea;
    --muted: #a3aaa6;
    --line: #2d3638;
    --sage: #9cbb95;
    --sage-soft: #26332a;
    --on-sage: #12161c;
    --mustard: #e6b53e;
    --terracotta: #e08a66;
    --navy: #0f171c;
    --alert: #ff8a76;
    --alert-soft: #3a1f1c;
    --c-transport: #74a6ff;
    --c-supermarket: #4fd09c;
    --c-pharmacy: #ff7a66;
    --c-food: #f2b24c;
    --c-cafe: #b794f0;
    --c-money: #a3aec6;
    --c-green: #8bc76c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #121617;
  --surface: #1b2123;
  --surface-alt: #232b2c;
  --ink: #eef0ea;
  --muted: #a3aaa6;
  --line: #2d3638;
  --sage: #9cbb95;
  --sage-soft: #26332a;
  --on-sage: #12161c;
  --mustard: #e6b53e;
  --terracotta: #e08a66;
  --navy: #0f171c;
  --alert: #ff8a76;
  --alert-soft: #3a1f1c;
  --c-transport: #74a6ff;
  --c-supermarket: #4fd09c;
  --c-pharmacy: #ff7a66;
  --c-food: #f2b24c;
  --c-cafe: #b794f0;
  --c-money: #a3aec6;
  --c-green: #8bc76c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0; color: var(--ink); background: var(--ground); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.flag { display: block; width: 100%; height: 100%; }

/* ---------- Logo Dedalo ---------- */
.brand { display: inline-grid; padding: 0; border: 0; background: none; color: var(--ink); text-decoration: none; line-height: .9; letter-spacing: .09em; }
.brand.light { color: #fff; }
.brand-name { font-family: var(--font-logo); font-size: 1.1rem; font-weight: 700; }
.keyhole { position: relative; }
.keyhole::after { content: ""; position: absolute; width: 3px; height: 7px; border-radius: 3px; background: currentColor; left: 50%; top: 47%; transform: translate(-50%, -50%); }
.brand-house { justify-self: center; margin-top: 5px; font-size: .56rem; letter-spacing: .24em; }

/* ---------- Copertina ---------- */
.cover { position: fixed; inset: 0; z-index: 30; overflow: hidden; color: #fff; background: #1d2a3a; }
.cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; animation: cover-zoom 14s ease-out both; }
@keyframes cover-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 26, 30, .45) 0%, rgba(20, 26, 30, 0) 28%, rgba(20, 26, 30, .25) 55%, rgba(20, 26, 30, .86) 100%); }
.cover-content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; align-items: center; padding: calc(28px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(34px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px)); text-align: center; }
.cover-text { margin-top: auto; }
.cover-text p { margin: 0; font-size: .95rem; letter-spacing: .04em; color: var(--on-dark-muted); }
.cover h1 { margin: 4px 0 8px; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(3rem, 15vw, 4.4rem); line-height: .95; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.cover-text span { font-size: .9rem; color: var(--on-dark-muted); }
.flags { display: flex; justify-content: center; gap: 12px; margin: 26px 0 22px; }
.flags button { width: 40px; height: 40px; padding: 0; overflow: hidden; border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%; background: none; transition: transform .2s, border-color .2s; }
.flags button[aria-pressed="true"] { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.cover-open { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; color: var(--navy); background: rgba(255, 255, 255, .92); font-weight: 700; backdrop-filter: blur(8px); }
.cover-open .ico { width: 20px; height: 20px; }

/* ---------- App e barra in alto ---------- */
.app { width: min(100%, 560px); margin: 0 auto; min-height: 100vh; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 8px max(var(--gutter), env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--ground); }
.bar-title { flex: 1; min-width: 0; overflow: hidden; font-family: var(--font-display); font-style: italic; font-size: 1.25rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; text-align: center; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .75rem; font-weight: 700; }
.lang-btn .flag { width: 24px; height: 24px; border-radius: 50%; }

/* ---------- Home ---------- */
.home-hero { position: relative; margin: 14px max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px)); overflow: hidden; border-radius: 26px; color: #fff; aspect-ratio: 4 / 3; max-width: 100%; }
.home-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(20, 26, 30, .78)); }
.home-hero > div { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; }
.home-hero p { margin: 0; font-size: .9rem; color: var(--on-dark-muted); }
.home-hero h1 { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 2.4rem; line-height: 1; }
.home-hero span { font-size: .8rem; color: var(--on-dark-muted); }
.weather-chip { position: absolute; z-index: 1; top: 14px; right: 14px; padding: 6px 11px; border-radius: 999px; color: var(--navy); background: rgba(255, 255, 255, .9); font-size: .78rem; font-weight: 700; }
.home-body, .page-body { display: grid; gap: 16px; padding: 16px max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px)); }
.home-body > *, .page-body > * { min-width: 0; }

.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.time-pair.single { grid-template-columns: 1fr; }
.time-pair div { padding: 12px 14px; background: var(--surface); }
.time-pair small { display: block; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.time-pair b { font-family: var(--font-mono); font-size: 1rem; font-variant-numeric: tabular-nums; }

.wifi-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.wifi-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--on-sage); background: var(--sage); }
.wifi-card small { display: block; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.wifi-pass { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; user-select: all; }
.wifi-card .btn { grid-column: 1 / -1; }

.tip { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px dashed var(--line); border-radius: 14px; background: transparent; text-align: left; }
.tip-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--mustard); box-shadow: 0 0 0 5px color-mix(in srgb, var(--mustard) 22%, transparent); }
.tip p { flex: 1; min-width: 0; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.tip strong { color: var(--ink); }
.tip b { color: var(--sage); }

.grid-title { margin: 10px 0 0; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.7rem; line-height: 1.1; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 14px 6px 12px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); text-align: center; text-decoration: none; transition: transform .15s, border-color .15s; }
.tile .ico { width: 28px; height: 28px; color: var(--sage); }
.tile span { font-size: .76rem; font-weight: 600; line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; }
.tile:active { transform: scale(.97); }
@media (hover: hover) { .tile:hover { border-color: var(--sage); } }

/* ---------- Pagine ---------- */
.page-head { position: relative; margin: 14px max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px)); overflow: hidden; border-radius: 24px; }
.page-head.photo { aspect-ratio: 16 / 10; max-width: 100%; color: #fff; }
.page-head.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(20, 26, 30, .75)); }
.page-head h1 { position: relative; z-index: 1; margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 2.3rem; line-height: 1; text-wrap: balance; }
.page-head.photo h1 { position: absolute; left: 20px; right: 20px; bottom: 16px; }
.page-head.plain { display: flex; align-items: center; gap: 14px; padding: 22px 20px; background: var(--sage-soft); }
.page-head.plain .ico { width: 34px; height: 34px; color: var(--sage); }

.prose { margin: 0; max-width: 62ch; color: var(--muted); }
.prose.strong { color: var(--ink); font-weight: 600; }
.lead-title { margin: 4px 0 0; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.9rem; line-height: 1.05; text-wrap: balance; }
.signature { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--sage); }
.team { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.fine { margin: 0; color: var(--muted); font-size: .78rem; }
.sub { margin: 6px 0 0; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.5rem; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font-weight: 700; text-decoration: none; }
.btn.primary { border-color: transparent; color: var(--on-sage); background: var(--sage); }
.btn.dark { border-color: transparent; color: var(--surface); background: var(--ink); }
.btn.dark.done { color: var(--on-sage); background: var(--sage); }
.btn.danger { border-color: transparent; color: #fff; background: var(--alert); }
.btn.small { flex: 0 0 auto; min-height: 38px; padding: 0 14px; font-size: .88rem; }
.btn.wide { width: 100%; }
.help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--sage-soft); color: var(--ink); font-size: .9rem; }
.block { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.block-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.block-title b { font-family: var(--font-mono); font-size: .9rem; letter-spacing: 0; color: var(--ink); }
.big-number { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; user-select: all; }
.ask-inline { width: 100%; }
.ask-inline .ico { width: 20px; height: 20px; color: var(--sage); }

/* Check-in: passaggi in ordine */
.steps { display: grid; gap: 14px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); list-style: none; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--on-sage); background: var(--sage); font-family: var(--font-mono); font-weight: 700; font-size: .9rem; }
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: .9rem; }

/* Check-out: lista da spuntare */
.checklist { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.check input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 2px solid var(--line); border-radius: 7px; background: var(--surface); display: grid; place-items: center; }
.check input:checked { border-color: var(--sage); background: var(--sage); }
.check input:checked::after { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid var(--on-sage); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check input:checked + span { color: var(--muted); text-decoration: line-through; }
.progress { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--sage); transition: width .3s ease; }
.done { margin: 0; text-align: center; font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--sage); }

/* La casa: stanze */
.rooms { display: grid; gap: 14px; }
.room { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.room img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.room > div { padding: 14px 16px 16px; }
.room h3 { margin: 0 0 6px; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.5rem; }
.room ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.room li { padding: 5px 10px; border-radius: 999px; background: var(--sage-soft); font-size: .8rem; }

/* Regole */
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rule { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.rule-big { font-family: var(--font-display); font-variant-numeric: lining-nums tabular-nums; font-size: 2.7rem; font-weight: 600; line-height: .95; overflow-wrap: anywhere; }
.rule-big.no { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--alert); font-size: 2rem; }
.rule strong { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rule .rule-text { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.rule.alert { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--alert) 40%, transparent); background: var(--alert-soft); }
.rule.alert .rule-big, .rule.alert strong { color: var(--alert); }
.rule.wide { grid-column: 1 / -1; }

/* Luoghi, mappa, filtri */
.address { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.address span { color: var(--muted); font-size: .88rem; }
.address .btn { justify-self: start; margin-top: 8px; }
.chips { display: flex; gap: 8px; margin: 0 calc(-1 * max(var(--gutter), env(safe-area-inset-right, 0px))) 0 calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))); padding: 2px max(var(--gutter), env(safe-area-inset-right, 0px)) 4px max(var(--gutter), env(safe-area-inset-left, 0px)); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.chip[aria-selected="true"] { border-color: var(--ink); color: var(--surface); background: var(--ink); }
.map { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.map svg { display: block; width: 100%; height: auto; max-width: 100%; aspect-ratio: 1; }
.map figcaption { margin-top: 8px; color: var(--muted); font-size: .74rem; text-align: center; }
.ring { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.ring-label { fill: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.compass { fill: var(--muted); font-family: var(--font-mono); font-size: 10px; font-weight: 700; }
.home-mark circle { fill: var(--sage); stroke: var(--surface); stroke-width: 3; }
.home-mark path { fill: var(--on-sage); }
.dot { cursor: pointer; }
.dot circle { stroke: var(--surface); stroke-width: 2; }
.dot.dim { opacity: .14; cursor: default; }
.dot.active circle { stroke: var(--ink); stroke-width: 2.5; }
.dot-label { fill: var(--ink); font-family: var(--font-body); font-size: 10.5px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.places { display: grid; gap: 8px; }
.place { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; }
.place.active { border-color: var(--ink); }
.place > i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.place strong { display: block; font-size: .95rem; }
.place small { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.place em { font-family: var(--font-mono); font-size: .78rem; font-style: normal; font-weight: 700; color: var(--sage); white-space: nowrap; }

.metro-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.metro-card b { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; background: #c8102e; font-family: var(--font-mono); }
.metro-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.lines { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lines div { display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.line { flex: none; width: 44px; height: 10px; border-radius: 3px; border: 1px solid var(--line); background-image: repeating-linear-gradient(90deg, var(--c) 0 12px, transparent 12px 18px); }
.line.white { --c: #ffffff; background-color: #6f7378; }
.line.blue { --c: #2f62b8; }
.line.yellow { --c: #f2c230; }

.bins { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.bin { grid-column: span 2; }
.bin:nth-child(n+4) { grid-column: span 3; }
.bin { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: center; font-size: .8rem; font-weight: 600; }
.bin i { width: 26px; height: 32px; border-radius: 4px 4px 7px 7px; background: var(--b); box-shadow: inset 0 5px 0 rgba(0, 0, 0, .15); }
.bin.paper { --b: #2f62b8; }
.bin.plastic { --b: #f2c230; }
.bin.glass { --b: #2f8a5c; }
.bin.organic { --b: #8a5a3c; }
.bin.mixed { --b: #8b9096; }

.emergency { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--alert-soft); }
.emergency-number { font-family: var(--font-display); font-variant-numeric: lining-nums; font-size: 3.4rem; font-weight: 600; line-height: 1; color: var(--alert); }
.emergency p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.emergency .btn { grid-column: 1 / -1; }

/* Da vedere */
.weather { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, #2b3d4f, #3f5a4c); }
.weather small { color: var(--on-dark-muted); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.weather strong { display: block; font-size: 1.1rem; }
.weather p { margin: 4px 0 0; color: #f6d77f; font-size: .85rem; }
.weather-temp { grid-row: span 2; font-family: var(--font-display); font-variant-numeric: lining-nums; font-size: 3rem; font-weight: 600; line-height: 1; }
.weather-range { grid-column: 1; color: var(--on-dark-muted); font-family: var(--font-mono); font-size: .78rem; }
.sights { display: grid; gap: 16px; }
.sight { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.sight-photo { position: relative; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; }
.sight-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sight-photo::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(20, 26, 30, .85)); }
.sight-photo h3 { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 12px; margin: 0; color: #fff; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.8rem; line-height: 1.02; text-wrap: balance; }
.sight-tags { position: absolute; z-index: 1; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.sight-tags span { padding: 5px 9px; border-radius: 999px; color: #1f2b33; background: rgba(255, 255, 255, .92); font-size: .7rem; font-weight: 700; }
.sight-tags .indoor { color: #fff; background: #5f7d5a; }
.sight-body { display: grid; gap: 10px; padding: 14px 16px 16px; }
.sight-body p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.sight-body .sight-route { display: flex; gap: 10px; align-items: flex-start; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: .84rem; }
.sight-route b { flex: none; display: grid; place-items: center; min-width: 32px; height: 22px; padding: 0 6px; border-radius: 6px; color: #fff; background: #c8102e; font-family: var(--font-mono); font-size: .7rem; }
.sight-body .btn { justify-self: start; }

.tastes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.taste { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; padding-bottom: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.taste img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; margin-bottom: 8px; }
.taste strong, .taste > span { padding: 0 14px; }
.taste strong { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; font-weight: 600; }
.taste > span { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.taste-word { padding-top: 14px; }
.taste-word .taste-big { display: grid; place-items: center; aspect-ratio: 1.6; margin: 0 14px 8px; padding: 0; border-radius: 12px; color: var(--mustard); background: var(--surface-alt); font-family: var(--font-display); font-style: italic; font-size: 2.4rem; font-weight: 600; }

/* Footer */
.footer { display: grid; justify-items: center; gap: 2px; padding: 34px 0 8px; color: var(--muted); text-align: center; }
.footer .brand-name { color: var(--ink); }
.footer small { font-size: .56rem; letter-spacing: .24em; }
.footer p { margin: 8px 0 0; font-size: .85rem; }
.credits { margin-top: 12px; max-width: 46ch; font-size: .74rem; text-align: left; }
.credits summary { cursor: pointer; text-align: center; }
.credits ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.6; }
.credits a { color: var(--ink); }

/* Pulsante assistente */
.fab { position: fixed; z-index: 25; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; padding: 13px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--navy); box-shadow: 0 12px 30px rgba(20, 26, 30, .3); font-weight: 700; font-size: .9rem; }
.fab .ico { width: 20px; height: 20px; }

/* ---------- Finestre ---------- */
dialog { border: 0; padding: 0; }
dialog::backdrop { background: rgba(15, 20, 24, .55); backdrop-filter: blur(4px); }
.modal { width: min(calc(100% - 32px), 440px); max-height: calc(100% - 48px); border-radius: 26px; color: var(--ink); background: var(--surface); }
.modal[open] { animation: pop .3s ease-out; }
@keyframes pop { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.welcome-card { display: grid; gap: 12px; justify-items: center; padding: 30px 26px 24px; text-align: center; }
.welcome-heart { color: var(--terracotta); }
.welcome-heart .ico { width: 30px; height: 30px; fill: currentColor; }
.welcome-card h2 { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 2.4rem; line-height: 1; }
.welcome-card p { margin: 0; color: var(--muted); }
.welcome-card .welcome-wish { color: var(--ink); font-weight: 600; }
.lang-card { display: grid; gap: 8px; padding: 22px; }
.lang-card h2 { margin: 0 0 6px; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.8rem; }
.lang-option { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 600; text-align: left; }
.lang-option .flag { width: 32px; height: 32px; border-radius: 50%; }
.lang-option[aria-pressed="true"] { border-color: var(--sage); background: var(--sage-soft); }

.chat { position: fixed; inset: auto 0 0; width: min(100%, 560px); height: min(88vh, 720px); max-height: none; margin: 0 auto; border-radius: 24px 24px 0 0; color: var(--ink); background: var(--ground); display: none; flex-direction: column; overflow: hidden; }
.chat[open] { display: flex; animation: pop .25s ease-out; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; color: #fff; background: var(--navy); }
.chat-head > div:nth-child(2) { flex: 1; min-width: 0; }
.chat-head strong { display: block; }
.chat-head small { display: flex; align-items: center; gap: 6px; color: var(--on-dark-muted); font-size: .75rem; }
.chat-head small i { width: 7px; height: 7px; border-radius: 50%; background: #3fd68b; }
.assistant-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--sage); }
.keyhole-mark { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.keyhole-mark::after { content: ""; position: absolute; left: 50%; top: 8px; width: 6px; height: 10px; transform: translateX(-50%); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); background: #fff; }
.chat-close { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .14); font-size: 1.4rem; line-height: 1; }
.chat-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 18px; overflow-y: auto; }
.message { max-width: 85%; padding: 11px 14px; border-radius: 16px; line-height: 1.45; font-size: .93rem; }
.message.bot { align-self: flex-start; border-bottom-left-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.message.user { align-self: flex-end; border-bottom-right-radius: 5px; color: var(--on-sage); background: var(--sage); }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .82rem; }
.chat-input { display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.chat-input input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--ground); }
.chat-input button { width: 46px; border: 0; border-radius: 12px; color: var(--on-sage); background: var(--sage); font-size: 1.1rem; font-weight: 700; }

@media (min-width: 600px) {
  .cover-content { max-width: 560px; margin: 0 auto; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chat { bottom: 24px; border-radius: 24px; }
}

/* ---------- Shop ---------- */
.shop-banner { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, var(--terracotta), #9c4a2e); text-decoration: none; box-shadow: 0 10px 24px color-mix(in srgb, var(--terracotta) 30%, transparent); }
.shop-banner-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .18); }
.shop-banner > span:nth-child(2) { flex: 1; min-width: 0; }
.shop-banner strong { display: block; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.35rem; line-height: 1.1; }
.shop-banner small { display: block; margin-top: 3px; color: rgba(255, 255, 255, .85); font-size: .8rem; line-height: 1.35; }
.shop-banner b { font-size: 1.2rem; }
.products { display: grid; gap: 14px; }
.product { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.product img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.product-ico { display: grid; place-items: center; aspect-ratio: 3 / 1.2; color: var(--terracotta); background: color-mix(in srgb, var(--terracotta) 12%, var(--surface)); }
.product-ico .ico { width: 54px; height: 54px; stroke-width: 1.3; }
.product-body { display: grid; gap: 8px; padding: 14px 16px 16px; }
.product-kind { justify-self: start; padding: 4px 9px; border-radius: 999px; color: var(--terracotta); background: color-mix(in srgb, var(--terracotta) 12%, var(--surface)); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.product h3 { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.6rem; line-height: 1.05; }
.product p { margin: 0; color: var(--muted); font-size: .92rem; }
.product-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.product-foot b { font-size: 1rem; }
