/* ==========================================================================
   hoboh 57 · guest app
   Due temi, scuro e chiaro, con la stessa anima: carta calda, oro antico,
   filetti sottili. Titoli in Cormorant Garamond, testo in Jost.
   ========================================================================== */

:root {
  /* scuro (predefinito) */
  --ink: #141312;
  --ink-2: #1b1a18;
  --ink-3: #25231f;
  --paper: #ece7df;
  --paper-86: rgba(236, 231, 223, 0.84);
  --muted: rgba(236, 231, 223, 0.56);
  --faint: rgba(236, 231, 223, 0.42);
  --line: rgba(255, 247, 235, 0.07);
  --line-2: rgba(255, 247, 235, 0.12);
  --card: rgba(255, 247, 235, 0.035);
  --card-2: rgba(255, 247, 235, 0.065);
  --fill: rgba(255, 247, 235, 0.08);
  --glass: rgba(26, 25, 23, 0.52);
  --glass-2: rgba(26, 25, 23, 0.78);
  --accent: #d2ae68;
  --accent-text: #dcc594;
  --accent-soft: rgba(210, 174, 104, 0.1);
  --accent-line: rgba(210, 174, 104, 0.3);
  --brass: linear-gradient(180deg, rgba(210, 174, 104, 0.22), rgba(210, 174, 104, 0.12));
  --brass-ink: #f2e9da;
  --scrim-rgb: 20, 19, 18;
  --sheet-rgb: 27, 26, 24;
  --chip-bg: rgba(24, 23, 21, 0.38);
  --chip-line: rgba(255, 247, 235, 0.14);
  --bar-bg: rgba(27, 26, 24, 0.66);
  --bar-ind: rgba(255, 247, 235, 0.085);
  --bar-ind-line: rgba(255, 247, 235, 0.07);
  --tab-off: rgba(236, 231, 223, 0.58);
  --backdrop: rgba(10, 9, 8, 0.5);
  --frame: #100f0e;
  --frame-line: rgba(255, 247, 235, 0.09);
  --stage-bg: #0d0c0b;
  --stage-veil: linear-gradient(180deg, rgba(12, 11, 10, 0.22), rgba(12, 11, 10, 0.58));
  --stage-text: rgba(255, 250, 242, 0.8);
  color-scheme: dark;

  --g: 18px;
  --tabbar-h: 56px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --font: "Jost", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="light"] {
  --ink: #ffffff;
  --ink-2: #ffffff;
  --ink-3: #f0eeea;
  --paper: #171513;
  --paper-86: rgba(23, 21, 19, 0.82);
  --muted: rgba(23, 21, 19, 0.62);
  --faint: rgba(23, 21, 19, 0.46);
  --line: rgba(23, 21, 19, 0.08);
  --line-2: rgba(23, 21, 19, 0.14);
  --card: rgba(23, 21, 19, 0.032);
  --card-2: rgba(23, 21, 19, 0.055);
  --fill: rgba(23, 21, 19, 0.06);
  --glass: rgba(255, 255, 255, 0.66);
  --glass-2: rgba(255, 255, 255, 0.9);
  --accent: #9a7526;
  --accent-text: #7d5f1d;
  --accent-soft: rgba(154, 117, 38, 0.08);
  --accent-line: rgba(154, 117, 38, 0.24);
  --brass: linear-gradient(180deg, rgba(154, 117, 38, 0.15), rgba(154, 117, 38, 0.08));
  --brass-ink: #3a2c0d;
  --scrim-rgb: 255, 255, 255;
  --sheet-rgb: 255, 255, 255;
  --chip-bg: rgba(255, 255, 255, 0.72);
  --chip-line: rgba(23, 21, 19, 0.1);
  --bar-bg: rgba(255, 255, 255, 0.78);
  --bar-ind: rgba(23, 21, 19, 0.06);
  --bar-ind-line: rgba(23, 21, 19, 0.05);
  --tab-off: rgba(23, 21, 19, 0.62);
  --backdrop: rgba(30, 28, 25, 0.3);
  --frame: #efece6;
  --frame-line: rgba(23, 21, 19, 0.1);
  --stage-bg: #f2efe9;
  --stage-veil: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.46));
  --stage-text: rgba(23, 21, 19, 0.76);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus { outline: none; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------------------
   Il "telefono": a tutto schermo su mobile, incorniciato su desktop
   -------------------------------------------------------------------------- */
.device {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
  container-type: size;
}

.stage { display: none; }

@media (min-width: 720px) and (min-height: 640px) {
  body { background: var(--stage-bg); }
  .stage { display: block; position: fixed; inset: 0; overflow: hidden; }
  .stage-bg {
    position: absolute; inset: -2%;
    background: var(--stage-bg) center / cover no-repeat;
    animation: stageDrift 40s ease-in-out infinite alternate;
  }
  .stage-bg::after {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 12.5%), var(--stage-veil);
  }
  .stage-caption {
    position: absolute; top: 26px; left: 0; right: 0;
    text-align: center; font-size: 10.5px; letter-spacing: 0.56em; text-indent: 0.56em;
    text-transform: uppercase; color: var(--stage-text);
  }
  .stage-note {
    position: absolute; left: 40px; bottom: 34px; max-width: 250px;
    color: var(--stage-text); font-size: 13px; line-height: 1.55;
  }
  .stage-note strong { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--paper); margin-bottom: 4px; }
  .stage-qr {
    position: absolute; right: 40px; bottom: 34px;
    display: flex; align-items: flex-end; gap: 14px;
    color: var(--stage-text); font-size: 12.5px; line-height: 1.45; text-align: right;
  }
  .stage-qr .qr { width: 104px; height: 104px; padding: 9px; border-radius: 16px; background: #fffdf9; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
  .stage-qr .qr svg { width: 100%; height: 100%; display: block; }
  /* le scritte sulla foto del desktop: un alone appena accennato, così restano leggibili su cielo e mare */
  .stage-caption, .stage-note, .stage-qr { text-shadow: 0 1px 14px rgba(12, 11, 10, 0.75); }
  :root[data-theme="light"] .stage-caption,
  :root[data-theme="light"] .stage-note,
  :root[data-theme="light"] .stage-qr { text-shadow: 0 1px 14px rgba(255, 255, 255, 0.9); }

  .device {
    inset: 0; margin: auto;
    width: 402px;
    height: min(874px, calc(100vh - 100px));
    border-radius: 54px;
    box-shadow:
      0 0 0 10px var(--frame),
      0 0 0 11px var(--frame-line),
      0 50px 120px rgba(0, 0, 0, 0.45);
  }
}
@media (min-width: 720px) and (min-height: 640px) and (max-width: 1080px) {
  .stage-note, .stage-qr { display: none; }
}
@keyframes stageDrift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.07) translate3d(-1%, -1%, 0); } }

