/* =====================================================================
   DA MARINELLI — style.css
   Mobile-first. Un solo foglio di stile per index.html e admin.html.

   Indice:
     1. Variabili e base
     2. Componenti comuni (pulsanti, campi, finestre)
     3. Menù pubblico
     4. Area gestionale (admin)
   ===================================================================== */

/* ---------- 1. VARIABILI E BASE ---------- */
:root {
  /* Colori: crema, antracite, rosso pomodoro scuro, cotto, legno */
  --paper: #f2e8d5;
  --surface: #fbf6ea;
  --sand: #e8dcc3;
  --line: #d8c7a8;
  --ink: #25211f;
  --ink-soft: #52483e;
  --muted: #6f6456;
  --tomato: #9b2a1c;
  --tomato-dark: #7d2015;
  --cotto: #b5602f;
  --wood: #86684a;
  --ok: #4d7a3c;
  --warn: #b7791f;

  --font-display: 'Young Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --topbar-h: 56px;
  --radius: 14px;
  --shadow: 0 14px 30px -20px rgba(55, 30, 12, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--paper);
  /* grana di carta appena percettibile */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .32 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--tomato); }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; }

:focus-visible {
  outline: 3px solid var(--cotto);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.muted { color: var(--muted); }
.pre { white-space: pre-line; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 8px; }

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

/* ---------- 2. COMPONENTI COMUNI ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; text-decoration: none; text-align: center;
  background: transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--tomato); color: #fff; }
.btn--primary:hover { background: var(--tomato-dark); }
.btn--outline { border-color: var(--tomato); color: var(--tomato); }
.btn--outline:hover { background: rgba(155, 42, 28, .08); }
.btn--light { border-color: rgba(251, 246, 234, .5); color: var(--surface); }
.btn--light:hover { background: rgba(251, 246, 234, .12); }
.btn--danger { background: #fff; border-color: #b3261e; color: #b3261e; }
.btn--danger:hover { background: #fdeceb; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link {
  background: none; border: 0; padding: 0; color: var(--tomato);
  text-decoration: underline; text-underline-offset: 3px; font-weight: 600;
}

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 22px; line-height: 1;
}
.icon-btn:hover { background: rgba(0, 0, 0, .07); }

.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 16px; /* 16px evita lo zoom automatico su iPhone */
}
textarea.input { min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
select.input { padding-right: 10px; }
.input:focus { outline: 0; border-color: var(--tomato); box-shadow: 0 0 0 3px rgba(155, 42, 28, .16); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: 1 / -1; }
.form-error { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #fdeceb; color: #8c1d18; font-weight: 500; }

/* finestre (dialog) */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(28, 18, 10, .6); }
.sheet, .modal {
  border: 0; padding: 0; background: var(--surface);
  width: min(560px, 100%); max-width: 100%; max-height: 90vh; max-height: 90dvh;
  margin: auto auto 0; border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25);
}
.sheet[open], .modal[open] { display: flex; flex-direction: column; }
@media (min-width: 640px) {
  .sheet, .modal { margin: auto; border-radius: 24px; }
}
.sheet-head, .modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px 12px; border-bottom: 1px solid var(--line);
}
.sheet-head h2, .modal-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.sheet-body, .modal-body { padding: 16px 20px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 3. MENÙ PUBBLICO ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px;
  background: rgba(242, 232, 213, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 20px; white-space: nowrap; }
.brand-logo { display: block; flex: none; width: 44px; height: 45px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
@media (max-width: 400px) { .topbar .btn { display: none; } }
@media (max-width: 420px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-logo { width: 40px; height: 41px; border-radius: 9px; }
  .lang button { min-width: 34px; padding: 0 6px; font-size: 13px; }
}
@media (max-width: 350px) { .brand span { display: none; } }

.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sand); }
.lang button {
  min-width: 40px; height: 36px; padding: 0 8px; border: 0; border-radius: 999px;
  background: transparent; font-weight: 600; font-size: 14px; color: var(--ink-soft);
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }

/* Hero: l'imboccatura del forno a legna, con la brace sul fondo */
.hero { padding: 20px 16px 8px; }
.hero-arch {
  position: relative; overflow: hidden; isolation: isolate;
  max-width: 560px; margin: 0 auto;
  padding: 76px 24px 30px; text-align: center;
  color: var(--surface);
  border-radius: 50% 50% 26px 26px / 190px 190px 26px 26px;
  background:
    radial-gradient(90% 55% at 50% 118%, rgba(214, 104, 40, .75), rgba(214, 104, 40, 0) 70%),
    linear-gradient(180deg, #2c2724 0%, #1f1b19 100%);
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7.5px var(--wood), var(--shadow);
}
.hero-tag { margin: 0 0 6px; font-size: 15px; color: #eab98f; }
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 11vw, 60px); line-height: 1.05; letter-spacing: -.01em; }
.hero-line { margin: 12px auto 0; max-width: 34ch; color: rgba(251, 246, 234, .82); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }

