:root {
  --paper: #F4F8F5;
  --card: #FFFFFF;
  --ink: #1D3A32;
  --ink-2: #4A6259;
  --sage: #7F9C8E;
  --rule: #D3DED7;
  --amber: #D9962B;
  --amber-soft: #F6E4C4;
  --alert: #B2452E;
  --ok: #2F7A57;
  --focus: #1F6FD1;
  --head: "Zen Maru Gothic", "BIZ UDPGothic", sans-serif;
  --body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --wrap: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12201C; --card: #182A25; --ink: #E4EFEA; --ink-2: #A9BFB6;
    --sage: #6F8C7F; --rule: #2C433C; --amber: #E3A646; --amber-soft: #3B3222;
    --alert: #E27A63; --ok: #63B88E; --focus: #7DB2FF;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.8;
  font-variant-numeric: tabular-nums;
  padding-bottom: 88px;
}
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 50; }

/* disclosure */
.pr-bar { background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.6; }
.pr-bar .wrap { padding-top: 6px; padding-bottom: 6px; }
.pr-bar a { color: var(--paper); }

/* header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--card); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { font-family: var(--head); font-weight: 700; font-size: 20px; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.logo-capsule { width: 34px; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--amber) 50%, var(--ink) 50%); display: inline-block; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 15px; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--amber); }

/* type */
h1, h2 { word-break: auto-phrase; text-wrap: balance; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.35; letter-spacing: .01em; }
h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 16px; }
h2 { font-size: clamp(22px, 3.2vw, 28px); margin: 56px 0 12px; }
h3 { font-size: 19px; margin: 28px 0 8px; }
p { margin: 0 0 14px; max-width: 40em; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 36em; }
.small { font-size: 13px; color: var(--ink-2); }
.crumbs { font-size: 13px; color: var(--ink-2); margin: 20px 0 8px; }
.crumbs a { color: var(--ink-2); }

/* hero */
.hero { padding: 40px 0 8px; display: grid; gap: 28px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1.05fr; align-items: center; padding-top: 56px; } }
.hero h1 { font-size: clamp(30px, 5.4vw, 48px); }

/* meter — the one memorable element */
.meter-card { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 22px 20px 18px; }
.meter-card h2 { margin: 0 0 4px; font-size: 18px; }
.meter-total { font-family: var(--head); font-size: 40px; font-weight: 700; line-height: 1.2; margin: 6px 0 2px; }
.meter-total small { font-size: 15px; font-family: var(--body); font-weight: 400; color: var(--ink-2); margin-left: 6px; }
.meter { position: relative; height: 34px; border-radius: 17px; background: var(--paper); border: 2px solid var(--ink); overflow: hidden; margin: 14px 0 6px; }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--amber); border-right: 2px solid var(--ink); transition: width .45s cubic-bezier(.3,.7,.2,1), background-color .2s; }
.meter[data-state="over"] .meter-fill { background: var(--alert); }
.meter-mark { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--ink); }
.meter-scale { position: relative; height: 40px; font-size: 12.5px; color: var(--ink-2); }
.meter-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; text-align: center; line-height: 1.35; }
.meter-scale span:first-child { transform: none; }
.meter-scale span:last-child { transform: translateX(-100%); text-align: right; }
.meter-msg { font-size: 15px; margin: 6px 0 0; min-height: 1.8em; }
.meter-msg strong { color: var(--ink); }
.meter-msg.is-over { color: var(--alert); }
@media (prefers-reduced-motion: reduce) { .meter-fill { transition: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: 22px; font: 700 15px/1.3 var(--body); text-decoration: none; cursor: pointer; border: 2px solid var(--ink); background: var(--card); color: var(--ink); }
.btn:hover { background: var(--amber-soft); color: var(--ink); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--amber); color: var(--ink); border-color: var(--ink); }
.btn-small { min-height: 36px; padding: 4px 12px; font-size: 13.5px; }
.btn[aria-pressed="true"] { background: var(--amber-soft); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }

/* situation picker */
.situations { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; padding: 0; list-style: none; }
.chip { border: 1.5px solid var(--sage); background: var(--card); border-radius: 999px; padding: 8px 16px; font: 15px/1.4 var(--body); color: var(--ink); cursor: pointer; min-height: 44px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ing-list { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--rule); }
.ing-list li { border-bottom: 1px solid var(--rule); }
.ing-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 4px; text-decoration: none; }
.ing-list .ing-name { font-family: var(--head); font-weight: 700; font-size: 18px; }
.ing-list .ing-sum { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.ing-list .ing-count { font-size: 13px; color: var(--ink-2); align-self: center; }
.ing-list li.is-dim { opacity: .38; }
.ing-list li.is-hit .ing-name::before { content: ""; display: inline-block; width: 18px; height: 9px; border-radius: 5px; background: var(--amber); margin-right: 8px; vertical-align: middle; }

/* points */
.points { padding-left: 1.2em; max-width: 40em; }
.points li { margin-bottom: 6px; }

/* comparison table */
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 10px; font-size: 14px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
table.compare { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 14.5px; }
.compare th, .compare td { padding: 12px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.compare thead th { font-size: 13px; color: var(--ink-2); font-weight: 700; background: var(--paper); white-space: nowrap; }
.compare td.num, .compare th.num { text-align: right; white-space: nowrap; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .p-name { font-weight: 700; }
.compare .p-brand { font-size: 13px; color: var(--ink-2); display: block; }
.compare .best { background: var(--amber-soft); font-weight: 700; }
.compare .nowrap, .compare td.num { white-space: nowrap; }
main > h1:first-child { margin-top: 40px; }
.badge { display: inline-block; font-size: 12px; line-height: 1.5; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--sage); color: var(--ink-2); margin: 2px 4px 0 0; white-space: nowrap; }
.badge-warn { border-color: var(--alert); color: var(--alert); }
.cell-actions { display: flex; flex-direction: column; gap: 6px; min-width: 132px; }

/* sticky shelf bar */
.shelf-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 2px solid var(--ink); }
.shelf-bar .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 72px; }
.shelf-bar .sb-total { font-family: var(--head); font-weight: 700; font-size: 20px; white-space: nowrap; }
.shelf-bar .sb-total small { display: block; font: 12px/1.3 var(--body); color: var(--ink-2); }
.mini-meter { height: 12px; border-radius: 6px; border: 1.5px solid var(--ink); background: var(--paper); position: relative; overflow: hidden; }
.mini-meter i { position: absolute; inset: 0 auto 0 0; background: var(--amber); width: 0; transition: width .4s; }
.mini-meter[data-state="over"] i { background: var(--alert); }
.mini-meter b { position: absolute; top: 0; bottom: 0; border-left: 1.5px dashed var(--ink); }
.sb-msg { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.4; }
@media (max-width: 560px) { .shelf-bar .wrap { grid-template-columns: 1fr auto; } .shelf-bar .sb-mid { grid-column: 1 / -1; order: 3; padding-bottom: 8px; } }

