:root {
  --bg: #EEF1F6;
  --paper: #ffffff;
  --ink: #26324A;
  --sub: #5E6A80;
  --accent: #22365C;
  --accent-soft: #EAEFF6;
  --line: #DCE2EC;
  --warn: #9a5b2c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 18px;
  line-height: 1.8;
}
.top {
  position: sticky; top: 0; z-index: 2;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}
.brand { font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.brand span { margin-left: 10px; font-size: 13px; color: var(--sub); letter-spacing: 0; font-weight: 400; }

main { max-width: 640px; margin: 0 auto; padding: 16px 16px 140px; }

#login h1 { font-size: 24px; margin: 24px 0 8px; }
#loginForm { display: grid; gap: 12px; margin-top: 16px; }
input[type=email] {
  font-size: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; width: 100%;
  background: var(--paper);
}
.msg { color: var(--warn); min-height: 1.5em; }

button {
  font: inherit; cursor: pointer; border-radius: 12px; padding: 12px 16px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  text-align: left; width: 100%;
}
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); text-align: center; font-weight: 700; }
button:disabled { opacity: .45; cursor: default; }
button.opt[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
button.opt[aria-pressed=true]::before { content: "✓ "; color: var(--accent); }

.bubble {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin: 12px 0;
}
.bubble.me { background: var(--accent-soft); border-color: transparent; margin-left: 40px; }
.bubble p { margin: 0 0 12px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble h3 { font-size: 18px; margin: 20px 0 8px; color: var(--accent); }
.bubble h3:first-child { margin-top: 0; }
.label { font-size: 14px; color: var(--sub); margin: 8px 0 2px !important; }
.note { color: var(--warn); }
.note::before { content: "※"; }

.ex { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.ex .title { font-weight: 700; margin-bottom: 4px; }
/* 動画は押せるボタンの形（2026-11-22） */
a.video {
  display: block; text-align: center; margin: 8px 0 4px; padding: 12px 16px; border-radius: 12px;
  background: #fff; border: 2px solid var(--accent); color: var(--accent); font-weight: 700; text-decoration: none;
}
.vline { font-size: 14px; color: var(--sub); margin: 0 0 12px !important; }
.ex.bare { border-top: none; padding-top: 0; margin-top: 0; }
.howbody { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin: 0 0 8px; }
.howbody p { margin: 0 0 10px; }

.card {
  border: 2px solid var(--accent); border-radius: 14px; padding: 4px 16px; margin: 20px 0;
  background: #FBFCFE;
}
.card .cap { text-align: center; font-weight: 700; color: var(--accent); margin: 10px 0; }
.card p { margin: 0 0 10px; }

.steps p { margin: 0 0 12px; }
a.inline { color: var(--accent); }

#choices { display: grid; gap: 10px; margin-top: 8px; }
#choices .hint { font-size: 14px; color: var(--sub); }
/* 質問は色つき（答えの白い四角と分ける） */
/* MEGURUから利用者への問いかけは必ずこの色（2026-11-22 本人の指示） */
.bubble.q { background: #fbf1df; border-color: #ecd3a6; }
#choices > .bubble.q { margin-bottom: 6px; }
#choices > .bubble.q p.how { font-size: 15px; color: var(--warn); margin-top: 6px; }
button.opt { display: flex; align-items: center; gap: 12px; }
button.opt .num {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 16px;
}
button.opt[aria-pressed=true] .num { background: var(--accent); color: #fff; }
#choices button.back { background: transparent; border-style: dashed; color: var(--sub); text-align: center; font-size: 16px; }

#actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; overflow-x: auto;
}
#actions button { width: auto; white-space: nowrap; flex: 0 0 auto; font-size: 16px; padding: 10px 14px; }
#actions button.primary { order: -1; }
.tiny { font-size: 13px; color: var(--sub); background: none; border: none; text-decoration: underline; width: auto; padding: 4px; }
.ex button.how { display: block; width: auto; font-size: 15px; padding: 6px 12px; margin: 0 0 8px; color: var(--accent); }
textarea.consult {
  font: inherit; font-size: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  width: 100%; background: var(--paper); resize: vertical;
}
#actions[hidden] { display: none; }

/* ── 番号の順に進むメニュー（2026-11-22 40代向けデザイン・本人決定。ふわ案C） ── */
.guide { margin: 16px 0; }
.ghead {
  position: sticky; top: var(--headH, 104px); z-index: 1; background: var(--bg);
  padding: 8px 0 6px;
}
.ghead p { margin: 0; }
.gtrow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gtitle { font-size: 22px; font-weight: 800; color: var(--ink); }
.gmeta { font-size: 15px; color: var(--sub); white-space: nowrap; }
.ghint { margin: 6px 0 4px; font-size: 15px; color: var(--warn); }

/* 継続の延長特典（記録タブ） */
.ext { background: var(--paper); border: 2px solid var(--accent); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; }
.ext p { margin: 0 0 6px; line-height: 1.7; }
.exttitle { font-weight: 800; color: var(--accent); }
.extprog { font-weight: 700; }
.ext button { width: 100%; margin-top: 4px; }
.extmsg { color: var(--warn); font-size: 15px; }

/* 記録の数字（合計・今週・今週の達成）と曜日の○ */
.stats { background: var(--paper); border-radius: 14px; padding: 10px 8px 12px; margin: 6px 0 10px; }
.srow { display: grid; grid-template-columns: repeat(3, 1fr); }
.scell { text-align: center; }
.scell + .scell { border-left: 1px solid var(--line); }
.scell p { margin: 0; }
.scap { font-size: 13px; color: var(--sub); }
.sval { font-size: 24px; font-weight: 800; color: var(--accent); line-height: 1.3; }
.sdots { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 8px; }
.sday { display: grid; justify-items: center; gap: 2px; }
.sdot {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #A9B1BF; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff; line-height: 1;
}
.sdot.on { background: var(--accent); border-color: var(--accent); }
.sdot.rest { border-style: dashed; color: var(--sub); font-size: 11px; }
.sdot.today { box-shadow: 0 0 0 3px var(--accent-soft); }
.swd { font-size: 12px; color: var(--sub); line-height: 1.2; }

/* 手順の行 */
.gstep { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; overflow: hidden; }
.gstep.row.done { background: var(--accent-soft); border-color: transparent; }
.gtop { display: flex; align-items: center; gap: 10px; border: none; border-radius: 0; background: transparent; font-weight: 700; padding: 10px 14px; font-size: 17px; line-height: 1.5; min-height: 48px; }
.gtop .gname { flex: 1 1 auto; }
.gtop .gdose { flex: 0 0 auto; font-size: 13px; color: var(--sub); font-weight: 400; }
.gnum {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  background: #fff; border: 1.5px solid #A9B1BF; color: var(--sub); font-size: 15px;
}
.gstep.done .gnum { background: var(--accent); border-color: var(--accent); color: #fff; }

/* いまやる1つ */
.gstep.now { border: 2px solid var(--accent); box-shadow: 0 2px 10px rgba(34,54,92,.15); }
.gnowtop { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 8px; }
.gbadge { flex: 0 0 auto; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; border-radius: 99px; padding: 2px 10px; margin-top: 3px; }
.gnowname p { margin: 0; }
.gnowname .gname { font-size: 18px; font-weight: 800; line-height: 1.5; }
.gnowname .gdose { font-size: 14px; color: var(--sub); }
.gbtns { display: flex; gap: 10px; padding: 0 14px 12px; }
.gbtns a.gplay { flex: 0 0 38%; margin: 0; display: grid; place-items: center; background: var(--accent-soft); border: none; min-height: 52px; }
.gbtns button.gnext { flex: 1 1 auto; width: auto; margin: 0; font-size: 19px; padding: 12px; min-height: 52px; }
.gbody { padding: 0 14px 4px; font-size: 16px; }
.gbody p { margin: 0 0 10px; }
.gbody h3 { font-size: 17px; margin: 14px 0 8px; color: var(--accent); }
.gstep.now .gbody { border-top: 1px solid var(--line); padding-top: 10px; }

/* 今日の食事・睡眠 */
.gfood { background: var(--paper); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.gfoodcap { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--accent); }
button.gfi { display: flex; align-items: center; gap: 10px; border: none; padding: 6px 0; font-size: 16px; font-weight: 700; background: transparent; }
.gfdot { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #A9B1BF; display: grid; place-items: center; font-size: 12px; color: #fff; }
button.gfi.on .gfdot { background: var(--accent); border-color: var(--accent); }

button.grest { display: block; width: auto; margin: 6px auto 0; background: none; border: none; color: var(--sub); text-decoration: underline; font-size: 15px; text-align: center; }

.gfinish { background: var(--accent-soft); border-radius: 14px; padding: 18px 16px; margin: 14px 0; text-align: center; }
.gfinish p { margin: 0 0 8px; }
.gfinish .gcheck { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 30px; font-weight: 800; display: grid; place-items: center; }
.gfinish .big { font-size: 20px; font-weight: 800; color: var(--accent); }
.gfinish .gsum { font-size: 18px; font-weight: 700; }
.gfinish .gsoft { font-size: 15px; color: var(--sub); margin-top: 6px; }
.gmore { margin: 12px 0; background: var(--paper); border: 1px dashed var(--line); border-radius: 14px; }
.gmore summary { cursor: pointer; padding: 14px 16px; color: var(--sub); font-weight: 700; }

/* 自動で動かすときに、上下のバーに隠れないように */
#choices, .gstep, .gfinish, .bubble, .guide {
  scroll-margin-top: calc(var(--headH, 104px) + 56px);
  scroll-margin-bottom: calc(var(--navH, 140px) + 12px);
}
.guide { scroll-margin-top: calc(var(--headH, 104px) + 4px); }

/* ── 上のタブ ── */
#tabs { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; max-width: 640px; margin: 8px auto 0; }
#tabs[hidden] { display: none; }
#tabs button { text-align: center; padding: 6px 4px; font-size: 16px; font-weight: 700; border-radius: 10px; min-height: 40px; }
#tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── 下のボタン5つ ── */
#actions.main { display: block; padding: 8px 12px calc(6px + env(safe-area-inset-bottom)); }
#actions.main .due { display: grid; gap: 6px; margin-bottom: 8px; }
#actions.main .due button { width: 100%; font-size: 17px; padding: 10px; }
#actions.main .five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 640px; margin: 0 auto; }
#actions.main .five button.nb { width: 100%; text-align: center; padding: 10px 2px; font-size: 16px; font-weight: 700; min-height: 48px; }
#actions.main .five button.nb.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* 相談の中の小見出し（困ったとき／見たい・聞きたい） */
.pickhead { margin: 12px 0 4px; font-size: 14px; font-weight: 700; color: var(--accent); }
/* 今日の一言（今日のメニューの一番上） */
.hitokoto { background: #fdf6d8; color: #5a4a1a; border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; font-size: 16px; line-height: 1.6; }
/* 暗い画面用の一言の色は外した（ページ全体は明るいままなので。11/27） */
/* 下のボタンは4つ（今日・記録・メニュー一覧・相談。上のタブは廃止。2026-11-24） */
#actions.main .five { grid-template-columns: 1fr 1fr 1.25fr 1.35fr; }
#actions.main .five button.nb.two { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.2; }
#actions.main .five button.nb.two small { font-size: 12px; font-weight: 400; }
#actions .tests { display: flex; flex-wrap: wrap; gap: 0 12px; justify-content: center; }
#actions .tests .tiny { font-size: 12px; white-space: normal; }
#actions:not(.main) .tests { display: contents; }

/* ── 記録・メニュー一覧 ── */
.ptitle { font-size: 22px; margin: 8px 0 8px; }
.psub { font-size: 17px; color: var(--accent); margin: 18px 0 8px; }
.psoft { font-size: 15px; color: var(--sub); margin: 4px 0 8px; }
.cal { display: grid; gap: 8px; }
.calrow { background: var(--paper); border-radius: 12px; padding: 8px 10px; }
.calcap { font-size: 13px; color: var(--sub); }
.calrow .sdots { margin-top: 2px; }
details.hist { background: var(--paper); border-radius: 12px; margin: 8px 0; padding: 0 12px; }
details.hist summary { cursor: pointer; padding: 12px 0; font-weight: 700; font-size: 16px; }
details.hist .bubble { border: none; padding: 0; margin: 0 0 8px; }
.wk { display: flex; justify-content: space-between; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
details.wk { display: block; }
details.wk summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; }
details.wk .bubble { border: none; padding: 0; margin: 8px 0 0; }
.wk.now { border: 2px solid var(--accent); }
.wk.future { opacity: .6; }
.wkno { font-weight: 700; }
.wkst { font-size: 14px; color: var(--sub); }
.wk.now .wkst { color: var(--accent); font-weight: 700; }

/* ── 2026-11-23 ふわ案v2：今日タブには今日の分だけ・目立つのは1つだけ ── */
button.pastbar {
  display: flex; align-items: center; gap: 10px; margin: 8px 0 4px;
  background: var(--accent-soft); border: none; border-radius: 12px; padding: 10px 14px; font-size: 16px; font-weight: 700;
}
.pbcheck { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; }
.pbtext { flex: 1 1 auto; }
.pblink { flex: 0 0 auto; color: var(--accent); font-size: 15px; }
/* 進み具合 */
.gprow { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; }
.gcount { font-size: 17px; font-weight: 800; color: var(--accent); }
.gleft { font-size: 16px; color: var(--sub); }
.gbar { height: 8px; border-radius: 99px; background: var(--line); margin-top: 4px; overflow: hidden; }
.gfill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
/* いまの1つ：やり方は3行まで */
.gstep.now .gbody { font-size: 17px; line-height: 1.7; }
.gstep.now .gbody p { margin: 0 0 4px; }
.gbody.clamp { max-height: 8.4em; overflow: hidden; position: relative; }
.gbody.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.6em; background: linear-gradient(transparent, #fff); }
.gcaution { color: var(--accent); font-weight: 700; }
button.gmorelink { display: block; width: auto; border: none; background: none; color: var(--sub); font-size: 15px; padding: 2px 14px 8px; text-decoration: underline; }
.gstep.now .gbtns { padding-top: 4px; }
.gvat { margin: -4px 14px 10px; font-size: 13px; color: var(--sub); }
/* 食事・睡眠とお休み */
.gfoodtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gfoodtop .grest { margin: 0; padding: 2px 0; font-size: 14px; }
/* 記録：週ごと */
details.wkrec { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
details.wkrec.now { border: 2px solid var(--accent); }
details.wkrec summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
details.wkrec summary::-webkit-details-marker { display: none; }
.wkchk { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.wkrec .wkno { font-size: 18px; }
.wktag { background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; border-radius: 99px; padding: 2px 10px; }
.wkopen { margin-left: auto; font-size: 14px; color: var(--sub); }
.wkopen::after { content: "開く ›"; }
details[open] > summary .wkopen::after { content: "閉じる ‹"; }
.wklog { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.wklogcap { font-size: 14px; color: var(--sub); margin: 0 0 4px; }
.wklog .guide .ghead { position: static; }
.psoftbox { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 700; color: var(--sub); white-space: pre-line; margin: 16px 0; }
details.cguide { background: var(--bg); border-radius: 10px; margin: 8px 0; padding: 0 10px; }
details.cguide > summary { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; cursor: pointer; font-weight: 700; font-size: 16px; }
.cgc { font-size: 14px; color: var(--sub); font-weight: 400; white-space: nowrap; }
details.cstep > summary { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: 15px; list-style: none; }
details.cstep > summary::-webkit-details-marker { display: none; }
.cnum { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #A9B1BF; display: grid; place-items: center; font-size: 12px; color: var(--sub); }
.cnum.on { background: var(--accent); border-color: var(--accent); color: #fff; }
details.cguide .gbody { background: var(--paper); border-radius: 8px; padding: 8px 10px; margin: 0 0 6px; font-size: 15px; }
details.cguide .bubble { margin: 8px 0; }
.wklog .bubble { font-size: 15px; padding: 10px 12px; margin: 6px 0; }
/* 質問に答えている間は下のボタンを隠す（#actions.main の display が [hidden] に勝っていたため。11/23） */
#actions.main[hidden] { display: none; }
.srow { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.wkrest { font-size: 14px; color: var(--sub); margin: 4px 2px; }
.gfinish.gend button { width: 100%; text-align: center; margin-top: 8px; font-size: 18px; min-height: 52px; }
.gfinish.gend button:not(.primary) { background: #fff; }
#choices button.sub { text-align: center; }

/* ── 2026-11-27 ふわ改善案（本人：画像どおり）──
   〇日目の黄色いカード／白い進み具合カード／番号は緑の丸／回数は右の丸い枠／
   いまやる1つは太い枠＋色／下のボタンはアイコン付き／全体に余白を広げる */
:root { --pop: #3B5B92; --pop-soft: #EAEFF6; }
main { padding-top: 20px; }
.guide { margin: 8px 0 20px; }
.gday { background: #fdf1cf; border-radius: 16px; padding: 14px 18px; margin: 0 0 12px; }
.gday p { margin: 0; }
.gdayno { font-size: 26px; font-weight: 800; line-height: 1.3; }
.gdaywk { margin-left: 10px; font-size: 15px; font-weight: 700; color: var(--sub); }
.gdayword { font-size: 16px; font-weight: 700; line-height: 1.6; margin-top: 4px !important; }
.ghead {
  position: static; background: var(--paper); border-radius: 16px; padding: 14px 18px 16px;
  text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,.06); margin-bottom: 14px;
}
.gtitle { font-size: 22px; }
.gcount { font-size: 18px; font-weight: 800; color: var(--accent); margin-top: 2px !important; }
.gbar { height: 10px; background: var(--pop-soft); margin-top: 10px; }
.gfill { background: var(--accent); }
.gstep { border: none; border-radius: 14px; margin: 10px 0; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.gtop { gap: 12px; padding: 12px 14px; min-height: 56px; }
.gnum {
  width: 32px; height: 32px; border: none; background: var(--pop); color: #fff; font-size: 16px; font-weight: 800;
}
.gstep.row.done { background: #E6EAF1; box-shadow: none; }
.gstep.row.done .gnum { background: #fff; border: 2px solid var(--pop); color: var(--pop); }
.gstep.row.done .gname { color: var(--sub); font-weight: 400; font-size: 16px; }
.gchip {
  flex: 0 0 auto; border: 1.5px solid var(--pop); background: var(--pop-soft); color: var(--accent);
  border-radius: 99px; padding: 1px 10px; font-size: 13px; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.gchip.soft { border-color: var(--line); background: #fff; color: var(--sub); }
/* いまやる1つ */
.gstep.now { border: 3px solid var(--accent); box-shadow: 0 3px 12px rgba(34,54,92,.18); }
.gnowtop { align-items: center; gap: 12px; padding: 12px 14px; background: var(--pop-soft); }
.gnowtop .gname { flex: 1 1 auto; font-size: 18px; font-weight: 800; line-height: 1.5; }
.gstep.now .gbody { border-top: none; padding-top: 12px; }
.gbtns { gap: 10px; padding: 4px 14px 14px; }
.gbtns a.gplay { color: var(--accent); background: var(--pop-soft); border-radius: 12px; }
.gbtns button.gnext { background: var(--accent); border-color: var(--accent); border-radius: 12px; }
/* メニューカード（■と★はやめた） */
.card { border-width: 2px; border-color: var(--pop); background: #fff; padding: 6px 14px 10px; }
.card .cap { font-size: 18px; margin: 10px 0 8px; }
.crow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.crow .gnum { width: 28px; height: 28px; font-size: 14px; display: inline-grid; place-items: center; border-radius: 50%; }
.crow .cname { flex: 1 1 auto; font-weight: 700; }
.cfirst { flex: 0 0 100%; margin-left: 38px; font-size: 13px; font-weight: 700; color: var(--warn); }
/* 下のボタン：アイコン＋文字。押している所は濃い緑 */
#actions.main .five { grid-template-columns: repeat(4, 1fr); gap: 4px; }
#actions.main .five button.nb {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: none; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.2; padding: 8px 2px; min-height: 60px; border-radius: 14px;
}
#actions.main .five button.nb svg { display: block; }
#actions.main .five button.nb.on { background: var(--accent); color: #fff; }
.gtop .gname, .gnowtop .gname { flex: 1 1 auto; min-width: 0; }
.gtag { display: block; font-size: 13px; font-weight: 700; color: var(--warn); }
.crow .cname { flex: 1 1 0; min-width: 0; }

/* ── 2026-11-27 ふわの色の一覧（場所ごとの色。本人の依頼でふわと相談） ── */
:root { --line: #D9E0EB; --sub: #5E6A80; }
.brand { color: #22365C; }
.brand span { color: #5E6A80; }
/* 今日の画面 */
.gday { background: #FDF1CF; }
.gdayno { color: #7A5C3E; }
.gdaywk { color: #7A5C3E; }
.gdayword { color: #333333; }
.gcount { color: #22365C; }
.gbar { background: #E3E8F0; }
.gfill { background: #3B5B92; }
.gstep { border: 1px solid #D9E0EB; box-shadow: none; }
.gnum { background: #3B5B92; color: #fff; }
.gchip { background: #EAEFF6; border-color: #3B5B92; color: #22365C; }
.gstep.now { background: #EAEFF6; border: 3px solid #22365C; }
.gstep.now .gnum { background: #22365C; }
.gnowtop { background: #EAEFF6; }
.gbody.clamp::after { background: linear-gradient(transparent, #EAEFF6); }
.gbtns button.gnext { background: #22365C; border-color: #22365C; color: #fff; }
.gbtns a.gplay { background: #fff; color: #22365C; }
.gcaution { background: #fff; color: #22365C; border-radius: 8px; padding: 2px 8px; display: inline-block; }
.gstep.row.done { background: #E9EDF3; border-color: #E9EDF3; }
.gstep.row.done .gname { color: #8A91A0; }
.gstep.row.done .gnum { background: #fff; border: 2px solid #3B5B92; color: #3B5B92; }
/* 記録 */
.sval { color: #22365C; }
.scap { color: #5E6A80; }
.sdot { background: #fff; border: 1.5px solid #D9E0EB; }
.sdot.on { background: #3B5B92; border-color: #3B5B92; color: #fff; }
.sdot.rest { background: #FDF1CF; border: 1.5px solid #FDF1CF; color: #7A5C3E; }
.sdot.today { border: 3px solid #22365C; box-shadow: none; }
.sdot.on.today { border-color: #22365C; }
.swd { color: #333333; }
.sday:has(.today) .swd { color: #22365C; font-weight: 700; }
/* メニュー一覧 */
.wk.now { background: #EAEFF6; border: 2px solid #22365C; }
.wk.future { background: #fff; border-color: #D9E0EB; color: #5E6A80; opacity: 1; }
.wk.past { background: #E9EDF3; border-color: #E9EDF3; color: #8A91A0; }
/* 相談の選び先（シートは白） */
#choices > .pickhead { color: #22365C; }
button.opt { background: #fff; border-color: #D9E0EB; }
button.opt.strong { border: 3px solid #22365C; font-weight: 700; }
#choices button.back.close { background: #fff; border: 2px solid #22365C; color: #22365C; font-weight: 700; }
/* チェックの流れ（質問カード・選択肢・決定・1つ前に戻る） */
.bubble.q { background: #FDF1CF; border-color: #FDF1CF; color: #333333; }
button.opt .num { background: #EAEFF6; color: #22365C; }
button.opt[aria-pressed=true] { background: #EAEFF6; border-color: #22365C; position: relative; padding-right: 40px; }
button.opt[aria-pressed=true]::before { content: none; }
button.opt[aria-pressed=true]::after { content: "✓"; position: absolute; right: 14px; color: #3B5B92; font-weight: 800; }
button.opt[aria-pressed=true] .num { background: #22365C; color: #fff; }
#choices button.primary { background: #22365C; border-color: #22365C; }
#choices button.primary:disabled { background: #DFE4EC; border-color: #DFE4EC; color: #9AA1AE; opacity: 1; }
#choices button.back:not(.close) { background: none; border: none; color: #22365C; text-decoration: underline; }
/* メニューカード */
.card { border-color: #D9E0EB; padding: 0 14px 10px; overflow: hidden; }
.card .cap { background: #22365C; color: #fff; margin: 0 -14px 8px; padding: 8px 14px; }
.crow { border-top-color: #D9E0EB; }
.cfirst { flex: 0 0 auto; margin-left: 38px; background: #FDF1CF; color: #7A5C3E; border-radius: 6px; padding: 0 8px; }
.gtag { display: inline-block; margin-top: 2px; background: #FDF1CF; color: #7A5C3E; border-radius: 6px; padding: 0 8px; }
/* 下のボタン */
#actions.main .five button.nb.on { background: #22365C; color: #fff; }

/* ── メニュー一覧の「動画で見返す」（2026-11-27 ふわ案・本人OK） ── */
.vlist { margin: 12px 0 4px; }
.vlcap { font-size: 15px; font-weight: 800; color: #22365C; margin: 0 0 6px; }
details.vitem { background: #fff; border: 1px solid #D9E0EB; border-radius: 12px; margin: 6px 0; }
details.vitem > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; line-height: 1.5; color: #333333; }
details.vitem > summary::-webkit-details-marker { display: none; }
.vplay { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #EAEFF6; color: #22365C; display: grid; place-items: center; font-size: 12px; }
.vname { flex: 1 1 auto; min-width: 0; }
.vopen { flex: 0 0 auto; font-size: 14px; font-weight: 400; color: #5E6A80; }
.vopen::after { content: "開く ›"; }
details.vitem[open] .vopen::after { content: "閉じる ‹"; }
.vbody { padding: 0 12px 10px; font-size: 15px; }
.vbody p { margin: 0 0 6px; }
/* 動画ライブラリへの入口（メニュー一覧の一番上。URLが決まるまで出ない） */
a.libcard { display: block; background: #22365C; color: #fff; font-weight: 800; text-decoration: none; border-radius: 14px; padding: 14px 16px; margin: 6px 0 14px; }
