/*
 * お店のホームページの見た目（ひな形）
 *
 * 形の決まり。
 * - 上の帯は、画面の上に固定する。その下に、看板（ロゴ・店名・一言・ボタン）を真ん中にそろえて置く
 * - 節は、角の丸い札にして縦に並べる。開け閉じできる節は、最初はすべて閉じておく
 * - 色・書体・角の丸みは、見た目の案（html の data-look）ごとに入れ替える。案は config の look で選ぶ
 * - 塗りのボタンは1色（--c-accent）。差し色（--c-accent-2）は、小さな印と細い線にだけ使う
 * - 動きは、色の変化と開け閉じだけ。現れる演出や、浮き上がる動きは付けない
 * - 絵文字は使わない。状態は丸、アイコンは細い線の絵
 */

/* 案1「生成り」（きなり）。明るい和紙の色に、墨の文字と塗り。見出しは明朝体。標準の案 */
:root {
  color-scheme: light;

  /* 色 */
  --c-bg: #f5f0e6;
  --c-surface: #fffdf8;
  --c-surface-2: #ece5d6;
  --c-border: #ddd4c2;
  --c-border-strong: #a99e8b;
  --c-text: #2a2521;
  --c-text-muted: #675e54;
  --c-accent: #2a2521;        /* 塗りのボタン（墨） */
  --c-accent-strong: #4a4037; /* 塗りのホバー */
  --c-on-accent: #fffdf8;     /* 塗りの上の文字 */
  --c-link: #8a3b1f;          /* リンクの文字（柿渋） */
  --c-link-hover: #5f2710;
  --c-accent-2: #b4532a;      /* 差し色（柿色）。小さな印と細い線だけ */
  --c-hero: #efe8da;          /* 看板の地 */
  --c-danger: #b3261e;
  --c-placeholder: #8c8377;
  --c-film: 245 240 230;      /* 看板の画像の上にかける膜（地の色） */
  --c-shadow: rgba(42, 37, 33, 0.14);
  --c-overlay: rgba(42, 37, 33, 0.55);
  --c-hover: rgba(42, 37, 33, 0.05);
  --c-picked: rgba(42, 37, 33, 0.1);

  /* 席の状態の色 */
  --st-free: #1f9a52;
  --st-busy: #e0393d;
  --st-resv: #e8a51c;
  --st-paid: #3f6fe8;

  /* 分析の2色。濃い色＝2回目以降（主役）、薄い色＝はじめて */
  --an-repeat: #b4532a;
  --an-first: #b9ae9a;

  /* 文字 */
  --font-base:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo,
    system-ui, sans-serif;
  --font-heading:
    "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
  --fs-body: 1.0625rem; /* 17px */
  --fs-small: 0.9375rem;
  --fs-h1: 1.75rem;
  --fs-h2: 1.375rem;
  --fs-h3: 1.125rem;
  --lh-body: 1.8;
  --lh-heading: 1.5;

  /* 並べ方 */
  --measure: 100%; /* 文の幅は、札の幅に任せる */
  --w-page: 44rem;
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --radius: 12px;       /* 入力欄・小さな箱 */
  --radius-lg: 20px;    /* 札 */
  --radius-btn: 999px;  /* ボタン */
  --tap-min: 44px;

  /* 動きの速さ */
  --dur: 160ms;
  --ease: ease-out;
}

/* 案2「藍」（あい）。深い紺に、生成りの文字と塗り。見出しは明朝体 */
[data-look="ai"] {
  color-scheme: dark;
  --c-bg: #121824;
  --c-surface: #1a2231;
  --c-surface-2: #242e41;
  --c-border: #2f3b51;
  --c-border-strong: #5a6883;
  --c-text: #eef1f6;
  --c-text-muted: #a9b3c4;
  --c-accent: #f1ebe0;        /* 塗りのボタン（生成り） */
  --c-accent-strong: #ffffff;
  --c-on-accent: #121824;
  --c-link: #f2c9b8;          /* リンクの文字（薄い珊瑚） */
  --c-link-hover: #ffe3d6;
  --c-accent-2: #e79a86;      /* 差し色（珊瑚） */
  --c-hero: #161d2b;
  --c-danger: #ff8f86;
  --c-placeholder: #7f8aa0;
  --c-film: 18 24 36;
  --c-shadow: rgba(0, 0, 0, 0.45);
  --c-overlay: rgba(0, 0, 0, 0.65);
  --c-hover: rgba(255, 255, 255, 0.05);
  --c-picked: rgba(255, 255, 255, 0.1);
  --st-free: #23a55a;
  --st-busy: #f23f43;
  --st-resv: #f0b232;
  --st-paid: #4a7dff;
  --an-repeat: #e79a86;
  --an-first: #5a6883;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-btn: 12px;
}

/* 案3「白磁」（はくじ）。白に、藤紫の塗り。見出しもゴシック体で、すっきり見せる */
[data-look="hakuji"] {
  color-scheme: light;
  --c-bg: #ffffff;
  --c-surface: #f7f6fa;
  --c-surface-2: #eceaf2;
  --c-border: #dedbe8;
  --c-border-strong: #a39db5;
  --c-text: #23202b;
  --c-text-muted: #5f5a6e;
  --c-accent: #5a3f8f;        /* 塗りのボタン（藤紫） */
  --c-accent-strong: #47307a;
  --c-on-accent: #ffffff;
  --c-link: #5a3f8f;
  --c-link-hover: #3b2767;
  --c-accent-2: #5a3f8f;      /* 差し色も藤紫 */
  --c-hero: #f7f6fa;
  --c-danger: #b3261e;
  --c-placeholder: #8a859a;
  --c-film: 255 255 255;
  --c-shadow: rgba(35, 32, 43, 0.12);
  --c-overlay: rgba(35, 32, 43, 0.5);
  --c-hover: rgba(35, 32, 43, 0.05);
  --c-picked: rgba(90, 63, 143, 0.1);
  --an-repeat: #5a3f8f;
  --an-first: #b9b3cc;
  --font-heading: var(--font-base);
  --radius: 8px;
  --radius-lg: 10px;
  --radius-btn: 8px;
}