/* --------------------------------------------------------------------------
   In alto: pillola di vetro, su una sfumatura continua senza bordo
   -------------------------------------------------------------------------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  padding: calc(var(--safe-t) + 10px) var(--g) 12px;
  display: flex; justify-content: center;
  pointer-events: none;
}
.topbar::before {
  content: ""; position: absolute; inset: 0 0 -34px;
  background: linear-gradient(180deg, rgba(var(--scrim-rgb), 0.66) 0%, rgba(var(--scrim-rgb), 0.34) 48%, rgba(var(--scrim-rgb), 0) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 100%);
}
@media (min-width: 720px) and (min-height: 640px) { .topbar { padding-top: 16px; } }

.brandpill {
  position: relative; pointer-events: auto;
  display: inline-flex; align-items: center; gap: 4px;
  height: 44px; padding: 4px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--chip-line);
}
.brandpill .logo { display: flex; align-items: center; height: 36px; padding: 0 10px 0 14px; color: var(--paper); }
.brandpill .logo svg { height: 16px; width: auto; }
.langbtn {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 11px; font-weight: 400; letter-spacing: 0.08em; color: var(--paper-86);
  transition: background 0.2s;
}
.langbtn:active { background: var(--card-2); }
.themedot {
  width: 15px; height: 15px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.2px currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Viste (una per tab) · ognuna scorre per conto suo
   -------------------------------------------------------------------------- */
.views { position: absolute; inset: 0; }
.view {
  position: absolute; inset: 0;
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 50px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.view::-webkit-scrollbar { display: none; }
.view.is-active { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease), visibility 0s; }

