:root {
  /* 色は3つだけ（デザイン会議 2026-11-07）。白＝背景／墨＝文字と線（灰は墨の濃さ違い）／藍＝押せる・選べる・今 */
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #1f1f1f;
  --muted: #6b6b6b;         /* 墨の濃さ違い */
  --line: #dedede;          /* 墨の濃さ違い */
  --wash: #f4f4f4;          /* 墨の濃さ違い（休み・時間外の面） */
  --accent: #1f4aa8;        /* 藍 */
  --accent-ink: #ffffff;
  --accent-soft: #eef2fa;   /* 藍の濃さ違い */
  --danger: var(--ink);
  --radius: 8px;
  /* ホットペッパーと同じ並び（2026-11-07 実物で確認）：英数字は Helvetica → Arial、
     日本語はスマホの標準（iPhone はヒラギノ角ゴ・Android は Noto Sans）、パソコンはヒラギノ角ゴ → メイリオ */
  --font: Helvetica, Arial, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "Hiragino Sans", メイリオ, Meiryo, sans-serif;
  --display: var(--font);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
  text-align: left;
  line-break: strict;
  overflow-wrap: anywhere;
}

h1, h2, h3 { word-break: auto-phrase; text-wrap: balance; line-height: 1.4; margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }
.field input[type="checkbox"] { width: 18px; padding: 0; flex: none; }
.field label.switch { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 64px; }