@media (min-width: 48rem) {
  :root {
    --fs-body: 1.125rem; /* 18px */
    --fs-h1: 2.25rem;
    --fs-h2: 1.625rem;
    --fs-h3: 1.25rem;
  }
}

/* ------------------------------------------------------------------ */
/* 基本                                                                 */
/* ------------------------------------------------------------------ */

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

/* 上の帯を固定しているので、ページの中の移動は、帯の分だけ下に止める */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-base);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: 0.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p, ul, ol, dl { margin: 0 0 var(--sp-3); }

[hidden] { display: none !important; }

/* リンクは色だけでなく下線でも区別する */
a {
  color: var(--c-link);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition:
    color var(--dur) var(--ease),
    text-decoration-thickness var(--dur) var(--ease),
    text-underline-offset var(--dur) var(--ease);
}
a:hover { color: var(--c-link-hover); }
@media (hover: hover) {
  a:hover { text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
}

:focus-visible { outline: 3px solid var(--c-link); outline-offset: 2px; }

img { display: block; max-width: 100%; height: auto; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: -6rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border: 2px solid var(--c-accent);
  border-radius: var(--radius);
  background: var(--c-bg);
  transition: top 0.15s;
}
.skip-link:focus { top: var(--sp-2); }

/* ------------------------------------------------------------------ */
/* 並べ方                                                                */
/* ------------------------------------------------------------------ */
.page {
  width: 100%;
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: var(--sp-2);
}
@media (min-width: 30rem) {
  .page { padding-inline: var(--sp-3); }
}
.prose { max-width: var(--measure); }

/* 節は、札を縦に並べる。札どうしの間は、節の上下の余白で空ける */
.section { padding-block: var(--sp-1); }
.hero + .section { padding-top: var(--sp-4); }

/* 札（角の丸い箱） */
.card {
  padding: var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.card > :last-child { margin-bottom: 0; }

/* 節の見出し。飾りの線は付けない */
.h-accent { margin: 0 0 var(--sp-2); }

.hint { font-size: var(--fs-small); color: var(--c-text-muted); }

/* ------------------------------------------------------------------ */
/* ボタン                                                                */
/* ------------------------------------------------------------------ */
/* ふだんは枠だけ。いちばん押してほしいものだけ塗る（.btn--primary） */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.7rem 1.6rem;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--radius-btn);
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.btn:hover { border-color: var(--c-text); color: var(--c-text); }

.btn--primary { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { border-color: var(--c-accent-strong); background: var(--c-accent-strong); color: var(--c-on-accent); }

.btn--danger { border-color: var(--c-danger); background: transparent; color: var(--c-danger); }
.btn--danger:hover { border-color: var(--c-danger); background: var(--c-hover); color: var(--c-danger); }

.btn--ghost { border-color: var(--c-border); background: transparent; color: var(--c-text-muted); }

.btn .icon { --icon: 1em; }

/* 押した瞬間は、少し薄くする */
.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
}
.btn-row .btn { width: 100%; }

.stack { display: grid; gap: var(--sp-1); }
.stack .btn { width: 100%; }

/* 2行のボタン（上が操作、下が説明）。2行になるものは、丸めすぎない */
.btn--two { flex-direction: column; gap: 0; }
.btn--two small { font-weight: 500; font-size: 0.85rem; opacity: 0.85; }
.btn--two,
.status-btn { border-radius: var(--radius); }

/* ------------------------------------------------------------------ */
/* 上の帯（画面の上に固定する）                                          */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
}
/* 左にロゴと店名、右にページの中の移動。1段に収める */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1);
  min-height: 56px;
}
.site-header__name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: var(--tap-min);
  color: var(--c-text);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}
/* 長い店名は、帯の中では途中で切る（すぐ下の看板に、全部出ている） */
.site-header__name > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-header__name small {
  margin-left: 0.5em;
  color: var(--c-text-muted);
  font-family: var(--font-base);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.site-header__name:hover { color: var(--c-text); }
/* お店用の画面では、店名の下に「お店用の画面」と小さく添える（横に並べると、狭い画面で切れるため） */
.site-header__name > span { line-height: 1.3; }
.site-header__name small:not([data-shop]) { display: block; margin-left: 0; }
/* ロゴは、角の丸い四角の中に収める */
.site-header__mark {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 28%;
  background: var(--c-surface);
  object-fit: contain;
}

.site-header__inner > nav { flex: none; }
.site-header__nav {
  display: flex;
  gap: 0 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}
.site-header__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: var(--c-text-muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
@media (hover: hover) {
  .site-header__nav a:hover { color: var(--c-text); text-decoration: underline; }
}
.site-header__nav .icon { --icon: 0.9em; margin-left: 0.3em; }

/* 狭い画面では、帯の中の読みを隠す */
@media (max-width: 29.99rem) {
  .site-header__name small[data-shop="kana"] { display: none; }
}
@media (min-width: 48rem) {
  .site-header__nav { gap: 0 var(--sp-3); font-size: var(--fs-small); }
}

/* ------------------------------------------------------------------ */
/* 看板（ロゴ・店名・一言・ボタン）                                      */
/* ------------------------------------------------------------------ */
/* 真ん中にそろえて、上から順に置く */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-hero);
}
.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-5);
  text-align: center;
}
/* ロゴは、角の丸い四角の中に収める（丸いロゴでも四角いロゴでも収まる） */
.hero__logo {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 26%;
  background: var(--c-surface);
  box-shadow: 0 10px 30px var(--c-shadow);
  object-fit: contain;
}
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* 店名の上に、小さく添える英字（読み上げない） */
.hero__label {
  margin-bottom: 0.6rem;
  color: var(--c-accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 var(--sp-2);
  font-size: 2.1rem;
  letter-spacing: 0.06em;
  line-height: 1.3;
}
.hero__title small {
  color: var(--c-text-muted);
  font-family: var(--font-base);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.3em;
}
.hero__lead { max-width: 28em; margin: 0; }
.hero__meta { margin: var(--sp-1) 0 0; color: var(--c-text-muted); font-size: var(--fs-small); }

/* 「ただいま営業中」は、丸い札にして出す */
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: var(--sp-2) 0 0;
  padding: 0.35rem 1rem;
  border: 1px solid var(--c-border-strong);
  border-radius: 999px;
  background: var(--c-surface);
  font-size: var(--fs-small);
  font-weight: 700;
}
.open-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-border-strong);
}
.hero__status.is-open .open-dot { background: var(--st-free); }

