/* かいものメモ — スーパーのチラシ風 Material 3 Expressive（赤×黄×白） */
:root {
  --red: #d7261e;
  --red-d: #a3150f;
  --red-t: #ffe7e2;
  --sun: #ffd400;
  --sun-d: #e0b600;
  --cream: #fff8e6;
  --paper: #ffffff;
  --bg: #fff3ea;
  --ink: #231815;
  --ink2: #5b4a44;
  --line: #ecdcd2;
  --green: #1f7a3a;
  --fd: 'Dela Gothic One', 'M PLUS Rounded 1c', sans-serif;
  --fr: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif;
  --fn: 'Rubik', 'M PLUS Rounded 1c', sans-serif;
  --bounce: linear(0, 0.083, 0.279, 0.516, 0.744, 0.93, 1.061, 1.135, 1.162, 1.154, 1.125, 1.087, 1.049, 1.017, 0.994, 0.98, 0.974, 0.974, 0.978, 0.984, 0.991, 0.996, 1, 1.003, 1.004, 1.004, 1.004, 1.003, 1);
  --spring: linear(0, 0.054, 0.184, 0.351, 0.523, 0.682, 0.817, 0.922, 0.998, 1.046, 1.073, 1.083, 1.081, 1.072, 1.058, 1.044, 1.03, 1.018, 1.009, 1.002, 0.997, 0.994, 0.993, 0.993, 0.994, 0.995, 0.996, 0.997, 1);
  --emph: cubic-bezier(.05, .7, .1, 1);
  --nav-h: calc(80px + env(safe-area-inset-bottom));
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--fr); font-weight: 500; color: var(--ink); background: var(--bg); line-break: strict; overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
.k { width: 24px; height: 24px; flex: none; }
:focus-visible { outline: 3px solid var(--sun-d); outline-offset: 2px; }
h1, h2, .btn, .chip, .sg, .tip, .fl-s, .fl-d, .grp-h, .it-n, .tag-n, .st-t, .st-pass, .ro-h, .pr-k, .pr-s, .sn-t, .in-t, .onb-h, .empty-t, .ad-t, .sy-st, .hchip, .ms-b b, .set-t span, .fd-t {
  word-break: keep-all; overflow-wrap: normal; font-feature-settings: "palt";
}
.empty-b, .cf-b, .sy-b, .ab-p, .tech dd, .onb-b { word-break: normal; }

/* ---------- 骨組み ---------- */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.view-host { position: relative; flex: 1; min-height: 0; }
.pg { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: 28px; }
@media (min-width: 600px) {
  body { background: radial-gradient(circle, rgba(255,255,255,.18) 2px, transparent 2.5px) 0 0 / 22px 22px, var(--red); }
  .app, .splash, .onb { left: 0; right: 0; margin: 0 auto; max-width: 430px; }
  .app { box-shadow: 0 30px 80px rgba(80, 10, 0, .45); }
}

