/* =========================================================
   ゲピミニライフ : スタイル
   生成りの紙 × くすみ水彩。ピンクは使わず、紺・黄土・セージ・空色でまとめる
   ========================================================= */
:root {
  --paper: #FAF6EE;
  --card: #FFFDF8;
  --ink: #3A3530;
  --ink2: #7A6F64;
  --ink3: #A99D90;
  --line: #EAE1D3;
  --navy: #34466F;
  --navy2: #27365A;
  --meal: #E0A93B;
  --ex: #4FA982;
  --supp: #5B8FD6;
  --danger: #C8604E;
  --c: #E0A93B;          /* 選んだキャラの色（JSで上書き） */
  --cs: #FBF1D3;
  --r: 18px;
  --tabh: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-text-size-adjust: 100%;
  line-height: 1.55;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { font: inherit; }
img { display: block; max-width: 100%; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tabh) + var(--safe-b) + 16px); }
.screen { padding: 0 16px; }
/* backwards にしておかないと終了後も transform が残り、中の position:fixed（保存ボタン）がずれる */
.screen.is-in { animation: fadeIn .28s ease backwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.apphd { padding: 18px 16px 6px; }
.apphd h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .04em; }

/* ---------- 読み込み ---------- */
.loading { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; background: var(--paper); color: var(--ink2); font-size: 13px; }
.loading[hidden] { display: none; }
.loading__egg { width: 44px; height: 56px; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: #F7EABC; box-shadow: inset 0 0 0 2.5px rgba(107,84,68,.45); animation: wobble 1s ease-in-out infinite; }
@keyframes wobble { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* ---------- 共通部品 ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 16px; margin: 0 0 14px; box-shadow: 0 1px 0 var(--line), 0 6px 18px -12px rgba(80,60,40,.25); }
.card__h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 12px; }
.card__h small { font-weight: 500; font-size: 11px; color: var(--ink3); }
.card__h .btn-link { margin-left: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .04em; box-shadow: 0 3px 0 var(--navy2); transition: transform .08s; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--navy2); }
.btn[disabled] { background: #C9C1B6; box-shadow: 0 3px 0 #B3AA9E; cursor: default; }
.btn--lg { width: 100%; min-height: 56px; font-size: 17px; }
.btn--sub { background: #EFE8DC; color: var(--ink); box-shadow: 0 2px 0 #DDD3C3; min-height: 44px; padding: 0 16px; }
.btn--danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--block { width: 100%; margin-bottom: 10px; }
.btn-link { color: var(--navy); font-weight: 700; font-size: 13px; padding: 8px 4px; }
.muted { color: var(--ink3); font-size: 12px; margin: 6px 0 0; }
.note { color: var(--ink3); font-size: 11px; line-height: 1.7; margin: 8px 4px 20px; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #E3F1E9; color: #2F7A5A; font-size: 11px; font-weight: 700; vertical-align: 2px; }

.input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 16px; outline: none; }
.input:focus { border-color: var(--navy); }
.fld { display: block; margin-bottom: 12px; }
.fld > span { display: block; font-size: 12px; color: var(--ink2); margin-bottom: 6px; font-weight: 700; }
.fld--c { text-align: left; margin: 4px 0 14px; }
.fld[hidden] { display: none; }
.addrow { display: flex; gap: 8px; margin: 10px 0; }
.addrow .input { flex: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; font-weight: 700; color: var(--ink2); transition: background .15s, color .15s; }
.chip.is-on { background: var(--navy); color: #fff; box-shadow: none; }
.chips--sm .chip { min-height: 34px; font-size: 12px; padding: 0 12px; }

/* ---------- タブバー ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 480px; margin: 0 auto; height: calc(var(--tabh) + var(--safe-b)); padding: 6px 6px var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255,253,248,.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.is-ob .tabbar { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--ink3); }
.tab svg { width: 24px; height: 24px; fill: currentColor; }
.tab.is-on { color: var(--navy); }
.tab { position: relative; }
.tab__dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--meal); box-shadow: 0 0 0 2px var(--card); }
.tab__dot[hidden] { display: none; }
.tab__fab { display: grid; place-items: center; width: 52px; height: 52px; margin-top: -24px; border-radius: 50%; background: var(--navy); box-shadow: 0 4px 0 var(--navy2), 0 8px 18px -6px rgba(39,54,90,.5); }
.tab__fab svg { fill: #fff; width: 26px; height: 26px; }
.tab--rec.is-on { color: var(--navy); }

/* ---------- オンボーディング ---------- */
.ob { padding: 28px 4px 24px; min-height: 100vh; display: flex; flex-direction: column; gap: 14px; }
.ob--welcome { text-align: center; justify-content: center; align-items: center; }
.ob__logo { margin: 8px 0 4px; }
.logo-text { font-size: 32px; font-weight: 800; letter-spacing: .04em; color: var(--navy); }
.logo-text b { color: var(--meal); font-weight: 800; }
.logo-img { width: 260px; }
.ob__trio { display: flex; gap: 6px; justify-content: center; }
.ob__trioc { width: 88px; animation: bob 2.4s ease-in-out infinite; }
.ob__lead { font-size: 18px; font-weight: 800; margin: 4px 0; line-height: 1.7; }
.ob__lead b { color: var(--meal); font-size: 22px; }
.ob__points { list-style: none; padding: 14px 18px; margin: 0 0 6px; background: var(--card); border-radius: var(--r); text-align: left; width: 100%; font-size: 14px; }
.ob__points li { display: flex; gap: 10px; align-items: center; padding: 5px 0; }
.ob__points span { font-size: 20px; }
.ob__co { font-size: 11px; color: var(--ink3); margin: 6px 0 0; }
.ob__dots { display: flex; gap: 6px; }
.ob__dots i { width: 22px; height: 5px; border-radius: 3px; background: var(--line); }
.ob__dots i.is-on { background: var(--navy); }
.ob__h { margin: 8px 0 0; font-size: 22px; font-weight: 800; }
.ob__p { margin: 0 0 6px; color: var(--ink2); font-size: 14px; }
.ob__note { font-size: 11px; color: var(--ink3); text-align: center; margin: 0; }
.ob .btn--lg { margin-top: auto; }
.ob .btn-link { align-self: center; }

.eggs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.egg { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; border-radius: var(--r); background: var(--card); box-shadow: inset 0 0 0 2px transparent; transition: transform .2s, box-shadow .2s; }
.egg__art { width: 84px; animation: wobble 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.egg:nth-child(2) .egg__art { animation-delay: -.8s; }
.egg:nth-child(3) .egg__art { animation-delay: -1.6s; }
.egg__n { font-size: 11px; font-weight: 700; color: var(--ink2); text-align: center; line-height: 1.4; }
.egg.is-on { box-shadow: inset 0 0 0 2.5px var(--c); transform: translateY(-4px); }
.egg.is-on .egg__n { color: var(--ink); }
.egg-hint { min-height: 64px; padding: 12px 14px; border-radius: 14px; background: #F3EDE3; font-size: 13px; color: var(--ink2); }

.ch-art, .face-art, .bg-art { display: block; width: 100%; }
.ch-svg, .egg-svg, .face-svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------- ホーム ---------- */
/* ホームはスクロールさせず、画面の高さに合わせてステージを伸び縮みさせる */
body[data-view="home"] .app { padding-bottom: calc(var(--tabh) + var(--safe-b)); }
.home { display: flex; flex-direction: column; gap: 10px; padding: 10px 0; height: calc(100vh - var(--tabh) - var(--safe-b)); height: calc(100dvh - var(--tabh) - var(--safe-b)); }
.hud { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border-radius: var(--r); box-shadow: 0 1px 0 var(--line); }
.hud__lv { flex: 0 0 52px; height: 52px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--cs); color: var(--ink); font-weight: 800; font-size: 20px; line-height: 1; box-shadow: inset 0 0 0 2px var(--c); }
.hud__lv small { font-size: 10px; color: var(--ink2); }
.hud__m { flex: 1; min-width: 0; }
.hud__n { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp { height: 8px; margin: 4px 0 3px; border-radius: 4px; background: #EFE8DC; overflow: hidden; }
.exp i { display: block; height: 100%; border-radius: 4px; background: var(--c); transition: width .8s cubic-bezier(.2,.9,.3,1); }
.hud__st { flex: 0 0 auto; text-align: center; padding: 4px 8px; border-radius: 12px; background: #FCEBD0; color: #A0661B; line-height: 1.1; }
.hud__st b { display: block; font-size: 18px; font-weight: 800; }
.hud__st small { font-size: 9px; }

.stage { position: relative; flex: 1; min-height: 240px; border-radius: 24px; overflow: hidden; background: #EEF3EE; }
.stage__bg, .stage__bg .bg-art, .stage__bg .bg-svg, .stage__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
/* 画面が低い端末でも頭がふきだしにかからないよう、高さでも上限をかける */
.pet { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); width: min(56%, 46vh); max-width: 250px; }
.pet--s0 { width: min(34%, 26vh); max-width: 150px; }
.pet--s1 { width: min(46%, 36vh); max-width: 200px; }
.pet--s2 { width: min(50%, 40vh); max-width: 220px; }
/* 画像のキャラは縦長なので、ステージの高さを基準に大きさを決める */
.pet--img { width: auto; max-width: none; }
.pet--img.pet--s0 { height: 30%; }
.pet--img.pet--s1 { height: 42%; }
.pet--img.pet--s2 { height: 52%; }
.pet--img.pet--s3 { height: 60%; }
.pet--img.pet--s4 { height: 63%; }
.pet--img .pet__body, .pet--img .ch-art { height: 100%; }
.pet--img img.ch-art { width: auto; margin: 0 auto; }
.pet__body { display: block; position: relative; animation: breathe 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.pet--s0 .pet__body { animation: wobble 2.4s ease-in-out infinite; }
.pet__shadow { position: absolute; left: 18%; right: 18%; bottom: -2%; height: 9%; border-radius: 50%; background: rgba(70,90,60,.18); filter: blur(2px); }
.pet.is-hop .pet__body { animation: hop .5s ease; }
@keyframes bob { 0%,100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-4px) scaleY(1.015); } }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-18px) scale(1.03, .97); } 70% { transform: translateY(0) scale(1.04, .95); } 100% { transform: none; } }
.talk { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: calc(100% - 32px); max-width: 360px; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.94); font-size: 14px; font-weight: 700; text-align: center; box-shadow: 0 4px 14px -8px rgba(60,50,40,.4); z-index: 2; }
.talk::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: rgba(255,255,255,.94); }
.talk.is-pop { animation: pop .3s ease; }
@keyframes pop { 0% { transform: translateX(-50%) scale(.92); } 100% { transform: translateX(-50%) scale(1); } }

.today { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: var(--r); text-align: left; }
.today--todo { background: var(--navy); color: #fff; box-shadow: 0 4px 0 var(--navy2); animation: breathe 2.4s ease-in-out infinite; }
.today--todo:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--navy2); }
@keyframes breathe { 0%,100% { box-shadow: 0 4px 0 var(--navy2), 0 0 0 0 rgba(52,70,111,.3); } 50% { box-shadow: 0 4px 0 var(--navy2), 0 0 0 8px rgba(52,70,111,0); } }
.today__ic { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); font-size: 22px; }
.today__t { flex: 1; }
.today__t b { display: block; font-size: 17px; font-weight: 800; }
.today__t small { font-size: 12px; opacity: .8; }
.today__arr { font-size: 28px; opacity: .7; }
.today--done { background: var(--card); box-shadow: 0 1px 0 var(--line); }
.today--done .today__arr { color: var(--ink3); }
.today__ok { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ex); color: #fff; font-size: 22px; font-weight: 800; }
.today--done small { color: var(--ink2); opacity: 1; }