.searchbar { padding-top: 22px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 18px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
}
.search:focus-within { border-color: var(--tomato); box-shadow: 0 0 0 3px rgba(155, 42, 28, .16); }
.search svg { flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search input::-webkit-search-cancel-button { display: none; }

.chips-wrap {
  position: sticky; top: var(--topbar-h); z-index: 40; margin-top: 14px;
  background: rgba(242, 232, 213, .95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.chips {
  display: flex; gap: 8px; list-style: none; margin: 0 auto; padding: 10px 16px; max-width: 960px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 500; white-space: nowrap; color: var(--ink-soft);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.group { padding-top: 34px; }
.group-title { display: flex; align-items: center; gap: 16px; font-family: var(--font-display); font-weight: 400; font-size: clamp(27px, 6vw, 36px); line-height: 1.15; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cat-title { margin: 26px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--tomato); }

.dishes { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px 56px; }
@media (min-width: 860px) { .dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dish { padding-bottom: 20px; border-bottom: 1px solid rgba(216, 199, 168, .7); }
.dish-top { display: flex; align-items: flex-end; gap: 10px; }
.dish-name { font-family: var(--font-display); font-weight: 400; font-size: 19px; line-height: 1.25; }
.ast { color: var(--tomato); margin-left: 1px; }
.leader { flex: 1 1 14px; min-width: 14px; margin-bottom: .45em; border-bottom: 2px dotted #c4ad86; }
.price { flex: none; font-weight: 600; color: var(--tomato); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.price--ask { font-weight: 500; font-style: italic; font-size: 14px; color: var(--muted); }
.dish-desc { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.variants { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.variants li { display: flex; align-items: flex-end; gap: 8px; font-size: 15px; color: var(--ink-soft); }
.algs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 12px 0 0; padding: 0; }
.alg {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 3px;
  border: 0; border-radius: 999px; background: var(--sand); color: var(--ink-soft); font-size: 12.5px;
}
.alg b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: var(--wood); color: #fff; font-size: 11px; font-weight: 600; }
.dish.is-off .dish-name, .dish.is-off .dish-desc, .dish.is-off .price { opacity: .5; }
.off-badge { display: inline-block; margin: 8px 0 0; padding: 2px 10px; border-radius: 999px; background: var(--sand); color: var(--muted); font-size: 12.5px; font-weight: 600; }

.empty { padding: 56px 0; text-align: center; color: var(--muted); font-size: 17px; }

.notes { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-soft); display: grid; gap: 8px; }
.notes p { margin: 0; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 26px 20px; box-shadow: var(--shadow);
}
.panel > .group-title { margin-bottom: 8px; }
.panel > p { margin: 0 0 18px; }
.book-ok { text-align: center; padding: 8px 0; outline: 0; }
.book-ok h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px; margin-bottom: 8px; }
.book-ok p { margin: 0 auto 18px; max-width: 40ch; }
.book-ok .btn { margin: 4px; }

.section { padding-top: 48px; }
.info { margin: 18px 0 20px; display: grid; gap: 0; }
.info-row { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.info-row dd { margin: 0; font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.footer { margin-top: 56px; padding: 24px 16px calc(32px + env(safe-area-inset-bottom)); text-align: center; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.footer a { color: inherit; }

.to-top {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--surface); box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
  display: grid; place-items: center;
}

.alg-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; }
.alg-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; font-size: 15px; }
.alg-list li b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--wood); color: #fff; font-size: 13px; }
.alg-list li.is-hit { background: #f7dcc0; outline: 2px solid var(--cotto); }
.sheet-body > p { margin: 0 0 8px; font-size: 15px; color: var(--ink-soft); }

@media (min-width: 700px) {
  .panel { padding: 34px 36px; }
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid .span-2 { grid-column: span 3; }
  .form-grid .span-half { grid-column: span 1; }
}

/* ---------- 4. AREA GESTIONALE (admin.html) ---------- */
body[data-page="admin"] { background-color: #efe5d0; }

.adm-login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.adm-login-card { width: min(400px, 100%); padding: 30px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); text-align: center; }
.adm-login-card svg { color: var(--tomato); }
.adm-login-card h1 { margin: 10px 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 28px; }
.adm-login-card p { margin: 0 0 20px; color: var(--muted); }
.adm-login-card .field { text-align: left; margin-bottom: 14px; }
.adm-login-card .input { text-align: center; letter-spacing: .3em; font-size: 22px; }
.adm-login-card .back { display: inline-block; margin-top: 18px; font-size: 14px; }

.adm-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--ink); color: var(--surface);
}
.adm-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-brand svg { flex: none; color: #eab98f; }
.adm-brand strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 18px; line-height: 1.1; }
.adm-brand small { display: block; font-size: 12.5px; color: rgba(251, 246, 234, .7); }
.adm-top-actions { display: flex; gap: 8px; flex: none; }

.adm-notices { max-width: 1000px; margin: 0 auto; padding: 12px 16px 0; display: grid; gap: 8px; }
.notice { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 12px; font-size: 14.5px; }
.notice--warn { background: #fbe9c8; color: #6b4410; }
.notice--info { background: var(--sand); color: var(--ink-soft); }
.notice--ok { background: #e4ead6; color: #3b4a22; }
.how { margin-top: 16px; font-size: 14.5px; }
.how summary { cursor: pointer; font-weight: 600; color: var(--tomato); }
.how ol { margin: 10px 0 0; padding-left: 1.3em; display: grid; gap: 6px; }
.how .steps { margin: 6px 0 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: 14.5px; }
.how code { background: var(--sand); padding: 1px 5px; border-radius: 5px; }
.notice button { flex: none; }

.adm-tabs { display: flex; gap: 6px; max-width: 1000px; margin: 0 auto; padding: 14px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.adm-tab { flex: none; height: 44px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; color: var(--ink-soft); }
.adm-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.adm-tab .count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--tomato); color: #fff; font-size: 12px; line-height: 20px; }

.adm-main { max-width: 1000px; margin: 0 auto; padding: 8px 16px 90px; }
.adm-main h2 { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin: 18px 0 4px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.stat { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }

.toolbar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 18px 0 14px; }
.toolbar-row .field { flex: 1 1 150px; }
.toolbar-row .btn { flex: none; }

.empty-state { padding: 36px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--sand); color: var(--ink-soft); }
.badge--pending { background: #fbe9c8; color: #7a4c0c; }
.badge--confirmed { background: #dcebd3; color: #2f5a20; }
.badge--declined, .badge--cancelled { background: #ece4d4; color: #6f6456; }

.bk { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin-bottom: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--wood); border-radius: 16px; }
.bk--pending { border-left-color: #d9902f; }
.bk--confirmed { border-left-color: var(--ok); }
.bk--declined, .bk--cancelled { border-left-color: #b9ad98; }
.bk-when { text-align: center; min-width: 64px; }
.bk-when strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.bk-when span { font-size: 13px; color: var(--muted); text-transform: capitalize; }
.bk-main h3 { font-size: 17px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.bk-main p { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.bk-notes { font-style: italic; }
.bk-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

.mi-group { margin-top: 22px; }
.mi-group h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--font-display); font-weight: 400; font-size: 19px; color: var(--tomato); margin-bottom: 8px; }
.mi-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.mi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mi:last-child { border-bottom: 0; }
.mi-name { font-weight: 600; }
.mi-sub { display: block; font-size: 14px; color: var(--muted); }
.mi.is-off .mi-name { text-decoration: line-through; opacity: .6; }
.mi-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tag { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.tag--ok { background: #dcebd3; color: #2f5a20; }
.tag--warn { background: #fbe9c8; color: #7a4c0c; }
.mi-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 560px) { .mi { grid-template-columns: 1fr; } .mi-actions { justify-content: space-between; } }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #bdb09a; transition: background-color .15s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--cotto); outline-offset: 2px; }

.modal { width: min(640px, 100%); }
.modal-body form { display: grid; gap: 16px; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.modal-foot .spacer { flex: 1; }
.lang-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sand); width: fit-content; }
.ltab { min-width: 52px; height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; color: var(--ink-soft); }
.ltab[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.price-rows { display: grid; gap: 8px; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 40px; gap: 8px; align-items: center; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--tomato); flex: none; }
.alg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.alg-grid .check { font-size: 14.5px; }
@media (min-width: 560px) { .alg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hint { font-size: 13.5px; color: var(--muted); margin: 0; }

.card { margin-top: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.card h3 { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin-bottom: 4px; }
.card > p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.card .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card .form-grid .span-2 { grid-column: 1 / -1; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.toasts { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 200; display: grid; gap: 8px; justify-items: center; padding: 0 16px; pointer-events: none; }
.toast { padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font-weight: 500; max-width: 420px; }
.toast--err { background: #8c1d18; }

.confirm { width: min(420px, 100%); border: 0; border-radius: 22px; padding: 22px; background: var(--surface); margin: auto; }
.confirm p { margin: 0 0 18px; font-size: 17px; }
.confirm form { display: flex; gap: 10px; justify-content: flex-end; }
