:root {
  --bg: #fbf6ee;
  --surface: #ffffff;
  --ink: #1f1b16;
  --muted: #6b625a;
  --primary: #e8692c;
  --primary-hover: #9a3412;
  --green: #2f7d3a;
  --green-dark: #1e4d2b;
  --accent: #c8102e;
  --line: #e7dccb;
  --dark: #1a1a1a;
  --wa: #25d366;
  --radius: 14px;
  --header-h: 64px;
  --shadow: 0 10px 28px rgba(31, 27, 22, 0.08);
  --max: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

img { max-width: 100%; }

button,
input,
textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--green-dark); }

a:hover { color: var(--primary-hover); }

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 8px; }

h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }

h3 { margin: 0; font-size: 1.15rem; }

p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  z-index: 80;
}

.skip:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 40;
  display: flex;
  align-items: center;
  background: var(--dark);
  color: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  color: inherit;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

.logo img {
  display: block;
  height: 54px;
  width: auto;
  max-width: 100%;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.header-call,
.icon-btn,
.cart-btn,
.btn,
.add-btn,
.cat-link,
.qty button,
.segment label,
.neu-filter {
  min-height: 44px;
  min-width: 44px;
}

.header-call,
.cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
}

.header-call { background: transparent; color: var(--bg); border-color: #5c534b; }

.cart-btn {
  background: var(--primary);
  color: var(--dark);
  font-weight: 700;
  border: 0;
}

.cart-btn:hover,
.btn-primary:hover { background: var(--primary-hover); color: #fff; }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  font-size: 0.75rem;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: end;
  color: #fff;
  margin-top: var(--header-h);
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img { object-fit: cover; }

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.25), rgba(26, 26, 26, 0.82));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
  padding: 32px 0 40px;
}

.hero-copy p { color: #f3ebe3; max-width: 38rem; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e7dccb;
}

.status.open .dot { background: #7dce86; }

.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

.info-banner {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 10px;
  overflow-x: auto;
  width: min(var(--max), calc(100% - 32px));
  margin: 16px auto;
  scroll-snap-type: x mandatory;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.info-card strong { display: block; margin-bottom: 4px; }

.info-card p,
.hint,
.cat-note,
.item-desc,
.cart-detail { color: var(--muted); }

.live-flag {
  display: inline-block;
  margin-top: 8px;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.menu-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 8px 0 8px;
}

.allergen-note { margin: 0 0 16px; }

.search { flex: 1 1 220px; }

.search input,
.field input,
.field textarea,
.choice-row {
  width: 100%;
}

.search input,
.field input,
.field textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}

.neu-filter,
.segment label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.catbar-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 25;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.catbar {
  display: flex;
  gap: 8px;
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  cursor: grab;
  scrollbar-width: thin;
}

.catbar.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.cat-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
  -webkit-user-drag: none;
}

.cat-link.is-active { background: var(--dark); color: var(--bg); border-color: var(--dark); }

.category { scroll-margin-top: calc(var(--header-h) + 68px); margin: 8px 0 28px; }

.cat-photo {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 14px;
  background: var(--dark);
}

.cat-photo img { width: 100%; height: 100%; object-fit: cover; }

.cat-head { margin-bottom: 12px; }

.cat-note { margin-top: 6px; }

.cards { display: grid; gap: 12px; }

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.item-meta { display: flex; gap: 8px; align-items: center; min-height: 1.2em; color: var(--muted); font-size: 0.85rem; }

.badge-neu {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.star { color: var(--accent); text-decoration: none; font-weight: 700; }

.item-desc { margin-top: 4px; }

.stoff {
  font-size: 0.68em;
  font-weight: 700;
  margin-left: 1px;
  letter-spacing: 0;
  line-height: 0;
}

.item-buy { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }

.item-price { font-weight: 700; color: var(--green-dark); }

.add-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--dark);
  font-size: 1.6rem;
  line-height: 1;
}