/* 今の混み具合（看板の中）。営業中かどうか・空き／やや混み／満席・切り替えた時刻。
 * 営業時間外・お休みの日は、そのことだけを出す */
.crowd {
  width: 100%;
  max-width: 22rem;
  margin: var(--sp-3) 0 0;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  text-align: left;
}
.crowd:empty { display: none; }
.crowd p { margin: 0; }
.crowd .crowd__open,
.crowd .crowd__closed {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}
.crowd .crowd__open { font-size: var(--fs-small); }
.open-dot.is-on { background: var(--st-free); }
.crowd .crowd__level {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: var(--sp-2);
}
.crowd__level b { display: block; font-size: 1.6rem; line-height: 1.3; letter-spacing: 0.04em; }
.crowd__level small { display: block; color: var(--c-text-muted); font-size: var(--fs-small); }
.crowd .crowd__time,
.crowd .crowd__sub {
  margin-top: var(--sp-1);
  color: var(--c-text-muted);
  font-size: var(--fs-small);
}
.crowd .demo-note { margin: var(--sp-1) 0 0; }

.hero__actions {
  display: grid;
  gap: var(--sp-1);
  width: 100%;
  max-width: 22rem;
  margin: var(--sp-3) 0 0;
}
.hero__actions .btn { width: 100%; }

@media (min-width: 48rem) {
  .hero__inner { padding-block: var(--sp-6); }
  .hero__logo { width: 120px; height: 120px; }
  .hero__title { font-size: 2.75rem; }
  .hero__actions { grid-template-columns: 1fr 1fr; max-width: 30rem; }
}

/* 背景の画像。画像は config の hero.image で決める（入れなければ無地のまま）。
 * 画像があるときだけ、index.html の head が html に has-hero-scene と --hero-scene を付ける。
 * 画像は ::before、文字を読みやすくする地の色の膜は ::after に置き、中身はその上に重ねる */
.has-hero-scene .hero::before,
.has-hero-scene .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.has-hero-scene .hero::before { background: var(--hero-scene) center / cover no-repeat; }
.has-hero-scene .hero::after { background: rgb(var(--c-film) / 0.84); }
.has-hero-scene .hero > .hero__inner { z-index: 1; }
/* 無地に切り替えたときは、画像と膜を消す */
.hero-plain.has-hero-scene .hero::before,
.hero-plain.has-hero-scene .hero::after { display: none; }

