/* サイズはrem基準で一括拡大する */
:root { font-size: 16px; }
:root[data-size="m"] { font-size: 18px; }
:root[data-size="l"] { font-size: 21px; }

:root {
  --bg: #f4efe4; --surface: #fbf8f1; --text: #2a2118; --muted: #75695a; --line: #d9cfbc;
  --accent: #7a2a1d; --accent-text: #fff; --head: #231a13; --head-text: #f4efe4;
  --ph: #e6decd; --chip: #efe7d6; --radius: 2px; --font: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.55;
  padding-bottom: 6rem;
  /* 保存抑止: 長押しメニューと選択を無効化 */
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }


.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: .7rem 1rem; background: var(--head); color: var(--head-text); }
.brand-name { font-size: 1.3rem; font-weight: 700; letter-spacing: .08em; }
.brand-sub { font-size: .68rem; opacity: .75; }
.controls { display: flex; gap: 6px; align-items: center; }
.sizes { display: flex; border: 1px solid currentColor; border-radius: var(--radius); overflow: hidden; }
.sizes button { background: none; border: 0; min-width: 30px; height: 34px; padding: 0 2px; line-height: 1; }
.sizes button:nth-child(1) { font-size: 12px; }
.sizes button:nth-child(2) { font-size: 15px; }
.sizes button:nth-child(3) { font-size: 18px; }
.sizes button.on { background: var(--accent); color: var(--accent-text); }
#lang { height: 36px; max-width: 92px; background: var(--head); color: var(--head-text); border: 1px solid currentColor; border-radius: var(--radius); font-size: 13px; }

.tabs { position: sticky; top: 0; z-index: 5; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; padding: .7rem .2rem; font-size: .9rem; font-weight: 700; color: var(--muted); }
.tabs button.on { color: var(--accent); border-color: var(--accent); }

.lead { padding: .8rem 1rem 0; font-size: .85rem; color: var(--muted); }
.rule { margin: .7rem 1rem 0; padding: .6rem .8rem; background: var(--chip); border-radius: var(--radius); font-size: .82rem; }