/* ---------- ドーナツ ---------- */
.ring { position: relative; }
.ring svg { display: block; }
.ring__v { transition: stroke-dashoffset 1s cubic-bezier(.2,.9,.3,1); }
.ring__in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-weight: 800; font-size: 20px; line-height: 1; }
.ring__in small { font-size: 10px; }

/* ---------- 記録 ---------- */
.rec { padding-top: 4px; padding-bottom: 80px; }
.rec__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rec__nav { width: 44px; height: 44px; border-radius: 50%; background: var(--card); font-size: 26px; line-height: 1; color: var(--ink2); box-shadow: 0 1px 0 var(--line); }
.rec__nav[disabled] { opacity: .3; cursor: default; }
.rec__day { font-size: 16px; font-weight: 800; text-align: center; }
.rec__day b { margin-right: 6px; color: var(--navy); }
.rec__copy { display: block; width: 100%; padding: 10px; margin-bottom: 12px; border-radius: 14px; background: #EFE8DC; font-weight: 700; font-size: 14px; color: var(--ink); }
.rec__copy:active { background: #E6DCCB; }
.rsec { background: var(--card); border-radius: var(--r); padding: 14px 12px; margin-bottom: 12px; box-shadow: 0 1px 0 var(--line); }
.rsec__h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin: 0 2px 10px; }
.rsec__h i { width: 6px; height: 18px; border-radius: 3px; }
.rsec__h small { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--ink3); }

.tiles { display: grid; gap: 6px; }
.tiles--5 { grid-template-columns: repeat(5, 1fr); }
.tiles--4 { grid-template-columns: repeat(4, 1fr); }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px 8px; border-radius: 14px; background: #F7F2EA; box-shadow: inset 0 0 0 1.5px transparent; transition: background .15s, box-shadow .15s, transform .1s; }
.tile:active { transform: scale(.95); }
.tile__ic { display: grid; place-items: center; width: 38px; height: 38px; }
.tile__ic .emo { font-size: 26px; line-height: 1; filter: saturate(.8); }
.tile__ic .ic-img { width: 38px; height: 38px; object-fit: contain; }
.tile__l { font-size: 12px; font-weight: 800; line-height: 1.2; text-align: center; white-space: nowrap; letter-spacing: -.02em; }
.tiles--5 .tile__l { font-size: 11px; }
.tile__s { font-size: 9px; color: var(--ink3); line-height: 1.2; text-align: center; white-space: nowrap; letter-spacing: -.03em; }
.tile--meal.is-on { background: #FBEFD4; box-shadow: inset 0 0 0 2px var(--meal); }
.tile--ex.is-on { background: #E2F2EA; box-shadow: inset 0 0 0 2px var(--ex); }
.tile.is-on::after { content: '✓'; position: absolute; top: 4px; right: 6px; font-size: 11px; font-weight: 800; color: var(--ink2); }
.chips--supp .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.chip--supp.is-on, .chip--all.is-on { background: var(--supp); }
.chip__ck { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink3); display: grid; place-items: center; font-size: 10px; }
.chip--supp.is-on .chip__ck { background: #fff; box-shadow: none; }
.chip--supp.is-on .chip__ck::after { content: '✓'; color: var(--supp); font-weight: 800; }
.chip--all { color: var(--supp); box-shadow: inset 0 0 0 1.5px var(--supp); }

.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-radius: 14px; font-size: 10px; color: var(--ink3); }
.mood__e { font-size: 28px; line-height: 1.1; filter: grayscale(.7) opacity(.7); transition: filter .15s, transform .15s; }
.mood__e .ic-img { width: 36px; height: 36px; object-fit: contain; }
.mood.is-on { background: #F3EDE3; color: var(--ink); font-weight: 700; }
.mood.is-on .mood__e { filter: none; transform: scale(1.12); }
.memo { min-height: 64px; resize: none; }
.rec__memo { display: block; margin: -2px auto 8px; }
.rec__bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabh) + var(--safe-b)); z-index: 15; max-width: 480px; margin: 0 auto; padding: 10px 16px 18px; background: linear-gradient(rgba(250,246,238,0), var(--paper) 30%); }
.rec { padding-bottom: 96px; }

