/* うちのこ手帳 — 肉球・まるい。あんず×チョコ×白、ぷにっと弾む */
:root {
  --milk: #ffffff;
  --bun: #fff6ee;
  --apricot: #f6a165;
  --apricot-2: #f8b989;
  --apricot-soft: #fde6d3;
  --apricot-ink: #a3501a;
  --choco: #4a2c1e;
  --choco-2: #73503f;
  --choco-3: #86665a;
  --leaf: #23684b;
  --leaf-soft: #e1f2e9;
  --berry: #b3372d;
  --berry-soft: #fdeceb;
  --line: #f1e1d4;
  --f-jp: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --f-num: "Fredoka", "Zen Maru Gothic", sans-serif;
  --r-l: 32px;
  --r-m: 22px;
  --r-s: 14px;
  --sh: 0 6px 18px rgba(122, 70, 40, .10), 0 1px 3px rgba(122, 70, 40, .08);
  --boing: cubic-bezier(.3, 1.5, .5, 1);
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--milk); color: var(--choco);
  font: 500 15px/1.7 var(--f-jp);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  line-break: strict; overflow: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, button, .btn, .tb-l, .bub-l, .bub-s, .pf-n, .pf-m, .eyebrow, .cc-n, .empty-t, .ob-t, .sh-t, .row-t b, .vd-t, .whero-t, .tl-n, .chip { font-feature-settings: "palt"; word-break: keep-all; overflow-wrap: normal; }
p.soft, p.fine, .ob-d, .sh-d, .vc-m, .memo p, .row-t small, .ab-note, .empty-d { word-break: normal; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.nb { white-space: nowrap; }
.i { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; }
.i.sm { width: 20px; height: 20px; }
.i.xs { width: 15px; height: 15px; }
:focus-visible { outline: 3px solid var(--apricot); outline-offset: 2px; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--apricot-ink); }

/* ---------- 枠 ---------- */
.app { position: relative; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; margin: 0 auto; background: var(--milk); }
@media (min-width: 600px) {
  body { background: var(--apricot-soft) radial-gradient(circle at 20px 20px, rgba(246, 161, 101, .35) 0 6px, transparent 7px) 0 0 / 56px 56px; }
  .app, .splash, .onboard { max-width: 430px; left: 0; right: 0; margin: 0 auto; }
  .app { box-shadow: 0 30px 80px rgba(122, 70, 40, .25); }
}
.views { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--milk); z-index: 1; overflow: hidden; }
.view.leaving { pointer-events: none; z-index: 0; }
.scroller { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 18px 28px; }

/* ---------- タブ（浮かぶまるいバー） ---------- */
.tabs {
  flex: none; position: relative; z-index: 6;
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 0 12px calc(10px + var(--sb)); padding: 6px;
  background: var(--milk); border-radius: 30px; box-shadow: 0 8px 26px rgba(122, 70, 40, .18), 0 0 0 1px var(--line);
}
.deep .tabs { display: none; }
.tb { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 58px; justify-content: center; border-radius: 24px; color: var(--choco-2); }
.tb-i { position: relative; display: grid; place-items: center; width: 52px; height: 32px; border-radius: 16px; transition: background .25s, transform .3s var(--boing); }
.tb-l { font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.tb.on { color: var(--choco); }
.tb.on .tb-i { background: var(--apricot); transform: scale(1.06); }
.tb:active .tb-i { transform: scale(.88); }
.dot { position: absolute; top: 2px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--berry); box-shadow: 0 0 0 2px var(--milk); }

