:root {
  --mint: #22c9ab;
  --mint-dark: #0e9c85;
  --mint-dark-rgb: 14, 156, 133;
  --sky: #14b8d4;
  --lavender: #8b5cf6;
  --bg: #f2fbf9;
  --ink: #1c2a27;
  --line: #bfe6da;
  --green: #7ecb95;
  --yellow: #f0c36d;
  --red: #f0928a;
  --gray: #7d8f89;
  --accent-blue: #0ea5c7;
  --accent-gold: #d97706;
  --accent-pink: #ec4899;
}

/* 管理画面だけ紫を基調にしたテーマ（同じ変数を上書きするだけで全体に反映される） */
body.admin-theme {
  --mint: #b6a3ea;
  --mint-dark: #8468d6;
  --mint-dark-rgb: 132, 104, 214;
  --sky: #f0a8d0;
  --bg: #faf8fd;
  --line: #e6def7;
  --accent-blue: #93d8ee;
  --accent-gold: #e0b559;
  --accent-pink: #f0a8cf;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

header.site {
  background: linear-gradient(135deg, var(--mint-dark), var(--sky));
  color: #fff;
  padding: 20px 24px;
}
header.site.has-lang-switch {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
header.site h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.05em;
}
header.site p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.9;
}
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.lang-switch {
  flex-shrink: 0;
  display: inline-block;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
}
.lang-switch:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* スマホ幅では、タイトル・注意書きを中央揃えでまとめ、下に操作ボタンを並べるスッキリしたレイアウトにする */
@media (max-width: 640px) {
  header.site {
    padding: 22px 16px 18px;
  }
  header.site.has-lang-switch {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .site-text {
    text-align: center;
  }
  .header-actions {
    justify-content: center;
    width: 100%;
    gap: 8px;
  }
  /* タイトルが折り返さず1行に収まるよう、スマホ幅では文字サイズと字間を詰める */
  header.site h1 {
    font-size: 17px;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  header.site p {
    font-size: 12px;
  }
  .lang-switch {
    font-size: 13px;
    padding: 8px 14px;
  }
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* 画面右下に1つだけ丸いボタンを固定表示し、タップすると画面中央に大きなパネルとして
   メニューを開く（予約画面のよくあるご質問・予約照会・Englishへのリンクや、管理画面の
   データ・一斉メールなどの各機能を、小さなドロップダウンではなくしっかり見える大きさで
   表示するため）。パネルの外側（半透明の背景）をタップしても閉じられる。 */
.fab-menu {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
}
.fab-toggle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--mint-dark);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(var(--mint-dark-rgb), 0.35);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-toggle-btn:hover { filter: brightness(0.95); }
.fab-dropdown {
  position: fixed;
  inset: 0;
  background: rgba(60, 70, 69, 0.45);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fab-dropdown-inner {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(60, 70, 69, 0.35);
  padding: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 84vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fab-dropdown-inner a,
.fab-dropdown-inner button {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: var(--bg);
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.fab-dropdown-inner a:hover, .fab-dropdown-inner button:hover { filter: brightness(0.97); }
.fab-dropdown-subpanel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin: -2px 0 4px;
}
.fab-dropdown-close {
  margin-top: 8px;
  background: none !important;
  border: 1px solid var(--line) !important;
  text-align: center !important;
  color: var(--gray) !important;
  font-weight: 600 !important;
}
.fab-dropdown-logout {
  margin-top: 8px;
  background: none !important;
  border: 1px solid #e8988c !important;
  text-align: center !important;
  color: #c0392b !important;
  font-weight: 700 !important;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(var(--mint-dark-rgb), 0.1);
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 体験選択カード内の「料金（税込）」見出し。ステップ番号を持たない補足的な見出しなので、
   step-titleより控えめに（丸番号なし・細字）する */
.menu-subhead {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.menu-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  margin: 0 0 10px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mint-dark);
  color: #fff;
  font-size: 12px;
}

.party-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.party-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  min-width: 70px;
}
.party-btn.active {
  background: var(--mint-dark);
  color: #fff;
  border-color: var(--mint-dark);
}

/* 管理画面「空き状況一覧」：吹きガラス・とんぼ玉を1つの表にまとめて表示する。
   木曜自動停止のように吹きガラスだけ停止・とんぼ玉は営業中、といった食い違いがある枠は、
   背景は吹きガラスの状況の単色のままにし（数字の視認性を保つため）、左下に小さい印を
   付けてとんぼ玉の状況が異なることを表す（凡例のミニプレビュー用のスタイル） */
.legend-dot-corner {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}
.legend-corner-mark {
  position: absolute;
  left: 1px;
  bottom: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid #fff;
  display: block;
}

/* 当日より前の日付は、一目で「過ぎた日」と分かるよう列全体を薄いグレーの斜線パターンにする */
table.range-grid-table th.date-col.past,
table.range-grid-table td.slot-cell.past {
  background: repeating-linear-gradient(
    135deg,
    #eef1f0,
    #eef1f0 5px,
    #e4e9e7 5px,
    #e4e9e7 10px
  );
  color: var(--gray);
}
table.range-grid-table td.slot-cell.past .cell-fill {
  opacity: 0.55;
}
.legend-dot-past {
  background: repeating-linear-gradient(
    135deg,
    #eef1f0,
    #eef1f0 3px,
    #cfd6d3 3px,
    #cfd6d3 6px
  );
  border: 1px solid var(--line);
}

/* 体験選択（吹きガラス／とんぼ玉／レジン）ボタン。party-btnと同じ見た目をベースに、
   一番最初に選ぶ重要な項目として少し大きめにしている。 */
.exp-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.exp-btn {
  flex: 1;
  min-width: 100px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 14px 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.exp-btn.active {
  background: var(--mint-dark);
  color: #fff;
  border-color: var(--mint-dark);
}
.exp-btn.disabled {
  background: #f2f7f6;
  color: var(--gray);
  cursor: not-allowed;
}
/* 管理画面「ストーリー用画像」ポップオーバーの体験選択（吹きガラス／とんぼ玉／レジン）。
   小さいポップオーバー内に収まるよう、.exp-btnより一回り小さいコンパクトな見た目にしている。 */
.ig-exp-btn.active {
  background: var(--mint-dark);
  color: #fff;
  border-color: var(--mint-dark);
}
.exp-btn .exp-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
  opacity: 0.85;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-header button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.cal-header .cal-title { font-weight: 700; font-size: 15px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  color: var(--gray);
  padding: 4px 0;
}
.cal-day {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  gap: 2px;
  position: relative;
}
.cal-day.empty { visibility: hidden; cursor: default; }
.cal-day.selected { outline: 2px solid var(--mint-dark); }
.cal-day.sunday span:first-child { color: var(--red); }
.cal-day.has-stop::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.cal-day .dot { width: 7px; height: 7px; border-radius: 50%; }
.cal-day.status-available .dot { background: var(--green); }
.cal-day.status-few .dot { background: var(--yellow); }
.cal-day.status-closed, .cal-day.status-past {
  color: var(--gray);
  cursor: not-allowed;
  background: #f2f7f6;
}
.cal-day.status-closed .dot, .cal-day.status-past .dot { background: transparent; }
/* 実際に予約が入っていて満枠の日は、他の空き状況アイコン（小さい丸）より目立つよう
   「満員御礼」バッジで表示し、定休日と同じくクリックできないようにする。
   キャンセル待ちの登録は、カレンダー下の「キャンセル待ちに登録する」ボタンから行う。
   （予約が入っておらず、木曜自動停止やスタッフの終日停止だけで埋まっている日は
   紛らわしくないよう、通常の定休日と同じただのグレー表示（status-closed）にする） */
.cal-day.status-full {
  cursor: not-allowed;
  background: #fdf0ef;
}
.cal-day.status-full .full-label {
  font-size: clamp(7px, 2.3vw, 10px);
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border-radius: 4px;
  padding: 1px 3px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
/* キャンセル待ち登録ページのカレンダーだけは、満員御礼の日もクリックしてご希望日として
   選択できるようにする（このページ自体が満員の日に登録するためのものなので、通常の
   予約カレンダーとは逆に「満員でも選べる」必要がある）。 */
#wsCalGrid .cal-day.status-full { cursor: pointer; }
.cal-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--gray);
  margin-top: 10px;
  flex-wrap: wrap;
}
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.slot-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}
.slot-btn .time { font-weight: 700; display: block; margin-bottom: 2px; }
.slot-btn.full {
  background: #f2f7f6;
  color: var(--gray);
  cursor: not-allowed;
}
.slot-btn.avail { border-color: var(--green); }
.slot-btn.avail:hover { background: #eefbf2; }

label { display: block; font-size: 13px; margin: 10px 0 4px; font-weight: 500; color: var(--ink); }
input[type=text], input[type=tel], input[type=email], input[type=password], textarea, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; min-height: 60px; }

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  background: #faf8fd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  margin: 0;
}
.notice-item input[type=checkbox] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--mint-dark);
  cursor: pointer;
}