/* ---------- 上の名前 ---------- */
.top { padding: 20px 0 16px; border-bottom: 1px solid var(--line); }
.top { position: relative; }
/* 言葉の切り替え（右上）。選んでいる方に下線 */
.langsw { position: absolute; top: 10px; right: -8px; display: flex; gap: 2px; }
.langsw button { min-height: 44px; padding: 0 8px; border: 0; background: transparent; font-size: 13px; color: var(--muted); cursor: pointer; }
.langsw button[aria-pressed="true"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
/* 英語の名前の下に添える、日本語のメニュー名 */
.mname-ja { display: block; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.top .salon { font-size: 13px; color: var(--muted); }
.top .name { font-weight: 700; font-size: 22px; line-height: 1.3; margin: 2px 0 4px; }
.top .addr { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- STEP の帯 ---------- */
.stepbar { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 24px 0 28px; padding: 0; }
.stepbar li {
  position: relative; padding: 8px 4px 8px 14px; font-size: 11px; line-height: 1.35; color: var(--muted); white-space: nowrap; letter-spacing: 0;
  background: var(--paper); border-block: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
}
.stepbar li:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 8px; border-left: 1px solid var(--line); border-radius: 6px 0 0 6px; }
.stepbar li small { display: block; font-size: 10px; letter-spacing: 0.08em; }
.stepbar li.done { color: var(--ink); background: var(--wash); }
.stepbar li.now { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }

.title { font-size: 20px; margin-bottom: 16px; }
.lead { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }
.count { font-size: 13px; color: var(--muted); margin: -6px 0 12px; }
.count b { color: var(--ink); font-size: 18px; }

/* ---------- メニュー ---------- */
.menus { display: grid; gap: 12px; }
.menu { padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.menu-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.menu .mname { font-size: 16px; }
.menu .price { font-weight: 700; font-size: 18px; white-space: nowrap; }
/* 写真つき：左に四角い写真、右に名前・料金・時間 */
.menu-body.has-img { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; }
.menu .mimg { display: block; width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius); background: var(--wash); }
.menu-body.has-img .menu-head { display: block; }
.menu-body.has-img .price { display: block; margin-top: 2px; }
.menu-body.has-img .mins { margin-bottom: 0; }
.menu-body.has-img + .pick { margin-top: 12px; }
.menu .mdesc { margin: 8px 0 0; font-size: 14px; }
.menu .mins { margin: 6px 0 12px; font-size: 13px; color: var(--muted); }
.menu .pick { padding: 11px 12px; font-size: 14px; }

.note { margin-top: 24px; padding: 14px 16px; font-size: 13px; color: var(--muted); border-left: 3px solid var(--line); white-space: pre-line; }

/* ---------- 選んだもの ---------- */
.picked { padding: 12px 16px; margin-bottom: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.picked .pk-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.picked .pk-row { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px; padding: 2px 0; }
.picked .pk-k { color: var(--muted); }

/* ---------- 日付×時間の表 ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.legend i { font-style: normal; font-weight: 700; margin-right: 3px; }
.legend i.ok { color: var(--accent); }
.weeknav { display: flex; justify-content: space-between; margin-bottom: 8px; }
.weeknav .btn:disabled { opacity: 0.35; cursor: default; }
.gridwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.slotgrid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; text-align: center; }
.slotgrid th, .slotgrid td { border: 1px solid var(--line); padding: 0; height: 44px; }
.slotgrid tr > :first-child { border-left: 0; }
.slotgrid tr > :last-child { border-right: 0; }
.slotgrid thead tr:first-child > * { border-top: 0; }
.slotgrid tbody tr:last-child > * { border-bottom: 0; }
.slotgrid .corner, .slotgrid .tm { width: 52px; }
.slotgrid .month { font-weight: 700; height: 30px; }
.slotgrid .dh { line-height: 1.2; font-weight: 400; }
.slotgrid .dh .dd { display: block; font-weight: 700; font-size: 15px; }
.slotgrid .dh .dw { display: block; font-size: 11px; }
.slotgrid .w6, .slotgrid .w0 { background: var(--wash); }
.slotgrid .tm { position: sticky; left: 0; z-index: 1; background: var(--paper); font-weight: 400; font-size: 12px; color: var(--muted); }
.slotgrid tr.hour .tm { color: var(--ink); font-weight: 700; font-size: 13px; }
.slotgrid tr.hour > * { border-top-color: #bdbdbd; }
.slotgrid td.full { color: var(--muted); }
.slotgrid td.closed { color: #9a9a9a; background: var(--wash); }
.slotgrid td.ok { padding: 0; }
.slotgrid td.ok button {
  display: block; width: 100%; height: 100%; min-height: 44px; padding: 0; border: 0; cursor: pointer;
  background: transparent; color: var(--accent); font-size: 17px; font-weight: 700;
}
.slotgrid td.ok button:hover { background: var(--accent-soft); }
.empty { color: var(--muted); font-size: 14px; padding: 16px 0; }

/* ---------- 入力 ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field .opt, .field .req { font-weight: 400; font-size: 11px; margin-left: 8px; padding: 1px 6px; border-radius: 4px; vertical-align: 1px; }
.field .opt { color: var(--muted); border: 1px solid var(--line); }
.field .req { color: #ffffff; background: var(--ink); }
.field input {
  width: 100%; padding: 12px 14px; font-size: 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 確認 ---------- */
.confirm { margin: 0 0 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.confirm div { display: grid; grid-template-columns: 6em 1fr; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.confirm div:first-child { border-top: 0; }
.confirm dt { color: var(--muted); font-size: 14px; }
.confirm dd { margin: 0; font-weight: 700; }

/* ---------- ボタン ---------- */
.actions { display: grid; gap: 10px; margin-top: 28px; }
.btn { display: block; width: 100%; padding: 14px 16px; text-align: center; cursor: pointer; border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.btn.main { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn.main:disabled { opacity: 0.55; cursor: default; }
.btn.sub { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { display: inline-block; width: auto; padding: 6px 12px; font-size: 13px; font-weight: 400; }
.btn.danger { color: var(--danger); border-color: currentColor; }

.error { color: var(--ink); font-weight: 700; font-size: 14px; margin: 12px 0 0; min-height: 1.75em; }
.error:not(:empty)::before { content: "！ "; }

/* ---------- 予約確認ページ ---------- */
.banner { padding: 16px; margin-bottom: 20px; background: var(--wash); border-radius: var(--radius); font-size: 14px; }
.banner p { margin: 0; }
.banner .b-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.banner.off { background: var(--wash); }
.banner.off .b-title { color: var(--ink); }
.confirm .plain { font-weight: 400; font-size: 14px; }

/* ---------- 完了 ---------- */
.done-box { padding: 28px 20px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.done-box .code { font-family: ui-monospace, Menlo, monospace; font-size: 24px; letter-spacing: 0.12em; margin: 4px 0 0; }
.done-box p { margin: 0; }
.small-note { font-size: 13px; color: var(--muted); margin-top: 16px; }

.foot { margin-top: 48px; font-size: 12px; color: var(--muted); text-align: center; }
.foot a, .small-note a { color: inherit; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 14px; margin: 4px 0 8px; font-size: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.consent input { margin-top: 4px; }
.consent small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 画面が切り替わったときに見出しへ移す読み上げ用のフォーカスは、枠を出さない */
[tabindex="-1"]:focus { outline: none; }

}

/* ---------- 規約などの文書 ---------- */
.doc { font-size: 15px; }
.doc h1 { font-size: 24px; margin: 40px 0 8px; }
.doc .meta { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.doc h2 { font-size: 17px; margin: 32px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.doc p, .doc li { margin: 0 0 8px; }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); }
.doc th, .doc td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { width: 9em; font-weight: 700; color: var(--muted); font-size: 14px; }
.doc .todo { background: var(--accent-soft); padding: 0 4px; }
@media (max-width: 480px) { .doc th, .doc td { display: block; width: auto; } .doc td { border-top: 0; padding-top: 0; } }

/* ---------- 予約の決め手（デザイン会議 2026-11-07） ---------- */
.badge { display: inline-block; margin: 0 0 6px; padding: 2px 8px; font-size: 12px; font-weight: 700; color: var(--ink); background: var(--wash); border-radius: 4px; }
.soonest { padding: 14px 16px; margin-bottom: 24px; background: var(--accent-soft); border-radius: var(--radius); }
.soonest .sn-k { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.subhead { font-size: 15px; margin: 0 0 8px; }
/* スタッフの指名（2人以上いるお店だけ出る） */
.stfs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.stf { min-height: 44px; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.stf.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.stf:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bigwhen { margin: 0 0 16px; font-size: 18px; line-height: 1.5; }
.bigwhen b { font-size: 32px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }

/* ---------- 動きの決まり（スキル ui-micro-motion） ----------
   動かすのは transform と opacity だけ／140〜220ms／押した瞬間は 97% に沈んで戻る／
   何度も押すものほど小さく／0 から大きくしない／出てくる向きは起点に合わせる／動きを減らす設定では止める */
:root { --t-fast: 140ms; --t-base: 200ms; --ease-out: cubic-bezier(0.2, 0, 0, 1); }

/* iPhone の Safari は、指で押している間の見た目（:active）を、body に ontouchstart="" がないと出さない。
   あわせて、押したときの灰色の四角（タップのハイライト）を消し、ダブルタップの拡大待ちをなくす */
button, a, .btn, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .fab, .daynav .btn { transition: transform var(--t-fast) var(--ease-out); }
  .btn:active, .fab:active { transform: scale(0.97); }

  /* 1回の予約で何度も押すもの（日時のマス・台帳の帯・一覧の行・下のメニュー）は、さらに控えめに */
  .slotgrid td.ok button, .lbk, .rowbtn, .bottomnav button, .cal-d { transition: transform var(--t-fast) var(--ease-out); }
  .slotgrid td.ok button:active, .lbk:active, .rowbtn:active, .bottomnav button:active, .cal-d:active { transform: scale(0.985); }

  /* 予約が完了した場面（めったにない場面）だけ、97% から 220ms で出す */
  .banner { animation: done-in 220ms var(--ease-out); }
  @keyframes done-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
}

/* iPhone の確定：見た目はボタン、上に薄い（2%）本物のスイッチを重ねる。指が直接スイッチを押すので iPhone 自身がコツッと震える。
   完全に透明（0）にすると震えない（2026-11-07 実機で確かめた） */
.switch-btn { position: relative; }
.switch-btn input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0.02; cursor: pointer; }
.switch-btn input:disabled { cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .switch-btn .btn { transition: transform var(--t-fast) var(--ease-out); }
  .switch-btn:active .btn { transform: scale(0.97); }
}