/* ---------- 指球（ペット切替） ---------- */
.top { flex: none; position: relative; display: flex; align-items: flex-start; justify-content: center; padding: calc(10px + var(--st)) 50px 8px; background: var(--milk); z-index: 2; }
.beans { display: flex; gap: 10px; align-items: flex-start; }
.bean { --y: 0px; display: flex; flex-direction: column; align-items: center; gap: 9px; transform: translateY(var(--y)); transition: transform .3s var(--boing); }
.beans[data-n="5"] { gap: 6px; }
.beans[data-n="5"] .bean img, .beans[data-n="5"] .bean.add .i { width: 48px; height: 48px; }
.beans[data-n="5"] .bean.add .i { padding: 12px; }
.bean img, .bean.add .i { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 3px var(--milk), 0 0 0 5px var(--line); transition: box-shadow .2s, transform .3s var(--boing); }
.bean.add .i { padding: 16px; background: var(--bun); color: var(--apricot-ink); border: 2px dashed var(--apricot-2); box-shadow: none; }
.bean-n { font-size: 13px; font-weight: 700; color: var(--choco-2); line-height: 1.3; }
.bean[aria-selected="true"] img { box-shadow: 0 0 0 3px var(--milk), 0 0 0 6px var(--apricot); transform: scale(1.08); }
.bean[aria-selected="true"] .bean-n { color: var(--choco); }
.bean:active img { transform: scale(.9); }
.gear { position: absolute; right: 10px; top: calc(10px + var(--st)); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--choco-2); }
.gear:active { background: var(--bun); }
.walking-pill { flex: none; position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; margin: 2px 18px 4px; padding: 0 14px; border-radius: 20px; background: var(--choco); color: var(--milk); font-size: 13px; font-weight: 700; }
.walking-pill:active { transform: scale(.97); }
.walking-pill b { font: 600 15px var(--f-num); }

