/* «Creuza a colori» — loaded last: flat colour blocks instead of the old gradients, ink outlines on the hero
   blocks, avatars and marks in the balloons' yellow. Tokens and shared components: app.css. */

/* Nav: the yellow pill sits behind the icon only */
.app-bottom-nav a { justify-content: flex-start; padding-top: 9px; }
.app-bottom-nav a::before { top: 4px; height: 32px; width: 54px; }
.app-bottom-nav a[data-nav="iris"] { padding-top: 0; justify-content: center; }

/* Hero blocks: flat blue with ink outline */
.home-pick, .setup-heading, .auth-hero, .tg-profile-head, .tg-plan { background: var(--navy); color: #ffffff; border: var(--card-border); box-shadow: var(--card-shadow); }
.tg-plan.is-day { background: var(--accent); }
.home-feature-art { background: var(--navy); }
.tg-invite { background: var(--accent); border: var(--card-border); box-shadow: var(--card-shadow); }
.personal-why { background: var(--gold-soft); border: var(--card-border); }
.tg-quiz-progress span { background: var(--accent); }

/* Covers: one flat colour per place, no glossy gradients */
.app-place-cover, .place-cover, .trip-cover, .sheet-hero, .fav-thumb { background: var(--cover, var(--sea)); }
.tg-cover { background: var(--c1, var(--sea)); }
.tg-cover::after { display: none; }
.tg-plan-dot { background: var(--c1, var(--sea)); }
.tg-qcard { background: var(--c1, var(--sea)); border: var(--card-border); }
.biz-cover { background: var(--sea); }
.biz-cover--museum { background: #6b4f8a; }
.biz-cover--bar { background: var(--accent); }
.biz-cover--restaurant { background: #1f7a4d; }
.biz-cover--shop { background: var(--ink); }

/* Avatars and marks: yellow with an ink outline */
.iris-avatar, .setup-welcome-mark, .setup-taste-art, .account-avatar, .tg-avatar { background: var(--gold); color: #1d1f24; border: 2px solid var(--outline); box-shadow: none; }

/* Cards that carried a soft wash */
.grp-welcome, .grp-join-card, .grp-home-invite, .ntf-consent { background: var(--gold-soft); border: var(--card-border); }
.grp-home-tile.is-poll, .grp-pin.is-poll.is-todo { background: var(--accent-soft); }
.grp-pin.is-plan, .pa-zones-cta { background: var(--sea-soft); }
.grp-poll::before { background: var(--accent); }
@media (prefers-color-scheme: dark) {
  .grp-welcome, .grp-join-card, .grp-home-invite, .ntf-consent, .personal-why { color: var(--ink); }
}

/* Titles: Archivo condensed, black, uppercase (headings); numbers and long questions only condensed and bold */
.app-page-title, .page-heading h1, .ws-page-header h1, .tg-map-page-heading h1, .empty h2, .personal-empty h2, .section-title h2, .app-section-title h2,
.home-head h2, .home .app-section-title h2, .home-title, .home-pick-title, .dialog-top h2, .route-heading h2, .iris-header h1, .iris-welcome h2, .app-about-card h2,
.personal-why h2, .setup-heading h1, .setup-section-heading h2, .setup-taste-card h1, .geo-section-heading h2, .ws-section-heading h2, .auth-hero h1, .amici-title,
.tu-plain-head h1, .aik-card h2, .an-section, .biz-h2, .biz-manage-head h1, .grp-h2, .grp-welcome h2, .grp-hero-copy h1, .grp-join-card h1, .grp-done h3,
.tgv-panel-head h2, .gad-title, .gad-tr-bar-title h2, .mg-hero h1, .mg-item-head h1, .mg-facts h2, .mg-sources h2, .mg-ar-card h2, .mg-ar-fallback h2, .mg-clue-floor h2,
.mt-title, .mt-steps-head h2, .mt-start h1, .ngv-title, .ngv-arrive h2, .ntf-consent h2, .pa-h2, .pa-section-title, .sfy-cd h2, .sfy-sos-head h2, .sfy-sos-done h2,
.sfy-alert-title, .sfy-t-title, .social-title, .social-hero h1, .social-reviews-head h1, .tg-plan-head h3, .tg-profile-id h1, .tg-quiz-saving h1, .tg-quiz-intro h1,
.tg-quiz-done h1, .va-card h2, .va-drawer-head h2, .zones-form h2 { font-weight: 900; font-stretch: 68%; text-transform: uppercase; letter-spacing: 0; font-variation-settings: normal; line-height: 1; }
.an-kpi strong, .ws-metric strong, .bl-price strong, .biz-metrics strong, .gad-kpi strong, .gad-tr-card-count strong, .gad-tr-mins.is-side strong, .mg-museum-copy strong,
.mt-emblem strong, .mt-stats dd, .ngv-opt-time, .pa-date b, .pa-kpi strong, .pa-big, .social-summary-score strong, .grp-poll-q, .tg-subtitle, .tg-qcard-copy h2,
.mg-item-treasure-card h3, .gad-tr-auto h3, .social-extras-head h3, .cover-index, .phase-number, .mg-cover-code { font-weight: 850; font-stretch: 72%; letter-spacing: 0; font-variation-settings: normal; }

/* Page transitions (web/gestures.js): deeper pages slide in from the right, back from the left, tabs rise */
main.nav-forward { animation: nav-forward .26s var(--ease); }
main.nav-back { animation: nav-back .26s var(--ease); }
main.nav-tab { animation: page-in .22s var(--ease); }
@keyframes nav-forward { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes nav-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { main, main.nav-forward, main.nav-back, main.nav-tab { animation: none; } }

/* Bottom sheet while it is dragged down */
#detail-dialog { transition: transform .22s var(--ease); touch-action: pan-y; }
#detail-dialog.is-dragging { transition: none; }

/* Pull to refresh */
.ptr { position: fixed; left: 50%; top: calc(var(--header-h) + var(--safe-top) - 44px); z-index: 45; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--outline); opacity: 0; transform: translateY(var(--pull, 0px)) rotate(var(--turn, 0deg)); transition: opacity .15s; pointer-events: none; }
.ptr.is-visible { opacity: 1; }
.ptr.is-ready { background: var(--gold); color: #1d1f24; }
.ptr.is-loading svg { animation: spin .8s linear infinite; }

/* Long press on the map: «Portami qui» */
.tg-press-popup .leaflet-popup-content-wrapper { border-radius: 999px; border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--outline); padding: 0; background: var(--accent); }
.tg-press-popup .leaflet-popup-content { margin: 0; }
.tg-press-popup .leaflet-popup-tip { background: var(--accent); }
.tg-press-go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; color: #ffffff; font: 800 15px var(--font); text-decoration: none; }
@media (prefers-color-scheme: dark) { .tg-press-go { color: #121418; } }

/* Map: the sheet follows the finger (web/gestures.js); up = list, down = map */
@media (max-width: 959px) {
  .tg-map-sheet { transition: height .26s var(--ease); border-top: 2px solid var(--outline); touch-action: pan-y; }
  .tg-map-sheet.is-dragging { transition: none; }
  .tg-map-grabber { display: block; width: 56px; height: 6px; margin: 2px auto 10px; border-radius: 999px; background: var(--ink); opacity: .85; cursor: grab; }
  .tg-map-sheet-head { cursor: grab; }
}

/* Long press on a place: quick actions (web/gestures.js) */
.qa-layer { position: fixed; inset: 0; z-index: 900; }
.qa-backdrop { position: absolute; inset: 0; background: rgba(29, 31, 36, .45); animation: fade .2s; }
.qa-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 18px calc(18px + var(--safe-bottom)); border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); color: var(--ink); border-top: 2px solid var(--outline); animation: sheet-up .26s var(--ease); display: grid; gap: 12px; max-width: 640px; margin: 0 auto; }
.qa-grab { width: 44px; height: 6px; margin: 0 auto 2px; border-radius: 999px; background: var(--ink); opacity: .85; }
.qa-title { font: 900 24px/1 var(--display); font-stretch: 68%; text-transform: uppercase; }
.qa-actions { display: grid; gap: 8px; }
.qa-item { display: flex; align-items: center; min-height: 50px; padding: 0 16px; border-radius: var(--r-md); border: 2px solid var(--outline); background: var(--surface); color: var(--ink); font-weight: 800; font-size: 15.5px; text-decoration: none; text-align: left; }
.qa-item.is-go { background: var(--accent); color: #fff; box-shadow: 3px 3px 0 var(--outline); }
@media (prefers-color-scheme: dark) { .qa-item { border-color: rgba(245, 241, 230, .28); } .qa-item.is-go { color: #121418; } }

/* Map places enriched with Overture Maps (web/map.js, web/hours.js, docs/OVERTURE.md) */
.tg-map-subchips { margin-top: 2px; padding-top: 0; }
/* the «tipo» chips take a row under the category chips (vistas that show the filters): «Stile e viste» moves down */
.tg-map-page:is([data-vista="tutto"], [data-vista="per-te"]):has(.tg-map-subchips) .tgv-bar { top: calc(var(--safe-top) + 164px); }
@media (min-width: 960px) { .tg-map-page:is([data-vista="tutto"], [data-vista="per-te"]):has(.tg-map-subchips) .tgv-bar { top: 14px; } }
.tg-map-subchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); border: 1.5px solid var(--outline); font: inherit; font-size: 12.5px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.tg-map-subchip small { color: var(--muted); font-size: 11px; font-weight: 650; }
.tg-map-subchip[aria-pressed="true"] { background: var(--gold); color: #1d1f24; box-shadow: 2px 2px 0 var(--outline); }
.tg-map-subchip[aria-pressed="true"] small { color: #1d1f24; }
.tg-map-subchip:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.tg-map-popup-source { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.tg-place-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-place-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: var(--r-pill); background: var(--gold); color: #1d1f24; border: 2px solid var(--outline); font-weight: 850; font-size: 13px; }
.tg-place-chip.is-kind { background: var(--surface); color: var(--ink); font-weight: 700; }
.tg-place-contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tg-place-contacts .button { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.tg-place-call { background: var(--ok); color: #ffffff; }
.tg-place-social { font-size: 13px; font-weight: 750; color: var(--sea); padding: 6px 2px; }
.tg-place-hours h3 { font-size: 15px; margin-bottom: 6px; }
.tg-hours-now { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 9px 12px; border-radius: var(--r-sm); border: 2px solid var(--outline); font-weight: 800; }
.tg-hours-now.is-open { background: var(--ok-soft); color: var(--ok); }
.tg-hours-now.is-closed { background: var(--danger-soft); color: var(--danger); }
.tg-hours-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.tg-hours-week summary { cursor: pointer; font-weight: 750; font-size: 13.5px; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
.tg-hours-week summary::-webkit-details-marker { display: none; }
.tg-hours-week summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.tg-hours-week[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.tg-hours-week table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13.5px; }
.tg-hours-week th, .tg-hours-week td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tg-hours-week th { font-weight: 700; white-space: nowrap; }
.tg-hours-week th small { font-weight: 650; color: var(--muted); }
.tg-hours-week td { overflow-wrap: anywhere; }
.tg-hours-week tr.is-today th, .tg-hours-week tr.is-today td { background: var(--gold-soft); font-weight: 850; color: #1d1f24; }
.tg-hours-raw { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; margin-top: 6px; }
.tg-hours-raw code { font-size: 12px; }
.tg-hours-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.biz-public-data:empty { display: none; }
.biz-public-data { margin-top: 10px; padding: 12px; border-radius: var(--r-sm); background: var(--gold-soft); border: var(--card-border); color: #1d1f24; display: grid; gap: 8px; }
.biz-public-data small { color: #4b4f57; }
.biz-public-data dl { display: grid; gap: 4px; margin: 0; font-size: 13px; }
.biz-public-data dt { font-weight: 800; display: inline; }
.biz-public-data dd { display: inline; margin: 0 0 0 6px; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) {
  .tg-hours-now.is-open { background: color-mix(in srgb, var(--ok) 22%, var(--surface)); color: #9fe0bb; }
  .tg-hours-now.is-closed { background: color-mix(in srgb, var(--danger) 22%, var(--surface)); color: #ffb4a8; }
  .tg-place-call { background: #7fd3a4; color: #10231a; }
  .tg-hours-week tr.is-today th, .tg-hours-week tr.is-today td { background: var(--gold); color: #1d1f24; }
}

/* ---- Cover photos of places and activities (web/covers.js, docs/FOTO_COPERTINA.md) ---- */
.sheet-hero .tg-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.sheet-hero.has-photo .app-place-visual { display: none; }
.sheet-hero.has-photo::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.45)); pointer-events: none; }
.sheet-hero .sheet-hero-meta { z-index: 1; }
.sheet-hero.is-photo-only { background: var(--ink); }
.tg-photo-credit { position: absolute; left: 12px; top: 22px; z-index: 2; max-width: calc(100% - 84px); color: #fff; font-size: 11px; line-height: 1.3; }
.tg-photo-credit summary { list-style: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(10,22,27,.55); font: italic 700 13px/1 Georgia, serif; cursor: pointer; }
.tg-photo-credit summary::-webkit-details-marker { display: none; }
.tg-photo-credit > span { display: block; margin-top: 4px; padding: 4px 8px; border-radius: 8px; background: rgba(10,22,27,.72); }
.tg-photo-credit a { color: inherit; text-decoration: underline; }
.tg-photo-credit .tg-photo-src { text-decoration: none; font-weight: 800; }

/* ---- Phone-only features on the web (web/platform.js, docs/SITO_E_APP.md) ---- */
.tg-apponly { max-width: 640px; margin: 24px auto; }
.tg-apponly-card { display: grid; gap: 10px; justify-items: start; padding: 24px; border: var(--card-border); border-radius: 22px; background: var(--surface, #fff); box-shadow: var(--card-shadow); }
.tg-apponly-card p { margin: 0; color: var(--muted, #5b5f66); line-height: 1.5; }
.tg-apponly-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--gold, #f7c23b); color: var(--ink, #1d1f24); border: var(--card-border); }
.tg-apponly-icon svg { width: 28px; height: 28px; }
.tg-apponly-qr { display: flex; gap: 16px; align-items: center; margin-top: 6px; }
.tg-apponly-qr .tg-qr { width: 132px; height: 132px; flex: none; border: var(--card-border); border-radius: 12px; }
.tg-apponly-note { font-weight: 600; }
@media (max-width: 1099px) { .tu-tiles > .tu-tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }
