/* 台所の相棒 — 白いホーロー × 濃紺の縁 × 木のまな板 */
:root {
  --enamel: #fbfbf7;
  --white: #ffffff;
  --blue: #1d4f91;
  --blue-d: #143d73;
  --rim: #10294d;
  --blue-50: #ebf1f9;
  --blue-100: #d5e2f2;
  --line: #e3e8ef;
  --line-2: #cfd8e4;
  --wood: #c99560;
  --wood-d: #7f5228;
  --wood-l: #f5eadb;
  --ink: #1b2533;
  --ink-2: #485467;
  --fire: #bb3a1f;
  --ok: #2b7656;
  --jp: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', sans-serif;
  --num: 'Lexend', 'Zen Maru Gothic', sans-serif;
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --shadow: 0 10px 24px -14px rgba(16, 41, 77, .55);
  --bounce: cubic-bezier(.34, 1.4, .5, 1);
  --glide: cubic-bezier(.22, .8, .24, 1);
  --tabs-h: 70px;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--enamel); color: var(--ink); font-family: var(--jp); font-size: 16px; line-height: 1.6; line-break: strict; overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.nw { white-space: nowrap; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.i { width: 22px; height: 22px; flex: none; }
h1, h2, h3, .btn, .chip, .badge, .band, .tabs a, .card-n, .ck-tbtn, .ck-title b, .top-t, .big-t, .hello, .ob-t, .d-title, .ts-h, .empty-h, .set-t b, .al-t b {
  word-break: keep-all; font-feature-settings: "palt";
}
:focus-visible { outline: 3px solid #4d8be0; outline-offset: 2px; }
.fallback { padding: 48px 24px; font-size: 16px; }

/* ---------- 骨組み ---------- */
.app { position: relative; height: 100vh; height: 100dvh; overflow: hidden; background: var(--enamel); }
.view { position: absolute; inset: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--enamel); }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: calc(var(--tabs-h) + var(--sb) + 32px); }
.s-recipe .scroll, .s-settings .scroll, .s-about .scroll { padding-bottom: calc(40px + var(--sb)); }
.s-recipe .scroll { padding-bottom: calc(110px + var(--sb)); }
.is-down { transform: scale(.96); }
button, .card, .chip, a.btn, .row-r { transition: transform .18s var(--bounce), background-color .2s, color .2s, box-shadow .2s; }

/* 画面遷移（View Transitions。対応ブラウザのみ） */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: var(--glide); }
html[data-dir="fwd"]::view-transition-old(root) { animation-name: vtOutL; }
html[data-dir="fwd"]::view-transition-new(root) { animation-name: vtInR; }
html[data-dir="back"]::view-transition-old(root) { animation-name: vtOutR; }
html[data-dir="back"]::view-transition-new(root) { animation-name: vtInL; }
::view-transition-group(hero-img) { animation-duration: .38s; animation-timing-function: var(--glide); }
@keyframes vtOutL { to { transform: translateX(-18%); opacity: 0; } }
@keyframes vtInR { from { transform: translateX(22%); opacity: 0; } }
@keyframes vtOutR { to { transform: translateX(22%); opacity: 0; } }
@keyframes vtInL { from { transform: translateX(-18%); opacity: 0; } }

