:root {
  --bg: #f6f7f5; --card: #ffffff; --text: #1c2421; --muted: #5d6b66; --line: #e2e7e4;
  --accent: #0f766e; --accent-weak: #d7efeb; --danger: #b42318; --warn: #b45309; --ok: #18794e;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111614; --card: #1a201e; --text: #e8eeeb; --muted: #9aa8a3; --line: #2b3431;
    --accent: #3bb3a6; --accent-weak: #1d3b37; --danger: #f97066; --warn: #f5a524; --ok: #4ade80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif; }
a { color: var(--accent); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--accent); }
.logout { font-size: 14px; }
main { max-width: 560px; margin: 0 auto; padding: 12px 16px 96px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
h1 { font-size: 20px; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 18px 0 8px; }
.card > h2:first-child { margin-top: 0; }
.muted { color: var(--muted); font-size: 14px; }
.note { font-size: 13px; color: var(--muted); }
.flash { max-width: 560px; margin: 12px auto 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; width: calc(100% - 32px); }
.flash.err { background: #fde8e6; color: #7a1a12; }
.flash.ok { background: #dcf3e6; color: #0c4a2b; }
.flash.dev { background: #fff4d6; color: #5c3d00; }
label { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label.check { display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
label.check input { width: auto; margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 14px 0; }
legend { font-size: 14px; color: var(--muted); padding: 0 4px; }
button, .btn { display: inline-block; padding: 10px 16px; font-size: 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; }
button.primary { width: 100%; background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; padding: 13px; margin-top: 8px; }
button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
button:disabled { opacity: .6; }
button.link { border: 0; background: none; color: var(--danger); padding: 4px; font-size: 13px; }
.req { font-size: 11px; color: #fff; background: var(--warn); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.switch, .links { text-align: center; font-size: 14px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tabs a { flex: 1; text-align: center; padding: 12px 0; font-size: 11px; white-space: nowrap; letter-spacing: -0.02em; color: var(--muted); text-decoration: none; }
.tabs a[aria-current] { color: var(--accent); font-weight: 700; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 13px; margin-left: 2px; color: var(--muted); font-weight: 400; }
.stat .sub { font-size: 12px; color: var(--muted); }
.hello p { margin: 0; }
.ok-text { color: var(--ok); }
.bar { height: 12px; background: var(--accent-weak); border-radius: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
table.logs { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.logs th, table.logs td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
table.logs th:first-child, table.logs td:first-child { text-align: left; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .axis { fill: var(--muted); font-size: 10px; }
svg.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
svg.chart .avg { fill: none; stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 4 3; }
svg.chart .target { stroke: var(--ok); stroke-width: 1; stroke-dasharray: 2 3; }
svg.chart .target-label { fill: var(--ok); }
svg.chart .dot { fill: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: #1c2421; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 10; max-width: calc(100% - 32px); }
.toast.err { background: var(--danger); }
.legal { max-width: 560px; margin: 0 auto; padding: 0 16px 100px; font-size: 13px; color: var(--muted); }
.legal details { border-top: 1px solid var(--line); padding: 8px 0; }
.legal summary { cursor: pointer; }

/* ---------- Phase 2：食事・生活 ---------- */
:root { --p: #2f6fd6; --f: #d98a1f; --c: #3aa17e; }
@media (prefers-color-scheme: dark) { :root { --p: #6ea2ff; --f: #f0b050; --c: #5fd0a6; } }
.pfc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.pfc b { font-size: 22px; }
.pfc.total { margin-top: 10px; font-size: 14px; }
.btn.primary-link { display: block; text-align: center; background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; margin-top: 8px; }
.daynav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daynav h1 { margin: 0; font-size: 18px; text-align: center; flex: 1; }
.daynav a, .daynav span { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 26px; text-decoration: none; }
a.card.meal { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.thumb { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--bg); flex-shrink: 0; }
.thumb.none { display: flex; align-items: center; justify-content: center; font-size: 28px; }
.meal-body { min-width: 0; flex: 1; font-size: 14px; }
.meal-head { font-size: 15px; }
.clamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--accent-weak); color: var(--accent); vertical-align: 1px; }
.conf-tag-low { background: #fdecd3; color: #8a4b00; }
.conf-tag-high { background: #dcf3e6; color: #0c4a2b; }
.seg-radio { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 10px 0; }
.seg-radio legend { width: 100%; margin-bottom: 4px; padding: 0; }
.seg-radio label { margin: 0; flex: 1; min-width: 60px; }
.seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-radio span { display: block; text-align: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 14px; background: var(--card); }
.seg-radio input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.seg-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-pick input { padding: 9px; }
.preview, .photo-big { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; margin: 6px 0; display: block; }
.items-scroll { overflow-x: auto; margin: 0 -4px; }
table.items { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 13px; }
table.items th { text-align: left; font-weight: 400; color: var(--muted); padding: 4px; }
table.items td { padding: 2px; }
table.items input { margin: 0; padding: 7px 6px; font-size: 14px; }
table.items td:first-child input { min-width: 120px; }
table.items td:not(:first-child) input { width: 60px; }
tr.conf-low td:first-child input { border-color: var(--warn); }
button.small { padding: 7px 12px; font-size: 13px; margin-top: 8px; }
.ai-result { background: var(--accent-weak); border-radius: 12px; padding: 12px; margin: 10px 0; font-size: 15px; }
.ai-result p { margin: 6px 0; }
.ai-result ul { margin: 4px 0 6px; padding-left: 20px; }
.ai-head { display: flex; gap: 8px; align-items: center; }
.consent-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 10px 0; }
.consent-box h2 { margin-top: 0; }
.form.q { background: var(--bg); padding: 10px 12px; border-radius: 12px; }
.loading { padding: 16px 0; color: var(--muted); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .loading { animation: none; } }
.warn-text { color: var(--warn); }
.quick { display: flex; gap: 6px; margin: -4px 0 8px; }
.quick button { flex: 1; padding: 8px 4px; font-size: 13px; }
.seg.sub { margin-top: 8px; }
svg.chart .bar-p, .sw.bar-p { fill: var(--p); background: var(--p); }
svg.chart .bar-f, .sw.bar-f { fill: var(--f); background: var(--f); }
svg.chart .bar-c, .sw.bar-c { fill: var(--c); background: var(--c); }
.legend { font-size: 12px; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 3px; vertical-align: -1px; }
.seg.sub button { padding: 6px 8px; font-size: 13px; background: transparent; }
.seg.sub button[aria-pressed="true"] { background: var(--accent-weak); color: var(--accent); border-color: var(--accent); }
.seg-radio.five { gap: 4px; }
.seg-radio.five label { min-width: 0; }
.seg-radio.five span { font-size: 12px; padding: 10px 0; letter-spacing: -0.04em; }

/* ---------- 食品の選択・自動アドバイス ---------- */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.small { font-size: 12px; }
.sel-list { list-style: none; margin: 0; padding: 0; }
.sel-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sel-name { flex: 1; min-width: 0; font-size: 15px; }
.stepper { display: flex; align-items: center; gap: 2px; }
.stepper button { width: 34px; height: 34px; padding: 0; font-size: 18px; line-height: 1; }
.stepper span { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.sel-list .rm { font-size: 18px; color: var(--muted); }
label.search input { font-size: 16px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; -webkit-overflow-scrolling: touch; }
.chips button { flex-shrink: 0; padding: 6px 12px; font-size: 13px; border-radius: 999px; }
.chips button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.food-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; border-top: 1px solid var(--line); }
.food-list li { border-bottom: 1px solid var(--line); }
.food-list button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; border-radius: 0; background: none; padding: 11px 4px; text-align: left; }
.food-list .fn { flex: 1; min-width: 0; }
.food-list .plus { color: var(--accent); font-size: 20px; font-weight: 700; }
details.custom, details.extra { margin: 12px 0; }
details summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.custom-grid label:first-child { grid-column: 1 / -1; }
.adv-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.score { width: 72px; height: 72px; border-radius: 50%; border: 5px solid var(--accent); display: flex; align-items: baseline; justify-content: center; padding-top: 14px; flex-shrink: 0; }
.score b { font-size: 26px; font-variant-numeric: tabular-nums; }
.score small { font-size: 12px; margin-left: 1px; }
.score.none { border-color: var(--line); color: var(--muted); }
.gbar { margin: 6px 0; }
.gl { display: flex; justify-content: space-between; font-size: 13px; }
.gt { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.gt span { display: block; height: 100%; }
.gt .ok { background: var(--ok); } .gt .under { background: var(--p); } .gt .over { background: var(--warn); }
h3 { font-size: 15px; margin: 14px 0 4px; }
ul.adv { list-style: none; margin: 0; padding: 0; }
ul.adv li { display: flex; gap: 6px; padding: 6px 0; font-size: 14px; line-height: 1.55; border-bottom: 1px dashed var(--line); }
ul.adv li:last-child { border-bottom: 0; }
ul.adv .ic { flex-shrink: 0; width: 1.2em; font-weight: 700; }
.lv-good .ic { color: var(--ok); } .lv-warn .ic { color: var(--warn); } .lv-info .ic { color: var(--muted); }
.score b.pending { font-size: 14px; color: var(--muted); }
.score:has(b.pending) { padding-top: 0; align-items: center; }
.picker-box { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; } .picker-box .food-list { max-height: 300px; }

/* =========================================================
   デザイン第2版：あたたかい配色・丸み・コーチの吹き出し
   ========================================================= */
:root {
  --bg: #fbf6ee; --card: #ffffff; --text: #2b2622; --muted: #7a6f66; --line: #efe6da;
  --accent: #1f9d6b; --accent-weak: #e3f5ec; --accent-2: #f07a3c; --accent-2-weak: #fdeadf;
  --ok: #1f9d6b; --warn: #e0782f; --danger: #d14343;
  --p: #4a7fe0; --f: #f0a43c; --c: #49b98f;
  --radius: 20px; --shadow: 0 2px 0 rgba(80, 55, 30, .04), 0 6px 18px rgba(80, 55, 30, .06);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #17140f; --card: #221d17; --text: #f3ece3; --muted: #b3a697; --line: #362e25;
    --accent: #4fcf9b; --accent-weak: #1c3a2e; --accent-2: #ff9a5f; --accent-2-weak: #3d2518;
    --ok: #4fcf9b; --warn: #ffab62; --p: #7ea8ff; --f: #ffc067; --c: #6fd8ad; --shadow: none; }
}
body { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif; }
.top { background: var(--bg); border-bottom: 0; }
.brand { color: var(--accent); letter-spacing: .02em; }
.card { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); }
button.primary, .btn.primary-link { border-radius: 14px; box-shadow: 0 3px 0 #16764f; }
button.primary:active, .btn.primary-link:active { transform: translateY(2px); box-shadow: none; }

/* 下のメニュー（アイコン付き） */
.tabs { border-top: 0; box-shadow: 0 -4px 16px rgba(80, 55, 30, .08); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border-radius: 12px; font-size: 10.5px; }
.tabs a[aria-current] { background: var(--accent-weak); }
.ic-svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ホーム：目標までの見える化 */
.hero { background: linear-gradient(140deg, #22a874 0%, #179a8a 55%, #1d86a8 100%); color: #fff; border-radius: 24px; padding: 16px; margin: 12px 0; box-shadow: 0 10px 24px rgba(23, 130, 110, .28); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hello-s { font-size: 18px; font-weight: 800; }
.date-s { font-size: 12.5px; opacity: .9; }
.hero-btn { background: rgba(255,255,255,.2); color: #fff; text-decoration: none; font-size: 12.5px; font-weight: 700; padding: 8px 12px; border-radius: 999px; white-space: nowrap; border: 1px solid rgba(255,255,255,.35); }
.goal-box { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.goal-side { flex: 1; min-width: 0; }
.goal-pct { font-size: 13px; } .goal-pct b { font-size: 28px; font-weight: 800; }
.goal-path { display: flex; align-items: flex-end; gap: 4px; font-size: 11px; margin: 4px 0 6px; flex-wrap: wrap; }
.goal-path span { display: flex; flex-direction: column; line-height: 1.2; }
.goal-path b { font-size: 15px; font-variant-numeric: tabular-nums; }
.goal-path .arr { opacity: .7; align-self: center; }
.goal-sub, .goal-eta { font-size: 12.5px; }
.goal-eta { margin-top: 4px; background: rgba(255,255,255,.18); display: inline-block; padding: 3px 10px; border-radius: 999px; }
.goal-eta:empty { display: none; }

/* リング */
.ring { position: relative; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--accent); transition: stroke-dasharray .6s ease; }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; text-align: center; }
.ring-in b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-in small { font-size: 11px; color: var(--muted); }
.ring-goal .ring-bg { stroke: rgba(255,255,255,.25); } .ring-goal .ring-fg { stroke: #fff; }
.ring-goal .ring-in small, .ring-goal .ring-in b { color: #fff; } .ring-goal .ring-in b { font-size: 30px; }
.ring-over .ring-fg { stroke: var(--warn); } .ring-over .ring-in b { color: var(--warn); }

/* 今日の食事 */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; }
.sec-head h2 { margin: 0 0 8px; }
.sec-head a { font-size: 13px; text-decoration: none; }
.kcal-row { display: flex; gap: 14px; align-items: center; }
.pfc-bars { flex: 1; min-width: 0; }
.pb { margin: 4px 0 8px; }
.pb-l { display: flex; justify-content: space-between; font-size: 12.5px; }
.pb-v { font-weight: 700; font-variant-numeric: tabular-nums; } .pb-v small { font-weight: 400; color: var(--muted); }
.pb-v.over { color: var(--warn); } .pb-v.ok { color: var(--ok); }
.pb-t { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; margin-top: 3px; }
.pb-t span { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.pb-t .bar-p { background: var(--p); } .pb-t .bar-f { background: var(--f); } .pb-t .bar-c { background: var(--c); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.slot { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 14px; border: 1.5px dashed var(--line); text-decoration: none; color: var(--muted); line-height: 1.2; }
.slot b { font-size: 17px; color: var(--accent); font-variant-numeric: tabular-nums; }
.slot small { font-size: 10px; }
.slot-l { font-size: 12px; font-weight: 700; color: var(--text); }
.slot.done { border-style: solid; border-color: var(--accent-weak); background: var(--accent-weak); }
.slot.done b { color: var(--text); }

/* コーチと吹き出し */
.coach-card { background: linear-gradient(180deg, var(--accent-2-weak) 0, var(--card) 120px); }
.tabbar { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 14px; margin-bottom: 12px; }
.tabbar button { flex: 1; border: 0; background: none; padding: 8px 4px; border-radius: 10px; font-weight: 700; color: var(--muted); position: relative; }
.tabbar button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tabbar .dot { position: absolute; top: 6px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.coach-row { display: flex; gap: 8px; align-items: flex-start; }
.coach { width: 84px; height: 84px; flex-shrink: 0; margin-top: 4px; }
.coach-good { animation: hop 1.6s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .coach-good { animation: none; } }
.bubble { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 10px 12px; font-size: 14.5px; line-height: 1.65; }
.bubble.main { flex: 1; min-width: 0; }
.bubble.main::before { content: ""; position: absolute; left: -10px; top: 26px; border: 8px solid transparent; border-right-color: var(--line); border-left: 0; }
.bubble.main::after { content: ""; position: absolute; left: -6px; top: 28px; border: 6px solid transparent; border-right-color: var(--card); border-left: 0; }
.bubble p { margin: 0; }
.bubble .who { font-size: 11px; font-weight: 700; color: var(--accent-2); margin-bottom: 2px; }
.bubble.lv-warn { border-color: #f6c9a6; } .bubble.lv-good { border-color: #bfe8d3; }
@media (prefers-color-scheme: dark) { .bubble.lv-warn { border-color: #6b4126; } .bubble.lv-good { border-color: #2d5a45; } }
ul.bubbles { list-style: none; margin: 10px 0 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 8px; }
.bubble.small { display: flex; gap: 6px; font-size: 13.5px; padding: 8px 10px; }
.bubble.small .ic { font-weight: 800; flex-shrink: 0; width: 1.1em; }
.bubble.small.lv-warn .ic { color: var(--warn); } .bubble.small.lv-good .ic { color: var(--ok); } .bubble.small.lv-info .ic { color: var(--muted); }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--accent-weak); color: var(--accent); text-decoration: none; }

/* クイック操作 */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card); border-radius: 18px; padding: 12px 4px; text-decoration: none; color: var(--text); font-size: 11.5px; font-weight: 700; box-shadow: var(--shadow); }
.quick-btn .ic-svg { width: 26px; height: 26px; color: var(--accent); }

/* =========================================================
   日付バー・カレンダー・日付ごとのホーム・＋ボタン
   ========================================================= */
.datebar { position: sticky; top: var(--top-h, 49px); z-index: 4; background: var(--bg); margin: 0 -16px; padding: 6px 12px 8px; touch-action: pan-y; }
.db-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 6px; }
.db-month { font-size: 18px; flex: 1; }
.db-today { border-radius: 999px; padding: 6px 14px; font-weight: 800; color: var(--accent); background: var(--card); border: 0; box-shadow: var(--shadow); }
.db-today:disabled { opacity: .45; }
.db-cal { width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 0; background: var(--card); box-shadow: var(--shadow); color: var(--accent); }
.db-cal .ic-svg { width: 24px; height: 24px; }
.db-row { display: flex; align-items: center; gap: 2px; }
.db-arr { border: 0; background: none; font-size: 26px; padding: 0 2px; color: var(--muted); width: 22px; }
.db-arr:disabled { opacity: .25; }
.db-days { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.db-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border: 0; background: none; border-radius: 16px; }
.db-num { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; background: var(--card); box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.db-wd { font-size: 11px; color: var(--muted); }
.wd0 { color: #d9534f; } .wd6 { color: #3f7fd9; }
.db-day.today .db-num { outline: 2px solid var(--accent); outline-offset: 1px; }
.db-day.on .db-num { background: var(--accent); color: #fff; }
.db-day.on .db-wd { color: var(--accent); font-weight: 800; }
.db-day:disabled { opacity: .35; }
.db-dots { display: flex; gap: 2px; height: 5px; }
.db-dots i, i.lg { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.db-dots .m, i.lg.m { background: var(--accent-2); } .db-dots .w, i.lg.w { background: var(--p); }
i.lg { margin: 0 3px 1px 6px; }

.overlay { position: fixed; inset: 0; background: rgba(30, 20, 10, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.sheet { background: var(--card); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .2s ease; }
@keyframes up { from { transform: translateY(40px); } }
@media (prefers-reduced-motion: reduce) { .overlay, .sheet { animation: none; } }
.sheet-title { font-weight: 800; text-align: center; margin-bottom: 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 6px; }
.sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text); font-size: 12px; font-weight: 700; text-align: center; }
.sheet-grid .illus { width: 54px; height: 54px; }
.sheet-close { width: 100%; margin-top: 14px; border-radius: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head button { border: 0; background: var(--bg); width: 40px; height: 40px; border-radius: 12px; font-size: 22px; }
.cal-head button:disabled { opacity: .3; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-wd { font-size: 11px; color: var(--muted); padding-bottom: 2px; }
.cal-grid button { border: 0; background: var(--bg); border-radius: 12px; padding: 8px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-grid button.today { outline: 2px solid var(--accent); }
.cal-grid button.on { background: var(--accent); color: #fff; }
.cal-grid button:disabled { opacity: .3; }

.fab { position: fixed; right: max(16px, calc(50% - 264px)); bottom: calc(78px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0; background: var(--accent); box-shadow: 0 6px 16px rgba(31, 157, 107, .45); z-index: 6; display: flex; align-items: center; justify-content: center; }
.fab svg { width: 30px; height: 30px; stroke: #fff; stroke-width: 3; stroke-linecap: round; fill: none; }
.fab:active { transform: scale(.95); }

.illus { width: 46px; height: 46px; flex-shrink: 0; }
.hero.compact { padding: 14px; }
.hero.compact .hello-s { font-size: 15px; }
.dayn { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.small-tabs { margin-bottom: 10px; }
.kbar-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.kbar-head b { font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.kbar { position: relative; height: 16px; border-radius: 8px; background: var(--bg); margin: 6px 0 8px; overflow: visible; }
.kbar span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #5cc896, var(--accent)); transition: width .5s ease; }
.kbar span.over { background: linear-gradient(90deg, var(--accent), var(--warn)); }
.goal-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--text); opacity: .55; }
.kbar-left { text-align: center; font-size: 14px; }
.kbar-left b { font-size: 26px; color: var(--accent); font-variant-numeric: tabular-nums; margin: 0 2px; }
.kbar-left.over b { color: var(--warn); }
.kbar-left .pill { display: inline-block; font-size: 12px; font-weight: 700; border: 1.5px solid currentColor; color: var(--accent); border-radius: 6px; padding: 0 6px; margin-right: 4px; vertical-align: 3px; }
.kbar-left.over .pill { color: var(--warn); }

.row-card { padding: 12px 14px; }
.row-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { font-size: 16px; }
.row-val { text-align: right; white-space: nowrap; }
.row-val b { font-size: 22px; font-variant-numeric: tabular-nums; } .row-val small { font-size: 11px; color: var(--muted); margin-left: 2px; }
.row-val .add { font-size: 13px; font-weight: 800; color: var(--accent); background: var(--accent-weak); padding: 6px 12px; border-radius: 999px; }
.row-actions { display: flex; justify-content: center; gap: 22px; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.row-actions a { font-size: 13.5px; font-weight: 700; text-decoration: none; }
.life-grid { display: grid; grid-template-columns: repeat(3, 1fr); text-decoration: none; color: var(--text); }
.life-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.life-cell .illus { width: 40px; height: 40px; }
.life-cell b { font-size: 19px; font-variant-numeric: tabular-nums; } .life-cell small { font-size: 11px; color: var(--muted); }
main { padding-bottom: 150px; }
#db-slot { position: sticky; top: var(--top-h, 49px); z-index: 5; } #db-slot .datebar { position: static; box-shadow: 0 6px 10px -8px rgba(80,55,30,.25); }

/* =========================================================
   ゲーム要素：NEXT ME・レベル・連続記録
   ========================================================= */
.avatar { display: block; }
.me-strip { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 12px; margin: 12px 0; text-decoration: none; color: var(--text); }
.me-strip .avatar { width: 52px; height: 68px; flex-shrink: 0; }
.me-strip.cta { background: linear-gradient(120deg, #fff4e8, #e9f7f0); }
.me-strip.cta b { display: block; } .me-strip.cta .small { color: var(--muted); }
@media (prefers-color-scheme: dark) { .me-strip.cta { background: var(--card); } }
.ms-main { flex: 1; min-width: 0; }
.ms-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.ms-lv { font-size: 12px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #f07a3c, #e04a7f); padding: 1px 8px; border-radius: 999px; }
.ms-title { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-fire { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.ms-fire span { font-size: 20px; } .ms-fire b { font-size: 18px; color: var(--accent-2); } .ms-fire small { font-size: 9.5px; color: var(--muted); }
.xpbar { height: 9px; border-radius: 5px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.xpbar span { display: block; height: 100%; background: linear-gradient(90deg, #f2c94c, #f07a3c); border-radius: 5px; }
.xp-txt { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

.me-hero { display: flex; gap: 12px; align-items: center; background: linear-gradient(150deg, #2b2a4a 0%, #3e3a7a 55%, #6b4aa8 100%); color: #fff; border-radius: 24px; padding: 14px; margin: 12px 0; box-shadow: 0 10px 24px rgba(60, 50, 120, .3); }
.me-stage { width: 120px; flex-shrink: 0; background: radial-gradient(circle at 50% 65%, rgba(255,255,255,.28), rgba(255,255,255,0) 65%); border-radius: 18px; }
.me-stage .avatar { width: 120px; height: 156px; }
.me-info { flex: 1; min-width: 0; }
.me-name { font-size: 11px; letter-spacing: .25em; opacity: .8; font-weight: 800; }
.me-lv { font-size: 14px; font-weight: 800; } .me-lv b { font-size: 34px; color: #ffd36b; }
.me-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.me-hero .xpbar { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.2); }
.me-hero .xp-txt { color: rgba(255,255,255,.8); }
.me-streak { margin-top: 8px; font-size: 14px; } .me-streak b { font-size: 22px; color: #ffb36b; } .me-streak .small { opacity: .8; }

.shape-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; }
.shape-row > div { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); }
.shape-row .avatar { width: 100%; max-width: 96px; height: auto; margin: 0 auto; }
.shape-row .now span { color: var(--accent); font-weight: 800; }
.shape-row .goal { opacity: .55; } .shape-row .goal .avatar { filter: saturate(.6); }
.shape-row .arrow { flex: 0 0 12px; font-size: 22px; color: var(--muted); align-self: center; }
ul.xp-rules { list-style: none; padding: 0; margin: 0; }
ul.xp-rules li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
ul.xp-rules li span:nth-child(2) { flex: 1; }
ul.xp-rules .illus { width: 34px; height: 34px; } ul.xp-rules .fire { width: 34px; text-align: center; font-size: 22px; }
ul.xp-rules b { color: var(--accent-2); font-variant-numeric: tabular-nums; }
ul.titles { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul.titles li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--bg); }
ul.titles li div { display: flex; flex-direction: column; }
ul.titles .t-lv { flex: 0 0 52px; text-align: center; font-size: 12px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #f2c94c, #f07a3c); border-radius: 10px; padding: 4px 0; }
ul.titles li.lock { opacity: .55; } ul.titles li.lock .t-lv { background: var(--line); color: var(--muted); }

.av-preview { display: flex; justify-content: center; background: radial-gradient(circle at 50% 60%, var(--accent-weak), transparent 70%); border-radius: 18px; margin: 8px 0; }
.av-preview .avatar { width: 150px; height: 195px; }
.av-opt { margin: 10px 0; }
.av-label { font-size: 13px; font-weight: 800; margin-bottom: 4px; }
.av-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.av-choices button { padding: 7px 12px; font-size: 13px; border-radius: 999px; }
.av-choices button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.av-choices .sw-btn { width: 34px; height: 34px; padding: 0; border: 2px solid var(--line); }
.av-choices .sw-btn[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; border-color: #fff; }

.xp-pop { position: fixed; left: 50%; top: 38%; transform: translateX(-50%); z-index: 30; font-size: 28px; font-weight: 900; color: #f07a3c; text-shadow: 0 2px 0 #fff, 0 0 12px rgba(255,255,255,.9); animation: xpfly 1.8s ease forwards; pointer-events: none; }
@keyframes xpfly { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.7); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50px); } }
.overlay.center { align-items: center; }
.lvup { position: relative; background: var(--card); border-radius: 26px; padding: 20px 20px 16px; width: min(320px, calc(100% - 40px)); text-align: center; overflow: hidden; animation: pop .35s cubic-bezier(.2, 1.5, .5, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.lvup-burst { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(242, 201, 76, .22) 0 10deg, transparent 10deg 20deg); animation: spin 12s linear infinite; z-index: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.lvup > *:not(.lvup-burst) { position: relative; z-index: 1; }
.lvup-head { font-size: 26px; font-weight: 900; letter-spacing: .08em; background: linear-gradient(90deg, #f07a3c, #e04a7f, #8a76e6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lvup-lv { font-weight: 800; } .lvup-lv b { font-size: 40px; color: #f2a33c; }
.lvup .avatar { width: 120px; height: 156px; margin: 0 auto; }
.lvup-title { margin: 6px 0 2px; font-size: 14px; } .lvup-title b { font-size: 18px; }
.lvup .primary { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .xp-pop, .lvup, .lvup-burst { animation: none; } }

/* =========================================================
   ガチャ・コレクション・着せ替え
   ========================================================= */
.gacha-hero { background: linear-gradient(170deg, #ffe7c7 0%, #ffd0d8 50%, #d9d0ff 100%); border-radius: 24px; padding: 14px; margin: 12px 0; text-align: center; box-shadow: var(--shadow); color: #2b2622; }
.g-top { display: flex; justify-content: space-between; align-items: center; }
.g-ticket { background: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 800; } .g-ticket b { font-size: 22px; color: #f07a3c; } .g-ticket small { font-size: 11px; }
.g-shard { background: rgba(255,255,255,.7); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; } .g-shard b { color: #6b4aa8; }
.machine-wrap { width: 190px; margin: 4px auto; }
.machine { width: 100%; height: auto; }
.machine-wrap.shake .machine { animation: shake .18s linear infinite; }
.machine-wrap.shake .balls { animation: tumble .5s linear infinite; transform-origin: 80px 70px; }
@keyframes shake { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-4px) rotate(-2deg); } 75% { transform: translateX(4px) rotate(2deg); } }
@keyframes tumble { to { transform: rotate(360deg); } }
.g-btns { display: flex; gap: 10px; }
.g-btn { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 12px 6px; font-size: 17px; font-weight: 900; border: 0; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #1f9d6b, #179a8a); box-shadow: 0 4px 0 #136b4a; }
.g-btn.ten { background: linear-gradient(135deg, #f07a3c, #e04a7f); box-shadow: 0 4px 0 #a8324a; }
.g-btn small { font-size: 11px; font-weight: 700; opacity: .9; }
.g-btn:disabled { background: #c9c2b8; box-shadow: 0 4px 0 #a39b90; }
.g-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.g-note { font-size: 12px; margin: 10px 0 0; opacity: .8; }
table.rates { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
table.rates th, table.rates td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.rar { display: inline-block; min-width: 34px; text-align: center; font-size: 11px; font-weight: 900; padding: 1px 6px; border-radius: 6px; color: #fff; }
.rar.big { font-size: 22px; padding: 2px 14px; border-radius: 10px; }
.r-n.rar { background: #9aa3ad; } .r-r.rar { background: #3f86e8; } .r-sr.rar { background: linear-gradient(135deg, #8a5cf0, #d04ad8); }
.r-ssr.rar { background: linear-gradient(135deg, #f2c94c, #f07a3c, #e04a7f, #8a76e6); }
.coll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coll-item { display: flex; flex-direction: column; align-items: center; gap: 3px; background: var(--bg); border-radius: 14px; padding: 6px 4px 8px; text-align: center; font-size: 11.5px; }
.coll-item b { font-size: 11.5px; line-height: 1.3; }
.coll-av .avatar { width: 64px; height: 83px; }
.coll-item.lock .sil .avatar { filter: brightness(0) opacity(.18); }
.ex-btn { font-size: 10.5px; padding: 4px 6px; border-radius: 999px; }
.me-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.me-btns .btn { text-align: center; margin: 0; }
.gacha-link { display: block; text-align: center; margin-bottom: 6px; }
.ticket-badge { display: block; text-align: center; margin: -6px 0 12px; background: linear-gradient(90deg, #fff1d6, #ffe0ea); color: #a8324a; font-weight: 800; font-size: 13px; padding: 8px; border-radius: 14px; text-decoration: none; }
.lvup-ticket { margin-top: 6px; display: inline-block; background: #fff1d6; color: #a8572a; font-weight: 800; font-size: 13px; padding: 4px 12px; border-radius: 999px; }

/* 開封の演出 */
.reveal { position: relative; background: var(--card); border-radius: 26px; padding: 18px; width: min(340px, calc(100% - 32px)); max-height: 86vh; overflow: auto; text-align: center; }
.rv-burst { position: absolute; inset: -50%; z-index: 0; animation: spin 10s linear infinite; }
.reveal.r-n .rv-burst { background: repeating-conic-gradient(rgba(154,163,173,.18) 0 10deg, transparent 10deg 20deg); }
.reveal.r-r .rv-burst { background: repeating-conic-gradient(rgba(63,134,232,.22) 0 10deg, transparent 10deg 20deg); }
.reveal.r-sr .rv-burst { background: repeating-conic-gradient(rgba(138,92,240,.28) 0 10deg, transparent 10deg 20deg); }
.reveal.r-ssr .rv-burst { background: repeating-conic-gradient(#ffd34d55 0 8deg, #e04a7f33 8deg 16deg, #8a76e633 16deg 24deg, transparent 24deg 32deg); }
.reveal > * { position: relative; z-index: 1; }
.capsule { width: 110px; height: 110px; margin: 30px auto; position: relative; animation: wobble .5s ease-in-out infinite; }
.capsule span { position: absolute; left: 0; width: 110px; height: 55px; border: 3px solid #3a2e2a; }
.cap-top { top: 0; border-radius: 55px 55px 0 0; transition: transform .45s ease; }
.cap-bot { bottom: 0; border-radius: 0 0 55px 55px; background: #fff; }
.capsule.r-n .cap-top { background: #c4ccd5; } .capsule.r-r .cap-top { background: #5c9df0; } .capsule.r-sr .cap-top { background: #a77cf5; }
.capsule.r-ssr .cap-top { background: linear-gradient(90deg, #ffd34d, #f07a3c, #e04a7f); box-shadow: 0 0 30px #ffd34d; }
.capsule.open { animation: none; } .capsule.open .cap-top { transform: translateY(-60px) rotate(-25deg); }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.rv-rar { display: flex; align-items: center; justify-content: center; gap: 8px; }
.new { font-weight: 900; color: #e04a4a; font-style: normal; font-size: 13px; }
.rv-av .avatar { width: 150px; height: 195px; margin: 6px auto; }
.rv-name { font-size: 15px; } .rv-name b { font-size: 18px; }
.rv-head { font-weight: 900; font-size: 18px; margin-bottom: 8px; }
.rv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rv-cell { background: var(--bg); border-radius: 12px; padding: 4px; display: flex; flex-direction: column; align-items: center; font-size: 10.5px; }
.rv-cell .avatar { width: 58px; height: 75px; }
.rv-cell em { font-style: normal; font-size: 10.5px; color: #6b4aa8; font-weight: 800; }
.rv-cell.r-ssr { box-shadow: 0 0 0 2px #f2c94c, 0 0 14px #f2c94c; } .rv-cell.r-sr { box-shadow: 0 0 0 2px #a77cf5; }
.reveal .primary { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .machine-wrap.shake .machine, .machine-wrap.shake .balls, .capsule, .rv-burst { animation: none; } }

/* =========================================================
   第3版：有料らしい仕上げ（書体・動き・ミッション・バッジ）
   ========================================================= */
body { font-family: "M PLUS Rounded 1c", -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif; }
#app > *, main > section { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
button, .btn, .quick-btn, .slot, .row-link, .claim-btn, .hub-tabs a { transition: transform .08s ease, box-shadow .12s ease; }
button:active:not(:disabled), .btn:active, .quick-btn:active, .slot:active, .hub-tabs a:active { transform: scale(.97); }

/* NEXT ME：まばたき・呼吸・喜びのジャンプ */
.avatar.alive .av-eyes { animation: blink 4.6s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.avatar.alive .av-body, .avatar.alive .av-head { animation: breathe 3.4s ease-in-out infinite; transform-box: view-box; transform-origin: 60px 134px; }
@keyframes breathe { 50% { transform: scale(1.012, .992); } }
.avatar.alive.cheer { animation: hopme 1.8s ease-in-out infinite; }
@keyframes hopme { 0%, 60%, 100% { transform: translateY(0); } 75% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .avatar.alive .av-eyes, .avatar.alive .av-body, .avatar.alive .av-head, .avatar.alive.cheer, #app > *, main > section { animation: none; } }

/* NEXT ME のメニュー */
.hub-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--card); padding: 4px; border-radius: 16px; box-shadow: var(--shadow); margin: 12px 0; }
.hub-tabs a { text-align: center; padding: 9px 2px; font-size: 12.5px; font-weight: 800; color: var(--muted); text-decoration: none; border-radius: 12px; }
.hub-tabs a[aria-current] { background: linear-gradient(135deg, #3e3a7a, #6b4aa8); color: #fff; }

/* ミッション */
.ms-mini { display: block; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; margin: -2px 0 12px; text-decoration: none; color: var(--text); }
.ms-mini-head { display: flex; justify-content: space-between; align-items: baseline; }
.ms-rings { display: flex; justify-content: space-around; margin-top: 6px; }
.ms-ring { display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 800; color: var(--muted); }
.ring-mission .ring-fg { stroke: var(--accent-2); } .ring-done .ring-fg { stroke: var(--ok); }
.ring .illus { width: 34px; height: 34px; }
.ring-done { filter: drop-shadow(0 0 6px rgba(31, 157, 107, .45)); }
.ms-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
ul.ms-list { list-style: none; padding: 0; margin: 0; }
ul.ms-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
ul.ms-list li.done { background: linear-gradient(90deg, rgba(31, 157, 107, .06), transparent); }
.ms-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-dots { display: flex; gap: 4px; margin-top: 4px; }
.ms-dots i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.ms-dots i.on { background: var(--accent-2); }
li.done .ms-dots i.on { background: var(--ok); }
.claim-btn { border: 0; border-radius: 14px; padding: 8px 10px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #f07a3c, #e04a7f); box-shadow: 0 3px 0 #a8324a; display: flex; flex-direction: column; align-items: center; line-height: 1.2; animation: glow 1.6s ease-in-out infinite; }
.claim-btn small { font-size: 10px; }
.claim-btn.bonus { flex-direction: row; gap: 4px; }
@keyframes glow { 50% { box-shadow: 0 3px 0 #a8324a, 0 0 14px rgba(240, 122, 60, .6); } }
.claimed { font-size: 11px; font-weight: 800; color: var(--ok); }
button.swap { color: var(--muted); font-size: 12px; text-decoration: underline; }
ul.ms-list.pick button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: var(--bg); border-radius: 14px; padding: 8px; }
ul.ms-list.pick span { display: flex; flex-direction: column; }
ul.ms-list.pick li { border: 0; padding: 4px 0; }

/* バッジ */
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.badge-cell { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; font-size: 12px; }
.badge-cell b { font-size: 12px; line-height: 1.3; }
.badge-cell small { font-size: 10.5px; line-height: 1.3; }
.badge-svg { width: 64px; height: 64px; filter: drop-shadow(0 3px 4px rgba(80, 55, 30, .2)); }
.badge-cell.lock .badge-svg { filter: none; opacity: .8; }
.badge-cell .new { position: absolute; top: 0; right: 6px; background: #e5484d; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 10px; }
.badge-big .badge-svg { width: 120px; height: 120px; margin: 8px auto; display: block; animation: pop .45s cubic-bezier(.2, 1.6, .5, 1); }

/* 紙吹雪 */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation-name: fall; animation-timing-function: cubic-bezier(.25, .6, .4, 1); animation-fill-mode: forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }

/* 着せ替え（第3版） */
.ward-head { display: flex; justify-content: space-between; align-items: center; }
.ward-head h1 { margin: 0; }
.ward-stage { position: sticky; top: var(--top-h, 52px); z-index: 3; background: radial-gradient(circle at 50% 60%, var(--accent-weak), var(--card) 72%); }
.ward-stage .avatar { width: 140px; height: 182px; }
.ward-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 8px -4px; padding: 4px; -webkit-overflow-scrolling: touch; }
.ward-tabs button { flex-shrink: 0; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 13px; background: var(--bg); color: var(--muted); }
.ward-tabs button[aria-selected="true"] { background: linear-gradient(135deg, #3e3a7a, #6b4aa8); color: #fff; }
.w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.w-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); text-decoration: none; color: var(--text); font-size: 11px; }
.w-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.w-card.r-r { border-color: #b9d3f6; } .w-card.r-sr { border-color: #d6c4fa; } .w-card.r-ssr { border-color: #f2c94c; background: linear-gradient(180deg, #fffbea, var(--card)); }
.w-card[aria-pressed="true"].r-ssr, .w-card[aria-pressed="true"].r-sr, .w-card[aria-pressed="true"].r-r { border-color: var(--accent); }
.w-card .rar { position: absolute; top: 4px; left: 4px; font-size: 9px; min-width: 0; padding: 0 4px; }
.w-pic { display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; }
.w-pic .avatar { width: 100%; height: auto; }
.w-face .w-pic .avatar { width: 132%; margin: -3% 0 0 -16%; }
.w-body .w-pic .avatar { width: 100%; margin-top: 2%; }
.w-bg .w-pic { aspect-ratio: 3 / 4; }
.w-pic.sil .avatar { filter: brightness(0) opacity(.16); }
.w-none { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-weight: 800; background: var(--bg); }
.w-name { font-weight: 800; line-height: 1.25; text-align: center; }
.ward-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; align-items: center; margin-top: 10px; position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); background: var(--card); padding: 8px 0 2px; }
.ward-actions .btn, .ward-actions .primary { margin: 0; text-align: center; }
/* 着せ替えは押すたびに描き直すので、ふわっと出る動きはなし。プレビューは少し小さく */
#app > .ward, #app > nav { animation: none; }
.ward-stage .avatar { width: 116px; height: 151px; }

/* ---------- グラフ（0.10） ---------- */
.g-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 8px; }
.g-stat { background: var(--accent-weak); border-radius: 14px; padding: 8px 6px; text-align: center; }
.g-stat span { display: block; font-size: 11px; color: var(--muted); }
.g-stat b { font-size: 20px; letter-spacing: -.02em; }
.g-stat b small { font-size: 11px; margin-left: 2px; font-weight: 600; color: var(--muted); }
.g-stat.good b { color: var(--accent); }
.g-prog { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 8px; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.g-prog-bar { grid-column: 1 / -1; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.g-prog-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7bd88f, var(--accent)); }
.g-prog b { text-align: center; color: var(--accent); font-size: 12px; }
.g-ctrl { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 8px; }
.g-ctrl .seg { margin: 0; }
svg.chart { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
svg.chart .line { stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .area-top { stop-color: var(--accent); stop-opacity: .28; }
svg.chart .area-bot { stop-color: var(--accent); stop-opacity: 0; }
svg.chart .dot { fill: #fff; stroke: var(--accent); stroke-width: 1.6; }
svg.chart .last { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
svg.chart .bubble { fill: var(--accent); }
svg.chart .bubble-t { fill: #fff; font-size: 11px; font-weight: 700; }
svg.chart .target { stroke-width: 1.6; stroke-dasharray: 5 4; }
svg.chart .target-label { font-weight: 700; }
svg.chart .lowest { fill: var(--accent); font-weight: 700; }
svg.chart .tip-l { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
svg.chart .tip-c { fill: var(--accent); stroke: #fff; stroke-width: 2; }
svg.chart .tip-r { fill: #2b2522; opacity: .9; }
svg.chart .tip-d { fill: #fff; font-size: 10px; text-anchor: middle; opacity: .8; }
svg.chart .tip-v { fill: #fff; font-size: 13px; font-weight: 700; text-anchor: middle; }
svg.chart.c-waist { --accent: #e07a3f; }
svg.chart.c-fat { --accent: #8a63d2; }

/* ---------- 食事の量（個数／グラム）・手入力（0.10） ---------- */
.sel-list li { flex-direction: column; align-items: stretch; gap: 6px; }
.sel-top { display: flex; align-items: flex-start; gap: 8px; }
.qty { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.qty-mode { display: inline-flex; background: var(--line); border-radius: 99px; padding: 3px; }
.qty-mode button { border: 0; background: transparent; padding: 5px 12px; border-radius: 99px; font-size: 13px; min-height: 0; box-shadow: none; color: var(--muted); }
.qty-mode button[aria-pressed="true"] { background: var(--card, #fff); color: var(--accent); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.gram { display: flex; align-items: center; gap: 4px; }
.gram button { width: 34px; height: 34px; padding: 0; font-size: 18px; line-height: 1; }
.gram input { width: 78px; text-align: right; font-size: 17px; padding: 6px 8px; margin: 0; }
.gram span { font-size: 14px; color: var(--muted); }
details.custom.big { margin: 16px 0; border: 2px dashed var(--accent); border-radius: 16px; padding: 4px 14px; background: var(--accent-weak); }
details.custom.big[open] { padding-bottom: 14px; }
details.custom.big summary { display: flex; align-items: center; gap: 12px; padding: 12px 0; list-style: none; color: var(--text, inherit); }
details.custom.big summary::-webkit-details-marker { display: none; }
details.custom.big summary .ci { font-size: 26px; }
details.custom.big summary b { display: block; font-size: 16px; color: var(--accent); }
details.custom.big summary small { display: block; font-size: 12px; color: var(--muted); }
details.custom.big input { font-size: 17px; padding: 10px 12px; }
details.custom.big .add-custom { width: 100%; margin-top: 6px; }
.g-ctrl .seg { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.g-ctrl .seg button { padding: 6px 10px; min-width: 0; min-height: 34px; font-size: 13px; white-space: nowrap; flex: 0 0 auto; }
.custom-pfc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; }
.custom-pfc label small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.w-pic .pet-only, .pet-only { display: block; width: 86%; height: auto; margin: 16% auto 0; }
.top-links { display: flex; align-items: center; gap: 14px; }
.top-set { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; text-decoration: none; }
.g-stat b small.pre { margin: 0 2px 0 0; }
#upd-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 60; display: flex; align-items: center; gap: 12px; background: #2b2522; color: #fff; padding: 10px 10px 10px 16px; border-radius: 99px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 14px; font-weight: 700; white-space: nowrap; animation: upd-in .35s ease-out; }
#upd-bar button { background: var(--accent); color: #fff; border: 0; border-radius: 99px; padding: 8px 14px; font-weight: 700; min-height: 0; }
@keyframes upd-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- トレーニング（0.11） ---------- */
.train-head .th-top { display: flex; align-items: center; gap: 12px; }
.train-head .th-top .illus { width: 52px; height: 52px; }
.train-head h1 { margin: 0; }
.center { text-align: center; }
.card.wo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.wo-ic { font-size: 26px; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-2-weak, #fdeadf); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wo-main { flex: 1; min-width: 0; }
.wo-main b { font-size: 16px; }
.wo-sets { font-size: 15px; font-weight: 700; color: var(--accent); margin: 2px 0; font-variant-numeric: tabular-nums; }
.wo-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.wo-meta .memo { flex-basis: 100%; }
.wo-go { font-size: 22px; color: var(--muted); }
.empty-train { text-align: center; }
.link-row { display: flex; justify-content: space-between; align-items: center; font-weight: 700; text-decoration: none; }
.ex-list a { display: flex; align-items: center; gap: 10px; padding: 12px 6px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.ex-list .ex-ic { font-size: 20px; }
.ex-title { font-size: 19px; }
.last-box { background: var(--accent-weak); border-radius: 14px; padding: 10px 12px; margin: 8px 0 12px; display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.last-box .tag { font-weight: 700; }
.last-box .tag.best { background: #fff3c4; color: #8a5a00; }
.last-box button { justify-self: start; }
.set-head, .set-row { display: grid; grid-template-columns: 38px 1fr 1fr 34px; gap: 8px; align-items: center; }
.set-head { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.set-row { margin-bottom: 8px; }
.set-no { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.set-row input { margin: 0; font-size: 18px; text-align: center; padding: 10px 6px; }
.set-row .rm { font-size: 20px; color: var(--muted); }
.add-set { width: 100%; border: 2px dashed var(--line); background: none; color: var(--accent); font-weight: 700; padding: 10px; border-radius: 12px; margin-bottom: 12px; }
.kcal-est { background: var(--bg); border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.kcal-est .muted { display: block; }
svg.chart .wbar { fill: var(--accent); opacity: .5; }
svg.chart .wbar.now { opacity: 1; }
svg.chart .bar-v { fill: var(--text, #333); font-weight: 700; }
svg.chart.c-train { --accent: #f07a3c; }
.best-list { list-style: none; margin: 0 0 14px; padding: 0; }
.best-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.best-list li div { display: flex; flex-direction: column; }
.best-list strong { font-size: 18px; color: #c46a1e; }
/* 下のタブ 7つ（0.12） */
.tabs a { font-size: 9.5px; letter-spacing: -0.06em; min-width: 0; }
.tabs a span { overflow: hidden; text-overflow: clip; max-width: 100%; }
@media (min-width: 400px) { .tabs a { font-size: 10.5px; letter-spacing: -0.02em; } }

/* ---------- ガチャの演出（0.12） ---------- */
.machine-wrap { position: relative; }
.machine .knob { transform-origin: 80px 134px; transform-box: view-box; }
.machine-wrap.turn .knob { animation: knob .6s ease-in-out 2; }
@keyframes knob { to { transform: rotate(360deg); } }
.g-say { position: absolute; top: 18%; font-weight: 900; font-size: 18px; color: #3a2e2a; background: #fff; border: 3px solid #3a2e2a; border-radius: 14px; padding: 2px 10px; pointer-events: none; animation: say 1.1s ease-out forwards; white-space: nowrap; }
.g-say.big { font-size: 30px; color: #e04a7f; top: 6%; }
@keyframes say { 0% { opacity: 0; transform: translateY(10px) scale(.6) rotate(-8deg); } 20% { opacity: 1; transform: translateY(0) scale(1.1) rotate(4deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px) scale(1); } }
.machine-wrap.omen-ssr .machine { filter: drop-shadow(0 0 10px #ffd34d) drop-shadow(0 0 22px #e04a7f) hue-rotate(0deg); animation: omen 0.6s linear infinite; }
.machine-wrap.omen-sr .machine { filter: drop-shadow(0 0 12px #a77cf5); animation: shake .12s linear infinite; }
@keyframes omen { 0% { filter: drop-shadow(0 0 12px #ffd34d) hue-rotate(0deg); transform: scale(1.03); } 50% { transform: scale(.98); } 100% { filter: drop-shadow(0 0 12px #ffd34d) hue-rotate(360deg); transform: scale(1.03); } }
.drop-cap { position: absolute; left: 50%; bottom: 14%; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; border: 3px solid #3a2e2a; background: linear-gradient(#fff 50%, #ffd34d 50%); animation: drop .65s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes drop { 0% { transform: translateY(-40px) scale(.4); opacity: 0; } 60% { transform: translateY(10px) scale(1); opacity: 1; } 100% { transform: translateY(0) scale(1.1); } }
.g-ov { overflow: hidden; }
.g-stage { position: relative; width: min(340px, calc(100% - 32px)); min-height: 380px; border-radius: 26px; background: var(--card); padding: 18px; text-align: center; overflow: hidden; display: flex; flex-direction: column; justify-content: center; transition: box-shadow .3s; }
.g-stage > * { position: relative; z-index: 1; }
.g-stage .rv-burst { z-index: 0; }
.g-stage.r-n .rv-burst { background: repeating-conic-gradient(rgba(154,163,173,.18) 0 10deg, transparent 10deg 20deg); }
.g-stage.r-r .rv-burst { background: repeating-conic-gradient(rgba(63,134,232,.22) 0 10deg, transparent 10deg 20deg); }
.g-stage.r-sr .rv-burst { background: repeating-conic-gradient(rgba(138,92,240,.3) 0 10deg, transparent 10deg 20deg); animation-duration: 5s; }
.g-stage.r-ssr .rv-burst { background: repeating-conic-gradient(#ffd34d66 0 8deg, #e04a7f44 8deg 16deg, #8a76e644 16deg 24deg, transparent 24deg 32deg); animation-duration: 3s; }
.g-stage.r-ssr { box-shadow: 0 0 0 4px #ffd34d, 0 0 40px #ffd34d; }
.g-stage.r-sr { box-shadow: 0 0 0 3px #a77cf5, 0 0 24px #a77cf5; }
.g-skip { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(0,0,0,.08); border: 0; border-radius: 99px; padding: 6px 12px; font-size: 12px; font-weight: 700; min-height: 0; color: var(--muted); }
.cap-hold { cursor: pointer; padding: 10px; }
.capsule.big { width: 150px; height: 150px; margin: 20px auto 6px; }
.capsule.big span { width: 150px; height: 75px; }
.capsule.big .cap-top { border-radius: 75px 75px 0 0; }
.capsule.big .cap-bot { top: 75px; border-radius: 0 0 75px 75px; }
.capsule .cap-shine { position: absolute; left: 22%; top: 12%; width: 18%; height: 18%; border-radius: 50%; background: rgba(255,255,255,.75); z-index: 2; }
.capsule.promo { animation: promo .45s ease-out, wobble .5s ease-in-out .45s infinite; }
@keyframes promo { 0% { transform: scale(1); } 40% { transform: scale(1.25) rotate(8deg); filter: brightness(2); } 100% { transform: scale(1); } }
.capsule.big.open .cap-top { transform: translateY(-90px) rotate(-35deg); transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.capsule.big.open .cap-bot { transform: translateY(60px) rotate(15deg); opacity: 0; transition: all .45s ease-in; }
.capsule.big.open .cap-shine { opacity: 0; }
.tap-hint { font-weight: 900; color: var(--accent); animation: pulse 1s ease-in-out infinite; min-height: 1.4em; }
.g-flash { position: fixed; inset: 0; z-index: 90; pointer-events: none; animation: gflash .8s ease-out forwards; }
.g-flash.r-n { background: radial-gradient(circle, #fff 0, rgba(255,255,255,0) 60%); }
.g-flash.r-r { background: radial-gradient(circle, #fff 0, rgba(92,157,240,.55) 30%, rgba(92,157,240,0) 70%); }
.g-flash.r-sr { background: radial-gradient(circle, #fff 0, rgba(167,124,245,.75) 35%, rgba(167,124,245,0) 75%); }
.g-flash.r-ssr { background: conic-gradient(from 0deg, #ffd34d, #f07a3c, #e04a7f, #8a76e6, #4a7fe0, #1f9d6b, #ffd34d); opacity: .85; animation: gflash-ssr 1.2s ease-out forwards; }
.g-flash.mini { animation-duration: .5s; }
@keyframes gflash { 0% { opacity: 0; transform: scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes gflash-ssr { 0% { opacity: 0; transform: scale(.4) rotate(0); } 25% { opacity: .9; } 100% { opacity: 0; transform: scale(2.4) rotate(180deg); } }
.g-stamp { position: fixed; left: 50%; top: 40%; z-index: 95; font-size: 64px; font-weight: 900; letter-spacing: .02em; pointer-events: none; -webkit-text-stroke: 3px #3a2e2a; paint-order: stroke fill; animation: stamp 1.4s cubic-bezier(.2,1.6,.4,1) forwards; }
.g-stamp.r-ssr { background: linear-gradient(90deg, #ffd34d, #f07a3c, #e04a7f, #8a76e6); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #3a2e2a); }
.g-stamp.r-sr { color: #a77cf5; font-size: 54px; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) scale(3) rotate(-15deg); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-8deg); } 80% { opacity: 1; transform: translate(-50%, -50%) scale(1.05) rotate(-8deg); } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1) rotate(-8deg); } }
.sparks { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.sparks i { position: absolute; font-style: normal; color: #ffd34d; font-size: 16px; text-shadow: 0 0 6px #fff; animation: spark 1.4s ease-in-out infinite; }
.reveal.r-sr .sparks i { color: #c7a7ff; }
@keyframes spark { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(90deg); } }
.pop { animation: popin .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes popin { from { transform: scale(.4); opacity: 0; } }
.rv-rar .new { animation: hop .6s ease-in-out infinite; }
.cap-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 14px; }
.cap-cell { background: none; border: 0; padding: 0; min-height: 0; box-shadow: none; }
.cap-cell .capsule { width: 48px; height: 48px; margin: 4px auto; animation-delay: calc(var(--d, 0) * 1s); }
.cap-cell .capsule span { width: 48px; height: 24px; border-width: 2px; }
.cap-cell .capsule .cap-top { border-radius: 24px 24px 0 0; }
.cap-cell .capsule .cap-bot { top: 24px; border-radius: 0 0 24px 24px; }
.cap-cell.done .rv-cell .avatar { width: 52px; height: 68px; }
.cap-cell.done .rv-cell { padding: 2px; font-size: 9px; }
@media (prefers-reduced-motion: reduce) { .g-say, .g-flash, .g-stamp, .sparks, .drop-cap { display: none; } .capsule.promo { animation: none; } }
.reveal > .rv-burst, .g-stage > .rv-burst { position: absolute; inset: -50%; z-index: 0; pointer-events: none; }
.reveal > .sparks { position: absolute; inset: 0; z-index: 2; }
.reveal { overflow: hidden; }
.reveal .rv-body { max-height: calc(86vh - 36px); overflow: auto; }
.rv-cell .pet-only { width: 58px; height: 75px; margin: 0 auto; }
.cap-cell.done .rv-cell .pet-only { width: 52px; height: 68px; }
.rv-av .pet-only { width: 150px; height: 195px; margin: 6px auto; }
.coll-av .pet-only { margin: 0 auto; }

/* ---------- 目標の計画（0.13） ---------- */
.goal-route { display: grid; grid-template-columns: 1fr auto 1fr auto 1.2fr; align-items: center; gap: 4px; text-align: center; margin: 8px 0 12px; }
.goal-route > div { background: var(--accent-weak); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; }
.goal-route span { font-size: 11px; color: var(--muted); }
.goal-route b { font-size: 20px; } .goal-route b.d { font-size: 15px; padding: 3px 0; } .goal-route b small { font-size: 11px; margin-left: 1px; }
.goal-route > div > small { font-size: 11px; color: var(--muted); }
.goal-route i { font-style: normal; color: var(--muted); }
.level-badge { border-radius: 14px; padding: 10px 12px; font-weight: 900; font-size: 17px; display: flex; flex-direction: column; gap: 2px; }
.level-badge small { font-size: 12px; font-weight: 700; opacity: .85; }
.level-badge.lv-ok { background: #e3f5ec; color: #18794e; }
.level-badge.lv-challenge { background: #fff4d6; color: #8a5a00; }
.level-badge.lv-hard { background: #fde4e1; color: #b42318; }
.pace-meter { position: relative; height: 10px; border-radius: 99px; margin: 10px 0 18px; background: linear-gradient(90deg, #7bd88f 0 33.3%, #f2c94c 33.3% 66.6%, #f97066 66.6%); }
.pace-meter i { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; background: #2b2522; border-radius: 2px; }
.pace-meter span { position: absolute; top: 12px; font-size: 10px; color: var(--muted); transform: translateX(-50%); }
.pace-meter span:nth-of-type(1) { left: 33.3%; } .pace-meter span:nth-of-type(2) { left: 66.6%; }
.goal-msgs { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.goal-msgs li { border-radius: 12px; padding: 9px 11px; font-size: 14px; line-height: 1.6; background: var(--bg); }
.goal-msgs li.gm-good { background: #e3f5ec; } .goal-msgs li.gm-warn { background: #fde4e1; } .goal-msgs li.gm-info { background: #fff4d6; }
.goal-date-edit { display: grid; gap: 8px; margin-top: 10px; }
.goal-date-edit a { justify-self: start; font-weight: 700; }
.calc-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0; text-align: center; }
.calc-line div { display: flex; flex-direction: column; background: var(--bg); border-radius: 12px; padding: 6px 10px; }
.calc-line div.res { background: var(--accent); color: #fff; }
.calc-line span { font-size: 10.5px; opacity: .8; } .calc-line b { font-size: 19px; }
.calc-line i { font-style: normal; font-weight: 900; color: var(--muted); }
.pfc-stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.pfc-stack span { display: block; height: 100%; }
.pfc-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 700; }
.pfc-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.using { background: var(--accent-weak); color: var(--accent); font-weight: 800; border-radius: 12px; padding: 8px 12px; margin-top: 10px; text-align: center; }
.custom-goal { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.custom-goal label span { float: right; font-size: 12px; color: var(--muted); font-weight: 400; }
.custom-goal input { font-size: 18px; text-align: right; }
.coach-mini { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.coach-mini .coach { width: 56px; height: 56px; flex-shrink: 0; }
.coach-mini .bubble { flex: 1; }
.coach-mini .goal-msgs { margin: 0; }
.goal-link { display: block; text-align: right; font-size: 12.5px; font-weight: 700; margin-top: 6px; text-decoration: none; }
.td-quick { margin-top: -4px; }
#c-auto { margin-top: 8px; width: 100%; }
.pfc-stack .bar-p { background: var(--p); } .pfc-stack .bar-f { background: var(--f); } .pfc-stack .bar-c { background: var(--c); }
/* ---------- 背景 第2版の動き（0.14） ---------- */
.av-bg .bg-tw, .av-bg .bg-tw > *, .av-bg .bg-fw, .av-bg .bg-wave, .av-bg .bg-steam, .av-bg .bg-aurora, .av-bg .bg-lantern, .av-bg .bg-flag, .av-bg .bg-sway, .av-bg .bg-beam, .av-bg .bg-spin, .av-bg .bg-spin-slow, .av-bg .bg-shoot { transform-box: fill-box; }
.av-bg .bg-tw > *, .av-bg .bg-tw { animation: bgtw 2.4s ease-in-out infinite; transform-origin: center; }
@keyframes bgtw { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.av-bg .bg-fw { transform-origin: center; animation: bgfw 2.8s ease-out infinite; opacity: 0; }
@keyframes bgfw { 0% { transform: scale(.1); opacity: 0; } 10% { opacity: 1; } 55% { transform: scale(1); opacity: 1; } 80% { transform: scale(1.08); opacity: 0; } 100% { opacity: 0; } }
.av-bg .bg-fall { animation: bgfall 6s linear infinite; }
@keyframes bgfall { from { transform: translate(0, -20px); } to { transform: translate(-8px, 160px); } }
.av-bg .bg-wave { animation: bgwave 3s ease-in-out infinite alternate; }
.av-bg .bg-wave.d2 { animation-delay: -1.5s; }
@keyframes bgwave { from { transform: translateX(-4px); } to { transform: translateX(4px); } }
.av-bg .bg-steam { animation: bgsteam 3s ease-out infinite; opacity: 0; }
@keyframes bgsteam { 0% { transform: translateY(0) scaleX(1); opacity: 0; } 30% { opacity: .8; } 100% { transform: translateY(-26px) scaleX(1.4); opacity: 0; } }
.av-bg .bg-aurora { animation: bgaurora 6s ease-in-out infinite alternate; transform-origin: center; }
@keyframes bgaurora { from { transform: skewX(-6deg) translateX(-4px); opacity: .7; } to { transform: skewX(6deg) translateX(4px); opacity: 1; } }
.av-bg .bg-lantern { animation: bglantern 2.6s ease-in-out infinite alternate; transform-origin: top center; }
@keyframes bglantern { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.av-bg .bg-flag { animation: bglantern 1.6s ease-in-out infinite alternate; transform-origin: left center; }
.av-bg .bg-flag.d2 { animation-delay: -.8s; }
.av-bg .bg-sway { animation: bglantern 1s ease-in-out infinite alternate; transform-origin: bottom center; }
.av-bg .bg-beam { animation: bgbeam 3s ease-in-out infinite alternate; transform-origin: top center; }
.av-bg .bg-beam.d2 { animation-direction: alternate-reverse; }
@keyframes bgbeam { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
.av-bg .bg-spin { animation: spin 18s linear infinite; transform-origin: center; }
.av-bg .bg-spin-slow { animation: spin 8s linear infinite; transform-origin: center; }
.av-bg .bg-shoot { animation: bgshoot 4s ease-in infinite; opacity: 0; }
@keyframes bgshoot { 0%, 70% { transform: translate(0, 0); opacity: 0; } 75% { opacity: 1; } 100% { transform: translate(70px, 38px); opacity: 0; } }
/* 小さいカード（一覧）では動かさない */
.w-card .av-bg *, .coll-item .av-bg *, .rv-cell .av-bg * { animation: none !important; }
.w-card .av-bg .bg-fw, .coll-item .av-bg .bg-fw, .rv-cell .av-bg .bg-fw { opacity: 1; transform: scale(.9); }
.w-card .av-bg .bg-steam, .coll-item .av-bg .bg-steam, .rv-cell .av-bg .bg-steam, .w-card .av-bg .bg-shoot { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .av-bg * { animation: none !important; } .av-bg .bg-fw { opacity: 1; transform: scale(.9); } .av-bg .bg-steam { opacity: .6; } }
/* ---------- ペット 第2版の動き（0.15）：生きている姿（alive）のときだけ ---------- */
.pet-in, .pet-in .pe, .pet-tail, .pet-ear, .pet-float, .pet-head { transform-box: fill-box; }
.avatar.alive .pet-in { animation: petbob 1.9s ease-in-out infinite; transform-origin: bottom center; }
@keyframes petbob { 0%, 100% { transform: translateY(0) scale(1, 1); } 45% { transform: translateY(0) scale(1.04, .96); } 60% { transform: translateY(-2.2px) scale(.98, 1.03); } 75% { transform: translateY(0) scale(1, 1); } }
.avatar.alive .pet-in .pe { animation: blink 3.8s infinite; transform-origin: center; }
.avatar.alive .pet-tail { animation: pettail .9s ease-in-out infinite alternate; transform-origin: left bottom; }
@keyframes pettail { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
.avatar.alive .pet-ear { animation: petear 3.2s ease-in-out infinite; transform-origin: bottom center; }
.avatar.alive .pet-ear.ear2 { animation-delay: -1.6s; }
@keyframes petear { 0%, 80%, 100% { transform: rotate(0); } 88% { transform: rotate(-10deg); } 94% { transform: rotate(6deg); } }
.avatar.alive .pet-float { animation: petfloat 2.4s ease-in-out infinite alternate; }
@keyframes petfloat { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.avatar.alive .pet-head { animation: petfloat 2s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .avatar .av-pet *, .pet-only * { animation: none !important; } }
/* ---------- 育成（0.17） ---------- */
.me-say, .ms-say { position: relative; background: var(--card); border-radius: 16px; padding: 10px 14px; margin: -4px 0 10px; font-weight: 700; font-size: 14px; box-shadow: 0 2px 10px rgba(80,55,30,.08); }
.me-say::before, .ms-say::before { content: ''; position: absolute; top: -8px; left: 44px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--card); }
.ms-say { margin: 0 0 -6px; font-size: 13px; }
.mood-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; background: rgba(255,255,255,.14); border-radius: 99px; padding: 3px 10px; font-size: 12px; }
.mood-badge b { color: #fff; }
.mood-hearts i { font-style: normal; color: rgba(255,255,255,.3); font-size: 12px; }
.mood-hearts i.on { color: var(--mc); text-shadow: 0 0 4px rgba(255,255,255,.6); }
.avatar .em-tw { animation: bgtw 1.6s ease-in-out infinite; }
.avatar .em-zzz text { animation: zfloat 2.4s ease-in-out infinite; }
.avatar .em-zzz text:nth-child(2) { animation-delay: .4s; } .avatar .em-zzz text:nth-child(3) { animation-delay: .8s; }
@keyframes zfloat { 0%, 100% { opacity: .3; transform: translateY(2px); } 50% { opacity: 1; transform: translateY(-2px); } }
.avatar .av-chew, .avatar .em-puff { transform-box: fill-box; transform-origin: center; }
.avatar .av-chew { animation: chew .32s ease-in-out infinite alternate; }
@keyframes chew { from { transform: scaleY(1); } to { transform: scaleY(.35); } }
.avatar .em-puff { animation: puff .8s ease-in-out infinite alternate; }
@keyframes puff { from { transform: scale(.85); } to { transform: scale(1.1); } }
/* おかえり */
.welcome .wc-av .avatar { width: 150px; height: 195px; margin: 0 auto; }
.welcome .wc-t { font-size: 30px; font-weight: 900; color: var(--accent); }
.hop { animation: hopme 1s ease-in-out infinite; }
/* もぐもぐ */
.feed { position: relative; width: min(320px, calc(100% - 40px)); height: 340px; background: var(--card); border-radius: 26px; text-align: center; overflow: hidden; }
.feed-av { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); }
.feed-av .avatar { width: 170px; height: 221px; }
.food-fly { position: absolute; bottom: 0; font-size: 34px; opacity: 0; animation: foodfly .7s cubic-bezier(.3,.6,.4,1) forwards; }
@keyframes foodfly { 0% { transform: translate(0, 0) scale(1.2); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--dx, 0px), -205px) scale(.3); opacity: 0; } }
.feed-say { position: absolute; left: 0; right: 0; bottom: 10px; font-weight: 900; font-size: 16px; }
.feed.done .feed-say { color: var(--accent); animation: popin .4s cubic-bezier(.2,1.6,.4,1); }
/* トレーニング */
.train-ov .tr-stage { position: relative; height: 230px; overflow: hidden; }
.train-ov .tr-av { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); }
.train-ov .tr-av .avatar { width: 160px; height: 208px; }
.mv-lift .tr-av { animation: lift .7s ease-in-out infinite; } @keyframes lift { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
.mv-squat .tr-av { animation: squat .9s ease-in-out infinite; transform-origin: bottom center; } @keyframes squat { 0%, 100% { transform: translateX(-50%) scaleY(1); } 50% { transform: translateX(-50%) scaleY(.82) scaleX(1.06); } }
.mv-run .tr-av { animation: runb .32s ease-in-out infinite alternate; } @keyframes runb { from { transform: translate(-50%, 0) rotate(-3deg); } to { transform: translate(-50%, -8px) rotate(3deg); } }
.mv-stretch .tr-av { animation: stretchy 1.6s ease-in-out infinite alternate; transform-origin: bottom center; } @keyframes stretchy { from { transform: translateX(-50%) rotate(-10deg); } to { transform: translateX(-50%) rotate(10deg); } }
.tr-stage .speed { position: absolute; left: -40%; height: 3px; width: 60px; border-radius: 3px; background: var(--muted); opacity: .4; top: 40%; animation: speed .6s linear infinite; }
.tr-stage .speed.s2 { top: 55%; animation-delay: .2s; } .tr-stage .speed.s3 { top: 70%; animation-delay: .4s; }
@keyframes speed { from { left: 110%; } to { left: -30%; } }
.tr-stage .sweat { position: absolute; right: 26%; top: 18%; font-size: 22px; animation: zfloat 1s ease-in-out infinite; }
.tg-title { font-weight: 900; font-size: 17px; margin-top: 6px; }
.tg-pr { color: #c46a1e; font-weight: 800; margin-top: 4px; }
.tg-gain { display: grid; gap: 6px; margin: 10px 0; }
.tg-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border-radius: 12px; padding: 8px 12px; font-weight: 700; }
.tg-row b { color: var(--accent); font-size: 18px; animation: popin .5s cubic-bezier(.2,1.6,.4,1); }
/* 能力値 */
.ab-row { margin: 10px 0; }
.ab-top { display: flex; justify-content: space-between; align-items: baseline; }
.ab-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 4px 0 2px; }
.ab-bar i { display: block; height: 100%; border-radius: 99px; }
.ab-str .ab-bar i { background: linear-gradient(90deg, #ff9a7a, #e5484d); } .ab-sta .ab-bar i { background: linear-gradient(90deg, #7fd8ff, #3f86e8); } .ab-flx .ab-bar i { background: linear-gradient(90deg, #b8f0a0, #3fae5a); }
/* 絆 */
.bond-row { display: flex; gap: 12px; align-items: center; }
.bond-pet { width: 96px; height: 80px; padding: 0; border: 0; background: var(--accent-weak); border-radius: 18px; position: relative; flex-shrink: 0; min-height: 0; box-shadow: none; }
.bond-pet .pet-only { width: 92px; height: 68px; margin: 6px auto 0; }
.bond-lv { font-size: 17px; }
.bond-hearts i, .tricks span { font-style: normal; }
.bond-hearts i { color: var(--line); font-size: 16px; } .bond-hearts i.on { color: #ff7ea8; }
.tricks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tricks span { font-size: 12px; background: var(--bg); border-radius: 99px; padding: 4px 10px; color: var(--muted); } .tricks span.got { color: var(--text, inherit); font-weight: 700; }
.bond-pet.tr-jump .pet-only { animation: trjump .6s cubic-bezier(.3,1.6,.5,1); } @keyframes trjump { 50% { transform: translateY(-16px); } }
.bond-pet.tr-spin .pet-only { animation: spin .7s ease-in-out; }
.bond-pet.tr-dance .pet-only { animation: trdance .9s ease-in-out; } @keyframes trdance { 25% { transform: rotate(-12deg) translateX(-4px); } 50% { transform: rotate(12deg) translateX(4px); } 75% { transform: rotate(-8deg); } }
.bond-pet.tr-heart .pet-only, .bond-pet.tr-sparkle .pet-only { animation: trjump .6s ease-in-out; }
.pop-heart { position: absolute; top: -6px; right: 4px; font-size: 22px; animation: xpfly .9s ease-out forwards; }
/* 節目 */
.ms-list { list-style: none; margin: 0; padding: 0; }
.ms-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); opacity: .6; }
.ms-list li.got { opacity: 1; }
.ms-list li div { display: flex; flex-direction: column; }
.ms-ic { font-size: 22px; } .ms-rw { color: #c46a1e; font-weight: 700; }
.ms-pop .ms-head { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.ms-item { background: var(--bg); border-radius: 14px; padding: 10px; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.ms-reward { display: flex; align-items: center; gap: 8px; justify-content: center; font-weight: 800; }
.ms-reward .avatar { width: 70px; height: 91px; }
.ms-tk { font-weight: 800; color: var(--accent); }
/* 手紙 */
.letter-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: linear-gradient(135deg, #fff6e0, #ffe7ef); border: 2px solid #f2c94c; border-radius: 18px; padding: 12px 14px; margin-bottom: 12px; animation: glow 2s ease-in-out infinite; min-height: 0; }
.letter-card .env { font-size: 30px; animation: hopme 1.6s ease-in-out infinite; }
.letter-card div { flex: 1; display: flex; flex-direction: column; }
.letter { position: relative; width: min(340px, calc(100% - 32px)); max-height: 86vh; overflow: auto; background: #fffaf0 repeating-linear-gradient(transparent 0 27px, #f0e2c4 27px 28px); border-radius: 18px; padding: 22px 20px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 15px; line-height: 28px; }
.letter .lt-to { font-weight: 900; font-size: 17px; margin-bottom: 6px; }
.letter p { margin: 0 0 4px; }
.letter .lt-from { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-weight: 800; margin: 6px 0 10px; }
.letter .lt-from .avatar { width: 56px; height: 73px; }
/* へや */
.room { position: relative; width: 100%; aspect-ratio: 200 / 150; border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(0,0,0,.04); }
.room > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.room-me { position: absolute; left: 32%; width: 36%; bottom: 2%; }
.room-me .avatar { width: 100%; height: auto; display: block; }
.room-front { pointer-events: none; }
.room .rm-tw { animation: bgtw 1.8s ease-in-out infinite; }
.room .rm-fish { animation: fish 4s ease-in-out infinite alternate; transform-box: fill-box; } .room .rm-fish.d2 { animation-duration: 3s; animation-direction: alternate-reverse; }
@keyframes fish { from { transform: translateX(-6px); } to { transform: translateX(10px); } }
.room .rm-bub { animation: zfloat 2s ease-in-out infinite; }
.wall-pick { display: flex; gap: 10px; margin: 6px 0 12px; }
.wall-pick button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line); padding: 0; min-height: 0; }
.wall-pick button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.slot-row { display: grid; gap: 4px; margin: 8px 0; }
.slot-row > span { font-size: 13px; font-weight: 800; color: var(--muted); }
.slot-row .chips { margin: 0; }
svg.room-item { width: 100%; height: auto; }
.coll-av svg.room-item, .rv-cell svg.room-item, .rv-av svg.room-item { width: 100%; height: auto; border-radius: 8px; }
.hub-tabs a { white-space: nowrap; font-size: 12.5px; letter-spacing: -.03em; }
@media (prefers-reduced-motion: reduce) { .food-fly, .tr-av, .speed, .letter-card, .letter-card .env, .room *, .avatar .em-tw, .avatar .em-zzz text, .avatar .av-chew, .avatar .em-puff, .hop { animation: none !important; } }

/* ---------- 0.19 いつものセット ---------- */
.set-strip { margin: 4px 0 10px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(135deg, #fff7e0, #ffeef4); border: 1px solid #f6dca6; }
.set-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.set-head a { color: var(--accent); }
.set-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.set-chip { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 120px; max-width: 200px; padding: 9px 12px; border-radius: 14px; background: #fff; border: 1px solid #f0d9a8; text-align: left; box-shadow: 0 2px 6px rgba(200, 150, 60, .12); }
.set-chip b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.set-chip small { color: var(--muted); font-size: 12px; }
.set-chip:active { transform: scale(.97); }
.set-save { margin: 12px 0 4px; border: 1px dashed #e8c77a; border-radius: 14px; padding: 4px 12px; background: #fffaf0; }
.set-save summary { cursor: pointer; padding: 8px 0; font-weight: 700; color: #a06a00; }
.set-save-in { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.set-save-in label { flex: 1; min-width: 180px; }
.set-link { margin-left: 6px; }
.set-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.set-card-top h2 { margin: 0; }
.set-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.danger-link { color: #c0392b; }
.set-name { display: block; margin: 8px 0 12px; }

/* ---------- 0.20 ホーム画面に追加（PWA） ---------- */
.pwa-bar { display: flex; align-items: center; gap: 8px; margin: 8px 12px 0; padding: 10px 10px 10px 14px; border-radius: 16px; background: linear-gradient(135deg, #e6f6f2, #fff6e6); border: 1px solid #bfe3da; max-width: 560px; box-sizing: border-box; }
@media (min-width: 600px) { .pwa-bar { margin: 8px auto 0; } }
.pwa-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.5; color: #1c2421; }
.pwa-txt b:first-child { font-size: 14px; }
.pwa-go { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 700; }
.pwa-x { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.06); color: #5d6b66; font-size: 16px; padding: 0; }
.pwa-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--accent-weak); font-size: 14px; }
.pwa-card .primary { align-self: flex-start; margin-top: 4px; }
@media (display-mode: standalone) { header.top { padding-top: max(10px, env(safe-area-inset-top)); } }

/* ---------- 0.21 おしらせタブ ---------- */
.tabs a { position: relative; }
.tab-dot { position: absolute; top: 4px; left: calc(50% + 6px); width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid var(--card); }
.news-head h1 { margin-bottom: 4px; }
.chips a.chip { flex-shrink: 0; padding: 6px 14px; font-size: 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; background: var(--card); }
.chips a.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.news-card { display: block; padding: 0; overflow: hidden; color: var(--text); text-decoration: none; }
.news-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--accent-weak); }
.news-body { padding: 12px 16px 14px; }
.news-body h2 { font-size: 16px; margin: 6px 0 4px; line-height: 1.5; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ntag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--accent-weak); color: var(--accent); }
.ntag-course { background: #fff1db; color: #b45309; }
.ntag-pick { background: #ffe4ec; color: #be185d; }
.ntag-pr { background: #eef0f3; color: #4b5563; border: 1px solid #cfd5dc; }
.ntag-pin { background: transparent; color: var(--muted); padding: 1px 2px; }
.news-new { font-size: 11px; font-weight: 800; color: #ef4444; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-article h1 { font-size: 21px; line-height: 1.5; margin: 8px 0 12px; }
.news-hero { width: 100%; border-radius: 14px; margin-bottom: 12px; }
.news-content { line-height: 1.9; font-size: 15px; overflow-wrap: anywhere; }
.news-content img { max-width: 100%; height: auto; border-radius: 12px; }
.news-content a { color: var(--accent); }
.news-content h2, .news-content h3 { margin: 20px 0 8px; line-height: 1.5; }
.news-cta { display: block; text-align: center; margin-top: 18px; }
.pr-note { font-size: 12px; color: #4b5563; background: #f3f4f6; border-radius: 10px; padding: 8px 10px; margin: 6px 0 10px; }

.goal-path .avg7 { display: block; font-size: 10px; opacity: .85; font-weight: 500; margin-top: 1px; }

.ms-amt { display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ms-amt.ok { color: var(--ok); }
.ms-ring span { font-size: 10px; max-width: 72px; text-align: center; line-height: 1.3; display: block; }

/* ---------- 0.23 ホームのトップ画 ---------- */
.hero { position: relative; }
.top-pic:not(.empty) { position: relative; margin: -14px -14px 12px; border-radius: 24px 24px 0 0; overflow: hidden; aspect-ratio: 360 / 150; background: rgba(255,255,255,.12); }
.top-scene { display: block; width: 100%; height: 100%; }
.top-pic:not(.empty)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: linear-gradient(180deg, rgba(23,154,138,0), rgba(23,154,138,.55)); pointer-events: none; }
.top-edit { position: absolute; right: 10px; bottom: 10px; z-index: 1; background: rgba(0,0,0,.42); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px; text-decoration: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.top-pic.empty { position: absolute; top: 10px; right: 10px; z-index: 1; }
.top-pic.empty .top-edit { position: static; display: inline-flex; align-items: center; gap: 2px; padding: 5px 10px; font-size: 12px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4); }
.hero:has(.top-pic.empty) .hello-s { padding-right: 74px; }
.top-preview { margin: 12px 0 10px; border-radius: 18px; overflow: hidden; aspect-ratio: 360 / 150; background: #eef4f1; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.tp-plain, .tp-thumb.tp-plain { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: linear-gradient(140deg, #22a874 0%, #179a8a 55%, #1d86a8 100%); color: #fff; font-weight: 700; font-size: 12px; }
.tp-plain.big { font-size: 14px; }
.tp-me { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 4px 0; }
.tp-me input { width: 20px; height: 20px; accent-color: var(--accent); }
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0; }
.tp-item { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); text-align: left; margin: 0; }
.tp-item[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,157,107,.18); }
.tp-thumb { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 360 / 150; background: #eef0f2; }
.tp-item.lock .tp-thumb { display: flex; align-items: center; justify-content: center; font-size: 22px; color: #9aa3ad; background: repeating-linear-gradient(135deg, #eef0f2 0 8px, #e5e8eb 8px 16px); }
.tp-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; min-width: 0; }
.tp-item.lock .tp-name { color: var(--muted, #8a8f96); font-weight: 600; }
.top-scene.still * { animation: none !important; }

/* 0.24 部屋の絵を上に固定 */
.room-sticky { position: sticky; top: calc(var(--top-h, 49px) + 4px); z-index: 3; box-shadow: 0 8px 18px -10px rgba(80,55,30,.35); }
#room-tab .room-sticky ~ * { animation: none; }

/* ---------- 0.25 続けるための機能 ---------- */
.fast-lane { background: linear-gradient(135deg, #fff8e6, #f1fbf5); border: 1px solid #f0e2b8; border-radius: 16px; padding: 10px 12px; margin: 10px 0; }
.fast-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 6px; }
.fast-copy { width: 100%; margin: 0 0 8px; font-weight: 700; background: #fff; border: 1.5px solid var(--accent); color: var(--accent); border-radius: 12px; padding: 10px; }
.zk-title { color: var(--muted, #6b7670); margin: 2px 0 6px; font-weight: 700; }
.zk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.zk-grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; margin: 0; font-size: 11px; border-radius: 12px; background: #fff; }
.zk-grid button i { font-style: normal; font-size: 20px; line-height: 1; }
.zk-grid button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,157,107,.2); }
.zk-size { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding: 8px; background: #fff; border-radius: 12px; }
.zk-size > span { width: 100%; }
.zk-size button { flex: 1; margin: 0; padding: 8px 4px; font-weight: 700; display: flex; flex-direction: column; align-items: center; }
.zk-size button small { font-weight: 400; color: var(--muted, #6b7670); font-size: 11px; }
.meal-card2 { padding: 10px 12px; }
.mc-head { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.mc-head .illus { width: 36px; height: 36px; }
.mc-head > b { font-size: 16px; flex: 1; }
.mc-kcal b { font-size: 18px; } .mc-kcal small { margin-left: 2px; color: var(--muted, #6b7670); }
.mi-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.mi-list li a { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: baseline; padding: 7px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 14px; }
.mi-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-qty { color: var(--muted, #6b7670); font-size: 12.5px; white-space: nowrap; }
.mi-kcal { font-weight: 700; white-space: nowrap; min-width: 58px; text-align: right; } .mi-kcal small { font-weight: 400; font-size: 11px; color: var(--muted, #6b7670); }
.meal-card2 .row-actions { margin-top: 6px; }
.meal-card2 .row-actions .link { color: var(--accent); font-size: 13px; font-weight: 700; margin: 0; }
.stars3 { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.stars3 span { font-size: 12px; color: #9aa5a0; display: inline-flex; align-items: center; gap: 2px; background: #f4f6f5; padding: 3px 8px; border-radius: 999px; }
.stars3 span i { font-style: normal; font-size: 15px; }
.stars3 span.on { color: #9a6400; background: #fff3cf; } .stars3 span.on i { color: #f0a020; }
.stars3 em { font-style: normal; font-weight: 900; margin-left: auto; color: #f0a020; }
.fs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.fs-l { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; }
.fs-l b { font-size: 14px; } .fs-l b small { font-weight: 400; font-size: 10.5px; color: var(--muted, #6b7670); }
.fs-l b.over { color: var(--danger); } .fs-l b.warn { color: #c98a00; }
.fs-t { height: 8px; background: #eef2ef; border-radius: 99px; overflow: hidden; margin-top: 3px; }
.fs-t span { display: block; height: 100%; border-radius: 99px; background: #7cc68a; }
.fs-t span.fs-salt { background: #8ab4e8; } .fs-t span.over { background: var(--danger); } .fs-t span.warn { background: #f2c94c; }
.dish3 { display: flex; gap: 6px; margin-top: 10px; }
.dish3 span { flex: 1; text-align: center; font-size: 12px; padding: 5px; border-radius: 10px; background: #f4f6f5; color: #9aa5a0; }
.dish3 span.on { background: #e3f5ea; color: var(--accent); font-weight: 700; }
.dish3 span.on::before { content: "✓ "; }
.story-card { background: linear-gradient(135deg, #fff4d6, #ffe7ef); border-radius: 18px; padding: 12px 14px; margin: 10px 0; box-shadow: 0 4px 14px rgba(240,160,32,.15); }
.sc-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.sc-dots { display: flex; gap: 6px; margin: 10px 0 6px; }
.sc-dots i { flex: 1; aspect-ratio: 1; max-width: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 900; background: #fff; color: #c9b9a0; }
.sc-dots i.on { background: #f0a020; color: #fff; } .sc-dots i.next { border: 2px dashed #f0a020; color: #f0a020; animation: rise 1s ease infinite alternate; }
.story-card p { margin: 0; }
.review-card .rc-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.review-card p { margin: 8px 0; }
.rc-btns { display: flex; gap: 8px; } .rc-btns button { flex: 1; margin: 0; }
.coach-offer { display: flex; gap: 10px; background: linear-gradient(135deg, #eef6ff, #f1fbf5); }
.co-ic { font-size: 28px; } .coach-offer p { margin: 4px 0 8px; }
.co-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .co-btns .btn { margin: 0; }
.co-btns .link, .type-card .link { color: var(--muted, #6b7670); }
.type-card { border: 2px solid #f2c94c; }
.tc-name { font-size: 18px; font-weight: 900; color: #b07800; margin: 6px 0 2px; }
.tc-tip { background: #fff8e1; padding: 6px 8px; border-radius: 10px; }
.season-card .ss-head { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.ss-bar { height: 10px; background: #f1ece2; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.ss-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f2a65a, #e46a3a); border-radius: 99px; }
.ss-foods { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ss-foods a { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: inherit; background: #fff; }
.ss-foods a.got { background: #fff0e2; border-color: #f2a65a; color: #b0501a; font-weight: 700; }
.zk-sum { display: flex; align-items: center; gap: 16px; margin: 8px 0; }
.zk-big b { font-size: 40px; font-weight: 900; color: var(--accent); } .zk-big small { color: var(--muted, #6b7670); }
.zk-rank { font-weight: 900; font-size: 16px; }
.zk-items { display: flex; flex-wrap: wrap; gap: 6px; }
.zk-items span { font-size: 12.5px; background: #eef7f1; color: #17734f; padding: 4px 9px; border-radius: 999px; }
.zk-items small { margin-left: 2px; opacity: .7; }
.team-rules { padding-left: 18px; font-size: 14px; } .team-rules li { margin: 4px 0; }
.team-today { font-size: 15px; margin: 6px 0; } .team-today b { font-size: 22px; color: var(--accent); }
.team-list { list-style: none; margin: 0; padding: 0; }
.team-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-list li.me { background: #f6fbf8; border-radius: 12px; padding-left: 6px; }
.tm-av { width: 54px; flex: 0 0 54px; } .tm-av svg { width: 100%; height: auto; }
.tm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tm-done { color: var(--accent); font-weight: 700; }
.tm-got span { display: inline-block; font-size: 15px; margin-right: 4px; }
.tm-stamps { display: flex; gap: 4px; flex-wrap: wrap; }
.tm-stamps button { margin: 0; padding: 4px 8px; font-size: 18px; border-radius: 10px; background: #fff; }
.tm-recv { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; } .tm-recv li { font-size: 18px; }
.album-wrap { margin: 10px auto; max-width: 400px; } .album-wrap svg { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.hub-tabs { overflow-x: auto; scrollbar-width: none; } .hub-tabs::-webkit-scrollbar { display: none; } .hub-tabs a { white-space: nowrap; flex-shrink: 0; }
#renick { color: var(--accent); font-weight: 700; }
.tm-noav { opacity: .35; filter: grayscale(1); }
.note-row td { font-size: 12.5px; color: #6b5a3a; background: #fff9ec; padding: 4px 8px !important; border-top: 0 !important; }
.logs.only-notes tr:not(.note-row) { display: none; }
.logs.only-notes thead tr { display: table-row; }
.logs.only-notes tr.note-row { display: table-row; }
.note-only { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 4px 0 8px; }
.sc-more { float: right; margin-top: -2px; }
.story-list { list-style: none; padding: 0; margin: 10px 0; }
.story-list li { display: grid; grid-template-columns: 48px 1fr 64px 24px; gap: 8px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); border-radius: 12px; }
.story-list li.done { background: #fff8e6; } .story-list li.next { background: #f1fbf5; box-shadow: inset 0 0 0 2px var(--accent); }
.sl-day { font-weight: 900; color: #f0a020; font-size: 13px; text-align: center; }
.sl-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .sl-rw { color: #9a6400; font-weight: 700; }
.sl-pic svg { width: 64px; height: auto; } .sl-emoji { font-size: 34px; text-align: center; }
.sl-st { text-align: center; }
.nr-d { display: none; font-weight: 700; margin-right: 6px; } .logs.only-notes .nr-d { display: inline; }
label.note-only { flex-direction: row; justify-content: flex-start; } label.note-only input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }

/* ---------- 0.26 おへや仲間（招待・みんなのへや・チャット）・ログインボーナス ---------- */
.team-choice { display: grid; gap: 10px; margin: 12px 0; }
.tc-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; border: 2px solid var(--line); background: #fff; margin: 0; }
.tc-btn b { font-size: 16px; } .tc-btn span { font-size: 12.5px; color: var(--muted, #6b7670); }
.tc-btn:first-child { border-color: var(--accent); background: #f1fbf5; }
.code-form { display: flex; gap: 8px; align-items: flex-end; margin: 8px 0 12px; } .code-form label { flex: 1; margin: 0; } .code-form button { margin: 0; }
.join-big { font-size: 17px; }
.team-room { position: relative; width: 100%; aspect-ratio: 200 / 150; border-radius: 18px; overflow: hidden; margin: 8px 0; }
.team-room .room-back, .team-room .room-front { position: absolute; inset: 0; width: 100%; height: 100%; }
.team-room .room-front { pointer-events: none; z-index: 20; }
.tr-av { position: absolute; width: 22%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.tr-av svg { width: 100%; height: auto; display: block; }
.tr-av.me .tr-nick { background: var(--accent); color: #fff; }
.tr-nick { font-size: 9px; line-height: 1.2; background: rgba(255,255,255,.85); padding: 1px 5px; border-radius: 99px; white-space: nowrap; margin-top: -4px; max-width: 160%; overflow: hidden; text-overflow: ellipsis; }
.tr-bub { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #fff; border: 1.5px solid #3b2c28; border-radius: 10px; padding: 3px 7px; font-size: 10px; line-height: 1.3; width: max-content; max-width: 130px; margin-bottom: -6px; box-shadow: 0 2px 6px rgba(0,0,0,.12); animation: rise .3s ease both; z-index: 25; }
.tr-bub::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #3b2c28; border-bottom: 0; }
.tr-label { position: absolute; left: 8px; top: 8px; z-index: 30; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.invite-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff8e6; border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.invite-box div { display: flex; flex-direction: column; } .inv-code { font-size: 22px; letter-spacing: .12em; font-family: ui-monospace, Menlo, monospace; }
.invite-box button { margin: 0; font-weight: 700; }
.chat-log { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 6px 2px; background: #f7f8f6; border-radius: 14px; }
.ch-msg { max-width: 82%; align-self: flex-start; background: #fff; border-radius: 14px 14px 14px 4px; padding: 6px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ch-msg.me { align-self: flex-end; background: #dff3e8; border-radius: 14px 14px 4px 14px; }
.ch-meta { display: flex; gap: 6px; align-items: baseline; font-size: 10.5px; color: var(--muted, #6b7670); }
.ch-meta b { color: #3b2c28; } .ch-rep { margin: 0 0 0 auto; padding: 0; font-size: 10.5px; color: #b0b6b2; }
.ch-body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.ch-sys { align-self: center; font-size: 11px; color: var(--muted, #6b7670); }
.ch-reasons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .ch-reasons button { margin: 0; padding: 3px 8px; font-size: 11px; }
.phrases { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; } .phrases::-webkit-scrollbar { display: none; }
.phrases button { margin: 0; flex-shrink: 0; padding: 6px 10px; font-size: 12.5px; border-radius: 99px; background: #fff; white-space: nowrap; }
.chat-form { display: flex; gap: 6px; margin-top: 6px; } .chat-form input { flex: 1; margin: 0; } .chat-form button { margin: 0; background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.tm-block { font-size: 11px; color: #b0b6b2; align-self: flex-start; margin: 2px 0 0; padding: 0; }
.lb-pop { text-align: center; } .lb-ic { font-size: 54px; animation: rise .6s ease infinite alternate; } .lb-pop p { margin: 4px 0; }
.tr-bub { max-width: 92px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tr-av { width: 20%; }

/* ---------- 0.27 へや（一覧・部屋とチャットを同時に） ---------- */
.rm-card { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); text-decoration: none; color: inherit; margin: 8px 0; background: #fff; }
.rm-card.invite { border-color: #f0d9a0; background: #fffaf0; } .rm-card.auto { border-color: #bfe5cf; background: #f4fbf7; }
.rm-ic { font-size: 24px; } .rm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rm-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-new { background: var(--danger); color: #fff; font-size: 11px; font-weight: 900; min-width: 22px; height: 22px; border-radius: 11px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.btn-mk { width: 100%; margin: 6px 0; font-weight: 700; border: 2px dashed #e0c070; background: #fffdf6; } .btn-mk small { font-weight: 400; color: var(--muted, #6b7670); }
.room-top { position: sticky; top: var(--top-h, 49px); z-index: 6; background: var(--bg); margin: 0 -16px; padding: 4px 16px 6px; box-shadow: 0 8px 12px -10px rgba(80,55,30,.3); }
.room-bar { display: flex; align-items: center; gap: 8px; padding: 4px 0 6px; }
.room-bar a { font-size: 26px; text-decoration: none; width: 30px; }
.room-name { flex: 1; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-menu { margin: 0; padding: 6px 12px; font-weight: 700; border-radius: 99px; }
.room-top .team-room { margin: 0 auto; max-height: 36vh; width: auto; max-width: 100%; }
body.in-room .chat-log { max-height: none; overflow: visible; background: transparent; padding: 10px 0 6px; min-height: 30vh; }
.composer { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 6; background: var(--bg); margin: 0 -16px; padding: 4px 12px 8px; box-shadow: 0 -8px 12px -10px rgba(80,55,30,.3); }
body.in-room main { padding-bottom: 76px; }
body.in-room .fab, body.in-room #pwa-bar { display: none !important; }
.room-sheet { max-height: 82vh; overflow-y: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-acts { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 6px; } .sheet-acts button { margin: 0; }
.room-sheet .team-list li { padding: 8px 0; }
body.in-room footer.legal { display: none; }
body.in-room .chat-log { min-height: calc(100dvh - var(--top-h, 49px) - 36vh - 200px); display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-head .sheet-close { position: static; width: 36px; height: 36px; padding: 0; margin: 0; flex: 0 0 36px; border-radius: 50%; }
.sheet-head b { flex: 1; }
button.link.tm-block { color: #a0a7a3; font-size: 11.5px; }

/* ---------- 0.28 今日のきろく（ホームのいちばん上） ---------- */
#today-kit:empty { min-height: 300px; }
.today-kit { background: linear-gradient(160deg, #fffaf0 0%, #f2fbf6 100%); border-radius: 24px; padding: 12px; margin: 10px 0 12px; box-shadow: 0 8px 22px rgba(80,55,30,.10); border: 1px solid #f1e6cf; }
.today-kit.complete { background: linear-gradient(160deg, #fff4d6 0%, #ffe9f1 100%); border-color: #f5cf7a; }
.tk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tk-me { width: 58px; flex: 0 0 58px; } .tk-me svg { width: 100%; height: auto; display: block; }
.tk-say { flex: 1; min-width: 0; }
.tk-bub { position: relative; background: #fff; border-radius: 14px; padding: 6px 10px; font-size: 13.5px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.tk-bub::before { content: ""; position: absolute; left: -6px; top: 12px; border: 6px solid transparent; border-right-color: #fff; border-left: 0; }
.tk-prog { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted, #6b7670); }
.tk-prog b { font-size: 16px; color: var(--accent); }
.tk-bar { flex: 1; height: 10px; background: #eae4d6; border-radius: 99px; overflow: hidden; }
.tk-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #36c47f, #1f9d6b); transition: width .5s cubic-bezier(.2,.9,.3,1.3); }
.tk-meals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.tk-cell { position: relative; }
.tk-meal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 8px; border-radius: 16px; background: #fff; text-decoration: none; color: inherit; border: 2px solid transparent; box-shadow: 0 2px 6px rgba(0,0,0,.05); min-height: 104px; transition: transform .15s; }
.tk-meal:active, .tk-mini:active { transform: scale(.95); }
.tk-meal .illus { width: 40px; height: 40px; }
.tk-meal b { font-size: 13px; }
.tk-add { font-size: 11.5px; font-weight: 700; color: var(--accent); background: #e7f6ee; padding: 2px 8px; border-radius: 99px; }
.tk-val { font-size: 15px; font-weight: 900; } .tk-val small { font-size: 10px; font-weight: 400; color: var(--muted, #6b7670); }
.tk-meal.done { background: #f1fbf5; border-color: #bfe5cf; }
.tk-stamp { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; animation: tkpop .4s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes tkpop { 0% { transform: scale(0) rotate(-30deg); } 100% { transform: scale(1) rotate(0); } }
.tk-meal.hot { border-color: #f5a623; background: #fffaf0; animation: tkhop 1.6s ease-in-out infinite; }
@keyframes tkhop { 0%, 100% { transform: translateY(0); } 12% { transform: translateY(-4px); } 24% { transform: translateY(0); } }
.tk-now { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #f5a623; color: #fff; font-size: 9.5px; font-weight: 900; padding: 1px 7px; border-radius: 99px; }
.tk-copy { position: absolute; bottom: -6px; right: -4px; width: 26px; height: 26px; padding: 0; margin: 0; border-radius: 50%; font-size: 13px; background: #fff; border: 1.5px solid #cfe7da; color: var(--accent); box-shadow: 0 2px 4px rgba(0,0,0,.08); }
.tk-life { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 10px; }
.tk-mini { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px; border-radius: 14px; background: #fff; text-decoration: none; color: inherit; box-shadow: 0 2px 6px rgba(0,0,0,.05); font-size: 11px; position: relative; transition: transform .15s; }
.tk-mini a { display: flex; flex-direction: column; align-items: center; gap: 1px; text-decoration: none; color: inherit; }
.tk-mini .illus { width: 30px; height: 30px; }
.tk-mini b { font-size: 14px; } .tk-mini b em { font-style: normal; } .tk-mini b small { font-size: 9.5px; font-weight: 400; color: var(--muted, #6b7670); }
.tk-mini.done { background: #f1fbf5; box-shadow: inset 0 0 0 2px #bfe5cf; }
.tk-plus { margin: 3px 0 0; padding: 2px 8px; font-size: 11px; font-weight: 900; border-radius: 99px; background: #e3f2ff; color: #2b7fd8; border: 0; }
.tk-water.splash { animation: tksplash .6s ease; }
@keyframes tksplash { 0% { transform: scale(1); } 40% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(74,168,255,.25); } 100% { transform: scale(1); } }
.tk-done { margin-top: 10px; text-align: center; font-weight: 900; color: #b06a00; background: #fff; border-radius: 12px; padding: 8px; animation: rise .4s ease both; }
@media (prefers-reduced-motion: reduce) { .tk-meal.hot, .tk-stamp, .tk-water.splash { animation: none; } }

/* ---------- 0.28 へや：入力欄を画面の下に固定・キーボードの上に ---------- */
body.in-room .composer { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 560px; padding: 6px 12px 8px; z-index: 30; }
body.in-room.kb-open .composer { bottom: var(--kb, 0px); }
body.in-room.kb-open .tabs { display: none; }
body.in-room .chat-log { min-height: 0; padding-bottom: 140px; }
.tr-count { position: absolute; right: 8px; top: 8px; z-index: 30; background: rgba(255,255,255,.88); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.room-inv { margin: 0; padding: 6px 10px; font-weight: 700; border-radius: 99px; background: #fff3d6; border-color: #f0c870; }
.inv-banner { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: #fff8e6; border: 2px dashed #f0c870; border-radius: 16px; padding: 12px; margin: 10px 0; }
.inv-banner .primary { margin: 6px 0 0; }

/* ---------- 0.28.1 へや：見えている範囲ぴったりの箱（チャットアプリの形） ---------- */
body.in-room { overflow: hidden; }
.room-app { position: fixed; left: 0; right: 0; margin: 0 auto; max-width: 560px; top: var(--vvtop, 0px); height: calc(var(--vvh, 100vh) - var(--tabs-h, 64px)); display: flex; flex-direction: column; background: var(--bg); z-index: 20; padding: env(safe-area-inset-top) 12px 0; box-sizing: border-box; }
body.kb-open .room-app { height: var(--vvh, 100vh); }
.room-app .room-top { position: static; margin: 0; padding: 2px 0 6px; box-shadow: none; flex: 0 0 auto; }
.room-app .team-room { max-height: 34vh; }
body.kb-open .room-app .team-room { max-height: 18vh; }
body.kb-open .room-app .inv-banner { display: none; }
.room-app .inv-banner { flex: 0 0 auto; margin: 4px 0; padding: 8px; }
.room-app .chat-log { flex: 1 1 auto; min-height: 0 !important; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 8px 0 !important; display: flex; flex-direction: column; justify-content: flex-start; }
.room-app .chat-log > :first-child { margin-top: auto; }
body.in-room .room-app .composer { position: static; flex: 0 0 auto; margin: 0 -12px; bottom: auto; }
/* 0.28.2 チャットが上にはみ出して招待コードに重ならないように（前の flex-end を打ち消す） */
body.in-room .room-app .chat-log { justify-content: flex-start; min-height: 0; }
.room-app { height: calc(100vh - 64px); }
body.in-room .room-app .chat-log { overflow-y: auto; overflow-x: hidden; max-height: none; flex: 1 1 auto; padding: 8px 0 !important; background: transparent; }
body.in-room .room-app { overflow: hidden; }

/* ---------- 0.30 食事サポート ---------- */
.coach-home { background: linear-gradient(135deg, #eef4ff, #f1fbf5); border: 1.5px solid #c9dafc; border-radius: 20px; padding: 12px 14px; margin: 10px 0; }
.coach-home.has-new { border-color: #3f6fd8; box-shadow: 0 6px 16px rgba(63,111,216,.18); }
.ch-top { display: flex; gap: 10px; align-items: center; } .ch-top > div { display: flex; flex-direction: column; } .ch-ic { font-size: 26px; }
.ch-btn { margin-top: 10px; } .ch-btn.pulse { animation: tkhop 1.8s ease-in-out infinite; }
.ch-done { margin: 8px 0 0; color: var(--accent); }
.ch-last { display: flex; align-items: center; gap: 8px; margin-top: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; text-decoration: none; color: inherit; }
.ch-prev { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.ch-new { font-style: normal; background: var(--danger); color: #fff; font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 99px; }
.ck-scale div { display: flex; gap: 4px; flex-wrap: wrap; }
.ck-scale label { flex: 1 0 8%; margin: 0; } .ck-scale input { position: absolute; opacity: 0; }
.ck-scale span { display: block; text-align: center; padding: 8px 0; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; }
.ck-scale input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.coach-msg { background: #f5f8ff; border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.cm-body { white-space: pre-wrap; font-size: 14.5px; line-height: 1.7; margin-top: 4px; }

/* ===== 0.31 プレミアム・使い方 ===== */
.top-chips { display: flex; gap: 8px; margin: 10px 0 2px; overflow-x: auto; scrollbar-width: none; }
.top-chips::-webkit-scrollbar { display: none; }
.top-chips a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.top-chips a:first-child { background: var(--accent-weak); border-color: transparent; color: var(--accent); }
.top-chips .tc-pm { background: linear-gradient(135deg, #fff6d6, #ffe7a3); border-color: #f0cf6a; color: #7a5300; }
.top-chips .tc-pm.on { background: linear-gradient(135deg, #d4a017, #f2c94c); color: #fff; border-color: transparent; letter-spacing: .06em; }
.lock-card { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: #5c3d00; background: linear-gradient(135deg, #fffaeb, #fff1c7); border: 1px dashed #e8c25a; }
.lock-card .lk-ic { font-size: 22px; }
.lock-card .lk-main { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.lock-card .lk-main b { font-size: 14px; }
.lock-card .lk-main small { font-size: 12px; color: #8a6a20; }
.lock-card .lk-go { font-size: 12px; font-weight: 700; color: #fff; background: #d4a017; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.plan-hero { text-align: center; padding: 24px 16px 18px; margin: 12px 0; border-radius: var(--radius); color: #fff; background: radial-gradient(120% 90% at 50% 0%, #2a8f84 0%, #0f5f58 55%, #0b3f3b 100%); }
.plan-hero h1 { color: #fff; font-size: 22px; margin: 4px 0 6px; letter-spacing: .02em; }
.plan-hero p { margin: 0; opacity: .92; font-size: 15px; }
.ph-crown { font-size: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.pf-list { list-style: none; margin: 0; padding: 0; }
.pf-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pf-list li:last-child { border-bottom: 0; }
.pf-ic { font-size: 22px; width: 30px; text-align: center; }
.pf-list b { display: block; font-size: 15px; }
.pf-list small { color: var(--muted); font-size: 13px; }
.free-list { margin-top: 10px; font-size: 14px; }
.free-list summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan-c { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 4px 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); text-align: center; }
.plan-c[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-weak); box-shadow: 0 4px 14px rgba(15,118,110,.18); }
.plan-c b { font-size: 13px; }
.pc-price { font-size: 22px; font-weight: 900; line-height: 1.2; }
.pc-price small { font-size: 12px; margin-left: 1px; }
.pc-per { font-size: 12px; color: var(--accent); font-weight: 700; }
.pc-note { font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.pc-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #d4a017; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.plan-confirm { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.plan-confirm h3 { font-size: 15px; margin: 0 0 8px; }
.plan-confirm dl { margin: 0 0 8px; display: grid; grid-template-columns: 6.5em 1fr; gap: 6px 10px; font-size: 13.5px; }
.plan-confirm dt { color: var(--muted); }
.plan-confirm dd { margin: 0; }
button.big { width: 100%; padding: 14px; font-size: 16px; font-weight: 700; margin-top: 8px; }
.center { text-align: center; }
.plan-mine { position: relative; border: 2px solid #e8c25a; background: linear-gradient(180deg, #fffdf5, var(--card)); }
.pm-badge, .mem-badge { display: inline-block; background: linear-gradient(135deg, #d4a017, #f2c94c); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .12em; border-radius: 6px; padding: 2px 8px; text-decoration: none; vertical-align: middle; }
.pm-month { display: flex; gap: 12px; align-items: center; margin: 12px 0; padding: 10px; border-radius: 12px; background: var(--bg); }
.pm-mi { width: 76px; flex: 0 0 76px; }
.pm-month p { margin: 2px 0 6px; }
.pm-month button.primary { width: auto; padding: 8px 18px; margin: 0; }
.mem-dot { display: inline-block; font-style: normal; font-size: 9px; font-weight: 900; color: #fff; background: #d4a017; border-radius: 4px; padding: 0 3px; margin-left: 3px; vertical-align: 1px; }
.legal table, .rp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.legal th { width: 8em; color: var(--muted); font-weight: 600; }
.rp-praise { padding: 12px 14px; border-radius: 12px; background: var(--accent-weak); font-weight: 700; margin: 8px 0 12px; }
.rp-table th, .rp-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.rp-table tbody th { text-align: left; font-weight: 600; font-size: 13px; }
.rp-table tr.up td b { color: var(--ok); }
.rp-table tr.up td b::after { content: " ↑"; }
.rp-next { margin: 14px 0 8px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--accent); }
.rp-next p { margin: 4px 0 0; }
.guide-hero { display: flex; gap: 14px; align-items: center; padding: 18px 16px; margin: 12px 0; border-radius: var(--radius); background: linear-gradient(160deg, #e6f6f2, #fdf7e8); }
.guide-hero h1 { font-size: 20px; margin: 0 0 4px; }
.guide-hero p { margin: 0; font-size: 14px; color: var(--text); }
.gh-me { flex: 0 0 92px; width: 92px; }
.gh-me svg { width: 100%; height: auto; }
.gh-emoji { font-size: 52px; text-align: center; }
.guide-sec { border-bottom: 1px solid var(--line); }
.guide-sec:last-child { border-bottom: 0; }
.guide-sec summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 2px; font-weight: 700; font-size: 15.5px; }
.guide-sec summary::-webkit-details-marker { display: none; }
.guide-sec summary::after { content: "＋"; margin-left: auto; color: var(--muted); font-weight: 400; }
.guide-sec[open] summary::after { content: "−"; }
.guide-sec summary span { font-size: 20px; width: 26px; text-align: center; }
.gs-body { padding: 0 2px 14px 36px; font-size: 14.5px; }
.gs-body ul { padding-left: 1.1em; margin: 6px 0; }
.gs-body li { margin: 4px 0; }
.g-steps { list-style: none; counter-reset: st; padding: 0; margin: 4px 0; }
.g-steps li { counter-increment: st; position: relative; padding: 6px 0 6px 38px; display: flex; flex-direction: column; }
.g-steps li::before { content: counter(st); position: absolute; left: 0; top: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 900; display: grid; place-items: center; }
.g-steps span { color: var(--muted); font-size: 13.5px; }
.g-faq dt { font-weight: 700; margin-top: 10px; }
.g-faq dd { margin: 2px 0 0; color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .lock-card { background: #2b2410; color: #f5dca0; border-color: #7a6220; }
  .lock-card .lk-main small { color: #d8c08a; }
  .plan-mine { background: var(--card); }
  .guide-hero { background: linear-gradient(160deg, #173330, #2b2716); }
}
.top-scene .pm-ribbon { display: none; }
.pm-banner { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: #fff; background: linear-gradient(120deg, #0f5f58, #1f8f84 55%, #d4a017); box-shadow: 0 6px 18px rgba(15,95,88,.25); }
.pm-banner .pb-crown { font-size: 26px; }
.pm-banner .pb-main { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.pm-banner small { font-size: 11.5px; opacity: .92; }
.pm-banner .pb-go { font-weight: 800; font-size: 13px; background: rgba(255,255,255,.22); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }

/* ===== 0.32 毎日さわる画面を楽しく ===== */
.s-hero { position: relative; overflow: hidden; margin: 12px 0; padding: 18px 16px 16px; border-radius: 20px; color: #fff; box-shadow: 0 10px 24px -12px rgba(0,0,0,.35); isolation: isolate; }
.s-hero .sh-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.s-hero .sh-ic { flex: 0 0 58px; width: 58px; height: 58px; border-radius: 18px; background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(0,0,0,.35); animation: shPop .5s cubic-bezier(.2,1.6,.4,1); }
.s-hero .sh-ic .illus { width: 46px; height: 46px; }
.s-hero .sh-emoji { font-size: 32px; }
.s-hero h1 { color: #fff; font-size: 21px; margin: 0; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.s-hero p { margin: 2px 0 0; font-size: 13.5px; opacity: .95; }
.s-hero .sh-dot { position: absolute; border-radius: 50%; background: rgba(255,255,255,.16); z-index: 0; }
.s-hero .d1 { width: 140px; height: 140px; right: -40px; top: -50px; }
.s-hero .d2 { width: 70px; height: 70px; right: 70px; bottom: -30px; }
.s-hero .d3 { width: 22px; height: 22px; left: 46%; top: 12px; animation: shFloat 4s ease-in-out infinite; }
.s-hero .sh-day { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-top: 12px; background: rgba(255,255,255,.2); border-radius: 999px; padding: 4px 6px; font-weight: 700; font-size: 14px; }
.s-hero .sh-day a { color: #fff; text-decoration: none; font-size: 20px; width: 34px; height: 30px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.2); }
.s-hero .sh-sp { width: 34px; }
.s-hero .sh-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.s-hero .sh-stats div { background: rgba(255,255,255,.2); border-radius: 14px; padding: 8px 4px; text-align: center; }
.s-hero .sh-stats b { display: block; font-size: 22px; line-height: 1.1; }
.s-hero .sh-stats small { font-size: 11.5px; opacity: .9; }
.s-hero .sh-note { position: relative; z-index: 1; margin-top: 10px; font-size: 13px; }
.s-hero .sh-cta { position: relative; z-index: 1; display: block; margin-top: 14px; text-align: center; padding: 13px; border-radius: 14px; background: #fff; color: #c2410c; font-weight: 900; text-decoration: none; font-size: 16px; box-shadow: 0 6px 14px -6px rgba(0,0,0,.35); }
.s-hero .sh-cta:active { transform: scale(.97); }
.s-water { background: linear-gradient(135deg, #2f86e8 0%, #46b3ff 55%, #7b6cf0 100%); }
.s-train { background: linear-gradient(135deg, #ff7a3d 0%, #ff4f6d 60%, #c0399b 100%); }
.s-team { background: linear-gradient(135deg, #7b5cf0 0%, #c264e0 55%, #ff8fab 100%); }
.s-meal-breakfast { background: linear-gradient(135deg, #ffb23f 0%, #ff8a4c 100%); }
.s-meal-lunch { background: linear-gradient(135deg, #f7c531 0%, #4fbf7a 100%); }
.s-meal-dinner { background: linear-gradient(135deg, #5a63e0 0%, #8f6ef0 60%, #e07ab8 100%); }
.s-meal-snack { background: linear-gradient(135deg, #ff8fab 0%, #ffb36b 100%); }
@keyframes shPop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shFloat { 50% { transform: translateY(8px); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 食事：区分を大きなアイコンで */
.meal-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border: 0; padding: 0; margin: 0 0 12px; }
.meal-types label { margin: 0; }
.meal-types input { position: absolute; opacity: 0; }
.meal-types span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--text); transition: transform .15s; cursor: pointer; }
.meal-types .illus { width: 38px; height: 38px; }
.meal-types b { font-size: 13px; }
.meal-types input:checked + span { border-color: transparent; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 16px -8px rgba(0,0,0,.4); }
.mt-breakfast input:checked + span { background: linear-gradient(135deg, #ffb23f, #ff8a4c); }
.mt-lunch input:checked + span { background: linear-gradient(135deg, #f2b705, #3fb370); }
.mt-dinner input:checked + span { background: linear-gradient(135deg, #5a63e0, #a06ef0); }
.mt-snack input:checked + span { background: linear-gradient(135deg, #ff7f9f, #ffa65c); }
.when-row label { font-size: 12.5px; margin: 0 0 8px; }
.when-row input { padding: 8px 10px; font-size: 15px; }
.meal-form-card { border-radius: 20px; }

/* 水分 */
.life-card { border-radius: 20px; position: relative; overflow: hidden; }
.lc-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.lc-goal { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 10px; }
.water-card { background: linear-gradient(180deg, #f3f9ff, var(--card) 70%); }
.wg-wrap { display: flex; gap: 14px; align-items: center; margin: 10px 0 6px; }
.wg-glass { flex: 0 0 112px; width: 112px; }
.wg-svg { width: 100%; height: auto; display: block; }
.wg-water { transition: transform .8s cubic-bezier(.3,1.4,.5,1); }
.wg-wave { animation: wgWave 3s linear infinite; }
.wg-wave.w2 { animation-duration: 4.5s; animation-direction: reverse; }
@keyframes wgWave { to { transform: translateX(50px); } }
.wg-bub circle { animation: wgBub 3s ease-in infinite; }
.wg-bub circle:nth-child(2) { animation-delay: 1s; } .wg-bub circle:nth-child(3) { animation-delay: 2s; }
@keyframes wgBub { from { transform: translateY(0); opacity: .7; } to { transform: translateY(-80px); opacity: 0; } }
.wg-glass.splash { animation: wgSplash .5s; }
@keyframes wgSplash { 30% { transform: scale(1.06) rotate(-2deg); } 60% { transform: scale(.98) rotate(1deg); } }
.wg-side { flex: 1; min-width: 0; }
.wg-num b { font-size: 40px; font-weight: 900; color: #1f6fd1; letter-spacing: -.02em; }
.wg-num small { font-size: 15px; margin-left: 2px; color: #1f6fd1; }
.wg-cups { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.wg-cups i { width: 15px; height: 19px; border-radius: 2px 2px 5px 5px; border: 2px solid #9cc9ee; background: #fff; }
.wg-cups i.on { background: linear-gradient(#7cc8ff, #2f86e8); border-color: #2f86e8; }
.wg-msg { font-size: 13px; font-weight: 700; color: #1f6fd1; margin: 4px 0 0; }
.w-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.w-btns button { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 4px; border-radius: 16px; border: 0; color: #fff; background: linear-gradient(160deg, #46b3ff, #2f86e8); box-shadow: 0 6px 0 #1f64b8, 0 8px 14px -6px rgba(31,100,184,.5); transition: transform .08s, box-shadow .08s; }
.w-btns button:nth-child(2) { background: linear-gradient(160deg, #4fd1c5, #1f9d9d); box-shadow: 0 6px 0 #167a7a, 0 8px 14px -6px rgba(22,122,122,.5); }
.w-btns button:nth-child(3) { background: linear-gradient(160deg, #8f7cf6, #5a49d6); box-shadow: 0 6px 0 #4335a8, 0 8px 14px -6px rgba(67,53,168,.5); }
.w-btns button:active { transform: translateY(5px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.w-btns .wb-ic { font-size: 22px; } .w-btns b { font-size: 17px; } .w-btns small { font-size: 11px; opacity: .9; }
.w-undo { display: block; margin: 12px auto 0; border: 0; background: none; color: var(--muted); font-size: 13px; padding: 4px 8px; }

/* 睡眠 */
.sleep-card { color: #fff; border: 0; background: linear-gradient(160deg, #1d2257 0%, #3b2f80 60%, #6a4aa8 100%); }
.sleep-card .lc-goal { background: rgba(255,255,255,.15); color: #e4ddff; }
.sl-stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; animation: slTw 2.4s ease-in-out infinite; }
.sl-stars i:nth-child(1) { left: 12%; top: 20%; } .sl-stars i:nth-child(2) { left: 70%; top: 12%; animation-delay: .6s; } .sl-stars i:nth-child(3) { left: 84%; top: 42%; animation-delay: 1.2s; }
.sl-stars i:nth-child(4) { left: 34%; top: 56%; animation-delay: 1.8s; } .sl-stars i:nth-child(5) { left: 58%; top: 70%; animation-delay: .3s; }
@keyframes slTw { 50% { opacity: .2; transform: scale(.5); } }
.sl-big { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 2px; position: relative; }
.sl-face { font-size: 46px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
.sl-big b { font-size: 52px; font-weight: 900; letter-spacing: -.03em; }
.sl-big small { font-size: 16px; margin-left: 4px; opacity: .85; }
.sl-msg { text-align: center; margin: 0 0 10px; font-weight: 700; color: #ffe9a8; min-height: 1.4em; }
.sl-range { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 999px; padding: 0; border: 0; background: linear-gradient(90deg, #ffd36b calc(var(--sl, 0) * 100%), rgba(255,255,255,.2) 0); }
.sl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff6c7; border: 4px solid #ffd36b; box-shadow: 0 0 0 6px rgba(255,211,107,.25); }
.sl-ticks { display: flex; justify-content: space-between; font-size: 11px; opacity: .7; margin: 4px 2px 10px; }
.sl-chips { display: flex; gap: 6px; }
.sl-chips button { flex: 1; margin: 0; padding: 9px 0; border-radius: 12px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; font-size: 14px; }
.sl-chips button[aria-pressed="true"] { background: #ffd36b; color: #3b2f80; }
.back-home { margin: 4px 0 16px; }

/* 仲間：へや一覧 */
.team-sec { border-radius: 20px; }
.rm-card2 { display: block; margin: 10px 0; padding: 12px 14px; border-radius: 18px; text-decoration: none; color: var(--text); background: linear-gradient(135deg, #f6f1ff, #fff3f8); border: 1.5px solid #e6dcff; box-shadow: 0 6px 16px -12px rgba(123,92,240,.6); transition: transform .12s; }
.rm-card2.auto { background: linear-gradient(135deg, #eefcf5, #f3f7ff); border-color: #c9ecd9; }
.rm-card2:active { transform: scale(.98); }
.rc-top { display: flex; align-items: center; gap: 8px; }
.rc-kind { font-size: 11px; font-weight: 800; color: #7b5cf0; background: #fff; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.rm-card2.auto .rc-kind { color: #1f9d6b; }
.rc-name { flex: 1; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-faces { display: flex; align-items: flex-end; margin: 8px 0 6px; padding-left: 6px; }
.rc-faces .rf { width: 42px; height: 54px; margin-left: -8px; overflow: hidden; border-radius: 14px 14px 10px 10px; background: rgba(255,255,255,.8); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.rc-faces .rf svg { width: 100%; height: auto; transform: scale(1.5) translateY(6%); transform-origin: 50% 0; }
.rc-cnt { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 700; }
.rc-bar { height: 8px; border-radius: 999px; background: rgba(0,0,0,.06); overflow: hidden; }
.rc-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffb020, #ff5f7e); transition: width .6s; }
.rc-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 12.5px; }
.rc-last { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-mk { width: 100%; margin-top: 6px; padding: 12px; border-radius: 14px; border: 2px dashed #c9b8ff; background: #faf7ff; color: #6b4ee0; font-weight: 800; }

/* 仲間：へやの中 */
.room-bar { background: linear-gradient(135deg, #7b5cf0, #c264e0 60%, #ff8fab); color: #fff; border-radius: 16px; padding: 8px 10px; }
.room-bar a, .room-bar .room-name { color: #fff; }
.room-bar button { background: rgba(255,255,255,.22); color: #fff; border: 0; border-radius: 999px; font-weight: 700; }
.ch-msg { --hue: 200; border-left: 3px solid hsl(var(--hue) 70% 62%); }
.ch-msg.me { border-left: 0; background: linear-gradient(135deg, #d9f7e8, #c9f0ff); }
.ch-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 4px; border-radius: 50%; font-style: normal; font-size: 10px; font-weight: 900; color: #fff; background: hsl(var(--hue) 65% 55%); vertical-align: -3px; }
.ch-msg.me .ch-dot { background: #1f9d6b; }
.phrases button { border: 0; background: linear-gradient(135deg, #f1ebff, #ffeaf2); color: #5b3fc4; font-weight: 700; }
.chat-form button { background: linear-gradient(135deg, #7b5cf0, #ff6f9c); color: #fff; border: 0; font-weight: 800; border-radius: 999px; }
@media (prefers-color-scheme: dark) {
  .water-card { background: var(--card); }
  .rm-card2, .rm-card2.auto { background: #22202e; border-color: #3a3350; color: var(--text); }
  .rc-kind { background: #2e2a40; }
  .ch-msg.me { background: #1f3b34; }
  .phrases button { background: #2e2a40; color: #d8ccff; }
  .btn-mk { background: #22202e; }
}

/* ===== 0.32 グラフ ===== */
.s-graph { background: linear-gradient(135deg, #0f766e 0%, #1fa58f 50%, #7cc96a 100%); }
.s-hero .sh-tabs { position: relative; z-index: 1; margin-top: 12px; }
.sh-tabs .seg { background: rgba(255,255,255,.18); border: 0; border-radius: 999px; padding: 4px; display: flex; gap: 4px; }
.sh-tabs .seg button { flex: 1; margin: 0; border: 0; border-radius: 999px; background: transparent; color: #fff; font-weight: 700; font-size: 13px; padding: 7px 2px; }
.sh-tabs .seg button[aria-pressed="true"] { background: #fff; color: #0f766e; box-shadow: 0 4px 10px -4px rgba(0,0,0,.3); }
.sh-gstats { position: relative; z-index: 1; }
.sh-gstats .g-stat { background: rgba(255,255,255,.18); }
.sh-gstats .g-stat span, .sh-gstats .g-stat b small { color: rgba(255,255,255,.85); }
.sh-gstats .g-stat b, .sh-gstats .g-stat.good b { color: #fff; }
.sh-gstats .g-prog { color: rgba(255,255,255,.9); }
.sh-gstats .g-prog b { color: #fff; }
.sh-gstats .g-prog-bar { position: relative; height: 14px; background: rgba(255,255,255,.22); overflow: visible; margin-top: 14px; }
.sh-gstats .g-prog-bar i { background: linear-gradient(90deg, #fff6a8, #ffd34d); }
.g-run { position: absolute; top: -16px; transform: translateX(-50%) scaleX(-1); font-style: normal; font-size: 20px; animation: gRun .6s ease-in-out infinite alternate; }
.g-flag { position: absolute; right: -4px; top: -18px; font-style: normal; font-size: 18px; }
@keyframes gRun { to { transform: translateX(-50%) scaleX(-1) translateY(-3px); } }
.g-card { border-radius: 20px; background: linear-gradient(180deg, #f4fbf8, var(--card) 40%); }
svg.chart .ln-a { stop-color: #14b8a6; } svg.chart .ln-b { stop-color: #84cc16; }
svg.chart.c-waist .ln-a { stop-color: #f59e0b; } svg.chart.c-waist .ln-b { stop-color: #ef4444; }
svg.chart.c-fat .ln-a { stop-color: #8b5cf6; } svg.chart.c-fat .ln-b { stop-color: #ec4899; }
svg.chart .line { stroke-width: 3.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: chDraw 1.2s ease-out .1s forwards; filter: drop-shadow(0 3px 3px rgba(15,118,110,.25)); }
@keyframes chDraw { to { stroke-dashoffset: 0; } }
svg.chart .area-top { stop-opacity: .35; }
svg.chart .pulse { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: chPulse 1.8s ease-out infinite; }
@keyframes chPulse { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }
svg.chart .bubble { filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
.g-card .seg.sub { background: var(--bg); border-radius: 999px; padding: 3px; border: 0; }
.g-card .seg.sub button { border: 0; border-radius: 999px; }
.g-card .seg.sub button[aria-pressed="true"] { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .g-card { background: var(--card); } }
@media (prefers-reduced-motion: reduce) { svg.chart .line { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; } svg.chart .pulse, .g-run, .wg-wave, .wg-bub circle { animation: none; } }
.meal-types label { position: relative; }
.meal-types input { width: 1px; height: 1px; margin: 0; left: 50%; top: 50%; pointer-events: none; }

/* ===== 0.33 体重の記録 ===== */
.s-body { background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #38bdf8 100%); }
.bd-gauge { position: relative; z-index: 1; width: 230px; max-width: 80%; margin: 10px auto 0; }
.bg-gauge { width: 100%; height: auto; display: block; overflow: visible; }
.bg-arc { transition: stroke-dashoffset .6s ease; }
.bg-needle { transform-origin: 80px 82px; transform-box: view-box; transition: transform .6s cubic-bezier(.3,1.5,.5,1); }
.bd-num { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; }
.bd-step { width: 48px; height: 48px; margin: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.25); color: #fff; font-size: 26px; font-weight: 700; line-height: 1; }
.bd-step:active { transform: scale(.9); background: rgba(255,255,255,.4); }
.bd-in { display: flex; align-items: baseline; gap: 4px; margin: 0; color: #fff; }
.bd-in input { width: 150px; margin: 0; padding: 4px 6px; text-align: center; font-size: 46px; font-weight: 900; letter-spacing: -.02em; color: #fff; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.35); border-radius: 16px; -moz-appearance: textfield; }
.bd-in input::-webkit-inner-spin-button, .bd-in input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bd-in input:focus { outline: 3px solid #fff6a8; }
.bd-in small { font-size: 16px; font-weight: 700; }
.bd-quick { position: relative; z-index: 1; display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.bd-quick button { margin: 0; padding: 6px 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.2); color: #fff; font-weight: 700; font-size: 13px; }
.bd-diff { position: relative; z-index: 1; text-align: center; margin: 10px 0 0 !important; font-size: 14px !important; min-height: 1.4em; }
.bd-diff b { color: #fff6a8; }
.bd-card { border-radius: 20px; }
.bd-date { display: flex; align-items: center; gap: 8px; }
.bd-date span { font-size: 22px; }
.bd-date label { flex: 1; margin: 0; font-size: 12.5px; }
.bd-more { margin: 10px 0 4px; }
.bd-more summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 14px; padding: 6px 0; }
.bd-save { font-size: 17px; padding: 15px; border-radius: 14px; background: linear-gradient(135deg, #0f766e, #14b8a6); border: 0; box-shadow: 0 8px 16px -8px rgba(15,118,110,.6); }
.bd-hist { border-radius: 20px; }
.bd-hist .sec-head { display: flex; justify-content: space-between; align-items: center; }
.bd-hist .note-only { margin: 0; font-size: 13px; display: flex; gap: 4px; align-items: center; }
.bd-hist .note-only input { width: auto; margin: 0; }
.bd-list { list-style: none; margin: 0; padding: 0; }
.bd-list li { display: grid; grid-template-columns: 3.4em auto 4.2em 1fr auto; align-items: center; gap: 6px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.bd-list li:last-child { border-bottom: 0; }
.bl-d { color: var(--muted); font-size: 13px; font-weight: 700; }
.bl-w { font-size: 18px; } .bl-w small { font-size: 11px; color: var(--muted); margin-left: 1px; }
.bl-x { font-size: 12px; font-weight: 800; text-align: center; border-radius: 999px; padding: 1px 0; color: var(--muted); }
.bl-x.down { color: #0f766e; background: #dff6ef; } .bl-x.up { color: #c2410c; background: #ffeedd; }
.bl-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-list .del { font-size: 12px; }
.bl-note { grid-column: 1 / -1; font-size: 13px; background: var(--bg); border-radius: 10px; padding: 6px 10px; }
.bd-list.only-notes li:not(.has-note) { display: none; }
@media (prefers-color-scheme: dark) { .bl-x.down { background: #163b33; } .bl-x.up { background: #3b2a1a; } }

/* ===== 0.34 能力アップ ===== */
.ab-up { max-width: 340px; }
.ab-up-head { font-size: 30px; font-weight: 900; letter-spacing: .08em; background: linear-gradient(90deg, #ff7a3d, #ffd34d, #4fd1a5); -webkit-background-clip: text; background-clip: text; color: transparent; animation: shPop .5s cubic-bezier(.2,1.6,.4,1); }
.ab-up-sub { display: block; margin-bottom: 10px; }
.abu-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; margin: 8px 0; border-radius: 14px; background: linear-gradient(135deg, #fff7e6, #f0fbf6); }
.abu-ic { font-size: 28px; }
.abu-main { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.abu-lv { font-size: 14px; color: var(--muted); }
.abu-lv em { font-style: normal; font-size: 20px; font-weight: 900; color: #e0662b; }
.abu-lv i { font-style: normal; color: #e0662b; }
.abu-title { font-size: 12px; font-weight: 700; color: #7b5cf0; }
.abu-t { font-weight: 900; color: #c2410c; white-space: nowrap; }
.abu-item { display: flex; align-items: center; gap: 10px; text-align: left; margin: 4px 0 8px; padding: 8px 12px; border-radius: 14px; border: 2px dashed #f0cf6a; background: #fffaeb; font-size: 13px; }
.abu-item > :first-child { width: 56px; flex: 0 0 56px; }
.ab-reward { font-size: 13px; background: #fff7e6; border-radius: 12px; padding: 8px 12px; margin: 4px 0 10px; }
@media (prefers-color-scheme: dark) { .abu-row { background: #2a2a1f; } .abu-item, .ab-reward { background: #2b2410; } }

/* ===== 0.35 へや：名前を変える・キーボードの時は「へや＋入力欄」だけ ===== */
.room-bar .room-name { display: flex; align-items: center; gap: 4px; margin: 0; padding: 4px 8px; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); font-weight: 800; text-align: left; }
.room-bar .room-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-bar .room-name .rn-pen { font-style: normal; font-size: 13px; opacity: .9; background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 6px; }
.name-sheet h2 { margin: 0 0 10px; }
.name-sheet .sheet-close { position: absolute; right: 12px; top: 10px; border: 0; background: none; font-size: 22px; }
.name-sheet { position: relative; }
.ns-btn { display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin: 8px 0; padding: 12px 14px; border-radius: 14px; border: 1.5px solid #e6dcff; background: #f8f5ff; text-align: left; }
.ns-btn b { font-size: 15px; } .ns-btn span { font-size: 12.5px; color: var(--muted); }
.ns-btn:disabled { opacity: .55; }
/* 入力欄は LINE のような1行 */
.chat-form { align-items: center; }
.chat-form input { border-radius: 999px; padding: 10px 14px; }
.chat-form button { width: 44px; height: 40px; padding: 0; font-size: 14px; flex: 0 0 auto; }
/* キーボードが出ている間：チャットと定型文はかくし、空いた所は全部へやを映す（チャットはキーボードを閉じると見える） */
body.kb-open .room-app .chat-log, body.kb-open .room-app .phrases, body.kb-open .room-app .inv-banner { display: none !important; }
body.kb-open .room-app .room-top { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: 4px; }
body.kb-open .room-app #tr-scene { flex: 1 1 auto; min-height: 0; container-type: size; display: flex; align-items: center; justify-content: center; }
body.kb-open .room-app #tr-scene .team-room { max-height: none !important; height: auto; width: min(100cqw, 133.3cqh); margin: 0; }
body.kb-open .room-app .room-bar { padding: 4px 8px; }
body.kb-open .room-app .composer { padding-top: 6px; }

/* ===== 0.36 みんなの食品 ===== */
.uf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.uf-grid .w2 { grid-column: 1 / -1; }
.uf-grid label small { margin-left: 3px; }
.uf-check { margin: 8px 0; }
.ufc { border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.ufc.ok { background: #e3f7ee; color: #0c5a3c; } .ufc.warn { background: #fff4dc; color: #6b4a00; } .ufc.err { background: #fde8e6; color: #7a1a12; }
details.custom.once { margin: 12px 0 0; border-top: 1px dashed var(--line); padding-top: 6px; }
details.custom.once summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.uf-tag { display: inline-block; font-style: normal; font-size: 10px; font-weight: 800; color: #6b4ee0; background: #efe9ff; border-radius: 6px; padding: 0 5px; margin-right: 4px; vertical-align: 1px; }
.uf-tag.mine { color: #8a6a20; background: #fff4dc; }
.food-list li.uf { display: flex; align-items: stretch; }
.food-list li.uf > button[data-add] { flex: 1; min-width: 0; }
.uf-rep { margin: 0 0 0 4px; border: 0; background: none; color: var(--muted); font-size: 14px; padding: 0 8px; }
@media (prefers-color-scheme: dark) { .ufc.ok { background: #163b2c; color: #b6f0d4; } .ufc.warn { background: #3b2e10; color: #f5dca0; } .ufc.err { background: #3b1a16; color: #f9c0b8; } }
.ab-body .ab-bar i { background: linear-gradient(90deg, #ff9a7a, #e5484d); } .ab-eat .ab-bar i { background: linear-gradient(90deg, #b8f0a0, #3fae5a); } .ab-rest .ab-bar i { background: linear-gradient(90deg, #c7b8ff, #7b5cf0); }
.lvup-pet { display: flex; flex-direction: column; align-items: center; margin: -6px 0 6px; }
.lvup-pet .bond-pet { position: relative; display: inline-block; width: 64px; border: 0; background: none; animation-iteration-count: 3; }
.lvup-pet small { font-size: 11px; color: var(--muted); }
.album-tease { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); background: linear-gradient(135deg, #fff3e6, #f3ecff); border: 0; }
.album-tease .at-ic { font-size: 30px; }
.album-tease span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.album-tease small { color: var(--muted); font-size: 12px; }
.album-tease .at-go { font-weight: 800; color: #c2410c; font-size: 13px; }
@media (prefers-color-scheme: dark) { .album-tease { background: #2b2620; } }
.lvup-pet .bond-pet .pet-only { animation-iteration-count: infinite !important; animation-delay: .4s; }
.itsumo { margin: 8px 0 10px; }
.itsumo .set-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.itsumo .set-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.itsumo .set-row::-webkit-scrollbar { display: none; }
.itsumo .set-chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; margin: 0; padding: 8px 12px; border-radius: 14px; border: 1.5px solid #f0cf6a; background: #fffaeb; text-align: left; }
.itsumo .set-chip small { font-size: 11px; color: var(--muted); }
.itsumo .set-chip.copy { width: auto; border-color: var(--accent); background: var(--accent-weak); color: var(--text); }
@media (prefers-color-scheme: dark) { .itsumo .set-chip { background: #2b2410; } }
