:root {
  --accent: #d9544d;
  --accent-dark: #b8403a;
  --accent-soft: #fdeeed;
  --ink: #2b2724;
  --ink-sub: #7d7570;
  --line: #e7e0da;
  --bg: #faf7f4;
  --card: #ffffff;
  --ok: #2f855a;
  --ok-soft: #e7f4ec;
  --warn: #b7791f;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(43, 39, 36, .08), 0 8px 24px rgba(43, 39, 36, .05);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; }

/* ---------- ヘッダー ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .inner {
  max-width: 1040px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px;
}
.logo { font-size: 19px; font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.logo small { display: block; font-size: 11px; color: var(--ink-sub); font-weight: 400; letter-spacing: 0; }
.site-header nav { margin-left: auto; display: flex; gap: 18px; font-size: 13px; }
.site-header nav a { color: var(--ink-sub); }
.site-header nav a:hover { color: var(--accent); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 20px 80px; }
.wrap.narrow { max-width: 720px; }

/* ---------- ステップ表示 ---------- */
.steps { display: flex; gap: 4px; margin: 4px 0 24px; font-size: 12px; }
.steps li {
  flex: 1; list-style: none; text-align: center; padding: 7px 4px;
  background: #fff; color: var(--ink-sub); border: 1px solid var(--line);
  border-radius: 6px;
}
.steps li.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.steps li.done { background: var(--accent-soft); color: var(--accent-dark); border-color: #f3d6d4; }

/* ---------- ヒーロー ---------- */
.hero {
  background: linear-gradient(135deg, #2f2a26, #4a413a);
  color: #fff; border-radius: var(--radius); padding: 34px 30px; margin-bottom: 26px;
}
.hero h1 { font-size: 26px; letter-spacing: .06em; }
.hero p { margin: 8px 0 0; opacity: .8; font-size: 13.5px; }
.hero .meta { margin-top: 16px; font-size: 12px; opacity: .65; display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- カード ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.card > h2 {
  font-size: 15px; letter-spacing: .04em; margin-bottom: 14px;
  padding-left: 10px; border-left: 3px solid var(--accent);
}
.section-title {
  font-size: 17px; margin: 30px 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--ink); display: inline-block;
}

/* ---------- メニュー一覧 ---------- */
.menu-list { display: grid; gap: 10px; }
.menu-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.menu-item:hover { border-color: #d5c9c0; }
.menu-item.checked { border-color: var(--accent); background: var(--accent-soft); }
.menu-item input { margin-top: 5px; accent-color: var(--accent); width: 17px; height: 17px; }
.menu-item .body { flex: 1; min-width: 0; }
.menu-item .name { display: block; font-weight: 700; font-size: 15px; }
.menu-item .desc { display: block; font-size: 12.5px; color: var(--ink-sub); margin-top: 3px; }
.menu-item .side { text-align: right; white-space: nowrap; }
.menu-item .price { display: block; font-size: 17px; font-weight: 700; color: var(--accent); }
.menu-item .dur { display: block; font-size: 11.5px; color: var(--ink-sub); }

/* ---------- スタッフ ---------- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.staff-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center;
}
.staff-card .avatar {
  width: 62px; height: 62px; border-radius: 50%; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 10px;
}
.staff-card .name { font-weight: 700; font-size: 15px; }
.staff-card .role { font-size: 11.5px; color: var(--ink-sub); }
.staff-card .bio { font-size: 12px; color: var(--ink-sub); margin: 10px 0 14px; min-height: 36px; }

/* ---------- 空き枠カレンダー ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-scroll { overflow-x: auto; }
table.calendar { border-collapse: collapse; width: 100%; min-width: 620px; background: #fff; }
table.calendar th, table.calendar td {
  border: 1px solid var(--line); text-align: center; padding: 7px 4px; font-size: 13px;
}
table.calendar thead th { background: #f6f2ee; font-weight: 700; font-size: 12px; }
table.calendar thead th.sat { color: #2b6cb0; }
table.calendar thead th.sun { color: var(--accent); }
table.calendar td.time { background: #f6f2ee; font-weight: 700; width: 74px; }
.slot-btn {
  width: 100%; border: none; background: none; cursor: pointer;
  /* 空いている枠は一目で拾えるように大きく出す。押せる的も広くなる */
  font-size: 24px; line-height: 1; color: var(--accent); padding: 6px 0; border-radius: 4px;
}
.slot-btn:hover { background: var(--accent-soft); }
.slot-none { color: #cfc7c1; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 12px 24px; font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { background: #d8cfc9; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f6f2ee; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 6px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; align-items: center; margin-top: 18px; }

/* ---------- 固定フッターバー ---------- */
.sticky-bar {
  position: sticky; bottom: 0; background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line); padding: 12px 20px; margin: 24px -20px -80px;
  display: flex; align-items: center; gap: 16px; backdrop-filter: blur(6px);
}
.sticky-bar .summary { font-size: 13px; }
.sticky-bar .summary strong { font-size: 18px; color: var(--accent); }
.sticky-bar .btn { margin-left: auto; }

/* ---------- フォーム ---------- */
label.field { display: block; margin-bottom: 16px; font-size: 13px; font-weight: 700; }
label.field span.req { color: var(--accent); font-size: 11px; margin-left: 4px; }
label.field small { display: block; font-weight: 400; color: var(--ink-sub); margin-top: 2px; }
input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; margin-top: 6px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* ---------- 確認テーブル ---------- */
table.detail { width: 100%; border-collapse: collapse; font-size: 14px; }
table.detail th, table.detail td { border-bottom: 1px solid var(--line); padding: 11px 4px; text-align: left; }
table.detail th { width: 130px; color: var(--ink-sub); font-weight: 400; font-size: 13px; vertical-align: top; }
table.detail tr:last-child th, table.detail tr:last-child td { border-bottom: none; }
.total-row { font-size: 20px; font-weight: 700; color: var(--accent); }

/* ---------- フラッシュ ---------- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; }
.flash.error { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #f3d6d4; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #cfe8da; }

/* ---------- バッジ ---------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.badge.confirmed { background: var(--ok-soft); color: var(--ok); }
.badge.visited { background: #eef2f7; color: #4a5568; }
.badge.canceled { background: #f3f0ee; color: #a09891; }
.badge.noshow { background: var(--accent-soft); color: var(--accent-dark); }
.badge.mock { background: #fdf3e0; color: var(--warn); }
.badge.live { background: var(--ok-soft); color: var(--ok); }
.badge.error { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- 管理画面 ---------- */
body.admin { background: #f4f5f7; }
.admin-header { background: #2b2724; color: #fff; border-bottom: none; }
.admin-header .logo, .admin-header nav a { color: #fff; }
.admin-header nav a { opacity: .7; }
.admin-header nav a:hover, .admin-header nav a.on { opacity: 1; }
.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 22px 20px 70px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.stat .label { font-size: 11.5px; color: var(--ink-sub); }
.stat .value { font-size: 24px; font-weight: 700; }

/* --- 予約台帳（横=時間 / 縦=スタッフ） --------------------------------- */
.day-jump { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.day-jump .day-title { font-size: 15px; white-space: nowrap; }
.day-strip { display: flex; gap: 4px; overflow-x: auto; margin: 10px 0 16px; padding-bottom: 2px; }
.day-strip a {
  flex: none; min-width: 34px; height: 34px; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: 13px; text-decoration: none; color: var(--ink);
}
.day-strip a.wk { color: #b4483c; }
.day-strip a.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.ledger-warn {
  background: #fdf3e7; border: 1px solid #e8cfa8; border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px; margin: 0 0 12px;
}

.ledger {
  --w: 30px;                       /* 1コマ（既定15分）の幅 */
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: auto; max-height: 72vh;
}
.ledger-inner { min-width: max-content; }
.lg-row { display: flex; border-bottom: 1px solid var(--line); }
.lg-row:last-child { border-bottom: none; }

/* 左端のスタッフ名・見出し列。横スクロールしても残す */
.lg-name {
  width: 132px; flex: none; padding: 6px 10px; font-size: 12.5px; font-weight: 700;
  background: #f6f2ee; border-right: 1px solid var(--line);
  position: sticky; left: 0; z-index: 3; display: flex; align-items: center;
}
.lg-track { position: relative; flex: 1; width: calc(var(--w) * var(--cols)); }
.lg-track.flat { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; }

/* 時刻ヘッダは縦スクロールしても残す */
.lg-head { position: sticky; top: 0; z-index: 4; }
.lg-head .lg-name { background: #f6f2ee; }
.lg-head .lg-track { background: #f6f2ee; }
.lg-corner { z-index: 5; }
.lg-head .lg-track, .lg-sum .lg-track { display: flex; }
.lg-cell {
  width: var(--w); flex: none; font-size: 11px; text-align: center; padding: 5px 0;
  border-right: 1px solid #f0ebe5; white-space: nowrap;
}
.lg-cell.hour { border-right-color: var(--line); }
.lg-head .lg-cell { font-weight: 700; text-align: left; padding-left: 3px;
  overflow: visible; border-right-color: transparent; }
.lg-head .lg-cell.hour { border-left: 1px solid var(--line); border-right: none; }

.lg-sum { background: #fbf9f7; }
.lg-sum .lg-name { font-weight: 400; font-size: 11.5px; }
.lg-cell.zero { color: #c0392b; font-weight: 700; }

.lg-staff .lg-track { padding: 3px 0; }
.lg-lane { position: relative; height: 46px; margin-bottom: 2px; pointer-events: none; }
.lg-lane:last-child { margin-bottom: 0; }

/* 空きマス */
.lg-slot {
  position: absolute; top: 0; bottom: 0; width: var(--w);
  display: flex; align-items: center; justify-content: center;
  color: transparent; text-decoration: none; font-size: 15px; font-weight: 700;
}
.lg-slot:hover { background: var(--accent-soft); color: var(--accent); }
.lg-slot.off { background: repeating-linear-gradient(45deg, #f4f1ee, #f4f1ee 4px, #eeeae5 4px, #eeeae5 8px); }

/* 時間の目盛りと現在時刻 */
.lg-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: #f2ede8; pointer-events: none; }
.lg-grid.hour { background: #e4dcd4; }
.lg-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #d64545; z-index: 2; pointer-events: none; }

/* 予約ブロック */
.rsv {
  position: absolute; top: 0; height: 46px; border-radius: 5px; padding: 4px 6px;
  background: #fdf6df; border: 1px solid #e3b23c; border-left-width: 4px;
  font-size: 11.5px; overflow: hidden; cursor: pointer; text-decoration: none;
  color: var(--ink); display: flex; flex-direction: column; justify-content: center; z-index: 1;
  pointer-events: auto;
}
.rsv:hover { box-shadow: 0 0 0 2px rgba(227, 178, 60, .45); }
.rsv .n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsv .m { color: var(--ink-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsv.visited { background: #eef2f7; border-color: #4a5568; }
.rsv.noshow { background: #f7efef; border-color: #b4483c; }
.rsv.chip { position: static; height: auto; width: auto; }

.lg-over { background: #fdf6df; }
.lg-over .lg-name { background: #f7edd4; font-weight: 400; font-size: 11.5px; }

/* 一覧から飛んできた行を目立たせる */
table.grid tr:target td { background: #fdf6df; }

@media (max-width: 640px) {
  .ledger { --w: 22px; max-height: 62vh; }
  .lg-name { width: 92px; padding: 6px; font-size: 11.5px; }
  .lg-cell { font-size: 10px; }
  .rsv { font-size: 10.5px; }
}

table.grid { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
table.grid th { background: #f6f2ee; font-size: 12px; white-space: nowrap; }
table.grid input, table.grid select { margin-top: 0; padding: 6px 8px; font-size: 13px; }
table.grid td.num { text-align: right; }

details.editor { margin-top: 6px; }
details.editor > summary { cursor: pointer; font-size: 12px; color: var(--ink-sub); }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label.field { margin-bottom: 0; }
.hint { font-size: 12px; color: var(--ink-sub); }
.gcal-note {
  background: #fdf3e0; border: 1px solid #f0e0c0; border-radius: var(--radius);
  padding: 12px 16px; font-size: 12.5px; color: #7a5c1e; margin-bottom: 18px;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 21px; }
  .steps { font-size: 10px; }
  .sticky-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .sticky-bar .btn { margin-left: 0; }
}

.menu-item .note {
  display: block; font-size: 11.5px; color: var(--warn); margin-top: 4px;
}

/* サイトのフッター。スタッフ用リンクはここに置く。
   ヘッダーに出すとお客様の導線に混ざり、管理画面の入口が誰にでも見える */
.site-footer {
  margin-top: 48px;
  padding: 20px 0 32px;
  border-top: 1px solid #eee;
  font-size: .82rem;
  color: #999;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
}
.site-footer .staff-link {
  margin-left: auto;
  color: #bbb;
  text-decoration: none;
}
.site-footer .staff-link:hover { color: #888; text-decoration: underline; }
@media (max-width: 560px) {
  .site-footer .staff-link { margin-left: 0; }
}
