/* ===== 色（ここを変えると全体の色が変わります） ===== */
:root {
  --bg: #f6f1e9;
  --surface: #fffdf9;
  --ink: #221d18;
  --muted: #6c6258;
  --line: #e4dacb;
  --header-bg: #221d18;
  --header-ink: #fbf6ee;
  --accent: #b5311e;
  --accent-soft: #fbe9e3;
  --pork-bg: #fde6e2;
  --pork-ink: #8c1b10;
  --pork-line: #eeaa9f;
  --warn-bg: #fff2cc;
  --warn-ink: #6b4500;
  --warn-line: #e8c778;
  --info-bg: #eef1f4;
  --info-ink: #3b4652;
  --alc-bg: #eee6f8;
  --alc-ink: #54307c;
  --spicy-bg: #fff0e3;
  --spicy-ink: #a33a00;
  --ph-bg: #ece2d3;
  --ph-stamp: #c9442f;
  --sticky-h: 52px;
  --radius: 14px;
  color-scheme: light;
  --serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171411;
  --surface: #221e1a;
  --ink: #f1ebe2;
  --muted: #b1a699;
  --line: #3a332c;
  --header-bg: #0f0d0b;
  --header-ink: #f6efe4;
  --accent: #ff8a6f;
  --accent-soft: #3d231c;
  --pork-bg: #43201b;
  --pork-ink: #ffc2b7;
  --pork-line: #7d3a30;
  --warn-bg: #3b300f;
  --warn-ink: #ffe1a0;
  --warn-line: #6d5a1f;
  --info-bg: #262b30;
  --info-ink: #cdd6df;
  --alc-bg: #30253f;
  --alc-ink: #dccaf5;
  --spicy-bg: #3d2614;
  --spicy-ink: #ffb784;
  --ph-bg: #2c2620;
  --ph-stamp: #d9644f;
}

/* ===== フォント（端末に入っている標準フォントのみ使用） ===== */
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", Meiryo, sans-serif; }
:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif; }
:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; }
:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC", "Microsoft JhengHei", sans-serif; }
:lang(ko) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", sans-serif; }

