:root {
  --ink: #1b1b1b;
  --paper: #faf7f2;
  --paper-alt: #fff;
  --red: #b7202e;
  --red-dark: #8f1622;
  --line: #e7e1d6;
  --muted: #767066;
  --gold: #c79a4b;
  --radius: 14px;
  font-family: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-bottom: 96px;
}

h1, h2, .brand-name, .featured-eyebrow, .cat-nav button {
  font-family: 'Zen Kaku Gothic New', 'Inter', sans-serif;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  color: #fff;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  max-width: 720px;
  margin: 0 auto;
}
.brand-name {
  display: block;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: #cfcfcf;
  margin-top: 2px;
}
.topbar-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.table-badge {
  flex-shrink: 0;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 12px;
  border-radius: 999px;
}
.mode-badge {
  flex-shrink: 0;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-weight: 600;
  font-size: 0.74rem;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
}

/* Mode selection */
.sheet-mode {
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 20px;
  max-width: 480px;
  margin: auto;
}
.sheet-mode h2 { margin: 0 0 4px; font-size: 1.2rem; }
.mode-sheet-sub { margin: 0 0 18px; color: var(--muted); font-size: 0.88rem; }
.mode-option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
}
.mode-option:hover { border-color: var(--red); }
.mode-option-title { display: block; font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.mode-option-desc { display: block; font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

/* Info banner */
.info-banner {
  max-width: 720px;
  margin: 12px auto 0;
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.star { color: var(--red); font-weight: 700; }

/* Table prompt */
.table-prompt {
  max-width: 480px;
  margin: 8px 16px;
  padding: 14px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.table-prompt p { margin: 0 0 10px; font-size: 0.9rem; }
.table-prompt-row { display: flex; gap: 8px; justify-content: center; }
.table-prompt-row input {
  width: 100px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 1rem;
  text-align: center;
}

/* Featured */
.featured {
  max-width: 720px;
  margin: 12px 16px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border-radius: var(--radius);
}
.featured-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd9dc;
}
.featured-item { margin: 0; font-weight: 700; font-size: 1.05rem; }

/* Search */
.search-wrap {
  max-width: 720px;
  margin: 4px auto 0;
  padding: 0 16px;
}
#searchInput {
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-alt);
  font-size: 0.9rem;
  font-family: inherit;
}
#searchInput:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

/* Category nav */
.cat-nav {
  position: sticky;
  top: 61px;
  z-index: 19;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav button {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-alt);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.cat-nav button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Menu main */
.menu-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px 24px;
}
.menu-category {
  scroll-margin-top: 120px;
  border-bottom: 1px solid var(--line);
}
.menu-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 2px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
}
.menu-category summary::-webkit-details-marker { display: none; }
.menu-category summary::after {
  content: '+';
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 400;
  flex-shrink: 0;
}
.menu-category[open] summary::after { content: '−'; }
.cat-count {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  margin-right: auto;
  margin-left: 8px;
}
.dish-list { padding-bottom: 8px; }
.dish-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
}
.dish-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--line);
}
.dish-info { flex: 1; min-width: 0; }
.dish-name { font-size: 0.92rem; font-weight: 500; line-height: 1.35; }
.dish-code { color: var(--muted); font-weight: 400; margin-right: 4px; }
.dish-price { font-size: 0.82rem; color: var(--muted); margin-top: 2px; font-weight: 600; }
.dish-price-included { color: #1f8a4c; }
.dish-desc { font-size: 0.8rem; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.dish-ingredients { font-size: 0.74rem; color: var(--muted); margin-top: 2px; font-style: italic; }

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.stepper button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-alt);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.stepper button.plus {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper .qty { min-width: 18px; text-align: center; font-weight: 700; }

/* Cart bar */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 60%, transparent);
}
.cart-bar-btn {
  width: 100%;
  max-width: 688px;
  margin: 0 auto;
  display: block;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
#cartCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  padding: 0 5px;
  margin-right: 4px;
  font-size: 0.8rem;
}

/* Sheets */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-end;
}
.sheet {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper-alt);
  border-radius: 20px 20px 0 0;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sheet-close {
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
}
.sheet-body { padding: 12px 18px; overflow-y: auto; }
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line-info { display: flex; flex-direction: column; gap: 2px; }
.cart-line-name { font-size: 0.92rem; }
.cart-line-sub { font-size: 0.78rem; color: var(--muted); }
.cart-total-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 4px;
  font-weight: 700;
  font-size: 1rem;
}
.cart-empty { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 20px 0; }
.note-label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; }
#orderNote {
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.sheet-foot { padding: 12px 18px; border-top: 1px solid var(--line); }

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: center;
}
.btn-solid { background: var(--red); color: #fff; }
.btn-solid:disabled { opacity: 0.45; cursor: default; }
.btn-lg { width: 100%; padding: 15px; font-size: 1rem; }
.btn-line { background: none; border: 1px solid var(--line); color: var(--ink); }

.form-status { font-size: 0.85rem; min-height: 1.2em; margin: 0 0 8px; }
.form-status.error { color: var(--red); }

.sheet-confirm {
  padding: 32px 24px 28px;
  text-align: center;
  align-items: center;
}
.confirm-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1f8a4c;
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.sheet-confirm h2 { margin: 0 0 8px; }
.sheet-confirm p { color: var(--muted); margin: 0 0 20px; font-size: 0.9rem; }

.site-footer-menu {
  max-width: 720px;
  margin: 24px auto 0;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}
