:root {
  --ink: #22221f;
  --muted: #605e58;
  --paper: #fffdf8;
  --surface: #ffffff;
  --surface-2: #faf6ef;
  --line: #e4ded2;
  --field-border: #cfc7b9;
  --brand: #7b3548;
  --brand-dark: #572333;
  --brand-tint: #f4e7ec;
  --brand-tint-border: #e2cbd2;
  --accent: #99682e;
  --accent-tint: #f7eee2;
  --available: #dcefe1;
  --consult: #fff1c9;
  --unavailable: #ecebea;
  --booked: #dbe4f5;
  --hold: #f2e2c8;
  --danger: #a33b35;
  --danger-tint: #f8e3e1;
  --info: #2f6fae;
  --info-tint: #dce8f5;
  --info-ink: #285b88;
  --ok-ink: #386d47;
  --warn-ink: #75580f;
  --shadow: 0 10px 30px rgba(63, 43, 32, .07);
  --shadow-lg: 0 18px 48px rgba(63, 43, 32, .13);
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --font-sans: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --step-1: 1.125rem;
  --step-2: 1.35rem;
  --step-3: 1.6rem;
  --step-4: clamp(1.95rem, 1.4rem + 2.2vw, 2.7rem);
}
/* --operator-*（運営が使う内部ツール共通のネイビー/ブルー）は
   static/css/design_tokens.css で定義する。/admin/ はapp.css自体を
   読み込まないため、ここに定義してもadmin_shell.css等からは参照できない
   （design_tokens.cssの冒頭コメント参照）。 */
* { box-sizing: border-box; }
.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; }
/* .button 等が display を指定する要素でも、hidden属性は必ず効かせる
   （通常のCSSはユーザーエージェント既定のdisplay:noneより優先されてしまうため）。 */