/* ---------- 共通部品 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 800; font-size: 1rem; transition: transform .4s var(--spring), border-radius .4s var(--spring), background-color .2s; text-align: center; }
.btn:active { transform: scale(.95); border-radius: 16px; }
.btn .k { width: 22px; height: 22px; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 3px 0 var(--red-d); }
.btn-tonal { background: var(--red-t); color: var(--red-d); }
.btn-text { color: var(--red-d); }
.btn-text.danger { color: var(--red-d); }
.btn.wide { display: flex; width: 100%; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: .9rem; }
.btn[disabled] { background: #efe6e0; color: #6b5c56; box-shadow: none; cursor: default; }
.ib { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: background-color .2s, transform .3s var(--spring); }
.ib:active { transform: scale(.88); background: rgba(0,0,0,.06); }
.ib.on-red { color: #fff; }
.ib.on-red:active { background: rgba(255,255,255,.18); }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1.5px #d9c5ba; font-weight: 700; font-size: .95rem; white-space: nowrap; transition: background-color .2s, transform .3s var(--spring); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip:active { transform: scale(.94); }
.qty { flex: none; font-family: var(--fn); font-weight: 800; font-size: 1rem; padding: 2px 9px; border-radius: 8px; background: var(--sun); color: var(--ink); }
.av { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ac); color: #fff; font-weight: 800; font-size: .95rem; flex: none; box-shadow: 0 0 0 2px #fff; }
.av.xs { width: 20px; height: 20px; font-size: .7rem; box-shadow: none; }
.av.sm { width: 32px; height: 32px; }
.av.md { width: 40px; height: 40px; font-size: 1.05rem; }
.av.lg { width: 56px; height: 56px; font-size: 1.4rem; box-shadow: 0 0 0 3px #fff; }
.stamp { position: absolute; right: 64px; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; display: grid; place-items: center; font-family: var(--fd); font-size: 1.1rem; color: var(--red); box-shadow: inset 0 0 0 2.5px var(--red); transform: rotate(-14deg); background: rgba(255,255,255,.6); }
.stamp.sm { position: static; margin: 0 0 0 auto; width: 36px; height: 36px; }

/* ---------- チラシ帯ヘッダー ---------- */
.flyer { flex: none; color: #fff; padding-top: env(safe-area-inset-top); background: radial-gradient(circle, rgba(255,255,255,.13) 1.6px, transparent 2px) 0 0 / 14px 14px, linear-gradient(160deg, #e2321f, var(--red) 55%, #c21c14); position: relative; }
.fl-top { display: flex; align-items: center; gap: 2px; min-height: 60px; padding: 6px 8px 0 18px; }
.logo { flex: 1; font-family: var(--fd); font-weight: 400; font-size: 1.55rem; letter-spacing: .02em; }
.logo span { color: var(--sun); }
.me-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; }
.me-btn .av { width: 36px; height: 36px; box-shadow: 0 0 0 2.5px #fff; }
.fl-band { display: flex; align-items: center; gap: 14px; padding: 2px 18px 16px; min-height: 96px; }
.burst { position: relative; width: 88px; height: 88px; flex: none; display: grid; place-items: center; color: var(--ink); animation: wobble 6s ease-in-out infinite; }
.burst svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--sun); filter: drop-shadow(0 3px 0 rgba(120, 10, 0, .35)); }
.burst-n { position: relative; font-family: var(--fn); font-weight: 800; font-size: 2.3rem; line-height: 1; margin-top: -8px; }
.burst-u { position: absolute; bottom: 18px; font-weight: 800; font-size: .875rem; }
@keyframes wobble { 50% { transform: rotate(8deg) scale(1.03); } }
.fl-txt { min-width: 0; }
.fl-k { font-family: var(--fd); font-size: 1.45rem; letter-spacing: .04em; line-height: 1.3; }
.fl-s { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: .9rem; font-weight: 700; }
.fl-s .k { width: 18px; height: 18px; }
.fl-d { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 800; font-size: .875rem; }
.fl-d .k { width: 18px; height: 18px; }

