/* よみきかせの木 — 色鉛筆の絵本、パステル多色、ふんわり */
:root {
  --bg: #EDF5FB;
  --sky: #CFE6F5;
  --mint: #CDEBDD;
  --peach: #FFD9CC;
  --lemon: #FFF1A6;
  --lilac: #E4DAF6;
  --paper: #FFFDF8;
  --line: #E6DFD2;
  --ink: #3A3350;
  --ink-2: #5E5675;
  --berry: #C8406B;
  --berry-dk: #9C2A50;
  --c: #E39A2D;
  --t: #FFE9C7;
  --hl: #FFE45C;

  --f-story: 'Klee One', 'Hiragino Maru Gothic ProN', 'Yu Gothic', sans-serif;
  --f-title: 'Yusei Magic', 'Hiragino Maru Gothic ProN', sans-serif;
  --f-ui: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Yu Gothic', sans-serif;
  --f-num: 'Fredoka', 'Zen Maru Gothic', sans-serif;

  --r: 22px;
  --r-s: 14px;
  --sh: 0 10px 24px rgba(58, 51, 80, .13), 0 2px 4px rgba(58, 51, 80, .06);
  --sh-s: 0 4px 12px rgba(58, 51, 80, .12);
  --soft: cubic-bezier(.22, 1, .36, 1);
  --t-m: 360ms;
  --top: env(safe-area-inset-top, 0px);
  --bot: env(safe-area-inset-bottom, 0px);
  --fs: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-ui); font-size: 15px; line-height: 1.7; color: var(--ink); font-weight: 500;
  background: #DCEBF6 radial-gradient(circle at 20% 30%, #FBE3DA 0 120px, transparent 121px), radial-gradient(circle at 85% 70%, #DDF1E6 0 160px, transparent 161px);
  line-break: strict; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 24px; height: 24px; flex: none; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
.nw { white-space: nowrap; }
.noscript, .fallback { position: fixed; left: 16px; right: 16px; top: 40%; padding: 16px; background: var(--paper); border-radius: var(--r); text-align: center; z-index: 50; }

.app { position: fixed; inset: 0; margin: 0 auto; width: 100%; max-width: 430px; background: var(--bg); overflow: hidden; overflow: clip; isolation: isolate; }
@media (min-width: 600px) { .app { box-shadow: 0 0 0 1px rgba(58, 51, 80, .08), 0 20px 60px rgba(58, 51, 80, .18); } }
.stage { position: absolute; inset: 0; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; overflow: clip; }
.scr__body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.has-nav .scr__body { padding-bottom: calc(96px + var(--bot)); }
.scr.in-r { animation: inR var(--t-m) var(--soft) both; }
.scr.out-r { animation: outR var(--t-m) var(--soft) both; }
.scr.in-l { animation: inL var(--t-m) var(--soft) both; }
.scr.out-l { animation: outL var(--t-m) var(--soft) both; z-index: 2; }
.scr.in-f { animation: fin 260ms ease both; }
.scr.out-f { animation: fout 200ms ease both; }
@keyframes inR { from { transform: translateX(40px); opacity: 0; } }
@keyframes outR { to { transform: translateX(-30px); opacity: 0; } }
@keyframes inL { from { transform: translateX(-40px); opacity: 0; } }
@keyframes outL { to { transform: translateX(40px); opacity: 0; } }
@keyframes fin { from { opacity: 0; transform: scale(.985); } }
@keyframes fout { to { opacity: 0; } }