/* ---------- うちのこ ---------- */
.pad {
  margin: 12px 0 0; padding: 20px 18px 22px; text-align: center;
  background: var(--apricot-soft);
  border-radius: 46% 46% 40px 40px / 30% 30% 40px 40px;
  touch-action: pan-y;
}
.pf-ph { width: 148px; height: 148px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 6px var(--milk), var(--sh); }
.pf-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-n { font: 900 32px/1.25 var(--f-jp); letter-spacing: .04em; }
.pf-m { font-size: 15px; color: var(--choco-2); font-weight: 700; }
.pf-bd { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 2px 12px; border-radius: 14px; background: var(--milk); font-size: 13px; font-weight: 700; color: var(--apricot-ink); }
.bubs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.bub {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px 6px 12px; border-radius: var(--r-m); background: var(--milk); box-shadow: var(--sh), 0 0 0 1px var(--line);
  transition: transform .3s var(--boing);
}
.bub:active { transform: scale(.94); }
.bub-l { font-size: 12.5px; font-weight: 700; color: var(--choco-2); line-height: 1.4; }
.bub-v { font: 600 30px/1.15 var(--f-num); margin: 2px 0; }
.bub-v small { font-size: 14px; margin-left: 1px; font-family: var(--f-jp); font-weight: 700; }
.bub-v.late { color: var(--berry); }
.bub-s { font-size: 12.5px; font-weight: 700; line-height: 1.35; padding: 1px 8px; border-radius: 10px; }
.bub-s.ok { background: var(--leaf-soft); color: var(--leaf); }
.bub-s.warn { background: var(--berry-soft); color: var(--berry); }
.bub-d { margin-top: 3px; font-size: 12px; color: var(--choco-2); line-height: 1.3; }
.bub.ring { justify-content: space-between; }
.bub.ring svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.rg-bg { fill: none; stroke: var(--apricot-soft); stroke-width: 9; }
.rg-v { fill: none; stroke: var(--apricot); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .8s var(--boing); }
.ring-in { position: absolute; top: 12px; left: 0; right: 0; height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring-in b { font: 600 22px var(--f-num); }
.ring-in small { font-size: 12px; font-weight: 700; color: var(--choco-2); }
.sec { margin-top: 24px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 10px; }
.sec .sec-h { margin-top: 0; }
.sec-h h2 { font-size: 18px; font-weight: 900; }
.more { display: inline-flex; align-items: center; gap: 3px; min-height: 40px; padding: 0 4px; font-size: 14px; font-weight: 700; color: var(--apricot-ink); }
.more.muted { color: var(--choco-2); }
.tline { position: relative; display: grid; gap: 8px; }
.tline li { display: grid; grid-template-columns: 82px 18px 1fr; align-items: center; }
.tl-d { font: 600 14px var(--f-num); color: var(--choco-2); white-space: nowrap; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--apricot-2); justify-self: center; }
.tline li.soon .tl-dot { background: var(--apricot); box-shadow: 0 0 0 4px var(--apricot-soft); }
.tline li.late .tl-dot { background: var(--berry); box-shadow: 0 0 0 4px var(--berry-soft); }
.tl-c { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-s); background: var(--bun); }
.tl-c .i { color: var(--apricot-ink); }
.tl-n { flex: 1; font-size: 14px; font-weight: 700; line-height: 1.4; }
.tl-l { font-size: 13px; font-weight: 700; white-space: nowrap; }
.tl-l b { font: 600 17px var(--f-num); margin: 0 1px; }
.late .tl-l { color: var(--berry); }
.soft { padding: 14px; border-radius: var(--r-s); background: var(--bun); font-size: 14px; color: var(--choco-2); }
.vcard { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 10px; border-radius: var(--r-m); background: var(--milk); box-shadow: var(--sh), 0 0 0 1px var(--line); transition: transform .3s var(--boing); }
.vcard:active { transform: scale(.97); }
.vcard img, .vc-ic { flex: none; width: 76px; height: 76px; border-radius: 18px; object-fit: cover; }
.vc-ic { display: grid; place-items: center; background: var(--apricot-soft); color: var(--apricot-ink); }
.vc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vc-d { font-size: 12.5px; font-weight: 700; color: var(--choco-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-t b { font-size: 15px; line-height: 1.45; }
.vc-m { font-size: 13px; color: var(--choco-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.vcard > .i { color: var(--choco-3); }
.vlist { display: grid; gap: 8px; }

/* ---------- 体重 ---------- */
.wh { display: flex; align-items: flex-end; justify-content: space-between; margin: 14px 0 12px; }
.wh-v { font: 600 54px/1.05 var(--f-num); letter-spacing: -.01em; }
.wh-v small { font-size: 20px; margin-left: 4px; }
.wh-v.none { font: 900 30px/1.3 var(--f-jp); color: var(--choco-2); }
.wh-s { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--choco-2); }
.chip { padding: 2px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; }
.chip.ok { background: var(--leaf-soft); color: var(--leaf); }
.chip.warn { background: var(--berry-soft); color: var(--berry); }
.fab { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: var(--apricot); color: var(--choco); box-shadow: 0 8px 20px rgba(246, 161, 101, .5); transition: transform .3s var(--boing); }
.fab:active { transform: scale(.88); }
.fab .i { width: 30px; height: 30px; }
.chart-card { padding: 12px 10px 12px; border-radius: var(--r-l); background: var(--milk); box-shadow: var(--sh), 0 0 0 1px var(--line); }
.seg { display: flex; gap: 4px; padding: 4px; margin: 0 4px 6px; border-radius: 20px; background: var(--bun); }
.seg button { flex: 1; min-height: 38px; border-radius: 16px; font-size: 14px; font-weight: 700; color: var(--choco-2); }
.seg [aria-selected="true"] { background: var(--milk); color: var(--choco); box-shadow: 0 2px 6px rgba(122, 70, 40, .15); }
.wchart { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: crosshair; }
.wchart .g { stroke: #f3e6dc; stroke-width: 1; }
.wchart .yl { font: 500 11px var(--f-num); fill: var(--choco-3); color: var(--choco-3); text-anchor: end; }
.wchart .xl { font: 700 11px var(--f-jp); fill: var(--choco-3); color: var(--choco-3); text-anchor: middle; }
.wchart .band { fill: var(--leaf-soft); stroke: #9fd1b8; stroke-width: 1.2; stroke-dasharray: 4 3; }
.wchart .bl { font: 700 11px var(--f-jp); fill: var(--leaf); color: var(--leaf); text-anchor: start; }
.wchart .ln { fill: none; stroke: #e5843f; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wchart .pt { fill: var(--milk); stroke: #e5843f; stroke-width: 2.4; }
.wchart .pt.out { stroke: var(--berry); }
.wchart .pt.last { fill: var(--choco); stroke: var(--milk); stroke-width: 3; }
.wchart .sl { stroke: var(--choco); stroke-width: 1.4; stroke-dasharray: 3 3; }
.wchart .sc { fill: var(--apricot); stroke: var(--milk); stroke-width: 3; }
.readout { margin: 4px 8px 0; min-height: 1.7em; font-size: 13px; font-weight: 700; color: var(--choco-2); text-align: center; }
.readout b { color: var(--choco); }
.wlist { display: grid; gap: 6px; }
.wrow { width: 100%; display: grid; grid-template-columns: 1fr auto 96px; align-items: center; gap: 10px; min-height: 54px; padding: 0 14px; border-radius: var(--r-s); background: var(--bun); text-align: left; transition: transform .25s var(--boing); }
.wrow:active { transform: scale(.97); }
.wr-d { font: 600 14px var(--f-num); color: var(--choco-2); }
.wr-v { font: 600 20px var(--f-num); }
.wr-v small { font-size: 12px; margin-left: 2px; }
.wr-v.out { color: var(--berry); }
.wr-df { font: 600 13px var(--f-num); color: var(--choco-2); text-align: right; white-space: nowrap; }
.wr-df.up { color: var(--apricot-ink); }
.wr-df.down { color: var(--leaf); }
.fine { margin-top: 16px; font-size: 13px; color: var(--choco-2); }

/* ---------- 予防・通院 ---------- */
.h1 { margin: 12px 0 4px; font-size: 24px; font-weight: 900; }
.late-note { display: flex; align-items: center; gap: 6px; margin: 8px 0; padding: 10px 14px; border-radius: var(--r-s); background: var(--berry-soft); color: var(--berry); font-weight: 700; font-size: 14px; }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 10px 12px; border-radius: var(--r-m); background: var(--milk); box-shadow: var(--sh), 0 0 0 1px var(--line); overflow: hidden; }
.cc.soon { box-shadow: var(--sh), 0 0 0 2px var(--apricot-2); }
.cc.late { background: var(--berry-soft); box-shadow: 0 0 0 2px #f1b9b4; }
.cc-g { position: relative; width: 78px; height: 78px; }
.cc-g svg { width: 78px; height: 78px; transform: rotate(-90deg); }
.g-bg { fill: none; stroke: var(--bun); stroke-width: 8; }
.g-v { fill: none; stroke: var(--apricot); stroke-width: 8; stroke-linecap: round; }
.cc.late .g-bg { stroke: #f6d2cf; }
.cc-l { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.cc-l b { font: 600 22px/1.05 var(--f-num); }
.cc.late .cc-l { color: var(--berry); }
.cc-n { margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.cc-d { font-size: 12.5px; font-weight: 700; color: var(--choco-2); }
.cc-b { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 2px solid var(--apricot-2); color: var(--apricot-ink); font-size: 13px; font-weight: 700; transition: transform .25s var(--boing); }
.cc-b:active { transform: scale(.92); background: var(--apricot-soft); }
.cc.stamped::after { content: ""; position: absolute; left: 50%; top: 36px; width: 70px; height: 70px; margin-left: -35px; background: var(--apricot); opacity: .9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12.2c-3 0-5.6 2.7-5.6 5.4 0 1.7 1.3 2.6 2.7 2.6 1.1 0 1.9-.6 2.9-.6s1.8.6 2.9.6c1.4 0 2.7-.9 2.7-2.6 0-2.7-2.6-5.4-5.6-5.4z'/%3E%3Cellipse cx='5.2' cy='10.6' rx='1.9' ry='2.4'/%3E%3Cellipse cx='9' cy='6.4' rx='2' ry='2.6'/%3E%3Cellipse cx='15' cy='6.4' rx='2' ry='2.6'/%3E%3Cellipse cx='18.8' cy='10.6' rx='1.9' ry='2.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12.2c-3 0-5.6 2.7-5.6 5.4 0 1.7 1.3 2.6 2.7 2.6 1.1 0 1.9-.6 2.9-.6s1.8.6 2.9.6c1.4 0 2.7-.9 2.7-2.6 0-2.7-2.6-5.4-5.6-5.4z'/%3E%3Cellipse cx='5.2' cy='10.6' rx='1.9' ry='2.4'/%3E%3Cellipse cx='9' cy='6.4' rx='2' ry='2.6'/%3E%3Cellipse cx='15' cy='6.4' rx='2' ry='2.6'/%3E%3Cellipse cx='18.8' cy='10.6' rx='1.9' ry='2.4'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: stamp .38s var(--boing) both; }
@keyframes stamp { from { transform: scale(2) rotate(-20deg); opacity: 0; } }
.vhero { margin: 0 -18px; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bun); }
.vhero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vhero .soft-ph { filter: saturate(.9) brightness(1.04); }
.vd { position: relative; margin: -26px -18px 0; padding: 22px 18px 0; border-radius: 28px 28px 0 0; background: var(--milk); }
.vd-t { font-size: 24px; font-weight: 900; line-height: 1.4; margin: 2px 0 12px; }
.vd-l { display: grid; gap: 6px; }
.vd-l div { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-s); background: var(--bun); }
.vd-l dt { display: flex; align-items: center; gap: 6px; width: 72px; font-size: 13px; font-weight: 700; color: var(--choco-2); }
.vd-l dt .i { color: var(--apricot-ink); }
.vd-l dd { font-weight: 700; }
.memo { margin: 12px 0 18px; padding: 14px 16px; border-radius: var(--r-m); background: var(--apricot-soft); }
.memo-h { font-size: 13px; font-weight: 700; color: var(--apricot-ink); margin-bottom: 4px; }

/* ---------- お散歩 ---------- */
.whero { position: relative; margin: 8px 0 0; height: 210px; border-radius: var(--r-l); overflow: hidden; }
.whero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.whero-c { position: absolute; inset: auto 12px 12px 12px; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 26px; background: rgba(255, 255, 255, .94); }
.bigring { position: relative; width: 92px; height: 92px; flex: none; }
.bigring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.br-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.br-in b { font: 600 28px var(--f-num); }
.br-in small { font-size: 12px; font-weight: 700; color: var(--choco-2); }
.whero-t { font-size: 18px; font-weight: 900; line-height: 1.45; }
.go { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; margin-top: 14px; border-radius: 30px; background: var(--apricot); color: var(--choco); font-size: 17px; font-weight: 900; box-shadow: 0 8px 20px rgba(246, 161, 101, .45); transition: transform .3s var(--boing); }
.go:active { transform: scale(.95); }
.go:disabled { background: var(--bun); box-shadow: none; color: var(--choco-2); }
.go.stop { background: var(--choco); color: var(--milk); box-shadow: 0 8px 20px rgba(74, 44, 30, .35); }
.link-btn { display: block; margin: 6px auto 0; min-height: 44px; padding: 0 16px; font-size: 14px; font-weight: 700; color: var(--apricot-ink); }
.walking { margin-top: 14px; padding: 16px; border-radius: var(--r-l); background: var(--apricot-soft); text-align: center; }
.steps { position: relative; height: 44px; margin-bottom: 4px; }
.steps i { position: absolute; top: calc(var(--i) % 2 * 18px); left: calc(8% + var(--i) * 15%); color: var(--apricot-ink); opacity: 0; transform: rotate(90deg); animation: step 2.4s infinite; animation-delay: calc(var(--i) * .4s); }
@keyframes step { 0% { opacity: 0; transform: rotate(90deg) scale(.6); } 12% { opacity: 1; transform: rotate(90deg) scale(1); } 60% { opacity: 1; } 100% { opacity: 0; transform: rotate(90deg) scale(1); } }
.wk-t { font-size: 14px; font-weight: 700; color: var(--apricot-ink); }
.wk-v { font: 600 56px/1.1 var(--f-num); }
.stamps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 12px 6px; border-radius: var(--r-m); background: var(--bun); }
.stamps li { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.st-c { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--milk); box-shadow: 0 0 0 1px var(--line); }
.stamps .on .st-c { background: var(--apricot); color: var(--choco); box-shadow: none; }
.stamps .on .st-c .i { transform: scale(calc(.65 + var(--s) * .45)) rotate(-12deg); }
.stamps .f .st-c { background: transparent; box-shadow: 0 0 0 1px dashed var(--line); }
.stamps .today .st-c { box-shadow: 0 0 0 3px var(--milk), 0 0 0 5px var(--choco); }
.st-d { font-size: 13px; font-weight: 700; color: var(--choco-2); }
.today .st-d { color: var(--choco); }
.st-m { font: 600 12px var(--f-num); color: var(--choco-2); }
.wg { margin-bottom: 12px; }
.wg-d { font-size: 13px; font-weight: 700; color: var(--choco-2); margin-bottom: 4px; }
.wl { display: grid; grid-template-columns: 52px auto 1fr; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-bottom: 1px dashed var(--line); }
.wl-t { font: 600 15px var(--f-num); color: var(--choco-2); }
.wl-m { font-size: 13px; font-weight: 700; }
.wl-m b { font: 600 19px var(--f-num); margin-right: 1px; }
.wl-x { text-align: right; font-size: 13px; font-weight: 700; color: var(--apricot-ink); }

/* ---------- 画面上部のバー ---------- */
.bar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: calc(6px + var(--st)) 8px 6px; background: var(--milk); position: relative; z-index: 2; }
.bar-t { font-size: 16px; font-weight: 900; white-space: nowrap; }
.bk { justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 12px 0 4px; border-radius: 22px; color: var(--apricot-ink); font-weight: 700; font-size: 15px; }
.bk:active { background: var(--bun); }

/* ---------- 設定・フォーム ---------- */
.grp { margin: 18px 4px 8px; font-size: 14px; font-weight: 900; color: var(--apricot-ink); }
.rows { border-radius: var(--r-m); background: var(--bun); overflow: hidden; }
.row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row:active { background: var(--apricot-soft); }
.row-ph { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.row-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--milk); color: var(--apricot-ink); }
.row-ic.warn { color: var(--berry); }
.row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.row-t b { font-size: 15px; }
.row-t small { font-size: 13px; color: var(--choco-2); }
.row > .i { color: var(--choco-3); }
.form { padding-top: 6px; }
.fl { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--choco-2); }
.opt { font-size: 12px; font-weight: 500; color: var(--choco-2); }
.tin { width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r-s); border: 2px solid var(--line); background: #fffbf8; font-size: 16px; font-weight: 700; color: var(--choco); }
.tin.ta { padding: 10px 14px; min-height: 90px; resize: none; line-height: 1.6; }
.tin::placeholder { color: #8f7266; font-weight: 500; }
.tin:focus { outline: 0; border-color: var(--apricot); background: var(--milk); }
.tin:disabled { color: var(--choco-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggles { display: flex; gap: 6px; }
.toggles.wrap { flex-wrap: wrap; }
.tg { flex: 1; min-height: 46px; padding: 0 12px; border-radius: 23px; border: 2px solid var(--line); background: var(--milk); font-size: 14px; font-weight: 700; color: var(--choco-2); transition: transform .25s var(--boing); white-space: nowrap; }
.toggles.wrap .tg { flex: none; }
.tg[aria-pressed="true"] { background: var(--apricot); border-color: var(--apricot); color: var(--choco); }
.tg:active { transform: scale(.94); }
.kgpad { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 8px; }
.kb { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: var(--apricot-soft); color: var(--choco); transition: transform .2s var(--boing); }
.kb.s { width: 44px; height: 44px; }
.kb:active { transform: scale(.86); background: var(--apricot); }
.kg-v { min-width: 120px; text-align: center; }
.kg-v b { font: 600 56px/1 var(--f-num); }
.kg-v small { font-size: 18px; margin-left: 3px; font-weight: 700; }
.fine-steps { display: flex; justify-content: center; gap: 6px; }
.fs { min-width: 56px; min-height: 40px; border-radius: 20px; background: var(--bun); font: 600 15px var(--f-num); color: var(--choco-2); }
.fs:active { background: var(--apricot-soft); }
.mini { text-align: center; }
.ms { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px; border-radius: 26px; background: var(--bun); }
.ms output { white-space: nowrap; }
.ms b { font: 600 24px var(--f-num); }
.ms small { font-size: 12px; font-weight: 700; margin-left: 1px; }
.mini-l { font-size: 13px; font-weight: 700; color: var(--choco-2); margin-top: 4px; }
.err { margin-top: 10px; padding: 8px 14px; border-radius: var(--r-s); background: var(--berry-soft); color: var(--berry); font-size: 14px; font-weight: 700; }
.kpick { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; }
.kpick button { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: var(--r-s); background: var(--bun); text-align: left; font-weight: 700; font-size: 14px; }
.kpick .i { color: var(--apricot-ink); }
.kpick [aria-checked="true"] { background: var(--apricot); }
.kpick [aria-checked="true"] .i { color: var(--choco); }
.phrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.phbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 2px solid var(--line); font-size: 14px; font-weight: 700; color: var(--choco); cursor: pointer; }
.phbtn:active { background: var(--bun); }
.phprev { position: relative; }
.phprev img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; display: block; }
.phprev .rm { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--choco); color: var(--milk); }
.phpick { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.pp-big { width: 104px; height: 104px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 4px var(--apricot-soft); }
.pp-big img { width: 100%; height: 100%; object-fit: cover; }
.pp-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pp { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--bun); cursor: pointer; }
.pp img { width: 100%; height: 100%; object-fit: cover; }
.pp.cam { color: var(--apricot-ink); border: 2px dashed var(--apricot-2); }
.form-act { display: flex; gap: 8px; margin-top: 22px; }
.form-act .wide { flex: 1; }

/* ---------- ボタン・空の状態 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 22px; border-radius: 26px; background: var(--apricot); color: var(--choco); font-size: 16px; font-weight: 900; transition: transform .25s var(--boing); }
.btn:active { transform: scale(.94); }
.btn.ghost { background: var(--bun); color: var(--choco); }
.btn.danger { background: var(--berry); color: var(--milk); }
.btn.wide { width: 100%; }
.empty { padding: 20px 10px; text-align: center; }
.empty img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: block; box-shadow: 0 0 0 8px var(--bun); }
.empty.small img { width: 120px; height: 120px; }
.empty-t { font-size: 18px; font-weight: 900; line-height: 1.5; }
.empty-d { margin: 4px 0 14px; color: var(--choco-2); font-size: 14px; }
.ab { text-align: center; padding: 16px 0 14px; }
.ab img { border-radius: 24px; box-shadow: var(--sh); }
.ab-n { font-size: 22px; font-weight: 900; margin-top: 8px; }
.ab-v { font-size: 13px; color: var(--choco-2); }
.ab-note { padding: 14px 16px; border-radius: var(--r-m); background: var(--apricot-soft); font-size: 14px; line-height: 1.75; }
.ab-note.sub { margin-top: 8px; background: var(--bun); color: var(--choco-2); }
.tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech li { padding: 4px 12px; border-radius: 14px; background: var(--bun); font-size: 13px; font-weight: 700; color: var(--choco-2); }
.cta { display: flex; align-items: center; justify-content: space-between; min-height: 58px; margin-top: 22px; padding: 0 20px; border-radius: 29px; background: var(--choco); color: var(--milk); font-weight: 700; }
.cta:active { transform: scale(.97); }

/* ---------- シート・トースト ---------- */
.scrim { position: absolute; inset: 0; z-index: 20; background: rgba(74, 44, 30, .38); opacity: 0; transition: opacity .25s; }
.scrim.on { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 92%; overflow-y: auto; overscroll-behavior: contain; border-radius: 30px 30px 0 0; background: var(--milk); box-shadow: 0 -10px 40px rgba(74, 44, 30, .2); transform: translateY(100%); transition: transform .34s var(--boing); }
.sheet.on { transform: none; }
.grab { height: 28px; display: grid; place-items: center; touch-action: none; }
.grab i { width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.sh-body { padding: 0 20px calc(20px + var(--sb)); }
.sh-t { font-size: 20px; font-weight: 900; outline: none; line-height: 1.45; }
.sh-d { margin: 4px 0 6px; font-size: 14px; color: var(--choco-2); }
.sh-act { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; margin-top: 20px; }
.toast { position: absolute; left: 0; right: 0; margin: 0 auto; width: fit-content; bottom: calc(96px + var(--sb)); z-index: 30; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); min-height: 48px; padding: 8px 10px 8px 14px; border-radius: 24px; background: var(--choco); color: var(--milk); font-size: 14px; font-weight: 700; transform: translateY(20px) scale(.9); opacity: 0; pointer-events: none; transition: transform .3s var(--boing), opacity .2s; }
.toast span { flex: 1; min-width: 0; }
.deep .toast { bottom: calc(24px + var(--sb)); }
.toast.on { transform: none; opacity: 1; pointer-events: auto; }
.toast .i { color: var(--apricot-2); }
.toast button { min-height: 36px; padding: 0 12px; border-radius: 18px; background: var(--apricot); color: var(--choco); font-weight: 900; white-space: nowrap; }

/* ---------- スプラッシュ・オンボーディング ---------- */
.splash { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--apricot-soft); transition: opacity .3s; }
.splash img { border-radius: 26px; box-shadow: var(--sh); animation: pop .6s var(--boing); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.splash-n { font-size: 24px; font-weight: 900; letter-spacing: .06em; }
.splash.out, .onboard.out { opacity: 0; pointer-events: none; }
.onboard { position: fixed; inset: 0; z-index: 55; background: var(--milk); overflow: hidden; transition: opacity .3s; }
.ob-img { position: absolute; left: 0; top: 0; width: 100%; height: 64%; object-fit: cover; object-position: 50% 82%; }
.ob-skip { position: absolute; top: calc(12px + var(--st)); right: 12px; min-height: 44px; padding: 0 16px; border-radius: 22px; background: rgba(255, 255, 255, .92); font-weight: 700; font-size: 14px; color: var(--choco); }
.ob-card { position: absolute; left: 0; right: 0; bottom: 0; min-height: 40%; padding: 26px 24px calc(24px + var(--sb)); border-radius: 34px 34px 0 0; background: var(--milk); box-shadow: 0 -10px 30px rgba(74, 44, 30, .12); display: flex; flex-direction: column; }
.ob-t { font-size: 26px; font-weight: 900; line-height: 1.45; }
.ob-d { margin: 8px 0 0; color: var(--choco-2); flex: 1; }
.ob-dots { display: flex; gap: 6px; margin: 14px 0; }
.ob-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: width .3s var(--boing); }
.ob-dots i.on { width: 26px; border-radius: 5px; background: var(--apricot); }
.nojs, .fatal { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--milk); color: var(--choco); }
.fatal-t { font-size: 18px; font-weight: 900; }
.fatal a { color: var(--apricot-ink); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .steps i { opacity: 1; }
}