/* 右上の切り替えボタン */
.hero-bg-btn {
  position: absolute;
  top: var(--sp-1);
  right: 0;
  z-index: 2;
  min-height: var(--tap-min);
  padding: 0.3rem 0.95rem;
  border: 1px solid var(--c-border-strong);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* 下の帯                                                               */
/* ------------------------------------------------------------------ */

.site-footer {
  margin-top: var(--sp-5);
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  padding-block: var(--sp-4);
  color: var(--c-text-muted);
  font-size: var(--fs-small);
  text-align: center;
}
.site-footer p { margin: 0; }
/* 「ページの先頭へ戻る」は、文字のリンクにする */
.site-footer .site-footer__top { margin-bottom: var(--sp-2); }
.site-footer__top a { display: inline-flex; align-items: center; min-height: var(--tap-min); }

.site-footer .site-footer__links { margin-bottom: var(--sp-1); }

/* 電話番号とプライバシーポリシーの文字のリンクは、指で押しやすいよう、押せる範囲だけを上下に広げる（見た目は変えない） */
.info a[href^="tel:"],
.site-footer__links a {
  display: inline-block;
  padding-block: 12px;
  margin-block: -12px;
}

/* SNS のリンク。下線は文字にだけ付ける（アイコンまで線が伸びないように） */
.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-1) var(--sp-3);
  margin: 0 0 var(--sp-2);
  padding: 0;
  list-style: none;
}
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap-min);
  color: var(--c-text);
  text-decoration: none;
}
.site-footer__social a > span:last-child {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
.site-footer__social .icon { --icon: 22px; color: var(--c-accent-2); }
.site-footer__social a:hover { color: var(--c-link); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
}

/* ---------- Openly（オープンリー）の表示 ----------
 * 下の帯のロゴ（押すと説明のページが開く）と、説明のページ（openly.html）
 */
/* 一番上の細い帯（お店の名前の上）。ロゴだけを置く */
.openly-strip {
  margin: 0;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  text-align: center;
}
.openly-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px;
  color: var(--c-text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}
.openly-strip img { display: block; height: 20px; width: auto; }
/* Openly のロゴは、地の明るさに合わせて出し分ける（data-tone は assets/look.js が付ける）。
 * 明るい地には on-light、暗い地には on-dark の付いた方だけを出す */
[data-tone="dark"] img.on-light,
html:not([data-tone="dark"]) img.on-dark { display: none; }
.openly-strip a:hover { color: var(--c-link); }

.site-footer__brand { margin: 0 0 var(--sp-2); }
.openly-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--tap-min);
  padding: 6px 12px;
  color: var(--c-text-muted);
  text-decoration: none;
}
/* ロゴの下に、文字で「Openlyのお店」と添える（ロゴに「のお店」をつなげる形にはしない） */
.openly-badge img { display: block; height: 30px; width: auto; }
.openly-badge span {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
.openly-badge:hover { color: var(--c-link); }


/* ---------- 線のアイコン ----------
 * 絵文字は使わない（端末ごとに絵が変わり、安っぽく見えるため）。
 * 形は細い線でそろえ、色は文字色（currentColor）に合わせる。
 */
.icon {
  --icon: 1.3em;
  display: inline-block;
  flex: none;
  width: var(--icon);
  height: var(--icon);
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
  vertical-align: middle;
}
.icon--mic { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2.5' width='6' height='11.5' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21.5M8.5 21.5h7'/%3E%3C/svg%3E"); }
.icon--tv { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='6.5' width='19' height='13' rx='2'/%3E%3Cpath d='M8 2.5l4 4 4-4M10.2 10.2v6l5-3z'/%3E%3C/svg%3E"); }
.icon--pot { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5h15v5.5a4 4 0 0 1-4 4h-7a4 4 0 0 1-4-4z'/%3E%3Cpath d='M2.5 10.5h19M9.5 7.5c-.6-.9.6-1.6 0-2.5M14.5 7.5c-.6-.9.6-1.6 0-2.5'/%3E%3C/svg%3E"); }
.icon--note { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5.5l11-2V16'/%3E%3Ccircle cx='6.5' cy='18' r='2.5'/%3E%3Ccircle cx='17.5' cy='16' r='2.5'/%3E%3C/svg%3E"); }
.icon--glass { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16l-8 9z'/%3E%3Cpath d='M12 13v7.5M8 20.5h8M6.5 7h11'/%3E%3C/svg%3E"); }
.icon--flag { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 20.5V3l10 4.2-10 4.3'/%3E%3Cpath d='M3.5 20.5h12'/%3E%3C/svg%3E"); }
.icon--phone { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3.5h3.3l1.7 4.3-2.2 1.4a11.5 11.5 0 0 0 5 5l1.4-2.2 4.3 1.7V17a2 2 0 0 1-2 2C10 19 5 14 3 7.5V5.5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.icon--check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.icon--external { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E"); }
.icon--instagram { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.4' cy='6.6' r='1.1' fill='black' stroke='none'/%3E%3C/svg%3E"); }

/* ---------- 状態の丸 ----------
 * 形は全て丸。色と、中の小さな印で見分ける（色が見分けにくい方のため）
 *   空席＝緑（印なし）／空いてない＝赤（横棒）／予約済み＝黄（時計）／会計済み＝青（チェック）
 */
.dot {
  --dot: 14px;
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--dot-c);
  vertical-align: middle;
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dot-mark, #fff);
  -webkit-mask: var(--glyph) center / 100% 100% no-repeat;
  mask: var(--glyph) center / 100% 100% no-repeat;
}
.dot--free { --dot-c: var(--st-free); }
.dot--free::after { content: none; }
.dot--busy {
  --dot-c: var(--st-busy);
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='5' y='8.5' width='10' height='3' rx='1.5'/%3E%3C/svg%3E");
}
.dot--reserved {
  --dot-c: var(--st-resv);
  --dot-mark: #3a2b00;
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5.5V10l3 2' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dot--paid {
  --dot-c: var(--st-paid);
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.8 10.4l2.8 2.8 5.6-5.8' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* やや混み（混み具合だけで使う）。黄色に、中の小さな丸 */
.dot--few {
  --dot-c: var(--st-resv);
  --dot-mark: #3a2b00;
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='3.4'/%3E%3C/svg%3E");
}
.dot--lg { --dot: 24px; }
/* 下地の色でふちを取って、枠に重ねる */
.dot--ring { box-shadow: 0 0 0 3px var(--ring, var(--c-surface)); }


/* ------------------------------------------------------------------ */
/* 今の席の空き                                                       */
/* ------------------------------------------------------------------ */

.seats { max-width: 40rem; }

.live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--sp-2);
  color: var(--c-text-muted);
  font-size: var(--fs-small);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--st-free);
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 2s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* 空きの数。枠で囲まず、細い縦線で区切って並べる */
.summary {
  display: flex;
  margin-bottom: var(--sp-3);
  line-height: 1.4;
}
.summary > div { flex: 1; }
.summary > div + div {
  padding-left: var(--sp-3);
  border-left: 1px solid var(--c-border-strong);
}
.summary span { display: block; color: var(--c-text-muted); font-size: var(--fs-small); }
.summary b { display: block; margin: 0.15rem 0; font-size: 1.5rem; }
.summary small { color: var(--c-text-muted); font-size: 0.85rem; }

/* 席の図 */
.map {
  --ring: var(--c-bg);
  padding: var(--sp-3) var(--sp-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
}
/* カウンターの天板を、太めの線1本で表す */
.map-bar {
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--c-border-strong);
  color: var(--c-text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-align: center;
}
.map-row {
  display: grid;
  /* カウンターの席の数（設定の数）に合わせて、横に等分する */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
  margin-top: 12px;
  padding-bottom: 10px; /* カウンターの丸が下にはみ出す分 */
}
.map-gap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--sp-3) 0 var(--sp-2);
  color: var(--c-text-muted);
  font-size: 0.8rem;
}
.map-gap::before,
.map-gap::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--c-border);
}
/* ボックスは、数に合わせて横に等分する */
.map-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: 8px;
}

/* 席ひとつ */
.seat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 2px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  line-height: 1.3;
  text-align: center;
}
button.seat {
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  button.seat:not(.is-off):hover { border-color: var(--c-text); }
}

/* カウンターは椅子の形（上が丸い） */
.seat--counter {
  min-height: 60px;
  padding-bottom: 12px;
  border-radius: 999px 999px 8px 8px;
}
.seat--box { min-height: 124px; padding: 10px 4px; }

/* 枠と下地は、丸よりずっとひかえめに */
.seat.is-free     { border-color: rgba(35, 165, 90, 0.5);  background: rgba(35, 165, 90, 0.06); }
.seat.is-busy     { border-color: rgba(242, 63, 67, 0.5);  background: rgba(242, 63, 67, 0.06); }
.seat.is-reserved { border-color: rgba(240, 178, 50, 0.55); background: rgba(240, 178, 50, 0.06); }
.seat.is-paid     { border-color: rgba(74, 125, 255, 0.55); background: rgba(74, 125, 255, 0.06); }

.seat.is-off { opacity: 0.3; cursor: not-allowed; }
/* 選んだ席は、濃い枠と右上のチェック */
.seat.is-picked {
  border-color: var(--c-text);
  background: var(--c-picked);
  box-shadow: 0 0 0 1px var(--c-text);
}

.seat-no { font-size: 1.15rem; font-weight: 700; }
/* カウンターの丸は、席の下の端に重ねる */
.seat-dot {
  --dot: 18px;
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
}
.seat-name { font-size: 0.95rem; font-weight: 700; }
.seat-cap { color: var(--c-text-muted); font-size: 0.8rem; }
.seat-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.seat-who {
  max-width: 100%;
  overflow: hidden;
  color: var(--c-text-muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seat-check {
  position: absolute;
  top: -10px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c-text);
  color: var(--c-bg);
}
.seat-check .icon { --icon: 15px; }

/* ソファの形（L字・逆L字・通常）と机。線で描く */
.sofa {
  position: relative;
  width: 44px;
  height: 32px;
  margin-bottom: 4px;
  color: var(--c-text-muted);
}
.sofa::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}
.sofa--L { border-left: 6px solid currentColor; border-bottom: 6px solid currentColor; border-radius: 0 0 0 6px; }
.sofa--L::after { right: 4px; top: 4px; }
.sofa--Lr { border-right: 6px solid currentColor; border-bottom: 6px solid currentColor; border-radius: 0 0 6px 0; }
.sofa--Lr::after { left: 4px; top: 4px; }
.sofa--I { width: 36px; border-bottom: 6px solid currentColor; border-radius: 0 0 4px 4px; }
.sofa--I::after { left: 7px; top: 4px; }

/* 色の見方 */
.legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: var(--sp-3) 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
}
.legend li { display: flex; align-items: center; gap: 10px; line-height: 1.4; }
.legend .dot { --dot: 16px; }
.legend small { display: block; color: var(--c-text-muted); font-size: 0.8rem; }

/* ------------------------------------------------------------------ */
/* 開け閉じできる節                                                      */
/* ------------------------------------------------------------------ */
/* 角の丸い札にして、縦に並べる。見出しの行を押すと開く */

.section--fold,
.section--seats { padding-block: var(--sp-1); }

.fold {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
/* 一番見てほしい「席状況の確認」は、枠を濃くする */
.fold--seats { border-color: var(--c-border-strong); }

.fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 68px;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold-title { margin: 0; font-size: 1.2rem; }

/* 「開く」と、線で描いた ＋。開くと「閉じる」と − になる */
.fold-hint {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  color: var(--c-text-muted);
  font-size: var(--fs-small);
  font-weight: 700;
}
.fold-hint::before { content: "開く"; }
.fold[open] .fold-hint::before { content: "閉じる"; }
.fold-hint::after {
  content: "";
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
}
.fold[open] .fold-hint::after {
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}
@media (hover: hover) {
  .fold > summary:hover .fold-hint { color: var(--c-text); }
}

/* 開いたときは、見出しの行の下に線を引いて、中身と分ける */
.fold[open] > summary {
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.fold-body { padding: 0 var(--sp-3) var(--sp-3); }
.fold-body > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/* 予約                                                                 */
/* ------------------------------------------------------------------ */

/* 持ち時間の決まり。薄い色の箱に入れて、目を引く */
.note {
  padding: var(--sp-2);
  border-radius: var(--radius);
  background: var(--c-surface-2);
}

.demo-note { color: var(--c-text-muted); font-size: 0.875rem; }
.demo-note::before { content: "※"; }

/* 手順。今の手順に下線を引く */
.steps {
  display: flex;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
  padding: 0;
  border-bottom: 1px solid var(--c-border);
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0.25rem 0 0.6rem;
  color: var(--c-text-muted);
  font-size: var(--fs-small);
  white-space: nowrap;
  counter-increment: step;
}
.steps li::before { content: counter(step) ". "; }
.steps li.is-current { color: var(--c-text); font-weight: 700; }
.steps li.is-current::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--c-text);
}

.field { min-width: 0; margin: 0 0 var(--sp-3); padding: 0; border: 0; }
.field > label,
.field > legend {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0;
  font-weight: 700;
}

.input,
.textarea {
  width: 100%;
  min-height: 54px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface-2);
  color: var(--c-text);
  font: inherit;
  font-size: 1.125rem;
  transition: border-color var(--dur) var(--ease);
}
.textarea { min-height: 120px; line-height: 1.6; resize: vertical; }
.input:focus,
.textarea:focus { border-color: var(--c-link); }
.input::placeholder,
.textarea::placeholder { color: var(--c-placeholder); }

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-1);
}
.choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice {
  min-height: 52px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface-2);
  color: var(--c-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
@media (hover: hover) {
  .choice:hover { border-color: var(--c-text-muted); }
}
.choice[aria-pressed="true"] { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-on-accent); }

