/* お店の1ページHP — 共通の見た目と、3つのデザイン（wa / shokudo / simple）
   このファイルは店ごとに書き換えない。店の色は shop.js の color で変える。 */

/* ========== 共通 ========== */
:root {
  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-head: var(--font-body);
  --radius: 0;
  --notice-info: var(--accent);
  --notice-full: #b7791f;
  --notice-closed: #b3261e;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}
body.has-picker { padding-bottom: 96px; }
#app { max-width: 640px; margin: 0 auto; background: var(--bg); }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.4; margin: 0; text-wrap: balance; word-break: auto-phrase; }
p { margin: 0; text-wrap: pretty; }
.catch, .notice-type, .menu-name { word-break: auto-phrase; }
.prose p + p { margin-top: 1em; }

/* 写真と、写真がない時の仮の枠 */
.photo { width: 100%; object-fit: cover; background: var(--line); }
.ph {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center;
  color: var(--muted); font-size: .9rem; line-height: 1.5;
  border: 2px dashed var(--muted);
  background: repeating-linear-gradient(-45deg, transparent 0 12px, var(--line) 12px 13px);
}
.hero-photo { aspect-ratio: 4 / 3; }
.special-photo { aspect-ratio: 4 / 3; }
.story-photo { aspect-ratio: 3 / 4; }

/* 試作A・Bだけで使う部品（他のデザインでは隠す） */
.season, .hanko, .menu-notes, .scroll-cue { display: none; }
.ch { display: inline; }

/* ヒーロー */
.hero { position: relative; }
.hero-text { padding: 24px 20px 8px; }
.genre { color: var(--muted); font-size: .95rem; }
.shop-name { font-size: 2.2rem; font-weight: 800; letter-spacing: .06em; }
.shop-name-main { display: block; }
.shop-name-kana { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); letter-spacing: .2em; margin-top: 4px; }
.catch { margin-top: 14px; font-size: 1.1rem; line-height: 1.8; }

/* お知らせ */
.notice {
  margin: 20px 20px 0;
  padding: 14px 18px;
  border: 2px solid var(--notice-color, var(--notice-info));
  border-radius: var(--radius);
  background: var(--surface);
}
.notice-info { --notice-color: var(--notice-info); }
.notice-full { --notice-color: var(--notice-full); }
.notice-closed { --notice-color: var(--notice-closed); }
.notice-type { font-weight: 700; font-size: 1.15rem; color: var(--notice-color); }
.notice-date { font-weight: 400; font-size: .9rem; color: var(--muted); margin-left: .8em; }
.notice-text { margin-top: 4px; }

/* 各セクション */
.body { padding: 0 20px; }
.sec { padding: 56px 0 8px; }
.sec-title { font-size: 1.5rem; margin-bottom: 24px; }

.special + .special { margin-top: 40px; }
.special-photo { border-radius: var(--radius); }
.special-name { font-size: 1.4rem; margin: 18px 0 4px; }
.special-price { font-weight: 700; color: var(--accent); margin-bottom: 8px; }

.menu { list-style: none; margin: 0; padding: 0; }
.menu-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.menu-row { display: flex; align-items: baseline; gap: 10px; }
.menu-name { font-size: 1.15rem; font-weight: 700; font-family: var(--font-head); }
.menu-dots { flex: 1; min-width: 16px; border-bottom: 2px dotted var(--line); transform: translateY(-.3em); }
.menu-price { font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.menu-note { margin-top: 2px; color: var(--muted); font-size: .95rem; line-height: 1.7; }
.menu-foot { margin-top: 14px; color: var(--muted); font-size: .9rem; }
.menu-badge {
  display: inline-block; margin-bottom: 4px; padding: 0 .6em;
  font-size: .8rem; font-weight: 700; line-height: 1.8; letter-spacing: .05em;
  color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius);
}

