
  :root {
    --emerald: #007A3D;
    --emerald-dark: #006B36;
    --emerald-light: #e7f3eb;
    --gold: #C62828;
    --gold-light: #fdecec;
    --gold-soft: #e8b8b8;
    --beige: #ffffff;
    --beige-dark: #e8eee9;
    --text-dark: #18231c;
    --text-mid: #46534a;
    --text-light: #626e65;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(44,36,22,0.06);
    --shadow-md: 0 4px 16px rgba(44,36,22,0.08);
    --shadow-lg: 0 8px 32px rgba(44,36,22,0.12);
    --shadow-xl: 0 16px 48px rgba(44,36,22,0.16);
    --r: 12px;
    --r-lg: 20px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--beige);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
  }

  /* ===== HERO ===== */
  .hero {
    background: linear-gradient(115deg, rgba(0,67,34,.90) 0%, rgba(12,48,31,.78) 52%, rgba(112,20,31,.78) 100%), url("/assets/andiamo-a-italia-cover.png") center 56% / cover no-repeat;
    padding: 56px 20px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .hero::before {
    content: ''; position: absolute; inset: -50%;
    background: radial-gradient(circle at 25% 40%, rgba(0,140,69,0.20) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255,255,255,0.10) 0%, transparent 40%),
                radial-gradient(circle at 85% 40%, rgba(198,40,40,0.16) 0%, transparent 48%);
    animation: shimmer 12s ease-in-out infinite alternate;
  }
  @keyframes shimmer { 0% { transform: translate(0,0); } 100% { transform: translate(-2%,-1%); } }
  .hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
  .hero-emoji { font-size: 44px; margin-bottom: 10px; display: block; animation: float 3s ease-in-out infinite; }
  @keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
  .hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    color: var(--white);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
  }
  .hero-sub { color: rgba(255,255,255,0.8); font-size: 0.95rem; font-weight: 300; }
  .hero-divider { width: 72px; height: 4px; background: linear-gradient(90deg, var(--emerald) 0 33.3%, #fff 33.3% 66.6%, var(--gold) 66.6%); margin: 16px auto 0; border-radius: 2px; }

  /* ===== NAV PILLS ===== */
  .nav-pills {
    max-width: 1100px;
    margin: -18px auto 0;
    padding: 0 16px;
    position: relative;
    z-index: 2;
  }
  .nav-inner {
    background: var(--white);
    border-radius: var(--r);
    padding: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
  .nav-pill {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 6px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-mid);
    background: var(--beige);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
  }
  @media (hover: hover) {
    .nav-pill:hover, .nav-pill.is-selected:hover {
      background: #b9e7c9;
      color: var(--emerald-dark);
    }
  }
  .nav-pill:focus-visible {
    background: #b9e7c9;
    color: var(--emerald-dark);
    outline: 2px solid var(--emerald-dark);
    outline-offset: 2px;
  }
  .nav-pill.is-selected {
    background: var(--emerald);
    color: var(--white);
  }
  .nav-pill.accent {
    background: var(--gold-light);
    color: #7a121a;
    border: 1px solid var(--gold-soft);
  }
  .nav-pill.accent:active { background: var(--gold); color: var(--white); }

  /* ===== DESKTOP TABLE ===== */
  .table-section { max-width: 1100px; margin: 28px auto; padding: 0 16px; }
  .table-wrapper { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 960px; }
  th:nth-child(1), td:nth-child(1) { width: 74px; }
  th:nth-child(2), td:nth-child(2) { width: 390px; }
  th:nth-child(3), td:nth-child(3) { width: 160px; }
  th:nth-child(4), td:nth-child(4) { width: 140px; }
  th:nth-child(5), td:nth-child(5) { width: 160px; }
  thead th {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    color: var(--white); font-weight: 600; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 14px 12px; text-align: left; white-space: nowrap;
  }
  tbody tr { border-bottom: 1px solid #eee8dd; transition: background 0.15s; }
  tbody tr:last-child { border-bottom: none; }
  tbody tr:hover { background: var(--emerald-light); }
  tbody tr:nth-child(even) { background: rgba(250,246,239,0.5); }
  tbody tr:nth-child(even):hover { background: var(--emerald-light); }
  td { padding: 12px; font-size: 0.85rem; vertical-align: top; line-height: 1.5; }
  .date-cell { font-weight: 700; white-space: normal; color: var(--emerald-dark); }
  .date-day { display: block; white-space: normal; overflow-wrap: anywhere; font-size: 0.68rem; font-weight: 500; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.04em; }
  .activity-link { color: var(--text-dark); text-decoration: none; border-bottom: 1.5px solid transparent; transition: all 0.2s; }
  .activity-link:hover { color: var(--emerald); border-bottom-color: var(--emerald); }
  .event-line { display: block; margin-bottom: 6px; }
  .event-line:last-child { margin-bottom: 0; }

  .rb {
    display: inline-flex; align-items: center; gap: 3px;
    background: var(--gold-light); color: #7a121a;
    font-size: 0.7rem; font-weight: 600;
    padding: 4px 10px; border-radius: 20px;
    cursor: pointer; border: 1px solid var(--gold-soft);
    white-space: nowrap; margin-left: 4px;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s;
  }
  .rb:active { background: var(--gold); color: var(--white); transform: scale(0.96); }
  .weather-cell { white-space: normal; overflow-wrap: anywhere; font-size: 0.76rem; }
  .weather-forecast + .weather-forecast { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--beige-dark); }
  .weather-line { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
  .weather-place { min-width: 0; font-weight: 600; }
  .weather-temps { flex: 0 0 auto; font-weight: 700; color: var(--emerald-dark); white-space: nowrap; }
  .weather-condition { display: block; color: var(--text-mid); font-size: 0.72rem; line-height: 1.3; }
  .tips-cell { font-size: 0.78rem; color: var(--text-mid); font-style: italic; max-width: 170px; }
  .address-cell { font-size: 0.76rem; color: var(--text-light); max-width: 170px; }
  .address-cell a { color: var(--text-light); text-decoration: none; border-bottom: 1px dashed var(--text-light); }

  /* ===== MOBILE CARDS (replaces table on small screens) ===== */
  .mobile-cards { display: none; padding: 0 16px; max-width: 600px; margin: 24px auto; }

  .day-card {
    background: var(--white);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    overflow: hidden;
    border-left: 4px solid var(--emerald);
  }
  .day-card-header {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    color: var(--white);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }
  .day-card-date {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    flex: 0 0 37%;
  }
  .day-card-weather {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 0.72rem;
    line-height: 1.2;
  }
  .day-card-weather .weather-forecast + .weather-forecast { margin-top: 4px; padding-top: 3px; }
  .day-card-weather .weather-place { overflow-wrap: anywhere; }
  .day-card-weather .weather-temps { color: var(--white); }
  .day-card-weather .weather-condition { color: rgba(255,255,255,.92); font-size: 0.67rem; line-height: 1.15; }

  .day-card-body { padding: 0; }

  .day-slot {
    padding: 14px 16px;
    border-bottom: 1px solid var(--beige-dark);
    display: flex;
    gap: 12px;
    align-items: flex-start;
  }
  .day-slot:last-child { border-bottom: none; }

  .slot-content { flex: 1; min-width: 0; }
  .slot-text { font-size: 0.88rem; color: var(--text-dark); line-height: 1.5; }
  .slot-text a { color: var(--emerald-dark); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--emerald-light); }
  .slot-text a:active { color: var(--emerald); }

  .slot-address {
    font-size: 0.76rem; color: var(--text-light); margin-top: 4px;
  }
  .slot-address a {
    color: var(--emerald); text-decoration: none; font-weight: 500;
    display: inline-flex; align-items: center; gap: 3px;
    padding: 4px 0;
  }
  .slot-tip {
    font-size: 0.76rem; color: var(--text-mid); font-style: italic; margin-top: 4px;
    background: var(--beige); padding: 6px 10px; border-radius: 6px;
  }

  .mobile-rb {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--gold-light); color: #7a121a;
    font-size: 0.75rem; font-weight: 600;
    padding: 6px 14px; border-radius: 20px;
    border: 1px solid var(--gold-soft);
    margin-top: 8px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
  }
  .mobile-rb:active { background: var(--gold); color: var(--white); }
  .mobile-attachment { margin: 8px 0 0 4px; }
  .mobile-attachment:active, .attachment-link:active { background: #ffe4e6; }

  /* ===== RESERVATIONS ===== */
  .reservations-section { max-width: 1100px; margin: 0 auto 48px; padding: 0 16px; }
  .reservations-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem; color: var(--emerald-dark);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
  }
  .reservations-title::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--gold-soft), transparent); }
  .res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .res-card {
    background: var(--white); border-radius: var(--r); padding: 18px;
    box-shadow: var(--shadow-sm); border-left: 4px solid var(--gold);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s;
  }
  .res-card:active { transform: scale(0.98); }
  .res-card-date { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); font-weight: 600; margin-bottom: 3px; }
  .res-card-name { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; color: var(--emerald-dark); margin-bottom: 5px; }
  .res-card-detail { font-size: 0.8rem; color: var(--text-mid); line-height: 1.5; }
  .res-card-ref { font-size: 0.7rem; color: var(--text-light); margin-top: 5px; font-family: monospace; }
  .res-card-status { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 0.72rem; font-weight: 600; color: var(--emerald); background: var(--emerald-light); padding: 4px 10px; border-radius: 20px; }

  /* ===== MODAL ===== */
  .modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(20,30,25,0.55);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    justify-content: center; align-items: flex-end;
    padding: 0;
  }
  .modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  .modal-box {
    background: var(--white);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-width: 560px; width: 100%;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16,1,0.3,1);
    max-height: calc(92vh - var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

  .modal-handle {
    width: 36px; height: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
    margin: 10px auto 0;
  }
  .modal-header {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    padding: 20px 20px 18px; color: var(--white); position: relative;
  }
  .modal-header h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 600; padding-right: 36px; }
  .modal-header p { font-size: 0.82rem; opacity: 0.85; margin-top: 3px; }
  .modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.15); color: white; font-size: 1.15rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }
  .modal-close:active { background: rgba(255,255,255,0.35); }

  .modal-body { padding: 20px; }
  .modal-row {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 0; border-bottom: 1px solid var(--beige-dark); font-size: 0.88rem;
  }
  .modal-row:last-child { border-bottom: none; }
  .modal-label { color: var(--text-light); font-weight: 500; font-size: 0.75rem; }
  .modal-value { color: var(--text-dark); font-weight: 600; }
  .modal-status-confirmed { color: var(--emerald); font-weight: 700; }

  .modal-footer { padding: 0 20px 24px; padding-bottom: calc(24px + var(--safe-bottom)); }
  .modal-note { font-size: 0.8rem; color: var(--text-mid); background: var(--beige); padding: 14px 16px; border-radius: var(--r); line-height: 1.6; }
  .modal-note strong { color: var(--text-dark); }
  .modal-warning { font-size: 0.8rem; color: #7a121a; background: #fff0f0; border: 1px solid #e8b8b8; padding: 12px 16px; border-radius: var(--r); margin-top: 10px; line-height: 1.5; }
  .modal-promo { font-size: 0.84rem; color: #1a6a3a; background: #e8f8ee; border: 1px solid #a0d8b0; padding: 12px 16px; border-radius: var(--r); margin-top: 10px; line-height: 1.5; font-weight: 500; }

  footer { text-align: center; padding: 28px 16px 36px; font-size: 0.78rem; color: var(--text-light); }
  footer .heart { color: var(--gold); }

  /* ===== DESKTOP: center modal, show table, hide cards ===== */
  @media (min-width: 769px) {
    .mobile-cards { display: none !important; }
    .table-section { display: block !important; }
    .modal-overlay { align-items: center; padding: 20px; }
    .modal-box { border-radius: var(--r-lg); max-height: 85vh; }
    .modal-handle { display: none; }
    .modal-body { padding: 24px 28px; }
    .modal-footer { padding: 0 28px 28px; }
    .modal-row { flex-direction: row; justify-content: space-between; gap: 12px; }
    .modal-label { min-width: 110px; white-space: nowrap; }
    .modal-value { text-align: right; }
  }

  /* ===== MOBILE: hide table, show cards ===== */
  @media (max-width: 768px) {
    .table-section { display: none !important; }
    .mobile-cards { display: block !important; }
    .hero {
    background-image: linear-gradient(115deg, rgba(0,67,34,.90) 0%, rgba(12,48,31,.78) 52%, rgba(112,20,31,.78) 100%), url("/assets/andiamo-a-italia-cover.png");
    background-size: cover; background-position: center 56%; padding: 18px 16px 14px; }
    .hero-emoji { font-size: 24px; line-height: 1; margin-bottom: 0; }
    .hero h1 { font-size: 1.35rem; line-height: 1.2; margin-bottom: 2px; }
    .hero-sub { font-size: 0.76rem; line-height: 1.25; }
    .hero-divider { height: 3px; margin-top: 5px; }
    .res-grid { grid-template-columns: 1fr; }
    .reservations-section { margin-bottom: 32px; }
  }

  /* Extra small phones */
  @media (max-width: 380px) {
    .hero h1 { font-size: 1.3rem; }
    .day-card-date { font-size: 1rem; }
    .slot-text { font-size: 0.84rem; }
  }

  /* ===== ENHANCED MOBILE (iPhone optimizations) ===== */
  @media (max-width: 768px) {
    /* Sticky nav on mobile */
    .nav-pills {
      position: sticky;
      top: 0;
      z-index: 50;
      margin-top: 0;
      padding: 0;
    }
    .nav-inner {
      border-radius: 0;
      padding: 8px 12px;
      gap: 4px;
      overflow: visible;
      flex-wrap: wrap;
      justify-content: center;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .nav-inner::-webkit-scrollbar { display: none; }
    .nav-pill {
      min-width: fit-content;
      padding: 10px 12px;
      font-size: 0.82rem;
      min-height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Better day cards */
    .day-card {
      margin-bottom: 12px;
      border-radius: 16px;
      border-left: none;
      border-top: 4px solid var(--emerald);
      box-shadow: var(--shadow-md);
    }
    .day-card-header {
      padding: 11px 12px;
      border-radius: 12px 12px 0 0;
    }
    .day-card-weather { line-height: 1.1; }
    .day-card-weather .weather-forecast + .weather-forecast { margin-top: 2px; padding-top: 2px; }
    .day-card-weather .weather-condition { line-height: 1.08; }
    .day-slot {
      padding: 14px 16px;
      min-height: 44px;
    }
    .mobile-rb {
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      padding: 8px 16px;
      font-size: 0.8rem;
    }

    /* Better reservation cards */
    .res-card {
      padding: 16px;
      border-radius: 14px;
      border-left: none;
      border-top: 3px solid var(--gold);
      min-height: 44px;
    }

    /* Modal improvements for iPhone */
    .modal-box {
      max-height: calc(90vh - var(--safe-bottom));
      border-radius: 20px 20px 0 0;
    }
    .modal-header { padding: 20px 16px 16px; }
    .modal-body { padding: 16px; }
    .modal-row { padding: 12px 0; }
    .modal-close {
      width: 40px;
      height: 40px;
      font-size: 1.2rem;
    }

    /* Footer spacing for chat FAB */
    footer { padding-bottom: 90px; }
  }

  /* ===== AI CHAT STYLES ===== */
  .ai-fab {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(26,122,90,0.4), 0 0 0 0 rgba(26,122,90,0.3);
    font-size: 24px;
    cursor: pointer;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    animation: fab-pulse 3s ease-in-out infinite;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .ai-fab:active { transform: scale(0.92); }
  @keyframes fab-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(26,122,90,0.4), 0 0 0 0 rgba(26,122,90,0.3); }
    50% { box-shadow: 0 4px 20px rgba(26,122,90,0.4), 0 0 0 8px rgba(26,122,90,0); }
  }
  .ai-fab.has-chat { animation: none; }

  /* Chat overlay - full screen on mobile */
  .chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 950;
    background: rgba(20,30,25,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .chat-overlay.active { display: flex; align-items: flex-end; justify-content: center; animation: fadeIn 0.2s ease; }

  .chat-panel {
    width: 100%;
    max-width: 480px;
    height: 85vh;
    max-height: 700px;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.35s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
  }

  .chat-handle {
    width: 36px;
    height: 4px;
    background: rgba(0,0,0,0.12);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  .chat-header {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    color: white;
    padding: 14px 16px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }
  .chat-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
  }
  .chat-header-info { flex: 1; min-width: 0; }
  .chat-header-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
  }
  .chat-header-sub { font-size: 0.75rem; opacity: 0.8; margin-top: 1px; }
  .chat-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }
  .chat-close:active { background: rgba(255,255,255,0.3); }

  .chat-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    background: var(--beige);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.55;
    word-break: break-word;
    animation: bubbleIn 0.25s cubic-bezier(0.16,1,0.3,1);
  }
  @keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

  .chat-bubble.bot {
    align-self: flex-start;
    background: var(--white);
    color: var(--text-dark);
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }
  .chat-bubble.user {
    align-self: flex-end;
    background: var(--emerald);
    color: white;
    border-bottom-right-radius: 6px;
  }

  .chat-bubble.typing {
    align-self: flex-start;
    background: var(--white);
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    gap: 4px;
    padding: 14px 20px;
  }
  .chat-bubble.typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-light);
    animation: typingDot 1.2s ease-in-out infinite;
  }
  .chat-bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
  .chat-bubble.typing span:nth-child(3) { animation-delay: 0.3s; }
  @keyframes typingDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

  /* Quick action chips */
  .chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 8px;
    background: var(--beige);
  }
  .chat-chip {
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--beige-dark);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--emerald-dark);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    font-family: inherit;
    min-height: 36px;
    display: flex;
    align-items: center;
    transition: all 0.15s;
  }
  .chat-chip:active { background: var(--emerald-light); border-color: var(--emerald); }

  .chat-input-area {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--beige-dark);
    background: var(--white);
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
  }
  .chat-input {
    flex: 1;
    padding: 11px 16px;
    border: 1.5px solid var(--beige-dark);
    border-radius: 22px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    background: var(--beige);
    color: var(--text-dark);
    min-height: 44px;
    max-height: 100px;
    resize: none;
    line-height: 1.4;
    transition: border-color 0.2s;
  }
  .chat-input:focus { border-color: var(--emerald); background: var(--white); }
  .chat-input::placeholder { color: var(--text-light); }

  .chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--emerald);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, transform 0.1s;
  }
  .chat-send:active { transform: scale(0.9); background: var(--emerald-dark); }
  .chat-send:disabled { background: var(--beige-dark); cursor: default; }
  .chat-send svg { width: 20px; height: 20px; }

  /* Sync indicator */
  .sync-dot {
    position: fixed;
    top: calc(12px + var(--safe-top));
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald);
    z-index: 100;
    opacity: 0.7;
    transition: background 0.3s;
  }
  .sync-dot.offline { background: #dc3545; }

  @media (min-width: 769px) {
    .ai-fab { bottom: 28px; right: 28px; }
    .chat-panel {
      border-radius: 20px;
      height: 75vh;
      margin-bottom: 20px;
    }
    .chat-handle { display: none; }
  }

/* Palette and canonical itinerary data are adapted for Italy. */
.rb, .mobile-rb, .nav-pill, .modal-close, .chat-close, .chat-send, .ai-fab { min-height: 44px; }
.rb, .mobile-rb { align-items:center; }
.attachment-link, .mobile-attachment {
  display:inline-flex; align-items:center; justify-content:center; gap:4px;
  min-height:44px; padding:6px 14px; border:1px solid var(--gold-soft); border-radius:20px;
  background:var(--gold-light); color:#7a121a; font-size:.75rem; font-weight:600;
  line-height:1.1; text-decoration:none; white-space:nowrap; cursor:pointer;
  -webkit-tap-highlight-color:transparent; transition:background-color .16s ease, border-color .16s ease;
}
.attachment-link:hover, .mobile-attachment:hover { border-color:var(--gold); background:#fbdcdc; }
.attachment-link:focus-visible, .mobile-attachment:focus-visible { outline:3px solid var(--gold); outline-offset:2px; }
.attachment-ticket-icon { font-size:1rem; line-height:1; }
.modal-attachment { margin-top:8px; }
.ai-fab { background:var(--emerald); }
.route-rules { max-width:1100px; margin:22px auto; padding:0 16px; }
.route-rules details { background:#fff; border-radius:var(--r); box-shadow:var(--shadow-sm); }
.route-rules summary { cursor:pointer; padding:14px 18px; font-weight:700; color:var(--emerald-dark); }
.route-rules ol { padding:0 28px 18px 42px; }
.route-rules li { padding:3px 0; }
.day-image { display:block; width:100%; height:180px; object-fit:cover; }
.day-card-image { width:100%; height:150px; object-fit:cover; display:block; }
.res-card { cursor:pointer; }
.res-card:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline:3px solid #C4A35A; outline-offset:2px; }
.modal-overlay, .chat-overlay { z-index:20; }
.modal-box:focus { outline:none; }
.chat-actions { display:flex; justify-content:flex-end; padding:4px 12px; }
.chat-logout { border:0; background:transparent; color:inherit; text-decoration:underline; padding:8px; font:inherit; cursor:pointer; }
.install-help { max-width:1100px; margin:0 auto 30px; padding:0 16px; color:var(--text-mid); font-size:.82rem; }
.app-message { padding:2rem; text-align:center; max-width:42rem; margin:10vh auto; color:var(--text-mid); }
.event-description { display:block; color:var(--text-light); font-size:.76rem; }
.slot-description { color:var(--text-mid); font-size:.78rem; margin-top:4px; }
.slot-address-row, .event-address-row { display:inline-flex; align-items:center; gap:4px; max-width:100%; }
.event-address-row { margin-top:2px; }
.summary-address-row, .res-card-address-row, .modal-address-row { display:inline-flex; align-items:center; gap:2px; max-width:100%; vertical-align:middle; }
.summary-address-row a, .res-card-address-row a, .modal-address-row a { overflow-wrap:anywhere; }
.modal-address-row { justify-content:flex-end; }
.address-copy-controls { display:inline-flex; align-items:center; flex:none; }
.copy-address-button { display:inline-grid; place-items:center; width:44px; height:44px; min-width:44px; min-height:44px; padding:10px; border:1px solid transparent; border-radius:50%; background:transparent; color:var(--emerald-dark); cursor:pointer; touch-action:manipulation; }
.copy-address-button svg { display:block; width:17px; height:17px; }
.copy-address-button:hover { border-color:#b9e7c9; background:#e8f5ed; }
.copy-address-button:focus-visible { outline:3px solid #b9e7c9; outline-offset:1px; background:#e8f5ed; }
.event-copy-address-visible { color:var(--text-light); font-size:.78rem; overflow-wrap:anywhere; }
.copy-address-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; color:var(--emerald); font-size:.82rem; }
.copy-address-status.copy-failed { color:#8c2f25; }
.copy-address-temporary { position:fixed; top:0; left:-10000px; width:1px; height:1px; opacity:0; }
.map-link { display:inline-block; margin-top:12px; color:var(--emerald-dark); }
.login-page { min-height:100vh; display:grid; place-items:center; padding:24px; background:linear-gradient(160deg,#f7f1e8,#eee3d2); }
.login-card { width:min(100%,420px); background:white; border-radius:20px; padding:30px 26px; box-shadow:var(--shadow-lg); }
.login-mark { font-size:42px; text-align:center; }
.login-card h1 { text-align:center; font:700 1.7rem 'Playfair Display',serif; color:var(--emerald-dark); margin:8px 0; }
.login-card > p { text-align:center; color:var(--text-mid); }
.login-card form { display:flex; flex-direction:column; gap:8px; margin:24px 0; }
.login-card label { font-weight:600; font-size:.88rem; }
.login-card input { min-height:48px; border:1px solid var(--beige-dark); border-radius:9px; padding:10px 12px; font:inherit; margin-bottom:8px; }
.login-card form button { min-height:48px; border:0; border-radius:9px; background:var(--emerald); color:white; font:600 1rem 'DM Sans',sans-serif; cursor:pointer; }
#loginStatus { min-height:24px; color:var(--emerald-dark); font-size:.85rem; }
.login-card .install-help { padding:0; margin:15px 0 0; }
.login-card [hidden] { display:none !important; }
.setup-panel { margin-top:20px; }
.setup-panel h2 { margin:0 0 8px; color:var(--emerald-dark); font:600 1.25rem 'Playfair Display',serif; }
.setup-panel > p { color:var(--text-mid); line-height:1.5; }
.setup-panel form { margin:18px 0; }
.password-field { display:flex; align-items:stretch; gap:6px; margin-bottom:8px; }
.password-field input { min-width:0; flex:1; margin:0; }
.password-toggle { border:1px solid var(--beige-dark); border-radius:9px; background:#fff; color:var(--emerald-dark); font:600 .86rem 'DM Sans',sans-serif; padding:0 12px; cursor:pointer; }
.password-rules, .welcome-tips { color:var(--text-mid); font-size:.88rem; line-height:1.55; padding-left:22px; margin:8px 0 16px; }
.password-rules li::marker { color:#a24b32; }
.password-rules li.is-met { color:var(--emerald-dark); }
.password-rules li.is-met::marker { color:var(--emerald); }
.setup-panel button:not(.password-toggle) { width:100%; min-height:48px; border:0; border-radius:9px; background:var(--emerald); color:#fff; font:600 1rem 'DM Sans',sans-serif; cursor:pointer; }
.setup-panel button:disabled { opacity:.65; cursor:wait; }
#passwordStatus, #welcomeStatus { min-height:1.4em; margin:8px 0 0; color:var(--text-mid); font-size:.88rem; }
@media (max-width:480px) { .login-page { padding:16px; } .login-card { padding:26px 20px; } }
.nav-pills { margin-top:10px; }
.modal-overlay { z-index:1000; }
.chat-overlay { z-index:950; }
body.overlay-open { overflow:hidden; }
.is-hidden { display:none !important; }