.chips { display: flex; gap: 8px; padding: .8rem 1rem; overflow-x: auto; scrollbar-width: none; }
.chips button { flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--chipr, 999px); padding: .35rem .95rem; font-size: .86rem; }
.chips button { --chipr: 2px; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

h2.group { font-size: 1.02rem; margin: 1.1rem 1rem .5rem; padding-bottom: .25rem; border-bottom: 2px solid var(--accent); }

/* カード: スマホは1列の品書き、広い画面は2列 */
.cards { display: grid; gap: 0; padding: 0 1rem; }
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  main, .tabs, .top { max-width: 960px; margin-inline: auto; }
}
.card { position: relative; background: none; cursor: pointer; }
.card { display: grid; grid-template-columns: 5.6rem 1fr; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.card-name { font-weight: 700; font-size: 1rem; line-height: 1.35; }
.card-price { font-weight: 700; color: var(--accent); margin-top: .15rem; }
.card-omakase { font-size: .74rem; color: var(--muted); }
.card-body { padding-right: 4.6rem; min-width: 0; }
.card-side { position: absolute; right: 0; bottom: .75rem; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }

/* 季節マーク */
.season-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: 5.5rem; }
.season-tag { font-size: .68rem; line-height: 1.5; padding: 0 .35rem; border-radius: 4px; white-space: nowrap; background: #ece6d8; color: #4d4436; }
.season-spring { background: #f8dfe6; color: #8d3350; }
.season-summer { background: #d9edf5; color: #1e5d78; }
.season-autumn { background: #f6e0c8; color: #8a4a12; }
.season-winter { background: #e1e6f3; color: #3a4a7a; }

/* おすすめ: 写真つきの2列(広い画面は4列) */
.rec .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.rec .card { display: block; padding: 0; border: 0; }
.rec .ph { aspect-ratio: 4 / 3; }
.rec .card-body { padding: .4rem 0 0; }
.rec .card-side { inset: 5px 5px auto 5px; flex-direction: row; justify-content: space-between; align-items: flex-start; }
.rec .season-tags { justify-content: flex-start; }
@media (min-width: 720px) {
  .rec .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.detail .season-tags { justify-content: flex-start; max-width: none; margin-bottom: .6rem; }

/* 準備中プレースホルダ */
.ph { position: relative; aspect-ratio: 1; background: var(--ph); border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); font-size: .72rem; text-align: center; overflow: hidden; }
.ph-icon { display: block; font-size: 1.5rem; line-height: 1.2; opacity: .55; }
.watermark { position: absolute; inset: 0; pointer-events: none; opacity: .13; font-size: .7rem; transform: rotate(-24deg) scale(1.5); display: grid; place-items: center; white-space: nowrap; color: #000; }

.heart { width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: 1.1rem; line-height: 1; display: grid; place-items: center; }
.heart.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.badge { display: inline-block; font-size: .66rem; padding: 0 .35rem; border: 1px solid var(--accent); color: var(--accent); border-radius: 3px; margin-left: .3rem; vertical-align: 1px; font-weight: 400; }
.badge.sample { border-color: var(--muted); color: var(--muted); }

.al { display: flex; flex-wrap: wrap; gap: 4px; margin-top: .3rem; }
.al span { font-size: .7rem; background: var(--chip); padding: .05rem .4rem; border-radius: 4px; white-space: nowrap; }

/* テキスト行: コース、ドリンク、その他 */
.rows { padding: 0 1rem; }
.row { display: grid; grid-template-columns: 1fr auto 2.3rem; gap: .7rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.row-name { font-weight: 700; }
.row-desc { font-size: .82rem; color: var(--muted); margin-top: .1rem; }
.row-price { font-weight: 700; color: var(--accent); white-space: nowrap; text-align: right; font-size: .95rem; }
.row-price small { display: block; font-weight: 400; font-size: .7rem; color: var(--muted); }
details.acc { border-bottom: 1px solid var(--line); margin: 0 1rem; }
details.acc summary { padding: .85rem 0; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; list-style: none; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; line-height: 1; }
details.acc[open] summary::after { content: "−"; }
details.acc .rows { padding: 0; }
details.acc .row:last-child { border-bottom: 0; }

.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10; width: 3.7rem; height: 3.7rem; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text); font-size: 1.6rem; box-shadow: 0 4px 14px rgba(0,0,0,.3); display: grid; place-items: center; }
.fab-count { position: absolute; top: -3px; right: -3px; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; border-radius: 1rem; background: #fff; color: var(--accent); font-size: .78rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--accent); }

/* 下からのシート */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap[hidden] { display: none; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: 16px 16px 0 0; padding: 1rem 1rem 1.5rem; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: .6rem; }
.sheet-head h3 { margin: 0; font-size: 1.2rem; line-height: 1.35; }
.close { width: 2.3rem; height: 2.3rem; flex: none; background: var(--chip); border: 0; border-radius: 50%; font-size: 1.1rem; }

.slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem; }
.slide { position: relative; flex: 0 0 86%; scroll-snap-align: center; }
.slide .ph { aspect-ratio: 4 / 3; font-size: .9rem; }
.slide-label { position: absolute; top: 8px; left: 8px; z-index: 1; background: rgba(0,0,0,.65); color: #fff; font-size: .76rem; padding: .1rem .55rem; border-radius: 4px; }
.detail-price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: .9rem 0; }
.detail-price div { background: var(--chip); padding: .5rem .7rem; border-radius: var(--radius); font-size: .76rem; }
.detail-price b { display: block; font-size: 1.15rem; color: var(--accent); }
.detail h4 { margin: 1rem 0 .3rem; font-size: .92rem; }
.detail p { margin: 0; }
.al-note { font-size: .74rem; color: var(--muted); margin-top: .45rem !important; }
.btn { display: block; width: 100%; min-height: 3rem; margin-top: 1rem; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-text); font-weight: 700; }
.btn.ghost { background: none; border: 1px solid var(--line); color: var(--text); }
.btn:disabled { opacity: .4; }

.wish-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.wish-row small { color: var(--muted); display: block; }
.qty { display: flex; align-items: center; gap: .35rem; }
.qty button { width: 2.3rem; height: 2.3rem; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; font-size: 1rem; line-height: 1; }
.qty b { min-width: 1.4rem; text-align: center; }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; padding-top: .8rem; }
.note { font-size: .76rem; color: var(--muted); margin: .4rem 0 0; }
.empty { text-align: center; color: var(--muted); padding: 2rem 0; }

/* 店員確認画面: 常に白地黒字の日本語 */
.staff { position: fixed; inset: 0; z-index: 30; background: #fff; color: #111; overflow-y: auto; padding: 1rem; font-family: "Hiragino Sans", "Yu Gothic", sans-serif; }
.staff[hidden] { display: none; }
.staff h3 { margin: 0 0 .1rem; font-size: 1.15rem; }
.staff-sub { font-size: .8rem; color: #555; margin-bottom: .6rem; }
.staff-row { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: baseline; padding: .75rem 0; border-bottom: 2px solid #111; }
.staff-name { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.staff-name small { display: block; font-size: .78rem; font-weight: 400; color: #555; }
.staff-qty { font-size: 1.9rem; font-weight: 700; white-space: nowrap; }
.staff-total { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: 700; padding: .9rem 0; }
.staff .btn { background: #111; color: #fff; border-radius: 6px; }

@media print { body { display: none; } }

.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.badge.sold { border-color: #555; background: #555; color: #fff; }
.fab svg { width: 2.4rem; height: 2.4rem; }
.is-sold .ph, .is-sold .card-name, .is-sold .row-name { opacity: .55; }