[hidden] { display: none !important; }
html { font-family: var(--font-sans); color: var(--ink); background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 44px; }
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px max(20px, calc((100vw - 1280px)/2)); background: rgba(255,253,248,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.brand span { color: var(--brand); font-weight: 600; }
.site-header nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-header nav a, .link-button { color: var(--ink); text-decoration: none; font-size: .9rem; transition: color .12s; }
.site-header nav a:hover, .link-button:hover { color: var(--brand); }
.contact-short { display: none; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; background: transparent; padding: 0; min-height: auto; cursor: pointer; }
main { width: min(1280px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 64px; }
footer { padding: 24px; color: var(--muted); text-align: center; font-size: .8rem; border-top: 1px solid var(--line); }
h1 { margin: .12em 0 .32em; font-family: var(--font-serif); font-weight: 700; font-size: var(--step-4); line-height: 1.22; letter-spacing: .01em; text-wrap: balance; }
h2 { margin: 0 0 12px; font-size: var(--step-2); line-height: 1.3; text-wrap: balance; }
h3 { font-size: var(--step-1); line-height: 1.35; }
p { line-height: 1.75; }
.eyebrow { color: var(--accent); margin: 0 0 2px; font-weight: 700; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; }
.muted { color: var(--muted); }
.hero { padding: 60px 0 32px; max-width: 720px; }
.store-grid, .login-options, .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.lookup-cta { text-align: center; margin: 32px 0 0; }
.lookup-cta p { margin: 8px 0 0; }
.store-card, .card, .person-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.store-card { display: grid; gap: 14px; color: var(--ink); text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; }
.store-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.store-card.all-stores { background: linear-gradient(135deg, #fff 0%, var(--accent-tint) 100%); }
.store-card span, .store-card small { color: var(--muted); }
.store-card span { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.store-card strong { font-size: 1.45rem; }
.store-card small { font-weight: 700; color: var(--brand); }
.narrow-panel { max-width: 860px; margin: 40px auto; }
.error-page { max-width: 540px; margin: 8vh auto; text-align: center; }
.error-page .eyebrow { font-family: var(--font-serif); font-size: 3rem; line-height: 1; color: var(--brand-tint-border); letter-spacing: .08em; margin-bottom: 6px; }
.error-page h1 { margin-top: 0; }
.error-page p { color: var(--muted); }
.error-page .button { margin-top: 14px; }
.form-panel { max-width: 480px; margin: 8vh auto 40px; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.form-panel h1 { font-size: var(--step-3); }
.form-panel > .button, .form-panel form button { width: 100%; margin-top: 6px; }
.form-panel form p { display: grid; gap: 7px; }
.form-panel hr, .form-panel + hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
input, select, textarea { width: 100%; border: 1px solid var(--field-border); border-radius: var(--r-sm); padding: 10px 12px; background: white; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #b8ad9b; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(123,53,72,.34); outline-offset: 2px; }
.skip-to-content-link { position: absolute; top: -40px; left: 8px; z-index: 1000; background: var(--brand); color: white; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; transition: top .15s; }
.skip-to-content-link:focus { top: 8px; }
.operator-portal-body .skip-to-content-link, .manager-portal-body .skip-to-content-link, .finance-portal-body .skip-to-content-link { background: var(--operator-blue); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(123,53,72,.1); }
/* iOS Safariの日付・時刻入力はinput自身より大きい部品を描画することがある。
   枠線を外枠に持たせ、内側の描画だけをクリップしてカード内に収める。 */
.native-datetime-shell { display: block; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid var(--field-border); border-radius: var(--r-sm); background: white; }
.native-datetime-shell:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(123,53,72,.1); outline: 3px solid rgba(123,53,72,.34); outline-offset: 2px; }
.native-datetime-shell input[type="date"], .native-datetime-shell input[type="time"] { display: block; width: 100%; min-width: 0; max-width: 100%; border: 0; border-radius: 0; box-shadow: none; outline: 0; }
.meeting-area-summary p { margin: .25rem 0; }
.secondary-details { margin-top: var(--s-3); }
.secondary-details > summary { cursor: pointer; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: white; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 700; transition: background-color .15s, border-color .15s, transform .05s; }
.button-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button:not(:disabled):hover { background: var(--surface-2); }
.button:not(:disabled):active { transform: translateY(1px); }
.button.primary { background: var(--brand); border-color: var(--brand); color: white; }
.button.primary:not(:disabled):hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button.secondary { background: var(--brand-tint); border-color: var(--brand-tint-border); color: var(--brand-dark); }
.button.secondary:not(:disabled):hover { background: #eed9e0; }
.button.ghost { background: transparent; border-color: #b7ad9c; }
.button.ghost:not(:disabled):hover { background: rgba(0,0,0,.03); }
.button.danger-soft { background: var(--danger-tint); color: var(--danger); border-color: #efc7c4; }
.button.small { min-height: 36px; padding: 6px 11px; font-size: .85rem; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-heading h1 { font-size: var(--step-3); }
.page-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.page-heading p { line-height: 1.6; }
.filter-panel, .switcher, .editor-toolbar, .action-row, .date-bar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.date-bar { margin-bottom: 14px; }
.date-bar label { display: grid; gap: 5px; min-width: 145px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.filter-panel label, .editor-toolbar label, .switcher label { display: grid; gap: 5px; min-width: 145px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.filter-panel.compact { margin-bottom: 28px; }
/* 「絞り込む」より弱い操作として見せる（下線付きの単なるテキストリンク）。 */
.filter-clear { align-self: center; text-decoration: underline; font-size: .85rem; }
.store-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: -8px 0 18px; }
.back-link { display: inline-block; color: var(--muted); font-size: .9rem; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--brand); }
.booking-methods { max-width: 820px; margin-bottom: 18px; padding: 18px; border: 1px solid var(--brand-tint-border); border-radius: var(--r-md); background: var(--brand-tint); }
.booking-methods h2 { margin-bottom: 12px; font-size: var(--step-1); }
.booking-method-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.booking-method-card { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--brand-tint-border); border-radius: var(--r-sm); background: white; color: var(--ink); text-decoration: none; transition: background-color .15s, border-color .15s, transform .05s; }
.booking-method-card:hover { background: var(--surface-2); }
.booking-method-card:active { transform: translateY(1px); }
.booking-method-icon { display: inline-flex; flex: 0 0 auto; color: var(--brand); }
.booking-method-icon svg, .refresh-button svg, .schedule-swipe-hint svg, .dialog-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.booking-method-label, .booking-method-desc { display: block; }
.booking-method-label { font-weight: 700; font-size: 1rem; line-height: 1.4; }
.booking-method-desc { font-size: .82rem; color: var(--muted); }
.schedule-support { display: grid; gap: 10px; margin-top: 18px; max-width: 820px; }
.schedule-support > .button { justify-self: start; }
.schedule-help { margin-top: 0; }
.schedule-help p { margin-bottom: 0; overflow-wrap: anywhere; }

/* Filter panel: always visible on desktop; collapsible (CSS-only, no JS) on mobile. */
.filters { margin-bottom: 14px; }
.filters-toggle { position: absolute; left: -9999px; width: 1px; height: 1px; }
.filters-summary { display: none; }
.table-hint { display: none; }
.status-bar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin: 12px 0; color: var(--muted); font-size: .82rem; }
.status-bar .offline { color: var(--danger); font-weight: 700; }
.refresh-button { min-width: 44px; padding-inline: 10px; color: var(--brand); }
.therapist-live-update { justify-content: flex-start; margin-top: 0; }
.therapist-live-update .button { margin-left: auto; }
.button-attention { border-color: var(--danger) !important; color: var(--danger) !important; }
.schedule-shell { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: var(--r-md); background: white; box-shadow: var(--shadow); overscroll-behavior: contain; }
.schedule-shell.has-horizontal-overflow { box-shadow: inset -16px 0 14px -18px rgba(34,34,31,.7), var(--shadow); }
.schedule-swipe-hint { align-items: center; gap: 6px; }
.schedule-swipe-hint svg { flex: 0 0 auto; width: 18px; height: 18px; }
#public-schedule { scroll-margin-top: 132px; }
#schedule-date { scroll-margin-top: 88px; }
.schedule-table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.schedule-table th, .schedule-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; text-align: center; }
.schedule-table thead th { position: sticky; top: 0; z-index: 5; min-width: 132px; background: var(--surface-2); padding: 10px; box-shadow: inset 0 -1px 0 var(--line); }
.schedule-table thead th:first-child { left: 0; z-index: 8; min-width: 72px; }
.schedule-table tbody th { position: sticky; left: 0; z-index: 4; background: var(--surface-2); padding: 8px; white-space: nowrap; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: inset -1px 0 0 var(--line); }
.schedule-table thead th.target-day { background: var(--accent); color: #fff; }
.schedule-table td.target-day { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.therapist-head { display: grid; justify-items: center; gap: 5px; }
.therapist-head img, .avatar img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.therapist-head small { color: var(--muted); font-weight: 500; }
/* 紹介ページへのリンク（画像だけがタップ範囲）。display:contentsでレイアウトを
   崩さず、アイコン画像そのものだけをタップ可能にする。 */
.therapist-head a { display: contents; }
.slot { width: 100%; min-width: 132px; min-height: 52px; border: 0; padding: 6px; cursor: pointer; color: var(--ink); transition: filter .1s; }
.slot:not(.locked):active { filter: brightness(.94); }
.slot.available { background: var(--available); }
.slot.consult { background: var(--consult); }
.slot.unavailable { background: var(--unavailable); }
.slot:disabled { cursor: not-allowed; }
.slot.booked { background: var(--booked); }
.slot.hold { background: var(--hold); }
.slot strong, .slot small { display: block; }
.slot small { margin-top: 3px; font-size: .68rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 2px 0 4px; font-size: .82rem; color: var(--muted); }
.schedule-legend .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.mobile-day-nav { display: none; }
.pattern-settings { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--brand-tint-border); border-radius: var(--r-md); background: var(--surface-2); }
.pattern-settings summary { cursor: pointer; color: var(--brand-dark); font-weight: 700; }
.pattern-settings p { margin: 8px 0; }
.legend-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.legend-swatch.available { background: var(--available); }
.legend-swatch.consult { background: var(--consult); }
.legend-swatch.unavailable { background: var(--unavailable); }
.legend-swatch.booked { background: var(--booked); }
.legend-swatch.hold { background: var(--hold); }
.slot-swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.12); flex-shrink: 0; }
.slot-swatch.available { background: var(--available); }
.slot-swatch.consult { background: var(--consult); }
.slot-swatch.unavailable { background: var(--unavailable); }
.slot-swatch.booked { background: var(--booked); }
.slot-swatch.hold { background: var(--hold); }
.quick-dates { display: flex; align-items: center; gap: 6px; }
.date-input-shell { display: block; min-width: 0; }
.slot.pending::after { content: "未保存"; display: block; color: var(--brand); font-size: .62rem; font-weight: 700; }
.slot.locked { opacity: .62; cursor: not-allowed; }
.slot.unregistered { background-image: repeating-linear-gradient(135deg, transparent, transparent 7px, rgba(0,0,0,.035) 7px, rgba(0,0,0,.035) 14px); }
.loading, .empty { padding: 38px; text-align: center; color: var(--muted); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
/* <dialog>はトップレイヤーに乗るため、widthの%やvwはブラウザによって
   実際に見えている幅より広い基準（アドレスバー等を含む大きい方の
   ビューポート）で解決されることがあり、左右が見切れる原因になる。
   --viewport-safe-widthはJS側（static/js/viewport_safe_width.js）でdocumentElement.clientWidth
   から都度計算した「今見えている幅」で、こちらを優先的に使う。 */
dialog { width: min(480px, calc(var(--viewport-safe-width, 100vw) - 32px)); border: 0; border-radius: var(--r-lg); padding: 28px; box-shadow: 0 25px 80px rgba(0,0,0,.28); box-sizing: border-box; }
dialog::backdrop { background: rgba(28,22,20,.46); }
.dialog-close { float: right; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); line-height: 1; min-width: 44px; min-height: 44px; cursor: pointer; }
.dialog-close:hover { background: var(--surface-2); }
.detail-list { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; white-space: pre-wrap; }
.editor { display: grid; gap: 14px; }
.switcher { margin-bottom: 14px; }
.editor-message { min-height: 1.75em; margin: 0; color: var(--brand); font-weight: 700; }
/* 出勤表編集の「ブラシ」パネル：状態を選んでから枠をタップするだけで
   その場に反映される（意見リスト対応：以前の「選択→上部へ戻って適用」の
   2段階操作を1段階にした）。画面下に常時固定表示し、スマホでも保存まで
   スクロールせずに操作できるようにする（reservation_wizard.jsの
   wizard-subtotal-barと同じ固定表示の考え方）。 */
.editor-brush-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding: 12px max(20px, calc((100vw - 1280px)/2));
  background: rgba(255,253,248,.96); border-top: 1px solid var(--line); backdrop-filter: blur(12px); box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
/* ブラシバーの高さぶん、本文の最後の内容が隠れないよう下に余白を確保する。 */
body:has(#editor-brush-bar) { padding-bottom: 132px; }
.brush-group { display: flex; flex-wrap: wrap; gap: 8px; }
.brush-option { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--r-pill); background: white; font-weight: 700; font-size: .84rem; cursor: pointer; }
.brush-option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.brush-option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }
.brush-option:has(input:focus-visible) { outline: 3px solid rgba(123,53,72,.34); outline-offset: 2px; }
.brush-option:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.brush-details { flex: 1 1 220px; min-width: 0; }
.brush-details summary { font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.brush-details[open] { display: grid; gap: 10px; margin-top: 4px; }
.brush-details fieldset { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.brush-details legend { padding: 0 6px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.brush-details .check { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; color: var(--ink); font-weight: 500; }
.brush-details .check input { width: auto; }
.brush-details label:not(.check) { display: grid; gap: 5px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.brush-bar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
#pending-count { color: var(--muted); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.person-card { display: flex; align-items: center; gap: 12px; padding: 16px; }
.person-card .avatar { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-weight: 700; }
.person-card div:nth-child(2) { display: grid; flex: 1; }
.person-card small { color: var(--muted); }
.admin-link { text-align: right; }
.operator-day-controls { display: flex; align-items: end; justify-content: flex-end; gap: 12px; margin: 12px 0; }
.operator-day-controls label { display: grid; gap: 4px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.operator-list { margin-top: 32px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: white; -webkit-overflow-scrolling: touch; }
.table-hint { display: none; }
.audit-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .82rem; }
.audit-table th, .audit-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.audit-table th { background: var(--surface-2); position: sticky; top: 0; }
.audit-table pre { max-width: 320px; white-space: pre-wrap; word-break: break-all; margin: 0; }
.audit-table .nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.audit-table th { font-size: .74rem; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.ops-table th { font-size: .74rem; letter-spacing: .04em; color: var(--muted); font-weight: 700; text-transform: none; }
.change-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.change-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.change-field { font-weight: 700; color: var(--muted); }
.change-before { color: var(--muted); text-decoration: line-through; }
.change-after { font-weight: 700; }
.change-arrow { color: var(--accent); }
.pagination { display: flex; justify-content: center; gap: 16px; padding: 18px; }
.messages { width: min(900px, calc(100% - 32px)); margin: 16px auto 0; }
.message { padding: 12px 16px; border-radius: var(--r-sm); background: var(--consult); border: 1px solid rgba(0,0,0,.05); font-weight: 500; }
.message.success { background: var(--available); }
.message.error { background: var(--danger-tint); color: var(--danger); }
.message.warning { background: var(--accent-tint); }
.message.info { background: var(--info-tint); color: var(--info-ink); }
.month-picker { display: flex; align-items: end; gap: 10px; }
.month-picker label { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
.summary-card { display: grid; gap: 10px; min-height: 155px; padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
/* 通知メールのリンク（#request-<id>）でジャンプしてきた時、該当のカードだと
   分かるよう一時的に強調する（例：募集中の依頼の通知から来た場合）。 */
.summary-card:target { box-shadow: 0 0 0 3px var(--brand), var(--shadow); }
.summary-card span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.summary-card strong { font-size: 1.45rem; }
.summary-card a { align-self: end; font-weight: 700; text-decoration: none; color: var(--brand); }
.summary-card a:hover { color: var(--brand-dark); }
/* フリー予約希望の立候補セラピスト一覧：名前の右に金額、下に操作ボタン。 */
.candidate-card { min-height: 0; }
.candidate-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.candidate-card-head > div:first-child:not(.candidate-person) { display: grid; gap: 2px; }
.candidate-card-head .candidate-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.candidate-person > div { display: grid; gap: 2px; min-width: 0; }
.candidate-avatar { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); }
.candidate-avatar--fallback { display: inline-flex; align-items: center; justify-content: center; color: var(--brand); font-size: 1.1rem; font-weight: 700; }
.candidate-card-price { display: grid; gap: 2px; text-align: right; font-weight: 700; }
.candidate-card .action-row { margin-top: 4px; }
.candidates-status { margin-top: 20px; }
.status-card { display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--r-md); border: 1px solid rgba(0,0,0,.05); }
.status-card-title { font-weight: 700; }
.status-card-sub { color: var(--muted); font-size: .88rem; }
.status-card--waiting { background: var(--info-tint); }
.status-card--waiting .status-card-title { color: var(--info-ink); }
.status-card--candidates { background: var(--consult); }
.status-card--candidates .status-card-title { color: var(--warn-ink); }
.status-card--resolved { background: var(--available); }
.status-card--resolved .status-card-title { color: var(--ok-ink); }
.status-card--rejected { background: var(--unavailable); }
.status-card--rejected .status-card-title { color: var(--muted); }
.urgent-action-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin: 0 0 18px; padding: 18px; border: 2px solid var(--danger); border-radius: var(--r-md); background: var(--danger-tint); }
.urgent-action-card > svg { width: 28px; height: 28px; margin-top: 2px; fill: none; stroke: var(--danger); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.urgent-action-card h2 { margin-bottom: 4px; color: var(--danger); font-size: 1.05rem; }
.urgent-action-card p { margin: 0 0 12px; }
.reservation-action-heading { margin-top: 16px; }
.reservation-danger-zone { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.reservation-danger-zone h3, .reservation-danger-zone p { margin: 0 0 8px; }
.draft-restored-note { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--info); border-radius: var(--r-sm); background: var(--info-tint); color: var(--info-ink); font-size: .88rem; }
.report-panel--original { background: var(--surface-2); box-shadow: none; }
.report-panel--original h2 { color: var(--muted); }
.report-panel--proposal { border-color: var(--brand); border-width: 2px; }
.report-panel--proposal h2 { color: var(--brand-dark); }
.candidate-condition-label { display: block; margin: 0; text-align: center; white-space: pre-line; }
.meeting-area-note { margin: 10px 0 0; line-height: 1.7; }
.field-disabled { opacity: .55; }
.request-board-respond-form .proposal-fields[open] { display: grid; gap: 14px; }
.request-board-respond-form .propose-different-time-fields { display: grid; gap: 14px; min-width: 0; }
.request-board-respond-form .propose-different-time-fields[hidden] { display: none; }
.request-board-respond-form .report-field { min-width: 0; overflow: hidden; }
.request-board-respond-form input[type="date"] { width: 100%; min-width: 0; max-width: 100%; }
a.card { color: var(--ink); text-decoration: none; display: grid; gap: 8px; align-content: start; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-grid .card h2, .login-options .card h2 { margin: 0; font-size: var(--step-1); color: var(--brand-dark); }
.card-grid .card p, .login-options .card p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }
.login-options .card { display: grid; gap: 10px; align-content: start; }
.login-options .card .button { margin-top: 4px; }
.section-block { margin-top: 36px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.task-list { display: grid; gap: 10px; }
.task-row { display: grid; grid-template-columns: 14px minmax(220px, 1fr) auto; align-items: center; gap: 14px; padding: 16px 18px; background: white; border: 1px solid var(--line); border-radius: var(--r-md); }
.task-row > div:nth-child(2) { display: grid; gap: 4px; }
.task-row small { color: var(--muted); }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--consult); box-shadow: 0 0 0 3px #fff4d9; }
.task-row.done .status-dot { background: #4e8a5f; box-shadow: 0 0 0 3px #e4f2e8; }
.task-row.done > div:nth-child(2) strong { color: var(--muted); text-decoration: line-through; }
.task-actions { display: flex; align-items: center; gap: 8px; }
.task-actions form { margin: 0; }
.attention { margin: 20px 0; padding: 18px 20px; border-left: 5px solid var(--accent); border-radius: var(--r-md); background: var(--consult); }
.attention p { margin: 6px 0 12px; overflow-wrap: anywhere; }
.report-panel { max-width: 820px; padding: 26px; background: white; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.report-panel + .report-panel { margin-top: 20px; }
.report-panel form { display: grid; gap: 16px; }
.report-section { display: grid; gap: 16px; }
.report-section-heading { margin: 10px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--brand-tint-border); font-size: 1.05rem; color: var(--brand-dark); }
.report-section-heading:first-child { margin-top: 0; }
.report-progress { margin: 0 0 18px; }
.wizard-progress--clickable li { padding: 0; background: none; }
.wizard-progress--clickable li button {
  font: inherit; cursor: pointer; border: none; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--muted); font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.wizard-progress--clickable li.wizard-progress-current button { background: var(--brand-tint); color: var(--brand-dark); }
.wizard-progress--clickable li.wizard-progress-done button { background: var(--surface-2); color: var(--ok-ink); }
.wizard-progress--clickable li button:hover { background: var(--brand-tint-border); }
.wizard-progress--clickable li button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.report-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.report-nav .button { flex: none; }
/* input[type=date/time]はブラウザ既定の最小幅を持ち、min-width:0だけでは
   「箱を狭くしてよい」とレイアウトエンジンに伝えられるだけで、ネイティブ
   ウィジェット自体の見た目の幅は縮まないため、箱より広ければ枠外へ
   はみ出して見える（実機・iOS Safariで確認）。overflow:hiddenで、その
   はみ出し分がページ全体の横スクロールを引き起こさないようにする。 */
.report-field { display: grid; gap: 7px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; overflow: hidden; }
/* overflow:hiddenだけだとウィジェットの一部が見切れて中途半端に見えるため、
   .request-board-respond-form input[type="date"]と同じ「max-width:100%を
   inputへ直接指定」を汎用化する（min-width:0は箱を狭くしてよいと伝える
   だけで、ネイティブの日付/時刻ウィジェット自体の描画幅は縮まないが、
   max-width:100%は上限として効く）。 */
.report-field input[type="date"], .report-field input[type="time"] { width: 100%; min-width: 0; max-width: 100%; }
.report-field > label { font-weight: 700; }
.report-field > small { color: var(--muted); white-space: pre-line; }
.report-field-time-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.report-field-time-group label { font-weight: 700; }
.report-field-time-group select { width: auto; }
.report-field--select > div > div, .report-field--checkbox > div > div { margin-bottom: 6px; }
.report-field--select label, .report-field--checkbox label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.report-field--select input, .report-field--checkbox input { width: auto; }
.report-panel fieldset { display: grid; gap: 16px; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); }
.report-panel legend { padding: 0 8px; font-weight: 700; color: var(--brand-dark); }
.report-subheading { margin: 4px 0 0; font-size: .85rem; font-weight: 700; color: var(--muted); }
.report-field:has(> input[type="checkbox"]) { grid-template-columns: auto 1fr; align-items: center; gap: 10px; min-height: 44px; }
.report-field:has(> input[type="checkbox"]) > label { order: 2; font-weight: 500; }
/* スマホでもタップしやすいよう、予約フォームのチェックボックス本体と行の高さを広げる */
.report-field:has(> input[type="checkbox"]) > input { order: 1; width: 20px; height: 20px; flex-shrink: 0; }
.report-field input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; }
.report-field--checkbox > div > div { min-height: 44px; display: flex; align-items: center; }

/* --- ご予約フォーム（項目数が多いため、1項目ずつの枠線を減らして見やすくする） --- */
.report-panel.reservation-form .report-field { padding: 10px 4px; border: none; border-radius: 0; background: transparent; border-bottom: 1px solid var(--line); }
.report-panel.reservation-form fieldset .report-field:last-child { border-bottom: none; }
.report-panel.reservation-form details.report-field-group { margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); }
.report-panel.reservation-form details.report-field-group summary { cursor: pointer; font-weight: 700; color: var(--brand-dark); list-style: none; }
.report-panel.reservation-form details.report-field-group summary::-webkit-details-marker { display: none; }
.report-panel.reservation-form details.report-field-group summary::after { content: "▾"; float: right; color: var(--muted); }
.report-panel.reservation-form details.report-field-group[open] summary::after { content: "▴"; }
.report-panel.reservation-form details.report-field-group[open] summary { margin-bottom: 10px; }

/* --- 予約フォームのステップ表示（JSが有効な時だけ効く。JS未実行時は
   全ステップがそのまま1ページに並ぶ、これまで通りの表示になる） --- */
/* ステップの中身（fieldset/detailsが複数）をまとめる箱。.report-panel form の
   grid gap は直接の子要素にしか効かないため、ステップでラップした時点で
   フィールド同士の間隔が失われていた（詰まって見えていた原因）。ここで
   同じ間隔を持たせて元の見え方に戻す。 */
.wizard-step { display: grid; gap: 16px; }
.wizard-progress { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.wizard-progress li { padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.wizard-progress li.wizard-progress-current { background: var(--brand-tint); color: var(--brand-dark); }
.wizard-progress li.wizard-progress-done { color: var(--ok-ink); }
.wizard-nav { justify-content: space-between; }
.wizard-course-service-note { margin: -4px 0 0; font-size: .82rem; line-height: 1.7; }
.wizard-subtotal-bar {
  /* 常に画面下に見えるようposition: fixedにする（他の兄弟要素の後ろに置かれる
     ため、position: stickyだと「これより下に内容が無い」形になり効果が出ない）。
     本文が隠れないよう、表示中はbody.has-wizard-subtotal-barで下に余白を確保する。 */
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px max(20px, calc((100vw - 1280px)/2));
  background: rgba(255,253,248,.96); border-top: 1px solid var(--line); backdrop-filter: blur(12px); box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.wizard-subtotal-step { color: var(--muted); font-size: .82rem; font-weight: 700; }
.wizard-subtotal-amount { font-size: 1.1rem; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.wizard-subtotal-amount small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); }
body.has-wizard-subtotal-bar { padding-bottom: 72px; }
body.wizard-keyboard-visible .wizard-subtotal-bar { display: none; }
body.has-wizard-subtotal-bar.wizard-keyboard-visible { padding-bottom: 0; }
@media (max-width: 640px) {
  .wizard-subtotal-bar { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 16px; }
  body.has-wizard-subtotal-bar { padding-bottom: 96px; }
}

.errorlist { margin: 0; padding-left: 20px; color: var(--danger); }
.locked-note { padding: 14px; color: var(--muted); background: var(--unavailable); border-radius: var(--r-sm); }
.status-pill { display: inline-flex; padding: 4px 9px; border-radius: var(--r-pill); background: var(--unavailable); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status-card-countdown { margin: 8px 0 0; color: var(--danger); font-weight: 700; }
.status-submitted { background: var(--info-tint); color: var(--info-ink); }
.status-approved { background: var(--available); color: var(--ok-ink); }
.status-draft, .status-not_created { background: var(--consult); color: var(--warn-ink); }
.status-pending { background: var(--info-tint); color: var(--info-ink); }
.status-confirmed { background: var(--available); color: var(--ok-ink); }
.status-rejected, .status-cancelled { background: var(--danger-tint); color: var(--danger); }
.ops-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.ops-table th, .ops-table td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ops-table th { position: sticky; top: 0; background: var(--surface-2); }
.ops-table td:nth-child(2) { display: grid; gap: 3px; }
.ops-table td:nth-child(2) small { color: var(--muted); }
/* 45分以上応答が付いていない行（対応遅延）。ほぼ白に近い色だと目立たず
   気づかれないとの指摘を受け、.badge.urgency-mediumと同系統の黄色系に
   はっきり変える（さらに緊急度が上がるrow-deadlineの赤系とは区別する）。 */
.row-outstanding { background: var(--consult); border-left: 4px solid var(--accent); }
.row-deadline { background: var(--danger-tint); border-left: 4px solid var(--danger); }
.pending-row-heading, .link-row > span { display: block; }
.pending-row-heading { margin-bottom: 4px; }
.pending-detail-link { margin-top: 5px; color: var(--brand); font-weight: 700; text-decoration: underline; }
.badge.urgency-high { background: var(--danger); color: #fff; }
.badge.urgency-medium { background: #fff0bd; color: #744f00; }
.active-filter-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.filter-chip { display: inline-flex; padding: 5px 10px; border-radius: var(--r-pill); background: var(--info-tint); color: var(--info-ink); font-size: .82rem; }
.row-review-ready { background: #eef4fb; box-shadow: inset 3px 0 0 var(--info-ink); }
.task-chip { display: inline-flex; margin: 0 5px 5px 0; padding: 4px 8px; border-radius: var(--r-pill); background: var(--consult); font-size: .75rem; }
.ops-summary { margin: -6px 0 18px; font-size: .95rem; }
.ops-summary strong { color: var(--brand); }
.pill-inline { display: inline-flex; padding: 2px 9px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 700; }
.pill-inline.review { background: var(--info-tint); color: var(--info-ink); }
.table-link { font-size: .85rem; font-weight: 700; }
.list-foot { margin-top: 14px; font-size: .85rem; }
.review-form { display: grid; gap: 16px; }
.review-form fieldset.review-actions { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.review-form legend { padding: 0 6px; font-size: .78rem; font-weight: 700; color: var(--muted); }
/* RadioSelectの既定描画（<div><label><input>選択肢名</label></div>の繰り返し）に
   対して、グローバルなinput{width:100%}がラジオボタンにもかかってしまい、
   ラベル文字と丸のチェック印が離れて見える不具合を修正する（意見：セラピスト
   向け予約リクエスト詳細画面）。 */
.review-actions > div { display: grid; gap: 8px; }
.review-actions label { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.review-actions input[type="radio"] { width: auto; }
.review-form .review-comment { display: grid; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.field-hint { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); max-width: 260px; }
.grid-hint { margin: 6px 0 10px; font-size: .78rem; color: var(--muted); }
.review-form .field-hint { font-weight: 500; color: var(--muted); }
.review-form textarea { width: 100%; }
.report-review-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 20px; align-items: start; }
/* .answer-listはgridのため、子要素にmin-width:0が無いと、URL等スペースの
   無い長い文字列（overflow-wrapがあっても）がgridの列そのものを押し広げ、
   カードの外にはみ出す（.manual-datetime-rowと同じ理由）。 */
.answer-list { display: grid; gap: 12px; min-width: 0; }
.answer-card, .review-panel { padding: 20px; background: white; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); min-width: 0; }
.answer-card small { color: var(--muted); font-weight: 700; }
/* 振り返りフォームの自由記述（textarea）にURL等、途中にスペースの無い
   長い文字列が入力されると、overflow-wrapが無いと折り返せずカードの
   外へはみ出す（意見：セラピストMT＞過去の振り返りフォーム）。 */
.answer-card p { margin-bottom: 0; white-space: normal; overflow-wrap: break-word; }

/* --- チャット（指名予約のセラピスト⇔お客様メッセージ） --- */
.chat-closing-notice { margin: 0 0 12px; color: var(--danger); font-weight: 700; }
.chat-message-list { display: grid; gap: 10px; margin-bottom: 16px; max-height: 60vh; overflow-y: auto; }
.chat-new-messages { display: block; margin: -4px auto 10px; }
.chat-connection-status { min-height: 1.5em; margin: -4px 0 12px; font-size: .78rem; text-align: right; }
.chat-connection-error { color: var(--danger); font-weight: 700; }
.reservation-actions-panel { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--danger-tint); border-radius: var(--r-md); background: #fffafa; }
.reservation-actions-panel summary { cursor: pointer; color: var(--danger); font-weight: 700; }
.reservation-actions-panel[open] summary { margin-bottom: 14px; }
.request-notes-preview { margin: 4px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.request-notes-preview summary { cursor: pointer; font-weight: 700; color: var(--brand-dark); }
.request-notes-preview p { margin: 8px 0 0; overflow-wrap: anywhere; }
.request-deadline { color: var(--muted); font-size: .78rem; font-weight: 700; }
.chat-bubble { max-width: 80%; padding: 12px 16px; background: white; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); }
.chat-bubble small { display: block; margin-bottom: 4px; color: var(--muted); font-weight: 700; font-size: .78rem; }
.chat-bubble p { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.chat-bubble.mine { margin-left: auto; background: var(--brand-tint); border-color: var(--brand-tint-border); }
.review-panel { position: sticky; top: 88px; }
.review-panel form p { display: grid; gap: 7px; }
.review-panel ul { list-style: none; padding: 0; }
.review-panel li label { display: flex; align-items: center; gap: 8px; }
.review-panel input[type="radio"] { width: auto; }
.previous-comment { padding: 12px; background: var(--consult); border-radius: var(--r-sm); }
@media (max-width: 800px) {
  .filters-summary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: .9rem; cursor: pointer; }
  .filters-summary::after { content: "▾"; color: var(--muted); }
  .filters-toggle:checked ~ .filters-summary { margin-bottom: 12px; }
  .filters-toggle:checked ~ .filters-summary::after { content: "▴"; }
  .filters-toggle:focus-visible ~ .filters-summary { outline: 3px solid rgba(123,53,72,.34); outline-offset: 2px; }
  .filters-toggle:not(:checked) ~ .filter-panel { display: none; }
  .status-bar { flex-wrap: wrap; justify-content: flex-start; gap: 8px 14px; font-size: .78rem; }
  .status-bar .button.small { margin-left: auto; }
  .site-header { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 14px; }
  .brand { font-size: .98rem; }
  .site-header nav { flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin: 0 -14px; padding: 2px 14px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a, .site-header nav .link-button { flex: 0 0 auto; padding: 8px 13px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: .82rem; white-space: nowrap; min-height: 0; }
  /* お客様向け公開ページのヘッダーは、通常は「お問い合わせ」1項目だけなので
     横並びのままコンパクトに収める。ただし運営・店長ログインのリンクが
     増える場合（is_debug時など）にナビが入りきらないと、flexの既定の
     min-width:autoによりロゴ側（.brand）が押し潰されて縦一文字表示に
     なってしまっていた。nav側にmin-width:0＋横スクロールを許可して
     ロゴの幅を必ず確保する。 */
  .public-site-header { position: static; flex-direction: row; align-items: center; gap: 10px; }
  .public-site-header .brand { flex: 0 0 auto; white-space: nowrap; }
  .public-site-header nav {
    flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; flex-wrap: nowrap;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .public-site-header nav::-webkit-scrollbar { display: none; }
  .public-site-header nav a { padding: 6px 10px; flex: 0 0 auto; white-space: nowrap; }
  .public-site-header .contact-long { display: none; }
  .public-site-header .contact-short { display: inline; }
  main { width: min(100% - 24px, 1280px); padding: 20px 0 48px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .filter-panel label { min-width: calc(50% - 6px); flex: 1; }
  .action-row .button { flex: 1 1 auto; }
  /* iOS Safari zooms the page when focusing a control smaller than 16px and
     never zooms back — keep form controls at 16px on phones. */
  input, select, textarea { font-size: 16px; }
  .schedule-shell { max-height: 65vh; }
  /* セラピスト・運営向けの出勤表編集は、スマホでは選択中の1日だけを表示する。
     PCの週一覧は維持しつつ、狭い画面で曜日を見失ったり横スクロール中に
     誤って別日の枠を塗る負担を減らす。 */
  .schedule-shell { scroll-snap-type: x mandatory; }
  .schedule-table th, .schedule-table td { scroll-snap-align: start; }
  #editor .mobile-day-nav { display: inline-flex; }
  #editor .week-nav { display: none; }
  #editor:not(.mobile-week-view) .schedule-table thead th:not(:first-child):not(.target-day),
  #editor:not(.mobile-week-view) .schedule-table tbody td:not(.target-day) { display: none; }
  #editor:not(.mobile-week-view) .week-bulk-control { display: none; }
  #editor .schedule-table { table-layout: fixed; }
  #editor .schedule-table thead th:first-child,
  #editor .schedule-table tbody th { width: 72px; }
  .editor-brush-bar { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 16px; }
  .brush-bar-actions { margin-left: 0; justify-content: space-between; }
  .brush-bar-actions #save-changes { flex: 1 1 auto; }
  body:has(#editor-brush-bar) { padding-bottom: 156px; }
  /* お客様向けの出勤表もPCと同じ表形式で表示する。
     枠のサイズを約半分に縮小し、1画面に2人分のセラピストが収まるように
     する。 */
  /* iOS Safariのdate入力は独自の最小幅を持ち、横1列では隣のボタンへ
     はみ出すことがある。スマホでは日付欄とボタンを上下に分離する。 */
  .date-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  .date-bar label { width: 100%; min-width: 0; }
  /* iOSのネイティブdate入力が自身の幅指定を超えても、専用外枠の内側に
     収める。枠線を外側に持たせるため、右端を切らずに表示できる。 */
  .date-bar .date-input-shell { width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--field-border); border-radius: var(--r-sm); background: white; }
  .date-bar .date-input-shell:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(123,53,72,.1); outline: 3px solid rgba(123,53,72,.34); outline-offset: 2px; }
  .date-bar input[type="date"] { display: block; width: 100%; min-width: 0; max-width: 100%; border: 0; border-radius: 0; box-shadow: none; outline: 0; }
  .date-bar .quick-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .date-bar .quick-dates .button.small { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; }
  .table-hint { display: flex; margin: 0 0 8px; font-size: .78rem; color: var(--muted); }
  .schedule-table thead th, .schedule-table thead th:first-child { min-width: 0; }
  .slot, .schedule-table thead th { min-width: 64px; }
  .slot { min-height: 44px; padding: 4px; }
  .slot small { font-size: .62rem; margin-top: 1px; }
  .schedule-table tbody th { min-width: 44px; padding: 6px 4px; font-size: .74rem; }
  .report-panel { padding: 18px; }
  .attendance-manual { padding: 12px 14px; }
  .summary-grid { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 14px 1fr; }
  .task-actions { grid-column: 2; flex-wrap: wrap; }
  .report-review-grid { grid-template-columns: 1fr; }
  .review-panel { position: static; }
  .hero { padding: 20px 0 20px; }
  .narrow-panel, .form-panel { margin: 16px auto; }
  .summary-card { min-height: 0; padding: 18px; }
  .store-card, .card, .person-card { padding: 20px; }
  .person-card { flex-wrap: wrap; }
  .person-card > div:nth-child(2) { min-width: 0; }
  .person-card small { word-break: break-word; }
  .person-card > .button { flex: 1 0 100%; margin-top: 4px; }
  .operator-day-controls { flex-wrap: wrap; justify-content: flex-start; }
  h1 { letter-spacing: 0; }
}

/* --- セラピストメニュー --- */
a.summary-card { text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
a.summary-card:hover { border-color: var(--brand); box-shadow: 0 14px 40px rgba(63, 43, 32, .14); }
a.summary-card strong { color: var(--brand-dark); }
/* 自分が対応する指名リクエスト・募集がある時、該当するメニューを目立たせる */
.summary-card.card-alert { background: var(--danger-tint); border-color: var(--danger); }
.summary-card.card-alert span, .summary-card.card-alert strong { color: var(--danger); }
.menu-grid { grid-template-columns: repeat(2, 1fr); }
.menu-group + .menu-group { margin-top: 34px; }
.menu-group > h2 { margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--brand-tint-border); color: var(--brand-dark); }
.menu-group .menu-grid { margin-bottom: 0; }
.action-required { margin: 0 0 24px; padding: 18px; border: 2px solid var(--danger); border-radius: var(--r-lg); background: var(--danger-tint); }
.action-required > h2 { color: var(--danger); }
.action-required .menu-grid { margin-bottom: 0; }
.menu-card-count { align-self: end; justify-self: start; padding: 3px 9px; border-radius: var(--r-pill); background: rgba(255,255,255,.72); font-size: .78rem; }
.menu-status { display: grid; gap: 10px; align-items: start; margin-bottom: 20px; }
.status-done { color: var(--info); font-weight: 700; margin-left: 6px; }
.status-todo, .status-warn { color: var(--danger); font-weight: 700; margin-left: 6px; }
.status-plain { margin-left: 6px; font-weight: 700; }
.menu-status .status-note { justify-self: start; margin: 0; color: var(--danger); font-weight: 700; }
.menu-status .status-synced { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 700; }
.menu-status .status-hint { justify-self: start; margin: 0; color: var(--muted); font-size: .78rem; }
/* 「本日の予約」「精算予約日」等、ラベル｜値の2列を縦に並べる表調のリンク一覧
   （§ガイアス様相談：3列テーブルはスマホ幅で窮屈になるため、2列×縦並びに
   まとめた表現で代替）。<table>ではなく<a>/<p>の縦並びにすることで、行全体を
   タップ領域にできる（テーブルのセルよりタップしやすい）。 */
.info-table { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); margin-bottom: 20px; }
.info-table-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); margin: 0; }
.info-table-row + .info-table-row { border-top: 1px solid var(--line); }
a.info-table-row:hover, a.info-table-row:focus-visible { background: var(--surface-2); }
.info-table-label { flex: 0 0 auto; font-weight: 700; }
.info-table-value { flex: 1 1 auto; text-align: right; font-weight: 700; }
.info-table-value .status-done, .info-table-value .status-todo, .info-table-value .status-warn, .info-table-value .status-plain { margin-left: 0; }
.card-note { color: var(--danger); font-size: .82rem; font-weight: 700; }
.card-ext { align-self: end; color: var(--muted); font-size: .76rem; font-weight: 700; }
.card-nav { align-self: end; color: var(--brand); font-size: .76rem; font-weight: 700; }
.operator-tool-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.operator-tool-card { min-height: 190px; border-top: 4px solid var(--brand); }
.operator-tool-card.note-pm-card { border-top-color: var(--accent); }
.operator-tool-card .tool-kicker { color: var(--brand); font-size: .78rem; font-weight: 900; letter-spacing: .08em; }
.operator-tool-card.note-pm-card .tool-kicker { color: var(--accent); }
.operator-tool-card.is-unconfigured { box-shadow: none; border-style: dashed; border-top-style: solid; background: var(--surface-2); }
.operator-tool-card.is-unconfigured h2, .operator-tool-card.is-unconfigured p { color: var(--muted); }
.portal-source-note { margin: 14px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.focused-tool-panel { display: grid; gap: 16px; justify-items: start; }
.focused-tool-panel > p { margin: 0; }
.focused-tool-action { min-width: min(100%, 280px); }
.privacy-caution { border: 2px solid var(--accent); background: var(--consult); }
.privacy-caution strong { color: var(--brand-dark); }
.privacy-caution p { margin: 6px 0 0; }
.handover-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.handover-create-form > div { display: grid; gap: 5px; min-width: 0; }
.handover-create-form > div:has(textarea), .handover-create-form > .button { grid-column: 1 / -1; }
.handover-create-form label, .handover-update-form label { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.handover-create-form .helptext { color: var(--muted); font-size: .72rem; }
.handover-list { display: grid; gap: 14px; }
.handover-item { padding: 18px; border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: var(--r-md); background: var(--surface); }
.handover-item.urgency-caution { border-left-color: var(--accent); }
.handover-item.urgency-urgent { border-left-color: var(--danger); background: var(--danger-tint); }
.handover-item.is-completed { opacity: .72; border-left-color: var(--ok-ink); background: var(--available); }
.handover-item-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.handover-item-heading > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.handover-item-heading h3 { width: 100%; margin: 4px 0 0; font-size: 1.05rem; }
.handover-item-heading p { margin: 0; color: var(--muted); font-size: .8rem; }
.handover-update-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.handover-update-form .wide { grid-column: 1 / -1; }
.handover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.handover-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; margin: 0 0 20px; }
.handover-summary-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; }
.handover-summary-card strong { color: var(--brand); font-size: 1.6rem; }
.handover-summary-card.is-current { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 14%, transparent); }
.handover-operational-form input, .handover-operational-form select, .handover-operational-form textarea { width: 100%; min-width: 0; }
.handover-operational-form input[type="checkbox"] { width: auto; }
.handover-import-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 16px; border: 1px dashed var(--brand); border-radius: var(--r-md); background: var(--brand-tint); }
.handover-import-panel p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.handover-item.flag-overdue, .handover-item.flag-today { border-left-color: var(--danger); }
.handover-item.flag-overdue { background: var(--danger-tint); }
.handover-item.flag-tomorrow { border-left-color: var(--accent); }
.handover-item.flag-day-after-tomorrow { border-left-color: var(--brand); }
.handover-flag { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 900; }
.handover-flag.flag-overdue, .handover-flag.flag-today { background: var(--danger); color: white; }
.handover-flag.flag-tomorrow { background: var(--consult); color: var(--ink); }
.handover-flag.flag-day-after-tomorrow { background: var(--brand-tint); color: var(--brand-dark); }
.badge.purelover { background: #f6e8ff; color: #6c2d91; }
.handover-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.handover-overview-grid > div { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.handover-overview-grid span, .handover-detail-text > span { color: var(--muted); font-size: .72rem; font-weight: 800; }
.handover-overview-grid strong { overflow-wrap: anywhere; font-size: .9rem; }
.handover-detail-text { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.handover-detail-text p { margin: 5px 0 0; line-height: 1.7; }
.handover-edit-panel { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.handover-edit-panel summary { cursor: pointer; color: var(--brand); font-weight: 800; }
.handover-edit-panel .handover-update-form { margin-top: 14px; }
.inventory-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.inventory-summary h2 { margin-bottom: 0; }
.inventory-summary.needs-attention { border: 2px solid var(--danger); background: var(--danger-tint); }
.inventory-category { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.inventory-category summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; cursor: pointer; font-weight: 800; font-size: 1.02rem; list-style: none;
}
.inventory-category summary::-webkit-details-marker { display: none; }
.inventory-category summary::before { content: "›"; margin-right: 10px; font-size: 1.2rem; color: var(--muted); transition: transform .15s; }
.inventory-category[open] summary::before { transform: rotate(90deg); }
.inventory-category-count { color: var(--muted); font-size: .8rem; font-weight: 700; }
.inventory-category .inventory-list { padding: 0 20px 20px; }
.inventory-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.inventory-item { padding: 16px 18px; border: 1px solid var(--line); border-left: 5px solid var(--ok-ink); border-radius: var(--r-md); background: var(--surface-2); }
.inventory-item.needs-reorder { border-left-color: var(--danger); background: var(--danger-tint); }
.inventory-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inventory-item-heading h3 { margin: 0; font-size: 1.02rem; }
.inventory-item-heading form { flex: 0 0 auto; }
.inventory-note { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
.template-filters { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 18px; }
.template-filters label { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.customer-template-list { display: grid; gap: 16px; }
.customer-template-item { padding: 18px; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--r-md); background: var(--surface); }
.customer-template-item[hidden] { display: none; }
.customer-template-item > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.customer-template-item > header h3 { margin: 8px 0 2px; font-size: 1.08rem; }
.customer-template-item > header p { margin: 0; color: var(--muted); }
.template-body-label { display: grid; gap: 5px; margin-top: 16px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.template-body { width: 100%; resize: vertical; background: white; color: var(--ink); font: inherit; line-height: 1.8; }
.template-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.copy-result { color: var(--ok-ink); font-size: .8rem; font-weight: 700; }
.template-guidance { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); }
.template-guidance p { margin: 5px 0 0; line-height: 1.7; }
.template-guidance.caution { background: var(--consult); }
.template-guidance.escalation { background: var(--danger-tint); color: var(--danger); }
.customer-template-item > footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; color: var(--muted); font-size: .76rem; }
.template-edit-panel, .template-add-panel { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.template-edit-panel summary, .template-add-panel summary { cursor: pointer; font-weight: 700; }
.customer-template-edit-form, .customer-template-add-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; margin-top: 14px; }
.customer-template-edit-form label, .customer-template-add-form > div { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: .78rem; font-weight: 700; }
.customer-template-edit-form input, .customer-template-edit-form textarea, .customer-template-add-form input, .customer-template-add-form textarea { min-width: 0; width: 100%; }
.customer-template-edit-form .wide, .customer-template-add-form > div:has(textarea), .customer-template-add-form .button { grid-column: 1 / -1; }
.routine-panel { scroll-margin-top: 90px; }
.routine-list { display: grid; gap: 10px; }
.routine-item { border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.routine-item.is-completed { border-left-color: var(--ok-ink); }
.routine-item.needs-attention { border-left-color: var(--danger); }
.routine-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; cursor: pointer; font-weight: 700; list-style: none;
}
.routine-item summary::-webkit-details-marker { display: none; }
.routine-item summary::before { content: "›"; margin-right: 8px; font-size: 1.1rem; color: var(--muted); transition: transform .15s; }
.routine-item[open] summary::before { transform: rotate(90deg); }
.routine-item-summary-main { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 10px; }
.routine-item-summary-main h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.routine-status-badge { flex: 0 0 auto; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.routine-status-badge.status-completed { background: var(--available); color: var(--ok-ink); }
.routine-status-badge.status-needs_attention { background: var(--danger-tint); color: var(--danger); }
.routine-item-body { padding: 0 16px 16px; }
.routine-form { display: grid; gap: 12px; }
.routine-status-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.routine-status-choices legend { margin-bottom: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.routine-status-choices label { position: relative; cursor: pointer; }
.routine-status-choices input { position: absolute; opacity: 0; pointer-events: none; }
.routine-status-choices span { display: flex; min-height: 44px; align-items: center; justify-content: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: white; font-weight: 700; text-align: center; }
.routine-status-choices input:checked + span { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); box-shadow: 0 0 0 2px rgba(123,53,72,.12); }
.routine-status-choices input:focus-visible + span { outline: 3px solid rgba(123,53,72,.34); outline-offset: 2px; }
.routine-note { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.routine-note textarea { width: 100%; resize: vertical; }
.routine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.empty-state { padding: 18px; border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--muted); background: var(--surface-2); }
/* PC・スマホどちらでも上部メニューを同じ見た目にするため、画面幅を
   問わず常に非表示にする（以前は狭い画面だけ隠していたため、PCとスマホで
   表示されるリンク数が食い違って見えていた）。 */
.site-header nav .therapist-nav-secondary { display: none; }
@media (max-width: 800px) {
  .menu-grid { grid-template-columns: 1fr; }
  .routine-actions .button { width: 100%; }
  .handover-create-form, .handover-update-form { grid-template-columns: 1fr; }
  .handover-create-form > div:has(textarea), .handover-create-form > .button, .handover-update-form .wide { grid-column: auto; }
  .handover-item-heading { display: grid; }
  .handover-summary-grid, .handover-overview-grid { grid-template-columns: 1fr; }
  .handover-import-panel { align-items: stretch; flex-direction: column; }
  .inventory-summary { display: grid; }
  .inventory-list { grid-template-columns: 1fr; }
  .inventory-category summary { padding: 14px 16px; }
  .inventory-category .inventory-list { padding: 0 16px 16px; }
  .template-filters, .customer-template-edit-form, .customer-template-add-form { grid-template-columns: 1fr; }
  .customer-template-edit-form .wide, .customer-template-add-form > div:has(textarea), .customer-template-add-form .button { grid-column: auto; }
  .customer-template-item > header { display: grid; }
}

/* --- 入退報告 --- */
.attendance-state { padding: 14px 16px; border-radius: var(--r-md); background: var(--unavailable); font-weight: 700; margin-bottom: 20px; }
.attendance-state.open { background: var(--available); }
.attendance-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; align-items: stretch; }
/* 「終了」側は チップ選択・備考が上に積まれるので、両フォームの中身を下寄せにして
   「開始」ボタンを「終了」ボタンと同じ高さに揃える。ボタンの大きさは変えない。 */
.attendance-buttons form { display: grid; gap: 12px; align-content: end; }
.attendance-buttons .attendance-action-active { order: -1; }
.attendance-big { min-height: 120px; border-radius: var(--r-lg); border: 2px solid var(--line); background: white; color: var(--ink); font-size: 1.6rem; font-weight: 900; cursor: pointer; }
.attendance-big.start { background: var(--brand); border-color: var(--brand); color: white; }
.attendance-big.end { background: var(--accent); border-color: var(--accent); color: white; }
.attendance-big:disabled { opacity: .4; cursor: not-allowed; }
.tip-choice { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; margin: 0; }
.tip-choice legend { padding: 0 6px; font-weight: 700; font-size: .8rem; color: var(--muted); }
.tip-choice label { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.tip-choice input { width: auto; min-height: 0; }
.tip-choice:disabled { opacity: .5; }
.tip-choice.needs-selection { border-color: var(--accent); background: var(--consult); }
.field-required-hint { margin: -6px 0 0; color: var(--danger); font-size: .82rem; font-weight: 700; }
.attendance-note { display: grid; gap: 5px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.attendance-note textarea { width: 100%; min-height: 52px; resize: vertical; padding: 8px 10px; border: 1px solid var(--field-border); border-radius: var(--r-sm); font: inherit; font-weight: 400; color: var(--ink); }
.attendance-note textarea:disabled { opacity: .5; }
.attendance-note-view { display: inline-block; margin-left: 8px; color: var(--muted); font-size: .85rem; }
.audit-table .attendance-note-view { display: block; margin-left: 0; }
.attendance-manual { margin-bottom: 26px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; background: var(--surface); }
.attendance-manual summary { font-weight: 700; cursor: pointer; }
.manual-entry-note { margin: 10px 0 0; font-size: .85rem; }
.manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 14px; min-width: 0; }
.manual-grid form { display: grid; gap: 10px; align-content: start; min-width: 0; }
.manual-grid h2 { font-size: 1rem; margin: 0; }
/* input[type=date/time]はブラウザ既定の最小幅を持つため、min-width:0が
   無いとグリッドの列がその幅ぶん押し広げられ、カードの外にはみ出す。 */
.manual-grid label { display: grid; gap: 5px; font-size: .78rem; color: var(--muted); font-weight: 700; min-width: 0; }
.manual-grid label input { min-width: 0; }
/* 日付・時刻を横並び2列にしていたが、input[type=date]・input[type=time]は
   ブラウザ（特にiOS Safari）が内部の最小幅をCSSのflex-basis/min-widthより
   優先して確保するため、flex-wrapの折り返し判定に反映されず「時刻」欄が
   枠外へはみ出す・「日付」欄と重なる不具合が実機で発生していた。正確な
   入力が主目的の欄のため、幅を詰めるより確実に重ならないことを優先し、
   常に縦積み（日付が上・時刻が下）にする。 */
.manual-datetime-row { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.manual-datetime-row label { min-width: 0; overflow: hidden; }
.manual-datetime-row input[type="date"], .manual-datetime-row input[type="time"] { width: 100%; min-width: 0; max-width: 100%; }
.attendance-log { list-style: none; padding: 0; display: grid; gap: 8px; margin: 12px 0 0; }
.attendance-log li { padding: 10px 14px; background: white; border: 1px solid var(--line); border-radius: var(--r-sm); }
.attendance-log li:has(.link-row) { padding: 0; }
.attendance-log .link-row { display: block; width: 100%; padding: 10px 14px; margin: 0; background: transparent; border: 0; border-radius: inherit; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.attendance-log .link-row:hover { color: var(--brand); }
.attendance-summary { margin: 0; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.attendance-summary strong { color: var(--brand-dark); font-size: 1.15rem; }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--consult); font-size: .75rem; font-weight: 700; }
.badge.manual { background: var(--unavailable); }
@media (max-width: 800px) {
  .attendance-buttons, .manual-grid { grid-template-columns: 1fr; }
  .attendance-buttons .attendance-action-inactive { display: none; }
}

/* --- アプリとして追加する案内 --- */
.install-qr { text-align: center; }
.install-qr img { display: block; margin: 0 auto 14px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: var(--r-md); }
.install-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; }

/* --- 通知のオン/オフ --- */
.push-bell {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-width: 48px; height: 48px; flex: none; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: white; cursor: pointer; font-size: .9rem; font-weight: 700; line-height: 1; padding: 0 16px;
  transition: background-color .15s, border-color .15s, transform .05s;
}
.push-bell [data-push-icon] { font-size: 1.3rem; }
.push-bell:not(:disabled):hover { background: var(--surface-2); }
.push-bell:not(:disabled):active { transform: translateY(1px); }
.push-bell[aria-pressed="true"] { background: var(--brand-tint); border-color: var(--brand-tint-border); }
.push-bell:disabled { opacity: .5; cursor: not-allowed; }

/* --- ご予約の検索結果（お客様向け） --- */
.lookup-results { display: grid; gap: 12px; }
.lookup-result { grid-template-columns: none; }
.lookup-result .badge { justify-self: start; }
.lookup-result small { color: var(--muted); }
.lookup-requirements { max-width: none; margin-bottom: 0; font-size: .88rem; line-height: 1.7; }
.lookup-progress { margin: -6px 0 0; color: var(--brand-dark); font-size: .85rem; font-weight: 700; }
.lookup-result-link { justify-self: end; color: var(--brand); font-size: .85rem; font-weight: 700; }

/* --- 予約履歴（お客様予約） --- */
.reservation-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reservation-list details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.reservation-list .reservation-cancelled details { opacity: .7; }
.reservation-list details:target { box-shadow: 0 0 0 3px var(--brand), var(--shadow); }
.reservation-list .reservation-today details { background: var(--brand-tint); border-color: var(--brand-tint-border); }
.badge.cancelled, .badge.rejected { background: var(--danger-tint); color: var(--danger); }
.badge.pending { background: var(--info-tint); color: var(--info-ink); }
.badge.withdrawn { background: var(--unavailable); color: var(--muted); }
.badge.today { background: var(--brand); color: #fff; }
.reservation-list summary {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 12px 16px; cursor: pointer; font-weight: 700; list-style: none;
}
.reservation-list summary::-webkit-details-marker { display: none; }
.reservation-list summary::after { content: "▾"; color: var(--muted); }
.reservation-list details[open] summary::after { content: "▴"; }
.reservation-id { color: var(--brand-dark); }
.reservation-datetime { color: var(--ink); }
.reservation-place { color: var(--muted); font-weight: 400; text-align: right; }
.reservation-detail { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.reservation-detail-label { font-size: .9rem; margin: 16px 0 8px; color: var(--muted); font-weight: 700; }
.reservation-detail dl { margin: 0; display: grid; gap: 6px; }
.reservation-detail dl > div { display: grid; grid-template-columns: 9em 1fr; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.reservation-detail dt { color: var(--muted); font-size: .82rem; font-weight: 700; }
.reservation-detail dd { margin: 0; }
.reservation-detail dd, .reservation-detail p, .info-table-value { min-width: 0; overflow-wrap: anywhere; }
/* 店舗へのお問い合わせ画面だけ、連絡先の行が詰まって見えるとの指摘を受けて
   行間を広げる（他画面のreservation-detailは既存のままで変更しない）。 */
.store-contact-detail dl { gap: 14px; }
.store-contact-detail dl > div { padding: 8px 0; }
@media (max-width: 640px) {
  .booking-method-actions { grid-template-columns: 1fr; gap: 8px; }
  .booking-method-card { padding: 10px 14px; gap: 10px; min-height: 56px; }
  .booking-method-label { font-size: .95rem; }
  .booking-method-desc { font-size: .78rem; }
  .schedule-support > .button { width: 100%; }
  .action-row > form { width: 100%; min-width: 0; }
  .action-row > form > .button, .action-row > form > button { width: 100%; }
  .info-table-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .info-table-value { width: 100%; text-align: left; }
  .reservation-list summary { grid-template-columns: 1fr; gap: 2px; }
  .reservation-place { text-align: left; }
  .reservation-detail dl > div { grid-template-columns: 1fr; gap: 2px; }
  .candidate-card-head { align-items: stretch; flex-direction: column; }
  .candidate-card-price { padding-left: 58px; text-align: left; }
  .urgent-action-card { grid-template-columns: 1fr; }
  .urgent-action-card > svg { margin-bottom: -4px; }
}
.reservation-history { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; background: var(--surface); }
.reservation-history > summary { font-weight: 700; cursor: pointer; }
.reservation-history .reservation-list { margin-top: 14px; }

/* 店長ポータルは運営が使う内部ツール（オペレーターポータル・管理サイト・
   経理ポータル）の一つなので、base.html側で.operator-shell系のマークアップ
   を共有し（テンプレート側参照）、下の「ポータルごとの配色差分」で店長
   ポータル専用の配色に上書きする。以下はそのシェル以外＝実際の業務画面
   （採用処理・退店処理等のフォーム）側のスタイルのみ。 */
.manager-search-form { margin-bottom: 20px; }
.manager-missing-list { margin: 0; padding-left: 18px; color: var(--danger); font-size: .85rem; }
.manager-doc-checklist { display: grid; gap: 8px; margin: 8px 0 18px; }
.manager-doc-checklist label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .92rem; }
.manager-doc-checklist input[type="checkbox"] { width: auto; }
.manager-readonly-block { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); margin-bottom: 16px; }
.manager-readonly-block dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: .88rem; }
.manager-readonly-block dt { color: var(--muted); }
.manager-readonly-block dd { margin: 0; }
.console-content { max-width: 900px; }
.console-form { max-width: 720px; padding: 28px; }
.console-form p { display: grid; gap: 5px; margin: 0 0 14px; }
.console-form label { font-size: .8rem; font-weight: 700; color: var(--muted); }
/* --- オペレーターポータル：PC業務向けの独立した管理画面レイアウト --- */
.operator-portal-body {
  background: #f3f6fa;
  color: #172033;
  /* HALポータル（管理サイト）のネイビー×ブルーに対して、オペレーター
     ポータルだけはバイオレット系にし、「今どの画面にいるか」をひと目で
     区別できるようにする。コンセプト（シェルの構造・余白・カード等）は
     全ポータル共通のまま、この4つのトークンだけを上書きすることで
     .operator-shell配下の色を一括で差し替える。 */
  --operator-navy: #1e1a3a;
  --operator-navy-soft: #2c2650;
  --operator-blue: #7864d4;
  --operator-blue-tint: #f1effc;
}
/* 店長ポータル：コーラル系。オペレーターポータルと同じ.operator-shell
   マークアップを共有しつつ、このトークン差し替えだけで配色を差別化する。 */
.manager-portal-body {
  background: #f3f6fa;
  color: #172033;
  --operator-navy: #33201a;
  --operator-navy-soft: #4a2e22;
  --operator-blue: #c2512b;
  --operator-blue-tint: #fbece4;
}
.operator-shell { min-height: 100vh; }
.operator-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: 280px; overflow-y: auto;
  padding: 28px 18px 24px; background: var(--operator-navy); color: #fff;
}
.operator-sidebar-brand {
  display: flex; align-items: center; gap: 13px; margin: 0 8px 32px; color: #fff;
  text-decoration: none; font-size: 1.08rem; font-weight: 900; line-height: 1.25;
}
.operator-sidebar-brand small { display: block; margin-top: 3px; color: #aebbd0; font-size: .68rem; font-weight: 500; letter-spacing: .04em; }
.operator-brand-mark {
  display: inline-grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, #6c8dff, #36c5b3); font-size: 1.3rem; font-weight: 900;
  box-shadow: 0 10px 26px rgba(18, 27, 48, .32);
}
.operator-brand-mark .operator-nav-icon svg { width: 23px; height: 23px; }
/* ポータルごとにマークの配色だけを変え、「今どのポータルにいるか」を
   サイドバー最上部でも一目で区別できるようにする。 */
.operator-portal-body .operator-brand-mark { background: linear-gradient(135deg, #9b8cf2, #5a4ac9); }
.manager-portal-body .operator-brand-mark { background: linear-gradient(135deg, #f0997b, #d85a30); }
/* 店長ポータルのホームカードは情報量（件数+一言）の割に大きすぎたため、
   余白・文字サイズを詰めて高さを抑える（UI統一指示書セクション11-1）。 */
.manager-portal-body .card-grid .card { padding: 16px 20px; gap: 4px; }
.manager-portal-body .card-grid .card h2 { font-size: .92rem; }
.manager-portal-body .card-grid .card p { font-size: .82rem; line-height: 1.5; }
.finance-portal-body .operator-brand-mark { background: linear-gradient(135deg, #5dcaa5, #0f6e56); }
.operator-sidebar-nav { display: grid; gap: 5px; }
.operator-nav-label { margin: 22px 12px 7px; color: #9aa9c0; font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.operator-sidebar-nav a {
  display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 10px 12px;
  border-radius: 11px; color: #bfc9d9; text-decoration: none; font-size: .88rem; font-weight: 600;
  transition: color .15s, background-color .15s;
}
.operator-sidebar-nav a > .operator-nav-icon { display: inline-grid; place-items: center; flex: 0 0 22px; width: 22px; color: #8999b4; }
.operator-nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.operator-sidebar-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.operator-sidebar-nav a.is-active { background: var(--operator-navy-soft); color: #fff; box-shadow: inset 3px 0 0 #6e8fff; }
.operator-sidebar-nav a.is-active > .operator-nav-icon { color: #8ba5ff; }
.operator-workspace { min-width: 0; min-height: 100vh; margin-left: 280px; }
.operator-topbar {
  position: sticky; top: 0; z-index: 35; display: flex; align-items: center; justify-content: flex-end;
  gap: 24px; min-height: 82px; padding: 14px 38px; border-bottom: 1px solid #e3e8f0;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
}
.operator-account { display: flex; align-items: center; gap: 11px; }
.operator-account-role { color: #68758a; font-size: .76rem; font-weight: 700; }
.operator-logout { min-height: 36px; padding: 6px 10px; border: 0; background: transparent; color: #66748a; cursor: pointer; font-size: .78rem; font-weight: 700; }
.operator-logout:hover { color: var(--operator-blue); }
.operator-main { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 42px 0 72px; }
.operator-portal-body .page-heading { align-items: center; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid #e2e7ef; }
.operator-portal-body .page-heading h1 { margin-top: 5px; font-family: var(--font-sans); font-size: clamp(1.8rem, 2.5vw, 2.35rem); font-weight: 900; letter-spacing: -.025em; }
.operator-portal-body .page-heading .eyebrow { color: var(--operator-blue); }
.operator-portal-body .page-heading p:last-child { max-width: 760px; color: #6b778a; }
.operator-dashboard-heading { display: flex; justify-content: space-between; gap: 24px; }
.operator-portal-body .section-block,
.operator-portal-body .template-add-panel {
  margin-top: 24px; padding: 24px; border: 1px solid #e0e6ef; border-radius: 16px; background: #fff;
  box-shadow: 0 5px 18px rgba(31, 47, 74, .045);
}
.operator-portal-body .section-heading { align-items: center; }
.operator-portal-body .section-heading h2 { font-size: 1.12rem; }
.operator-portal-body .card { border-color: #e0e6ef; border-radius: 14px; box-shadow: none; }
.operator-portal-body .operator-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* サイドバーメニューと内容が重複するナビゲーションカードではなく、
   件数等の状態を示すカードとして扱うため、やや小さくする
   （UI統一指示書セクション12-1）。 */
.operator-portal-body .operator-tool-card { min-height: 130px; border-top: 1px solid #e0e6ef; padding: 16px 18px; }
.operator-portal-body .operator-tool-card:hover { border-color: #9db2f5; background: var(--operator-blue-tint); }
.operator-portal-body .operator-tool-card .tool-kicker,
.operator-portal-body .operator-tool-card.note-pm-card .tool-kicker,
.operator-portal-body .card-nav { color: var(--operator-blue); }
.operator-portal-body .operator-tool-card.needs-attention { border-color: #e7aaaa; background: #fff9f9; }
.operator-tool-metric { display: flex; align-items: baseline; gap: 7px; margin: 8px 0 2px; }
.operator-tool-metric strong { color: #18243a; font-size: 2rem; line-height: 1; }
.operator-tool-metric span { color: #6c788b; font-size: .8rem; font-weight: 700; }
.operator-tool-status { margin: 5px 0 0; color: #6c788b; font-size: .76rem; font-weight: 700; }
.operator-tool-status.is-danger { color: var(--danger); }
.operator-tool-empty { display: inline-flex; width: fit-content; margin: 12px 0 4px; padding: 5px 9px; border-radius: 999px; background: #eef1f5; color: #6c788b; font-size: .74rem; font-weight: 800; }
.operator-tool-description { margin: 14px 0 5px; color: #68758a; font-size: .84rem; }
.operator-today-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 24px; padding: 18px 22px; border: 1px solid #cbd9cc; border-radius: 16px; background: #f7fcf8; }
.operator-today-bar.has-attention { border-color: #edd7a7; background: #fffaf0; }
.operator-today-message { display: flex; align-items: center; gap: 13px; min-width: 260px; }
.operator-today-message > div { display: grid; gap: 3px; }
.operator-today-message strong { font-size: .9rem; }
.operator-today-message small { color: #748094; font-size: .7rem; }
.operator-today-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; background: #dff2e5; color: #23734a; font-weight: 900; }
.has-attention .operator-today-icon { background: #fff0c9; color: #9a620e; }
.operator-today-metrics { display: grid; grid-template-columns: repeat(4, minmax(74px, 1fr)); gap: 8px; margin: 0; }
.operator-today-metrics > div { min-width: 78px; padding: 8px 12px; border-left: 1px solid #dfe5ed; text-align: center; }
.operator-today-metrics dt { color: #738095; font-size: .68rem; font-weight: 800; }
.operator-today-metrics dd { margin: 2px 0 0; color: #1e2a40; font-size: 1.15rem; font-weight: 900; }
.operator-today-metrics .is-danger dd { color: var(--danger); }
.operator-today-metrics .is-warning dd { color: #9a620e; }
.operator-live-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; }
.operator-live-card { min-width: 0; padding: 18px; border: 1px solid #e1e7ef; border-radius: 13px; background: #fbfcfe; }
.operator-live-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.operator-live-card h3 { margin: 0; font-size: .92rem; }
.operator-live-card > header > strong { color: var(--operator-blue); font-size: .86rem; }
.operator-live-card ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.operator-live-card li { padding: 9px 10px; border-radius: 9px; background: #fff; }
.operator-live-card li > strong, .operator-live-card li > span { display: block; }
.operator-live-card li span, .operator-live-card li small { color: #6c788b; font-size: .72rem; }
.operator-pending-list .link-row { display: grid; gap: 2px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.operator-pending-list .link-row:hover strong { color: var(--operator-blue); }
.heading-count { display: inline-block; margin-left: 7px; color: var(--operator-blue); font-size: .76rem; font-weight: 800; vertical-align: middle; }
.operator-portal-body .button.primary { background: var(--operator-blue); border-color: var(--operator-blue); }
.operator-portal-body .button.ghost { border-color: #d7deea; background: #fff; color: #273550; }
.operator-portal-body .ops-table,
.operator-portal-body .table-wrap { border-color: #e0e6ef; border-radius: 14px; background: #fff; }
.operator-portal-body .ops-table th { background: #f6f8fb; color: #66738a; }
.operator-portal-body .messages.operator-messages { width: min(1240px, calc(100% - 64px)); margin-top: 18px; }
.operator-portal-body .privacy-caution { border-color: #c7d5ff; background: #f4f7ff; }
.operator-portal-body .privacy-caution strong { color: #243f86; }
.operator-content-back { display: none; }

/* 個人情報の取り扱い注意（UI統一指示書セクション12-2）：以前は.section-block
   （パディング24px＋枠線＋影）を使った独立したカードだったが、一覧までの
   前置きが長くなる原因だったため、1行の注意書きに圧縮する。 */
.privacy-caution-compact {
  display: flex; align-items: baseline; gap: 6px; margin: 0 0 20px; padding: 10px 14px;
  border-radius: 10px; background: var(--consult); color: var(--brand-dark); font-size: .84rem; line-height: 1.6;
}
.privacy-caution-compact strong { flex: 0 0 auto; }
.operator-portal-body .privacy-caution-compact { background: #f4f7ff; color: #243f86; }
.handover-list-count { margin: 0 0 14px; font-size: .84rem; }
.operator-modal {
  width: min(1020px, calc(100vw - 48px)); max-height: calc(100vh - 48px); padding: 0;
  border: 0; border-radius: 18px; background: #fff; color: var(--ink);
  box-shadow: 0 28px 90px rgba(10,23,45,.28); overflow: auto;
}
.operator-modal::backdrop { background: rgba(13,24,44,.58); backdrop-filter: blur(3px); }
.operator-modal-header {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 26px; border-bottom: 1px solid #e1e7f0; background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
}
.operator-modal-header h2 { margin: 3px 0 2px; font-size: 1.35rem; }
.operator-modal-header p:last-child { margin: 0; color: var(--muted); font-size: .82rem; }
.operator-modal-close {
  display: grid; place-items: center; flex: 0 0 42px; height: 42px; border: 1px solid #d9e0eb;
  border-radius: 50%; background: #fff; color: #536177; cursor: pointer; font-size: 1.55rem; line-height: 1;
}
.operator-modal-close:hover, .operator-modal-close:focus-visible { border-color: var(--operator-blue); color: var(--operator-blue); }
.handover-create-dialog .handover-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; padding: 18px 22px 24px; }
.handover-create-dialog .handover-boolean-group, .handover-create-dialog .operator-modal-actions { grid-column: 1 / -1; }
.handover-update-form { display: grid; grid-template-columns: 1fr; gap: 16px; }
.handover-form-group, .handover-boolean-group { min-width: 0; margin: 0; padding: 18px; border: 1px solid #e0e6ef; border-radius: 13px; background: #fbfcfe; }
.handover-form-group legend, .handover-boolean-group legend { padding: 0 8px; color: #273550; font-size: .86rem; font-weight: 900; }
.handover-form-group legend > span { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 7px; border-radius: 50%; background: var(--operator-blue); color: #fff; font-size: .72rem; }
.handover-form-group legend small { margin-left: 6px; color: var(--muted); font-size: .7rem; font-weight: 500; }
.handover-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.handover-form-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.handover-form-grid .wide { grid-column: 1 / -1; }
/* 店長ポータル：採用フォーム等をセクション分け・2列にする（UI統一指示書
   セクション11）。見た目は上の.handover-form-group系と揃えるが、クラス名は
   分ける（オペレーターポータルの引き継ぎ機能と無関係なフォームのため）。 */
.store-form { display: flex; flex-direction: column; gap: 18px; max-width: 880px; }
.store-form-group { min-width: 0; margin: 0; padding: 20px 22px; border: 1px solid #e0e6ef; border-radius: 13px; background: #fbfcfe; }
.store-form-group legend { padding: 0 8px; color: #273550; font-size: .9rem; font-weight: 900; }
.store-form-group legend small { margin-left: 8px; color: var(--muted); font-size: .76rem; font-weight: 500; }
.store-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.store-form-grid .wide { grid-column: 1 / -1; }
.field-wrap { display: grid; align-content: start; gap: 6px; min-width: 0; }
.field-wrap > label { color: #536177; font-size: .76rem; font-weight: 800; }
.field-wrap > label small { color: #8a95a6; font-weight: 500; }
.field-wrap .helptext { color: #788599; font-size: .7rem; line-height: 1.5; }
.field-wrap .errorlist, .form-errors .errorlist, .handover-boolean-group > .errorlist { margin: 0; padding: 0; list-style: none; color: var(--danger); font-size: .75rem; font-weight: 700; }
.handover-flag-preview { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px dashed #cbd5e3; border-radius: 10px; background: #fff; }
.handover-flag-preview span { color: var(--muted); font-size: .75rem; font-weight: 700; }
.handover-flag-preview strong { color: #536177; font-size: .9rem; }
.handover-flag-preview.is-overdue, .handover-flag-preview.is-today { border-color: #e8a3a3; background: var(--danger-tint); }
.handover-flag-preview.is-overdue strong, .handover-flag-preview.is-today strong { color: var(--danger); }
.handover-flag-preview.is-upcoming { border-color: #d8b66a; background: var(--consult); }
.handover-flag-preview.is-completed { border-color: #9dcdb3; background: var(--available); }
.handover-boolean-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.handover-toggle-card {
  position: relative; display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 11px; min-height: 78px;
  padding: 14px; border: 2px solid #dce3ed; border-radius: 12px; background: #fff; cursor: pointer;
}
.handover-toggle-card > input { position: absolute; opacity: 0; pointer-events: none; }
.handover-toggle-card .toggle-indicator { display: block; width: 22px; height: 22px; border: 2px solid #aab5c5; border-radius: 6px; background: #fff; }
.handover-toggle-card .toggle-indicator::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #fff; font-size: .78rem; font-weight: 900; opacity: 0; }
.handover-toggle-card > span:last-child { display: grid; gap: 4px; }
.handover-toggle-card strong { color: #273550; font-size: .88rem; }
.handover-toggle-card small { color: #728095; font-size: .72rem; line-height: 1.45; }
.handover-toggle-card:has(input:checked) { border-color: var(--operator-blue); background: var(--operator-blue-tint); box-shadow: 0 0 0 3px rgba(53,99,233,.09); }
.handover-toggle-card:has(input:checked) .toggle-indicator { border-color: var(--operator-blue); background: var(--operator-blue); box-shadow: inset 0 0 0 4px #fff; }
.handover-toggle-card:has(input:checked) .toggle-indicator::after { opacity: 1; }
.handover-toggle-card.completed-choice:has(input:checked) { border-color: #2d8b57; background: var(--available); box-shadow: 0 0 0 3px rgba(45,139,87,.09); }
.handover-toggle-card.completed-choice:has(input:checked) .toggle-indicator { border-color: #2d8b57; background: #2d8b57; }
.handover-toggle-card input:focus-visible + .toggle-indicator { outline: 3px solid rgba(53,99,233,.3); outline-offset: 3px; }
.operator-modal-actions { position: sticky; bottom: -24px; display: flex; justify-content: flex-end; gap: 10px; margin: 0 -22px -24px; padding: 14px 22px; border-top: 1px solid #e1e7f0; background: rgba(255,255,255,.97); }
.handover-filter-form { display: grid; gap: 12px; margin: 18px 0 22px; padding: 16px; border: 1px solid #e2e7ef; border-radius: 13px; background: #f8fafc; }
.handover-filter-form label { display: grid; gap: 5px; min-width: 0; color: #66738a; font-size: .72rem; font-weight: 800; }
.handover-filter-form input, .handover-filter-form select { width: 100%; min-width: 0; }
.handover-filter-search-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 10px; align-items: end; }
.handover-filter-selects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.handover-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: #6b778a; font-size: .72rem; }
.handover-active-filters strong { padding: 4px 8px; border-radius: 999px; background: #e9efff; color: #3158c7; }
.handover-active-filters a { margin-left: auto; color: #52617a; font-weight: 700; }
.handover-quick-complete { display: flex; justify-content: flex-end; margin-top: 12px; }
.operator-portal-body .button.success { border-color: #2d8b57; background: #2d8b57; color: #fff; }
.operator-portal-body .button.secondary { border-color: #bfd0ff; background: #eef3ff; color: #2f58cb; }
.operator-portal-body :is(a,button,input,select,textarea,summary):focus-visible,
.manager-portal-body :is(a,button,input,select,textarea,summary):focus-visible,
.finance-portal-body :is(a,button,input,select,textarea,summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--operator-blue) 35%, transparent);
  outline-offset: 2px;
}

/* Finance PR1: read-only accounting dashboard and record views. */
.finance-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.finance-metric { display: grid; gap: 8px; min-height: 140px; padding: 20px; border: 1px solid #e0e6ef; border-radius: 14px; background: #fff; }
.finance-metric span { color: #6b778a; font-size: .8rem; font-weight: 800; }
.finance-metric strong { color: #18243a; font-size: clamp(1.5rem, 3vw, 2rem); }
.finance-metric small { color: #7b8798; }
.finance-metric.needs-attention { border-color: #e7aaaa; background: #fff9f9; }
.finance-metric-link { color: inherit; text-decoration: none; }
.finance-metric-link:hover { border-color: var(--operator-blue); box-shadow: 0 8px 20px rgba(23,59,52,.08); }
.finance-external-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.finance-external-filters label { display: grid; gap: 5px; min-width: 0; color: #66738a; font-size: .72rem; font-weight: 800; }
.finance-external-filters input, .finance-external-filters select { width: 100%; min-width: 0; }
.finance-search-field { grid-column: span 2; }
.finance-filter-actions { display: flex; align-items: end; gap: 8px; }
.finance-list-summary { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.finance-list-summary > div { min-width: 180px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.finance-list-summary span { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; }
.finance-list-summary strong { display: block; margin-top: 3px; font-size: 1.1rem; }
.finance-list-summary small { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.finance-readiness-cell { min-width: 240px; }
.finance-readiness-cell small { display: block; max-width: 34em; margin-top: 4px; color: var(--muted); }
.finance-external-table .is-invalid-record { color: #6d7480; background: #faf4f4; }
.finance-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.finance-readiness-panel { grid-column: 1 / -1; }
.finance-conversion-panel { border-color: #b8d8c0; background: #fbfffc; }
.finance-confirm-form { display: grid; gap: 12px; align-items: start; margin-top: 16px; }
.finance-confirm-form label { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; }
.finance-confirm-form .button { justify-self: start; }
.finance-definition-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.finance-definition-list > div { min-width: 0; padding: 12px; border-radius: 8px; background: var(--surface-2); }
.finance-definition-list dt { color: var(--muted); font-size: .74rem; font-weight: 800; }
.finance-definition-list dd { margin: 4px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.finance-definition-list.amounts dd { font-size: 1.05rem; text-align: right; }
.finance-definition-list .total { background: #eef3ff; color: #244ab1; }
.finance-record-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.finance-record-row:last-child { border-bottom: 0; }
.finance-record-row div { display: grid; gap: 2px; }
.finance-record-row small { color: var(--muted); }
.finance-candidate-name { display: block; }
.finance-candidate-name + .finance-candidate-name { margin-top: 4px; }
.finance-mapping-cell { min-width: 220px; }
.finance-mapping-cell > strong, .finance-mapping-cell > small { display: block; }
.finance-mapping-cell > small { margin-top: 3px; color: var(--muted); }
.finance-mapping-form, .finance-mapping-cell details form { display: grid; gap: 7px; min-width: 190px; }
.finance-mapping-form select, .finance-mapping-cell details input { width: 100%; min-width: 0; }
.finance-mapping-cell details { margin-top: 7px; }
.finance-mapping-cell details summary { cursor: pointer; color: var(--muted); font-size: .74rem; font-weight: 800; }
.finance-mapping-cell details[open] summary { margin-bottom: 7px; }
.finance-sales-table .number, .ops-table .number { text-align: right; white-space: nowrap; }
.status-finalized, .status-completed { background: var(--available); color: var(--ok-ink); }
.status-draft, .status-needs_review { background: var(--consult); color: var(--warn-ink); }
.status-voided, .status-failed { background: var(--danger-tint); color: var(--danger); }
.finance-portal-body {
  background: #f4f7f6;
  /* オペレーターポータル・店長ポータルと同じ考え方で、この4つのトークン
     だけを経理ポータル用（ティール系）に差し替える。 */
  --operator-navy: #173b34;
  --operator-navy-soft: #2a594f;
  --operator-blue: #1d7462;
  --operator-blue-tint: #d9efe8;
}
.finance-portal-body .button.primary { border-color: #246b5c; background: #246b5c; }
.manager-portal-body .button.primary { background: var(--operator-blue); border-color: var(--operator-blue); }

@media (max-width: 760px) {
  .finance-metric-grid, .finance-detail-grid, .finance-definition-list { grid-template-columns: 1fr; }
  .finance-metric { min-height: 0; }
  .finance-external-filters { grid-template-columns: 1fr; }
  .finance-search-field { grid-column: auto; }
}
.schedule-table tr.is-current-time > th { background: #dbe6ff; color: #234dbd; }
.schedule-table tr.is-current-time > td { box-shadow: inset 0 2px #6f91ed, inset 0 -2px #6f91ed; }
.handover-compact-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.handover-compact-summary > div { display: grid; gap: 3px; min-width: 0; padding: 9px 11px; border-radius: 8px; background: var(--surface-2); }
.handover-compact-summary span { color: var(--muted); font-size: .68rem; font-weight: 800; }
.handover-compact-summary strong { overflow-wrap: anywhere; font-size: .84rem; }
.handover-compact-summary > p { grid-column: 1 / -1; margin: 0; color: #536177; font-size: .84rem; line-height: 1.6; }
.handover-detail-panel { margin-top: 12px; border-top: 1px solid #e5e9f0; padding-top: 10px; }
.handover-detail-panel > summary { cursor: pointer; color: #50617a; font-size: .78rem; font-weight: 800; }
.handover-detail-panel[open] > summary { margin-bottom: 12px; color: var(--operator-blue); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 22px; }
.pagination a, .pagination span { min-width: 90px; padding: 8px 12px; border: 1px solid #dce3ed; border-radius: 9px; color: #33425b; text-align: center; text-decoration: none; }
.pagination span { color: #9aa4b4; background: #f6f8fb; }
.pagination strong { color: #526079; font-size: .82rem; }

@media (max-width: 1100px) {
  .operator-sidebar { width: 238px; padding-inline: 13px; }
  .operator-workspace { margin-left: 238px; }
  .operator-main { width: min(100% - 40px, 1240px); }
  .operator-topbar { padding-inline: 24px; }
}
@media (max-width: 800px) {
  .operator-sidebar { position: static; width: auto; height: auto; max-height: none; padding: 16px; }
  .operator-sidebar-brand { margin: 0 0 13px; }
  .operator-brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 11px; }
  .operator-sidebar-nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .operator-sidebar-nav::-webkit-scrollbar, .operator-nav-label { display: none; }
  .operator-sidebar-nav a { flex: 0 0 auto; min-height: 40px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
  .operator-sidebar-nav a > .operator-nav-icon { display: none; }
  .operator-sidebar-nav a.is-active { box-shadow: inset 0 -3px 0 #6e8fff; }
  .operator-workspace { margin-left: 0; }
  .operator-topbar { min-height: 56px; padding: 8px 16px; }
  .operator-account-role { display: none; }
  .operator-main { width: min(100% - 24px, 1240px); padding: 24px 0 48px; }
  .operator-portal-body .operator-tool-grid { grid-template-columns: 1fr; }
  .operator-portal-body .section-block { padding: 18px; }
  .operator-content-back { display: block; }
  .operator-portal-body .messages.operator-messages { width: calc(100% - 24px); }
  .operator-modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .operator-modal-header, .handover-create-dialog .handover-create-form { padding-inline: 18px; }
  .handover-create-dialog .handover-create-form { grid-template-columns: 1fr; }
  .handover-create-dialog .handover-boolean-group, .handover-create-dialog .operator-modal-actions { grid-column: auto; }
  .operator-modal-actions { margin-inline: -18px; padding-inline: 18px; }
  .handover-form-grid, .handover-form-grid.three-columns, .handover-boolean-grid, .handover-compact-summary { grid-template-columns: 1fr; }
  .store-form-grid { grid-template-columns: 1fr; }
  .store-form-grid .wide { grid-column: auto; }
  .handover-form-grid .wide, .handover-compact-summary > p { grid-column: auto; }
  .operator-dashboard-heading, .operator-today-bar { align-items: stretch; flex-direction: column; }
  .operator-today-metrics { grid-template-columns: repeat(2, 1fr); }
  .operator-live-grid, .handover-filter-search-row, .handover-filter-selects { grid-template-columns: 1fr; }
}
@media (min-width: 1500px) {
  .operator-portal-body .operator-tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
