:root {
  color-scheme: light;
  --bg0: #CBD6E2; --bg1: #D9D1E2; --bg2: #EFE9F3; --bg3: #F8F6FB;
  --glow-a: rgba(150, 232, 232, .55); --glow-b: rgba(255, 196, 180, .45);
  --surface: rgba(255, 255, 255, .72); --surface-solid: #FAF8FE; --surface-2: rgba(232, 229, 246, .8); --line: rgba(120, 112, 180, .16);
  --ink: #36345A; --ink-2: #625F86; --ink-3: #7A7799;
  --accent: #6560C4; --accent-2: #4F78C4; --accent-soft: #E6E3FA; --accent-ink: #4F4AA8; --on-accent: #fff;
  --danger: #B0432F; --danger-soft: #FDE6E0; --warn: #85600F; --warn-soft: #FBF0D3; --good: #24796A; --good-soft: #D9F4EE;
  --band: rgba(141, 133, 220, .2); --grid: rgba(110, 105, 170, .14);
  --t-lav: #E7E3FB; --t-ice: #DCEBFA; --t-aqua: #D8F3F1; --t-peach: #FFE6DD; --t-pearl: #F4F2FA;
  --bar-shadow: 0 10px 30px rgba(92, 86, 170, .22);
  --clay: inset 0 2px 3px rgba(255,255,255,.95), inset 0 -8px 14px rgba(134, 126, 205, .13), 0 8px 18px rgba(92, 86, 170, .13);
  --clay-sm: inset 0 1px 2px rgba(255,255,255,.95), inset 0 -4px 8px rgba(134, 126, 205, .1), 0 4px 10px rgba(92, 86, 170, .12);
  --press: inset 0 3px 8px rgba(92, 86, 170, .2);
  --blur-bg: rgba(226, 224, 240, .66);
}
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) {
  color-scheme: dark;
  --bg0: #141430; --bg1: #1B1838; --bg2: #1A1933; --bg3: #15152B;
  --glow-a: rgba(70, 170, 190, .2); --glow-b: rgba(226, 130, 130, .14);
  --surface: rgba(255, 255, 255, .075); --surface-solid: #25244A; --surface-2: rgba(255, 255, 255, .1); --line: rgba(200, 196, 255, .14);
  --ink: #EEECFB; --ink-2: #C3C0E0; --ink-3: #A29FC4;
  --accent: #B2ABF7; --accent-2: #9CC4F4; --accent-soft: #38356F; --accent-ink: #CFCAFF; --on-accent: #1A1838;
  --danger: #F7A28E; --danger-soft: #4A2A2C; --warn: #EBCB7C; --warn-soft: #443A1F; --good: #85DDC8; --good-soft: #1D4140;
  --band: rgba(178, 171, 247, .18); --grid: rgba(200, 196, 255, .1);
  --t-lav: #35326A; --t-ice: #2B3A66; --t-aqua: #234750; --t-peach: #4C3343; --t-pearl: #2F2E52;
  --bar-shadow: 0 10px 30px rgba(0,0,0,.35);
  --clay: inset 0 1px 1px rgba(255,255,255,.14), inset 0 -8px 14px rgba(0,0,0,.16), 0 8px 18px rgba(0,0,0,.25);
  --clay-sm: inset 0 1px 1px rgba(255,255,255,.14), inset 0 -4px 8px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.22);
  --press: inset 0 3px 8px rgba(0,0,0,.4);
  --blur-bg: rgba(28, 26, 58, .72);
}}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg0: #141430; --bg1: #1B1838; --bg2: #1A1933; --bg3: #15152B;
  --glow-a: rgba(70, 170, 190, .2); --glow-b: rgba(226, 130, 130, .14);
  --surface: rgba(255, 255, 255, .075); --surface-solid: #25244A; --surface-2: rgba(255, 255, 255, .1); --line: rgba(200, 196, 255, .14);
  --ink: #EEECFB; --ink-2: #C3C0E0; --ink-3: #A29FC4;
  --accent: #B2ABF7; --accent-2: #9CC4F4; --accent-soft: #38356F; --accent-ink: #CFCAFF; --on-accent: #1A1838;
  --danger: #F7A28E; --danger-soft: #4A2A2C; --warn: #EBCB7C; --warn-soft: #443A1F; --good: #85DDC8; --good-soft: #1D4140;
  --band: rgba(178, 171, 247, .18); --grid: rgba(200, 196, 255, .1);
  --t-lav: #35326A; --t-ice: #2B3A66; --t-aqua: #234750; --t-peach: #4C3343; --t-pearl: #2F2E52;
  --bar-shadow: 0 10px 30px rgba(0,0,0,.35);
  --clay: inset 0 1px 1px rgba(255,255,255,.14), inset 0 -8px 14px rgba(0,0,0,.16), 0 8px 18px rgba(0,0,0,.25);
  --clay-sm: inset 0 1px 1px rgba(255,255,255,.14), inset 0 -4px 8px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.22);
  --press: inset 0 3px 8px rgba(0,0,0,.4);
  --blur-bg: rgba(28, 26, 58, .72);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg2); }