/* --------------------------------------------------------------------------
   Apertura fotografica · scorre con la pagina e si scioglie nel fondo
   -------------------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  height: 73vh; height: 73cqh; min-height: 490px;
  padding: 0 var(--g) 6px;
}
.hero--home { height: 88vh; height: 88cqh; min-height: 620px; }
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.6s ease;
}
.hero-media img.is-on { opacity: 1; animation: kenburns 18s ease-out both; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(var(--scrim-rgb), 0.28) 0%,
    rgba(var(--scrim-rgb), 0) 22%,
    rgba(var(--scrim-rgb), 0) 36%,
    rgba(var(--scrim-rgb), 0.1) 44%,
    rgba(var(--scrim-rgb), 0.26) 52%,
    rgba(var(--scrim-rgb), 0.46) 60%,
    rgba(var(--scrim-rgb), 0.66) 68%,
    rgba(var(--scrim-rgb), 0.82) 76%,
    rgba(var(--scrim-rgb), 0.92) 84%,
    rgba(var(--scrim-rgb), 0.98) 92%,
    var(--ink) 100%);
}
@keyframes kenburns { from { transform: scale(1.05); } to { transform: scale(1); } }

.chips-hero { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip-glass {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 400; white-space: nowrap; color: var(--paper);
  font-variant-numeric: tabular-nums;
  background: var(--chip-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--chip-line);
}
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); flex: none; }

.h-title {
  font-family: var(--display);
  font-size: clamp(36px, 11cqw, 48px);
  line-height: 1.02; font-weight: 400; letter-spacing: -0.005em;
  text-wrap: balance;
}
.h-title span { display: block; color: var(--muted); }
.h-stats { display: flex; flex-wrap: wrap; row-gap: 4px; margin-top: 14px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.h-stats b { color: var(--paper-86); font-weight: 400; }
.h-stats i { font-style: normal; margin: 0 9px; color: var(--faint); }

/* colonna di miniature (come "INSPO" nel riferimento) */
.inspo {
  position: absolute; right: 14px; top: 27%;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.inspo-label { font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); margin-bottom: 1px; }
.inspo button {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
  opacity: 0.7; transition: opacity 0.4s, box-shadow 0.4s, transform 0.4s var(--ease);
}
.inspo button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 1.5px #fff, 0 0 0 5px rgba(0, 0, 0, 0.16); transform: scale(1.05); }
.inspo img { width: 100%; height: 100%; object-fit: cover; }

/* --------------------------------------------------------------------------
   Sezioni
   -------------------------------------------------------------------------- */