/* ===== 基本 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ===== ヘッダー ===== */
.site-header {
  background: var(--header-bg);
  color: var(--header-ink);
  padding: calc(20px + env(safe-area-inset-top)) 0 16px;
}
.shop-name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.25;
}
.shop-branch {
  display: inline-block;
  margin-left: .45em;
  font-size: .55em;
  font-weight: 600;
  letter-spacing: .06em;
  opacity: .85;
}
.shop-sub { margin-top: 2px; font-size: 14px; opacity: .8; min-height: 1.4em; }
.lang-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 6px;
  margin-top: 14px;
}
.lang-btn {
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 10px;
  background: transparent;
  color: var(--header-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.lang-btn[aria-pressed="true"] {
  background: var(--header-ink);
  color: var(--header-bg);
  border-color: var(--header-ink);
}

/* ===== ご案内 ===== */
.notices { display: grid; gap: 8px; margin-top: 16px; }
.notice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}
.notice-icon { flex: none; width: 1.3em; text-align: center; }
.notice.is-pork { background: var(--pork-bg); color: var(--pork-ink); border: 1px solid var(--pork-line); font-weight: 600; }
.notice.is-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.notice.is-info { background: var(--info-bg); color: var(--info-ink); font-size: 13px; }

/* ===== アレルギー絞り込み ===== */
.filter {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.filter summary {
  padding: 12px 14px;
  min-height: 44px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter summary::-webkit-details-marker { display: none; }
.filter summary::before { content: "⚠"; }
.filter summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.filter[open] summary::after { transform: rotate(180deg); }
.filter-body { padding: 0 14px 14px; }
.filter-intro, .filter-disclaimer { font-size: 13px; color: var(--muted); }
.filter-disclaimer { margin-top: 10px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  min-height: 40px;
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
[data-theme="dark"] .chip[aria-pressed="true"] { color: #1a0f0b; }

/* ===== 吸着するカテゴリナビ ===== */
.sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  margin-top: 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; max-width: 720px; margin: 0 auto; }
.nav-row > .cat-nav { flex: 1; min-width: 0; }
.theme-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: 12px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}
.cat-nav {
  display: flex;
  gap: 6px;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.cat-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter-status {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.fs-text { flex: 1; }
.fs-clear {
  flex: none;
  min-height: 32px;
  padding: 2px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
}

/* ===== カテゴリ ===== */
.category { padding-top: 26px; scroll-margin-top: var(--sticky-h); }
.cat-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 12px; }
.cat-title { font-size: 22px; font-weight: 800; line-height: 1.3; }
.cat-title:lang(ja) { font-family: var(--serif); letter-spacing: .04em; }
.cat-ja { font-family: var(--serif); font-size: 14px; color: var(--muted); }
.cat-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
  font-size: 13px;
}
.items { display: grid; gap: 12px; }

/* ===== メニューカード ===== */
.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.item.has-thumb { grid-template-columns: minmax(0, 1fr) 104px; }
.item.has-thumb > .filter-note,
.item.has-thumb > .item-details { grid-column: 1 / -1; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.badge-rec { background: var(--accent); color: #fff; }
[data-theme="dark"] .badge-rec { color: #1a0f0b; }

.item-name { font-size: 17px; font-weight: 700; line-height: 1.35; }
.item-ja { margin-top: 2px; font-size: 14px; color: var(--muted); }
.item-desc { margin-top: 6px; font-size: 14px; color: var(--muted); }
.price { margin-top: 8px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.price.is-free { color: var(--accent); }

.sizes, .options { margin-top: 8px; border-top: 1px dashed var(--line); }
.sizes li, .options li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.sizes li:last-child, .options li:last-child { border-bottom: none; }
.size-price, .opt-price { flex: none; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.sizes li.is-rec .size-name { font-weight: 700; }
.rec-mini { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.options { margin-top: 0; }
.opt-name::before { content: "＋ "; color: var(--muted); }

.item-details { display: grid; gap: 10px; }
.item-details:empty { display: none; }

.flavors { font-size: 14px; }
.flavors-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.flavor-list { display: flex; flex-wrap: wrap; gap: 6px; }
.flavor-list li { padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.flavor-ja { margin-left: 4px; font-size: 12px; color: var(--muted); }

/* タグ */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.tag-pork { background: var(--pork-bg); color: var(--pork-ink); border: 1.5px solid var(--pork-line); }
.tag-alcohol { background: var(--alc-bg); color: var(--alc-ink); }
.tag-spicy { background: var(--spicy-bg); color: var(--spicy-ink); }
.chilis { display: inline-flex; letter-spacing: -2px; }
.chili { filter: grayscale(1); opacity: .3; }
.chili.on { filter: none; opacity: 1; }

/* アレルゲン */
.allergens {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.allergens-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.allergen-list { display: flex; flex-wrap: wrap; gap: 4px; }
.allergen { padding: 1px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-weight: 600; }
.allergen.is-pork { background: var(--pork-bg); color: var(--pork-ink); border-color: var(--pork-line); }
.allergen.is-hit { background: var(--accent); color: #fff; border-color: var(--accent); }
.allergen-none { font-weight: 700; }
.allergen-unknown {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
  font-weight: 700;
}
.allergen-partial { flex-basis: 100%; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* 絞り込み結果 */
.filter-note { padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.filter-note.is-contains { background: var(--accent); color: #fff; }
.filter-note.is-check { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
[data-theme="dark"] .filter-note.is-contains, [data-theme="dark"] .allergen.is-hit { color: #1a0f0b; }
.item.is-dimmed { background: transparent; border-style: dashed; }
.item.is-dimmed > :not(.filter-note) { opacity: .42; filter: grayscale(1); }

/* 写真・プレースホルダー */
.thumb {
  width: 104px;
  height: 104px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ph-bg);
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 38%, rgba(0, 0, 0, .035) 38% 40%, transparent 40%),
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(0, 0, 0, .025) 9px 10px),
    var(--ph-bg);
}
.ph-stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2.5px solid var(--ph-stamp);
  border-radius: 8px;
  color: var(--ph-stamp);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  opacity: .55;
  transform: rotate(-6deg);
}

/* 写真のないカテゴリ（トッピングなど）はコンパクトに */
.items.is-compact { gap: 8px; }
.items.is-compact .item { padding: 12px 14px; }
/* 写真なしカードのサイズ表は横並びのマス目に */
.items.is-compact .sizes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 10px;
  border-top: none;
}
.items.is-compact .sizes li {
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.items.is-compact .sizes li.is-rec { border-color: var(--accent); border-width: 1.5px; }
.items.is-compact .size-name { font-size: 13px; color: var(--muted); }
.items.is-compact .sizes li.is-rec .size-name { color: var(--ink); }
.items.is-compact .rec-mini { display: block; margin-left: 0; }
.items.is-compact .size-price { font-size: 17px; }

.item-main.is-row { display: flex; align-items: flex-start; gap: 12px; }
.item-main.is-row > .item-text { flex: 1; min-width: 0; }
.item-main.is-row > .price { flex: none; margin-top: 0; }

/* ===== 状態メッセージ ===== */
.status-msg { padding: 48px 0; text-align: center; color: var(--muted); }
.status-msg.is-error p { margin-bottom: 16px; color: var(--ink); }
.retry-btn {
  min-height: 44px;
  padding: 8px 20px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

a.retry-btn { display: inline-block; margin-top: 16px; line-height: 28px; text-decoration: none; }

/* ===== フッター ===== */
.site-footer {
  margin-top: 40px;
  padding: 24px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-heading { font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.footer-notices { display: grid; gap: 6px; margin-bottom: 16px; }
.footer-notices li { padding-left: 1em; text-indent: -1em; }
.footer-notices li::before { content: "・"; }
.operator { font-weight: 700; color: var(--ink); }
.updated { margin-top: 4px; }

/* ===== 画面が広いとき（タブレット・PC） ===== */
@media (min-width: 640px) {
  .item.has-thumb { grid-template-columns: minmax(0, 1fr) 140px; }
  .thumb { width: 140px; height: 140px; }
  .shop-name { font-size: 36px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
