/* まるっとヘルスラボ — はじめの流れ（route onboard・DL.onboardUI の窓）。クラスは onboard- ではじめる */
.onboard { display: flex; flex-direction: column; gap: 14px; }
.onboard-body { display: flex; flex-direction: column; gap: 14px; }

/* 見出し：もどる・進みぐあい */
.onboard-headbox { position: sticky; top: 0; z-index: 5; margin: -14px -14px 0; padding: 10px 14px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.onboard-head { display: flex; align-items: center; gap: 10px; }
.onboard-back {
  flex: 0 0 auto; min-height: 44px; min-width: 44px; padding: 6px 12px 6px 8px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 800; font-size: 15px; line-height: 1.2;
}
.onboard-back:active { background: var(--paper-2); }
.onboard-brand { flex: 0 0 auto; font-size: 14px; font-weight: 800; color: var(--fumi); line-height: 44px; white-space: nowrap; }
.onboard-prog { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.onboard-prog-text { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink-2); }
.onboard-prog-label { font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.onboard-prog-num { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.onboard-prog-num strong { font-size: 17px; color: var(--primary); }
.onboard-prog .progress { height: 10px; }
/* チェックの最中：進みぐあいの棒は、チェックの中の1本だけにする（上は「4／9」の文字だけ） */
.onboard-head-run .onboard-prog .progress { display: none; }
.onboard-head-run .onboard-prog { justify-content: center; }

.onboard-titlebox { display: flex; flex-direction: column; gap: 4px; }
.onboard-title { font-size: 23px; }
.onboard-title:focus { outline: none; }
.onboard-lead { margin: 0; color: var(--ink-2); font-size: 16px; }
.onboard-small { font-size: 14px; line-height: 1.65; }
.onboard-card { display: flex; flex-direction: column; gap: 12px; }
.onboard-sec { display: flex; flex-direction: column; gap: 2px; }
.onboard-sec-title { font-weight: 800; font-size: 16px; }
.onboard-err { color: var(--danger); font-weight: 800; font-size: 15px; }
.onboard-err:empty { display: none; }
.onboard-refrow { display: flex; justify-content: flex-end; margin-top: -6px; }
.onboard-refrow:empty { display: none; }
.onboard-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.onboard-actions .btn { min-height: 54px; font-size: 17px; }

/* ① ようこそ */
.onboard-hero { display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 8px 0 0; }
.onboard-hero-chr { flex: 0 1 auto; }
.onboard-kv { margin: 0 -2px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: var(--paper-2); aspect-ratio: 3 / 2; }
.onboard-kv-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.onboard-credit { align-self: flex-start; margin-top: -4px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.onboard-hero-side { width: 30%; max-width: 132px; }
.onboard-hero-mid { width: 36%; max-width: 160px; }
.onboard-says { display: flex; flex-direction: column; gap: 10px; }
.onboard-list { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.onboard-list li { line-height: 1.6; }
.onboard-promise { border: 2px solid var(--miso-soft); }
.onboard-promise-list { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.onboard-promise-list li { line-height: 1.6; }
.onboard-promise-list li::marker { font-weight: 800; color: var(--miso); }
.onboard-flag-note:empty { display: none; }
.onboard-flag-note .note-warn { display: flex; flex-direction: column; gap: 4px; }
/* 2つの入り方（かんたん／しっかり） */
.onboard-path-head { margin-top: 4px; }
.onboard-actions .onboard-path-btn { flex-direction: column; gap: 2px; min-height: 64px; padding: 10px 18px; border-radius: 20px; }
.onboard-path-main { font-size: 17px; font-weight: 800; line-height: 1.35; }
.onboard-path-sub { font-size: 13.5px; font-weight: 700; line-height: 1.45; opacity: .9; }
.onboard-restore { gap: 10px; margin-top: 8px; }
.onboard-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

/* ② 入力 */
.onboard-form { gap: 16px; }
.onboard-num .field-input { font-size: 24px; font-weight: 800; min-height: 56px; max-width: 220px; font-variant-numeric: tabular-nums; }
.onboard-num .field-box { gap: 10px; }
.onboard-num .field-unit { font-size: 18px; }

/* ③ BMI */
.onboard-bmi-main { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; }
.onboard-bmi-label { font-size: 15px; font-weight: 800; color: var(--ink-2); letter-spacing: .08em; }
.onboard-bmi-num { font-size: 52px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ink); }
.onboard-bmi-cls .chip { font-size: 15px; padding: 4px 14px; }
.onboard-kv { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.onboard-kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.onboard-kv-k { color: var(--ink-2); font-size: 15px; min-width: 0; }
.onboard-kv-v { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.onboard .note-info strong, .onboard .note-warn strong, .onboard .note-ok strong { display: block; }

/* ④〜⑥ チェックの前の説明 */
.onboard-pre { gap: 0; padding: 4px 16px; }
.onboard-pre-row { display: grid; grid-template-columns: 6.2em 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.onboard-pre-row:last-child { border-bottom: 0; }
.onboard-pre-k { font-weight: 800; color: var(--ink-2); font-size: 15px; }
.onboard-pre-time { font-weight: 800; color: var(--primary); }
.onboard-later-hint { margin: 0; }
.onboard-check-run { display: block; }

/* ⑦ 目標 */
.onboard-goal { display: flex; flex-direction: column; gap: 14px; }
.onboard-goal-subs, .onboard-goal-target, .onboard-goal-pace { display: flex; flex-direction: column; gap: 10px; }
.onboard-goal-subs:empty, .onboard-goal-target:empty, .onboard-goal-pace:empty, .onboard-goal-waist:empty { display: none; }
.onboard-subs .choice, .onboard-periods .choice { justify-content: center; text-align: center; }
.onboard-subs .choice-text, .onboard-periods .choice-text { align-items: center; }
.onboard-periods { grid-template-columns: repeat(4, 1fr); }
.onboard-periods .choice { padding-left: 4px; padding-right: 4px; }
.onboard-pace-ok { display: flex; flex-direction: column; gap: 2px; }
.onboard-goal-pace .note-warn { display: flex; flex-direction: column; gap: 4px; }
.onboard-waist { display: flex; flex-direction: column; gap: 4px; }
.onboard-waist .ref-btn { align-self: flex-end; }
.onboard-pain { font-weight: 700; }

/* ⑧ 時間 */
.onboard-time { display: flex; flex-direction: column; gap: 12px; }
.onboard-mins { grid-template-columns: repeat(4, 1fr); }
.onboard-mins .choice { justify-content: center; padding: 10px 4px; font-size: 17px; font-variant-numeric: tabular-nums; }
.onboard-mins .choice-text { align-items: center; }
.onboard-time-note:empty { display: none; }
.onboard-short p { margin: 0; }
.onboard-short { gap: 8px; display: flex; flex-direction: column; }

/* ⑨ けっか */
.onboard-macro { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 8px; }
.onboard-macro-item { background: var(--paper-2); border-radius: var(--radius-s); padding: 10px 8px; text-align: center; min-width: 0; }
.onboard-macro-kcal { background: var(--fumi-soft); }
.onboard-macro-k { font-size: 13.5px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.onboard-macro-v { font-size: 26px; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.onboard-macro-v small { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.onboard-meals { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.onboard-meals-row { display: grid; grid-template-columns: 3.2em 1fr 1fr 1fr; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; text-align: right; }
.onboard-meals-row:first-child { border-top: 0; }
.onboard-meals-head { background: var(--paper-2); font-size: 13px; font-weight: 800; color: var(--ink-2); }
.onboard-meals-slot { text-align: left; font-weight: 800; }
.onboard-examples { display: flex; flex-direction: column; gap: 6px; }
.onboard-examples .onboard-small { margin: 0; }
.onboard-ex-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.onboard-ex { display: grid; grid-template-columns: 3.2em 1fr; gap: 4px; padding: 9px 10px; border-top: 1px solid var(--line); background: var(--paper); }
.onboard-ex:first-child { border-top: 0; }
.onboard-ex-slot { font-weight: 800; }
.onboard-ex-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.onboard-ex-name { font-weight: 800; line-height: 1.45; }
.onboard-ex-kcal { margin-left: 8px; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.onboard-ex-items { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.onboard-details { border-top: 1px solid var(--line); padding-top: 8px; }
.onboard-details summary { cursor: pointer; font-weight: 800; color: var(--miso); min-height: 44px; display: flex; align-items: center; }
.onboard-explain { margin: 4px 0 8px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }

.onboard-days { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.onboard-day { border-top: 1px solid var(--line); background: var(--paper); }
.onboard-day:first-child { border-top: 0; }
.onboard-day.is-rest { background: var(--paper-2); }
.onboard-day-head { display: grid; grid-template-columns: 3em 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; min-height: 52px; list-style: none; cursor: pointer; }
.onboard-day-head::-webkit-details-marker { display: none; }
.onboard-day.is-rest .onboard-day-head { cursor: default; }
.onboard-day-date { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.onboard-day-date strong { font-size: 18px; }
.onboard-day-md { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.onboard-day-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.onboard-day-name { font-weight: 800; line-height: 1.4; }
.onboard-day-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.onboard-day-chips .chip { font-size: 12.5px; padding: 1px 8px; }
.onboard-today { background: var(--primary); color: #fff; }
.onboard-day-min { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
details.onboard-day > .onboard-day-head .onboard-day-min::after { content: " ▾"; font-size: 12px; }
details.onboard-day[open] > .onboard-day-head .onboard-day-min::after { content: " ▴"; }
.onboard-day-items { margin: 0; padding: 0 12px 10px 3.9em; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.onboard-day-items li { display: flex; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); padding-top: 4px; font-size: 15px; }
.onboard-day-items .muted { white-space: nowrap; }
.onboard-habits { display: flex; flex-direction: column; gap: 4px; }
.onboard-reason-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.onboard-reason-list li { line-height: 1.65; }
.onboard-reason-list .ref-btn { margin-left: 4px; }

/* 窓 */
.onboard-sheet .onboard-card { box-shadow: none; }

@media (max-width: 374px) {
  .onboard-title { font-size: 21px; }
  .onboard-macro { grid-template-columns: 1fr 1fr; }
  .onboard-macro-kcal { grid-column: 1 / -1; }
  .onboard-meals-row { grid-template-columns: 2.6em 1fr 1fr 1fr; padding: 8px 8px; font-size: 15px; }
  .onboard-pre-row { grid-template-columns: 1fr; gap: 2px; }
}
@media (min-width: 560px) {
  .onboard-headbox { margin: -14px -14px 0; padding: 12px 18px; }
  .onboard-title { font-size: 25px; }
}

/* 複数えらべるボタンには、四角いしるし */
.onboard .choice[role="checkbox"], .onboard-sheet .choice[role="checkbox"] { position: relative; padding-left: 46px; }
.onboard .choice[role="checkbox"]::before, .onboard-sheet .choice[role="checkbox"]::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border: 2px solid var(--line); border-radius: 6px; background: var(--paper); box-sizing: border-box;
}
.onboard .choice[role="checkbox"].is-on::before, .onboard-sheet .choice[role="checkbox"].is-on::before {
  border-color: var(--primary); background: var(--primary);
}
.onboard .choice[role="checkbox"].is-on::after, .onboard-sheet .choice[role="checkbox"].is-on::after {
  content: ""; position: absolute; left: 21px; top: 50%; width: 6px; height: 11px; margin-top: -8px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.onboard-subs .choice[role="checkbox"] { justify-content: flex-start; text-align: left; padding-left: 44px; }
.onboard-subs .choice-text { align-items: flex-start; }
.onboard-subs.choices-cols-2 { grid-template-columns: 1fr; }
.onboard-subs .choice { min-height: 48px; }
@media (min-width: 440px) { .onboard-subs.choices-cols-2 { grid-template-columns: 1fr 1fr; } }
.onboard-time-note { margin: -4px 0 0; text-align: center; font-size: 14px; }