.err {
  min-height: 1.8em;
  margin: var(--sp-1) 0 0;
  color: var(--c-danger);
  font-weight: 700;
}

.pick-hint { margin-bottom: var(--sp-2); font-weight: 700; }
.picked { margin: var(--sp-2) 0 0; font-weight: 700; }

/* かくにん。細い線で区切った表 */
.confirm {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 0 0 var(--sp-2);
  border-top: 1px solid var(--c-border);
}
.confirm dt,
.confirm dd {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--c-border);
}
.confirm dt { padding-right: var(--sp-3); color: var(--c-text-muted); }
.confirm dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

.done {
  padding: var(--sp-4) var(--sp-3);
  border: 1px solid var(--c-border);
  border-top: 2px solid var(--c-accent);
  border-radius: var(--radius);
  text-align: center;
}
.done-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--sp-2);
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-on-accent);
}
.done-mark .icon { --icon: 30px; }
.done-title { margin-bottom: var(--sp-1); font-size: var(--fs-h2); font-weight: 700; }
.done-time { font-size: 1.15rem; }
.done .btn { margin-top: var(--sp-2); }

.closed {
  padding: var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

/* ------------------------------------------------------------------ */
/* お値段                                                               */
/* ------------------------------------------------------------------ */

.price { margin: 0; padding: 0; }
.price > div {
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--c-border);
}
.price > div:last-child { border-bottom: 0; }
.price dt {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 10px;
}
/* 品名と値段をつなぐ点線 */
.price dt::after {
  content: "";
  flex: 1;
  min-width: 16px;
  border-bottom: 1px dotted var(--c-border-strong);
}
.price dd { flex: none; margin: 0; font-size: 1.1rem; font-weight: 700; }

/* ------------------------------------------------------------------ */
/* スタッフの紹介                                                       */
/* ------------------------------------------------------------------ */

