/* Hungry Surfer · app clienti e soci
   Identità dal menu stampato: carta avorio, inchiostro nero, oceano, giallo sole, rosso salsa. */
:root {
  --paper: #F4EBDC;
  --paper-2: #EADDC6;
  --card: #FFFBF4;
  --ink: #161412;
  --ink-2: #4A443D;
  --muted: #7A7166;
  --line: #D9CBB3;
  --ocean: #0F5C70;
  --ocean-2: #0B4656;
  --cyan: #1FB8C9;
  --sun: #F2B21B;
  --sauce: #D1322B;
  --ok: #2E7D4F;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(22, 20, 18, .06), 0 6px 18px -10px rgba(22, 20, 18, .35);
  --display: 'Bangers', 'Impact', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabh: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 16px/1.5 var(--body); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: var(--ocean); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Struttura ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(8px + var(--safe-t)) 16px 8px; background: var(--ink); color: var(--paper);
}
.brand { display: flex; align-items: center; text-decoration: none; color: inherit; }
.brand img { height: 48px; width: auto; }
.topr { display: flex; align-items: center; gap: 10px; }
.langs { display: flex; align-items: center; gap: 2px; font-size: 12px; letter-spacing: .06em; }
.langs span { opacity: .35; }
.langs button { background: none; border: 0; padding: 6px 5px; font-weight: 600; opacity: .55; color: inherit; min-height: 32px; }
.langs button[aria-pressed="true"] { opacity: 1; color: var(--sun); }
.scroll { flex: 1; padding-bottom: calc(var(--tabh) + var(--safe-b) + 24px); }
.view { max-width: 760px; margin: 0 auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 22px; }
.view.wide { max-width: 1120px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
  height: calc(var(--tabh) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--ink); color: var(--paper); border-top: 3px solid var(--sun);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative;
  color: inherit; text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: .02em; opacity: .62;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.tabbar a[aria-current="page"] { opacity: 1; color: var(--sun); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar .badge { position: absolute; top: 8px; left: calc(50% + 6px); }
.tab-extra { display: none; }

/* ---------- Tipografia ---------- */
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: 1; margin: 0; }
h1 { font-size: clamp(40px, 9vw, 64px); }
h2 { font-size: 30px; }
h3 { font-size: 22px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.xs { font-size: 12.5px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ocean); }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-h a { font-size: 14px; font-weight: 600; text-decoration: none; }
.brush {
  display: inline-block; padding: 6px 16px 4px 12px; background: var(--ink); color: var(--paper);
  clip-path: polygon(0 8%, 96% 0, 100% 52%, 97% 100%, 3% 94%, 1% 50%); transform: rotate(-1.2deg);
}
.brush.ocean { background: var(--ocean); }
.brush.sun { background: var(--sun); color: var(--ink); }
.brush.sauce { background: var(--sauce); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- Componenti ---------- */
.card { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: 3px 3px 0 var(--ink); }
.card.flat { box-shadow: none; border-color: var(--line); }
.card.ink { background: var(--ink); color: var(--paper); }
.card.ocean { background: var(--ocean); color: #fff; border-color: var(--ocean-2); box-shadow: 3px 3px 0 var(--ocean-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--sun); color: var(--ink);
  font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn.ocean { background: var(--ocean); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { background: var(--sauce); color: #fff; }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg, .chip svg, .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); } }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.tag.sun { background: var(--sun); color: var(--ink); }
.tag.ocean { background: var(--ocean); color: #fff; }
.tag.ok { background: #DDEFE3; color: var(--ok); }
.tag.sauce { background: #F8DCD9; color: var(--sauce); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--sauce); color: #fff; font-size: 11px; font-weight: 700; }
.pill-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 14px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(4px); }
.pill-status i { width: 9px; height: 9px; border-radius: 50%; background: #9A9A9A; }
.pill-status.open i { background: #3BD16F; box-shadow: 0 0 0 4px rgba(59, 209, 111, .25); }
.empty { padding: 22px 16px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); font-size: 15px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }

/* ---------- Home ---------- */
.hero { position: relative; margin: -18px -16px 0; min-height: 440px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.05) 20%, rgba(10,10,10,.88) 100%); }
.hero-in { position: relative; z-index: 1; padding: 22px 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.hero h1 { text-shadow: 3px 3px 0 var(--ink); }
.hero .motto { font-family: var(--display); font-size: 24px; letter-spacing: .03em; }
.hero .motto b { color: var(--sun); font-weight: 400; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick a, .quick button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px;
  background: var(--card); border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 700; text-align: center;
}
.quick svg { width: 24px; height: 24px; fill: none; stroke: var(--ocean); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signature { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.signature img { width: 120px; height: 150px; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--ink); }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; overscroll-behavior-x: contain; }
.gallery button { padding: 0; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; scroll-snap-align: start; aspect-ratio: 4/3; background: var(--paper-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.today td { font-weight: 700; color: var(--ocean); }
.services { display: flex; flex-wrap: wrap; gap: 8px; }
.services span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.services svg { width: 18px; height: 18px; fill: none; stroke: var(--ocean); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mapbox { border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; background: var(--paper-2); }
.mapbox iframe { width: 100%; height: 100%; border: 0; display: block; }
.member-banner { display: flex; align-items: center; gap: 12px; }
.member-banner .grow b { font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: .03em; }

/* ---------- Menu ---------- */
.chips { position: sticky; top: calc(64px + var(--safe-t)); z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; margin: 0 -16px; background: var(--paper); border-bottom: 1px solid var(--line); scrollbar-width: none; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--ink); background: var(--card); font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: var(--paper); }
.menu-cat { scroll-margin-top: 120px; display: flex; flex-direction: column; gap: 4px; }
.menu-cat > header { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 12px 0; border-bottom: 1.5px dashed var(--line); }
.item.has-ph { grid-template-columns: 64px 1fr auto; }
.item .ph { grid-row: span 2; width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1.5px solid var(--ink); }
.item .nm { font-family: var(--display); font-size: 22px; letter-spacing: .03em; line-height: 1.05; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.item .ds { font-size: 14.5px; color: var(--ink-2); grid-column: 1 / 2; }
.item.has-ph .ds { grid-column: 2 / 3; }
.item .pr { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item .pr .cve { color: var(--sauce); font-size: 16px; }
.item .pr .eur { display: block; color: var(--ocean); font-size: 13px; font-weight: 600; }
.item.off { opacity: .45; }
.mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 700 10px/1 var(--body); color: #fff; }
.mark.veg, .mark.vegan { background: #3E8E41; }
.mark.spicy { background: var(--sauce); }
.mark.signature { background: var(--sun); color: var(--ink); }
.sauce-box { border: 2px solid var(--sauce); border-radius: var(--radius); padding: 14px 16px; background: #FFF6EF; }
.sauce-box h3 { color: var(--sauce); font-size: 28px; }

/* ---------- Eventi ---------- */
.event { display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: start; }
.event .date { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--ink); color: var(--paper); }
.event .date b { font-family: var(--display); font-size: 30px; font-weight: 400; line-height: 1; }
.event .date span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.event .date.sport { background: var(--ocean); }
.event .date.soci { background: var(--sun); color: var(--ink); }
.event h3 { font-size: 22px; }
.event img { margin-top: 8px; border-radius: 10px; border: 1.5px solid var(--ink); aspect-ratio: 16/9; object-fit: cover; width: 100%; }

/* ---------- Moduli ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 14px; font-weight: 700; }
.field small { color: var(--muted); font-size: 12.5px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff;
  font-size: 16px; /* niente zoom su iPhone */
}
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--ocean); flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slots button { min-width: 72px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--ink); background: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.slots button[aria-pressed="true"] { background: var(--ocean); color: #fff; border-color: var(--ocean); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--ink); background: #fff; font-size: 24px; font-weight: 700; }
.stepper output { font-family: var(--display); font-size: 34px; min-width: 40px; text-align: center; }
.code-input { letter-spacing: .5em; text-align: center; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Area soci ---------- */
.subtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.subtabs::-webkit-scrollbar { display: none; }
.vip {
  position: relative; aspect-ratio: 1.586; border-radius: 18px; padding: 18px 20px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #1D8FA3 0%, var(--ocean) 38%, #0A2F39 100%);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: flex; flex-direction: column; justify-content: space-between;
}
.vip::before { content: ''; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 26px solid rgba(255,255,255,.06); }
.vip .top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.vip .top img { height: 44px; }
.vip .lvl { font: 700 11px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--sun); }
.vip .name { font-family: var(--display); font-size: clamp(24px, 6.5vw, 32px); letter-spacing: .04em; line-height: 1; position: relative; }
.vip .bottom { display: flex; justify-content: space-between; align-items: flex-end; position: relative; gap: 12px; }
.vip .no { font: 600 14px/1 var(--body); letter-spacing: .2em; font-variant-numeric: tabular-nums; opacity: .9; }
.vip .qr { width: 84px; height: 84px; padding: 6px; background: #fff; border-radius: 10px; flex: none; }
.vip .qr svg { width: 100%; height: 100%; display: block; }
.post { display: flex; flex-direction: column; gap: 6px; }
.post .body { white-space: pre-line; font-size: 15.5px; }
.post.unread { border-left: 5px solid var(--sauce); }
.doc { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.doc .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--ocean); flex: none; }
.kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi > div { padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); }
.kpi b { display: block; font-family: var(--display); font-size: 30px; font-weight: 400; line-height: 1.1; letter-spacing: .02em; }
.kpi span { font-size: 13px; color: var(--muted); }

/* ---------- Gestione ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li .grow b { display: block; }
.res-day { font-family: var(--display); font-size: 22px; letter-spacing: .03em; margin-top: 8px; }
.res { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.res .t { font-family: var(--display); font-size: 24px; line-height: 1; }
.res .t small { display: block; font: 600 12px/1.4 var(--body); color: var(--muted); }
.res.nuova { border-color: var(--sauce); }
.res .row { margin-top: 8px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar input { width: auto; min-height: 40px; }

/* ---------- Finestre ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 10, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); border-top: 3px solid var(--sun); animation: up .2s cubic-bezier(.2, .8, .2, 1); }
.sheet header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet .x { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--card); font-size: 20px; line-height: 1; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabh) + var(--safe-b) + 16px); transform: translate(-50%, 20px); z-index: 80; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14.5px; opacity: 0; pointer-events: none; transition: .2s ease; border: 2px solid var(--sun); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.viewer { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; }
.viewer img { max-height: 86dvh; width: auto; border-radius: 10px; }
.viewer button { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 22px; }

/* ---------- Piè di pagina ---------- */
footer.mgm { max-width: 760px; margin: 12px auto 0; padding: 18px 16px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: 12.5px; }
footer.mgm img { height: 22px; width: auto; opacity: .7; }
footer.mgm a { color: inherit; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Tablet ---------- */
@media (min-width: 720px) {
  .view { padding: 26px 24px 8px; }
  .hero { margin: -26px -24px 0; min-height: 480px; }
  .chips { margin: 0 -24px; padding: 10px 24px; }
  .quick { gap: 12px; }
  .gallery { grid-auto-columns: 40%; }
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 20px; border: 2px solid var(--ink); }
}

/* ---------- Computer: menu a sinistra ---------- */
@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
  .topbar { grid-column: 1 / -1; padding: 10px 28px; }
  .brand img { height: 58px; }
  .tabbar {
    position: sticky; top: 78px; grid-row: 2; grid-column: 1; height: calc(100vh - 78px); flex-direction: column; justify-content: flex-start;
    gap: 4px; padding: 20px 12px; border-top: 0; border-right: 3px solid var(--sun);
  }
  .tabbar a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
  .tabbar a[aria-current="page"] { background: rgba(242, 178, 27, .12); }
  .tabbar .badge { position: static; margin-left: auto; }
  .tab-extra { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding: 12px 14px; }
  .tab-extra a { padding: 6px 0; font-size: 13px; opacity: .55; }
  .scroll { grid-row: 2; grid-column: 2; min-width: 0; padding-bottom: 40px; }
  .view { padding: 32px 36px 8px; }
  .hero { margin: -32px -36px 0; min-height: 520px; }
  .chips { margin: 0 -36px; padding: 10px 36px; top: 78px; }
  .home-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }
  .home-grid > * { min-width: 0; }
  .menu-cols { columns: 2; column-gap: 36px; }
  .menu-cols .menu-cat { break-inside: avoid; margin-bottom: 26px; }
  .gallery { grid-auto-columns: 31%; }
  .toast { bottom: 24px; }
}
