:root {
  --bg: #f7f6f3;
  --card: #ffffff;
  --ink: #1f2328;
  --muted: #5f6670;
  --line: #e3e1dc;
  --accent: #2f6f5e;
  --accent-ink: #ffffff;
  --accent-soft: #e5f0ec;
  --accent-line: #cfe3dc;
  --accent-faint: #f3f8f6;
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
header.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.brand span { color: var(--accent); }
.brand small { margin-left: 6px; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
nav.top-links { display: flex; gap: 12px; align-items: center; font-size: .95rem; }
main { padding: 24px 0 48px; }
footer.bottom { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .85rem; }
footer.bottom a { color: var(--muted); margin-right: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 10px 16px; min-height: 44px; text-decoration: none;
}
button:hover, .btn:hover { border-color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
button.link { background: none; border: none; color: var(--accent); padding: 4px; min-height: 0; font-weight: 500; text-decoration: underline; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }
label .opt { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 6px; }
input, select, textarea {
  font: inherit; width: 100%; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 auto; }
.row > .fit { flex: 0 0 auto; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.msg { border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.msg.ok { background: var(--accent-soft); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.error { background: var(--danger-soft); color: var(--danger); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.gray { background: var(--line); color: var(--muted); }

/* 選択肢のボタン（日付・時間・メニュー） */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.choices.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.choice {
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 10px 8px;
  text-align: center; font-weight: 600; min-height: 48px; cursor: pointer; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.choice small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.choice[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.choice[aria-pressed="true"] small { color: var(--accent-ink); }
.choices.wide .choice { align-items: flex-start; text-align: left; padding: 12px 14px; }
.step-title { display: flex; align-items: center; gap: 8px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; flex: 0 0 auto; }
.days-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.days-scroll .choice { flex: 0 0 76px; scroll-snap-align: start; }

/* LP */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.price { font-size: 2rem; font-weight: 700; }

/* 管理画面 */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 10px 14px; white-space: nowrap; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num { white-space: nowrap; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.day-col { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-width: 120px; }
.day-col h3 { font-size: .9rem; margin-bottom: 6px; }
.shift-chip { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; background: var(--bg); font-size: .82rem; min-height: 0; font-weight: 500; }
.shift-chip.off { color: var(--muted); }
.shift-chip.custom { border-color: var(--accent); }
.booking-chip { font-size: .8rem; border-left: 3px solid var(--accent); padding: 2px 6px; margin-bottom: 4px; }
.booking-chip.attention { border-left-color: var(--warn); background: var(--warn-soft); }
.weekly-row { display: grid; grid-template-columns: 52px 1fr 1fr 90px; gap: 8px; align-items: center; margin-bottom: 6px; }
.weekly-row input[type="time"] { min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
.check input { width: auto; min-height: 0; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); padding: 20px; width: min(480px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .4); }
pre.code { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; white-space: pre-wrap; word-break: break-all; font-size: .82rem; }

/* 埋め込み表示のとき（?embed=1）はヘッダーとフッターを出さない */
body.embed header.top, body.embed footer.bottom { display: none; }
body.embed main { padding-top: 8px; }

@media (max-width: 600px) {
  .card { padding: 16px; }
  .weekly-row { grid-template-columns: 40px 1fr 1fr; }
  .weekly-row .check { grid-column: 1 / -1; }
}
.email-img { display: inline-block; height: 1.25em; width: auto; vertical-align: -0.3em; }
/* LP：使い方の3ステップ */
.section-title { font-size: clamp(1.3rem, 4vw, 1.8rem); margin-bottom: 4px; }
.steps-section { padding: 24px 0; }
.step { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: center; margin: 40px 0; }
.step-label { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; margin: 0; }
.step-text h3 { font-size: 1.3rem; margin: 8px 0; }
.shot { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: 0 8px 24px rgba(31, 35, 40, .08); }
.shot img { display: block; width: 100%; height: auto; }
.shot.phone { max-width: 280px; justify-self: center; border-radius: 24px; border-width: 6px; border-color: #1f2328; }
.shot.phone img { aspect-ratio: 382 / 800; object-fit: cover; object-position: top; }
.shot-wrap { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.shot-wrap .shot.phone { width: 100%; }
.actions.center { justify-content: center; }
@media (max-width: 720px) {
  .step { grid-template-columns: 1fr; gap: 16px; margin: 32px 0; }
}
/* スタッフの写真 */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--accent-soft); }
.avatar.initial { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 700; }
.staff-choice { gap: 6px; }
.staff-choice .avatar { width: 56px; height: 56px; font-size: 1.3rem; }
.staff-choice[aria-pressed="true"] .avatar { box-shadow: 0 0 0 3px var(--accent-ink); }
.photo-cell { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.photo-actions { display: flex; flex-direction: column; align-items: flex-start; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* ===== お客さまの予約ページ（body.bk） ===== */
.bk main { padding-bottom: 96px; }
.bk-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 20px 0 12px; font-size: .85rem; color: var(--muted); }
.bk-steps li { display: inline-flex; align-items: center; gap: 6px; }
.bk-steps li + li::before { content: ""; width: 12px; height: 1px; background: var(--line); margin-right: 4px; }
.bk-steps-num { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; border: 1px solid var(--line); background: var(--card); }
.bk-steps li.current { color: var(--ink); font-weight: 700; }
.bk-steps li.current .bk-steps-num, .bk-steps li.done .bk-steps-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bk-title { font-size: clamp(1.4rem, 5vw, 1.8rem); margin: 0 0 4px; letter-spacing: .02em; }
.bk-lead { color: var(--muted); margin: 0 0 16px; }
.bk-notice { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.bk-card { padding: 20px 18px; border-radius: 16px; box-shadow: 0 1px 2px rgba(31, 35, 40, .04); }
.bk-head { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin: 0 0 4px; }
.bk-sub { color: var(--muted); font-size: .85rem; margin: 0 0 12px; }
.bk-head + .bk-options, .bk-head + .bk-staff { margin-top: 12px; }

/* 選ぶカード（メニュー・担当） */
.bk-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 auto; position: relative; background: var(--card); }
[aria-pressed="true"] > .bk-check { background: var(--accent); border-color: var(--accent); }
[aria-pressed="true"] > .bk-check::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.bk-options { display: grid; gap: 10px; }
.bk-option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 14px 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); min-height: 64px; font-weight: 400; }
.bk-option-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.bk-option-main strong { font-size: 1rem; }
.bk-option-main small { color: var(--muted); font-size: .8rem; }
.bk-price { font-size: 1.35rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.bk-price small { font-size: .75rem; font-weight: 500; color: var(--muted); margin-left: 2px; }
.bk-option[aria-pressed="true"], .bk-person[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.bk-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bk-person { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 400; }
.bk-person .avatar { width: 64px; height: 64px; font-size: 1.4rem; }
.bk-person strong { font-size: .95rem; }
.bk-person small { color: var(--muted); font-size: .75rem; margin-top: -4px; }
.bk-person .bk-check { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; }
.bk-person[aria-pressed="true"] .bk-check::after { left: 5px; top: 1px; }
.bk-any { background: var(--line); color: var(--muted); font-size: 1rem !important; }

/* 週の表 */
.bk-weekbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
.bk-weeklabel { font-size: 1.05rem; }
.bk-weeknav { display: flex; gap: 6px; }
.bk-weeknav button { min-height: 36px; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.bk-weeknav button[aria-label] { width: 36px; padding: 0; font-size: 1.2rem; line-height: 1; }
.bk-week.loading { opacity: .5; transition: opacity .2s; }
.bk-empty { color: var(--muted); background: var(--bg); border-radius: 10px; padding: 18px; text-align: center; margin: 0; }
.bk-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.bk-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 520px; font-variant-numeric: tabular-nums; }
.bk-table th, .bk-table td { padding: 4px; text-align: center; border-bottom: 1px solid var(--line); background: var(--card); }
.bk-table tbody tr:last-child th, .bk-table tbody tr:last-child td { border-bottom: none; }
.bk-table thead th { position: sticky; top: 0; padding: 8px 4px; font-size: .8rem; line-height: 1.3; z-index: 1; }
.bk-table .bk-time { position: sticky; left: 0; z-index: 2; width: 56px; font-size: .8rem; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.bk-day .bk-date { display: block; font-weight: 700; color: var(--ink); font-size: .9rem; }
.bk-day .bk-wd { display: block; color: var(--muted); }
.bk-day.sun .bk-date, .bk-day.sun .bk-wd { color: var(--danger); }
.bk-day.sat .bk-date, .bk-day.sat .bk-wd { color: #2f5f9e; }
.bk-table thead th.today { box-shadow: inset 0 3px 0 var(--accent); }
.bk-table td.today, .bk-table th.today { background: var(--accent-faint); }
.bk-slot { width: 100%; min-height: 40px; padding: 0; border-radius: 8px; border: 1px solid var(--accent-line); background: var(--card); color: var(--accent); font-size: 1.1rem; font-weight: 700; }
.bk-slot:hover { background: var(--accent-soft); }
.bk-slot[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bk-none { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; border-radius: 8px; background: var(--bg); color: #b9bcc0; }

/* お客さま情報・完了 */
.bk-summary { display: flex; flex-direction: column; gap: 2px; background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; margin: 8px 0 4px; }
.bk-summary strong { font-size: 1.05rem; }
.bk-submit { width: 100%; min-height: 52px; font-size: 1.05rem; border-radius: 12px; }
.bk-done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 1.8rem; display: flex; align-items: center; justify-content: center; margin: 4px 0 12px; }

/* 下に固定の帯 */
.bk-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(31, 35, 40, .06); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.bk-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bk-bar-text { display: flex; flex-direction: column; min-width: 0; }
.bk-bar-text strong, .bk-bar-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-bar button { flex: 0 0 auto; min-height: 46px; padding: 0 18px; border-radius: 12px; }
.bk .wrap.narrow { max-width: 720px; }
/* ===== 管理画面（body.adm-body） ===== */
.adm-body { background: #f4f3ef; }
.adm-top-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; min-height: 56px; }
.adm-who { margin-right: 8px; }
.adm { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; max-width: 1240px; margin: 0 auto; padding: 24px 20px 48px; }
.adm-nav { position: sticky; top: 16px; align-self: start; }
.adm-store { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.adm-store strong { font-size: 1.05rem; line-height: 1.4; }
.adm-store .pill { align-self: flex-start; }
.adm-tabs { display: flex; flex-direction: column; gap: 2px; }
.adm-tabs button { display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none; border-radius: 10px; padding: 10px 12px; min-height: 44px; color: var(--muted); font-weight: 600; text-align: left; }
.adm-tabs button svg { width: 20px; height: 20px; flex: 0 0 auto; }
.adm-tabs button:hover { background: rgba(31, 35, 40, .05); color: var(--ink); }
.adm-tabs button[aria-selected="true"] { background: var(--card); color: var(--accent); box-shadow: 0 1px 3px rgba(31, 35, 40, .08); }
.adm-main { min-width: 0; }
.adm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.adm-head h1 { font-size: 1.5rem; margin: 0 0 4px; }
.adm-desc { color: var(--muted); font-size: .88rem; margin: 0; }
.adm-head > button { flex: 0 0 auto; }
.adm-main .card { border-radius: 14px; box-shadow: 0 1px 2px rgba(31, 35, 40, .04); }
.adm-flush { padding: 0; overflow: hidden; }
.adm-guide ol { margin: 0; padding-left: 1.3em; }
.adm-empty { color: var(--muted); padding: 24px; margin: 0; text-align: center; }

/* 数字の札 */
.adm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.adm-stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.adm-stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.adm-stat-value small { font-size: .85rem; font-weight: 500; color: var(--muted); margin-left: 3px; }
.adm-stat-note { font-size: .75rem; color: var(--muted); }
.adm-stat.warn { border-color: #efd3a4; background: var(--warn-soft); }
.adm-stat.warn .adm-stat-value, .adm-stat.warn .adm-stat-label { color: var(--warn); }

/* 要対応 */
.adm-alert { background: var(--warn-soft); border: 1px solid #efd3a4; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; color: #5c3b00; }
.adm-alert p { margin: 0 0 4px; }
.adm-alert-title { font-weight: 700; color: var(--warn); }
.adm-alert-row { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; margin-top: 8px; background: var(--card); border: 1px solid #efd3a4; border-radius: 10px; padding: 10px 12px; min-height: 0; font-weight: 400; color: var(--ink); }
.adm-alert-row .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-chev { color: var(--muted); font-size: 1.2rem; }

/* 週の表 */
.adm-weekcard { padding: 16px; }
.adm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.adm-weeklabel { font-size: 1.1rem; }
.adm-weeknav { display: flex; gap: 6px; }
.adm-weeknav button { min-height: 36px; padding: 4px 14px; border-radius: 999px; font-weight: 600; }
.adm-weeknav button[aria-label] { width: 36px; padding: 0; font-size: 1.2rem; line-height: 1; }
.adm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 12px; font-size: .82rem; color: var(--muted); }
.adm-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.adm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); flex: 0 0 auto; display: inline-block; }
.adm-daytabs { display: none; }
.adm-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.adm-day { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fbfbf9; display: flex; flex-direction: column; }
.adm-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: #f6faf8; }
.adm-day-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 4px; padding: 10px 10px 6px; font-size: .85rem; }
.adm-day-head strong { font-size: .95rem; }
.adm-day-head > span:not(.pill) { color: var(--muted); }
.adm-day-head.sun strong, .adm-day-head.sun > span:not(.pill) { color: var(--danger); }
.adm-day-head.sat strong, .adm-day-head.sat > span:not(.pill) { color: #2f5f9e; }
.adm-day-head .pill { font-size: .7rem; padding: 0 8px; }
.adm-day-count { margin-left: auto; font-size: .75rem; }
.adm-shifts { display: flex; flex-direction: column; gap: 4px; padding: 0 6px 8px; border-bottom: 1px dashed var(--line); }
.adm-shift { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 30px; padding: 4px 6px; border: 1px solid transparent; border-radius: 8px; background: none; font-size: .76rem; font-weight: 500; color: var(--ink); text-align: left; }
.adm-shift:hover { background: var(--card); border-color: var(--line); }
.adm-shift-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.adm-shift-time { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.adm-shift.off { color: #9aa0a6; }
.adm-shift.off .adm-dot { opacity: .35; }
.adm-shift-tag { font-size: .65rem; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 4px; }
.adm-shift.off .adm-shift-tag { background: var(--line); color: var(--muted); }
.adm-bookings { display: flex; flex-direction: column; gap: 6px; padding: 8px 6px 10px; }
.adm-booking { display: flex; gap: 6px; align-items: flex-start; width: 100%; text-align: left; padding: 7px 8px; min-height: 0; border-radius: 8px; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); background: var(--card); font-weight: 400; color: var(--ink); }
.adm-booking:hover { border-color: var(--c, var(--accent)); }
.adm-booking-time { font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
.adm-booking-main { min-width: 0; display: flex; flex-direction: column; }
.adm-booking-main strong { font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-booking-main small { font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-booking.attention { background: var(--warn-soft); border-color: #efd3a4; border-left-color: var(--warn); }
.adm-none { color: #a0a5ab; font-size: .78rem; margin: 2px 4px; }

/* 基本シフトの表 */
.adm-mx-scroll { overflow-x: auto; }
.adm-mx { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; }
.adm-mx th, .adm-mx td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: center; vertical-align: middle; }
.adm-mx thead th { background: #fbfbf9; font-size: .82rem; color: var(--muted); padding: 10px 6px; }
.adm-mx thead th.sun { color: var(--danger); }
.adm-mx thead th.sat { color: #2f5f9e; }
.adm-mx tbody tr:last-child th, .adm-mx tbody tr:last-child td { border-bottom: none; }
.adm-mx .adm-mx-staff { text-align: left; padding-left: 16px; width: 170px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.adm-mx thead .adm-mx-staff { background: #fbfbf9; }
.adm-mx-person { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.adm-mx-person .avatar { width: 32px; height: 32px; font-size: .85rem; }
.adm-mx-cell { width: 100%; min-height: 48px; padding: 4px; border-radius: 10px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.adm-mx-cell .adm-mx-sep { display: block; font-weight: 400; opacity: .6; line-height: 1; }
.adm-mx-cell.off { background: var(--card); border: 1px dashed var(--line); color: #a0a5ab; font-weight: 500; }
.adm-mx-cell:hover { border-color: var(--accent); }

/* スタッフ・メニューの行 */
.adm-cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 16px 18px 8px; }
.adm-cardhead h2 { margin: 0; font-size: 1.1rem; }
.adm-list { border-top: 1px solid var(--line); }
.adm-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.adm-row.inactive { background: #fafaf8; }
.adm-row.inactive .adm-inline { color: var(--muted); }
.adm-row-main { flex: 1 1 auto; min-width: 0; }
.adm-inline { border-color: transparent; background: transparent; font-weight: 600; padding-left: 8px; }
.adm-inline:hover { border-color: var(--line); }
.adm-inline:focus { border-color: var(--accent); background: var(--card); }
.adm-unit { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; flex: 0 0 auto; }
.adm-unit input { width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.adm-unit span { color: var(--muted); font-size: .85rem; }
.adm-switchlabel { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; flex: 0 0 auto; }
.adm-photo-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 0 0 auto; }
.adm-photo-cell .link { font-size: .72rem; padding: 0; }
.adm-photo { position: relative; padding: 0; border: none; background: none; min-height: 0; border-radius: 50%; }
.adm-photo .avatar { width: 48px; height: 48px; font-size: 1.1rem; }
.adm-photo-badge { position: absolute; right: -6px; bottom: -2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: .6rem; padding: 0 5px; color: var(--accent); font-weight: 700; }
.adm-addrow { display: flex; gap: 8px; align-items: center; padding: 14px 18px; background: #fbfbf9; flex-wrap: wrap; }
.adm-addrow > input { flex: 1 1 200px; }
.adm-addrow > button { flex: 0 0 auto; }

/* スイッチ（チェック欄） */
input.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; min-height: 0; padding: 0; border-radius: 999px; background: #cfd3d7; border: none; position: relative; cursor: pointer; transition: background .15s; flex: 0 0 auto; margin: 0; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(18px); }

/* 店舗の設定 */
.adm-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 20px 22px; }
.adm-section-text h2 { font-size: 1.05rem; margin: 0 0 4px; }
.adm-section-fields label:first-child, .adm-grid2 > div > label { margin-top: 0; }
.adm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.adm-grid2 > div { min-width: 0; }
.adm-savebar { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, #f4f3ef 30%); display: flex; justify-content: flex-end; }

/* 予約ページ */
.adm-url { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-url input { flex: 1 1 280px; font-size: 1.05rem; font-weight: 600; background: #fbfbf9; }
.adm-url > button, .adm-url > .btn { flex: 0 0 auto; }

/* ダイアログ・通知 */
.adm-dialog { border: none; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); padding: 22px; width: min(520px, calc(100vw - 24px)); }
.adm-dialog h2 { font-size: 1.15rem; }
.adm-radios { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.adm-radio { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 500; cursor: pointer; }
.adm-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.adm-radio input { width: auto; min-height: 0; accent-color: var(--accent); }
.adm-times { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.adm-times input { flex: 1 1 0; min-width: 0; }
.adm-times.disabled { opacity: .45; }
.adm-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0 0 4px; }
.adm-copylabel { margin: 12px 0 6px; }
.adm-weekdays { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-weekday { margin: 0; position: relative; }
.adm-weekday input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adm-weekday span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); font-weight: 600; cursor: pointer; background: var(--card); }
.adm-weekday input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.adm-weekday input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.adm-dl { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 8px 12px; margin: 12px 0; }
.adm-dl dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.adm-dl dd { margin: 0; overflow-wrap: anywhere; }
.adm-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px)); background: #1f2328; color: #fff; border-radius: 12px; padding: 12px 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: .92rem; }
.adm-toast.warn { background: #6b4300; }
.adm-toast.error { background: var(--danger); }
.adm-toast.hidden { display: none; }

/* タブレット・スマホ */
@media (max-width: 1080px) {
  .adm { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
  .adm-week { grid-template-columns: repeat(7, minmax(118px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
}
@media (max-width: 820px) {
  .adm { display: block; padding: 16px 16px 96px; }
  .adm-who { display: none; }
  .adm-store { flex-direction: row; align-items: center; justify-content: space-between; border: none; padding: 0 0 12px; margin: 0; }
  .adm-nav { position: static; }
  .adm-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; flex-direction: row; gap: 0; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(31, 35, 40, .06); }
  .adm-tabs button { flex: 1 1 0; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: .62rem; text-align: center; min-height: 52px; border-radius: 8px; min-width: 0; }
  .adm-tabs button[aria-selected="true"] { box-shadow: none; background: var(--accent-soft); }
  .adm-tabs button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .adm-head { flex-direction: column; }
  .adm-head > button { width: 100%; }
  .adm-stats { gap: 8px; }
  .adm-stat { padding: 10px 12px; }
  .adm-stat-value { font-size: 1.5rem; }
  .adm-stat-note { display: none; }
  .adm-alert-row { grid-template-columns: auto 1fr auto; }
  .adm-alert-row .muted { display: none; }
  /* 週の表は、日にちを切り替えて1日ずつ見る */
  .adm-daytabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 10px; }
  .adm-daytab { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 0; min-height: 0; border-radius: 10px; font-weight: 400; background: var(--card); min-width: 0; }
  .adm-daytab strong { font-size: 1.05rem; }
  .adm-daytab-wd, .adm-daytab-n { font-size: .65rem; color: var(--muted); }
  .adm-daytab.sun .adm-daytab-wd, .adm-daytab.sun strong { color: var(--danger); }
  .adm-daytab.sat .adm-daytab-wd, .adm-daytab.sat strong { color: #2f5f9e; }
  .adm-daytab.today { border-color: var(--accent); }
  .adm-daytab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); }
  .adm-daytab[aria-selected="true"] * { color: var(--accent-ink) !important; }
  .adm-week { display: block; overflow: visible; }
  .adm-day { display: none; }
  .adm-day.sel { display: flex; }
  .adm-shifts { flex-direction: row; flex-wrap: wrap; }
  .adm-shift { width: auto; flex: 1 1 140px; border-color: var(--line); background: var(--card); min-height: 36px; font-size: .8rem; }
  .adm-booking { padding: 10px 12px; }
  .adm-booking-time, .adm-booking-main strong { font-size: .92rem; }
  .adm-booking-main small { font-size: .8rem; }
  .adm-section { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .adm-row { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .adm-row-menu .adm-row-main { flex-basis: 100%; }
  .adm-unit input { width: 80px; }
  .adm-savebar { bottom: 64px; }
  .adm-toast { bottom: 84px; }
}
@media (max-width: 480px) {
  .adm-grid2 { grid-template-columns: 1fr; }
  .adm-switchlabel .small { display: none; }
}
/* 管理画面：細かい直し */
.adm-tabs button { justify-content: flex-start; }
.adm { grid-template-columns: 208px minmax(0, 1fr); gap: 24px; }
.adm-weekcard { padding: 14px 12px; }
.adm-week { gap: 6px; }
.adm-day-head { padding: 8px 8px 4px; }
.adm-shift { padding: 3px 4px; gap: 5px; }
.adm-shift-name { display: none; }
.adm-shift-time { color: var(--ink); }
.adm-shift.off .adm-shift-time { color: #9aa0a6; }
.adm-shift.custom, .adm-shift.off.custom { border: 1px dashed var(--accent); }
.adm-shift-tag { display: none; }
.adm-bookings { padding: 6px 4px 8px; }
.adm-booking { flex-direction: column; gap: 0; padding: 6px 7px; }
.adm-booking-main strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.adm-booking-main small { white-space: normal; line-height: 1.35; }
@media (max-width: 820px) {
  .adm-shift-name { display: inline; color: var(--ink); }
  .adm-shift-tag { display: inline; }
  .adm-shift.custom { border-style: solid; }
  .adm-booking { flex-direction: row; gap: 10px; }
}
.adm-booking-staff { display: none; }
@media (max-width: 820px) { .adm-booking-staff { display: inline; } }
.adm-shift, .adm-booking, .adm-alert-row { justify-content: flex-start; }
.adm-mx-narrow { display: none; }
.adm-mx-t { min-width: 0; table-layout: fixed; }
.adm-mx-t thead th { font-size: .75rem; }
.adm-mx-t tbody th { width: 40px; font-size: .9rem; color: var(--muted); }
.adm-mx-t tbody th.sun { color: var(--danger); }
.adm-mx-t tbody th.sat { color: #2f5f9e; }
.adm-mx-t th:first-child { width: 40px; }
.adm-mx-t td { padding: 4px 3px; }
.adm-mx-col { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); font-weight: 600; overflow: hidden; }
.adm-mx-col > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-mx-col .avatar { width: 30px; height: 30px; font-size: .8rem; }
.adm-mx-t .adm-mx-cell { min-height: 44px; font-size: .75rem; }
@media (max-width: 820px) {
  .adm-mx-wide { display: none; }
  .adm-mx-narrow { display: block; }
}

/* ---------- 予約ページのテーマ色（店舗ごと。値の一覧は src/theme.ts） ----------
   どの色も白い文字とのコントラスト比 4.5 以上。green は :root の色そのまま */
[data-theme="navy"] { --accent: #2b4a7e; --accent-soft: #e6e9f0; --accent-line: #cad2df; --accent-faint: #f4f6f9; }
[data-theme="terracotta"] { --accent: #a4492a; --accent-soft: #f4e9e5; --accent-line: #e8d2ca; --accent-faint: #faf6f4; }
[data-theme="bordeaux"] { --accent: #8a2341; --accent-soft: #f1e5e8; --accent-line: #e2c8d0; --accent-faint: #f9f4f6; }
[data-theme="rose"] { --accent: #a04f62; --accent-soft: #f4eaec; --accent-line: #e7d3d8; --accent-faint: #faf6f7; }
[data-theme="lavender"] { --accent: #6a509a; --accent-soft: #edeaf3; --accent-line: #dad3e6; --accent-faint: #f8f6fa; }
[data-theme="mustard"] { --accent: #7d6100; --accent-soft: #efece0; --accent-line: #dfd8bf; --accent-faint: #f9f7f2; }
[data-theme="charcoal"] { --accent: #3d434b; --accent-soft: #e8e8e9; --accent-line: #cfd0d2; --accent-faint: #f5f6f6; }

/* 管理画面の色の選択（丸を押して選ぶ） */
.theme-picker { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.theme-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 64px; min-height: 0; padding: 8px 4px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--ink); font-size: .78rem; font-weight: 500; cursor: pointer; }
.theme-swatch:hover { background: var(--accent-faint); }
.theme-swatch-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 3px var(--card), 0 0 0 1px var(--line); display: grid; place-items: center; color: #fff; }
.theme-swatch[aria-checked="true"] { border-color: var(--accent); background: var(--accent-faint); font-weight: 700; }
.theme-swatch[aria-checked="true"] .theme-swatch-dot { box-shadow: 0 0 0 2px var(--accent); }
.theme-swatch[aria-checked="true"] .theme-swatch-dot::after { content: "✓"; font-size: 1rem; font-weight: 700; }
.theme-preview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-faint); }
.theme-preview .bk-slot { width: 44px; display: inline-grid; place-items: center; }
.theme-preview button.primary { min-height: 40px; }

/* 管理画面：お店のドメイン */
.adm-domain-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.adm-domain-head strong { font-size: 1.05rem; word-break: break-all; }
.adm-domain-note { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: .9rem; }
.adm-dns-wrap { overflow-x: auto; margin: 8px 0; }
.adm-dns { width: 100%; border-collapse: collapse; font-size: .88rem; }
.adm-dns th, .adm-dns td { text-align: left; padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; }
.adm-dns th { background: #fbfbf9; color: var(--muted); font-weight: 600; white-space: nowrap; }
.adm-dns code { word-break: break-all; }
