:root {
  /* カフェテーマ（黒×オレンジ）デフォルト */
  --theme-primary: #e85d04;
  --theme-secondary: #0f0f0f;
  --bg: #0f0f0f;
  --bg-soft: #1a1a1a;
  --bg-card: #1a1a1a;
  --bg-card-soft: #242424;
  --accent-yellow: #fbbf24;
  --accent-yellow-soft: rgba(251, 191, 36, 0.15);
  --accent-orange: #e85d04;
  --accent-orange-soft: rgba(232, 93, 4, 0.2);
  --accent-coral: #ea580c;
  --accent-green: #22c55e;
  --accent-green-soft: rgba(34, 197, 94, 0.2);
  --accent-red: #ef4444;
  --accent-red-soft: rgba(239, 68, 68, 0.2);
  --accent-blue: #3b82f6;
  --accent-blue-soft: rgba(59, 130, 246, 0.2);
  --text-main: #fafafa;
  --text-muted: #a1a1aa;
  --border-soft: rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.4);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

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

html {
  overflow-x: hidden;
}

/* スマホでボタン二重タップ時のズームを防ぐ */
button,
[role="button"],
a {
  touch-action: manipulation;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  max-width: 100vw;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-left: max(22px, env(safe-area-inset-left));
  padding-right: max(22px, env(safe-area-inset-right));
  background: var(--theme-secondary);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
  border-radius: 8px;
  filter: brightness(1.1);
}

.app-provider {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 10px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-soft);
}

.lang-button {
  border: none;
  outline: none;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

.lang-button.active {
  background: var(--theme-primary);
  color: #fff;
  font-weight: 700;
}

.cart-button {
  border: none;
  outline: none;
  background: var(--bg-card);
  color: var(--text-main);
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  transition: transform 0.1s ease, border-color 0.1s ease, background 0.1s ease;
}

.cart-button:hover {
  transform: translateY(-1px);
  border-color: var(--theme-primary);
  background: rgba(232, 93, 4, 0.1);
}

.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--theme-primary);
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  max-width: 1200px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.layout:has(.category-bar) {
  grid-template-columns: 1fr;
}

.sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 14px 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

