/* ○○ボウル 共通スタイル — スマホ優先、ライト／ダーク対応 */

:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece5;
  --text: #1d232b;
  --muted: #5a6370;
  --line: #ddd8cd;
  --primary: #1f4a73;
  --primary-hover: #183b5c;
  --on-primary: #ffffff;
  --accent: #a8641a;
  --accent-soft: #f6ead9;
  --ok: #2c7a4b;
  --ok-soft: #e3f1e8;
  --warn: #9a5800;
  --warn-soft: #fbefd9;
  --ng: #8a9099;
  --ng-soft: #eceae6;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --info-soft: #e7eef6;
  --focus: #2f7de1;
  --past: #e7e4dd;
  --band: #1f4a73;
  --band-text: #ffffff;
  --shadow: 0 1px 2px rgba(20, 24, 30, .06), 0 4px 16px rgba(20, 24, 30, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11151b;
    --surface: #1a2029;
    --surface-2: #222a35;
    --text: #e7e9ec;
    --muted: #a3acb8;
    --line: #333d4a;
    --primary: #8db8e8;
    --primary-hover: #a9caef;
    --on-primary: #0e1a27;
    --accent: #e0a35a;
    --accent-soft: #3a2c1a;
    --ok: #7fcf9c;
    --ok-soft: #1c3326;
    --warn: #f0b75e;
    --warn-soft: #3a2c14;
    --ng: #7d8590;
    --ng-soft: #252b33;
    --danger: #ff8a7a;
    --danger-soft: #3d1f1c;
    --info-soft: #1d2a3a;
    --focus: #7fb6ff;
    --past: #262c35;
    --band: #3f6f9f;
    --band-text: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11151b;
  --surface: #1a2029;
  --surface-2: #222a35;
  --text: #e7e9ec;
  --muted: #a3acb8;
  --line: #333d4a;
  --primary: #8db8e8;
  --primary-hover: #a9caef;
  --on-primary: #0e1a27;
  --accent: #e0a35a;
  --accent-soft: #3a2c1a;
  --ok: #7fcf9c;
  --ok-soft: #1c3326;
  --warn: #f0b75e;
  --warn-soft: #3a2c14;
  --ng: #7d8590;
  --ng-soft: #252b33;
  --danger: #ff8a7a;
  --danger-soft: #3d1f1c;
  --info-soft: #1d2a3a;
  --focus: #7fb6ff;
  --past: #262c35;
  --band: #3f6f9f;
  --band-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .02em;
}
img { max-width: 100%; }
a { color: var(--primary); text-underline-offset: .2em; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.4; letter-spacing: .03em; }
h1 { font-size: 1.6rem; margin: 0 0 .75rem; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: .5rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; color: var(--on-primary); }

/* ---------- レイアウト ---------- */
.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main { display: block; padding: 24px 0 56px; min-height: 60vh; }
main:focus { outline: none; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 10px; padding-bottom: 0; }
.brand {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; padding: 4px 0;
}
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-size: .8rem;
}
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; order: 2; }
/* スマホ幅：1段目に店名とテーマ切替、2段目以降にメニュー（収まらなければ折り返して全項目を表示） */
.site-nav { width: 100%; order: 3; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 2px; list-style: none; margin: 0 -10px; padding: 0; }
.site-nav li { white-space: nowrap; }
.site-nav a {
  display: block; padding: 8px 10px; color: var(--muted); text-decoration: none; font-size: .95rem;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }

@media (min-width: 760px) {
  .site-header .container { flex-wrap: nowrap; padding-top: 0; }
  .site-nav { width: auto; order: 2; }
  .site-nav ul { flex-wrap: nowrap; margin: 0; }
  .header-tools { order: 3; margin-left: 8px; }
  .brand { margin-right: auto; }
  .site-nav a { padding: 20px 12px 17px; }
}

.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .85rem; cursor: pointer; min-height: 36px;
}
.theme-toggle:hover { color: var(--text); }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.site-footer .footer-name { color: var(--text); font-weight: 700; margin-bottom: .25rem; }
.site-footer dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: .5rem 0 1rem; }
.site-footer dt { font-weight: 600; }
.site-footer dd { margin: 0; }
.site-footer small { display: block; margin-top: .5rem; }