.password-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
input.password-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  font-size: 20px;
  letter-spacing: 0.08em;
  padding: 10px 12px;
}
.password-toggle {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 0 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.password-toggle:hover { background: #f2f7f6; }

button.primary {
  background: var(--mint-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
}
button.primary:hover { filter: brightness(0.9); }
button.secondary, a.secondary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}

.msg { font-size: 13px; margin-top: 8px; }
.msg.error { color: #d1373a; }
.msg.success { color: #15803d; }
.msg.warning {
  color: #92620a;
  background: #fdecc8;
  border: 1px solid var(--yellow);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  line-height: 1.5;
}
.msg.warning a.secondary, .msg.warning button.secondary { font-size: 13px; padding: 8px 12px; }

.selected-slot-box {
  background: #eef8f6;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}

/* レジン体験のランドセル購入特典チェックボックス。見落とされないよう、
   レジンのテーマカラー（水色）で縁取った目立つボックスにする */
.resin-benefit-box {
  background: #eaf7fb;
  border: 2px solid var(--accent-blue);
  border-radius: 10px;
  padding: 12px 14px;
}
.resin-benefit-box label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #0b5c73;
  cursor: pointer;
}
.resin-benefit-box input[type=checkbox] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--accent-blue);
  cursor: pointer;
  margin: 0;
}

/* 予約完了ページ：一番大事な予約内容（日時・人数）を大きく目立たせる */
.complete-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.complete-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--mint-dark);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.complete-hero-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.complete-summary-box {
  background: #eef8f6;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
}
.complete-summary-box .cs-date {
  font-size: 14px;
  color: #6b6259;
  margin-bottom: 4px;
}
.complete-summary-box .cs-time {
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 700;
  color: var(--mint-dark);
  line-height: 1.25;
  margin: 4px 0;
}
.complete-summary-box .cs-party {
  font-size: 14px;
  color: var(--ink);
  margin-top: 6px;
}
.arrival-callout {
  margin-top: 12px;
  background: #fdf3e0;
  border: 1px solid var(--yellow);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.arrival-callout .ac-label {
  font-size: 13px;
  font-weight: 600;
  color: #9a7a2e;
  margin-bottom: 2px;
}
.arrival-callout .ac-time {
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 700;
  color: #9a7a2e;
  line-height: 1.25;
}
.complete-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.complete-notice-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.6;
}
.complete-notice-list .cn-icon {
  flex-shrink: 0;
  font-size: 17px;
  line-height: 1.5;
}

.glass-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.glass-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
/* 明朝体は他の部分（ゴシック体）と字体が合わず浮いてしまったため廃止。
   ページ全体と同じゴシック体のまま、細字にして太字ゴシックの主張を抑える */
.glass-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.glass-price {
  font-size: 15px;
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.02em;
}
.glass-item.option {
  border-left: 3px solid rgba(224, 181, 89, 0.35);
  padding-left: 9px;
}
.glass-note {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
}
.glass-menu-link {
  display: block;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(var(--mint-dark-rgb), 0.1);
  border: 1px solid rgba(var(--mint-dark-rgb), 0.3);
  color: var(--mint-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.glass-menu-link:hover {
  background: rgba(var(--mint-dark-rgb), 0.18);
}

/* ---- よくあるご質問ページ ---- */
.faq-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--mint-dark);
  margin: 0 0 8px;
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: '\FF0B';
  display: inline-block;
  width: 18px;
  color: var(--mint-dark);
  font-weight: 700;
}
.faq-item[open] summary::before { content: '\FF0D'; }
.faq-item p {
  margin: 10px 0 0 18px;
  font-size: 14px;
  line-height: 1.7;
  color: #55534f;
}

.hidden { display: none !important; }

/* ---- 管理画面: タブレットでの操作を想定したサイズ調整 ---- */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* トラックパッド操作時などに表示される横スクロールバーは表の下に重なって表示されるため、
     一番下の行（合計人数など）と被って読みにくくならないよう、あらかじめ余白を確保しておく */
  padding-bottom: 14px;
}
.table-scroll table.bookings { min-width: 760px; }