/* ボタン */
.rbtn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); box-shadow: var(--sh-s); transition: transform 160ms var(--soft); }
.rbtn:active { transform: scale(.9); }
.rbtn--l { width: 56px; height: 56px; }
.rbtn--l svg { width: 28px; height: 28px; }
.rbtn:disabled { opacity: 1; color: #B4ADC2; box-shadow: none; background: rgba(255, 253, 248, .7); }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 999px;
  font-family: var(--f-ui); font-weight: 700; font-size: 16px; text-decoration: none; transition: transform 160ms var(--soft), box-shadow 160ms; word-break: keep-all;
}
.pill:active { transform: scale(.95); }
.pill--main { background: var(--berry); color: #fff; box-shadow: 0 6px 0 var(--berry-dk), 0 10px 20px rgba(200, 64, 107, .25); }
.pill--main:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--berry-dk); }
.pill--ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px #D7CFE3, var(--sh-s); }
.pill--danger { background: #B3364F; color: #fff; }
.pill--block { width: 100%; }
.shake { animation: shake .35s; }
@keyframes shake { 25%, 75% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }

/* ナビ */
.nav {
  position: absolute; z-index: 20; left: 16px; right: 16px; bottom: calc(12px + var(--bot)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px;
  background: var(--paper); border-radius: 999px; box-shadow: 0 12px 30px rgba(58, 51, 80, .18); transition: transform var(--t-m) var(--soft), opacity 200ms;
}
.app:not(.nav-on) .nav { transform: translateY(140%); opacity: 0; pointer-events: none; visibility: hidden; }
.nav a { min-height: 54px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; text-decoration: none; font-size: 12px; font-weight: 700; color: var(--ink-2); transition: background 200ms, transform 160ms var(--soft); }
.nav a:active { transform: scale(.94); }
.nav a svg { width: 24px; height: 24px; }
.nav a.is-on { color: var(--ink); }
.nav a.is-on:nth-child(1) { background: var(--peach); }
.nav a.is-on:nth-child(2) { background: var(--sky); }
.nav a.is-on:nth-child(3) { background: var(--mint); }

/* ---------- 本だな ---------- */
.hero { position: relative; height: 360px; background: var(--sky) url(/app-development/apps/a074/img/tree.webp) center 62% / cover no-repeat; padding: calc(var(--top) + 14px) 16px 0; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(rgba(237, 245, 251, 0), var(--bg)); pointer-events: none; }
.greet { background: var(--paper); border-radius: var(--r); padding: 12px 18px 14px; box-shadow: var(--sh); max-width: 330px; }
.greet__k { font-size: 14px; font-weight: 700; color: var(--berry-dk); letter-spacing: .08em; }
.greet__t { font-family: var(--f-title); font-weight: 400; font-size: 23px; line-height: 1.4; word-break: keep-all; font-feature-settings: "palt"; }
.shelf {
  position: relative; display: flex; gap: 6px; margin-top: -96px; padding: 10px calc(50% - 112px) 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.shelf::-webkit-scrollbar { display: none; }
.bk { position: relative; flex: 0 0 224px; scroll-snap-align: center; text-decoration: none; color: var(--ink); transition: transform 120ms linear; }
.bk__cover { position: relative; display: block; aspect-ratio: 8 / 11; border-radius: 6px 16px 16px 6px; overflow: hidden; box-shadow: 0 16px 30px rgba(58, 51, 80, .25), 0 2px 0 #fff inset; background: var(--t); }
.bk__cover img { width: 100%; height: 100%; object-fit: cover; }
.bk__spine { position: absolute; left: 0; top: 0; bottom: 0; width: 18px; background: linear-gradient(90deg, rgba(58, 51, 80, .28), rgba(255, 255, 255, .25) 45%, transparent); }
.bk__plate { display: block; margin-top: 12px; padding: 10px 12px 10px; border-radius: var(--r-s); background: var(--t); text-align: center; box-shadow: var(--sh-s); }
.bk__title { display: block; font-family: var(--f-title); font-weight: 400; font-size: 19px; line-height: 1.35; word-break: keep-all; }
.bk__meta { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bk__stars { display: flex; justify-content: center; gap: 2px; margin-top: 2px; }
.bk__stars i, .stars i { color: #CFC7DB; }
.bk__stars i.on { color: var(--c); }
.bk__stars svg { width: 18px; height: 18px; }
.bk__mark { position: absolute; top: 12px; right: -4px; padding: 3px 10px 3px 12px; border-radius: 999px 0 0 999px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 700; box-shadow: var(--sh-s); border-left: 5px solid var(--c); white-space: nowrap; }
.dots-s { display: flex; justify-content: center; gap: 6px; }
.dots-s i { width: 8px; height: 8px; border-radius: 4px; background: #C9C1D6; transition: width 240ms var(--soft), background 240ms; }
.dots-s i.on { width: 22px; background: var(--ink); }

.sec { margin: 26px 16px 0; }
.sec__h { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.sec__h svg { width: 22px; height: 22px; color: var(--berry); }
.sec__n { margin-left: auto; font-family: var(--f-num); font-weight: 600; font-size: 16px; color: var(--ink-2); }
.resume { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; background: var(--paper); border-radius: var(--r); box-shadow: var(--sh-s); text-decoration: none; color: var(--ink); margin-bottom: 10px; transition: transform 160ms var(--soft); }
.resume:active { transform: scale(.98); }
.resume img { width: 96px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.resume__t { flex: 1; min-width: 0; }
.resume__t b { display: block; font-family: var(--f-title); font-weight: 400; font-size: 17px; line-height: 1.4; }
.resume__t > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bar { display: block; height: 8px; margin-top: 4px; border-radius: 4px; background: var(--t); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.stk { background: var(--paper); border-radius: var(--r); box-shadow: var(--sh-s); padding: 6px 14px; }
.stk__row { padding: 10px 0; }
.stk__row + .stk__row { border-top: 1.5px dashed var(--line); }
.stk__name { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.stk__slots { display: flex; gap: 8px; align-items: center; }
.seal { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--c), var(--sh-s); background: var(--t); flex: none; }
.seal:nth-child(odd) { transform: rotate(-8deg); }
.seal:nth-child(even) { transform: rotate(6deg); }
.seal img { width: 100%; height: 130%; object-fit: cover; object-position: center 30%; }
.seal--empty { border: 2px dashed #C9C1D6; box-shadow: none; background: transparent; transform: none !important; }
.stk__more { font-family: var(--f-num); font-weight: 600; font-size: 15px; color: var(--ink-2); }
.hint { font-size: 14px; color: var(--ink-2); margin: 10px 4px 0; }

/* ---------- 本の紹介 ---------- */
.tbar { position: relative; z-index: 3; flex: none; display: flex; align-items: center; gap: 12px; padding: calc(var(--top) + 10px) 14px 10px; background: var(--t); }
.tbar__t { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-hero { position: relative; display: grid; place-items: center; padding: 8px 0 40px; background: var(--t); border-radius: 0 0 50% 50% / 0 0 36px 36px; }
.bd-cover { width: 196px; border-radius: 6px 16px 16px 6px; overflow: hidden; transform: rotate(-3deg); box-shadow: 0 22px 40px rgba(58, 51, 80, .28); animation: bob 600ms var(--soft) both; }
.bd-cover img { width: 100%; height: auto; aspect-ratio: 8 / 11; object-fit: cover; }
@keyframes bob { from { transform: rotate(-8deg) translateY(16px); opacity: 0; } }
.bd { padding: 18px 18px 30px; }
.bd__t { font-family: var(--f-title); font-weight: 400; font-size: 30px; line-height: 1.3; text-align: center; word-break: keep-all; font-feature-settings: "palt"; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px #DDD5E8; font-size: 14px; font-weight: 700; }
.chip svg { width: 18px; height: 18px; color: var(--berry); }
.bd__blurb { font-family: var(--f-story); font-weight: 600; font-size: 18px; line-height: 1.95; word-break: keep-all; }
.bd__btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 6px; }
.bd__btns .pill--main { flex: 1 1 200px; }
.bd__h { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { position: relative; flex: 0 0 132px; scroll-snap-align: start; border-radius: 12px; overflow: hidden; box-shadow: var(--sh-s); background: var(--t); }
.thumb img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.thumb span { position: absolute; left: 6px; bottom: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--paper); font-family: var(--f-num); font-weight: 600; font-size: 14px; line-height: 24px; text-align: center; }
.pnote { margin-top: 18px; padding: 14px 16px; border-radius: var(--r); background: #E4F3EB; font-size: 14px; line-height: 1.8; }
.pnote__k { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 4px; }
.pnote__k svg { width: 20px; height: 20px; color: #2E7D5B; }
.pnote__m { margin-top: 6px; font-weight: 700; color: var(--ink-2); }

/* ---------- よむ ---------- */
.scr--read { background: var(--t); }
.scr--read[data-size="s"] { --fs: 19px; }
.scr--read[data-size="m"], .scr[data-size="m"] { --fs: 21px; }
.scr--read[data-size="l"], .scr[data-size="l"] { --fs: 25px; }
.scr[data-size="s"] { --fs: 19px; }
.rbar { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(var(--top) + 8px) 12px 6px; }
.rbar__t { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbar__n { font-family: var(--f-num); font-weight: 600; font-size: 16px; white-space: nowrap; padding: 2px 10px; border-radius: 999px; background: var(--paper); }
.book { position: relative; flex: 1; min-height: 0; margin: 6px 14px 0; perspective: 1800px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pg { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: left center; }
.pg.leaf { z-index: 2; will-change: transform; }
.pg.under { z-index: 1; }
.face {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--paper); border-radius: 6px 20px 20px 6px;
  box-shadow: 2px 1px 0 #EFE8DC, 4px 2px 0 #fff, 6px 3px 0 #E8E0D3, 0 16px 30px rgba(58, 51, 80, .18);
}
.face.back { transform: rotateY(180deg); background: #FBF6EC; border-radius: 20px 6px 6px 20px; }
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 30%, rgba(58, 51, 80, .32)); opacity: var(--shd, 0); }
.face.back .shade { background: linear-gradient(270deg, transparent 20%, rgba(58, 51, 80, .3)); }
.under .face .shade { background: linear-gradient(90deg, rgba(58, 51, 80, .28), transparent 50%); opacity: calc(var(--ushd, 0) * .9); }
.face::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: linear-gradient(90deg, rgba(58, 51, 80, .12), transparent); pointer-events: none; z-index: 1; }
.ill { flex: none; margin: 12px 12px 0; border-radius: 14px; overflow: hidden; background: var(--t); }
.ill img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.txt { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding: 8px 18px 28px; font-family: var(--f-story); font-weight: 600; font-size: var(--fs); line-height: 2.2; color: var(--ink); }
.ln { word-break: keep-all; overflow-wrap: normal; line-break: strict; }
.u { border-radius: 3px; transition: background-size 160ms; }
.u.read { background-image: linear-gradient(transparent 60%, var(--hl) 60%, var(--hl) 94%, transparent 94%); }
.u.now { color: var(--berry-dk); }
.rb { position: relative; }
.rb::before {
  content: attr(data-r); position: absolute; left: 50%; bottom: 86%; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--f-ui); font-weight: 700; font-size: .46em; line-height: 1; letter-spacing: 0; color: var(--ink-2); pointer-events: none;
}
.pno { position: absolute; right: 18px; bottom: 10px; font-family: var(--f-num); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.cv { position: relative; flex: 1; display: flex; flex-direction: column; }
.cv__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cv__plate { position: relative; margin: 16px 16px 0; padding: 12px 16px; border-radius: var(--r-s); background: var(--paper); text-align: center; box-shadow: var(--sh-s); }
.cv__t { font-family: var(--f-title); font-weight: 400; font-size: 28px; line-height: 1.3; word-break: keep-all; font-feature-settings: "palt"; }
.cv__by { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.end { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; background: radial-gradient(circle at 50% 38%, var(--t) 0 150px, transparent 151px); }
.end__k { font-family: var(--f-title); font-size: 42px; line-height: 1.2; }
.end__seal { position: relative; width: 168px; height: 168px; border-radius: 50%; padding: 8px; background: repeating-conic-gradient(var(--c) 0 10deg, #fff 10deg 20deg); box-shadow: var(--sh); }
.end__seal img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 25%; border: 4px solid #fff; }
.end__ribbon { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); padding: 4px 16px; border-radius: 999px; background: var(--berry); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; }
.end__t { margin-top: 12px; font-family: var(--f-story); font-weight: 600; font-size: 19px; }
.end__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.celebrate .end__seal { animation: sealIn 700ms var(--soft) both; }
@keyframes sealIn { 0% { transform: scale(.3) rotate(-40deg); opacity: 0; } 70% { transform: scale(1.08) rotate(6deg); opacity: 1; } 100% { transform: none; } }
.rnote { display: none; margin: 8px 18px 0; padding: 6px 12px; border-radius: 12px; background: var(--paper); font-size: 14px; font-weight: 700; color: var(--ink-2); text-align: center; }
.rnote.is-on { display: block; }
.rc { flex: none; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 14px; padding: 12px 18px 6px; }
.play { min-height: 60px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; background: var(--berry); color: #fff; font-weight: 700; font-size: 19px; box-shadow: 0 6px 0 var(--berry-dk); transition: transform 140ms, box-shadow 140ms, background 200ms; }
.play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--berry-dk); }
.play.is-on { background: var(--ink); box-shadow: 0 6px 0 #1F1A2E; }
.play__i { display: grid; place-items: center; }
.play__i svg { width: 26px; height: 26px; }
.pdots { flex: none; display: flex; justify-content: center; gap: 6px; padding: 8px 0 calc(12px + var(--bot)); }
.pdots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(58, 51, 80, .2); transition: width 260ms var(--soft), background 260ms; }
.pdots i.past { background: var(--c); }
.pdots i.on { width: 24px; background: var(--ink); }

/* ---------- 読み上げ設定・共通カード ---------- */
.ph { padding: calc(var(--top) + 20px) 20px 8px; }
.ph__t { font-family: var(--f-title); font-weight: 400; font-size: 28px; line-height: 1.3; word-break: keep-all; }
.ph__s { font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.demo { margin: 12px 16px 0; padding: 16px; border-radius: var(--r); background: var(--t); text-align: center; }
.demo__txt { padding: 14px 16px; margin-bottom: 14px; border-radius: var(--r-s); background: var(--paper); text-align: left; font-family: var(--f-story); font-weight: 600; font-size: var(--fs); line-height: 2.2; }
.demo .rnote { margin: 10px 0 0; }
.card { margin: 14px 16px 0; padding: 14px 16px 16px; border-radius: var(--r); background: var(--paper); box-shadow: var(--sh-s); }
.card__h { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.card__h svg { width: 22px; height: 22px; color: #2E7D5B; }
.card__v { margin-left: auto; font-size: 14px; color: var(--ink-2); }
.card--list { padding: 4px 16px; }
.voices { display: grid; gap: 8px; }
.vopt { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border: 0; border-radius: var(--r-s); background: #F5F1FA; text-align: left; }
.vopt__dot { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid #A79EBB; flex: none; }
.vopt.is-on { background: var(--lilac); }
.vopt.is-on .vopt__dot { border: 7px solid var(--berry); }
.vopt__t { font-weight: 700; font-size: 15px; line-height: 1.4; }
.vopt__t small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-2); }
.empty-note { display: flex; gap: 10px; padding: 12px; border-radius: var(--r-s); background: #F5F1FA; font-size: 14px; line-height: 1.75; }
.empty-note svg { color: var(--berry); }
.range { width: 100%; height: 44px; -webkit-appearance: none; appearance: none; background: transparent; margin: 0; }
.range::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--mint), var(--sky), var(--lilac)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -9px; border-radius: 50%; background: var(--berry); border: 4px solid #fff; box-shadow: var(--sh-s); }
.range::-moz-range-track { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--mint), var(--sky), var(--lilac)); }
.range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--berry); border: 4px solid #fff; }
.range__lbl { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border-radius: 18px; background: #F2EEF7; }
.seg button { min-height: 44px; border: 0; border-radius: 14px; background: transparent; font-weight: 700; font-size: 14px; line-height: 1.3; padding: 4px 4px; word-break: keep-all; transition: background 200ms, transform 160ms var(--soft); }
.seg button:active { transform: scale(.95); }
.seg button.is-on { background: var(--paper); box-shadow: var(--sh-s); color: var(--berry-dk); }
.seg--tall button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; }
.seg__ex { font-family: var(--f-story); font-weight: 600; font-size: 26px; line-height: 1.6; padding-top: 8px; color: var(--ink); }
.seg__ex--s { font-size: 19px; }
.seg__ex--m { font-size: 24px; }
.seg__ex--l { font-size: 30px; }
.swatches { display: flex; gap: 12px; }
.sw { flex: 1; min-height: 52px; border: 0; border-radius: var(--r-s); background: #F5F1FA; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; }
.sw::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--s); box-shadow: inset 0 0 0 2px rgba(58, 51, 80, .12); }
.sw.is-on { background: var(--paper); box-shadow: inset 0 0 0 2.5px var(--berry), var(--sh-s); }
.row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; width: 100%; border: 0; background: none; text-align: left; text-decoration: none; color: var(--ink); }
.row + .row { border-top: 1.5px solid #EFEAF3; }
.row__t { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; line-height: 1.45; }
.row__t small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-2); }
.row--danger { color: #9E2A41; }
.switch { position: relative; width: 56px; height: 34px; flex: none; border: 0; border-radius: 999px; background: #D9D2E3; padding: 0; transition: background 220ms; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(58, 51, 80, .25); transition: transform 280ms var(--soft); }
.switch[aria-checked="true"] { background: var(--berry); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }

/* ---------- おうちのかたへ ---------- */
.ph--adult { position: relative; padding: 0; }
.ph__img { width: 100%; height: 230px; object-fit: cover; object-position: center 40%; }
.ph__plate { position: relative; margin: -46px 16px 0; padding: 14px 18px; border-radius: var(--r); background: var(--paper); box-shadow: var(--sh); }
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.kpi > div { padding: 10px 8px; border-radius: var(--r-s); background: #F3F8F5; text-align: center; }
.kpi b { font-family: var(--f-num); font-weight: 600; font-size: 28px; line-height: 1.1; }
.kpi span { font-weight: 700; font-size: 14px; margin-left: 2px; }
.kpi small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.4; word-break: keep-all; }
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 150px; }
.wk__c { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.wk__c i { width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: linear-gradient(#9ED7BA, #6FBF98); min-height: 4px; transform-origin: bottom; animation: grow 600ms var(--soft) both; }
@keyframes grow { from { transform: scaleY(0); } }
.wk__v { font-family: var(--f-num); font-weight: 600; font-size: 13px; min-height: 18px; color: var(--ink-2); }
.wk__d { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.wk__d.today { color: var(--ink); background: var(--lemon); border-radius: 6px; padding: 0 4px; }
.brow { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; color: var(--ink); }
.brow + .brow { border-top: 1.5px solid #EFEAF3; }
.brow img { width: 46px; height: 62px; object-fit: cover; border-radius: 4px 10px 10px 4px; box-shadow: var(--sh-s); flex: none; }
.brow__t { flex: 1; min-width: 0; }
.brow__t b { display: block; font-family: var(--f-title); font-weight: 400; font-size: 17px; line-height: 1.4; }
.brow__t > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tips { padding: 0; list-style: none; counter-reset: t; }
.tips li { position: relative; padding: 4px 0 10px 40px; counter-increment: t; }
.tips li::before { content: counter(t); position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--peach); font-family: var(--f-num); font-weight: 600; display: grid; place-items: center; font-size: 15px; }
.tips b { display: block; font-size: 15px; }
.tips span { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.75; }
.safe { padding-left: 1.2em; font-size: 14px; line-height: 1.8; }
.safe li + li { margin-top: 4px; }
.about { text-align: center; padding: 24px 16px 4px; }
.about img { width: 112px; height: 112px; border-radius: 28px; margin: 0 auto 12px; box-shadow: var(--sh); }
.about h1 { font-family: var(--f-title); font-weight: 400; font-size: 28px; }
.about p { font-size: 14px; color: var(--ink-2); }
.disc { font-size: 14px; line-height: 1.8; }
.disc + .disc { margin-top: 8px; }
.techs { display: flex; flex-wrap: wrap; gap: 8px; }
.techs span { padding: 4px 12px; border-radius: 999px; background: var(--lilac); font-size: 13px; font-weight: 700; }
.cta { padding: 18px 16px 30px; }

/* ---------- シート・トースト・ゲート ---------- */
.sheet-root { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: rgba(58, 51, 80, .4); opacity: 0; transition: opacity 280ms; pointer-events: auto; }
.scrim.is-on { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; display: flex; flex-direction: column; background: var(--paper); border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform 360ms var(--soft); pointer-events: auto; padding-bottom: calc(10px + var(--bot)); box-shadow: 0 -10px 30px rgba(58, 51, 80, .15); }
.sheet.is-on { transform: none; }
.sheet__grab { display: grid; place-items: center; height: 26px; touch-action: none; cursor: grab; }
.sheet__grab i { width: 44px; height: 5px; border-radius: 3px; background: #CFC7DB; }
.sheet__h { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; }
.sheet__h h2 { flex: 1; font-family: var(--f-title); font-weight: 400; font-size: 21px; }
.sheet__h .rbtn { box-shadow: none; background: #F2EEF7; }
.sheet__b { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 10px; }
.qs__k { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 700; margin: 12px 0 6px; }
.qs__v { font-size: 13px; color: var(--ink-2); }
.qs__more { display: block; margin: 16px 0 4px; font-size: 14px; font-weight: 700; color: var(--berry-dk); text-align: center; text-underline-offset: 3px; }
.gate { text-align: center; padding: 4px 0 8px; }
.gate__q { font-size: 15px; color: var(--ink-2); }
.gate__eq { display: flex; justify-content: center; gap: 10px; margin: 10px 0 16px; font-family: var(--f-num); font-weight: 600; font-size: 40px; line-height: 1.2; }
.gate__opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gate__opts .pill { padding: 0; font-family: var(--f-num); font-size: 22px; }
.confirm { font-size: 15px; line-height: 1.8; margin-bottom: 14px; }
.confirm__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toast { position: absolute; left: 50%; bottom: calc(100px + var(--bot)); z-index: 70; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; transition: opacity 240ms, transform 360ms var(--soft); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* スプラッシュ・案内 */
.splash { position: absolute; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 14px; background: linear-gradient(#CFE6F5, #FBE3DA); transition: opacity 300ms; }
.splash img { width: 128px; height: 128px; border-radius: 30px; box-shadow: var(--sh); animation: pop 700ms var(--soft) both; }
.splash p { font-family: var(--f-title); font-size: 30px; }
.splash.out { opacity: 0; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.onb { position: absolute; inset: 0; z-index: 85; display: flex; flex-direction: column; padding: calc(var(--top) + 12px) 0 calc(var(--bot) + 18px); background: linear-gradient(#DCEEFA, #FFF3EC); transition: opacity 300ms; }
.onb.out { opacity: 0; }
.onb__skip { align-self: flex-end; margin-right: 14px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--paper); font-weight: 700; font-size: 14px; box-shadow: var(--sh-s); }
.onb__track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.onb__track::-webkit-scrollbar { display: none; }
.onb__s { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; justify-content: center; padding: 0 28px; }
.onb__img { display: block; width: min(78vw, 310px); aspect-ratio: 1; margin: 0 auto 24px; border-radius: 40% 46% 42% 48% / 46% 40% 48% 42%; overflow: hidden; box-shadow: var(--sh); background: var(--sky); }
.onb__img img { width: 100%; height: 100%; object-fit: cover; }
.onb__s h2 { font-family: var(--f-title); font-weight: 400; font-size: 26px; line-height: 1.35; margin-bottom: 8px; word-break: keep-all; text-align: center; }
.onb__s p { font-family: var(--f-story); font-weight: 600; font-size: 17px; line-height: 1.9; text-align: center; }
.onb__f { display: flex; align-items: center; gap: 12px; padding: 12px 22px 0; }
.onb__dots { flex: 1; display: flex; gap: 6px; }
.onb__dots i { width: 9px; height: 9px; border-radius: 5px; background: #C9C1D6; transition: width 240ms var(--soft); }
.onb__dots i.on { width: 26px; background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* 分かち書きの子ども向けの文は、文節（空白）でだけ改行する */
.onb__s p, .ph__s, .hint, .end__t, .stk__name, .greet__t, .resume__t > span { word-break: keep-all; overflow-wrap: normal; }
.gate__q span { display: block; }