/* ---------- リスト ---------- */
.pg-list .scroll { padding-bottom: 150px; }
.groups { padding: 12px 0 0; }
.grp { margin-bottom: 12px; }
.grp-h { position: sticky; top: 0; z-index: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-left: 0; padding: 0 16px 0 12px; border-radius: 0 999px 999px 0; background: var(--c); color: #fff; font-family: var(--fd); font-weight: 400; font-size: 1rem; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.grp-no { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--c); font-family: var(--fn); font-weight: 800; font-size: .875rem; }
.grp-n { font-family: var(--fr); font-weight: 800; font-size: .875rem; }
.its { margin: 8px 12px 0; background: var(--paper); border-radius: 20px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 10px 20px -16px rgba(120, 40, 10, .45); }
.it { position: relative; display: grid; grid-template-columns: 58px 1fr auto; align-items: center; min-height: 64px; padding-right: 14px; background: var(--paper); overflow: hidden; --sx: 0px; transition: background-color .5s; }
.it + .it { border-top: 1.5px dashed var(--line); }
.it > :not(.it-del) { transform: translateX(var(--sx)); transition: transform .35s var(--spring); }
.it.swiping > :not(.it-del) { transition: none; }
.it-del { position: absolute; top: 0; right: 0; bottom: 0; width: 100px; display: grid; place-items: center; background: #b8261d; color: #fff; transform: translateX(calc(100% + var(--sx))); transition: transform .35s var(--spring), background-color .2s; }
.it.swiping .it-del { transition: background-color .2s; }
.it.arm .it-del { background: var(--red-d); }
.it.gone { animation: gone .22s ease-in forwards; }
@keyframes gone { to { opacity: 0; transform: translateX(-40%); } }
.ck { width: 58px; height: 64px; display: grid; place-items: center; }
.ck .k { width: 30px; height: 30px; padding: 4px; border-radius: 50%; color: transparent; box-shadow: inset 0 0 0 2.5px #b9a69c; transition: background-color .2s, color .2s, transform .4s var(--bounce); }
.ck:active .k { transform: scale(.82); }
.it.is-done .ck .k, .it.stamping .ck .k { background: var(--green); color: #fff; box-shadow: none; }
.it-main { min-width: 0; text-align: left; padding: 10px 8px 10px 0; touch-action: pan-y; }
.it-n { display: block; font-weight: 800; font-size: 1.1rem; line-height: 1.35; }
.it-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px; font-size: .875rem; color: var(--ink2); font-weight: 700; }
.it-note { padding: 0 8px; border-radius: 6px; background: var(--cream); color: #7a4a00; }
.it.stamping::after { content: "済"; position: absolute; right: 70px; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; display: grid; place-items: center; font-family: var(--fd); color: var(--red); box-shadow: inset 0 0 0 2.5px var(--red); animation: stampIn .34s var(--bounce) both; }
@keyframes stampIn { from { transform: scale(2.4) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(-14deg); opacity: 1; } }
.it.stamping .it-n { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.it.fresh { animation: fresh 1.6s ease-out; }
@keyframes fresh { 0%, 30% { background: #fff1a6; } 100% { background: var(--paper); } }
.its.done { background: var(--cream); }
.its.done .it { background: var(--cream); }
.its.done .it-n { text-decoration: line-through; text-decoration-color: rgba(163, 21, 15, .7); color: #5f4f49; }
.donebox { margin: 18px 0 0; padding-top: 4px; }
.db-h { display: flex; align-items: center; gap: 8px; margin: 0 20px; font-family: var(--fd); font-weight: 400; font-size: 1.05rem; color: var(--ink2); }
.donebox .btn { margin: 12px 12px 0; width: calc(100% - 24px); }
.alldone { margin: 16px 12px 0; padding: 18px; border-radius: 22px; background: var(--sun); text-align: center; display: grid; gap: 12px; justify-items: center; }
.ad-t { display: flex; align-items: center; gap: 8px; font-family: var(--fd); font-size: 1.15rem; }
.tip { display: flex; align-items: center; gap: 6px; margin: 16px 20px 0; font-size: .875rem; color: var(--ink2); font-weight: 700; }
.tip .k { width: 18px; height: 18px; }
.empty { position: relative; }
.empty img { width: 100%; height: 300px; object-fit: cover; object-position: center 85%; }
.empty-in { padding: 0 24px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty-t { font-family: var(--fd); font-weight: 400; font-size: 1.5rem; line-height: 1.4; margin-top: -8px; }
.empty-b { font-size: .95rem; line-height: 1.8; color: var(--ink2); text-align: left; }
.empty.small { padding: 40px 24px; text-align: center; }

/* 追加バー */
.addbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 8px 0 10px; background: linear-gradient(180deg, rgba(255,243,234,0), var(--bg) 22%); }
.addbar.shake { animation: shake .35s; }
@keyframes shake { 25%, 75% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
.sugg { display: flex; gap: 6px; overflow-x: auto; padding: 4px 12px 8px; scrollbar-width: none; }
.sugg::-webkit-scrollbar { display: none; }
.sg { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px #e4cfc4, 0 2px 0 #ecdcd2; font-weight: 800; font-size: .95rem; transition: transform .3s var(--spring); }
.sg small { font-family: var(--fn); font-size: .875rem; color: var(--red-d); }
.sg.new { background: var(--sun); box-shadow: 0 2px 0 var(--sun-d); }
.sg .k { width: 18px; height: 18px; }
.sg:active { transform: scale(.92); }
.ab-row { display: flex; gap: 8px; padding: 0 12px; }
.ab-in { flex: 1; display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 8px 0 16px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--red), 0 6px 16px -8px rgba(150, 30, 10, .4); color: var(--red); }
.ab-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-weight: 700; font-size: 1rem; color: var(--ink); }
.ab-in input::placeholder { color: #7a6a63; }
.ab-go { height: 56px; padding: 0 22px; border-radius: 999px; background: var(--red); color: #fff; font-family: var(--fd); font-size: 1.05rem; box-shadow: 0 3px 0 var(--red-d); transition: transform .3s var(--spring); }
.ab-go:active { transform: scale(.93); }

/* ---------- ナビゲーションバー ---------- */
.nav { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--nav-h); padding: 10px 4px env(safe-area-inset-bottom); background: #fff8f2; box-shadow: 0 -1px 0 var(--line); z-index: 10; }
.app.pushed .nav { display: none; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 56px; font-size: .875rem; font-weight: 700; color: var(--ink2); }
.nav-pill { position: relative; width: 60px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background-color .3s, width .4s var(--spring); }
.nav a.on .nav-pill { background: var(--sun); color: var(--ink); width: 64px; }
.nav a.on { color: var(--ink); font-weight: 800; }
.nav-badge { position: absolute; top: -5px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-family: var(--fn); font-size: .75rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff8f2; }
.nav-badge[hidden] { display: none; }
.nav-dot { position: absolute; top: 1px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff8f2; }

/* ---------- 上部バー ---------- */
.bar { flex: none; display: flex; align-items: center; gap: 6px; min-height: 64px; padding: calc(6px + env(safe-area-inset-top)) 12px 4px 20px; background: var(--bg); }
.bar:has(.ib:first-child) { padding-left: 6px; }
.bar-t { flex: 1; font-family: var(--fd); font-weight: 400; font-size: 1.55rem; color: var(--red); letter-spacing: .02em; }
.bar-t.sm { font-size: 1.25rem; color: var(--ink); }
.bar.red { background: var(--red); color: #fff; }
.bar.red .bar-t { color: #fff; }
.store-b { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 58%; padding: 0 14px 0 10px; border-radius: 999px; background: rgba(60,0,0,.22); color: #fff; font-weight: 800; font-size: .875rem; }
.store-b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-b .k { width: 20px; height: 20px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 16px 0; border-radius: 999px; box-shadow: inset 0 0 0 1.5px #b9a69c; overflow: hidden; }
.seg a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; font-weight: 800; font-size: .95rem; }
.seg a + a { box-shadow: inset 1.5px 0 0 #b9a69c; }
.seg a.on { background: var(--sun); }
.seg .k { width: 20px; height: 20px; }

/* ---------- よく買う物 ---------- */
.fchips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 4px; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.oc { margin: 16px 12px 0; }
.oc-h { position: relative; height: 92px; border-radius: 22px 22px 8px 8px; overflow: hidden; background: var(--c); display: flex; align-items: flex-end; }
.oc-h img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oc-l { position: relative; margin: 0 0 10px 10px; padding: 4px 14px; border-radius: 10px; background: var(--c); color: #fff; font-family: var(--fd); font-weight: 400; font-size: 1.15rem; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.tags { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.tag { position: relative; min-height: 132px; padding: 14px 12px 12px 22px; border-radius: 10px 18px 18px 10px; background: var(--paper); box-shadow: 0 1px 0 var(--line), 0 8px 16px -12px rgba(120, 40, 10, .45); overflow: hidden; }
.tag::before { content: ""; position: absolute; left: 8px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px #d9c5ba; }
.tag::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.tag.usual { background: var(--cream); }
.tag-star { position: absolute; right: -6px; top: 8px; padding: 2px 14px 2px 10px; background: var(--red); color: #fff; font-weight: 800; font-size: .75rem; transform: rotate(8deg); }
.tag-n { font-weight: 800; font-size: 1.05rem; line-height: 1.35; padding-right: 30px; }
.tag-u { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.tag-f { display: flex; flex-direction: column; margin-top: 6px; font-size: .875rem; color: var(--ink2); font-weight: 700; padding-right: 48px; }
.tag-f span:first-child { color: var(--red-d); font-weight: 800; }
.tag-add { position: absolute; right: 8px; bottom: 8px; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; background: var(--red); color: #fff; box-shadow: 0 3px 0 var(--red-d); transition: transform .35s var(--bounce); }
.tag-add:active { transform: scale(.88); }
.tag.has .tag-add { background: var(--sun); color: var(--ink); box-shadow: 0 3px 0 var(--sun-d); }
.tag-in { display: flex; align-items: center; gap: 2px; margin-top: 2px; color: var(--green); font-weight: 800; }
.tag-in .k { width: 16px; height: 16px; }
.tag-in b { font-family: var(--fn); margin-left: 2px; }
.tag-u { display: flex; flex-direction: column; }
.tag-add .k { width: 20px; height: 20px; }

/* 履歴 */
.trips { padding: 12px 12px 0; display: grid; gap: 12px; }
.trip { padding: 16px; border-radius: 22px; background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.trip-d { font-family: var(--fd); font-size: 1.15rem; }
.trip-s { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.trip-i { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.hchip { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px 0 8px; border-radius: 10px; background: var(--red-t); color: var(--red-d); font-weight: 800; font-size: .9rem; transition: transform .3s var(--spring); }
.hchip .k { width: 18px; height: 18px; }
.hchip.has { background: #e7f3ea; color: var(--green); }
.hchip:active { transform: scale(.94); }

/* ---------- 売り場順 ---------- */
.prog { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; margin: 14px 12px 0; padding: 12px 14px; border-radius: 22px; background: var(--paper); position: relative; }
.ring { width: 64px; height: 64px; transform: rotate(-90deg); grid-row: 1; grid-column: 1; }
.rg-t { fill: none; stroke: #f3e4dc; stroke-width: 7; }
.rg-v { fill: none; stroke: var(--red); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray .6s var(--spring); }
.pr-c { grid-row: 1; grid-column: 1; text-align: center; font-family: var(--fn); }
.pr-c b { font-size: 1.3rem; font-weight: 800; }
.pr-c span { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.pr-k { font-family: var(--fd); font-size: 1.15rem; }
.pr-s { font-size: .875rem; color: var(--ink2); font-weight: 700; margin-top: 2px; }
.road { position: relative; margin: 18px 12px 0 0; padding-left: 58px; }
.road::before { content: ""; position: absolute; left: 27px; top: 16px; bottom: 20px; width: 6px; border-radius: 3px; background: repeating-linear-gradient(180deg, #e6cfc3 0 10px, transparent 10px 18px); }
.st { position: relative; margin-bottom: 14px; }
.st-pin { position: absolute; left: -48px; top: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-family: var(--fn); font-weight: 800; font-size: 1.1rem; box-shadow: 0 0 0 4px var(--bg), 0 3px 0 4px rgba(0,0,0,.08); z-index: 1; }
.st-b { background: var(--paper); border-radius: 22px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 10px 20px -16px rgba(120,40,10,.45); transition: opacity .4s; }
.st-h { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, #fff), #fff 70%); }
.st-h img, .st-ph { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; }
.st-ph { display: grid; place-items: center; background: var(--c); color: #fff; font-family: var(--fd); font-size: .875rem; }
.st-t { font-family: var(--fd); font-weight: 400; font-size: 1.15rem; }
.st-s { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.st-its li + li { border-top: 1.5px dashed var(--line); }
.st-ck { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 14px; text-align: left; transition: background-color .2s; }
.st-ck:active { background: #fff6ee; }
.box { width: 30px; height: 30px; border-radius: 9px; box-shadow: inset 0 0 0 2.5px var(--c); display: grid; place-items: center; color: transparent; flex: none; transition: background-color .2s, transform .4s var(--bounce); }
.box .k { width: 20px; height: 20px; }
.st-ck.on .box { background: var(--c); color: #fff; box-shadow: none; transform: rotate(-6deg); }
.st-n { flex: 1; font-weight: 800; font-size: 1.05rem; }
.st-ck.on .st-n { text-decoration: line-through; color: #6b5c56; }
.st-note { font-size: .875rem; color: #7a4a00; background: var(--cream); padding: 0 8px; border-radius: 6px; font-weight: 700; }
.st.clear .st-b { opacity: .78; }
.st.clear .st-pin { background: var(--green); }
.st.pass { min-height: 44px; display: flex; align-items: center; }
.st.pass .st-pin { width: 26px; height: 26px; left: -42px; top: 9px; font-size: .875rem; background: #7a6860; }
.st-pass { font-family: var(--fd); font-size: .95rem; color: var(--ink2); }
.st-pass span { font-family: var(--fr); font-weight: 700; font-size: .875rem; margin-left: 4px; }
.st.goal .st-pin { background: var(--red); }
.st.goal .st-pin .k { width: 22px; height: 22px; }
.st.goal .st-pass { color: var(--red); font-size: 1.2rem; }
.reorder { margin: 12px 12px 0; }
.ro-h { display: flex; align-items: center; gap: 8px; padding: 0 6px 12px; font-weight: 700; font-size: .95rem; color: var(--ink2); }
.ro { display: grid; gap: 8px; margin-bottom: 16px; }
.ro-i { display: grid; grid-template-columns: 44px 1fr 52px; align-items: center; min-height: 58px; border-radius: 16px; background: var(--paper); box-shadow: inset 6px 0 0 var(--c), 0 1px 0 var(--line); transition: transform .3s var(--spring); }
.ro.sorting .ro-i:not(.lift) { transition: transform .25s var(--spring); }
.ro-i.lift { z-index: 3; transition: none; box-shadow: inset 6px 0 0 var(--c), 0 16px 30px -10px rgba(80,20,0,.4); }
.ro-no { text-align: center; font-family: var(--fn); font-weight: 800; font-size: 1.1rem; color: var(--c); padding-left: 6px; }
.ro-l { font-weight: 800; font-size: 1.05rem; }
.ro-h2 { width: 52px; height: 58px; display: grid; place-items: center; color: var(--ink2); touch-action: none; cursor: grab; }

/* ---------- 家族 ---------- */
.me-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 6px 12px 0; padding: 16px; border-radius: 24px; background: var(--red-t); }
.mc-k { font-size: .875rem; font-weight: 700; color: var(--red-d); word-break: keep-all; }
.mc-n { font-family: var(--fd); font-size: 1.4rem; }
.mc-n span { font-family: var(--fr); font-size: .9rem; font-weight: 700; margin-left: 4px; }
.sync { margin: 12px 12px 0; padding: 16px; border-radius: 24px; background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.sy-st { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.sy-st i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #dff0e3; animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px #dff0e300; } }
.sy-k { margin-left: auto; font-family: var(--fn); font-size: .875rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #f3ece7; color: var(--ink2); }
.sy-b { margin-top: 8px; font-size: .95rem; line-height: 1.75; color: var(--ink2); }
.sy-btns { display: grid; gap: 8px; margin-top: 14px; }
.sync .btn-text { margin-top: 6px; }
.sync .btn.wait { opacity: .6; }
.sync .btn.wait .k { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sec-h { margin: 22px 20px 8px; font-family: var(--fd); font-weight: 400; font-size: 1.05rem; color: var(--ink); }
.sec-h.in { margin: 0 0 6px; }
.mem { margin: 0 12px; border-radius: 22px; background: var(--paper); overflow: hidden; }
.mem li { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 8px 16px; }
.mem li + li { border-top: 1px solid var(--line); }
.mem-t { flex: 1; display: flex; flex-direction: column; }
.mem-t b { font-size: 1.05rem; }
.mem-t span { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.mem-n { display: flex; flex-direction: column; align-items: flex-end; }
.mem-n b { font-family: var(--fn); font-size: 1.3rem; font-weight: 800; color: var(--red); }
.mem-n span { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.feed { margin: 0 12px; position: relative; }
.fd { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 8px 4px; }
.fd + .fd { border-top: 1px dashed var(--line); }
.fd-t { font-size: .95rem; line-height: 1.5; }
.fd-at { font-size: .875rem; color: var(--ink2); font-weight: 700; white-space: nowrap; }

/* ---------- 設定・アプリについて ---------- */
.set { margin: 12px 12px 0; border-radius: 22px; background: var(--paper); overflow: hidden; }
.set li + li { border-top: 1px solid var(--line); }
.set-r { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 10px 16px; text-align: left; }
.set-i { color: var(--red); }
.set-t { flex: 1; display: flex; flex-direction: column; }
.set-t b { font-size: 1.05rem; }
.set-t span { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.set-r.danger b { color: var(--red-d); }
.sw { position: relative; width: 52px; height: 32px; border-radius: 16px; background: #eadbd2; box-shadow: inset 0 0 0 2px #b9a69c; flex: none; transition: background-color .25s; }
.sw::after { content: ""; position: absolute; left: 7px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: #8a7870; transition: all .35s var(--spring); }
.sw.on { background: var(--red); box-shadow: none; }
.sw.on::after { left: 24px; top: 4px; width: 24px; height: 24px; background: #fff; }
.ab-top { display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; }
.ab-top img { width: 104px; height: 104px; border-radius: 26px; box-shadow: 0 10px 24px -10px rgba(150,30,10,.5); }
.ab-n { margin-top: 12px; font-family: var(--fd); font-size: 1.5rem; }
.ab-v { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.card { margin: 14px 12px 0; padding: 16px; border-radius: 22px; background: var(--paper); }
.ab-p { font-size: .95rem; line-height: 1.8; margin-bottom: 14px; }
.tech div { padding: 10px 0; }
.tech div + div { border-top: 1px solid var(--line); }
.tech dt { font-family: var(--fn); font-weight: 800; color: var(--red-d); }
.tech dd { margin-top: 2px; font-size: .9rem; line-height: 1.7; }

/* ---------- シート・スナックバー・知らせ ---------- */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(40, 10, 5, .45); opacity: 0; transition: opacity .25s; }
.scrim.on { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88%; overflow-y: auto; padding: 0 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fffaf5; transform: translateY(105%); transition: transform .45s var(--spring); }
.sheet.on { transform: none; }
.sheet.drag { transition: none; }
.sh-grip { height: 32px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sh-grip i { width: 36px; height: 5px; border-radius: 3px; background: #c9b3a8; }
.cf-t { font-family: var(--fd); font-weight: 400; font-size: 1.3rem; }
.cf-b { margin-top: 8px; font-size: .95rem; line-height: 1.75; color: var(--ink2); }
.cf-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.ms-list { display: grid; gap: 8px; margin-top: 14px; }
.ms-b { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 14px; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; }
.ms-b > span { flex: 1; display: flex; flex-direction: column; }
.ms-b > span span { font-size: .875rem; color: var(--ink2); font-weight: 700; }
.ms-b.on { box-shadow: inset 0 0 0 2.5px var(--red); background: var(--red-t); }
.ms-b > .k { color: var(--red); }
.ed-cat { display: inline-flex; padding: 3px 10px; border-radius: 8px; background: var(--c); color: #fff; font-weight: 800; font-size: .875rem; }
.ed-n { margin-top: 8px; font-family: var(--fd); font-weight: 400; font-size: 1.6rem; }
.ed-q { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--paper); font-weight: 800; }
.stp { display: flex; align-items: center; gap: 6px; }
.stp b { min-width: 2.2em; text-align: center; font-family: var(--fn); font-size: 1.6rem; font-weight: 800; }
.stp-b { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--red-t); color: var(--red-d); transition: transform .3s var(--bounce); }
.stp-b:active { transform: scale(.88); }
.ed-l { margin: 16px 0 8px; font-weight: 800; }
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-in { width: 100%; height: 52px; margin-top: 10px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px #d9c5ba; font-weight: 700; }
.ed-in:focus { outline: 0; box-shadow: inset 0 0 0 2.5px var(--red); }
.ed-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
.snack { position: absolute; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 132px); z-index: 30; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 8px 8px 18px; border-radius: 16px; background: #2b1d19; color: #fff; font-weight: 700; font-size: .95rem; transform: translateY(16px) scale(.96); opacity: 0; pointer-events: none; transition: transform .4s var(--spring), opacity .2s; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); }
.app:not(:has(.pg-list)) .snack { bottom: calc(var(--nav-h) + 12px); }
.app.pushed .snack { bottom: calc(16px + env(safe-area-inset-bottom)); }
.snack.on { transform: none; opacity: 1; pointer-events: auto; }
.sn-t { flex: 1; line-height: 1.5; }
.sn-a { min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--sun); font-weight: 800; white-space: nowrap; }
.incoming { position: absolute; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top)); z-index: 35; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 20px; background: var(--paper); box-shadow: inset 4px 0 0 var(--sun), 0 14px 30px -10px rgba(80,20,0,.45); transform: translateY(-140%); opacity: 0; visibility: hidden; transition: transform .5s var(--bounce), opacity .3s, visibility 0s .5s; pointer-events: none; }
.incoming.on { transform: none; opacity: 1; visibility: visible; transition: transform .5s var(--bounce), opacity .2s; }
.in-t { font-size: .95rem; line-height: 1.5; font-weight: 700; }

/* ---------- 画面遷移 ---------- */
.pg.in-fade { animation: fadeIn .32s var(--emph) both; }
.pg.out-fade { animation: fadeOut .12s linear both; }
.pg.in-push { animation: pushIn .4s var(--emph) both; z-index: 2; }
.pg.out-push { animation: pushOut .3s var(--emph) both; }
.pg.in-back { animation: backIn .4s var(--emph) both; }
.pg.out-back { animation: backOut .3s var(--emph) both; z-index: 2; }
.pg[class*="out-"] { pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.96); } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes pushIn { from { transform: translateX(100%); } }
@keyframes pushOut { to { transform: translateX(-25%); opacity: .6; } }
@keyframes backIn { from { transform: translateX(-25%); opacity: .6; } }
@keyframes backOut { to { transform: translateX(100%); } }

/* ---------- スプラッシュ・案内 ---------- */
.splash { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 16px; background: radial-gradient(circle, rgba(255,255,255,.14) 2px, transparent 2.5px) 0 0 / 18px 18px, var(--red); transition: opacity .3s; }
.splash img { width: 120px; height: 120px; border-radius: 30px; box-shadow: 0 12px 0 rgba(120, 10, 0, .3); animation: pop .55s var(--bounce) both; }
.splash-t { font-family: var(--fd); font-size: 1.7rem; color: #fff; }
.splash.bye { opacity: 0; }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
.onb { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--paper); transition: opacity .3s, transform .3s; }
.onb.bye { opacity: 0; transform: scale(1.03); }
.onb-pic { position: relative; height: 48%; overflow: hidden; border-radius: 0 0 40px 40px; background: var(--cream); }
.onb-pic img { width: 100%; height: 100%; object-fit: cover; object-position: center 88%; }
.onb-burst { position: absolute; right: 18px; top: calc(18px + env(safe-area-inset-top)); width: 92px; height: 92px; display: grid; place-items: center; text-align: center; font-family: var(--fd); font-size: .95rem; line-height: 1.3; color: var(--ink); background: var(--sun); clip-path: polygon(50% 0, 61% 12%, 75% 6%, 79% 21%, 94% 25%, 88% 39%, 100% 50%, 88% 61%, 94% 75%, 79% 79%, 75% 94%, 61% 88%, 50% 100%, 39% 88%, 25% 94%, 21% 79%, 6% 75%, 12% 61%, 0 50%, 12% 39%, 6% 25%, 21% 21%, 25% 6%, 39% 12%); transform: rotate(-10deg); }
.onb-tr { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.onb-tr::-webkit-scrollbar { display: none; }
.onb-s { flex: 0 0 100%; scroll-snap-align: start; padding: 24px 24px 0; }
.onb-no { font-family: var(--fn); font-weight: 800; color: var(--red); font-size: 1.3rem; }
.onb-no small { font-size: .875rem; color: var(--ink2); }
.onb-h { margin-top: 6px; font-family: var(--fd); font-weight: 400; font-size: 1.65rem; line-height: 1.45; }
.onb-b { margin-top: 10px; font-size: 1rem; line-height: 1.85; color: var(--ink2); word-break: keep-all; }
.onb-f { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); }
.onb-dots { display: flex; justify-content: center; gap: 6px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 4px; background: #e2cfc5; transition: width .35s var(--spring), background-color .2s; }
.onb-dots i.on { width: 24px; background: var(--red); }

.nojs, .fatal { position: fixed; left: 16px; right: 16px; bottom: 24px; z-index: 99; padding: 16px; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.3); line-height: 1.7; }
.fatal-t { font-weight: 800; }
.fatal a { color: var(--red-d); text-decoration: underline; font-weight: 700; }

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