/* Instagram の新しい投稿（3列×2段の写真。押すと Instagram が開く） */
.insta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.insta li { margin: 0; }
.insta a { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 8px; background: var(--c-surface-2); }
.insta img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity var(--dur) var(--ease); }
.insta a:hover img { opacity: 0.88; }
.insta a:focus-visible { outline: 3px solid var(--c-link); outline-offset: 2px; }
/* 動画の投稿の印（細い線の再生の形） */
.insta-video {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M9.5 7.5v9l7-4.5z'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.insta-more { margin: var(--sp-2) 0 0; }
/* お店用の画面の、小さな並び（今お客さん用の画面に出ているもの） */
.insta--admin { grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: var(--sp-1); }
.insta--admin a { border-radius: 4px; }

.staff { display: grid; gap: var(--sp-4); max-width: 44rem; }
@media (min-width: 40rem) {
  .staff { grid-template-columns: 1fr 1fr; }
}
.staff-role {
  margin: 0 0 var(--sp-1);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}
.staff-likes { margin: 0; padding: 0; list-style: none; }
/* その人からの一言（好きなことの下に置く） */
.staff-note { margin: var(--sp-1) 0 0; color: var(--c-text-muted); }
.staff-likes li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0;
}
.staff-likes .icon { --icon: 22px; color: var(--c-accent-2); }

/* ------------------------------------------------------------------ */
/* 今日のひとこと                                                       */
/* ------------------------------------------------------------------ */

.posts { margin: 0; padding: 0; border-top: 1px solid var(--c-border); list-style: none; }
.posts > li { padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-border); }
.post-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  color: var(--c-text-muted);
  font-size: var(--fs-small);
}
.who-tag { color: var(--c-text); font-weight: 700; }
.post-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ */
/* 営業時間と場所                                                       */
/* ------------------------------------------------------------------ */

.info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem var(--sp-3);
}
.info { margin-bottom: 0; }
.info + p { margin: var(--sp-3) 0 0; }
.info dt { color: var(--c-text-muted); }
.info dd { margin: 0; font-weight: 700; }

/* ================================================================== */
/* お店用の画面                                                         */
/* ================================================================== */

/* 節はすべて開け閉じできる一覧にする（お客さん用の画面の開け閉じと同じ形） */
.admin-main { padding-bottom: var(--sp-5); }
.admin-main .section--fold:first-of-type { margin-top: var(--sp-3); }

/* 予約状況の件数（来店待ち）。閉じていても、予約が入っていることが分かるように見出しに添える */
.fold-count {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--st-resv);
  border-radius: 999px;
  color: var(--c-text);
  font-size: 0.85rem;
  font-weight: 700;
  vertical-align: 0.2em;
}

.mock-banner {
  margin: var(--sp-2) 0 0;
  color: var(--c-text-muted);
  font-size: var(--fs-small);
}
.mock-banner::before { content: "※"; }

/* 本番だけ。LINE の通知の欄。届け先を足すときの4桁の番号 */
.line-code {
  margin: var(--sp-1) 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}
.line-actions { display: grid; gap: var(--sp-1); margin-top: var(--sp-2); }
.line-actions .btn { width: 100%; }

/* 本番だけ。サーバーとつながっていないとき・操作を送れなかったときの知らせ */
.conn-note {
  margin: var(--sp-2) 0 0;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-danger);
  border-radius: var(--radius);
  color: var(--c-danger);
  font-weight: 700;
}

/* 状況の確認。数を細い線で区切って並べる */
.counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--c-border);
  list-style: none;
}
@media (min-width: 40rem) {
  .counts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.counts li {
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--c-border);
}
.count-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text-muted);
  font-size: var(--fs-small);
}
.counts .num { display: block; font-size: 2rem; font-weight: 700; line-height: 1.3; }

/* 予約状況。左の黄色い線が「予約済み」の印 */
.res-list { margin: 0; padding: 0; list-style: none; }
.res-list > li {
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--st-resv);
  border-radius: var(--radius);
  background: var(--c-surface);
}
.res-list > li + li { margin-top: var(--sp-1); }
.res-list p { margin: 0 0 0.25rem; }
.res-name { font-size: 1.2rem; font-weight: 700; }
.res-deadline { font-weight: 700; }
.res-deadline.is-soon { color: var(--c-danger); }
.res-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-1);
  margin-top: var(--sp-2);
}
.res-actions .btn { width: 100%; }
.tel { display: inline-flex; align-items: center; gap: 6px; }
.tel .icon { --icon: 1.05em; }

.empty {
  padding: var(--sp-2) 0;
  color: var(--c-text-muted);
  list-style: none;
}

/* はじめて／2回目以降の札。はじめての方は、差し色の枠で気づけるようにする */
.visit-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.5rem;
  border: 1px solid var(--c-border-strong);
  border-radius: 4px;
  color: var(--c-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.8;
  vertical-align: middle;
}
.visit-tag--first { border-color: var(--c-accent-2); color: var(--c-text); }

/* ひとことを書く */
.who-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-1);
  margin: 0 0 var(--sp-2);
  padding: 0;
  border: 0;
}
.who-pick legend { margin-bottom: 0.5rem; padding: 0; font-weight: 700; }
.who-pick label { position: relative; }
.who-pick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.who-pick span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface-2);
  font-weight: 700;
}
.who-pick input:checked + span { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-on-accent); }
.who-pick input:focus-visible + span { outline: 3px solid var(--c-link); outline-offset: 2px; }

.posts--admin { margin-top: var(--sp-1); }
/* 「書き込む」のボタンと、下の「書いたもの」の見出しの間をあける */
[data-post-form] + h3 { margin-top: var(--sp-4); }
.post-actions { margin-top: var(--sp-1); }
.post-actions .btn { min-height: 40px; padding: 0.3rem 1rem; font-size: var(--fs-small); }

/* 下から出る操作パネル */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--c-overlay);
}
.sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 41;
  max-width: 560px;
  max-height: 90vh;
  margin: 0 auto;
  overflow-y: auto;
  padding: var(--sp-3) var(--sp-3) calc(var(--sp-3) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--c-border-strong);
  border-radius: 16px 16px 0 0;
  background: var(--c-surface);
}
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: sheet-in 0.25s var(--ease); }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
.sheet h3 { margin: 0 0 0.25rem; font-size: var(--fs-h2); }
.sheet-now { margin-bottom: var(--sp-2); color: var(--c-text-muted); }
.sheet-now b { display: inline-flex; align-items: center; gap: 6px; color: var(--c-text); }
.sheet .res-card {
  margin-bottom: var(--sp-2);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--st-resv);
  border-radius: var(--radius);
}
.sheet .res-card p { margin: 0 0 0.25rem; }
.status-btn { justify-content: flex-start; gap: 14px; text-align: left; }
.status-btn small { display: block; color: var(--c-text-muted); font-size: 0.85rem; font-weight: 500; }
.status-btn.is-current { border-color: var(--c-text); background: var(--c-surface-2); }
.status-btn .now-tag {
  margin-left: auto;
  color: var(--c-text-muted);
  font-size: 0.8rem;
  font-style: normal;
}