.sec { padding: 34px var(--g) 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-title { font-family: var(--display); font-size: 23px; font-weight: 400; letter-spacing: 0; }
.sec-link { font-size: 13px; color: var(--muted); padding: 6px 0 6px 10px; }
.inline-link { color: var(--accent-text); box-shadow: inset 0 -1px 0 var(--accent-line); }
.sec-lead { margin: -6px 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 40ch; }

.stack { display: grid; gap: 8px; }
.list { display: grid; gap: 8px; }

.row--enter { animation: rowIn 0.45s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.more {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 48px; margin-top: 10px; border-radius: 999px;
  font-size: 14px; color: var(--paper-86);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.25s, transform 0.2s var(--ease);
}
.more small { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.more:active { transform: scale(0.99); background: var(--card); }

.askmore {
  display: grid; gap: 8px; margin-top: 20px;
  padding: 18px 16px 16px; border-radius: 20px;
  background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line);
}
.askmore-t { font-family: var(--display); font-size: 22px; line-height: 1.15; color: var(--paper); }
.askmore-s { font-size: 13.5px; line-height: 1.55; color: var(--paper-86); max-width: 40ch; }
.askmore .btn { margin-top: 6px; background: transparent; }

/* riga-carta, come le voci del "Planner" nel riferimento */
.row {
  position: relative;
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 13px;
  min-height: 92px; padding: 9px 12px 9px 9px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.25s, transform 0.25s var(--ease);
}
.row.is-feature { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.row:has(.row-hit:active) { transform: scale(0.985); background: var(--card-2); }
.row--text { grid-template-columns: minmax(0, 1fr) auto; min-height: 64px; padding-left: 16px; }
.row-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.row-thumb { width: 56px; height: 74px; border-radius: 14px; object-fit: cover; background: var(--ink-3); }
.row-body { min-width: 0; }
.row-title {
  font-size: 15px; font-weight: 400; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.host-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 0 7px 3px 0; vertical-align: middle; }
.row-sub { margin-top: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.row-end > * { pointer-events: auto; }
.row-end .pill { pointer-events: none; }

.pill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 400; white-space: nowrap;
  background: var(--card-2); color: var(--paper-86);
  box-shadow: inset 0 0 0 1px var(--line);
  font-variant-numeric: tabular-nums;
}
.pill--book { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.pill--soon { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill--glass { background: var(--chip-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--paper); box-shadow: inset 0 0 0 1px var(--chip-line); }

/* cerchio "salva" (vuoto / pieno oro) */
.ring {
  position: relative; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}
.ring::before { content: ""; position: absolute; inset: -11px; }
.ring::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform 0.3s var(--ease); }
.ring[aria-pressed="true"] { background: var(--accent); box-shadow: none; }
.ring[aria-pressed="true"]::after { transform: scale(1); }
.ring:active { transform: scale(0.86); }

/* filtri */
.filters {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 0 calc(var(--g) * -1) 14px; padding: 2px var(--g);
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 13.5px; color: var(--paper-86);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.2s var(--ease);
}
.filter:active { transform: scale(0.96); }
.filter[aria-pressed="true"] { background: var(--brass); color: var(--brass-ink); box-shadow: inset 0 0 0 1px var(--accent-line); }

/* binari orizzontali di foto */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 76%;
  gap: 10px; overflow-x: auto;
  margin: 0 calc(var(--g) * -1); padding: 0 var(--g) 2px;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--g);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail--small { grid-auto-columns: 46%; }
.tile {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 3 / 4; max-width: 100%;
  padding: 16px; border-radius: 22px;
  text-align: left; background: var(--ink-3); color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.3s var(--ease);
}
.tile:active { transform: scale(0.98); }
.tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 15, 14, 0) 34%, rgba(16, 15, 14, 0.38) 58%, rgba(16, 15, 14, 0.88) 100%); }
.tile--wide { aspect-ratio: 5 / 4; }
.tile-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; }
.tile-top .pill--glass { background: rgba(16, 15, 14, 0.42); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.tile-kicker { font-size: 12px; color: rgba(255, 250, 242, 0.78); font-variant-numeric: tabular-nums; }
.tile-title { font-family: var(--display); margin-top: 3px; font-size: 25px; line-height: 1.08; font-weight: 400; letter-spacing: 0; text-wrap: balance; }
.rail--small .tile-title { font-size: 20px; }
.tile-sub { margin-top: 6px; font-size: 12.5px; line-height: 1.4; color: rgba(255, 250, 242, 0.72); }

/* il soggiorno */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { padding: 14px 16px 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.eyebrow { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.stat-v { font-family: var(--display); margin-top: 8px; font-size: 34px; line-height: 1; font-weight: 400; letter-spacing: 0; font-variant-numeric: proportional-nums; font-feature-settings: "tnum" 0; }
.stat-n { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

.card {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px; border-radius: 18px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
}
.card--tap { transition: background 0.25s, transform 0.25s var(--ease); }
.card--tap:has(.row-hit:active) { background: var(--card-2); transform: scale(0.985); }
.card-v { margin-top: 6px; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.card-v small { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.code { font-family: var(--mono); font-size: 15px; letter-spacing: 0.02em; }
.card-actions { display: flex; gap: 6px; }
.card-foot { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.card--stack { grid-template-columns: minmax(0, 1fr); }
.card--stack .card-actions { flex-wrap: wrap; }

/* piccoli pulsanti: ottone tenue (principale) e filetto (secondario) */
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 15px; border-radius: 999px;
  background: var(--brass); color: var(--brass-ink);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  font-size: 13px; font-weight: 400; white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.btn-sm:active { transform: scale(0.95); }
.btn-sm--ghost { background: transparent; color: var(--paper-86); box-shadow: inset 0 0 0 1px var(--line-2); }

/* elenchi a righe sottili */
.lines { border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 0 16px; }
.line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 58px; padding: 9px 0; border-top: 1px solid var(--line);
}
.line:first-child { border-top: 0; }
.line-t { display: block; font-size: 15px; }
.line-s { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.line-n { font-size: 16px; font-variant-numeric: tabular-nums; }
.line-go { font-size: 12.5px; color: var(--muted); }
a.line:active .line-go, a.line:active .line-t, button.line:active .line-t, button.line:active .line-go { color: var(--accent-text); }
/* manuale: una griglia di capitoli, il primo largo */
.chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.chapter {
  position: relative; overflow: hidden;
  display: grid; align-content: start; gap: 5px;
  min-height: 104px; padding: 15px 14px 17px; border-radius: 18px; text-align: left;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
  animation: chapterIn 0.5s var(--ease) both; animation-delay: calc(var(--i) * 55ms);
}
.chapter::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent-line), transparent);
}
.chapter--wide { grid-column: span 2; min-height: 0; padding-bottom: 19px; }
.chapter:active { transform: scale(0.985); background: var(--card-2); }
.chapter:hover { box-shadow: inset 0 0 0 1px var(--accent-line); }
.ch-n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ch-t { font-family: var(--display); font-size: 19px; line-height: 1.15; color: var(--paper); text-wrap: balance; }
.chapter--wide .ch-t { font-size: 26px; }
.ch-s { font-size: 13px; line-height: 1.45; color: var(--muted); }
@keyframes chapterIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tips { border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 2px 16px; }
.tips li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--paper-86); max-width: 60ch; }
.tips li:first-child { border-top: 0; }

/* carta invito (prenotiamo noi) */
.invite {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 22px 16px 16px; border-radius: 22px;
  display: grid; gap: 14px; color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.invite > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.invite::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 15, 14, 0.42), rgba(16, 15, 14, 0.9)); }