/* バー風カテゴリ: 横並び すべて | バーガー | サイド | ドリンク */
.sidebar.category-bar {
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.category-bar .category-list {
  display: flex;
  flex-direction: row;
  gap: 0;
}

.category-bar .category-button {
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-right: 1px solid var(--border-soft);
  min-width: 0;
}

.category-bar .category-button:last-child {
  border-right: none;
}

.category-bar .category-button:hover {
  background: var(--bg-soft);
  color: var(--text-main);
}

.category-bar .category-button.active {
  background: rgba(232, 93, 4, 0.2);
  color: var(--theme-primary);
  box-shadow: none;
  transform: none;
  border-right-color: transparent;
  font-weight: 700;
}

.category-bar .category-icon {
  width: 22px;
  height: 22px;
  font-size: 13px;
  flex-shrink: 0;
}

.category-bar .category-label {
  flex: 0 1 auto;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-bar .category-badge {
  display: none;
}

.sidebar-title {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-button {
  border: none;
  outline: none;
  border-radius: 14px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  cursor: pointer;
  color: var(--text-main);
  font-size: 14px;
  transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
  border: 1px solid transparent;
}

.category-icon {
  width: 26px;
  height: 26px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.category-button[data-category="all"] .category-icon {
  background: var(--accent-orange-soft);
  color: var(--accent-orange);
}

.category-button[data-category="burger"] .category-icon {
  background: var(--accent-red-soft);
  color: var(--accent-red);
}

.category-button[data-category="side"] .category-icon {
  background: var(--accent-yellow-soft);
  color: #e6a800;
}

.category-button[data-category="drink"] .category-icon {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.category-button:not([data-category="all"]):not([data-category="burger"]):not(
    [data-category="side"]
  ):not([data-category="drink"])
  .category-icon {
  background: var(--bg-soft);
  color: var(--theme-primary, var(--accent-orange));
}

.category-label {
  flex: 1;
  text-align: left;
}

.category-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
}

.category-button:hover {
  background: var(--bg-soft);
  border-color: var(--border-soft);
}

.category-button.active {
  background: rgba(232, 93, 4, 0.2);
  box-shadow: none;
  border-color: rgba(232, 93, 4, 0.3);
  transform: translateY(-1px);
  color: var(--theme-primary);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(232, 93, 4, 0.08) 100%);
  border-radius: var(--radius-lg);
  padding: 20px 22px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  min-width: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(232, 93, 4, 0.15), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(232, 93, 4, 0.08), transparent 40%);
  pointer-events: none;
}

.hero-eyebrow {
  position: relative;
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--theme-primary);
  font-weight: 600;
  opacity: 0.95;
}

.hero h1 {
  position: relative;
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero p {
  position: relative;
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.menu-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.menu-section h2 {
  margin: 0 0 8px;
  font-size: 18px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.menu-section-caption {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.menu-search-wrap {
  margin-bottom: 12px;
}

.menu-search-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  box-sizing: border-box;
  min-height: 44px;
  background: var(--bg-soft);
  color: var(--text-main);
}

.menu-search-input::placeholder {
  color: var(--text-muted);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  min-width: 0;
}

.menu-loading,
.menu-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.menu-loading {
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.menu-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 13px 13px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.menu-card:hover {
  border-color: rgba(232, 93, 4, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.menu-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232, 93, 4, 0.03), transparent 60%);
  pointer-events: none;
}

.menu-card-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-thumb {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bg-soft) 0%, rgba(232, 93, 4, 0.15) 100%);
  display: block;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.menu-thumb.has-image {
  background: transparent;
  box-shadow: none;
  border: none;
}

.menu-thumb-img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.menu-info {
  flex: 1;
  min-width: 0;
}

.menu-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.menu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.menu-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
}

.menu-tag.hot {
  background: var(--accent-red-soft);
  color: #c62828;
  font-weight: 700;
  border: 1px solid rgba(255, 71, 87, 0.4);
}

.menu-tag.recommend {
  background: var(--accent-green-soft);
  color: #008037;
  font-weight: 700;
  border: 1px solid rgba(0, 200, 83, 0.4);
}

.menu-tag.new {
  background: var(--accent-blue-soft);
  color: #1971c2;
  font-weight: 700;
  border: 1px solid rgba(77, 171, 247, 0.4);
}

.menu-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.menu-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.size-pill {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 2px 8px;
  font-size: 11px;
  background: var(--bg-soft);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.size-pill.active {
  background: rgba(232, 93, 4, 0.2);
  color: var(--theme-primary);
  border-color: var(--theme-primary);
  font-weight: 600;
}

.sauce-chip {
  border-radius: 999px;
  border: 1px dashed var(--border-soft);
  padding: 2px 8px;
  font-size: 11px;
  background: var(--bg-soft);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.sauce-chip.active {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--accent-green);
  color: var(--accent-green);
  border-style: solid;
}

.sauce-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-red);
}

.sauce-dot.mustard {
  background: var(--accent-yellow);
}

.menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-button {
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.detail-button:hover {
  background: var(--bg-soft);
  border-color: var(--border-soft);
  color: var(--text-main);
}

.menu-price {
  font-weight: 700;
  font-size: 16px;
}

.menu-cal {
  font-size: 11px;
  color: var(--text-muted);
}

.add-button {
  border: none;
  outline: none;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--theme-primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.add-button:hover {
  background: #f97316;
  transform: scale(1.02);
}

.add-button:active {
  transform: scale(0.98);
}

.app-footer {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto auto auto auto;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 18px 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
  background: var(--theme-secondary);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  min-width: 0;
}

.coupon-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.coupon-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  min-width: 0;
  min-height: 44px;
  background: var(--bg-soft);
  color: var(--text-main);
}

.coupon-apply-btn {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  border: none;
  border-radius: 8px;
  background: var(--theme-primary);
  color: #fff;
  cursor: pointer;
}

.discount-area {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.discount-area #discount-value {
  color: var(--theme-primary);
  font-weight: 600;
}

.total-area {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-footer .discount-area {
  grid-row: 3;
}

.total-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.total-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--theme-primary);
}

.order-button {
  border: none;
  outline: none;
  padding: 14px 24px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--theme-primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  min-width: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}

.order-button:hover {
  background: #f97316;
  transform: scale(1.02);
}

.order-button:active {
  transform: scale(0.98);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(30px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--theme-primary);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
  box-shadow: 0 6px 24px rgba(232, 93, 4, 0.4);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 35;
}

.detail-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.receipt-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 45;
}

.receipt-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.receipt-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
}

.receipt-modal.is-open {
  pointer-events: auto;
}

.receipt-modal.is-open .receipt-modal-inner {
  transform: translateY(0);
}

.receipt-modal-inner {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

.receipt-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.receipt-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.receipt-order-number {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--theme-primary);
}

.receipt-estimate {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted, #666);
}

.receipt-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
}