body {
  margin: 0; color: var(--ink);
  font-family: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "BIZ UDGothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px; line-height: 1.55; overscroll-behavior-y: none;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 34% at 8% 74%, var(--glow-a), transparent 72%),
    radial-gradient(52% 28% at 96% 18%, var(--glow-b), transparent 72%),
    linear-gradient(165deg, var(--bg0) 0%, var(--bg1) 36%, var(--bg2) 68%, var(--bg3) 100%);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.ic { display: block; flex: none; overflow: visible; }
.loading { padding: 40vh 0; text-align: center; color: var(--ink-2); }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.num, .sum b, .hero-v, .el .v { font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", sans-serif; }

/* ヘッダー */
.top { position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top); background: var(--blur-bg); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
.top-in { max-width: 560px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.top h1 { font-size: 19px; line-height: 1.3; letter-spacing: .02em; }
.top .age { font-size: 12.5px; color: var(--ink-2); }
.top .grow { flex: 1; min-width: 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--clay-sm); display: grid; place-items: center; }
.icon-btn:active { box-shadow: var(--press); }
.demo { color: var(--warn); font-size: 11.5px; padding: 0 16px 6px; text-align: center; }

/* 下のタブ（浮いているバー） */
.tabs { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 6; }
.tabs-in { max-width: 536px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px; border-radius: 26px; background: var(--blur-bg); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); box-shadow: var(--bar-shadow), inset 0 1px 1px rgba(255,255,255,.55); }
.tab { border: 0; background: none; padding: 5px 0 4px; min-height: 56px; border-radius: 21px; font-size: 10.5px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.tab .i { filter: saturate(.6) opacity(.8); transition: transform .15s; }
.tab[aria-current="page"] { color: var(--accent-ink); font-weight: 700; background: var(--surface); box-shadow: var(--clay-sm); }
.tab[aria-current="page"] .i { filter: none; transform: translateY(-1px) scale(1.06); }

/* カード */
.card { background: var(--surface); border-radius: 24px; padding: 14px 16px; box-shadow: var(--clay); margin-bottom: 14px; }
.section-title { font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin: 22px 4px 9px; display: flex; justify-content: space-between; align-items: center; gap: 8px; letter-spacing: .03em; }
.section-title:first-child { margin-top: 8px; }
.link { background: none; border: 0; color: var(--accent-ink); font-size: 13px; padding: 6px 0; font-weight: 700; }
.muted { color: var(--ink-2); font-size: 13px; }
.empty { color: var(--ink-2); font-size: 14px; text-align: center; padding: 22px 8px; }

/* ホームの主役 */
.hero { display: flex; align-items: center; gap: 12px; padding: 12px 0 14px; }
.orb { position: relative; width: 122px; height: 122px; flex: none; display: grid; place-items: center; }
.orb::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle at 26% 62%, rgba(255, 176, 156, .7), transparent 46%), radial-gradient(circle at 74% 34%, rgba(150, 226, 240, .75), transparent 50%); filter: blur(10px); animation: breathe 5s ease-in-out infinite; }
.orb::after { content: ""; position: absolute; left: -2px; right: -2px; top: 42%; height: 34%; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); transform: rotate(-12deg); box-shadow: 0 0 10px rgba(180, 170, 255, .6); pointer-events: none; }
.mascot { position: relative; z-index: 1; width: 128px; height: 128px; max-width: none; display: block; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(100, 96, 190, .28)); -webkit-user-select: none; user-select: none; }
.zzz { position: absolute; z-index: 2; right: 2px; top: 4px; color: var(--accent-ink); font-weight: 700; font-size: 20px; line-height: 1; }
.zzz small { font-size: 14px; position: relative; top: -10px; margin-left: 1px; }
@keyframes breathe { 50% { opacity: .65; transform: scale(1.06); } }
@keyframes float { 50% { transform: translateY(-4px); } }
.hero-t { min-width: 0; flex: 1; }
.hero-l { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hero-v { font-size: 40px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.hero-v small { font-size: 14px; font-weight: 400; margin: 0 2px; letter-spacing: 0; font-family: "Hiragino Maru Gothic ProN", sans-serif; }
.hero-s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }

/* 授乳ボタン */
.feed-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.q.feed { flex-direction: row; gap: 8px; min-height: 76px; font-size: 17px; padding: 8px; }

/* 前回からの時間＋記録ボタン */
.st-list { display: grid; gap: 10px; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; }
.st { display: flex; align-items: center; gap: 10px; min-width: 0; background: var(--surface); border-radius: 22px; padding: 10px 14px 10px 12px; box-shadow: var(--clay-sm); }
.st.active { background: var(--t-lav); }
.st-t { flex: 1; min-width: 0; }
.st .l { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .v { flex: none; font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", sans-serif; font-size: 21px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st .v small { font-size: 11px; font-weight: 400; margin: 0 1px; font-family: "Hiragino Maru Gothic ProN", sans-serif; }
.q.st-btn { min-height: 72px; padding: 6px 2px; font-size: 11.5px; border-radius: 22px; }

/* 記録ボタン */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.q { border: 0; border-radius: 24px; padding: 10px 2px 8px; min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink); box-shadow: var(--clay); transition: transform .1s, box-shadow .1s; }
.q .ic { filter: drop-shadow(0 3px 4px rgba(92, 86, 170, .28)); }
.q:active { transform: scale(.95); box-shadow: var(--press); }
.c-lav { background: linear-gradient(160deg, var(--surface-solid), var(--t-lav) 75%); }
.c-ice { background: linear-gradient(160deg, var(--surface-solid), var(--t-ice) 75%); }
.c-aqua { background: linear-gradient(160deg, var(--surface-solid), var(--t-aqua) 75%); }
.c-peach { background: linear-gradient(160deg, var(--surface-solid), var(--t-peach) 75%); }
.c-pearl { background: linear-gradient(160deg, var(--surface-solid), var(--t-pearl) 75%); }

/* 今日のまとめ */
.sum { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; padding-left: 6px; padding-right: 6px; }
.sum > div + div { border-left: 1px solid var(--line); }
.sum b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.sum b small { font-size: 10.5px; font-weight: 400; }
.sum span { font-size: 10.5px; color: var(--ink-2); }

/* タイムライン */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li + li { border-top: 1px solid var(--line); }
.tl-row { width: 100%; background: none; border: 0; text-align: left; display: flex; gap: 10px; align-items: center; padding: 9px 0; min-height: 54px; }
.tl-time { width: 42px; flex: none; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--clay-sm); }
.tl-main { flex: 1; min-width: 0; }
.tl-main b { font-size: 14.5px; }
.tl-main p { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.tl-by { font-size: 10.5px; color: var(--ink-3); flex: none; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-photo { width: 44px; height: 44px; object-fit: cover; border-radius: 12px; flex: none; background: var(--surface-2); }
.day-nav { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 12px; gap: 8px; }
.day-nav button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--clay-sm); font-size: 13px; color: var(--accent-ink); }
.day-nav button:disabled { opacity: .35; }
.day-nav label { font-weight: 700; font-size: 16px; text-align: center; flex: 1; position: relative; }
.day-nav input { position: absolute; inset: 0; opacity: 0; width: 100%; }

/* ラベル */
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; box-shadow: inset 0 1px 1px rgba(255,255,255,.5); flex: none; }
.p-done { background: var(--good-soft); color: var(--good); } .p-now { background: var(--accent-soft); color: var(--accent-ink); }
.p-soon { background: var(--warn-soft); color: var(--warn); } .p-appt { background: var(--t-peach); color: var(--ink); }
.p-late { background: var(--danger-soft); color: var(--danger); } .p-later, .p-skip { background: var(--surface-2); color: var(--ink-2); }
.seg { display: flex; gap: 7px; overflow-x: auto; padding: 3px 2px 12px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: var(--surface); box-shadow: var(--clay-sm); padding: 8px 15px; min-height: 40px; border-radius: 99px; font-size: 13px; white-space: nowrap; color: var(--ink-2); flex: none; }
.seg button[aria-pressed="true"] { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-weight: 700; box-shadow: inset 0 1px 2px rgba(255,255,255,.4), 0 5px 12px rgba(92, 86, 170, .32); }

