/* 色と値はモック（design/mock.dc.html）と同じ。勝手に変えないこと。 */

:root {
  color-scheme: light;
  --accent: #07823A;
  --accent-dark: #05602B;
  --ink: #1F2A25;
  --muted: #5F6B66;
  --hint: #6A7570;
  --line: #D9E0DC;
  --field: #C9D2CD;
  --face: #F2F5F3;
  --face2: #E9EFEB;
  --soft-green: #EEF7F1;
  --err: #C62828;
  --x: #8A948F;
  --faint: #B4BCB8;
  --sat-fg: #1C56B0;
  --sat-bg: #E8F0FB;
  --hol-fg: #C0392B;
  --hol-bg: #FCEDEE;
  --warn-bg: #FFF6E0;
  --warn-bd: #F0C36D;
  --warn-fg: #6B4A00;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #FFFFFF; }
button, input, select, textarea { font: inherit; color: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::placeholder { color: #7A847F; opacity: 1; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* .main が display:flex なので、hidden を効かせるには上書きが要る */
[hidden] { display: none !important; }

.app {
  width: 100%;
  min-height: 100vh;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* ヘッダー */
.hd { background: var(--accent); color: #FFFFFF; }
.hd__in {
  max-width: 440px; margin: 0 auto; padding: 18px 20px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.hd__co { margin: 0; font-size: 13px; font-weight: 500; }
.hd__ttl { margin: 0; font-size: 24px; font-weight: 900; line-height: 1.35; }
.hd__hours { margin: 0; font-size: 13px; }

/* 手順 */
.steps { border-bottom: 1px solid var(--line); }
.steps__list {
  max-width: 440px; margin: 0 auto; padding: 12px 20px; list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.steps__item { display: flex; align-items: center; gap: 6px; flex-grow: 1; }
.steps__dot {
  flex-shrink: 0; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #FFFFFF; color: var(--muted);
  border: 1px solid var(--field); font-size: 12px; font-weight: 700; line-height: 1;
}
.steps__label { font-size: 13px; font-weight: 500; color: var(--muted); }
.steps__item.is-done .steps__dot,
.steps__item.is-current .steps__dot {
  background: var(--accent); color: #FFFFFF; border-color: var(--accent);
}
.steps__item.is-current .steps__label { font-weight: 700; color: var(--ink); }

/* 本文 */
.main {
  max-width: 440px; margin: 0 auto; padding: 20px 16px 0;
  display: flex; flex-direction: column; gap: 16px;
}
.lead { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.lead__ttl { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.4; }
.lead__sub { margin: 0; font-size: 14px; line-height: 1.8; color: var(--muted); }

/* 週送り */
.wknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wknav__btn {
  min-height: 44px; display: flex; align-items: center; gap: 2px;
  background: transparent; border: 0; font-size: 13px; font-weight: 700;
  color: var(--accent); cursor: pointer;
}
.wknav__btn--prev { padding: 0 10px 0 4px; }
.wknav__btn--next { padding: 0 4px 0 10px; }
.wknav__btn:disabled { color: var(--faint); }
.wknav__label { font-size: 13px; font-weight: 700; text-align: center; }
.ico { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* 日時の表 */
.grid {
  display: grid; grid-template-columns: 48px repeat(7, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.grid__corner { background: var(--face); }
.grid__head {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 0; background: var(--face); color: var(--ink);
}
.grid__head--sat { background: var(--sat-bg); color: var(--sat-fg); }
.grid__head--hol { background: var(--hol-bg); color: var(--hol-fg); }
.grid__head-num { font-size: 15px; font-weight: 700; line-height: 1.2; }
.grid__head-wd { font-size: 11px; font-weight: 500; line-height: 1.3; }

.grid__time {
  display: flex; align-items: center; justify-content: center;
  background: var(--face); font-size: 13px; font-weight: 700; line-height: 1;
}
.grid__time--half { font-size: 11px; font-weight: 500; }

.grid__sep {
  display: flex; align-items: center; justify-content: center;
  background: var(--face2); font-size: 11px; font-weight: 700; color: var(--muted);
}
.grid__next {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 0; background: var(--face2); color: var(--ink);
}
.grid__next--sat { color: var(--sat-fg); }
.grid__next--hol { color: var(--hol-fg); }
.grid__next-num { font-size: 12px; font-weight: 700; line-height: 1.2; }
.grid__next-wd { font-size: 10px; font-weight: 500; line-height: 1.3; }

.cell {
  height: 44px; min-width: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #FFFFFF; border: 0; border-radius: 0;
  font-weight: 700; line-height: 1; cursor: pointer;
}
.cell--ok { color: var(--accent); font-size: 18px; }
.cell--x { color: var(--x); font-size: 16px; cursor: default; }
.cell--past { color: var(--faint); font-size: 13px; cursor: default; }
.cell--ask { color: var(--muted); font-size: 16px; }
.cell.is-on { background: var(--accent); color: #FFFFFF; }

/* 凡例・案内 */
.legend {
  display: flex; flex-direction: column; gap: 2px; padding: 0 4px;
  font-size: 13px; line-height: 1.7; color: var(--muted);
}
.legend p { margin: 0; }
.legend__mark { display: inline-block; width: 36px; font-weight: 700; }
.legend__mark--ok { color: var(--accent); }

.notice {
  margin: 0; padding: 12px 14px; background: var(--face);
  border-radius: 10px; font-size: 14px; line-height: 1.7;
}
.loaderr {
  margin: 0; padding: 12px 14px; background: var(--hol-bg);
  border-radius: 10px; font-size: 14px; line-height: 1.7; color: var(--hol-fg);
}

/* 下の固定バー */
.bar {
  position: sticky; bottom: 0; margin: 0 -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px;
  background: #FFFFFF; border-top: 1px solid var(--line);
}
.bar__text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.bar__sel { font-size: 17px; font-weight: 900; line-height: 1.4; }
.bar__band { font-size: 12px; line-height: 1.5; color: var(--muted); }
.bar__empty { font-size: 14px; line-height: 1.5; color: var(--muted); }
.bar__btn {
  flex-shrink: 0; height: 48px; padding: 0 28px;
  background: var(--accent); color: #FFFFFF; border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.bar__btn:disabled { background: #E3E8E5; color: #7A847F; }

/* ===================================================================
   ステップ2：内容・確認・送信完了
   値はモック（design/mock.dc.html）の 4-2〜4-4 と同じ。
   =================================================================== */

/* ボタン */
.btn-primary {
  width: 100%; height: 52px; background: var(--accent); color: #FFFFFF;
  border: 0; border-radius: 12px; font-size: 17px; font-weight: 700; cursor: pointer;
}
.btn-primary--tall { height: 56px; }
.btn-grow { width: auto; flex-grow: 1; }
.btn-outline {
  flex-shrink: 0; height: 52px; padding: 0 16px; background: #FFFFFF;
  border: 1px solid var(--field); border-radius: 12px;
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.btn-outline--wide { width: 100%; }
.btn-change {
  flex-shrink: 0; min-height: 44px; padding: 0 16px; background: #FFFFFF;
  border: 1px solid var(--field); border-radius: 10px;
  font-size: 14px; font-weight: 700; color: var(--accent); cursor: pointer;
}
.btn-dashed {
  align-self: flex-start; min-height: 44px; padding: 8px 16px 8px 12px;
  display: flex; align-items: center; gap: 8px; background: #FFFFFF;
  border: 1px dashed var(--field); border-radius: 999px;
  font-size: 14px; line-height: 1.5; text-align: left; cursor: pointer;
}
.ico--thin { stroke-width: 2; }
.ico--warn {
  flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--warn-fg);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* 入力 */
.input {
  width: 100%; height: 52px; padding: 0 16px; background: #FFFFFF;
  border: 1px solid var(--field); border-radius: 10px; font-size: 16px;
}
.input.is-error { border-color: var(--err); }
.input.is-filled { border-color: var(--accent); }
.textarea {
  width: 100%; min-height: 104px; padding: 14px 16px; background: #FFFFFF;
  border: 1px solid var(--field); border-radius: 10px;
  font-size: 16px; line-height: 1.7; resize: vertical;
}

/* 迎車プレート（内容画面） */
.plate {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 14px 14px 16px; background: var(--soft-green); border-radius: 14px;
}
.plate__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.badge {
  align-self: flex-start; font-size: 12px; font-weight: 700; line-height: 1.5;
  letter-spacing: 0.3em; padding: 0 3px 0 7px; color: var(--accent);
  border: 1.5px solid var(--accent); border-radius: 5px;
}
.badge--lg { font-size: 14px; letter-spacing: 0.35em; padding: 1px 4px 1px 10px; border-radius: 6px; }
.plate__when { font-size: 18px; font-weight: 900; line-height: 1.4; }
.plate__band { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* カード・フィールド */
.card {
  display: flex; flex-direction: column; background: #FFFFFF;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.card--pad { gap: 20px; padding: 16px; }
.card__foot {
  margin: 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12px; line-height: 1.6; color: var(--hint);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 15px; font-weight: 700; }
.field__sub { font-size: 13px; color: var(--muted); }
.field__hint { margin: 0; font-size: 12px; line-height: 1.6; color: var(--hint); }
.field__err { margin: 0; font-size: 13px; color: var(--err); }
.caution { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }

/* チップ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; background: #FFFFFF; color: var(--ink);
  border: 1px solid var(--field); border-radius: 999px;
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.chip.is-on { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }

/* 折りたたみ行 */
.row { display: flex; flex-direction: column; }
.row--sep { border-top: 1px solid var(--line); }
.row--sep.is-top { border-top: 0; }
.row__btn {
  width: 100%; min-height: 64px; padding: 12px 14px 12px 16px;
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: 0; text-align: left; cursor: pointer;
}
.row--place .row__btn { min-height: 60px; padding-bottom: 2px; }
.row__main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row__label { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.row__value {
  font-size: 16px; font-weight: 700; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row__value.is-empty { color: var(--err); }
.row__value.is-dim { color: var(--muted); }
.tag {
  padding: 0 8px; font-size: 11px; font-weight: 700; line-height: 1.8;
  color: var(--accent); background: var(--soft-green); border-radius: 999px;
}
.chev {
  flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .2s;
}
.row__btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.row__hint { margin: 0; padding: 0 48px 12px 16px; font-size: 12px; line-height: 1.6; color: var(--hint); }
.row__hint--tight { margin-top: -8px; }
.row__hint.is-error { color: var(--err); }
.panel { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
.panel__label { font-size: 13px; color: var(--muted); }
.panel__note { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* 人数 */
.stepper {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 16px; background: var(--face); border-radius: 14px;
}
.stepper__text { display: flex; flex-direction: column; }
.stepper__ttl { font-size: 16px; font-weight: 700; }
.stepper__sub { font-size: 13px; line-height: 1.6; color: var(--muted); }
.stepper__ctl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.stepper__out { min-width: 44px; text-align: center; font-size: 18px; font-weight: 900; }
.rbtn {
  width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: #FFFFFF; border: 1px solid var(--field); border-radius: 50%;
  color: var(--ink); cursor: pointer;
}
.rbtn:disabled { color: var(--faint); }

/* 下の固定バー（縦並び） */
.bar--col { flex-direction: column; align-items: stretch; gap: 8px; }
.bar--wide { margin: 0 -20px; padding: 10px 20px calc(12px + env(safe-area-inset-bottom, 0px)); }
.errline { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: 13px; line-height: 1.6; color: var(--err); }
.errline .ico { flex-shrink: 0; margin-top: 2px; }

/* 確認画面 */
.main--confirm { padding: 20px 20px 0; gap: 24px; }
.plate2 {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 20px 20px; background: var(--soft-green); border-radius: 16px;
}
.plate2__date { margin: 10px 0 0; font-size: 18px; font-weight: 700; }
.plate2__time { margin: 0; font-size: 60px; font-weight: 900; line-height: 1.1; color: var(--accent); }
.plate2__band { margin: 4px 0 0; font-size: 15px; }
.sum { margin: 0; display: flex; flex-direction: column; }
.sum__row { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.sum__row--last { border-bottom: 1px solid var(--line); }
.sum__row dt { flex-shrink: 0; width: 84px; font-size: 14px; color: var(--muted); }
.sum__row dd { margin: 0; flex-grow: 1; font-size: 16px; }
.preview { display: flex; flex-direction: column; gap: 10px; }
.preview__ttl { margin: 0; font-size: 15px; font-weight: 700; color: var(--muted); }
.preview__body {
  margin: 0; padding: 16px 18px; background: var(--face);
  border-radius: 4px 18px 18px 18px; white-space: pre-line;
  font-size: 15px; line-height: 1.9;
}
.note-first { margin: 0; padding: 0 4px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.warn {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  background: var(--warn-bg); border: 1px solid var(--warn-bd);
  border-radius: 10px; color: var(--warn-fg);
}
.warn--wide { width: 100%; padding: 12px 14px; }
.warn__text { display: flex; flex-direction: column; gap: 2px; }
.warn__ttl { font-size: 15px; font-weight: 900; line-height: 1.5; }
.warn__sub { font-size: 12px; line-height: 1.6; }
.warn__sub--lg { font-size: 13px; line-height: 1.7; }
.confirm-actions { display: flex; gap: 8px; }

/* 送信完了 */
.main--sent { padding: 40px 20px 48px; gap: 32px; }
.done { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.done__check { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.done__ttl { margin: 0; font-size: 26px; font-weight: 900; line-height: 1.35; }
.copybox { display: flex; flex-direction: column; gap: 10px; }
.copybox__lead { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.7; color: var(--err); }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.flow__item { display: flex; gap: 14px; align-items: flex-start; }
.flow__num {
  flex-shrink: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid var(--field); color: var(--muted); font-size: 15px; font-weight: 700;
}
.flow__num--on { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.flow__text { display: flex; flex-direction: column; }
.flow__ttl { font-size: 16px; font-weight: 700; }
.flow__sub { font-size: 14px; color: var(--muted); }
.done-actions { display: flex; flex-direction: column; gap: 12px; }
.done-actions__note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