/* shelf page */
.shelf-grid { display: grid; gap: 28px; }
@media (min-width: 960px) { .shelf-grid { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 18px; }
.panel h2 { margin-top: 0; font-size: 20px; }
.shelf-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.shelf-item:last-child { border-bottom: 0; }
.shelf-item .si-name { font-weight: 700; }
.shelf-item .si-meta { font-size: 13px; color: var(--ink-2); grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden; }
.seg button { border: 0; background: var(--card); color: var(--ink); font: 13px/1 var(--body); padding: 9px 12px; cursor: pointer; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 36px; height: 36px; border-radius: 18px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font-size: 18px; cursor: pointer; }
.si-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; }
.linkish { background: none; border: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font: 13px var(--body); padding: 8px 4px; }
.order { border: 1.5px solid var(--ink); border-radius: 14px; padding: 14px; margin: 12px 0; }
.order h3 { margin: 0 0 6px; font-size: 16px; }
.order ol { margin: 6px 0 0; padding-left: 1.3em; }
.order li { margin: 8px 0; }
.nutri { width: 100%; border-collapse: collapse; font-size: 14px; }
.nutri th, .nutri td { padding: 8px 6px; border-bottom: 1px solid var(--rule); text-align: left; }
.nutri td.num { text-align: right; white-space: nowrap; }
.nutri .over td { color: var(--alert); font-weight: 700; }
.empty { border: 2px dashed var(--rule); border-radius: 14px; padding: 22px; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 22px; font-size: 14px; z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }

/* prose pages */
.prose { max-width: 44em; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.note { border-left: 4px solid var(--amber); background: var(--card); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 18px 0; max-width: 44em; }

/* footer */
.site-foot { margin-top: 72px; border-top: 1px solid var(--rule); padding: 28px 0 24px; font-size: 13.5px; color: var(--ink-2); }
.site-foot nav { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-bottom: 12px; }
.site-foot a { color: var(--ink-2); }
.compare td:first-child { min-width: 220px; max-width: 280px; }
.compare .badge-warn { white-space: normal; }
.compare th, .compare td { padding: 12px 10px; }
.promo { margin: 28px 0 8px; border: 2px solid var(--amber); border-radius: 14px; padding: 14px 18px; background: var(--card); max-width: 44em; }
.promo h2 { margin: 0 0 6px; font-size: 18px; }
.promo ul { margin: 0 0 6px; padding-left: 1.2em; }
.faq { border-bottom: 1px solid var(--rule); padding: 10px 0; max-width: 44em; }
.faq summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.faq p { margin: 8px 0 0; }
.done-mark { display: none; font-size: 12px; color: var(--ok); font-weight: 700; margin-left: 6px; }
#shelf-orders li.is-done .done-mark { display: inline; }
#shelf-orders li.is-done { opacity: .7; }
tr[hidden] { display: none; }
@media print { .shelf-bar, .site-head nav, .pr-bar a, .btn-row, .toast { display: none !important; } body { padding-bottom: 0; } }

/* 2026-11 結論カード・前回比・値下がり一覧 */
.delta { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.delta-down { color: var(--ok); border: 1px solid var(--ok); }
.delta-up { color: var(--alert); border: 1px solid var(--alert); }
.picks { margin: 24px 0 8px; }
.pick-list, .drop-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .pick-list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.pick, .drop-list li { border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.pick-label { margin: 0; font-weight: 700; font-size: 13px; color: var(--ink); border-left: 4px solid var(--amber); padding-left: 8px; }
.pick-name, .pick-why, .pick-price { margin: 0; }
.pick-name .p-brand, .drop-list .p-brand { display: block; font-size: 12px; opacity: .75; }
.pick-price strong { font-size: 20px; }
.pick .cell-actions, .drop-list .cell-actions { margin-top: auto; }
.drops { margin: 24px 0; }
@media (min-width: 760px) { .drop-list { grid-template-columns: repeat(2, 1fr); } }
.drop-list .cell-actions, .pick .cell-actions { display: flex; flex-direction: row; gap: 8px; }
.drop-list .cell-actions .btn, .pick .cell-actions .btn { flex: 1; }