/* カレンダー */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: 16px; letter-spacing: .03em; }
.cal-head button { width: 44px; height: 40px; border: 0; background: var(--surface); box-shadow: var(--clay-sm); border-radius: 14px; font-size: 13px; color: var(--accent-ink); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal .w { text-align: center; font-size: 11px; color: var(--ink-2); padding-bottom: 2px; }
.cal .w.sun, .day.sun .n { color: var(--danger); } .cal .w.sat, .day.sat .n { color: var(--accent-ink); }
.day { border: 0; background: none; min-height: 50px; border-radius: 14px; padding: 3px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.day .n { font-size: 13.5px; width: 26px; height: 26px; line-height: 26px; border-radius: 50%; font-variant-numeric: tabular-nums; }
.day.today .n { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-weight: 700; box-shadow: 0 0 12px rgba(120, 110, 230, .6); }
.day.sel { background: var(--surface); box-shadow: var(--clay-sm); }
.day.birth .n { box-shadow: 0 0 0 2px #FFB9A8; }
.dots { display: flex; gap: 2px; height: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.vaccine { background: #7B72E0; } .dot.ck { background: #EF9180; } .dot.custom { background: #4FB7C4; }
.dot.done { background: #39A98F; } .dot.start { background: none; border: 1.5px solid var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.sched-row { width: 100%; background: none; border: 0; text-align: left; padding: 10px 0; display: flex; align-items: center; gap: 10px; min-height: 54px; }
.sched-row + .sched-row { border-top: 1px solid var(--line); }
.sched-row .t { flex: 1; min-width: 0; }
.sched-row b { font-size: 14.5px; }
.sched-row small { display: block; font-size: 12px; color: var(--ink-2); }
.tag { font-size: 10.5px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; margin-left: 4px; font-weight: 400; vertical-align: 1px; }
.notice { font-size: 12px; color: var(--ink-2); padding: 2px 4px; }

/* グラフ */
.chart svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.chart-read { font-size: 13px; min-height: 21px; color: var(--ink); }
.chart-title { font-weight: 700; font-size: 14.5px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tx { fill: var(--ink-2); font-size: 11px; font-family: inherit; }
.gl { stroke: var(--grid); stroke-width: 1; }
.band { fill: var(--band); }
.mid { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }
.line { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.pt { fill: var(--accent); stroke: var(--surface-solid); stroke-width: 2; }
.pt-sm { stroke: none; }
.bar { fill: url(#gBar); }
.pv { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: inherit; paint-order: stroke; stroke: var(--surface-solid); stroke-width: 3px; }
.period-seg button { flex: 1; padding-left: 6px; padding-right: 6px; }
.period-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.period-nav b { font-size: 14px; font-variant-numeric: tabular-nums; }
.period-nav button { width: 44px; height: 40px; border: 0; background: var(--surface); box-shadow: var(--clay-sm); border-radius: 14px; font-size: 13px; color: var(--accent-ink); }
.period-nav button:disabled { opacity: .35; }
.hit { fill: transparent; cursor: pointer; }
details summary { font-size: 13px; color: var(--accent-ink); font-weight: 700; padding: 8px 0 2px; cursor: pointer; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th { color: var(--ink-2); font-weight: 400; text-align: right; padding: 4px 4px; }
table.t td { text-align: right; padding: 7px 4px; border-top: 1px solid var(--line); }
table.t th:first-child, table.t td:first-child { text-align: left; }
tr[data-action] { cursor: pointer; }

/* 日記 */
.diary { display: grid; gap: 14px; }
.d-card { width: 100%; border: 0; background: var(--surface); border-radius: 24px; overflow: hidden; box-shadow: var(--clay); padding: 0; text-align: left; display: block; }
.d-card img { width: 100%; display: block; max-height: 360px; object-fit: cover; background: var(--surface-2); min-height: 120px; }
.d-card .b { padding: 11px 16px 13px; }
.d-card time { font-size: 12px; color: var(--ink-2); }
.d-card p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }

/* ボタン */
.btn { border: 0; border-radius: 18px; min-height: 52px; padding: 10px 18px; font-weight: 700; width: 100%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); box-shadow: inset 0 1px 2px rgba(255,255,255,.4), inset 0 -4px 8px rgba(40, 30, 110, .16), 0 8px 16px rgba(92, 86, 170, .3); }
.btn:active { transform: scale(.98); }
.btn.sub { background: var(--surface); color: var(--ink); box-shadow: var(--clay-sm); }
.btn.danger { background: none; color: var(--danger); min-height: 44px; font-weight: 400; font-size: 14px; box-shadow: none; }
.fab { position: fixed; right: max(16px, calc(50% - 264px)); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 5; border: 0; border-radius: 99px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); padding: 12px 18px; min-height: 48px; font-weight: 700; box-shadow: 0 8px 18px rgba(92, 86, 170, .4), inset 0 1px 2px rgba(255,255,255,.4); }

/* 入力シート */
.overlay { position: fixed; inset: 0; background: rgba(40, 36, 90, .32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--surface-solid); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 30px 30px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .22s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 -10px 40px rgba(60, 54, 140, .25), inset 0 1px 2px rgba(255,255,255,.5); }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(28px); } }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-head h2 { flex: 1; font-size: 18px; }
.sheet-head .x { width: 44px; height: 44px; border: 0; background: var(--surface-2); border-radius: 50%; font-size: 15px; box-shadow: var(--clay-sm); }
.f { margin-bottom: 14px; display: block; }
.f > .lab, .lab { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.lab .opt { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], textarea, select {
  width: 100%; background: var(--surface-2); border: 0; border-radius: 16px; padding: 10px 14px; min-height: 48px; font-size: 16px; -webkit-appearance: none; appearance: none; box-shadow: inset 0 2px 5px rgba(92, 86, 170, .14), inset 0 -1px 1px rgba(255,255,255,.5);
}
textarea { min-height: 84px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: block; padding: 8px 15px; min-height: 40px; border-radius: 99px; background: var(--surface); font-size: 14px; cursor: pointer; box-shadow: var(--clay-sm); }
.chip input:checked + span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-weight: 700; box-shadow: inset 0 1px 2px rgba(255,255,255,.4), 0 4px 10px rgba(92, 86, 170, .3); }
.role-chips .chip { flex: 1; }
.role-chips .chip span { text-align: center; padding: 11px 15px; min-height: 46px; font-size: 16px; }
.color-chip span { display: flex; align-items: center; gap: 7px; padding-left: 10px; }
.swatch { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 2px 3px rgba(255,255,255,.45), inset 0 -2px 3px rgba(0,0,0,.14), 0 0 0 1.5px rgba(255,255,255,.75), 0 1px 3px rgba(50,45,110,.3); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; min-width: 0; }
.amount { display: flex; align-items: center; gap: 8px; }
.amount input { text-align: center; font-size: 24px; font-weight: 700; }
.amount .u { flex: none; color: var(--ink-2); }
.hint { background: var(--warn-soft); color: var(--warn); font-size: 13px; border-radius: 14px; padding: 9px 13px; margin-bottom: 14px; }
.hint.info { background: var(--accent-soft); color: var(--accent-ink); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.photo-prev { width: 100%; max-height: 240px; object-fit: cover; border-radius: 16px; display: block; margin-bottom: 8px; }
.file-btn { display: block; text-align: center; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--clay-sm); font-size: 14px; color: var(--ink-2); cursor: pointer; }
.file-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.btn-row { display: flex; gap: 10px; margin-top: 4px; }
.err { color: var(--danger); font-size: 13.5px; margin-bottom: 10px; }

/* トースト */
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(148px + env(safe-area-inset-bottom)); background: rgba(40, 38, 84, .92); color: #fff; border-radius: 16px; padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 10px; z-index: 30; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(30, 26, 90, .35); white-space: nowrap; }
#toast[hidden] { display: none; }
#toast button { background: none; border: 0; color: #CFCAFF; font-weight: 700; min-height: 36px; padding: 0 10px; }

/* 最初の画面 */
.gate { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 440px; margin: 0 auto; }
.gate h1 { font-size: 25px; text-align: center; letter-spacing: .04em; }
.gate .lead { text-align: center; color: var(--ink-2); font-size: 14px; margin: 6px 0 22px; }
.gate .logo { width: 88px; height: 88px; border-radius: 26px; display: block; margin: 0 auto 12px; box-shadow: var(--clay); }
.alt { text-align: center; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .overlay, .sheet, .mascot, .orb::before { animation: none; } }