.receipt-row {
  padding: 6px 0;
  border-bottom: 1px dotted var(--border-soft);
  line-height: 1.4;
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-note-row {
  font-size: 12px;
  color: var(--text-muted);
  padding: 2px 0 6px 0;
  border-bottom: none;
}

.receipt-order-note {
  padding: 8px 0;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px dotted var(--border-soft);
}

.receipt-footer {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
}

.receipt-total-value {
  color: var(--theme-primary);
}

.receipt-close-btn {
  width: 100%;
  padding: 14px;
  min-height: 48px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: var(--theme-primary);
  color: #fff;
  cursor: pointer;
}

.receipt-close-btn:active {
  opacity: 0.9;
}

.receipt-reorder-btn {
  width: 100%;
  padding: 12px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--theme-primary);
  border-radius: 12px;
  background: transparent;
  color: var(--theme-primary);
  cursor: pointer;
}

.receipt-reorder-btn:active {
  opacity: 0.9;
}

.receipt-bill-link-wrap {
  margin-bottom: 4px;
}

.receipt-bill-link {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--theme-primary);
  text-decoration: none;
  border: 1px solid var(--theme-primary);
  border-radius: 10px;
}

.receipt-bill-link:hover,
.receipt-bill-link:focus {
  opacity: 0.9;
  text-decoration: none;
}

.menu-card {
  position: relative;
}

.cart-restore-wrap {
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
}

.cart-restore-btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--theme-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--theme-primary);
  cursor: pointer;
}

.cart-panel-footer {
  padding: 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
}

.cart-panel-order-btn {
  width: 100%;
  padding: 14px 20px;
  min-height: 52px;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  background: var(--theme-primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
  touch-action: manipulation;
}

.cart-panel-order-btn:active {
  opacity: 0.95;
}

.detail-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 40;
}

.detail-modal.open {
  pointer-events: auto;
}

.detail-modal.open .detail-modal-inner {
  transform: translateY(0);
}

.detail-modal-inner {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.detail-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
}

.detail-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.detail-modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

.detail-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.detail-modal .detail-item-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-modal .detail-item-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.detail-allergy {
  margin-bottom: 16px;
}

.detail-allergy-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.detail-allergy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-allergy-tag {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-red-soft);
  color: #b91c1c;
  font-weight: 600;
}

.detail-ingredients-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.detail-sauce-question {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: center;
}

.detail-sauce-count {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.detail-sauce-centered {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.detail-ingredients-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-ingredients-chips .sauce-chip {
  padding: 8px 14px;
  font-size: 14px;
}

.detail-modal .menu-options {
  margin-bottom: 16px;
}

.detail-set-options {
  width: 100%;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-set-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-set-row .menu-tag {
  flex-shrink: 0;
}

.detail-set-select {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text-main);
}

.detail-modal .add-button {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  font-size: 16px;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 25;
}

.cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 100%);
  background: var(--bg);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  border-left: 1px solid var(--border-soft);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.cart-panel-title {
  font-weight: 600;
}

.cart-panel-close {
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
  padding: 8px;
  margin: -8px -8px -8px 8px;
  border-radius: 8px;
  flex-shrink: 0;
  touch-action: manipulation;
  position: relative;
  z-index: 3;
  line-height: 1;
}

.cart-panel-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.cart-panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 12px 12px;
  gap: 8px;
  overflow-y: auto;
}

.cart-panel-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 4px;
}

.cart-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item {
  padding: 10px 10px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 6px 8px;
  font-size: 13px;
}

.cart-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.cart-item-detail {
  font-size: 11px;
  color: var(--text-muted);
}

.cart-item-note-wrap {
  margin-top: 6px;
}

.cart-item-note {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  min-height: 40px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  box-sizing: border-box;
  background: var(--bg-soft);
  color: var(--text-main);
}

.cart-order-note-wrap {
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
}

.cart-order-note-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cart-order-note-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  min-height: 44px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-sizing: border-box;
  background: var(--bg-soft);
  color: var(--text-main);
}

.cart-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.cart-item-price {
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.cart-qty-btn {
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
}

.cart-qty-value {
  min-width: 20px;
  text-align: center;
}

.cart-remove-btn {
  border: none;
  background: transparent;
  color: var(--accent-red);
  font-size: 11px;
  cursor: pointer;
}

/* タブレット・小さいPC */
@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 12px 12px 14px;
  }

  .sidebar:not(.category-bar) {
    order: -1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    min-width: 0;
  }

  .sidebar.category-bar {
    order: -1;
  }

  .sidebar-title {
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sidebar:not(.category-bar) .category-list {
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 4px;
    gap: 8px;
  }

  .category-bar .category-list {
    flex-wrap: nowrap;
  }

  .category-button {
    white-space: nowrap;
  }

  .app-footer {
    grid-template-columns: 1fr;
  }
}