body.admin-theme .icon-btn {
  padding: 9px 14px;
  font-size: 13px;
  min-height: 38px;
  margin-right: 6px;
}
body.admin-theme button.primary,
body.admin-theme button.secondary,
body.admin-theme a.secondary {
  min-height: 44px;
  padding: 12px 18px;
  font-size: 15px;
}
body.admin-theme input[type=text],
body.admin-theme input[type=tel],
body.admin-theme input[type=email],
body.admin-theme input[type=date],
body.admin-theme input[type=number],
body.admin-theme select,
body.admin-theme textarea {
  font-size: 16px; /* iOSでタップ時に自動ズームされないよう16px以上にする */
  padding: 11px 12px;
  min-height: 44px;
}
body.admin-theme textarea { min-height: 76px; }
body.admin-theme .modal { max-width: 480px; }

/* ---- 管理画面: 日付×時間の空き状況一覧（表） ---- */
table.range-grid-table {
  border-collapse: collapse;
  font-size: 12px;
}
table.range-grid-table th, table.range-grid-table td {
  border: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}
table.range-grid-table th.time-col, table.range-grid-table td.time-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--gray);
}
table.range-grid-table th.date-col {
  padding: 6px 4px;
  cursor: pointer;
  min-width: 44px;
  background: #fff;
  font-weight: 600;
  line-height: 1.4;
}
table.range-grid-table th.date-col:hover { background: #f2f7f6; }
table.range-grid-table th.date-col.sunday { color: var(--red); }
/* 祝日は日曜日（赤）と見分けやすいよう別の色（緑系）で表示する */
table.range-grid-table th.date-col.holiday { color: #2f9e5c; }
table.range-grid-table th.date-col.selected { background: var(--mint-dark); color: #fff; }
table.range-grid-table td.slot-cell {
  width: 30px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  position: relative;
}
table.range-grid-table td.slot-cell .cell-fill {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}
/* 枠に入っている予約の人数。2組同居している枠は横並びで両方の人数を表示する */
table.range-grid-table td.slot-cell .slot-count {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}
/* 吹きガラスタブでは、同じ枠に同居しているとんぼ玉の予約も人数表記を出す。
   バッジ枠は使わず、可愛らしい濃いめのラズベリーピンクの文字色だけで吹きガラス（白）と見分ける。
   どの背景色（空きあり緑・残りわずか黄・満枠赤・停止中グレー）に乗っても読めるよう、
   白文字と同じ考え方で薄い縁取り影を付ける */
table.range-grid-table td.slot-cell .slot-count.tonbodama {
  color: #ad1a63;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.55);
}
/* 猫アレルギー・苦手のお客様が入っている枠に印を付ける（クリックしなくても一覧上でわかるように） */
table.range-grid-table td.slot-cell.has-cat-note::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-pink);
  border: 1px solid #fff;
  z-index: 2;
}
/* 吹きガラス・とんぼ玉で状況が食い違う枠（例：木曜自動停止）は、背景はこれまで通り
   吹きガラスの状況の単色のままにして数字の視認性を保ち、左下に小さい印（とんぼ玉の
   状況の色）を付けて見分けられるようにする。斜め2色の塗り分けは視認性が悪かったため廃止。
   印の色はJS側で --tonbo-diff-color にその時々の状況色を設定する */
table.range-grid-table td.slot-cell.tonbo-diff::before {
  content: '';
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tonbo-diff-color, var(--gray));
  border: 1px solid #fff;
  z-index: 2;
}
table.range-grid-table td.slot-cell.status-available .cell-fill { background: var(--green); }
table.range-grid-table td.slot-cell.status-partial .cell-fill { background: var(--yellow); }
table.range-grid-table td.slot-cell.status-full .cell-fill { background: var(--red); }
table.range-grid-table td.slot-cell.status-stopped .cell-fill { background: var(--gray); }
table.range-grid-table td.slot-cell.status-closed { background: #f2f7f6; }
/* 団体予約が2枠以上にまたがって貸切になっている場合、境目の罫線を消してひと続きの枠に見せる */
table.range-grid-table td.slot-cell.connect-down { border-bottom: none; }
table.range-grid-table td.slot-cell.connect-up { border-top: none; }
body.admin-theme table.range-grid-table td.slot-cell { height: 30px; }
table.range-grid-table td.total-cell {
  padding: 4px 2px;
  font-size: 11px;
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
}

/* ---- Admin ---- */
.badge-live {
  font-size: 11px;
  color: #eafff5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-gold); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%{opacity:1} 50%{opacity:.3} 100%{opacity:1} }

/* ---- 新規予約・要対応の通知ベル（ヘッダーを廃止し、画面右上に常時表示のフローティング
   ボタンとして配置。スクロールしても常に見える位置に固定する） ---- */
.top-notify-cluster {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 55;
  display: flex;
  gap: 8px;
}
#notifyBell, #cancelFlagBell { position: relative; }
.top-notify-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(60, 70, 69, 0.18);
  cursor: pointer;
  white-space: nowrap;
}
.top-notify-btn:hover { filter: brightness(0.97); }
/* 通知ボタンが画面右上に固定表示されているため、カードの内容と重ならないよう
   ページ本文の上に余白を確保する（ログイン画面には通知ボタンがないため対象外。
   印刷時は.no-printで通知ボタン自体を非表示にするため、1333行目付近の
   印刷用ルールでpaddingを0に戻している） */
#adminScreen main { padding-top: 88px; }
/* バッジをボタン自体を基準に配置しておくことで、スマホ幅でも位置がずれないようにする */
#notifyBellBtn, #cancelFlagBellBtn { position: relative; }
.notify-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.notify-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-width: 80vw;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(60, 70, 69, 0.25);
  padding: 12px;
  z-index: 60;
  text-align: left;
}
.notify-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.notify-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notify-dropdown li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #faf8fd;
  border: 1px solid var(--line);
}
.notify-dropdown li:hover { border-color: var(--accent-gold); }
.notify-dropdown li.read { opacity: 0.55; }
.notify-item-text {
  flex: 1;
  cursor: pointer;
}
/* 予約時に備考欄への記入があった通知に添える印。開かなくても分かるようにする */
.notify-note-flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--accent-pink);
  color: #7a1d4d;
}
.notify-delete-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
  color: var(--gray);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.notify-delete-btn:hover {
  border-color: var(--red);
  color: var(--red);
}
.notify-empty {
  font-size: 13px;
  color: var(--gray);
  padding: 6px 2px;
}