/* ------------------------------------------------------------------ */
/* 分析                                                                 */
/* ------------------------------------------------------------------ */

/* 期間の切り替え。選んだものに下線 */
.range {
  display: flex;
  margin: var(--sp-2) 0 var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.range-btn {
  flex: 1;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--c-text-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.range-btn + .range-btn { border-left: 1px solid var(--c-border-strong); }
.range-btn[aria-pressed="true"] {
  background: var(--c-surface-2);
  color: var(--c-text);
  box-shadow: inset 0 -2px 0 var(--c-text);
}

.hero-fig { display: flex; flex-direction: column; }
.hero-fig-label { color: var(--c-text-muted); font-weight: 700; }
.hero-fig-value { font-size: 56px; font-weight: 700; line-height: 1.15; }
.hero-fig-value small { margin-left: 4px; font-size: 0.45em; }
.hero-fig-sub { color: var(--c-text-muted); font-size: var(--fs-small); }

/* 全体のうち、2回目以降がどれだけか（1本の帯） */
.split { display: flex; gap: 2px; height: 12px; margin-top: var(--sp-2); }
.split > span { min-width: 2px; }
.split-repeat { background: var(--an-repeat); }
.split-first { background: var(--an-first); }
.split > :first-child { border-radius: 4px 0 0 4px; }
.split > :last-child { border-radius: 0 4px 4px 0; }
.split > :only-child { border-radius: 4px; }

.an-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
}
.an-legend li { display: flex; align-items: center; gap: 8px; }
.an-legend--small { margin: 0; color: var(--c-text-muted); font-size: 0.85rem; }
.swatch { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.swatch--repeat { background: var(--an-repeat); }
.swatch--first { background: var(--an-first); }

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--sp-3) 0 var(--sp-1);
  padding: 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  list-style: none;
}
.kpis li { padding: 0.75rem 0; line-height: 1.4; }
.kpis li + li { padding-left: var(--sp-2); border-left: 1px solid var(--c-border); }
.kpis span { display: block; color: var(--c-text-muted); font-size: 0.8rem; }
.kpis b { font-size: 1.4rem; }

/* ホームページから来たお客さん（ネット予約＋見て来た予約なし）の合計 */
.hp-effect {
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  background: var(--c-surface-2);
}
.hp-effect-title { margin: 0; color: var(--c-text-muted); font-size: var(--fs-small); font-weight: 700; }
.hp-effect-value { margin: 0; font-size: var(--fs-small); }
.hp-effect-value b { font-size: 2rem; font-variant-numeric: tabular-nums; }
.hp-effect .hint { margin: 0; }

/* ホームページを見て来たお客さん（予約なし）を数える。忙しいときもすぐ押せるよう、いつも出しておく */
.walkin {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.walkin-title { margin: 0 0 var(--sp-1); font-size: 1.2rem; }
.walkin .hint { margin: 0; }
.walkin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  margin-top: var(--sp-2);
}
.walkin-row .btn { flex: 1 1 12rem; }
.walkin-today { margin: 0; color: var(--c-text-muted); font-size: var(--fs-small); }
.walkin-today b { color: var(--c-text); font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.walkin .link-btn { margin-top: var(--sp-1); }

/* お店用：今の混み具合（ボタン3つ）と、臨時のお休み。開け閉じの中に入れず、画面の上にいつも出す */
.crowd-admin {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.crowd-admin .hint { margin: 0; }
.crowd-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-1);
  margin-top: var(--sp-2);
}
.crowd-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-height: 5.5rem;
  padding: var(--sp-1) 0.25rem;
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.crowd-btn:hover { border-color: var(--c-border-strong); }
.crowd-btn[aria-pressed="true"] { border-color: var(--c-text); background: var(--c-picked); }
.crowd-btn small { color: var(--c-text-muted); font-size: 0.78rem; font-weight: 500; line-height: 1.4; }
.crowd-now { margin: var(--sp-2) 0 0; font-size: var(--fs-small); }
.crowd-auto {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: var(--sp-2) 0 var(--sp-1);
  font-size: 1.3rem;
  font-weight: 700;
}
.dayoff {
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--c-border);
}
.dayoff p { margin: 0 0 var(--sp-1); }
.dayoff .btn { width: 100%; }
.dayoff.is-on p { font-weight: 700; }

.chart {
  position: relative;
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-2) 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
}
.chart-title { margin: 0; font-weight: 700; }
.chart-max { margin: 2px 0 8px; color: var(--c-text-muted); font-size: 0.8rem; }
.chart-plot {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 2px;
  height: 140px;
  border-bottom: 1px solid var(--c-border-strong);
}
/* 当たり判定は、棒より広い（その日の縦一列ぜんぶ） */
.col {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px 4px 0 0;
  background: transparent;
  cursor: pointer;
}
.col-stack { display: flex; flex-direction: column; gap: 2px; width: 100%; max-width: 24px; }
.col-stack > span { display: block; }
.col-stack > :first-child { border-radius: 4px 4px 0 0; }
.col-repeat { background: var(--an-repeat); }
.col-first { background: var(--an-first); }
.col:focus-visible { outline: 2px solid var(--c-link); outline-offset: 1px; }
@media (hover: hover) {
  .col:hover { background: var(--c-hover); }
  .col:hover .col-stack { opacity: 0.8; }
}
.chart-x {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 2px;
  margin-top: 6px;
  color: var(--c-text-muted);
  font-size: 0.75rem;
}
.chart-x span { overflow: visible; text-align: center; white-space: nowrap; }

