:root {
  color-scheme: light;
  --paper: #f5f7ef;
  --ink: #20342b;
  --muted: #4e6057;
  --rule: #d4ded0;
  --retail: #286447;
  --wholesale: #624b80;
  --prev-retail: #86a795;
  --prev-wholesale: #a79aba;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.wrap { width: min(100% - 2rem, 74rem); margin-inline: auto; }
.masthead { padding-block: clamp(1.5rem, 6vw, 4rem) 1.25rem; border-bottom: 4px solid var(--retail); }
h1, h2, h3, p { margin: 0; }
h1 { font-family: "Hiragino Mincho ProN", YuMincho, serif; font-size: clamp(2.25rem, 7vw, 4.5rem); line-height: 1.12; }
.masthead p { margin-top: .5rem; color: var(--muted); }
main { padding-block: 1.4rem 2.5rem; }
.notice { margin-bottom: 1rem; padding: .6rem .8rem; border-inline-start: 4px solid #886126; background: #f8edcf; color: #604617; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.section-heading p, #item-weight { color: var(--muted); font-size: .875rem; }
h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .6rem; list-style: none; margin: 0; padding: 0; }
.cards li { min-width: 0; }
.card {
  width: 100%;
  height: 100%;
  padding: .8rem;
  border: 1px solid var(--rule);
  border-radius: .25rem;
  background: #fff;
  color: var(--ink);
  text-align: start;
  font: inherit;
  cursor: pointer;
}
.card:hover { border-color: var(--retail); }
.card[aria-pressed="true"] { border-color: var(--retail); box-shadow: inset 0 -3px var(--retail); background: #e9f2e7; }
:focus-visible { outline: 3px solid var(--wholesale); outline-offset: 2px; }
.card span { display: block; }
.card .item-name { margin-bottom: .4rem; font-weight: 750; }
.card .card-price { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 .35rem; font-size: .875rem; }
.card-price + .card-price { margin-top: .4rem; padding-top: .4rem; border-top: 1px solid var(--rule); }
.card-price b, table { font-variant-numeric: tabular-nums; }
.card-week, .comparison, .card-note { flex-basis: 100%; color: var(--muted); font-size: .78rem; }
.detail { margin-top: 2rem; padding: clamp(.65rem, 2vw, 1.5rem); background: #fff; border: 1px solid var(--rule); border-radius: .25rem; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; list-style: none; padding: 0; margin: .85rem 0 .25rem; font-size: .82rem; }
.legend li::before { content: ""; display: inline-block; vertical-align: .25em; width: 1.15rem; border-top: 3px solid currentColor; margin-right: .35rem; }
.retail { color: var(--retail); }
.wholesale { color: var(--wholesale); }
.legend .previous::before { border-top-style: dashed; }
.retail.previous::before { color: var(--prev-retail); }
.wholesale.previous::before { color: var(--prev-wholesale); }
#chart { width: 100%; min-width: 0; overflow: hidden; }
.table-scroll { max-height: 23rem; overflow: auto; margin-top: 1rem; border: 1px solid var(--rule); }
table { width: 100%; min-width: 22rem; border-collapse: collapse; text-align: right; font-size: .82rem; }
caption { padding: .6rem; font-weight: 650; text-align: left; }
th, td { padding: .35rem .45rem; border-bottom: 1px solid var(--rule); }
thead { position: sticky; top: 0; background: #e9f2e7; }
thead th { text-align: center; }
tbody th { text-align: left; white-space: nowrap; }
tbody tr:nth-child(even) { background: #f6f8f3; }
footer { padding-block: 1.4rem 2.5rem; border-top: 1px solid var(--rule); font-size: .9rem; }
footer p { margin-top: .5rem; max-width: 65ch; }
footer h3 { margin-top: 1rem; font-size: 1rem; }
footer ul { margin: .4rem 0; padding-inline-start: 1.25rem; }
a { color: var(--retail); }
footer a { overflow-wrap: anywhere; }
.return-link { display: inline-block; font-size: .82rem; margin-top: .25rem; }
@media (max-width: 34rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: .55rem; }
}