.add-btn:hover { background: var(--primary-hover); color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 12px;
  border: 0;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary { background: var(--primary); color: var(--dark); }

.btn-wa { background: var(--wa); color: var(--dark); }

.btn-wa:hover { background: #1aa34a; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-block { width: 100%; }

.hero .btn-primary { margin-top: 18px; }

.text-btn {
  background: none;
  border: 0;
  color: var(--green-dark);
  text-decoration: underline;
  min-height: 44px;
  padding: 0;
}

.site-footer {
  background: var(--dark);
  color: var(--bg);
  margin-top: 32px;
  padding: 36px 0 48px;
}

.site-footer a,
.site-footer .text-btn { color: #fff; }

.footer-grid {
  display: grid;
  gap: 22px;
}

.site-footer h2 { font-size: 1.3rem; margin-bottom: 8px; }

.hours, .footer-links { padding: 0; margin: 8px 0 0; list-style: none; }

.hours li, .footer-links li { margin: 4px 0; }

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 94%, white);
  border-top: 1px solid var(--line);
}

.dock .btn { width: 100%; }

body.has-dock { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

dialog {
  border: 0;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: min(640px, calc(100vw - 16px));
  max-height: min(92dvh, 900px);
  overflow: auto;
}

dialog::backdrop { background: rgba(26, 26, 26, 0.62); }

#product-dialog,
#checkout-dialog {
  margin: auto auto 0;
  width: 100%;
  max-width: 640px;
  border-radius: 16px 16px 0 0;
}

#cart-dialog {
  margin: 0 0 0 auto;
  height: 100%;
  max-height: 100%;
  width: min(440px, 100%);
  border-radius: 0;
}

.product-form,
#cart-body,
.dialog-pad { padding: 16px 16px 24px; }

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 16px 0;
}

.product-form .sheet-head { padding: 0 0 8px; }

.icon-btn {
  border: 0;
  background: var(--bg);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
}

.choice {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0;
  padding: 8px 12px 12px;
}

.choice legend { font-weight: 700; padding: 0 4px; }

.choice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.choice-row input { width: 20px; height: 20px; }

.extra-price, .extra-base { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.product-row, .qty { display: flex; align-items: center; gap: 8px; }

.qty button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.3rem;
}

.field { display: grid; gap: 6px; margin: 12px 0; font-weight: 600; }

.field input, .field textarea { font-weight: 400; }

.error { color: var(--accent); font-weight: 600; min-height: 1.2em; }

.hint, .todo { margin: 8px 0; }

.save-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 8px;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.35;
}

.save-row input { margin-top: 2px; }

.pc-only { display: none; }

.todo {
  background: #fff6f6;
  border-left: 4px solid var(--accent);
  padding: 8px 12px;
  border-radius: 8px;
}

.hint.warn { color: var(--accent); font-weight: 700; }

.empty { padding: 12px 0; }

.cart-lines, .summary-list, .legend-list { list-style: none; margin: 0; padding: 0; }

.cart-line, .summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-side { display: grid; justify-items: end; gap: 4px; }

.cart-sum, .summary-total { font-variant-numeric: tabular-nums; }

.summary-total { font-size: 1.15rem; margin: 12px 0; }

.cart-foot { display: grid; gap: 8px; padding-top: 8px; }

.segment { display: flex; gap: 8px; margin: 8px 0 12px; }

.segment label { flex: 1; justify-content: center; }

.segment input:checked + span,
.segment label:has(input:checked) {
  font-weight: 700;
}

.segment label:has(input:checked) {
  border-color: var(--primary);
  background: #fff1ea;
}

.legal-wrap { padding: 32px 0 64px; margin-top: var(--header-h); }

.legal-wrap h1 { margin-bottom: 12px; }

.legal-wrap p, .legal-wrap li { margin: 8px 0; }

@media (max-width: 420px) {
  .logo img { height: 46px; }
  .header-call,
  .cart-btn { padding: 0 10px; }
}

@media (min-width: 800px) {
  .pc-only { display: block; }
  .cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .hero { min-height: 70vh; }
  .hero-copy { padding: 48px; }
  #product-dialog,
  #checkout-dialog { margin: auto; border-radius: 16px; }
  .dock { display: none !important; }
  body.has-dock { padding-bottom: 0; }
}

@media (min-width: 1100px) {
  .cards { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