.tip {
  position: absolute;
  z-index: 5;
  padding: 8px 12px;
  border: 1px solid var(--c-border-strong);
  border-radius: 8px;
  background: var(--c-surface);
  box-shadow: 0 6px 18px var(--c-shadow);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -100%);
}
.tip-head { color: var(--c-text-muted); }
.tip b { font-size: 1rem; }
.tip-foot { margin-top: 2px; color: var(--c-text-muted); }
.key { display: inline-block; width: 12px; height: 2px; margin-right: 8px; vertical-align: middle; }
.key--repeat { background: var(--an-repeat); }
.key--first { background: var(--an-first); }

.table-view { margin-top: var(--sp-2); }
.table-view summary { color: var(--c-link); font-weight: 700; cursor: pointer; }
.table-view table {
  width: 100%;
  margin-top: var(--sp-1);
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.table-view th,
.table-view td { padding: 6px 4px; border-bottom: 1px solid var(--c-border); text-align: right; }
.table-view th { color: var(--c-text-muted); font-weight: 500; }
.table-view th:first-child,
.table-view td:first-child { text-align: left; }

/* ------------------------------------------------------------------ */
/* 動きを減らす設定の方へ                                               */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* スマホで押しやすいよう、手順の中と店用の画面のボタンは横いっぱいにする */
[data-reserve] > .btn,
.done .btn,
.admin-main form .btn,
.admin-main .fold-body > .btn { width: 100%; }

/* 開け閉じの中の一覧は、外側の区切り線と二重にならないようにする */
.fold-body .posts { border-top: 0; }
.fold-body .posts > li:first-child { padding-top: 0; }
.fold-body .posts > li:last-child { border-bottom: 0; padding-bottom: 0; }

/* 満席で押せない予約ボタン。灰色にして、触っても反応しないようにする */
.btn.is-disabled,
.btn.is-disabled:hover {
  border-color: var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text-muted);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
  pointer-events: none;
}
.closed p:last-child { margin-bottom: 0; }

/* 更新時刻と、満席テストのボタンを横に並べる（狭いときは折り返す） */
.seats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-2);
  margin-bottom: var(--sp-2);
}
.seats-head .live { margin: 0; }
.seats-head .test-btn { margin-left: auto; } /* 折り返しても右に寄せる */

/* 見本だけのテスト用ボタン。お客さん向けのボタンと見分けがつくよう、点線の枠にする */
.test-btn {
  flex: none;
  min-height: var(--tap-min);
  padding: 0.3rem 0.9rem;
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
@media (hover: hover) {
  .test-btn:hover { border-color: var(--c-text-muted); color: var(--c-text); }
}
.test-btn[aria-pressed="true"] { border-color: var(--st-busy); color: var(--c-text); }

/* ------------------------------------------------------------------ */
/* お店用の画面のログイン                                               */
/* ------------------------------------------------------------------ */

.login { padding-block: var(--sp-5); }
.login-box { max-width: 26rem; margin-inline: auto; }
.login-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: var(--sp-2);
  border-radius: 26%;
  background: var(--c-surface);
  object-fit: contain;
}
.login-title { margin: 0 0 var(--sp-3); font-size: var(--fs-h2); }
.login-title small {
  display: block;
  margin-top: 0.25rem;
  color: var(--c-text-muted);
  font-size: var(--fs-small);
  font-weight: 500;
}
/* スマホで押しやすいよう、ボタンは横いっぱい。続けて並ぶときは少し間をあける */
.login .btn { width: 100%; }
.login .btn + .btn { margin-top: var(--sp-1); }
.login-other,
.login-demo,
.login-box > .hint { margin-top: var(--sp-2); }

/* 文字だけのボタン（リンクと同じ見た目。色だけでなく下線でも分かるように） */
.link-btn {
  min-height: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-link);
  font: inherit;
  font-size: var(--fs-small);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* お店用の画面の一番下のログアウト */
.logout { margin-top: var(--sp-4); }
.logout .btn { width: 100%; }

/* 確認のパネル（取り消す・消すの前に出す） */
.confirm-body { margin: var(--sp-1) 0 0.25rem; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.sheet-sub { margin: var(--sp-2) 0 var(--sp-1); color: var(--c-text-muted); font-size: var(--fs-small); }

/* お店への通知（「確認しました」を押すまで、画面の一番上に出しておく） */
.notices {
  margin-top: var(--sp-3);
  padding: var(--sp-2);
  border: 1px solid var(--st-resv);
  border-radius: var(--radius);
  background: var(--c-surface);
}
.notices-title { display: flex; align-items: center; margin: 0 0 var(--sp-1); font-size: var(--fs-h3); }
.notice-list { margin: 0; padding: 0; list-style: none; }
.notice { padding: var(--sp-1) 0 var(--sp-1) var(--sp-2); border-left: 3px solid var(--st-resv); }
.notice + .notice { margin-top: var(--sp-1); }
.notice--expired { border-left-color: var(--c-border-strong); }
.notice p { margin: 0; }
.notice-head { display: flex; justify-content: space-between; gap: var(--sp-1); }
.notice-head time { flex: none; color: var(--c-text-muted); font-size: var(--fs-small); }
.notice .notice-body { margin-top: 0.25rem; line-height: 1.6; }
.notice-actions { display: grid; gap: var(--sp-1); margin-top: var(--sp-2); }
.notice-actions .btn { width: 100%; }
/* 画面を閉じていても届く通知の設定 */
.push { margin-top: var(--sp-2); }
.push .btn { width: 100%; }
.push-title { margin: 0 0 var(--sp-1); font-weight: 700; }
.push-steps { margin: 0; padding-left: 1.4em; color: var(--c-text-muted); font-size: var(--fs-small); line-height: 1.7; }
.push-actions { display: grid; gap: var(--sp-1); }
.push-msg { margin: var(--sp-1) 0 0; color: var(--c-link); font-size: var(--fs-small); }

/* ご要望・備考。左の線で、ほかの情報と分けて目に入るようにする */
.res-note {
  margin-top: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-left: 2px solid var(--c-border-strong);
  background: var(--c-surface-2);
  font-size: var(--fs-small);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notice .res-note { margin-top: 0.4rem; }
.done-note { color: var(--c-text-muted); font-size: var(--fs-small); overflow-wrap: anywhere; }
.textarea--short { min-height: 72px; }
.res-list .res-note { margin-top: 0.4rem; }