/* ---------- 上部 ---------- */
.top { flex: none; padding: calc(var(--st) + 12px) 16px 12px; background: var(--enamel); position: relative; z-index: 2; transition: box-shadow .2s; }
.scrolled .top { box-shadow: 0 1px 0 var(--line), 0 8px 16px -14px rgba(16, 41, 77, .5); }
.top-plain { display: flex; align-items: center; gap: 8px; }
.top-t { font-size: 19px; font-weight: 700; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--blue-d); }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 2px var(--rim); }
.brand .round-btn { margin-left: auto; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--blue-d); background: var(--white); box-shadow: inset 0 0 0 2px var(--line-2); flex: none; }
.round-btn .i { width: 22px; height: 22px; }
.round-btn.on-photo { box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .4), inset 0 0 0 2px var(--rim); }
.hello { font-size: 26px; font-weight: 900; line-height: 1.4; margin: 12px 0 12px; letter-spacing: .01em; }
.search-in { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 2px var(--rim); color: var(--blue-d); }
.search-in input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); height: 100%; outline: none; }
.search-in input::placeholder { color: #66717f; }
.search-in:focus-within { box-shadow: inset 0 0 0 3px var(--blue); }
.big-t { font-size: 30px; font-weight: 900; line-height: 1.3; }
.shop-sub { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.shop-sub b { font-size: 18px; color: var(--blue-d); }

/* ---------- 冷蔵庫（逆引き） ---------- */
.fridge { margin: 4px 16px 0; background: var(--white); border-radius: var(--r-l); box-shadow: inset 0 0 0 2px var(--rim), var(--shadow); padding: 14px 0 6px; overflow: hidden; }
.fridge-h { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 8px; }
.fridge-h h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.fridge-n { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 600; display: inline-grid; place-items: center; }
.link-btn { min-height: 44px; padding: 0 4px; font-size: 14px; font-weight: 700; color: var(--blue-d); text-decoration: underline; text-underline-offset: 3px; }
.link-btn[hidden] { display: none; }
.shelf { display: flex; align-items: center; border-top: 2px solid var(--blue-50); }
.shelf-l { flex: none; width: 70px; white-space: nowrap; padding-left: 14px; font-size: 12px; font-weight: 700; color: var(--blue-d); line-height: 1.3; }
.shelf-row { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 8px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.shelf-row::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 15px; border-radius: 999px; background: #f2f5f9; box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 15px; font-weight: 700; color: var(--ink); scroll-snap-align: start; }
.chip-ck { width: 0; height: 18px; opacity: 0; transition: width .2s var(--bounce), opacity .2s; }
.chip.on { background: var(--blue); color: #fff; box-shadow: inset 0 0 0 2px var(--rim); }
.chip.on .chip-ck { width: 18px; opacity: 1; }

/* ---------- 一覧 ---------- */
.band { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 24px 16px 12px; font-size: 17px; font-weight: 900; }
.band > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.band .i { width: 22px; height: 22px; color: var(--blue); }
.b-all-band .i { color: var(--ok); }
.band-n { font-family: var(--num); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.card { display: flex; flex-direction: column; background: var(--white); border-radius: 22px; padding: 6px; box-shadow: inset 0 0 0 2px var(--rim), var(--shadow); }
.card-ph { position: relative; display: block; }
.card-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.badge { position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; line-height: 1.5; }
.b-all { background: var(--ok); color: #fff; }
.b-one { background: var(--white); color: var(--blue-d); box-shadow: inset 0 0 0 1.5px var(--rim); }
.b-more { background: var(--white); color: var(--ink-2); }
.card-b { display: flex; flex-direction: column; gap: 3px; padding: 8px 6px 6px; }
.card-n { font-size: 15px; font-weight: 700; line-height: 1.45; }
.card-m { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); }
.card-m .i { width: 15px; height: 15px; }
.card-m .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-2); margin: 0 3px; }
.card-miss { display: flex; align-items: flex-start; gap: 4px; font-size: 13px; color: var(--wood-d); font-weight: 700; line-height: 1.5; }
.card-miss .i { width: 15px; height: 15px; margin-top: 2px; }
.rows { margin: 0 16px; background: var(--white); border-radius: 22px; box-shadow: inset 0 0 0 2px var(--rim); overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.row-r { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; min-height: 72px; }
.row-r img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; }
.row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.row-t b { font-size: 15px; }
.row-t span { font-size: 13px; color: var(--ink-2); }
.row-min { font-family: var(--num); font-size: 14px; font-weight: 600; color: var(--blue-d); }

/* ---------- 詳細 ---------- */
.detail { padding-bottom: calc(120px + var(--sb)); }
.hero { position: relative; background: var(--wood-l); }
.hero-img { width: 100%; aspect-ratio: 1 / .82; object-fit: cover; view-transition-name: hero-img; }
.hero-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(var(--st) + 10px) 12px 10px; pointer-events: none; transition: background-color .25s, box-shadow .25s; }
.hero-bar > * { pointer-events: auto; }
.hb-t { font-size: 17px; font-weight: 700; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-bar.solid { background: var(--enamel); box-shadow: 0 1px 0 var(--line); }
.hero-bar.solid .hb-t { opacity: 1; transform: none; }
.hero-bar.solid .round-btn { box-shadow: inset 0 0 0 2px var(--line-2); }
.s-recipe { position: absolute; }
.dsheet { position: relative; margin-top: -30px; background: var(--enamel); border-radius: 28px 28px 0 0; padding: 22px 18px 0; }
.tags { display: flex; gap: 6px; }
.tags span { font-size: 12px; font-weight: 700; color: var(--blue-d); background: var(--blue-50); padding: 2px 10px; border-radius: 999px; }
.d-title { font-size: 28px; font-weight: 900; line-height: 1.35; margin: 8px 0 6px; }
.d-lead { font-size: 15px; color: var(--ink-2); line-height: 1.85; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.facts li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px 9px; background: var(--white); border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line-2); text-align: center; }
.facts .i { color: var(--blue); width: 20px; height: 20px; margin-bottom: 2px; }
.f-v { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; line-height: 1.3; }
.f-v b { font-size: 21px; font-weight: 600; margin-right: 1px; }
.f-v .f-w { font-family: var(--jp); font-size: 16px; font-weight: 700; line-height: 1.6; }
.f-l { font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.serv { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 14px 14px 14px 16px; background: var(--white); border-radius: var(--r-m); box-shadow: inset 0 0 0 2px var(--rim); }
.serv-l { font-size: 16px; font-weight: 700; }
.serv-s { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.stepper { display: flex; align-items: center; gap: 6px; flex: none; }
.st-b { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-d); }
.st-b:disabled { color: #8b96a6; background: #f0f2f5; cursor: default; }
.st-v { min-width: 64px; text-align: center; font-size: 13px; font-weight: 700; }
.st-v b { font-size: 28px; font-weight: 600; color: var(--blue-d); margin-right: 1px; }
.board { position: relative; margin-top: 16px; padding: 12px; border-radius: 24px; background: var(--wood); box-shadow: 0 10px 20px -12px rgba(80, 45, 10, .6); }
.board::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: repeating-linear-gradient(176deg, rgba(120, 70, 25, .14) 0 2px, transparent 2px 13px), repeating-linear-gradient(181deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 7px); }
.paper { position: relative; background: var(--white); border-radius: 16px; padding: 16px 16px 10px; }
.ph { display: flex; align-items: baseline; justify-content: space-between; font-size: 18px; font-weight: 900; }
.ph-s { font-size: 15px; color: var(--blue-d); font-weight: 700; }
.ph-hint { font-size: 13px; color: var(--ink-2); margin: 2px 0 6px; }
.ph3 { font-size: 13px; font-weight: 700; color: var(--wood-d); margin: 12px 0 2px; letter-spacing: .08em; }
.ing { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 4px 0; text-align: left; border-bottom: 1px solid var(--line); }
.ings li:last-child .ing { border-bottom: 0; }
.ing-ck { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px #aab5c4; color: transparent; flex: none; transition: background .2s, box-shadow .2s, color .2s; }
.ing-ck .i { width: 16px; height: 16px; }
.ing.have .ing-ck { background: var(--ok); box-shadow: none; color: #fff; }
.ing-n { flex: 1; min-width: 0; font-size: 16px; }
.ing-a { font-size: 16px; font-weight: 600; color: var(--blue-d); }
.ing-a.pop { animation: pop .45s var(--bounce); }
@keyframes pop { 30% { transform: scale(1.18); color: var(--blue); } }
.lack { margin-top: 14px; }
.lack-box { background: var(--wood-l); border-radius: var(--r-m); padding: 14px; }
.lack-t { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; font-size: 15px; }
.lack-l { color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.lack-ok { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ok); background: #e8f4ee; padding: 12px 14px; border-radius: var(--r-m); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; font-size: 20px; font-weight: 900; margin: 26px 0 10px; }
.sec-n { font-size: 14px; color: var(--ink-2); font-weight: 700; }
.steps { display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; gap: 12px; padding: 10px 0; }
.step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 600; flex: none; box-shadow: 0 0 0 3px var(--blue-50); }
.step-b { flex: 1; min-width: 0; }
.step-t { font-size: 16px; line-height: 1.85; }
.amt { color: var(--blue-d); font-weight: 700; }
.step-tm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tm-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--blue-d); background: var(--blue-50); padding: 3px 10px 3px 7px; border-radius: 999px; }
.tm-pill .i { width: 16px; height: 16px; }
.d-note { font-size: 14px; color: var(--ink-2); margin: 16px 0 0; line-height: 1.7; }
.cta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 12px 16px calc(14px + var(--sb)); background: linear-gradient(rgba(251, 251, 247, 0), var(--enamel) 34%); }

/* ---------- ボタン ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 999px; font-size: 16px; font-weight: 700; line-height: 1.3; text-align: center; }
.btn .i { width: 20px; height: 20px; }
.btn-wide { width: 100%; }
.btn-cook { width: 100%; min-height: 60px; font-size: 18px; background: var(--blue); color: #fff; box-shadow: inset 0 0 0 2px var(--rim), 0 5px 0 var(--rim); }
.btn-cook.is-down { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--rim), 0 2px 0 var(--rim); }
.btn-line { background: var(--white); color: var(--blue-d); box-shadow: inset 0 0 0 2px var(--rim); }
.btn-wood { width: 100%; background: var(--wood-d); color: #fff; box-shadow: 0 4px 0 #5c3a1a; }
.btn-wood:disabled { background: var(--white); color: var(--ok); box-shadow: inset 0 0 0 2px var(--ok); }
.btn-fire { width: 100%; background: var(--fire); color: #fff; margin-top: 10px; }
.btn-ghost { width: 100%; color: var(--blue-d); margin-top: 4px; }
.btn-white { background: #fff; color: var(--blue-d); }

/* ---------- 調理モード ---------- */
.s-cook { background: var(--blue); }
.cook { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--blue); color: #fff; }
.ck-top { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(var(--st) + 10px) 12px 8px; }
.ck-x, .ck-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; flex: none; }
.ck-ic[aria-pressed="true"] { background: #fff; color: var(--blue-d); }
.ck-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ck-title b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-title span { font-size: 13px; color: #dbe6f5; font-family: var(--num); }
.wl { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; flex: none; }
.wl .i { width: 18px; height: 18px; }
.wl-on { background: #fff; color: var(--blue-d); }
.wl-on .i { color: #c47d0e; }
.wl-off { background: rgba(255, 255, 255, .14); color: #fff; }
.ck-tray { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 4px 12px 10px; scrollbar-width: none; }
.ck-tray::-webkit-scrollbar { display: none; }
.tray-empty { font-size: 14px; color: #dbe6f5; padding: 6px 4px; line-height: 1.6; }
.tpill { flex: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff; color: var(--ink); text-align: left; }
.tp-t { display: flex; flex-direction: column; line-height: 1.2; }
.tp-t b { font-size: 19px; font-weight: 600; color: var(--blue-d); }
.tp-t span { font-size: 12px; font-weight: 700; white-space: nowrap; }
.tpill.paused .tp-t b { color: var(--ink-2); }
.tpill.done { background: var(--fire); color: #fff; animation: beat 1s ease-in-out infinite; }
.tpill.done .tp-t b { color: #fff; }
@keyframes beat { 50% { transform: scale(1.05); } }
.tring { position: relative; width: 40px; height: 40px; border-radius: 50%; flex: none; background: conic-gradient(var(--blue) calc(var(--p, 0) * 1%), #dbe5f2 0); }
.tring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.done .tring { background: conic-gradient(#fff 100%, #fff 0); }
.done .tring::after { background: var(--fire); }
.tring.big { width: 64px; height: 64px; }
.tring.big::after { inset: 7px; }
.ck-prog { flex: none; display: flex; gap: 4px; padding: 0 16px 6px; }
.ck-prog i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .22); transition: background .3s; }
.ck-prog i.on { background: #fff; }
.ck-prog i.cur { background: #f5d9a8; }
.ck-prog i.fin { flex: .5; }
.ck-stage { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px 16px; cursor: pointer; outline: none; touch-action: pan-y; }
.ck-card { min-height: 100%; }
.ck-card.in-r { animation: ckR .34s var(--glide); }
.ck-card.in-l { animation: ckL .34s var(--glide); }
@keyframes ckR { from { transform: translateX(40px); opacity: 0; } }
@keyframes ckL { from { transform: translateX(-40px); opacity: 0; } }
.ck-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 22px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); margin: 6px 0 16px; }
.ck-photo.sq { aspect-ratio: 4 / 3; }
.ck-no { font-size: 14px; font-weight: 600; letter-spacing: .18em; color: #e4ecf7; font-family: var(--num); }
.ck-text { font-size: 26px; font-weight: 700; line-height: 1.65; margin-top: 4px; letter-spacing: .01em; }
.xl .ck-text { font-size: 32px; }
.ck-amt { display: inline-block; background: #fff; color: var(--blue-d); border-radius: 10px; padding: 0 8px; margin: 0 3px; line-height: 1.45; }
.ck-used { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ck-used li { display: flex; align-items: baseline; gap: 10px; padding: 8px 14px; border-radius: 14px; background: var(--blue-d); font-size: 15px; }
.ck-used b { font-weight: 600; }
.ck-tbtns { display: grid; gap: 10px; margin-top: 18px; }
.ck-tbtn { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 0 18px; border-radius: 20px; background: #fff; color: var(--blue-d); font-size: 18px; font-weight: 700; text-align: left; box-shadow: 0 5px 0 var(--rim); }
.ck-tbtn .i { width: 28px; height: 28px; }
.ck-tbtn > span:nth-of-type(1) { font-family: var(--num); font-size: 22px; font-weight: 600; }
.ck-tbtn > span:nth-of-type(2) { font-size: 15px; color: var(--ink-2); }
.ck-tbtn.run > span:nth-of-type(1) { font-size: 26px; }
.ck-tbtn.paused > span:nth-of-type(1) { color: var(--ink-2); }
.ck-tbtn.ring { background: var(--fire); color: #fff; box-shadow: 0 5px 0 #7d2412; animation: beat 1s ease-in-out infinite; }
.ck-tbtn.ring > span:nth-of-type(2) { color: #fff; }
.ck-done .ck-text { font-size: 28px; }
.ck-count { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 16px; color: #fff; }
.ck-count .i { color: #f5d9a8; }
.ck-dbtn { margin-top: 18px; }
.ck-nav { flex: none; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 10px 14px calc(14px + var(--sb)); }
.ck-prev, .ck-next { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 74px; border-radius: 24px; font-size: 18px; font-weight: 700; }
.ck-prev { background: rgba(255, 255, 255, .14); color: #fff; }
.ck-prev:disabled { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); color: #dce7f5; cursor: default; }
.ck-next { background: #fff; color: var(--blue-d); font-size: 19px; box-shadow: 0 5px 0 var(--rim); }
.ck-next .i, .ck-prev .i { width: 26px; height: 26px; }
.ck-hint { position: absolute; inset: 0; z-index: 10; display: grid; grid-template-columns: 35% 65%; grid-template-rows: 1fr auto; background: rgba(9, 24, 48, .9); color: #fff; }
.ck-hint[hidden] { display: none; }
.ck-hint-l, .ck-hint-r { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px 12px; text-align: center; font-size: 15px; line-height: 1.6; }
.ck-hint-l { border-right: 2px dashed rgba(255, 255, 255, .45); }
.ck-hint b { display: inline-flex; align-items: center; gap: 4px; font-size: 24px; }
.ck-hint .btn { grid-column: 1 / -1; margin: 0 20px calc(24px + var(--sb)); }

/* ---------- タイマー終了・お知らせ・常駐表示 ---------- */
html.ringing .app::after { content: ""; position: absolute; inset: 0; z-index: 60; pointer-events: none; box-shadow: inset 0 0 0 6px var(--fire); animation: edge 1s ease-in-out infinite; }
@keyframes edge { 50% { box-shadow: inset 0 0 0 14px rgba(187, 58, 31, .55); } }
.alarm { position: absolute; left: 10px; right: 10px; top: calc(var(--st) + 8px); z-index: 70; }
.alarm[hidden] { display: none; }
.al-in { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 22px; background: var(--fire); color: #fff; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5); animation: drop .4s var(--bounce); }
@keyframes drop { from { transform: translateY(-30px); opacity: 0; } }
.al-bell { width: 30px; height: 30px; animation: ringb .6s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes ringb { 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
.al-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.al-t b { font-size: 17px; }
.al-t span { font-size: 14px; }
.al-plus, .al-stop { min-height: 48px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 15px; flex: none; }
.al-plus { background: #8f2a15; color: #fff; font-family: var(--num); }
.al-stop { background: #fff; color: var(--fire); }
.notice { position: absolute; left: 14px; right: 14px; bottom: calc(var(--tabs-h) + var(--sb) + 14px); z-index: 65; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 8px 6px 16px; border-radius: 18px; background: var(--ink); color: #fff; box-shadow: 0 14px 28px -12px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none; transition: opacity .2s, transform .35s var(--bounce); }
body[data-route="cook"] .notice { bottom: calc(110px + var(--sb)); }
body[data-route="recipe"] .notice { bottom: calc(96px + var(--sb)); }
.notice.on { opacity: 1; transform: none; pointer-events: auto; }
.nt-msg { flex: 1; font-size: 15px; line-height: 1.5; }
.nt-act { min-height: 44px; padding: 0 12px; border-radius: 12px; color: #a9c9f5; font-weight: 700; font-size: 15px; white-space: nowrap; }
.tdock { position: absolute; right: 14px; bottom: calc(var(--tabs-h) + var(--sb) + 14px); z-index: 30; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 16px 6px 12px; border-radius: 999px; background: var(--blue); color: #fff; box-shadow: inset 0 0 0 2px var(--rim), 0 10px 22px -8px rgba(16, 41, 77, .7); animation: drop .4s var(--bounce); }
.tdock[hidden] { display: none; }
.tdock .i { width: 24px; height: 24px; }
.td-t { display: flex; flex-direction: column; line-height: 1.2; }
.td-t b { font-size: 18px; font-weight: 600; }
.td-t span { font-size: 12px; font-weight: 700; white-space: nowrap; max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.td-n { font-size: 12px; font-weight: 700; background: var(--blue-d); padding: 2px 8px; border-radius: 999px; }
body[data-route="recipe"] .tdock { bottom: calc(96px + var(--sb)); }

/* ---------- タブ（木の棚） ---------- */
.tabs { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabs-h) + var(--sb)); padding: 8px 14px var(--sb); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #6e4524; box-shadow: inset 0 3px 0 #a87a4c, 0 -6px 16px -10px rgba(0, 0, 0, .5); }
.tabs::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(178deg, rgba(0, 0, 0, .1) 0 2px, transparent 2px 9px); }
.tabs[hidden] { display: none; }
.tabs a { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 50px; border-radius: 16px; color: #fbefdc; font-size: 14px; font-weight: 700; }
.tabs a .i { width: 22px; height: 22px; }
.tabs a.on { background: var(--white); color: var(--blue-d); box-shadow: inset 0 0 0 2px var(--rim), 0 3px 0 rgba(0, 0, 0, .25); }
.badge-n { position: absolute; top: 4px; right: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--fire); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; line-height: 1; }
.badge-n[hidden] { display: none; }

/* ---------- シート ---------- */
.dlg { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 430px; max-height: 88dvh; border: 0; padding: 10px 20px calc(22px + var(--sb)); border-radius: 28px 28px 0 0; background: var(--enamel); color: var(--ink); box-shadow: 0 -10px 30px -10px rgba(16, 41, 77, .5); overflow-y: auto; }
.dlg[open] { animation: sheetUp .38s var(--bounce); }
.dlg.leave { animation: sheetDown .22s ease-in forwards; }
.dlg::backdrop { background: rgba(16, 41, 77, .45); }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
.dlg-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 6px; }
.dlg-x { position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.ts { text-align: center; padding-top: 6px; }
.ts-k { font-size: 14px; color: var(--ink-2); }
.ts-h { font-size: 22px; font-weight: 900; line-height: 1.4; margin: 2px 0; }
.ts-big { font-size: 60px; font-weight: 600; color: var(--blue-d); line-height: 1.2; margin: 6px 0 14px; }
.ts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ts-row .btn { padding: 0 10px; }
.sh-p { font-size: 15px; line-height: 1.8; color: var(--ink-2); margin: 10px 0 6px; }

/* ---------- 買い物リスト ---------- */
.top-shop { padding-bottom: 14px; }
.add { display: flex; gap: 8px; margin-top: 12px; }
.add-in { flex: 1; min-width: 0; height: 50px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 2px var(--rim); font-size: 16px; outline: none; }
.add-in::placeholder { color: #66717f; }
.add-in:focus { box-shadow: inset 0 0 0 3px var(--blue); }
.add-b { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; flex: none; box-shadow: inset 0 0 0 2px var(--rim); }
.sec { margin: 14px 16px 0; }
.sec-t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--blue-d); margin: 0 4px 8px; }
.sec-t .i { width: 20px; height: 20px; }
.sec-c { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.its { background: var(--white); border-radius: 22px; border: 2px solid var(--rim); overflow: hidden; }
.it { position: relative; overflow: hidden; }
.it + .it { border-top: 1px solid var(--line); }
.it-del { position: absolute; inset: 0; visibility: hidden; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-right: 22px; background: var(--fire); color: #fff; font-size: 15px; font-weight: 700; }
.it.drag .it-del, .it.arm .it-del, .it.gone .it-del { visibility: visible; }
.it.arm .it-del { background: #8f2a15; }
.it-in { position: relative; display: flex; align-items: center; gap: 6px; min-height: 62px; padding: 6px 16px 6px 6px; background: var(--white); transition: transform .25s var(--glide), background .3s; touch-action: pan-y; }
.it.drag .it-in { transition: none; }
.it.flash .it-in { background: var(--blue-50); }
.it-ck { width: 44px; height: 44px; display: grid; place-items: center; position: relative; color: transparent; flex: none; }
.it-ck::before { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px #aab5c4; background: var(--white); transition: background .2s, box-shadow .2s; }
.it-ck .i { position: relative; width: 16px; height: 16px; }
.got .it-ck { color: #fff; }
.got .it-ck::before { background: var(--ok); box-shadow: none; }
.it-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.4; }
.it-t b { font-size: 16px; font-weight: 700; }
.got .it-t b { text-decoration: line-through; text-decoration-color: rgba(72, 84, 103, .6); color: var(--ink-2); font-weight: 500; }
.it-from { display: flex; flex-wrap: wrap; gap: 4px; }
.it-from i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--blue-d); background: var(--blue-50); padding: 0 8px; border-radius: 999px; }
.it-q { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.sec-got .its { border-color: var(--line-2); }
.sec-got .btn { margin-top: 12px; }
.swipe-tip { text-align: center; font-size: 14px; color: var(--ink-2); margin: 16px 0 0; }

/* ---------- タイマー画面 ---------- */
.tl-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 16px 0; }
.tcard { width: 100%; display: flex; align-items: center; gap: 16px; padding: 14px 16px; text-align: left; background: var(--white); border-radius: 24px; box-shadow: inset 0 0 0 2px var(--rim), var(--shadow); }
.tcard.done { box-shadow: inset 0 0 0 3px var(--fire); animation: beat 1s ease-in-out infinite; }
.tcard.done .tring { background: conic-gradient(var(--fire) 100%, var(--fire) 0); }
.tcard.done .tring::after { background: #fff; }
.tc-b { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.tc-time { font-size: 36px; font-weight: 600; color: var(--blue-d); }
.tcard.done .tc-time { color: var(--fire); }
.tcard.paused .tc-time { color: var(--ink-2); }
.tc-l { font-size: 16px; font-weight: 700; }
.tc-r { font-size: 14px; color: var(--ink-2); }
.free { margin: 22px 16px 0; }
.free-h { font-size: 17px; font-weight: 900; margin-bottom: 10px; }
.free-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.free-b { display: flex; align-items: baseline; justify-content: center; gap: 2px; min-height: 76px; padding-top: 18px; border-radius: 22px; background: var(--white); box-shadow: inset 0 0 0 2px var(--rim), 0 4px 0 var(--rim); color: var(--blue-d); }
.free-b b { font-size: 30px; font-weight: 600; }
.free-b span { font-size: 14px; font-weight: 700; }
.free-b.is-down { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--rim), 0 1px 0 var(--rim); }

/* ---------- 設定・アプリについて ---------- */
.sets { margin: 16px 16px 0; }
.sets-h { font-size: 13px; font-weight: 700; color: var(--blue-d); margin: 0 6px 8px; letter-spacing: .06em; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 64px; padding: 10px 16px; background: var(--white); text-align: left; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.sets > .set:first-of-type { border-radius: 20px 20px 0 0; }
.sets > .set:last-child { border-radius: 0 0 20px 20px; }
.sets > .set:only-of-type, .sets > h2 + .set:last-child { border-radius: 20px; }
.set + .set { margin-top: -1.5px; }
.set-t { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.set-t b { font-size: 16px; }
.set-t span { font-size: 14px; color: var(--ink-2); }
.set-btn { justify-content: flex-start; color: var(--fire); font-weight: 700; }
.set-link .i { color: var(--ink-2); }
.tg { appearance: none; -webkit-appearance: none; width: 54px; height: 32px; border-radius: 16px; background: #c3ccd8; position: relative; flex: none; cursor: pointer; transition: background .2s; }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .3s var(--bounce); }
.tg:checked { background: var(--blue); }
.tg:checked::after { transform: translateX(22px); }
.ab-hero { text-align: center; padding: 10px 0 18px; }
.ab-hero img { width: 104px; height: 104px; border-radius: 26px; margin: 0 auto 10px; box-shadow: 0 0 0 2px var(--rim), var(--shadow); }
.ab-n { font-size: 22px; font-weight: 900; }
.ab-v { font-size: 14px; color: var(--ink-2); }
.ab { padding: 0 18px; }
.ab p { font-size: 15px; line-height: 1.85; margin-bottom: 12px; }
.ab .ab-strong { font-weight: 700; }
.ab-h { font-size: 17px; font-weight: 900; margin: 18px 0 6px; }
.ab-tech { margin-bottom: 20px; }
.ab-tech li { position: relative; padding: 8px 0 8px 18px; font-size: 15px; line-height: 1.6; border-bottom: 1px solid var(--line); }
.ab-tech li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

/* ---------- 空の状態 ---------- */
.empty { text-align: center; padding: 24px 24px 8px; }
.empty img { width: 100%; max-width: 300px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 24px; margin: 0 auto 16px; box-shadow: 0 0 0 2px var(--rim); }
.empty-h { font-size: 18px; font-weight: 700; line-height: 1.5; }
.empty-p { font-size: 15px; color: var(--ink-2); margin: 6px 0 16px; line-height: 1.75; }

/* ---------- スプラッシュ・はじめて ---------- */
.splash { position: absolute; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--blue); color: #fff; transition: opacity .35s; }
.splash[hidden], .onboard[hidden] { display: none; }
.splash img { width: 120px; height: 120px; border-radius: 30px; box-shadow: 0 0 0 3px #fff, 0 18px 36px -12px rgba(0, 0, 0, .6); animation: drop .5s var(--bounce); }
.splash p { font-size: 26px; font-weight: 900; letter-spacing: .16em; }
.splash.out, .onboard.out { opacity: 0; }
.onboard { position: absolute; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--enamel); transition: opacity .3s; }
.ob-pages { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ob-pages::-webkit-scrollbar { display: none; }
.ob-pg { flex: 0 0 100%; scroll-snap-align: start; display: flex; flex-direction: column; }
.ob-ph { flex: 1; min-height: 0; overflow: hidden; border-radius: 0 0 36px 36px; box-shadow: 0 3px 0 var(--rim); }
.ob-ph img { width: 100%; height: 100%; object-fit: cover; }
.ob-t { font-size: 24px; font-weight: 900; line-height: 1.45; padding: 26px 24px 6px; }
.ob-d { font-size: 16px; line-height: 1.8; color: var(--ink-2); padding: 0 24px 10px; min-height: 5.6em; }
.ob-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 16px calc(16px + var(--sb)); }
.ob-skip { min-height: 48px; padding: 0 12px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); transition: background .3s, transform .3s var(--bounce); }
.ob-dots i.on { background: var(--blue); transform: scale(1.3); }
.ob-go { width: auto; min-width: 132px; min-height: 54px; font-size: 16px; }

/* ---------- 広い画面 ---------- */
@media (min-width: 600px) {
  body { background-color: #b98552; background-image: repeating-linear-gradient(92deg, rgba(110, 60, 20, .12) 0 3px, transparent 3px 22px), repeating-linear-gradient(88deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 9px); }
  .app { max-width: 430px; margin: 0 auto; box-shadow: 0 0 0 2px var(--rim), 0 30px 60px -20px rgba(40, 20, 5, .6); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