/* ---- 年間データ（📊 データボタン） ---- */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.stats-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.stats-box-label {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 4px;
}
.stats-box-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--mint-dark);
}
.stats-box-clickable {
  cursor: pointer;
  transition: border-color 0.15s;
}
.stats-box-clickable:hover, .stats-box-clickable:focus-visible {
  border-color: var(--accent-gold);
  outline: none;
}
.stats-box-hint {
  font-size: 11px;
  color: var(--mint-dark);
  font-weight: 600;
}
@media (max-width: 640px) {
  .stats-summary { grid-template-columns: repeat(2, 1fr); }
}

table.bookings {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.bookings th, table.bookings td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
  vertical-align: top;
}
table.bookings th { color: var(--gray); font-weight: 600; font-size: 13px; white-space: nowrap; }
table.bookings td.created-at-cell { white-space: nowrap; color: var(--gray); }
tr.cancelled { opacity: 0.45; text-decoration: line-through; }
/* 仮押さえ（電話等での一時確保）の予約行を、通常の確定予約と区別しやすいよう淡い黄色にする */
tr.tentative { background: #fffaf0; }
tr.tentative:hover { background: #fff5e0; }
tr.total-row td { font-weight: 700; border-top: 2px solid var(--line); background: var(--bg); }

.grid-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #eee;
}
.tag.online { background: #e0f2fe; color: #0a6690; }
.tag.staff { background: #fdecc8; color: #7a5710; }

.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 4px;
}
.icon-btn.danger { color: #d1373a; border-color: #f5b8b5; }
/* 要対応フラグ（★）のワンタップ切り替えボタン */
.star-toggle-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  color: #c7ccb8;
}
.star-toggle-btn.flagged { color: #16a34a; }
.star-toggle-btn:hover { color: #128a3d; }
button.secondary.danger {
  background: #fdeceb;
  border-color: #f3b0ac;
  color: #b3221f;
  font-weight: 700;
}
button.secondary.danger:hover { background: #fbdbd8; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(60, 70, 69, 0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.modal {
  background: #fff; border-radius: 12px; padding: 20px;
  width: 92%; max-width: 420px; max-height: 90vh; overflow-y: auto;
}
.modal h3 { margin-top: 0; }

.login-box {
  max-width: 360px;
  margin: 80px auto;
}
body.admin-theme .login-box { border-top: 4px solid var(--accent-pink); }
body.admin-theme .icon-btn:hover { border-color: var(--accent-gold); }
body.admin-theme input:focus, body.admin-theme select:focus, body.admin-theme textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* ---- 管理画面: スマホ対応 ---- */
@media (max-width: 640px) {
  #adminScreen main { padding: 140px 10px 50px; }
  #loginScreen main { padding: 14px 10px 50px; }

  /* 通知ボタンは横に並べると幅が足りないため、右上で縦に並べる */
  .top-notify-cluster {
    flex-direction: column;
    align-items: flex-end;
    top: 10px;
    right: 10px;
  }
  .top-notify-btn { font-size: 14px; padding: 10px 16px; }
  .notify-dropdown {
    width: calc(100vw - 32px);
    max-width: 320px;
    right: 0;
  }

  /* 当日の予約一覧：スマホでは「時間・人数・お名前・⭐要対応・編集/キャンセル」のみ表示し、
     フリガナ・電話番号・メール・猫・備考・経路の列は隠す（4〜9列目）。
     隠した項目は、行（枠）をタップすると下に展開表示される。★はワンタップで
     付け外ししたい操作のため、編集/キャンセルと同様に常に見える位置に残す。 */
  #dayBookingsTable th:nth-child(n+4):nth-child(-n+9),
  #dayBookingsTable td:nth-child(n+4):nth-child(-n+9) {
    display: none;
  }
  .table-scroll #dayBookingsTable { min-width: 0; }

  /* 枠（行）タップで詳細を開閉する（予約画面のQ&Aと同じ、タップ開閉のスタイル） */
  #dayBookingsTable tr.booking-row { cursor: pointer; }
  #dayBookingsTable tr.booking-row:active { background: #f2f7f6; }
  #dayBookingsTable .expand-indicator {
    display: inline-block;
    margin-right: 6px;
    color: var(--mint-dark);
    font-size: 11px;
    transition: transform 0.15s ease;
  }
  #dayBookingsTable tr.booking-row.expanded .expand-indicator {
    transform: rotate(90deg);
  }
  #dayBookingsTable tr.booking-detail-row td {
    background: #faf8fd;
    border-bottom: 1px solid var(--line);
  }
  .booking-detail-list {
    margin: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .booking-detail-list > div {
    display: flex;
    gap: 10px;
    font-size: 13px;
  }
  .booking-detail-list dt {
    flex: 0 0 100px;
    color: var(--gray);
    font-weight: 600;
  }
  .booking-detail-list dd {
    margin: 0;
    flex: 1;
    word-break: break-all;
  }
}

/* デスクトップ幅では全列がそのまま見えているため、タップ展開用の詳細行・矢印アイコンは
   表示しない（スマホ表示のみで使うUI） */
@media (min-width: 641px) {
  #dayBookingsTable tr.booking-detail-row { display: none !important; }
  #dayBookingsTable .expand-indicator { display: none; }
}

/* ---- 管理画面: 空き状況一覧（吹きガラス／とんぼ玉 と レジン）は、1つのカードの中で
   選んだ方だけを表示する。カード全体を縁取らず、左端だけに影のような色付けを入れて、
   選んでいる方のテーマカラーを示す（--card-accentはJS側で選択に応じて切り替える） */
#rangeGridCard {
  border-left: 4px solid var(--card-accent, var(--mint-dark));
  box-shadow: -6px 0 14px -8px var(--card-accent, var(--mint-dark)), 0 2px 10px rgba(var(--mint-dark-rgb), 0.1);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.range-select-group { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.range-select-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--gray);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.range-select-btn:hover { filter: brightness(0.97); }
.range-select-btn.active {
  background: var(--select-color, var(--mint-dark));
  border-color: var(--select-color, var(--mint-dark));
  color: #fff;
}

/* ---- 管理画面: 年間休業予定のカレンダー（複数日をクリックしてまとめて選択する） ---- */
.cl-cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.cl-cal-dow {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  text-align: center;
  padding: 4px 0;
}
.cl-cal-cell {
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  border: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}
.cl-cal-cell:hover { background: var(--bg); }
.cl-cal-cell.other-month { cursor: default; background: transparent; border-color: transparent; }
.cl-cal-cell.past { color: #c7c0ba; cursor: not-allowed; }
.cl-cal-cell.registered { font-weight: 700; }
.cl-cal-cell.registered::after {
  content: '●';
  display: block;
  font-size: 8px;
  color: var(--red);
  margin-top: 2px;
}
.cl-cal-cell.selected {
  background: var(--mint-dark);
  color: #fff;
  border-color: var(--mint-dark);
}
.cl-cal-cell.selected.registered::after { color: #fff; }

/* ---- 管理画面: 空き状況一覧の印刷 ----
   「印刷」ボタンを押すと、今日を含む週から4週間分・続く4週間分の2つの表（#printOnlyGrids）を
   組み立ててからwindow.print()を呼ぶ。画面上の他のカード（.no-print）は印刷時に非表示にし、
   普段は隠している印刷専用の2つの表（.print-only）だけをA4横向き1枚に収める。
   凡例（空きあり・満枠など）や日付ナビ・印刷ボタン自体も印刷には出さない */
.print-only { display: none; }
@media print {
  body.admin-theme .no-print { display: none !important; }
  body.admin-theme main { max-width: none; margin: 0; padding: 0; }
  body.admin-theme .print-only { display: block; }
  body.admin-theme .print-only .print-block { page-break-inside: avoid; }
  body.admin-theme .print-only .print-block + .print-block { margin-top: 6mm; }
  body.admin-theme table.print-grid {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
  }
  body.admin-theme table.print-grid th,
  body.admin-theme table.print-grid td {
    border: 0.3mm solid var(--line);
    text-align: center;
    padding: 0;
  }
  body.admin-theme table.print-grid th.time-col,
  body.admin-theme table.print-grid td.time-col {
    width: 12mm;
    position: static;
    background: #fff;
    font-weight: 600;
    font-size: 8px;
  }
  body.admin-theme table.print-grid th.date-col {
    width: 9mm;
    font-size: 8px;
    line-height: 1.2;
    padding: 0.6mm 0;
  }
  body.admin-theme table.print-grid td.slot-cell {
    width: 9mm;
    height: 7.2mm;
  }
  body.admin-theme table.print-grid .cell-fill {
    /* とんぼ玉はバッジ表記をやめて文字色のみになったため、2組同居時も常に1桁の数字同士。
       枠の幅9mm（約34px、罫線を除くと約32px）に対して画面表示と同じ間隔まで広げられる */
    gap: 11px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }
  /* 画面用の濃い背景色をそのまま印刷すると黒文字が読みにくいほど濃く出てしまうため、
     印刷時は各ステータスの背景を薄いトーンに差し替える（色の意味は変えず、淡くするだけ） */
  body.admin-theme table.print-grid td.slot-cell.status-available .cell-fill { background: #dcf1e2; }
  body.admin-theme table.print-grid td.slot-cell.status-partial .cell-fill { background: #fbe9c8; }
  body.admin-theme table.print-grid td.slot-cell.status-full .cell-fill { background: #fad9d5; }
  body.admin-theme table.print-grid td.slot-cell.status-stopped .cell-fill { background: #e2e6e5; }
  /* 印刷では文字がつぶれて見えないよう、画面用の縁取り影(text-shadow)を外し、
     枠の高さに合わせて文字サイズも大きくする。また、白文字は淡い背景色と重なって
     印刷時に薄く見えてしまうため、黒文字＋太字にして濃くはっきり印字されるようにする */
  body.admin-theme table.print-grid .slot-count {
    font-size: 8px;
    font-weight: 900;
    color: #000;
    text-shadow: none;
  }
  /* とんぼ玉は上のルールより詳細度の高いセレクタで、濃いラズベリーピンクにして吹きガラス（黒）と見分けられるようにする */
  body.admin-theme table.print-grid .slot-count.tonbodama {
    color: #ad1a63;
  }
  body.admin-theme table.print-grid td.total-cell {
    font-size: 8px;
    padding: 0.6mm 0;
  }
  @page { size: A4 landscape; margin: 10mm; }
}