/* ---------- レポート ---------- */
.rep { padding-top: 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: #EFE8DC; margin-bottom: 14px; }
.seg__b { min-height: 38px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--ink2); }
.seg__b.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(60,50,40,.12); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.kpi { background: var(--card); border-radius: 16px; padding: 10px 8px; text-align: center; box-shadow: 0 1px 0 var(--line); position: relative; }
.kpi small { display: block; font-size: 10px; color: var(--ink3); }
.kpi b { font-size: 24px; font-weight: 800; line-height: 1.3; }
.kpi b span { font-size: 11px; color: var(--ink2); margin-left: 1px; }
.kpi__d { display: inline-block; margin-left: 3px; vertical-align: 3px; font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 6px; }
.kpi__d.is-up { color: #2F7A5A; background: #E3F1E9; }
.kpi__d.is-down { color: #A9573F; background: #F8E6DE; }

.fb { background: linear-gradient(var(--cs), var(--card) 120px); }
.fb__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fb__head b { display: block; font-size: 15px; }
.fb__head small { font-size: 11px; color: var(--ink3); }
.fb__face { flex: 0 0 56px; width: 56px; }
.fb__i { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
.fb__i p { margin: 0; font-weight: 700; font-size: 14px; }
.fb__i small { display: block; margin-top: 3px; font-size: 12px; color: var(--ink2); }
.fb__ic { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: var(--ink3); }
.fb__i--good .fb__ic, .fb__i--up .fb__ic { background: var(--ex); }
.fb__i--weak .fb__ic, .fb__i--down .fb__ic { background: var(--meal); }
.fb__i--base .fb__ic { background: var(--supp); }

.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: #EFE8DC; stroke-width: 1; }
.chart .ax { font-size: 10px; fill: var(--ink3); font-family: var(--font); }
.chart .ax--now { fill: var(--navy); font-weight: 800; }
.chart .ax--emo { font-size: 15px; }
.chart .val { font-size: 10px; fill: var(--ink2); font-weight: 800; font-family: var(--font); }
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .6s cubic-bezier(.2,.9,.3,1) both; }
.chart .empty { fill: none; stroke: #DDD3C3; stroke-dasharray: 2 2; }
.chart .line { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #fff; stroke: var(--c); stroke-width: 2; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.legend { display: flex; justify-content: center; gap: 14px; font-size: 11px; color: var(--ink2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legend--heat { gap: 4px; align-items: center; }
.legend--heat i { width: 14px; height: 14px; }

.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ringbox { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ringbox b { font-size: 13px; margin-top: 4px; }
.ringbox small { font-size: 10px; color: var(--ink3); }

.hbar { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.hbar__l { display: flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.hbar__e { font-size: 16px; }
.hbar__b { height: 10px; border-radius: 5px; background: #F1EBE1; overflow: hidden; }
.hbar__b i { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .9s cubic-bezier(.2,.9,.3,1); }
.hbar__v { text-align: right; font-weight: 800; }
.hbar__v small { font-size: 10px; color: var(--ink3); }

.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.heat__wd { text-align: center; font-size: 10px; color: var(--ink3); }
.heat__c { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink2); background: #F1EBE1; cursor: pointer; }
.heat__c--1 { background: #E4EEDB; }
.heat__c--2 { background: #C3DEB1; }
.heat__c--3 { background: #93C89A; color: #fff; }
.heat__c--4 { background: #4FA982; color: #fff; }
.heat__c.is-today { box-shadow: 0 0 0 2px var(--navy); }
.legend--heat i.heat__c--1 { background: #E4EEDB; }
.legend--heat i.heat__c--2 { background: #C3DEB1; }
.legend--heat i.heat__c--3 { background: #93C89A; }
.legend--heat i.heat__c--4 { background: #4FA982; }

/* ---------- 成長（レポート画面の上と下） ---------- */
.grow__hero { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--cs), var(--card)); }
.grow__art { flex: 0 0 104px; }
.grow__info { flex: 1; min-width: 0; }
.grow__info .exp { margin: 2px 0 4px; }
.grow__name { font-size: 20px; font-weight: 800; }
.grow__kind { font-size: 12px; color: var(--ink2); }
.grow__lv { margin-top: 6px; font-size: 14px; }
.grow__lv b { font-size: 28px; font-weight: 800; }
.grow__next { font-size: 12px; color: var(--ink2); }
.gsteps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gstep { text-align: center; font-size: 11px; opacity: .55; }
.gstep.is-open { opacity: 1; }
.gstep__art { height: 74px; display: grid; place-items: end center; margin-bottom: 4px; border-radius: 12px; background: #F7F2EA; padding: 6px 4px 4px; }
.gstep__art .ch-art { width: 100%; max-width: 56px; }
.gstep.is-now .gstep__art { box-shadow: inset 0 0 0 2px var(--c); background: var(--cs); }
.gstep__lock { align-self: center; font-size: 22px; font-weight: 800; color: var(--ink3); }
.gstep b { display: block; font-size: 11px; }
.gstep small { font-size: 9px; color: var(--ink3); }
.prof p { margin: 0 0 8px; font-size: 13px; color: var(--ink2); }
.prof__adult b { color: var(--ink); }

/* ---------- 記録（1画面1問のカード） ---------- */
body[data-view="record"] .app { padding-bottom: calc(var(--tabh) + var(--safe-b)); }
.rec2 { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 12px; height: calc(100vh - var(--tabh) - var(--safe-b)); height: calc(100dvh - var(--tabh) - var(--safe-b)); }
.rec2__top { display: flex; align-items: center; justify-content: space-between; }
.prog { display: flex; gap: 4px; }
.prog i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .25s; }
.prog i.is-done { background: var(--c); }
.prog i.is-now { background: var(--navy); }
.deck { position: relative; flex: 1; min-height: 0; display: grid; perspective: 900px; }
.qc { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px 18px; border-radius: 26px; background: var(--card); box-shadow: 0 1px 0 var(--line), 0 14px 30px -18px rgba(80,60,40,.45); overflow-y: auto; text-align: center; }
.qc--sum { justify-content: flex-start; }
.qc.in-r { animation: inR .34s cubic-bezier(.2,.9,.3,1) both; }
.qc.in-l { animation: inL .34s cubic-bezier(.2,.9,.3,1) both; }
.qc.out-l { animation: outL .34s ease-in both; pointer-events: none; }
.qc.out-r { animation: outR .34s ease-in both; pointer-events: none; }
@keyframes inR { from { transform: translateX(46%) rotate(5deg) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inL { from { transform: translateX(-46%) rotate(-5deg) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes outL { to { transform: translateX(-115%) rotate(-12deg); opacity: 0; } }
@keyframes outR { to { transform: translateX(115%) rotate(12deg); opacity: 0; } }
.qc__ic { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: var(--cs); }
.qc__ic .emo { font-size: 46px; line-height: 1; }
.qc__ic .ic-img { width: 64px; height: 64px; object-fit: contain; }
.qc__t { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.4; }
.qc__t--sm { font-size: 17px; }
.qc__s { margin: -8px 0 0; font-size: 12px; color: var(--ink3); }
.qc__next { margin-top: 2px; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 320px; }
.yn__b { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 0 12px; border-radius: 22px; background: #F7F2EA; font-weight: 800; font-size: 15px; color: var(--ink2); transition: transform .12s, background .15s, color .15s; }
.yn__b span { font-size: 34px; line-height: 1; }
.yn__b:active { transform: scale(.94); }
.yn__b--y.is-on { background: var(--ex); color: #fff; }
.yn__b--n.is-on { background: #A99D90; color: #fff; }
.opts { display: grid; gap: 10px; width: 100%; max-width: 340px; }
.opts--2 { grid-template-columns: 1fr 1fr; }
.opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 4px 12px; border-radius: 20px; background: #F7F2EA; transition: transform .12s, background .15s; }
.opt:active { transform: scale(.95); }
.opt__ic .emo { font-size: 32px; line-height: 1.1; }
.opt__ic .ic-img { width: 44px; height: 44px; object-fit: contain; }
.opt b { font-size: 15px; }
.opt small { font-size: 11px; color: var(--ink3); }
.opt.is-on { background: #E2F2EA; box-shadow: inset 0 0 0 2.5px var(--ex); }
.chips--c { justify-content: center; }
.moods--q { width: 100%; }
.moods--q .mood__e { font-size: 36px; }
.sum { width: 100%; text-align: left; }
.sum__r { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 9px 4px; border-bottom: 1px dashed var(--line); font-size: 14px; font-weight: 700; }
.sum__r b { min-width: 40px; text-align: center; padding: 2px 10px; border-radius: 999px; background: #F1EBE1; color: var(--ink2); }
.sum__r b.is-y { background: #E3F1E9; color: #2F7A5A; }
.sum__r b.is-n { background: #F1EBE1; color: var(--ink3); }
.qc--sum .btn { width: 100%; }
.qc--sum .memo { min-height: 56px; }
.rec2__foot { display: flex; justify-content: space-between; min-height: 36px; }

/* ---------- 画像ヘッダー（レポート・コラム） ---------- */
body[data-view="report"] .screen, body[data-view="column"] .screen { padding-top: 0; }
.hero { position: relative; margin: 0 -16px 6px; height: 170px; overflow: hidden; background: #E6F0EE; }
.hero__img, .hero__img .hero-img, .hero__img .hero-fb { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img .hero-img { object-fit: cover; object-position: 50% 60%; }
.hero--report .hero__img .hero-img { object-position: 50% 34%; }
.hero-fb .bg-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-fb__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-fb__ch { position: absolute; right: 7%; bottom: 14px; width: 92px; }
.hero-fb__ch:has(img) { width: auto; height: 74%; }
.hero-fb__ch img.ch-art { height: 100%; width: auto; }
.hero__t { position: absolute; left: 18px; top: 22px; margin: 0; padding: 4px 14px; border-radius: 999px; background: rgba(255,253,248,.92); font-size: 20px; font-weight: 800; letter-spacing: .04em; }
.hero__t--img { left: 10px; top: 12px; padding: 0; background: none; }
.hero__t--img .hero__tx { display: inline-block; padding: 4px 14px; border-radius: 999px; background: rgba(255,253,248,.92); }
.hero__logo { display: block; height: 52px; width: auto; max-width: 62vw; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(90,70,50,.18)); }
.hero__t--img + .hero__badge { top: 70px; }
.hero__badge { position: absolute; left: 18px; top: 66px; }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 26px; fill: var(--paper); }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255,253,248,.92); font-size: 12px; font-weight: 800; color: var(--ink2); }
.pill.is-todo { background: var(--meal); color: #fff; }
.pill.is-done { color: var(--ex); }

/* ---------- はじめのアンケート ---------- */
.sv { gap: 12px; }
body:not(.is-ob) .sv { min-height: 0; padding-top: 4px; }
.sv__top { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.sv__top .btn-link { padding-left: 0; }
.sv__n { font-size: 12px; font-weight: 700; color: var(--ink3); }
.sv__bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.sv__bar i { display: block; height: 100%; border-radius: 3px; background: var(--navy); transition: width .3s; }
.sv__intro { padding: 12px 14px; border-radius: 14px; background: #FBEFD4; font-size: 13px; line-height: 1.7; }
.sq { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 16px; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.sq__l { display: flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 14px; }
.sq__l span { font-size: 18px; }
.sq__l small { font-weight: 500; font-size: 11px; color: var(--ink3); }
.freq { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.freq--wk { grid-template-columns: repeat(4, 1fr); gap: 4px; }
.freq--3 .freq__b:last-child { grid-column: span 2; }
.freq__b { min-height: 42px; padding: 0 4px; border-radius: 10px; background: #F7F2EA; font-size: 13px; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.freq--wk .freq__b { font-size: 12px; }
.freq__b.is-on { background: var(--navy); color: #fff; }
.tiles--3 { grid-template-columns: repeat(3, 1fr); }
.moods--lg .mood { padding: 12px 0; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.moods--lg .mood__e { font-size: 34px; }
.moods--lg .mood.is-on { box-shadow: inset 0 0 0 2px var(--navy); }

/* はじめた時からの変化（レポート） */
.base__p { margin: 0 0 10px; font-size: 13px; color: var(--ink2); }
.base__sum { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 8px 14px; margin-bottom: 8px; border-bottom: 1px dashed var(--line); text-align: center; line-height: 1.1; }
.base__sum small { display: block; font-size: 10px; color: var(--ink3); margin-bottom: 4px; }
.base__sum b { font-size: 30px; font-weight: 800; }
.base__sum span { font-size: 11px; color: var(--ink2); }
.base__sum > div:first-child b { color: var(--ink3); }
.base__arr { font-size: 20px; color: var(--ink3); }
.base__d { padding: 4px 10px; border-radius: 999px; font-size: 14px; font-weight: 800; }
.base__d.is-up { color: #2F7A5A; background: #E3F1E9; }
.base__d.is-down { color: #A9573F; background: #F8E6DE; }
.cmp__legend { display: flex; justify-content: flex-end; gap: 12px; font-size: 10px; color: var(--ink3); margin-bottom: 2px; }
.cmp__legend span { display: inline-flex; align-items: center; gap: 4px; }
.cmp__legend i { display: inline-block; width: 12px; height: 5px; border-radius: 3px; }
.cmp { display: grid; grid-template-columns: 88px 1fr 108px; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.cmp__l { display: flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.cmp__l span { font-size: 15px; }
.cmp__bars { display: flex; flex-direction: column; gap: 3px; }
.cmp__bars i { display: block; height: 6px; width: 0; border-radius: 3px; transition: width .9s cubic-bezier(.2,.9,.3,1); }
i.cmp__b0 { background: #D9CFC0; }
.cmp__v { text-align: right; font-weight: 800; white-space: nowrap; }
.cmp__v small { display: block; font-size: 10px; font-weight: 500; color: var(--ink3); }
.cmp__v em { font-style: normal; margin-left: 4px; font-size: 10px; padding: 0 5px; border-radius: 6px; color: var(--ink3); background: #F1EBE1; }
.cmp__v em.is-up { color: #2F7A5A; background: #E3F1E9; }
.cmp__v em.is-down { color: #A9573F; background: #F8E6DE; }
.cmp__moods { font-size: 20px; display: flex; align-items: center; gap: 6px; }
.cmp__moods small { font-size: 12px; color: var(--ink3); }

/* ---------- コラム ---------- */
.cols { padding-top: 4px; }
.colcard { display: block; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px; border-radius: var(--r); background: var(--card); box-shadow: 0 1px 0 var(--line), 0 6px 18px -12px rgba(80,60,40,.25); }
.colcard:active { transform: scale(.99); }
.colcard__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.colcard__read { font-size: 11px; font-weight: 700; color: var(--ex); }
.colcard__t { display: block; font-size: 16px; font-weight: 800; line-height: 1.45; }
.colcard__l { display: block; margin-top: 4px; font-size: 12px; color: var(--ink2); }
.colcard__src { display: block; margin-top: 8px; font-size: 10px; color: var(--ink3); }
.ctag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--tc); box-shadow: inset 0 0 0 1.5px var(--tc); }

.art { padding: 0 2px 24px; }
.art__back { margin-left: -4px; }
.art__t { margin: 10px 0 6px; font-size: 21px; font-weight: 800; line-height: 1.45; }
.art__lead { margin: 0 0 14px; font-size: 14px; color: var(--ink2); }
.art__body { padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: 0 1px 0 var(--line); font-size: 15px; line-height: 1.85; }
.art__body p { margin: 0 0 12px; }
.art__body h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 800; }
.art__body h3:first-child { margin-top: 0; }
.art__body ul { margin: 0 0 12px; padding-left: 1.2em; }
.art__body li { margin-bottom: 4px; }
.art__body > :last-child { margin-bottom: 0; }
.art__src { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #EFE8DC; font-size: 12px; }
.art__src b { display: block; margin-bottom: 4px; }
.art__src ul { list-style: none; margin: 0; padding: 0; }
.art__src li { padding: 6px 0; border-top: 1px dashed #DDD3C3; line-height: 1.6; }
.art__src li:first-child { border-top: 0; }
.art__src a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.art__src a::after { content: ' ↗'; text-decoration: none; display: inline-block; margin-left: 2px; }
.art__top { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
.art__end { display: block; height: 1px; }
.art__note { margin: 12px 2px 16px; font-size: 11px; line-height: 1.7; color: var(--ink3); }

/* ---------- せってい ---------- */
.sw { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 15px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw__k { position: relative; flex: 0 0 52px; height: 30px; border-radius: 15px; background: #D9CFC0; transition: background .2s; }
.sw__k::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.sw input:checked + .sw__k { background: var(--ex); }
.sw input:checked + .sw__k::after { transform: translateX(22px); }
.set { padding-top: 4px; }
.slist { list-style: none; margin: 0 0 4px; padding: 0; }
.slist li { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px; border-bottom: 1px dashed var(--line); font-weight: 700; }
.slist__x { width: 36px; height: 36px; border-radius: 50%; font-size: 18px; color: var(--ink3); }
.card.is-flash { animation: flash 1.2s ease; }
@keyframes flash { 0%,60% { box-shadow: 0 0 0 3px var(--supp); } 100% { box-shadow: 0 1px 0 var(--line); } }

/* ---------- シート・トースト・報酬 ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; }
.sheet-wrap[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(40,34,28,.4); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; max-height: 85vh; overflow: auto; padding: 8px 20px calc(20px + var(--safe-b)); background: var(--card); border-radius: 22px 22px 0 0; animation: up .25s ease; }
.sheet .btn { width: 100%; margin-top: 8px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 12px; }
.sheet__h { margin: 0 0 10px; font-size: 18px; }
.sheet__p { color: var(--ink2); font-size: 14px; }
.dd__score { font-size: 40px; font-weight: 800; line-height: 1; margin-bottom: 8px; }
.dd__score small { font-size: 14px; color: var(--ink2); }
.dd { display: grid; grid-template-columns: 56px 1fr; gap: 8px 10px; margin: 0 0 8px; font-size: 14px; }
.dd dt { color: var(--ink3); font-size: 12px; font-weight: 700; padding-top: 2px; }
.dd dd { margin: 0; }

.toast-wrap { position: fixed; left: 0; right: 0; top: 16px; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 999px; background: rgba(52,70,111,.95); color: #fff; font-size: 14px; font-weight: 700; animation: up .25s ease; }
.toast.out { opacity: 0; transition: opacity .25s; }

.reward { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(40,34,28,.5); }
.reward[hidden] { display: none; }
.reward__box { width: 100%; max-width: 340px; padding: 22px 20px 20px; border-radius: 24px; background: var(--card); text-align: center; animation: popin .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes popin { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.reward__art { width: 150px; margin: 0 auto 8px; }
.reward__t { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.reward__d { font-size: 14px; color: var(--ink2); margin-bottom: 14px; }
.reward .btn { width: 100%; }
.reward .btn[hidden] { display: none; }
.hatch { animation: shake .5s ease-in-out 3; transform-origin: 50% 90%; }
.hatch.is-born { animation: popin .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }

.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; opacity: .9; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); } }

/* =========================================================
   水彩のUI：面の背景を ::before に移し、そこにだけ「にじみ」をかける
   （文字はにじませない）。縁に色がたまる表現と紙の質感も ::before で描く
   ========================================================= */
.card, .qc, .colcard, .hud, .today, .kpi, .sq, .art__body, .art__src, .reward__box,
.btn:not(.btn--danger), .yn__b, .opt, .egg, .ob__points, .sv__intro, .egg-hint, .tab__fab, .talk, .rec__nav, .seg {
  background: none; box-shadow: none; isolation: isolate;
}
.card, .qc, .colcard, .hud, .today, .kpi, .sq, .art__body, .art__src, .reward__box,
.btn:not(.btn--danger), .yn__b, .opt, .egg, .ob__points, .sv__intro, .egg-hint, .tab__fab, .rec__nav, .seg { position: relative; }
.card::before, .qc::before, .colcard::before, .hud::before, .today::before, .kpi::before, .sq::before, .art__body::before,
.art__src::before, .reward__box::before, .btn:not(.btn--danger)::before, .yn__b::before, .opt::before, .egg::before,
.ob__points::before, .sv__intro::before, .egg-hint::before, .tab__fab::before, .talk::before, .rec__nav::before, .seg::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--wc-bg, var(--card));
  box-shadow: var(--wc-ring, 0 0 #0000), inset 0 0 0 1px var(--wc-rim, rgba(140,110,80,.13)), inset 0 0 14px var(--wc-pool, rgba(175,145,105,.17));
  filter: url(#wcEdge) drop-shadow(0 5px 8px rgba(90,70,50,var(--wc-drop, .07)));
  transition: background .15s;
}
/* 紙の質感（大きめの面だけ） */
.card::before, .qc::before, .colcard::before, .art__body::before, .reward__box::before {
  background: var(--paper-grain), var(--wc-bg, var(--card));
}
:root { --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .42 0 0 0 0 .32 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }

.fb { --wc-bg: linear-gradient(var(--cs), var(--card) 120px); }
.grow__hero { --wc-bg: linear-gradient(135deg, var(--cs), var(--card)); }
.art__src, .seg { --wc-bg: #EFE8DC; --wc-drop: 0; }
.sv__intro { --wc-bg: #FBEFD4; --wc-drop: 0; }
.egg-hint { --wc-bg: #F3EDE3; --wc-drop: 0; }
.talk { --wc-bg: rgba(255,255,255,.94); --wc-pool: rgba(175,145,105,.10); }
.today--todo, .btn, .tab__fab { --wc-bg: var(--navy); --wc-rim: rgba(20,30,60,.35); --wc-pool: rgba(15,25,55,.45); --wc-drop: .18; }
.btn[disabled] { --wc-bg: #C9C1B6; --wc-rim: rgba(90,80,70,.2); --wc-pool: rgba(90,80,70,.2); --wc-drop: 0; }
.btn--sub { --wc-bg: #EFE8DC; --wc-rim: rgba(140,110,80,.16); --wc-pool: rgba(175,145,105,.22); --wc-drop: .05; }
.yn__b, .opt { --wc-bg: #F7F2EA; --wc-drop: 0; }
.yn__b--y.is-on { --wc-bg: var(--ex); --wc-rim: rgba(30,90,60,.3); --wc-pool: rgba(25,85,55,.35); }
.yn__b--n.is-on { --wc-bg: #A99D90; --wc-rim: rgba(80,70,60,.3); --wc-pool: rgba(70,60,50,.3); }
.opt.is-on { --wc-bg: #E2F2EA; --wc-ring: inset 0 0 0 2.5px var(--ex); }
.egg.is-on { --wc-ring: inset 0 0 0 2.5px var(--c); }
.rec__nav { --wc-drop: .05; }
.today--todo { animation: none; }
.btn:active, .today--todo:active { box-shadow: none; }

/* グラフや丸いゲージの線も、すこしゆらがせる */
.chart .bar, .ring__v, .exp i, .hbar__b i, .cmp__bars i, .prog i { filter: url(#wcEdgeS); }
.sum__r, .fb__i, .slist li, .art__src li { border-color: rgba(170,150,120,.35); }

/* 水彩の線の画像（brush-line1）が用意できたら、区切り線をそれに差しかえる */
body.has-brush .sum__r, body.has-brush .fb__i, body.has-brush .slist li { border: 0; background: url("../img/brush-line1.webp") left bottom / 100% 6px no-repeat; }
body.has-brush .fb__i { background-position: left top; }
body.has-brush .qc__ic { background: url("../img/blob-ochre.webp") center / contain no-repeat; }
body.has-brush .qc--supp .qc__ic { background-image: url("../img/blob-sky.webp"); }
.yn__b .mark-img { width: 38px; height: 38px; object-fit: contain; }
.yn__b.is-on .mark-img { filter: brightness(0) invert(1); }

/* =========================================================
   ふわふわの演出：たんぽぽの綿毛・やわらかい光の玉
   ========================================================= */
.app { position: relative; z-index: 1; }
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(18px); opacity: .55; animation: orb 9s ease-in-out infinite alternate; }
@keyframes orb { from { transform: scale(.9); opacity: .35; } to { transform: scale(1.12); opacity: .65; } }
.fluff { position: absolute; bottom: -60px; width: 30px; animation: fly linear infinite; }
.fluff > span { display: block; animation: sway 4.5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.fluff svg, .fluff img { display: block; width: 100%; height: auto; }
@keyframes fly { from { transform: translate(0, 0) rotate(-8deg); } to { transform: translate(var(--dx, 25vw), -118vh) rotate(18deg); } }
@keyframes sway { from { transform: translateX(-10px) rotate(-10deg); } to { transform: translateX(10px) rotate(10deg); } }
.stage__deco { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.stage__deco .fluff { bottom: -40px; }
.stage__deco .fluff { --dx: 40%; }
.leaf-fall { position: absolute; top: -40px; width: 22px; animation: fall-leaf linear infinite; }
.leaf-fall > span { display: block; animation: sway 3s ease-in-out infinite alternate; }
.leaf-fall svg, .leaf-fall img { display: block; width: 100%; height: auto; }
@keyframes fall-leaf { from { transform: translate(0, 0) rotate(0); } to { transform: translate(-30px, 520px) rotate(220deg); } }
.pet { z-index: 2; }
.talk { z-index: 3; }

/* =========================================================
   ホームの「生きている感じ」（homefx.js）
   ========================================================= */
/* キャラ：ふだんは呼吸してゆらゆら。ときどきのアクションとタップの反応 */
@keyframes breathe { 0%,100% { transform: translateY(0) scale(1, 1) rotate(-1.2deg); } 50% { transform: translateY(-3px) scale(.985, 1.03) rotate(1.2deg); } }
.pet__body.act-hop     { animation: a-hop .9s ease; }
.pet__body.act-joy     { animation: a-joy .9s ease; }
.pet__body.act-tilt    { animation: a-tilt 1.4s ease-in-out; }
.pet__body.act-stretch { animation: a-stretch 1.4s ease-in-out; }
.pet__body.act-look    { animation: a-look 1.4s ease-in-out; }
.pet__body.act-sway    { animation: a-sway 1.8s ease-in-out; }
.pet__body.act-spin    { animation: a-spin .9s ease-in-out; }
.pet__body.act-squash  { animation: a-squash .7s ease; }
.pet__body.act-dizzy   { animation: a-dizzy 2s ease-in-out; }
.pet__body.act-wobble  { animation: a-wobble .9s ease-in-out; }
@keyframes a-hop { 20% { transform: scale(1.06, .92); } 45% { transform: translateY(-26px) scale(.95, 1.06); } 70% { transform: scale(1.08, .9); } 85% { transform: scale(.98, 1.02); } }
@keyframes a-joy { 15% { transform: scale(1.08, .9); } 40% { transform: translateY(-38px) scale(.94, 1.08) rotate(-6deg); } 60% { transform: translateY(-30px) rotate(6deg); } 80% { transform: scale(1.1, .88); } }
@keyframes a-tilt { 25%, 70% { transform: rotate(-9deg); } }
@keyframes a-stretch { 40%, 60% { transform: scale(.93, 1.1); } 80% { transform: scale(1.04, .96); } }
@keyframes a-look { 20%, 60% { transform: scaleX(-1); } }
@keyframes a-sway { 20% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } 80% { transform: rotate(-4deg); } }
@keyframes a-spin { 50% { transform: translateY(-16px) rotateY(180deg); } 100% { transform: rotateY(360deg); } }
@keyframes a-squash { 30% { transform: scale(1.22, .74); } 60% { transform: scale(.9, 1.12); } 80% { transform: scale(1.04, .97); } }
@keyframes a-dizzy { 10%, 30%, 50%, 70% { transform: rotate(-14deg) translateX(-6px); } 20%, 40%, 60%, 80% { transform: rotate(14deg) translateX(6px); } }
@keyframes a-wobble { 20%, 60% { transform: rotate(-12deg); } 40%, 80% { transform: rotate(12deg); } }

/* 空：時間帯の色・星・虹・流れる雲・風のすじ */
.fx-tint { position: absolute; inset: 0; pointer-events: none; }
.fx-tint--morning { background: linear-gradient(180deg, rgba(255,215,150,.24), rgba(255,240,210,0) 55%); }
.fx-tint--evening { background: linear-gradient(180deg, rgba(255,150,90,.32), rgba(255,190,130,.12) 60%, rgba(120,80,60,.08)); }
.fx-tint--night { background: linear-gradient(180deg, rgba(25,35,85,.55), rgba(30,40,90,.32) 60%, rgba(20,25,60,.35)); }
.fx-star { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #FFF8DC; box-shadow: 0 0 6px #FFF3B0; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; transform: scale(.6); } }
.fx-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fx-rainbow { position: absolute; left: 10%; top: 9%; width: 68%; opacity: .75; animation: fadein 2s ease both; }
.fx-rainbow img { display: block; width: 100%; }
.fx-rainbow__css { display: block; aspect-ratio: 2 / 1; border-radius: 999px 999px 0 0; filter: blur(1.2px);
  background: radial-gradient(circle at 50% 100%, transparent 55%, rgba(155,125,210,.35) 56%, rgba(110,160,220,.35) 60%, rgba(120,190,140,.35) 64%, rgba(240,210,110,.38) 68%, rgba(240,160,110,.35) 72%, transparent 73%); }
@keyframes fadein { from { opacity: 0; } }
.fx-cloud { position: absolute; left: -40%; animation: cloud linear infinite; }
.fx-cloud img { display: block; width: 100%; opacity: .9; }
@keyframes cloud { to { left: 108%; } }
.fx-wind { position: absolute; left: -60%; width: 55%; opacity: 0; }
.fx-wind img { display: block; width: 100%; }
.fx-wind.is-on { animation: windgo 2.6s ease-in-out; }
@keyframes windgo { 0% { left: -60%; opacity: 0; } 20% { opacity: .9; } 80% { opacity: .8; } 100% { left: 110%; opacity: 0; } }
.fx-wind__css { display: block; height: 22px; border-top: 2.5px solid rgba(255,255,255,.85); border-radius: 50%; }
.fx-wind__css::after { content: ""; display: block; width: 70%; height: 14px; margin: 6px 0 0 18%; border-top: 2px solid rgba(255,255,255,.7); border-radius: 50%; }

/* 生きもの・小物（タップできる） */
.fx-crit { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fx-tap { position: absolute; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; line-height: 1; }
.fx-tap img, .fx-tap > span > img { display: block; width: 100%; height: auto; }
.fx-emo { display: block; font-size: 22px; line-height: 1; }
.fx-bfly { width: 32px; left: 18%; top: 44%; animation: bfly 22s ease-in-out infinite; }
.fx-flap { display: block; animation: flap .32s ease-in-out infinite alternate; }
@keyframes flap { to { transform: scaleX(.35); } }
@keyframes bfly { 0%, 100% { left: 14%; top: 46%; } 20% { left: 34%; top: 30%; } 40% { left: 68%; top: 42%; } 60% { left: 80%; top: 26%; } 80% { left: 42%; top: 52%; } }
.fx-bug { width: 22px; bottom: 12%; left: -8%; animation: crawl 42s linear infinite; }
.fx-bug .fx-emo { font-size: 18px; }
@keyframes crawl { to { left: 108%; } }
.fx-bfly.is-away, .fx-bug.is-away { animation-play-state: paused; pointer-events: none; }
.fx-bfly.is-away > span, .fx-bug.is-away > span { transform: translate(110px, -240px) rotate(25deg); opacity: 0; transition: transform 1.3s ease-in, opacity 1.3s ease-in; }
.fx-bird { width: 36px; bottom: 12%; animation: birdin .7s ease-out both; }
.fx-bird > span { display: block; animation: birdhop 2.4s ease-in-out .7s infinite; }
.fx-bird.is-away { animation: birdout 1.3s ease-in forwards; pointer-events: none; }
@keyframes birdin { from { transform: translate(-80px, -140px); opacity: 0; } }
@keyframes birdhop { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(-8px); } 80% { transform: none; } 88% { transform: translateY(-5px) scaleX(-1); } }
@keyframes birdout { to { transform: translate(150px, -280px) rotate(-10deg); opacity: 0; } }
.fx-bubble { bottom: 12%; animation: rise 9s linear forwards; }
@keyframes rise { 25% { transform: translate(14px, -100px); } 50% { transform: translate(-10px, -200px); } 75% { transform: translate(12px, -300px); } 100% { transform: translate(-6px, -400px); opacity: 0; } }
.fx-bubble__css { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(150,190,220,.65);
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.95) 0 12%, rgba(255,255,255,.15) 30%, rgba(180,215,240,.25) 70%, rgba(220,190,240,.35) 100%); }
.fx-clover { width: 30px; bottom: 12%; animation: popin .6s cubic-bezier(.2,1.4,.4,1) both; }
.fx-clover > span { display: block; animation: a-wobble 3s ease-in-out infinite; }
.fx-clover.is-got { transform: translateY(-34px) scale(1.5); opacity: 0; transition: .7s; }

/* 手前の草（風でそよぐ）とつぼみ */
.fx-fg { position: absolute; left: 0; right: 0; bottom: 0; height: 13%; z-index: 3; pointer-events: none; }
.fx-fg__grass { position: absolute; left: -3%; right: -3%; top: 0; bottom: 0; transform-origin: 50% 100%; animation: grass 4.2s ease-in-out infinite; }
.fx-fg__grass img, .fx-fg__grass svg { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
@keyframes grass { 50% { transform: skewX(-3deg); } }
.is-windy .fx-fg__grass { animation: grasswind 1s ease-in-out 3; }
@keyframes grasswind { 50% { transform: skewX(-9deg); } }
.is-windy .stage__deco .fluff > span { animation-duration: 1.2s; }
.fx-bud { bottom: 30%; width: 34px; height: 34px; transform-origin: 50% 100%; animation: budsway 3s ease-in-out infinite alternate; }
.fx-bud__b, .fx-bud__o { position: absolute; inset: 0; transition: transform .45s cubic-bezier(.2,1.4,.4,1); }
.fx-bud__b img { transform: scale(.6); }
.fx-bud__o { transform: scale(0) rotate(-60deg); }
.fx-bud.is-open .fx-bud__b { transform: scale(0); }
.fx-bud.is-open .fx-bud__o { transform: none; }
@keyframes budsway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }

/* きらきら・音符 */
.fx-burst { position: absolute; z-index: 5; width: 0; height: 0; pointer-events: none; }
.fx-burst i { position: absolute; left: -10px; top: -10px; width: 20px; animation: burst .9s ease-out forwards; }
.fx-burst i img { display: block; width: 100%; }
.fx-burst .fx-emo { font-size: 16px; }
@keyframes burst { from { transform: translate(0, 0) scale(.4); opacity: 1; } to { transform: translate(var(--tx), var(--ty)) scale(1); opacity: 0; } }
.fx-note { position: absolute; z-index: 5; width: 22px; pointer-events: none; animation: note 2.2s ease-out forwards; }
.fx-note img { display: block; width: 100%; }
.fx-note .fx-emo { font-size: 22px; color: var(--navy); font-weight: 800; }
@keyframes note { 0% { transform: translateY(0) scale(.5); opacity: 0; } 20% { opacity: 1; transform: translateY(-10px) scale(1); } 100% { transform: translate(14px, -70px) rotate(14deg); opacity: 0; } }
.stage__deco .fluff { pointer-events: auto; cursor: pointer; }
.stage__deco .fluff.is-pop { opacity: 0; transition: opacity .25s; }
.talk { z-index: 6; }

/* =========================================================
   ホーム：背景を画面いっぱい（タブバーの裏まで）に広げ、その上にレベル表示・ふきだし・ボタンを浮かべる
   --feet はキャラの足もとの高さ（画面の下から）
   ========================================================= */
.home { position: relative; display: block; padding: calc(10px + env(safe-area-inset-top, 0px)) 0 0;
  --feet: calc(var(--tabh) + var(--safe-b) + 34px); }
.home .hud { position: relative; z-index: 7; }
.home .stage { position: absolute; left: -16px; right: -16px; top: 0; bottom: calc(-1 * (var(--tabh) + var(--safe-b)));
  flex: none; min-height: 0; border-radius: 0; margin: 0; }
.home .talk { top: calc(96px + env(safe-area-inset-top, 0px)); }
body[data-view="home"] .tabbar { background: rgba(255,253,248,.8); border-top-color: rgba(234,225,211,.6); }

/* キャラ：足もとを --feet に、大きさは「ふきだしの下から足もとまで」の高さに合わせる */
.home .pet { bottom: var(--feet); left: 44%; }
.home .pet--img.pet--s0 { height: calc((100% - var(--feet) - 205px) * .34); }
.home .pet--img.pet--s1 { height: calc((100% - var(--feet) - 205px) * .52); }
.home .pet--img.pet--s2 { height: calc((100% - var(--feet) - 205px) * .64); }
.home .pet--img.pet--s3 { height: calc((100% - var(--feet) - 205px) * .74); }
.home .pet--img.pet--s4 { height: min(calc((100% - var(--feet) - 205px) * .8), 440px); }
.home .fx-fg { bottom: calc(var(--feet) - 52px); height: 86px; }
.home .fx-bug { bottom: calc(var(--feet) + 2px); }
.home .fx-bird, .home .fx-clover { bottom: calc(var(--feet) + 4px); }
.home .fx-bubble { bottom: calc(var(--feet) + 20px); }

/* 右下の丸い記録ボタン（水彩のまる。画像 btn-record / btn-done があればそれを使う） */
.recbtn { position: absolute; right: 4px; bottom: 14px; z-index: 7; width: 108px; height: 108px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: #fff; isolation: isolate;
  animation: recpulse 2.6s ease-in-out infinite; transition: transform .12s; }
.recbtn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5A6E99, var(--navy) 62%, #2A3A5E);
  box-shadow: inset 0 0 0 3px rgba(255,253,248,.85), inset 0 0 18px rgba(15,25,55,.45), 0 0 0 5px rgba(255,253,248,.55);
  filter: url(#wcEdge) drop-shadow(0 8px 10px rgba(30,40,70,.28)); }
.recbtn::after { content: ""; position: absolute; inset: -10px; z-index: -2; border-radius: 50%; border: 2px dashed rgba(255,253,248,.85); animation: recring 9s linear infinite; }
.recbtn:active { transform: scale(.92); }
.recbtn__ic { font-size: 26px; line-height: 1; }
.recbtn b { font-size: 17px; font-weight: 800; letter-spacing: .06em; line-height: 1.25; }
.recbtn small { font-size: 10px; font-weight: 700; opacity: .85; }
.recbtn--done { color: #fff; animation: none; }
.recbtn--done::before { background: radial-gradient(circle at 35% 30%, #7CC4A2, var(--ex) 62%, #3A8A66); box-shadow: inset 0 0 0 3px rgba(255,253,248,.85), inset 0 0 18px rgba(25,85,55,.4), 0 0 0 5px rgba(255,253,248,.55); }
.recbtn--done::after { display: none; }
.recbtn.has-art::before, .recbtn.has-art::after { display: none; }
.recbtn__art { position: absolute; inset: -6%; width: 112%; height: 112%; z-index: -1; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(30,40,70,.25)); }
@keyframes recpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes recring { to { transform: rotate(360deg); } }

/* キャラの吹き出し：左にキャラの顔、キャラの色のふち。しっぽはキャラのほうへ */
.home .talk { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 22px; text-align: left; font-size: 14px; line-height: 1.55;
  --wc-bg: rgba(255,253,248,.95); --wc-ring: inset 0 0 0 2.5px var(--c); --wc-pool: rgba(175,145,105,.12); }
.home .talk::after { left: 44%; bottom: -12px; margin-left: -10px; border-width: 13px 10px 0; border-top-color: var(--c); filter: url(#wcEdgeS); }
.talk__face { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--cs); overflow: hidden; }
.talk__face .face-art, .talk__face .ch-art, .talk__face img, .talk__face svg { width: 34px; height: 34px; object-fit: contain; }
.talk__t { flex: 1; min-width: 0; }
/* ふちの画像（talk-frame / talk-tail）があるとき */
/* talk-frame は 1492×584。角（若葉・きらめき込み）を伸ばさないよう、上33%・右13.5%・下20%・左15.5% を角として扱う（表示は約0.16倍） */
.home .talk.has-frame { border-style: solid; border-color: transparent; border-width: 30px 32px 19px 37px; padding: 0 2px;
  border-image: url("../img/talk-frame.webp") 33% 13.5% 20% 15.5% fill / 30px 32px 19px 37px stretch; }
.home .talk.has-frame::before, .home .talk.has-frame::after { display: none; }
.talk__tail { position: absolute; left: 44%; bottom: -45px; width: 55px; transform: translateX(-50%); }

/* メニューアイコンの画像（tab-*）があるとき */
.tab__img { display: block; width: 30px; height: 30px; object-fit: contain; }
.tab__img--on { display: none; }
.tab.is-on .tab__img--on { display: block; }
.tab.is-on .tab__img--off { display: none; }
.tab__fab.has-img { background: none; box-shadow: none; width: 60px; height: 60px; margin-top: -28px; }
.tab__fab.has-img::before { display: none; }
.tab__fab.has-img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(30,40,70,.25)); }

/* キャラの動き（追加）：歩く・転がる・転ぶ・踊る・連続ジャンプ・居眠り */
.pet.is-left .pet__body > * { transform: scaleX(-1); }
.pet__body.act-walk    { animation: a-walk .42s ease-in-out infinite; }
.pet__body.act-roll    { animation: a-roll .7s linear infinite; transform-origin: 50% 58%; }
.pet__body.act-tumble  { animation: a-tumble 1.7s ease-in-out; }
.pet__body.act-dance   { animation: a-dance 2.4s ease-in-out; }
.pet__body.act-bounce3 { animation: a-bounce3 1.5s ease-in-out; }
.pet__body.act-doze    { animation: a-doze 3.6s ease-in-out; }
@keyframes a-walk { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
@keyframes a-roll { from { transform: rotate(0); } to { transform: rotate(var(--turn, 360deg)); } }
@keyframes a-tumble { 20% { transform: rotate(-12deg); } 40% { transform: rotate(-84deg) translateX(-10px); } 58% { transform: rotate(-84deg) translateX(-10px); } 75% { transform: translateY(-14px) rotate(8deg); } 88% { transform: scale(1.06, .94); } }
@keyframes a-dance { 12% { transform: translateX(-10px) rotate(-8deg); } 25% { transform: translateY(-14px); } 37% { transform: translateX(10px) rotate(8deg); } 50% { transform: translateY(-14px) scaleX(-1); } 62% { transform: translateX(-10px) rotate(-8deg) scaleX(-1); } 75% { transform: translateY(-14px); } 87% { transform: translateX(10px) rotate(8deg); } }
@keyframes a-bounce3 { 10%, 43%, 76% { transform: scale(1.06, .92); } 22%, 55%, 88% { transform: translateY(-20px) scale(.96, 1.05); } 33%, 66%, 100% { transform: none; } }
@keyframes a-doze { 15%, 85% { transform: rotate(-7deg) scale(1.02, .97); } 50% { transform: rotate(-9deg) scale(1.04, .95) translateY(2px); } }
.fx-zzz .fx-emo { font-size: 20px; color: #5A6E99; font-weight: 800; }

/* 端末の「動きを減らす」設定がオンのときは、ホーム以外の画面だけ動きを止める（ホームはキャラの動きを見せるため止めない） */
@media (prefers-reduced-motion: reduce) {
  body:not([data-view="home"]) *, body:not([data-view="home"]) *::before, body:not([data-view="home"]) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  body:not([data-view="home"]) .fluff, body:not([data-view="home"]) .fluff > span { animation: none !important; }
  body:not([data-view="home"]) .fluff { top: var(--y); bottom: auto; transform: rotate(-12deg); opacity: .85; }
}

/* =========================================================
   ポーズ・おへや・おでかけ（homefx.js）
   ========================================================= */
/* ポーズの画像は高さを ref との比で変えるので、足もとをそろえる */
.pet--img .pet__body { display: flex; align-items: flex-end; justify-content: center; }
.pet__body img.is-swap { animation: swap .3s ease-out; }
@keyframes swap { 0% { scale: 1.1 .88; } 55% { scale: .96 1.05; } 100% { scale: 1 1; } }

/* おへや・キッチン・としょかん：空・草・生きものは出さず、夜はランプの明かり */
.is-indoor .fx-sky, .is-indoor .fx-fg, .is-indoor .stage__deco, .is-indoor .fx-star,
.is-indoor .fx-bfly, .is-indoor .fx-bug, .is-indoor .fx-bird, .is-indoor .fx-clover { display: none; }
.is-indoor .fx-tint--night { background: radial-gradient(circle at 76% 36%, rgba(255,205,130,.3), rgba(255,205,130,0) 46%), linear-gradient(180deg, rgba(30,35,80,.4), rgba(45,38,60,.28)); }
.is-indoor .fx-tint--evening { background: linear-gradient(180deg, rgba(255,170,110,.2), rgba(255,200,150,.06)); }

/* 場面の切りかえ：ふわっと暗転 → まん中に場所の名前 → ふわっと明ける */
.fx-fade { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; opacity: 0;
  background: radial-gradient(circle at 50% 50%, #3A4B74, #1E2742 75%);
  transition: opacity 1s ease-in-out; }
.fx-fade.is-dark { opacity: 1; }
.fx-fade__name { text-align: center; color: #FFFDF8; opacity: 0; transform: translateY(8px); transition: opacity .7s ease, transform .9s ease; }
.fx-fade.is-name .fx-fade__name { opacity: 1; transform: none; }
.fx-fade__name small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .3em; opacity: .8; margin-bottom: 6px; }
.fx-fade__name b { display: block; font-size: 30px; font-weight: 800; letter-spacing: .14em; }
.fx-fade__line { display: block; width: 150px; height: 14px; margin: 10px auto 0; object-fit: contain; filter: brightness(0) invert(1); opacity: .7; }
.fx-fade__line--css { height: 0; border-top: 2px solid rgba(255,253,248,.7); border-radius: 50%; filter: none; }

/* =========================================================
   カラダ・キモチ・ミライのゲージ（ホームの上）と、記録カードのしるし
   ========================================================= */
.hud { gap: 8px; padding: 8px 10px; }
.hud__st2 { margin-top: 1px; font-size: 10px; font-weight: 700; color: #A0661B; line-height: 1.2; }
.hud__st2 b { font-size: 12px; margin-right: 1px; }
.gauges { flex: 0 0 auto; display: flex; gap: 4px; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 46px; padding: 0; border: 0; background: none; cursor: pointer; }
.gauge__ring { position: relative; display: block; width: 44px; height: 44px; }
.gauge__ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gauge__bg { fill: rgba(255,253,248,.9); stroke: #EDE6DA; stroke-width: 5; }
.gauge__v { fill: none; stroke: var(--g); stroke-width: 5; stroke-linecap: round; filter: url(#wcEdgeS); transition: stroke-dashoffset 1.1s cubic-bezier(.2,.9,.3,1); }
.gauge__ic { position: absolute; inset: 9px; display: grid; place-items: center; }
.gauge__ic .st-img { width: 100%; height: 100%; object-fit: contain; }
.gauge__ic .st-emo { font-size: 17px; line-height: 1; }
.gauge small { font-size: 9.5px; font-weight: 800; color: var(--ink2); letter-spacing: .04em; line-height: 1.1; }
.gauge:active .gauge__ring { transform: scale(.92); }

.qc__tag { align-self: flex-start; margin: -6px 0 -6px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; background: var(--g); letter-spacing: .06em; }
.opts--3 { grid-template-columns: 1fr 1fr 1fr; }

/* キャラの横に出るしるし（？） */
.fx-mark { position: absolute; z-index: 5; width: 34px; pointer-events: none; animation: markin .5s cubic-bezier(.2,1.4,.4,1) both, markbob 1.6s ease-in-out .5s infinite; }
.fx-mark .st-img { display: block; width: 100%; height: auto; }
.fx-mark .st-emo { display: block; font-size: 30px; font-weight: 800; color: #5A6E99; text-shadow: 0 2px 0 #FFFDF8, 0 0 6px rgba(255,253,248,.9); line-height: 1; }
@keyframes markin { from { transform: scale(0) rotate(-30deg); opacity: 0; } }
@keyframes markbob { 50% { transform: translateY(-6px) rotate(8deg); } }