.invite h3 { font-family: var(--display); font-size: 26px; line-height: 1.1; font-weight: 400; text-wrap: balance; }
/* la card ha sempre la foto scura sotto: nel tema chiaro il tasto diventa una pasticca di carta */
:root[data-theme="light"] .invite .cta {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.97), rgba(255, 253, 249, 0.92));
  color: #1b1916; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}
:root[data-theme="light"] .invite .cta-end { color: rgba(27, 25, 22, 0.62); border-left-color: rgba(27, 25, 22, 0.18); }
.invite p { font-size: 13.5px; line-height: 1.55; color: rgba(255, 250, 242, 0.84); max-width: 34ch; }

/* planner */
.empty { padding: 20px 16px 18px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 14px; }
.empty p { font-size: 14.5px; line-height: 1.6; color: var(--paper-86); max-width: 36ch; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.linkbtn { font-size: 13px; color: var(--muted); padding: 8px 0; }

.foot { padding: 46px var(--g) 8px; display: grid; gap: 10px; justify-items: start; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.foot .logo-lg { color: var(--paper); opacity: 0.9; }
.foot .logo-lg svg { height: 26px; width: auto; }
.foot a { display: inline-flex; align-items: center; min-height: 28px; }
.foot .cin { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }

/* --------------------------------------------------------------------------
   Barra dei tab: capsula di vetro, la voce attiva appena più chiara
   -------------------------------------------------------------------------- */
.tabbar {
  position: absolute; z-index: 40;
  left: 14px; right: 14px; bottom: calc(14px + var(--safe-b));
  height: var(--tabbar-h); padding: 5px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-radius: 999px;
  background: var(--bar-bg);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--chip-line), 0 18px 44px rgba(0, 0, 0, 0.22);
}
.tab-ind {
  position: absolute; top: 5px; bottom: 5px; left: 5px;
  width: calc((100% - 10px) / 5);
  border-radius: 999px;
  background: var(--bar-ind);
  box-shadow: inset 0 0 0 1px var(--bar-ind-line);
  transform: translate3d(calc(var(--i, 0) * 100%), 0, 0);
  transition: transform 0.55s var(--ease);
}
.tab {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 400;
  color: var(--tab-off); border-radius: 999px;
  transition: color 0.35s;
}
.tab[aria-selected="true"] { color: var(--paper); }
.tab sup { font-size: 9px; margin-left: 2px; vertical-align: 6px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
@media (max-width: 350px) { .tab { font-size: 11.5px; } }

/* --------------------------------------------------------------------------
   Scheda dal basso (bottom sheet)
   -------------------------------------------------------------------------- */
.sheet-layer { position: absolute; inset: 0; z-index: 60; visibility: hidden; transition: visibility 0s linear 0.5s; }
.sheet-layer.is-open { visibility: visible; transition: visibility 0s; }
.sheet-backdrop {
  position: absolute; inset: 0; background: var(--backdrop);
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.is-open .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100% - var(--safe-t) - 30px);
  display: flex; flex-direction: column;
  background: var(--ink-2);
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 var(--line);
  transform: translate3d(0, 104%, 0);
  transition: transform 0.55s var(--ease);
  overflow: hidden;
}
.is-open .sheet { transform: translate3d(0, var(--drag, 0px), 0); }
.sheet:focus, .sheet:focus-visible { outline: none; }
.sheet.is-dragging { transition: none; }
.sheet::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 64px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--sheet-rgb), 1) 22%, rgba(var(--sheet-rgb), 0));
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.sheet.is-plain::before, .sheet.is-scrolled::before { opacity: 1; }
.sheet-grip { position: absolute; top: 8px; left: 50%; z-index: 4; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--line-2); pointer-events: none; }
.sheet-nav { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 4; display: flex; justify-content: space-between; pointer-events: none; }
.sheet-nav button {
  pointer-events: auto; height: 32px; padding: 0 13px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px var(--chip-line);
  font-size: 12.5px; font-weight: 400; color: var(--paper);
}
.sheet-nav .spacer { width: 1px; }
.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(28px + var(--safe-b)); scrollbar-width: none; }
.sheet-scroll::-webkit-scrollbar { display: none; }
.sheet-media { position: relative; aspect-ratio: 4 / 5; max-height: 54svh; max-width: 100%; overflow: hidden; background: var(--ink-3); }
.sheet-media img { width: 100%; height: 100%; object-fit: cover; }
.sheet-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(var(--sheet-rgb), 0.24) 0%, rgba(var(--sheet-rgb), 0) 26%, rgba(var(--sheet-rgb), 0) 40%,
    rgba(var(--sheet-rgb), 0.34) 60%, rgba(var(--sheet-rgb), 0.72) 78%, rgba(var(--sheet-rgb), 0.93) 91%, var(--ink-2) 100%);
}
.sheet-body { position: relative; padding: 0 var(--g); margin-top: -46px; }
.sheet-body--plain { margin-top: 0; padding-top: 64px; }
.sheet-kicker { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.sheet-title { font-family: var(--display); margin-top: 8px; font-size: 34px; line-height: 1.04; font-weight: 400; letter-spacing: 0; text-wrap: balance; }
.sheet-sub { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 44ch; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.sheet-text { margin-top: 18px; font-size: 15px; line-height: 1.65; color: var(--paper-86); max-width: 62ch; }

.facts { margin-top: 18px; border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: minmax(96px, 36%) 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.55; }
.fact dt { color: var(--muted); }
.fact dd { font-variant-numeric: tabular-nums; color: var(--paper-86); }

/* manuale della casa */
.mgroup { margin-top: 30px; }
.mgroup-t { font-weight: 400; color: var(--accent-text); }
.mgroup .facts { margin-top: 10px; }
.fact dd b, .stop-t b { font-weight: 500; color: var(--paper); }
.fact-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
/* schizzi disegnati a mano, presi dal manuale stampato */
.fig { color: var(--paper-86); }
.fig svg { display: block; width: 100%; height: 100%; }
.fig--hero { width: min(48%, 168px); height: 128px; margin: 22px auto 6px; }
.fig--part { width: 100%; height: 44px; margin-bottom: 8px; }
.parts--fig .part { display: grid; justify-items: center; text-align: center; padding: 14px 8px 15px; }
.parts--fig .part span { margin-top: 5px; }

.parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.part { padding: 12px 12px 14px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.part b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--accent-text); }
.part span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; color: var(--paper-86); }