/* ---------- 部品 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lead { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: 10px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--primary); background: var(--primary); color: var(--on-primary);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.3;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--primary); }
.btn-secondary:hover { background: var(--info-soft); color: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); filter: brightness(.92); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); font-weight: 500; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.notice { border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 16px; border: 1px solid transparent; }
.notice:empty { display: none; }
.notice-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.notice-info { background: var(--info-soft); color: var(--text); border-color: var(--line); }
.notice-ok { background: var(--ok-soft); color: var(--text); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }

.badge {
  display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .78rem; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-ng { background: var(--ng-soft); color: var(--ng); border-color: transparent; }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- フォーム ---------- */
.field { margin-bottom: 18px; }
.field > label, .field > .label, fieldset > legend {
  display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem;
}
.req { color: var(--danger); font-size: .78rem; margin-left: .4rem; font-weight: 600; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.field-error { color: var(--danger); font-size: .875rem; margin-top: 6px; }
.field-error:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="date"], input[type="number"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.choice { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }

.stepper { display: flex; align-items: stretch; max-width: 220px; }
.stepper input { text-align: center; border-radius: 0; border-left: 0; border-right: 0; }
.stepper button {
  width: 48px; flex: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 1.2rem; cursor: pointer;
}
.stepper button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.stepper button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.stepper button:hover { background: var(--line); }

.form-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- トップ ---------- */
.hero {
  background:
    radial-gradient(1200px 300px at 85% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 20px; box-shadow: var(--shadow);
}
.hero-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .12em; font-size: .85rem; margin-bottom: .5rem; }
.hero h1 { font-size: 1.9rem; margin-bottom: .5rem; }
.hero p { color: var(--muted); max-width: 36em; }
@media (min-width: 760px) { .hero { padding: 48px 40px; } .hero h1 { font-size: 2.4rem; } }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-label { color: var(--muted); font-size: .82rem; }
.stat-value { font-size: 1.15rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
@media (min-width: 760px) { .stat-value { font-size: 1.35rem; } }
.stat-value small { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 2px; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; gap: 4px 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-list li:last-child { border-bottom: 0; }
.news-list time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 7.5em; font-size: .92rem; }
.news-list .title { flex: 1 1 16em; }
.news-year { font-size: 1.1rem; margin: 28px 0 4px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); display: inline-block; }

.access dl { display: grid; grid-template-columns: 6em 1fr; gap: 8px 12px; margin: 0; }
.access dt { color: var(--muted); }
.access dd { margin: 0; }

.two-col { display: grid; gap: 16px; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ---------- 料金 ---------- */
.price-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card { text-align: center; }
.price-card .price { font-size: 2.2rem; font-weight: 800; color: var(--text); line-height: 1.2; margin: 8px 0; font-variant-numeric: tabular-nums; }
.price-card .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price-card .label { color: var(--accent); font-weight: 700; }
.example { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 16px; }

/* ---------- 予約 ---------- */
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 24px; gap: 6px; counter-reset: step; }
.steps li {
  flex: 1; text-align: center; font-size: .82rem; color: var(--muted); padding: 8px 4px 6px;
  border-bottom: 4px solid var(--line);
}
.steps li[aria-current="step"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.steps li.done { color: var(--text); border-bottom-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.cond-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
.cond-grid .full { grid-column: 1 / -1; }
@media (min-width: 760px) { .cond-grid { grid-template-columns: 1.4fr 1fr 1.2fr 1fr; } .cond-grid .full { grid-column: auto; } }

.times-head { font-size: 1.05rem; margin: 8px 0 4px; }
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
@media (min-width: 560px) { .time-grid { grid-template-columns: repeat(5, 1fr); } }
.time-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 64px; padding: 8px 4px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit;
}
.time-btn .t { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.time-btn .m { font-size: .82rem; }
.time-btn.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.time-btn.ok .m { color: var(--ok); font-weight: 700; }
.time-btn.few { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 50%, var(--surface)); }
.time-btn.few .m { color: var(--warn); font-weight: 700; }
.time-btn.ok:hover, .time-btn.few:hover { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.time-btn[disabled] { background: var(--ng-soft); color: var(--ng); cursor: not-allowed; border-color: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .82rem; color: var(--muted); margin-top: 12px; }

.summary-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .summary-grid { grid-template-columns: 2fr 3fr; align-items: start; } }
.summary dl { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px 12px; margin: 0; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; font-weight: 600; }
.summary .total { font-size: 1.2rem; }

.done-number { text-align: center; padding: 8px 0 16px; }
.done-number .label { color: var(--muted); font-size: .9rem; }
.done-number .no { font-size: 2.2rem; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.done-number .phone { margin-top: 4px; }
.rules { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 16px; }
.rules ul { margin: 0; padding-left: 1.2em; }

/* ---------- お知らせ詳細 ---------- */
.article { max-width: 720px; }
.article time { color: var(--muted); display: block; margin-bottom: .5rem; }
.article .body p { margin: 0 0 1.2em; white-space: pre-line; }
.preview-banner { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 16px; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 10px 0; font-weight: 600; list-style-position: outside; }
.faq details p { margin: 0 0 12px; color: var(--muted); }

/* ---------- スタッフ ---------- */
.staff-body .site-header .container { padding-top: 10px; padding-bottom: 10px; }
.staff-user { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.login-card { max-width: 420px; margin: 32px auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs [role="tab"] {
  border: 0; background: transparent; font: inherit; color: var(--muted); padding: 10px 16px; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px; min-height: 44px;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }

.ledger-toolbar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; margin-bottom: 16px; }
.ledger-toolbar .field { margin: 0; }
.date-nav { display: flex; gap: 6px; align-items: center; }
.date-nav input { width: auto; }
.summary-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 12px; font-size: .9rem; }
.chip strong { font-size: 1.1rem; margin-left: 4px; }

.ledger-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ledger { min-width: 860px; position: relative; }
.ledger-row { display: grid; grid-template-columns: 72px 1fr; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-lane { display: grid; place-items: center; font-weight: 700; background: var(--surface-2); border-right: 1px solid var(--line); font-size: .9rem; }
.ledger-track { position: relative; height: 64px; display: grid; grid-template-columns: repeat(15, 1fr); }
.ledger-cell { border-right: 1px dashed var(--line); }
.ledger-cell:last-child { border-right: 0; }
.ledger-cell.past { background: var(--past); }
.ledger-head .ledger-track { height: 36px; }
.ledger-head .ledger-cell { font-size: .75rem; color: var(--muted); padding: 8px 0 0 4px; font-variant-numeric: tabular-nums; }
.band {
  position: absolute; top: 8px; bottom: 8px; border-radius: 6px; border: 0;
  background: var(--band); color: var(--band-text); font: inherit; font-size: .8rem; text-align: left;
  padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.band:hover { filter: brightness(1.08); }
.band:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ledger-empty { padding: 16px; color: var(--muted); }

dialog {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text);
  padding: 24px; width: min(92vw, 440px); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(10, 14, 20, .5); }
.detail-list { display: grid; grid-template-columns: 6.5em 1fr; gap: 6px 12px; margin: 0 0 16px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 600; word-break: break-all; }

.news-admin-list { list-style: none; margin: 0; padding: 0; }
.news-admin-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.news-admin-list li:last-child { border-bottom: 0; }
.news-admin-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.news-admin-title { font-weight: 700; }
.news-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.char-count { float: right; font-weight: 400; color: var(--muted); font-size: .85rem; }
.char-count.over { color: var(--danger); }

.hidden { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .time-btn, .band { transition: background-color .15s, border-color .15s, box-shadow .15s, filter .15s; }
}

@media print {
  .site-header, .site-footer, .btn-row { display: none; }
}
.mt { margin-top: 12px; }
[hidden] { display: none !important; }