/* スマホ: タップしやすく・表示を大きく */
@media (max-width: 640px) {
  html {
    font-size: 18px;
  }

  body {
    line-height: 1.5;
  }

  .app-header {
    padding: 10px 12px;
    min-height: 52px;
  }

  .logo-img {
    height: 42px;
  }

  .header-right {
    gap: 12px;
  }

  .lang-button {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .cart-button {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px 10px 12px;
    font-size: 22px;
  }

  .cart-count {
    min-width: 26px;
    height: 26px;
    font-size: 14px;
  }

  .layout {
    padding: 10px 12px 12px;
  }

  .content {
    gap: 12px;
  }

  .sidebar {
    padding: 10px 12px;
    border-radius: var(--radius-md);
  }

  .sidebar-title {
    font-size: 15px;
  }

  .category-list {
    gap: 8px;
    padding-bottom: 4px;
  }

  .category-button {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 14px;
  }

  .category-bar .category-button {
    padding: 12px 6px;
    font-size: 13px;
    min-height: 48px;
  }

  .category-bar .category-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .category-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .hero {
    padding: 14px 12px 16px;
  }

  .hero-eyebrow {
    font-size: 12px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 15px;
  }

  .menu-section h2 {
    font-size: 20px;
  }

  .menu-section-caption {
    font-size: 13px;
  }

  .menu-section h2 {
    margin-bottom: 6px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .menu-card {
    padding: 12px 12px 12px;
    gap: 10px;
  }

  .menu-thumb {
    width: 100%;
    height: 180px;
    font-size: 48px;
  }

  .menu-name {
    font-size: 16px;
  }

  .menu-tag {
    font-size: 11px;
    padding: 3px 8px;
  }

  .menu-desc {
    font-size: 14px;
  }

  .menu-options {
    gap: 6px;
  }

  .size-pill,
  .sauce-chip {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .menu-card-actions {
    gap: 10px;
  }

  .detail-button {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .menu-price {
    font-size: 18px;
  }

  .menu-cal {
    font-size: 12px;
  }

  .add-button {
    min-height: 48px;
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 14px;
  }

  .app-footer {
    padding: 12px 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    gap: 12px;
  }

  .confirm-order-button {
    min-height: 48px;
    padding: 12px 16px;
  }

  .order-button {
    min-height: 56px;
  }

  .total-label {
    font-size: 12px;
  }

  .total-price {
    font-size: 26px;
  }

  .order-button {
    min-height: 52px;
    padding: 14px 20px;
    font-size: 17px;
    border-radius: 14px;
  }

  .toast {
    padding: 12px 18px;
    font-size: 14px;
    bottom: 90px;
  }

  .cart-panel {
    width: 100%;
    max-width: 100%;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .detail-modal-close {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }

  .cart-panel-header {
    padding: 12px 14px;
    min-height: 52px;
  }

  .cart-panel-title {
    font-size: 18px;
  }

  .cart-panel-close {
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
    font-size: 22px;
    margin: -12px -8px -12px 0;
  }

  .cart-panel-body {
    padding: 10px 12px 12px;
    gap: 10px;
  }

  .cart-panel-empty {
    font-size: 15px;
    padding: 12px 6px;
  }

  .cart-item {
    padding: 12px 10px;
    gap: 6px 8px;
    font-size: 15px;
    border-radius: 12px;
  }

  .cart-item-name {
    font-size: 16px;
  }

  .cart-item-detail {
    font-size: 13px;
  }

  .cart-item-price {
    font-size: 16px;
  }

  .cart-item-controls {
    gap: 6px;
  }

  .cart-qty-btn {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    border-radius: 12px;
  }

  .cart-qty-value {
    min-width: 28px;
    font-size: 15px;
  }

  .cart-remove-btn {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* 狭いスマホ（390px等）: お年寄りにも見やすい大きめ表示・余白は控えめ */
@media (max-width: 430px) {
  html {
    font-size: 20px;
  }

  body {
    line-height: 1.55;
  }

  .app-header {
    padding: 10px 12px;
    min-height: 54px;
  }

  .logo-img {
    height: 46px;
  }

  .cart-button {
    min-height: 48px;
    min-width: 48px;
    font-size: 24px;
  }

  .cart-count {
    min-width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .content {
    gap: 10px;
  }

  .layout {
    padding: 10px 12px 12px;
  }

  .sidebar {
    padding: 10px 12px;
  }

  .sidebar-title {
    font-size: 17px;
    font-weight: 700;
  }

  .category-button {
    min-height: 46px;
    padding: 10px 14px;
    font-size: 17px;
  }

  .category-bar .category-button {
    padding: 14px 6px;
    font-size: 15px;
    min-height: 50px;
  }

  .category-bar .category-icon {
    width: 22px;
    height: 22px;
    font-size: 14px;
  }

  .category-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .hero {
    padding: 14px 12px 16px;
  }

  .hero-eyebrow {
    font-size: 14px;
    letter-spacing: 0.18em;
  }

  .hero h1 {
    font-size: 28px;
    line-height: 1.35;
    font-weight: 800;
  }

  .hero p {
    font-size: 17px;
    line-height: 1.5;
    color: var(--text-muted);
  }

  .menu-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
  }

  .menu-section-caption {
    font-size: 15px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .menu-card {
    padding: 14px 12px 12px;
    gap: 10px;
  }

  .menu-thumb {
    width: 100%;
    height: 200px;
    font-size: 48px;
  }

  .menu-name {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
  }

  .menu-tag {
    font-size: 13px;
    padding: 4px 10px;
  }

  .menu-desc {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-muted);
  }

  .menu-options {
    gap: 8px;
  }

  .size-pill,
  .sauce-chip {
    min-height: 48px;
    padding: 10px 16px;
    font-size: 15px;
  }

  .detail-modal-close {
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
    font-size: 24px;
  }

  .detail-modal-header {
    padding: 16px 20px;
    padding-top: max(16px, env(safe-area-inset-top));
  }

  .detail-modal-body {
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .menu-price {
    font-size: 21px;
    font-weight: 800;
  }

  .menu-cal {
    font-size: 14px;
  }

  .add-button {
    min-height: 50px;
    padding: 12px 16px;
    font-size: 17px;
    font-weight: 700;
  }

  .app-footer {
    padding: 12px 14px 16px;
    gap: 12px;
  }

  .total-label {
    font-size: 14px;
    font-weight: 600;
  }

  .total-price {
    font-size: 30px;
    font-weight: 800;
  }

  .order-button {
    min-height: 52px;
    padding: 12px 18px;
    font-size: 19px;
    font-weight: 800;
  }

  .toast {
    padding: 14px 20px;
    font-size: 16px;
    bottom: 100px;
  }

  .cart-panel-header {
    padding: 12px 14px;
    min-height: 54px;
  }

  .cart-panel-title {
    font-size: 20px;
    font-weight: 700;
  }

  .cart-panel-close {
    min-width: 52px;
    min-height: 52px;
    padding: 14px;
    font-size: 24px;
  }

  .cart-panel {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .cart-panel-body {
    padding: 10px 12px 12px;
    gap: 10px;
  }

  .cart-panel-empty {
    font-size: 17px;
    padding: 14px 8px;
    line-height: 1.5;
  }

  .cart-item {
    padding: 12px 10px;
    gap: 8px 10px;
    font-size: 17px;
    line-height: 1.45;
  }

  .cart-item-name {
    font-size: 18px;
    font-weight: 700;
  }

  .cart-item-detail {
    font-size: 15px;
    color: var(--text-muted);
  }

  .cart-item-price {
    font-size: 18px;
    font-weight: 700;
  }

  .cart-qty-btn {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .cart-qty-value {
    min-width: 30px;
    font-size: 17px;
  }

  .cart-remove-btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
  }
}

@media (max-width: 520px) {
  .app-header {
    padding-inline: 14px;
  }

  .hero {
    padding: 18px 16px 20px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .header-right {
    gap: 8px;
  }

  .lang-switch {
    display: none;
  }
}

/* Table Badge */
.table-badge {
  background: var(--accent-orange, #ff6b35);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Order Status Tracker */
.order-tracker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  pointer-events: none;
}

.order-tracker-inner {
  max-width: 480px;
  margin: 0 auto 16px;
  background: #1a1d27;
  color: #e8eaf0;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.order-tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.order-tracker-number {
  font-size: 1.1rem;
  font-weight: 700;
}

.order-tracker-close {
  background: none;
  border: none;
  color: #8b90a0;
  font-size: 1.2rem;
  cursor: pointer;
}

.order-tracker-status {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.order-tracker-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.tracker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.tracker-step.active {
  opacity: 1;
}

.tracker-step.current {
  transform: scale(1.1);
}

.tracker-step-emoji {
  font-size: 1.5rem;
}

.tracker-step-label {
  font-size: 0.7rem;
  font-weight: 600;
}

.tracker-line {
  width: 32px;
  height: 2px;
  background: #2a2e3e;
  margin: 0 4px;
  margin-bottom: 20px;
}

.tracker-line.active {
  background: #3b82f6;
}