.tipbox { margin-top: 20px; padding: 14px 16px 15px; border-radius: 16px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tipbox .eyebrow { color: var(--accent-text); }
.tipbox p { margin-top: 6px; font-size: 14.5px; line-height: 1.6; color: var(--paper); }

/* parcheggio: prezzo e nota */
.pk-note { margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.pk-total {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line);
  font-size: 14px; color: var(--paper-86); font-variant-numeric: tabular-nums;
}
.pk-total b { font-family: var(--display); font-size: 21px; font-weight: 500; color: var(--paper); font-feature-settings: "tnum" 0; }
.pk-total span { color: var(--muted); margin-left: auto; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.paynote { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.seller { margin-top: 16px; font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); text-align: center; }

.actions { display: grid; gap: 10px; margin-top: 24px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* azione principale: ottone tenue, dato a destra dopo un filetto */
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; height: 56px; padding: 0 20px 0 22px; border-radius: 999px;
  background: var(--brass); color: var(--brass-ink);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  text-align: left;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.cta:active { transform: scale(0.985); }
.cta-main { display: flex; align-items: center; min-width: 0; font-size: 15px; font-weight: 400; }
.cta-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cta-end:empty { display: none; }
.cta-end {
  display: flex; align-items: center; flex: none;
  height: 22px; padding-left: 14px;
  border-left: 1px solid var(--accent-line);
  font-size: 13px; color: var(--accent-text); white-space: nowrap; font-variant-numeric: tabular-nums;
}

.btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 20px; border-radius: 999px;
  background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px; text-align: left; color: var(--paper);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.btn:active { transform: scale(0.985); }
.btn small { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.btn--line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--accent small { color: var(--accent-text); }

/* tappe dell'itinerario e passaggi del manuale */
.stops { margin-top: 22px; }
.stop { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; padding-bottom: 18px; }
.stop-n {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--paper-86);
  background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2);
}
.stop--home .stop-n { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); font-size: 10px; font-weight: 500; }
.stop::after { content: ""; position: absolute; left: 14.5px; top: 34px; bottom: 2px; width: 1px; background: var(--line-2); }
.stop:last-child { padding-bottom: 0; }
.stop:last-child::after { display: none; }
.stop-t { font-size: 15px; line-height: 1.55; padding-top: 3px; color: var(--paper); }
.stop-s { margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.stop-leg { padding-top: 7px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* moduli: una domanda alla volta */
.flow { padding-top: 62px; }
.flow-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.flow-kicker { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.flow-count { font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.flow-bar { display: block; height: 2px; margin-top: 12px; border-radius: 2px; background: var(--line); overflow: hidden; }
.flow-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.5s var(--ease); }
.flow-step { min-height: 40svh; padding: 28px 0 10px; }
.flow-step.in { animation: flowIn 0.45s var(--ease) both; }
@keyframes flowIn { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
.flow-q { font-family: var(--display); font-size: 32px; line-height: 1.06; font-weight: 400; text-wrap: balance; }
.flow-help { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 40ch; }
.flow-body { margin-top: 24px; display: grid; gap: 14px; }
.flow-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick {
  display: inline-flex; align-items: center;
  min-height: 46px; padding: 0 18px; border-radius: 999px;
  font-size: 14.5px; color: var(--paper-86); text-align: left;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.2s var(--ease);
}
.chip-pick[aria-pressed="true"] { background: var(--brass); color: var(--brass-ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.chip-pick:active { transform: scale(0.97); }
.chip-pick em { font-style: normal; font-size: 12.5px; color: var(--muted); margin-left: 8px; }
.chip-pick[aria-pressed="true"] em { color: var(--accent-text); }
.flow-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-input {
  width: 100%; min-height: 58px; padding: 14px 2px; border: 0; border-radius: 0;
  background: none; color: var(--paper);
  font: 400 22px/1.35 var(--font);
  border-bottom: 1px solid var(--line-2);
  -webkit-appearance: none; appearance: none;
}
.flow-input::placeholder { color: var(--faint); }
.flow-input:focus { border-bottom-color: var(--accent); }
textarea.flow-input { resize: vertical; min-height: 96px; }
.flow-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flow-row:has(> :only-child) { grid-template-columns: 1fr; }
.flow-field { display: grid; gap: 7px; }
.flow-field > span { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.flow-field input {
  width: 100%; min-height: 54px; padding: 0 16px; border: 0; border-radius: 14px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--paper);
  font: 400 17px/1.3 var(--font); -webkit-appearance: none; appearance: none;
}
.flow-field input:focus { box-shadow: inset 0 0 0 1px var(--accent-line); }
.flow-field input[type="date"], .flow-field input[type="time"] { position: relative; cursor: pointer; }
.flow-field input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.flow-field input::-webkit-date-and-time-value { text-align: left; }
.flow-field input[type="number"]::-webkit-outer-spin-button, .flow-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.flow-nav { display: grid; gap: 12px; margin-top: 20px; padding-bottom: 6px; }
.preview { padding: 16px 18px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; line-height: 1.65; color: var(--muted); white-space: pre-line; }

/* avviso breve */
.toast {
  position: absolute; left: 50%; z-index: 90;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px);
  max-width: calc(100% - 40px);
  padding: 11px 18px; border-radius: 999px;
  background: var(--glass-2); color: var(--paper);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px var(--chip-line), 0 12px 30px rgba(0, 0, 0, 0.25);
  font-size: 13.5px; font-weight: 400; text-align: center;
  opacity: 0; transform: translate3d(-50%, 14px, 0);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate3d(-50%, 0, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
