:root {
      --brand: #ffd51f;
      --brand-deep: #f3c900;
      --ink: #111214;
      --ink-2: #292b30;
      --muted: #737780;
      --muted-2: #9da2aa;
      --surface: #ffffff;
      --surface-2: #f3f4f6;
      --surface-3: #e8eaed;
      --line: rgba(17, 18, 20, .08);
      --success: #168a55;
      --danger: #d84b4b;
      --shadow-soft: 0 12px 40px rgba(17, 18, 20, .07);
      --shadow-float: 0 12px 36px rgba(17, 18, 20, .17);
      --radius-xl: 28px;
      --radius-lg: 22px;
      --radius-md: 17px;
      --nav-h: 82px;
    }

    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
    html { scroll-behavior: smooth; background: #eef0f2; }
    body {
      margin: 0;
      min-height: 100vh;
      background:
        radial-gradient(circle at 90% 2%, rgba(255, 213, 31, .14), transparent 19rem),
        linear-gradient(180deg, #f8f8f7 0%, #f2f3f5 58%, #eef0f2 100%);
      color: var(--ink);
      font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    button, a { font: inherit; }
    button { color: inherit; }
    svg { display: block; }

    .app {
      width: min(100%, 780px);
      min-height: 100vh;
      margin: 0 auto;
      padding: max(18px, env(safe-area-inset-top)) 16px calc(var(--nav-h) + 36px + env(safe-area-inset-bottom));
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px;
    }

    .brand-shell {
      width: 142px;
      height: 46px;
      padding: 11px 13px;
      border-radius: 16px;
      background: var(--ink);
      display: flex;
      align-items: center;
      box-shadow: 0 8px 26px rgba(17, 18, 20, .14);
    }

    .brand-shell img { width: 100%; height: auto; display: block; }

    .top-actions { display: flex; align-items: center; gap: 8px; }
    .icon-btn, .lang-btn {
      min-width: 44px;
      height: 44px;
      border: 1px solid var(--line);
      border-radius: 15px;
      background: rgba(255,255,255,.82);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 5px 20px rgba(17,18,20,.05);
      cursor: pointer;
    }
    .lang-btn { padding: 0 12px; gap: 7px; font-size: 13px; font-weight: 800; }
    .icon-btn:active, .lang-btn:active { transform: scale(.97); }

    .welcome { margin: 8px 2px 16px; }
    .eyebrow {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .09em;
      text-transform: uppercase;
      margin-bottom: 5px;
    }
    .welcome h1 {
      margin: 0;
      font-size: clamp(27px, 7vw, 36px);
      line-height: 1.08;
      letter-spacing: -.04em;
    }

    .stay-card {
      position: relative;
      overflow: hidden;
      border-radius: var(--radius-xl);
      background: var(--ink);
      color: #fff;
      padding: 22px;
      box-shadow: var(--shadow-float);
      isolation: isolate;
    }
    .stay-card::before {
      content: "";
      position: absolute;
      width: 180px;
      height: 180px;
      right: -75px;
      top: -88px;
      border-radius: 50%;
      background: var(--brand);
      z-index: -2;
    }
    .stay-card::after {
      content: "";
      position: absolute;
      width: 150px;
      height: 150px;
      right: -64px;
      top: -62px;
      border-radius: 50%;
      border: 1px solid rgba(255,255,255,.28);
      z-index: -1;
    }

    .stay-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .stay-card h2 { margin: 7px 0 6px; font-size: 22px; line-height: 1.15; letter-spacing: -.025em; max-width: 75%; }
    .stay-address { color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.45; }
    .status-chip {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 8px 10px;
      border-radius: 999px;
      background: rgba(255,255,255,.1);
      border: 1px solid rgba(255,255,255,.12);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .045em;
      text-transform: uppercase;
      backdrop-filter: blur(12px);
    }
    .status-dot {
      position: relative;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--brand);
      box-shadow: 0 0 0 4px rgba(255,213,31,.12);
      animation: statusDotPulse 1.6s ease-in-out infinite;
    }

    .status-dot::after {
      content: "";
      position: absolute;
      inset: -5px;
      border: 1px solid rgba(255,213,31,.55);
      border-radius: 50%;
      animation: statusDotRing 1.6s ease-out infinite;
    }

    /* Stato pronto: verde e fermo, senza pulsazione. */
    .status-chip.is-ready {
      background: rgba(22,138,85,.22);
      border-color: rgba(95,211,151,.28);
    }

    .status-chip.is-ready .status-dot {
      background: #45d483;
      box-shadow: 0 0 0 4px rgba(69,212,131,.13);
      animation: none;
    }

    .status-chip.is-ready .status-dot::after {
      display: none;
      animation: none;
    }

    @keyframes statusDotPulse {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.25); opacity: .72; }
    }

    @keyframes statusDotRing {
      0% { transform: scale(.55); opacity: .75; }
      70%, 100% { transform: scale(1.55); opacity: 0; }
    }

    @media (prefers-reduced-motion: reduce) {
      .status-dot,
      .status-dot::after { animation: none; }
    }

    .stay-meta {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 20px;
    }
    .meta-box {
      background: rgba(255,255,255,.075);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 16px;
      padding: 12px 13px;
    }
    .meta-label { color: rgba(255,255,255,.56); font-size: 11px; font-weight: 700; margin-bottom: 4px; }
    .meta-value { font-size: 14px; font-weight: 800; }

    .section { margin-top: 22px; }
    .section-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 12px;
      margin: 0 2px 11px;
    }
    .section-title { margin: 0; font-size: 19px; letter-spacing: -.025em; }
    .section-sub { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
    .text-link { border: 0; background: none; color: var(--ink); font-size: 12px; font-weight: 800; padding: 7px 0; cursor: pointer; }

    .checkin-card {
      border-radius: var(--radius-xl);
      background: var(--surface);
      border: 1px solid var(--line);
      padding: 20px;
      box-shadow: var(--shadow-soft);
    }
    .checkin-line { display: flex; align-items: center; gap: 13px; }
    .checkin-icon {
      width: 48px;
      height: 48px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      background: #fff7c8;
      color: var(--ink);
      flex: 0 0 auto;
    }
    .checkin-card h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.02em; }
    .checkin-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

    .primary-btn {
      width: 100%;
      min-height: 54px;
      border: 0;
      border-radius: 17px;
      background: var(--brand);
      color: #111;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      font-weight: 900;
      font-size: 15px;
      cursor: pointer;
      box-shadow: 0 8px 24px rgba(243, 201, 0, .28);
    }
    .primary-btn:active { transform: translateY(1px) scale(.995); }

    .success-card { display: none; border-radius: var(--radius-xl); background: #eaf8f1; border: 1px solid rgba(22,138,85,.13); padding: 18px; }
    .success-card .checkin-icon { background: #d8f2e5; color: var(--success); }
    .success-card h3, .liveness-card h3 { margin: 0 0 4px; font-size: 18px; }
    .success-card p { margin: 0; color: #49705e; font-size: 13px; line-height: 1.45; }

    .liveness-card { display: none; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); padding: 20px; box-shadow: var(--shadow-soft); }
    .liveness-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
    .liveness-card .checkin-icon { background: #eef0f4; }
    .external-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }

    .qr-demo-overlay {
      position: fixed; inset: 0; z-index: 160; display: none; flex-direction: column;
      background: #050505; color: #fff; padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    }
    .qr-demo-overlay.open { display: flex; }
    .qr-demo-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .qr-demo-title { font-size: 16px; font-weight: 850; }
    .qr-close { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.09); color: #fff; display:grid; place-items:center; cursor:pointer; }
    .qr-camera { flex: 1; display: grid; place-items: center; padding: 24px 0; }
    #qr-reader { width: min(92vw, 480px); overflow: hidden; border: 0 !important; border-radius: 24px; background: #111; }
    #qr-reader video { width: 100% !important; height: auto !important; object-fit: cover; }
    #qr-reader img { display: none; }
    .qr-frame { width: min(76vw, 340px); aspect-ratio: 1; border-radius: 28px; position: relative; background: radial-gradient(circle at 40% 30%, #35383d 0%, #17191c 42%, #0b0c0e 100%); overflow: hidden; }
    .qr-frame::before, .qr-frame::after { content:''; position:absolute; inset: 20px; border-radius: 20px; }
    .qr-frame::before { border: 2px solid rgba(255,255,255,.18); }
    .qr-frame::after { top: 49%; bottom: auto; height: 2px; background: var(--brand); box-shadow: 0 0 22px rgba(255,213,31,.8); animation: scanline 2.2s ease-in-out infinite alternate; }
    .qr-corners { position:absolute; inset: 18px; border: 3px solid transparent; border-top-color:#fff; border-left-color:#fff; border-radius:22px; opacity:.94; }
    .qr-corners.second { transform: rotate(180deg); }
    .qr-demo-help { text-align: center; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.5; padding-bottom: 12px; }
    @keyframes scanline { from { transform: translateY(-92px); } to { transform: translateY(92px); } }

    .quick-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }
    .quick {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.9);
      min-height: 106px;
      border-radius: 21px;
      padding: 15px;
      text-align: left;
      cursor: pointer;
      box-shadow: 0 8px 28px rgba(17,18,20,.035);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      transition: transform .18s ease, box-shadow .18s ease;
    }
    .quick:active { transform: scale(.985); }
    .quick-icon {
      width: 38px;
      height: 38px;
      border-radius: 13px;
      display: grid;
      place-items: center;
      background: #f7f0c5;
    }
    .quick:nth-child(2) .quick-icon { background: #edf0f7; }
    .quick:nth-child(3) .quick-icon { background: #f0ece8; }
    .quick:nth-child(4) .quick-icon { background: #e9f5ef; }
    .quick-text {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 5px;
      width: 100%;
      margin-top: 13px;
    }
    .quick-label,
    .quick-hint {
      display: block;
      width: 100%;
      line-height: 1.25;
    }
    .quick-label { margin: 0; font-size: 14px; font-weight: 850; letter-spacing: -.012em; }
    .quick-hint { margin: 0; color: var(--muted); font-size: 11px; }

    .access-panel {
      border-radius: var(--radius-xl);
      border: 1px solid var(--line);
      background: rgba(255,255,255,.9);
      padding: 9px;
      box-shadow: var(--shadow-soft);
    }
    .access-row {
      min-height: 78px;
      border-radius: 19px;
      padding: 12px 12px 12px 13px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .access-row + .access-row { border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
    .access-glyph {
      width: 44px;
      height: 44px;
      border-radius: 15px;
      background: var(--surface-2);
      display: grid;
      place-items: center;
      color: var(--ink-2);
      flex: 0 0 auto;
    }
    .access-copy { min-width: 0; flex: 1; }
    .access-name { font-size: 14px; font-weight: 850; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .access-note { margin-top: 4px; color: var(--muted); font-size: 11px; }
    .door-btn {
      min-width: 68px;
      height: 42px;
      border: 0;
      border-radius: 14px;
      background: var(--surface-3);
      color: var(--muted-2);
      font-weight: 900;
      font-size: 12px;
      cursor: not-allowed;
    }
    .door-btn.enabled { background: var(--brand); color: var(--ink); cursor: pointer; box-shadow: 0 6px 18px rgba(243,201,0,.24); }
    .door-btn.enabled:active { transform: scale(.97); }

    .locked-note {
      display: flex;
      align-items: center;
      gap: 9px;
      margin: 10px 4px 2px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .access-details {
      display: none;
      margin-top: 10px;
      border-radius: 20px;
      overflow: hidden;
      border: 1px solid var(--line);
      background: #fff;
    }
    .detail-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
    .detail-row + .detail-row { border-top: 1px solid var(--line); }
    .detail-label { color: var(--muted); font-size: 12px; }
    .detail-value { font-size: 13px; font-weight: 850; text-align: right; }

    .demo-box {
      margin-top: 22px;
      border: 1px dashed rgba(17,18,20,.18);
      border-radius: 18px;
      padding: 13px;
      background: rgba(255,255,255,.44);
    }
    .demo-title { font-size: 11px; font-weight: 850; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 9px; }
    .segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: rgba(17,18,20,.055); padding: 4px; border-radius: 14px; }
    .segmented button { border: 0; border-radius: 11px; min-height: 38px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
    .segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(17,18,20,.08); }

    .bottom-nav-wrap {
      position: fixed;
      left: 50%;
      bottom: max(12px, env(safe-area-inset-bottom));
      transform: translateX(-50%);
      width: min(calc(100% - 24px), 700px);
      z-index: 30;
      pointer-events: none;
    }
    .bottom-nav {
      min-height: 68px;
      padding: 6px;
      border: 1px solid rgba(255,255,255,.65);
      border-radius: 24px;
      background: rgba(24,25,28,.86);
      box-shadow: 0 18px 50px rgba(17,18,20,.25);
      backdrop-filter: blur(22px) saturate(150%);
      -webkit-backdrop-filter: blur(22px) saturate(150%);
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 2px;
      pointer-events: auto;
    }
    .nav-btn {
      min-height: 56px;
      border: 0;
      border-radius: 18px;
      background: transparent;
      color: rgba(255,255,255,.62);
      display: grid;
      place-items: center;
      align-content: center;
      gap: 3px;
      font-size: 10px;
      font-weight: 750;
      cursor: pointer;
    }
    .nav-btn.active { background: rgba(255,255,255,.11); color: #fff; }
    .nav-btn.active .nav-glyph { color: var(--brand); }
    .nav-glyph { width: 21px; height: 21px; }

    .sheet-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(10,11,13,.42);
      opacity: 0;
      pointer-events: none;
      transition: opacity .2s ease;
      z-index: 90;
    }
    .sheet-backdrop.open { opacity: 1; pointer-events: auto; }
    .sheet {
      position: fixed;
      left: 50%;
      bottom: 0;
      transform: translate(-50%, 104%);
      width: min(100%, 780px);
      background: #fff;
      border-radius: 28px 28px 0 0;
      box-shadow: 0 -20px 70px rgba(17,18,20,.22);
      padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
      transition: transform .28s cubic-bezier(.2,.8,.2,1);
      z-index: 100;
    }
    .sheet.open { transform: translate(-50%, 0); }
    .sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: #d9dadd; margin: 2px auto 15px; }
    .sheet-title { margin: 0; font-size: 22px; letter-spacing: -.03em; }
    .sheet-copy { margin: 8px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
    .sheet-action { width: 100%; min-height: 50px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 850; cursor: pointer; }
    .sheet-action.yellow { background: var(--brand); color: var(--ink); }

    .toast {
      position: fixed;
      left: 50%;
      top: max(16px, env(safe-area-inset-top));
      transform: translate(-50%, -16px);
      opacity: 0;
      z-index: 120;
      min-width: 220px;
      max-width: calc(100% - 36px);
      padding: 12px 14px;
      border-radius: 14px;
      background: rgba(17,18,20,.94);
      color: #fff;
      font-size: 12px;
      font-weight: 750;
      text-align: center;
      box-shadow: 0 12px 30px rgba(0,0,0,.22);
      transition: .22s ease;
      pointer-events: none;
    }
    .toast.show { opacity: 1; transform: translate(-50%, 0); }

    @media (min-width: 700px) {
      .app { padding-left: 24px; padding-right: 24px; }
      .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .quick { min-height: 124px; }
      .stay-card { padding: 26px; }
      .stay-card h2 { font-size: 26px; }
      .checkin-card { padding: 22px; }
      .access-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
      .access-row + .access-row { border-top: 0; border-left: 1px solid var(--line); border-radius: 19px; }
    }


    @media (prefers-reduced-motion: reduce) {
      * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
    }

/* Shared link/button normalization */
a { color: inherit; }
.quick { text-decoration: none; color: inherit; }

/* Come arrivare */
.subpage-app { padding-bottom: calc(var(--nav-h) + 36px + env(safe-area-inset-bottom)); }
.subpage-topbar { margin-bottom: 14px; }
.back-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.88);
  display: grid;
  place-items: center;
  box-shadow: 0 5px 20px rgba(17,18,20,.05);
  text-decoration: none;
}
.page-intro { margin: 8px 2px 18px; }
.page-intro h1 {
  margin: 4px 0 7px;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.03;
  letter-spacing: -.045em;
}
.page-intro p {
  margin: 0;
  max-width: 590px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.arrival-location {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: #fff;
  padding: 22px;
  box-shadow: var(--shadow-float);
}
.arrival-location::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -74px;
  top: -82px;
  border-radius: 50%;
  background: var(--brand);
}
.arrival-location .eyebrow { color: rgba(255,255,255,.48); margin-bottom: 7px; position: relative; z-index: 1; }
.arrival-location h2 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.03em; position: relative; z-index: 1; }
.arrival-address { color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.5; position: relative; z-index: 1; }
.arrival-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; position: relative; z-index: 1; }
.arrival-action {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.arrival-action.primary { background: var(--brand); color: var(--ink); box-shadow: 0 7px 20px rgba(243,201,0,.2); }
.arrival-action.secondary { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.13); }

.map-shell {
  min-height: 235px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: #e9ebee;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.map-surface {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(31deg, transparent 44%, rgba(255,255,255,.82) 45%, rgba(255,255,255,.82) 49%, transparent 50%) 0 0/115px 115px,
    linear-gradient(120deg, transparent 44%, rgba(255,255,255,.62) 45%, rgba(255,255,255,.62) 49%, transparent 50%) 12px 5px/150px 150px,
    linear-gradient(180deg, #eef0f1 0%, #e2e5e8 100%);
}
.map-surface::before,
.map-surface::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
}
.map-surface::before { width: 75%; height: 11px; left: -8%; top: 43%; transform: rotate(-12deg); }
.map-surface::after { width: 62%; height: 8px; right: -4%; top: 63%; transform: rotate(18deg); }
.map-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  pointer-events: none;
}
.map-pin {
  width: 58px;
  height: 58px;
  border-radius: 20px 20px 20px 5px;
  background: var(--brand);
  color: var(--ink);
  display: grid;
  place-items: center;
  transform: rotate(-45deg);
  box-shadow: 0 12px 28px rgba(17,18,20,.22);
}
.map-pin svg { transform: rotate(45deg); }
.map-label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 16px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.map-label strong { display:block; font-size:13px; }
.map-label span { display:block; color:var(--muted); font-size:11px; margin-top:3px; line-height:1.35; }
.map-tag { flex:0 0 auto; padding:7px 9px; border-radius:999px; background:#fff7c8; font-size:10px; font-weight:850; }

.arrival-info-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.arrival-info-card {
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255,255,255,.9);
  padding: 16px;
  box-shadow: 0 8px 28px rgba(17,18,20,.035);
}
.arrival-info-head { display: flex; align-items: center; gap: 12px; }
.arrival-info-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f7f0c5;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.arrival-info-card:nth-child(2) .arrival-info-icon { background: #edf0f7; }
.arrival-info-card h3 { margin: 0 0 3px; font-size: 15px; letter-spacing: -.02em; }
.arrival-info-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.placeholder-note { margin-top: 12px; padding: 10px 11px; border-radius: 13px; background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.45; }

.arrival-steps {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.9);
  padding: 8px;
  box-shadow: var(--shadow-soft);
}
.arrival-step { display: grid; grid-template-columns: 38px 1fr; gap: 11px; padding: 14px 12px; align-items: start; }
.arrival-step + .arrival-step { border-top: 1px solid var(--line); }
.step-num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}
.arrival-step h3 { margin: 1px 0 4px; font-size: 14px; }
.arrival-step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.arrival-help {
  border-radius: var(--radius-xl);
  background: #fff7c8;
  border: 1px solid rgba(243,201,0,.2);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.arrival-help h3 { margin: 0 0 4px; font-size: 16px; }
.arrival-help p { margin: 0; color: #6f642a; font-size: 12px; line-height: 1.45; }
.help-button {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

@media (min-width: 700px) {
  .arrival-info-grid { grid-template-columns: 1fr 1fr; }
  .map-shell { min-height: 290px; }
}


/* Blocco testo semplice configurato dall'host.
   Il contenuto mantiene solo gli a-capo: font, colori e spaziatura restano controllati dall'app. */
.host-directions-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.94);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.host-directions-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}
.host-directions-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff7c8;
  color: var(--ink);
  flex: 0 0 auto;
}
.host-directions-text {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

@media (min-width: 700px) {
  .host-directions-card { padding: 22px; }
  .host-directions-text { font-size: 15px; line-height: 1.75; }
}


/* Assistenza */
.support-host-card {
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: #fff;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-float);
}
.support-host-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--brand);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.support-host-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.support-host-label {
  color: rgba(255,255,255,.5);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.support-host-copy strong {
  font-size: 18px;
  letter-spacing: -.025em;
}
.support-host-copy > span:last-child {
  color: rgba(255,255,255,.65);
  font-size: 12px;
  line-height: 1.4;
}
.support-list {
  display: grid;
  gap: 10px;
}
.support-channel {
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  text-decoration: none;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 30px;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 28px rgba(17,18,20,.035);
  transition: transform .18s ease, box-shadow .18s ease;
}
.support-channel:active { transform: scale(.988); }
.support-channel-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: #f7f0c5;
  display: grid;
  place-items: center;
}
.support-channel-whatsapp { background: #e9f5ef; }
.support-channel-email { background: #edf0f7; }
.support-channel-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.support-channel-copy strong {
  font-size: 15px;
  letter-spacing: -.015em;
}
.support-channel-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.support-channel-arrow {
  color: var(--muted-2);
  display: grid;
  place-items: center;
}
.support-note {
  border-radius: 19px;
  padding: 14px 15px;
  background: rgba(255,255,255,.66);
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.support-note-icon {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.support-note p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (min-width: 700px) {
  .support-host-card { padding: 22px; }
  .support-list { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .support-channel {
    min-height: 152px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: start;
  }
  .support-channel-arrow { justify-self: end; }
}


/* Assistenza - layout ordinato a scheda unica */
.support-intro { max-width: 610px; margin-bottom: 20px; }
.support-contact-card {
  width: 100%;
  max-width: 610px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.94);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.support-contact-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 2px 2px 16px;
}
.support-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.support-contact-identity { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.support-contact-identity span { color: var(--muted); font-size: 11px; font-weight: 750; }
.support-contact-identity strong { font-size: 20px; letter-spacing: -.025em; }
.support-contact-divider { height: 1px; background: var(--line); margin: 0 0 12px; }
.support-contact-actions { display: grid; gap: 9px; }
.support-action {
  min-height: 66px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 24px;
  gap: 11px;
  align-items: center;
  transition: transform .16s ease, background .16s ease;
}
.support-action:active { transform: scale(.99); }
.support-action-primary { background: var(--brand); border-color: rgba(243,201,0,.38); }
.support-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
}
.support-action:not(.support-action-primary) .support-action-icon { background: var(--surface); }
.support-action-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.support-action-copy strong { font-size: 14px; letter-spacing: -.01em; }
.support-action-copy small { color: var(--muted); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.support-action-primary .support-action-copy small { color: rgba(17,18,20,.64); }
.support-action-arrow { color: var(--muted-2); display: grid; place-items: center; }
.support-action-primary .support-action-arrow { color: var(--ink); }
.support-footnote {
  max-width: 560px;
  margin: 14px auto 0;
  padding: 0 12px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
@media (min-width: 700px) {
  .support-contact-card { padding: 22px; }
  .support-contact-actions { gap: 10px; }
  .support-action { min-height: 70px; }
}

/* Assistenza - tre canali affiancati + soluzioni rapide */
.nav-btn { text-decoration: none; }

.support-contact-card-grid { max-width: 610px; }
.support-contact-actions-horizontal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.support-tile {
  min-width: 0;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  padding: 13px 8px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 5px;
  transition: transform .16s ease, background .16s ease;
}
.support-tile:active { transform: scale(.985); }
.support-tile-whatsapp {
  background: var(--brand);
  border-color: rgba(243,201,0,.4);
}
.support-tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
}
.support-tile:not(.support-tile-whatsapp) .support-tile-icon { background: var(--surface); }
.support-tile strong {
  display: block;
  width: 100%;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.support-tile small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}
.support-tile-whatsapp small { color: rgba(17,18,20,.64); }

.support-help-section {
  width: 100%;
  max-width: 610px;
  margin: 22px auto 0;
}
.support-help-head { margin-bottom: 11px; }
.support-help-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-soft);
}
.support-help-link {
  min-height: 78px;
  color: var(--ink);
  text-decoration: none;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 22px;
  align-items: center;
  gap: 12px;
  transition: background .16s ease;
}
.support-help-link + .support-help-link { border-top: 1px solid var(--line); }
.support-help-link:active { background: var(--surface-2); }
.support-help-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: #fff7c8;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.support-help-link:nth-child(2) .support-help-icon { background: #edf0f7; }
.support-help-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.support-help-copy strong { font-size: 14px; letter-spacing: -.012em; }
.support-help-copy small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.support-help-arrow { color: var(--muted-2); display: grid; place-items: center; }

@media (max-width: 380px) {
  .support-contact-actions-horizontal { gap: 7px; }
  .support-tile { min-height: 108px; padding-left: 5px; padding-right: 5px; }
  .support-tile-icon { width: 39px; height: 39px; }
  .support-tile strong { font-size: 11px; }
}

@media (min-width: 700px) {
  .support-tile { min-height: 126px; }
  .support-tile strong { font-size: 13px; }
  .support-help-link { min-height: 82px; padding-left: 18px; padding-right: 18px; }
}


/* Smart stay widgets - aggiunta non invasiva alla Home */
.smart-stay {
  margin-top: 18px;
  width: 100%;
}
.smart-stay-head {
  min-height: 24px;
  margin: 0 2px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.smart-stay-head .eyebrow { margin: 0; }
.smart-swipe {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.smart-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82%, 1fr);
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  padding: 1px 1px 7px;
}
.smart-carousel::-webkit-scrollbar { display: none; }
.smart-card {
  scroll-snap-align: start;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 9px 28px rgba(17,18,20,.045);
  padding: 17px;
  display: flex;
  flex-direction: column;
}
.smart-card-now {
  background: linear-gradient(145deg, #fffdf0 0%, rgba(255,255,255,.96) 58%);
  border-color: rgba(243,201,0,.23);
}
.smart-card-top {
  min-height: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.smart-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff3ad;
  color: var(--ink);
}
.smart-card-icon.neutral { background: #edf0f7; }
.smart-card-icon.soft { background: #edf5ef; }
.smart-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.smart-title {
  display: block;
  font-size: 18px;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.smart-copy {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.48;
}
.smart-live {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff6c5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
}
.smart-live > span {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-deep);
  animation: statusDotPulse 1.6s ease-in-out infinite;
}
.smart-live > span::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(243,201,0,.5);
  border-radius: 50%;
  animation: statusDotRing 1.6s ease-out infinite;
}
.smart-live b { font-size: 9px; letter-spacing: .035em; text-transform: uppercase; }
.smart-live.is-ready { background: rgba(22,138,85,.10); color: var(--success); }
.smart-live.is-ready > span { background: #45d483; animation: none; }
.smart-live.is-ready > span::after { display: none; }
.smart-mini-pill {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.smart-progress {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
  margin-top: auto;
}
.smart-progress span {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-deep);
}
.nearby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 13px;
}
.nearby-actions a {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
}
.nearby-actions a:active { background: var(--surface-3); }

/* Dettagli accessi / PIN manuale */
.access-details {
  padding: 16px;
  overflow: visible;
}
.access-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 1px 13px;
}
.access-details-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.access-details-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.access-details-head strong { font-size: 16px; letter-spacing: -.02em; }
.manual-badge {
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff5bd;
  display: inline-flex;
  align-items: center;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.pin-panel {
  border-radius: 19px;
  background: var(--ink);
  color: #fff;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.pin-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.pin-copy > span { color: rgba(255,255,255,.52); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.pin-copy > strong { margin: 3px 0 4px; font-size: 29px; line-height: 1; letter-spacing: .12em; }
.pin-copy > small { max-width: 390px; color: rgba(255,255,255,.6); font-size: 10px; line-height: 1.35; }
.pin-copy-btn {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 43px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.pin-copy-btn:active { transform: scale(.975); }
.access-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 9px;
}
.access-detail-item {
  min-height: 58px;
  border-radius: 16px;
  background: var(--surface-2);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.access-detail-item span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.access-detail-item strong { font-size: 12px; line-height: 1.35; }

@media (min-width: 700px) {
  .smart-swipe { display: none; }
  .smart-carousel {
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }
  .smart-card { min-height: 205px; }
  .access-detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 370px) {
  .smart-carousel { grid-auto-columns: 88%; }
  .smart-card { min-height: 196px; }
  .pin-panel { align-items: stretch; flex-direction: column; }
  .pin-copy-btn { width: 100%; }
}


/* Widget meteo + utilita Home */
.home-widgets { margin-top: 18px; }
.smart-carousel-two { grid-auto-columns: minmax(86%, 1fr); }
.weather-card {
  background: linear-gradient(145deg, #fffdf1 0%, rgba(255,255,255,.97) 62%);
  border-color: rgba(243,201,0,.22);
}
.weather-icon { background: #fff1a5; }
.weather-place {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.weather-title { font-size: 25px; }
.weather-range {
  margin-top: auto;
  padding-top: 13px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
}
.weather-credit {
  margin-top: 5px;
  color: var(--muted-2);
  text-decoration: none;
  font-size: 8px;
  font-weight: 700;
}

/* Dettagli accessi piu visibili ma discreti */
.access-details-trigger {
  padding: 8px 12px;
  border: 1px solid rgba(243,201,0,.34);
  border-radius: 999px;
  background: #fff9d8;
  box-shadow: 0 5px 14px rgba(17,18,20,.035);
  transition: background .16s ease, transform .16s ease;
}
.access-details-trigger:active { transform: scale(.97); background: #fff4bd; }
.extra-access-row {
  min-height: 72px;
  margin-bottom: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 11px;
}
.pin-panel-consult { padding-right: 18px; }

/* Accessi disponibili solo quando lo stato e Pronto */
[data-access-nav].is-disabled {
  opacity: .38;
  cursor: not-allowed;
}
.bottom-nav [data-access-nav].is-disabled { color: rgba(255,255,255,.42); }

/* Pagina Accessi */
.access-page-status {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(22,138,85,.09);
  color: var(--success);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.access-page-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45d483;
}
.access-page-section { margin-top: 24px; }
.access-page-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  padding: 8px;
  box-shadow: var(--shadow-soft);
}
.access-page-panel .access-row + .access-row {
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.access-manual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.access-manual-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.access-manual-card.dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.access-manual-card .access-manual-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .075em;
}
.access-manual-card.dark .access-manual-label { color: rgba(255,255,255,.5); }
.access-page-pin {
  display: block;
  margin: 8px 0 10px;
  font-size: 35px;
  line-height: 1;
  letter-spacing: .13em;
}
.access-manual-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.access-manual-card.dark p { color: rgba(255,255,255,.58); }
.bussata-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bussata-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff4b8;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.bussata-text {
  display: block;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.access-validity-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

@media (min-width: 700px) {
  .smart-carousel-two {
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }
  .access-manual-grid { grid-template-columns: 1fr 1fr; }
}


/* Personalizzazione widget Home */
.widget-controls-row {
  min-height: 30px;
  margin: 0 2px 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.widget-controls-label {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.widget-manage-btn {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(17,18,20,.035);
}
.widget-manage-btn:active { transform: scale(.97); background: #fff; }
.smart-card[hidden] { display: none !important; }
.smart-carousel.all-widgets-hidden { display: none; }
.widget-pref-backdrop {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(17,18,20,.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.widget-pref-backdrop.open { opacity: 1; pointer-events: auto; }
.widget-pref-sheet {
  position: fixed;
  z-index: 131;
  left: 50%;
  bottom: 0;
  width: min(520px, 100%);
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #fff;
  box-shadow: 0 -18px 60px rgba(17,18,20,.18);
  transform: translate(-50%, 105%);
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
.widget-pref-sheet.open { transform: translate(-50%, 0); }
.widget-pref-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 7px;
}
.widget-pref-head h2 { margin: 3px 0 0; font-size: 23px; letter-spacing: -.035em; }
.widget-pref-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.widget-pref-copy { margin: 8px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.widget-pref-row {
  position: relative;
  min-height: 68px;
  padding: 11px 2px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.widget-pref-row > span { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.widget-pref-row strong { font-size: 13px; }
.widget-pref-row small { color: var(--muted); font-size: 10px; }
.widget-pref-row input { position: absolute; opacity: 0; pointer-events: none; }
.widget-switch {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-3);
  transition: background .18s ease;
  flex: 0 0 auto;
}
.widget-switch::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(17,18,20,.18);
  transition: transform .18s ease;
}
.widget-pref-row input:checked + .widget-switch { background: var(--brand); }
.widget-pref-row input:checked + .widget-switch::after { transform: translateX(18px); }

/* Scelta Apri / Chiudi per le porte */
.door-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}
.door-action-grid[hidden] { display: none !important; }
.door-choice {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.door-choice.open { background: var(--brand); color: var(--ink); }
.door-choice.close { background: var(--ink); color: #fff; }
.door-choice:active { transform: scale(.975); }

.smart-carousel-two.one-widget-visible { grid-auto-columns: 100%; }
@media (min-width: 700px) {
  .smart-carousel-two.one-widget-visible { grid-template-columns: minmax(0, 1fr); }
}