/* お品書きをすべて見る（ボタンと、開いた画面） */
.book-open {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; margin-top: 24px; padding: 16px 18px;
  font: inherit; font-weight: 700; color: var(--text); text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.book-open-count { font-weight: 400; color: var(--muted); font-size: .9rem; white-space: nowrap; }
html.book-is-open body { overflow: hidden; }
.book {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font-family: var(--font-body);
  animation: book-in .35s ease both;
}
@keyframes book-in { from { opacity: 0; } to { opacity: 1; } }
.book-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.book-title { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; letter-spacing: .2em; }
.book-close { font: inherit; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.book-body { flex: 1; overflow: auto; width: 100%; max-width: 640px; margin: 0 auto; padding: 8px 20px 48px; }
.book-group-title { font-size: 1.15rem; margin: 28px 0 6px; color: var(--accent); }
.book-item { padding: 12px 0; border-block-end: 1px solid var(--line); }
.book-row { display: flex; align-items: baseline; gap: 10px; }
.book-name { font-weight: 700; }
/* 品名と値段の間の点線。block-size を 0 にして行の真ん中に置くので、縦書きでもそのまま使える */
.book-dots { flex: 1; min-inline-size: 1em; align-self: center; block-size: 0; border-block-end: 2px dotted var(--line); }
.book-price { white-space: nowrap; font-weight: 700; }
.book-note { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.book-foot { margin-top: 20px; color: var(--muted); font-size: .9rem; }
.book-hint { display: none; }
.tcy { text-combine-upright: all; }
.num { text-orientation: upright; }

/* 店名の由来 */
.origin { margin: 0 0 32px; padding: 18px 20px; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.origin-label { font-size: .85rem; color: var(--muted); letter-spacing: .15em; margin-bottom: 6px; }
.origin-text { font-family: var(--font-head); font-size: 1.1rem; line-height: 1.8; word-break: auto-phrase; text-wrap: balance; }

.story-figure { margin: 0 auto 24px; width: 72%; }
.story-photo { border-radius: var(--radius); }
.story-figure figcaption { margin-top: 8px; text-align: center; color: var(--muted); font-size: .9rem; }
.story-title { font-size: 1.3rem; margin-bottom: 16px; }

.media { list-style: none; margin: 0; padding: 0; }
.media li { padding: 12px 0 12px 1.2em; position: relative; border-bottom: 1px solid var(--line); }
.media li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: .5em; height: .5em; background: var(--accent); }

.call {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 16px; margin-bottom: 8px;
  background: var(--accent); color: var(--on-accent, #fff);
  text-decoration: none; border-radius: var(--radius); line-height: 1.4;
}
.call-label { font-size: .9rem; }
.call-num { font-size: 1.5rem; font-weight: 700; letter-spacing: .06em; }
.call-note { color: var(--muted); font-size: .9rem; text-align: center; }
.info { margin: 20px 0 0; }
.info-row { display: grid; grid-template-columns: 5.2em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info dt { color: var(--muted); font-size: .95rem; padding-top: .1em; }
.info dd { margin: 0; }

.map-frame { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-link { display: inline-block; margin-top: 12px; }

.foot { margin-top: 64px; padding: 32px 20px 40px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.foot-name { font-family: var(--font-head); font-size: 1.15rem; color: var(--text); font-weight: 700; margin-bottom: 4px; }
.foot-copy { margin-top: 16px; font-size: .8rem; }
.foot-note { margin-top: 16px; font-size: .78rem; opacity: .8; }

/* ========== 明るい食堂 ========== */
[data-design="shokudo"] {
  --bg: #fbf5e9;
  --surface: #fffdf8;
  --text: #2a2520;
  --muted: #6b6055;
  --line: #e4d8c3;
  --accent: #c9541f;
  --marker: #f6cf61;
  --radius: 14px;
  --font-head: "Zen Maru Gothic", var(--font-body);
}
/* 上から：のれん（ジャンル）→ 店名 → 写真 → ひと言 */
[data-design="shokudo"] .hero { display: flex; flex-direction: column; padding-bottom: 4px; }
[data-design="shokudo"] .hero-text { display: contents; }
[data-design="shokudo"] .genre {
  order: -3; margin: 0; padding: 10px 20px;
  background: var(--accent); color: #fff; text-align: center;
  font-family: var(--font-head); font-weight: 700; letter-spacing: .2em;
}
[data-design="shokudo"] .shop-name { order: -2; text-align: center; padding: 24px 20px 18px; font-size: 2.3rem; }
[data-design="shokudo"] .hero-photo { order: -1; width: calc(100% - 32px); margin: 0 16px; border-radius: var(--radius); }
[data-design="shokudo"] .catch { padding: 0 20px; text-align: center; margin-top: 18px; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
[data-design="shokudo"] .sec-title span { background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); padding: 0 .15em; }
[data-design="shokudo"] .special { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); padding-bottom: 20px; }
[data-design="shokudo"] .special-photo { border-radius: 0; }
[data-design="shokudo"] .special > :not(.special-photo) { padding-left: 18px; padding-right: 18px; }
/* おすすめは短冊のように並べる */
[data-design="shokudo"] .menu { display: grid; gap: 10px; }
[data-design="shokudo"] .menu-item { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--marker); border-radius: 8px; padding: 12px 16px; }
[data-design="shokudo"] .menu-dots { visibility: hidden; }
[data-design="shokudo"] .menu-price { color: var(--accent); font-size: 1.25rem; }
[data-design="shokudo"] .menu-badge { background: var(--accent); color: #fff; border-radius: 999px; }
[data-design="shokudo"] .origin { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
[data-design="shokudo"] .notice { box-shadow: 0 3px 0 var(--line); }
[data-design="shokudo"] .story-figure img, [data-design="shokudo"] .story-figure .ph { border-radius: 50% 50% var(--radius) var(--radius); }
[data-design="shokudo"] .media li::before { border-radius: 50%; background: var(--marker); }
[data-design="shokudo"] .info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
[data-design="shokudo"] .info-row:last-child { border-bottom: 0; }

/* ========== シンプル ========== */
[data-design="simple"] {
  --bg: #ffffff;
  --surface: #f6f6f4;
  --text: #1f1f1f;
  --muted: #5d5d5d;
  --line: #e2e2e0;
  --accent: #2f5d50;
  --radius: 4px;
}
[data-design="simple"] .hero-photo { aspect-ratio: 3 / 2; }
[data-design="simple"] .hero-text { padding: 28px 20px 4px; }
[data-design="simple"] .shop-name { font-size: 2.1rem; }
[data-design="simple"] .sec-title { font-size: 1.45rem; }
[data-design="simple"] .sec-title::before { content: ""; display: block; width: 32px; height: 3px; background: var(--accent); margin-bottom: 14px; }
[data-design="simple"] .menu-dots { visibility: hidden; }
[data-design="simple"] .notice { border-width: 0 0 0 5px; }

/* ========== 撮影用：デザインを選ぶ（公開時は出ない） ========== */
.picker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; padding: 0 12px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; font-family: var(--font-body); }
.picker > * { pointer-events: auto; }
.picker-open {
  font: inherit; font-size: 1rem; font-weight: 700;
  padding: 14px 28px; border: 0; border-radius: 999px;
  background: #222; color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); cursor: pointer;
}
.picker-sheet {
  width: 100%; max-width: 420px; padding: 16px; border-radius: 16px;
  background: #fff; color: #222; box-shadow: 0 6px 28px rgba(0, 0, 0, .35);
  display: grid; gap: 8px;
}
.picker-sheet[hidden] { display: none; }
.picker-title { font-weight: 700; text-align: center; color: #555; font-size: .9rem; }
.picker-choice, .picker-close {
  font: inherit; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 2px solid #ddd; border-radius: 10px; background: #fff; color: #222; cursor: pointer; text-align: left;
}
.picker-choice.is-on { border-color: #222; font-weight: 700; }
.picker-swatch { width: 36px; height: 36px; border-radius: 8px; flex: none; border: 1px solid #ccc; }
.picker-choice[data-design="shokudo"] .picker-swatch { background: linear-gradient(135deg, #fbf5e9 62%, #c9541f 62%); }
.picker-choice[data-design="simple"] .picker-swatch { background: linear-gradient(135deg, #fff 62%, #2f5d50 62%); }
.picker-close { justify-content: center; background: #f2f2f2; border-color: #f2f2f2; }
