* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --plum: #392639;
  --wine: #813644;
  --cream: #f5e9d3;
  --line: #b19a83;
  color: var(--plum);
  background: var(--cream);
}
body { margin: 0; }
[hidden] { display: none !important; }
.frame { width: min(100% - 4rem, 70rem); margin-inline: auto; }
.awning { background: var(--plum); color: #fbe7ba; overflow: hidden; border-bottom: 7px solid #b45851; }
.storefront { min-height: clamp(188px, 30vw, 288px); display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.75rem 0; }
h1 { margin: 0; font: 400 clamp(2.6rem, 7vw, 6.1rem)/1.15 "Songti SC", "Noto Serif CJK SC", SimSun, serif; letter-spacing: .085em; }
.storefront p { margin: .9rem 0 0; color: #f1d5b9; font-size: 1rem; letter-spacing: .07em; }
.store-mark { position: relative; width: clamp(55px, 14vw, 164px); aspect-ratio: 1; flex: none; border-radius: 50%; border: 2px solid #f9da87; outline: 1px solid #f9da87; outline-offset: 7px; transform: rotate(-16deg); margin-inline: 1rem; }
.store-mark::before { position: absolute; content: ""; inset: 19%; border-radius: 50%; box-shadow: inset 22px -10px #f9da87; }
.store-mark i { position: absolute; width: 15%; aspect-ratio: 1; background: #f9da87; clip-path: polygon(50% 0, 59% 40%, 100% 50%, 59% 60%, 50% 100%, 41% 60%, 0 50%, 41% 40%); right: 28%; top: 24%; }
.store-mark i:last-child { width: 9%; right: 20%; top: 44%; }
.shop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, .44fr); gap: clamp(1.25rem, 3.6vw, 3rem); align-items: start; padding-block: 1.8rem 3.3rem; }
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid #774146; outline-offset: 4px; }
button:disabled { cursor: default; }
.product {
  display: grid; position: relative; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  min-width: 0; padding: 0; overflow: hidden; text-align: left; border: 1px solid #bd9e7d;
  border-radius: 7px; background: #fdefd7; transition: transform 180ms ease, box-shadow 180ms ease;
}
.product:hover:enabled { box-shadow: 0 5px 0 #ceab85; transform: translateY(-3px); }
.product[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #a4484f; border-color: #a4484f; }
.product:disabled { opacity: .85; }
.product img { display: block; grid-column: 1 / -1; width: 100%; height: auto; border-bottom: 1px solid #dbc5a0; }
.product-info { display: grid; gap: .35rem; min-width: 0; padding: .7rem 0 .8rem .85rem; }
.product-info strong { font-size: 1.09rem; }
.product-info > span { font-size: .875rem; color: #644e51; line-height: 1.4; }
.choose { display: grid; place-items: center; width: 29px; height: 29px; margin: .3rem .62rem .3rem .4rem; border: 1px solid #a4484f; border-radius: 50%; color: #8b3a48; font-size: 1.05rem; }
.choose::before { content: "+"; }
.product[aria-pressed="true"] .choose { background: #963d49; color: #fff4d6; }
.product[aria-pressed="true"] .choose::before { content: "✓"; }
.receipt {
  position: sticky; top: 1.25rem; padding: 1.45rem 1.25rem 1.05rem; background: #fff8e8;
  box-shadow: 0 8px 23px #70523a24; transform: rotate(1deg);
}
.receipt::before, .receipt::after {
  position: absolute; content: ""; width: 100%; height: 7px; left: 0;
  background-image: linear-gradient(135deg, transparent 50%, #fff8e8 0), linear-gradient(225deg, transparent 50%, #fff8e8 0);
  background-size: 14px 7px; pointer-events: none;
}
.receipt::before { top: -6px; }
.receipt::after { bottom: -6px; transform: scaleY(-1); }
.receipt header { padding-bottom: .85rem; border-bottom: 1px dashed var(--line); }
.receipt-brand { font: italic .88rem Georgia, serif; color: #77574f; }
h2 { margin: .35rem 0 0; font-weight: 650; font-size: 1.45rem; letter-spacing: .08em; }
#empty { color: #6a5153; font-size: .95rem; }
#selection { padding-left: 1.2em; }
#selection li + li { margin-top: .35rem; }
.note { margin: 1rem 0; font-size: .91rem; line-height: 1.75; color: #773e48; }
.delivery { display: flex; justify-content: space-between; margin: 1.1rem 0; padding: .75rem 0 0; border-top: 1px dashed var(--line); font-size: .93rem; }
.receipt-buttons { display: flex; flex-wrap: wrap; gap: .55rem; }
.receipt-buttons button { min-height: 44px; padding: .42rem .78rem; border: 1px solid var(--wine); border-radius: 4px; font-size: .9rem; }
#seal { background: var(--wine); color: #fff2d2; }
#seal:enabled:hover { background: #672c39; }
#seal:disabled { opacity: .64; }
#keep { background: transparent; color: var(--wine); }
#keep:hover { background: #f5e7ce; }
.status { min-height: 1.4em; margin: .75rem 0 0; font-size: .82rem; color: #664e50; }
@media (max-width: 710px) {
  .frame { width: calc(100% - 2rem); }
  .shop { grid-template-columns: 1fr; }
  .receipt { position: relative; top: auto; max-width: 30rem; width: 100%; justify-self: center; }
  .store-mark { margin-right: .8rem; }
  .store-mark::before { box-shadow: inset 11px -6px #f9da87; }
}
@media (max-width: 400px) {
  .shelf { gap: 8px; }
  .frame { width: calc(100% - 1.4rem); }
  h1 { font-size: 2.35rem; }
  .product-info { padding-left: .48rem; }
  .product-info strong { font-size: 1rem; }
  .product-info > span { font-size: .8rem; }
  .choose { width: 25px; height: 25px; margin-inline: .25rem; }
  .store-mark { width: 41px; }
}
@media (prefers-reduced-motion: reduce) {
  .product { transition: none; }
  .product:hover:enabled { transform: none; }
}
