* { box-sizing: border-box; }
:root { color-scheme: light; --ink: #202841; --muted: #58617b; --line: #dddff0; --accent: #6352cd; --soft: #eae5fb; }
body { margin: 0; background: linear-gradient(130deg, #e9f1ff, #f4eef9 65%, #f8f3fa); color: var(--ink); font: 15px/1.55 system-ui, "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.shell { width: min(1440px, calc(100% - 32px)); margin-inline: auto; }
.site-header { background: #f8faffb8; border-bottom: 1px solid var(--line); }
 .bar, .hero, .stats, .card, .summary, .dialog-head { display: flex; align-items: center; }
.bar { min-height: 72px; justify-content: space-between; gap: 12px; }
.brand, .home { display: inline-flex; align-items: center; gap: 8px; border-radius: 24px; padding: 5px 14px; background: #ffffff72; white-space: nowrap; }
.brand { font-size: 16px; font-weight: 750; }
.brand img { width: 34px; height: 30px; object-fit: contain; border-radius: 6px; }
.home { background: #e9e4fb; color: var(--accent); font-size: 13px; }
.notice { margin: 22px 0 10px; padding: 6px 12px; border: 1px solid #aa803b36; border-radius: 20px; background: #dac39644; color: #76571f; font-size: 12px; }
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.shop-profile { display: flex; align-items: center; gap: 14px; padding: 20px; }
.shop-profile, .stats div, .shortcuts { background: linear-gradient(115deg, #f2f7ffbe, #f9effabf); border: 1px solid #fff9; border-radius: 20px; box-shadow: 0 7px 16px #55589119; }
.shop-profile img { width: 58px; height: 58px; object-fit: cover; border-radius: 18px; }
.hero h1 { margin: 0; font-size: clamp(21px, 3vw, 27px); }
.hero p { margin: 0; color: var(--muted); }
.stats { display: grid; gap: 8px; }
.stats div { min-width: 0; padding: 8px 13px; }
.shortcuts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0 19px; padding: 7px; }
.shortcuts span, .shortcuts button { text-align: center; padding: 5px 2px; border-radius: 20px; font-size: 12px; font-weight: 650; border: 1px solid #a77e4938; background: #dac39644; color: #76571f; }
.shortcuts span:nth-child(2) { background: #e6defa; color: #5141a7; border-color: #6352cd36; }
.stats small, .stats strong { display: block; }
.catalog { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
aside, .card, input { background: white; border: 1px solid var(--line); border-radius: 14px; }
aside { padding: 14px; position: sticky; top: 14px; }
h2 { margin: 0 0 10px; font-size: 17px; }
#categories { display: grid; gap: 4px; }
#categories button { border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
#categories button[aria-pressed="true"] { background: var(--soft); color: #5141a7; font-weight: 700; }
.category-icon { object-fit: cover; border-radius: 4px; vertical-align: -4px; margin-right: 8px; }
input { width: 100%; padding: 12px 15px; color: var(--ink); }
.group { margin-top: 20px; }
.group h2 span { color: var(--muted); font-size: 13px; margin-left: 8px; }
.card { gap: 14px; padding: 13px; margin-bottom: 9px; background: linear-gradient(110deg, #f8faff, #fbf1ff); box-shadow: 0 5px 14px #55589114; }
.icon { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--soft); }
.card-info { flex: 1; min-width: 0; }
small { color: var(--muted); }
.stats small { color: var(--muted); }
h3 { font-size: 15px; margin: 3px 0 6px; overflow-wrap: anywhere; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tags span, .stock { background: #eff4f7; color: #405969; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.stock, .tags .stock { background: #d9f1ed; color: #175b54; }
.card-action { text-align: right; flex: none; }
.price { display: block; white-space: nowrap; margin-bottom: 4px; }
.primary { background: linear-gradient(110deg, #514de0, #8753cc); color: white; border: 0; border-radius: 18px; padding: 7px 14px; font-weight: 650; cursor: pointer; }
.primary:disabled { background: #e5eded; color: #52636b; cursor: default; }
footer { color: var(--muted); padding-block: 28px; }
dialog { padding: 0; border: 1px solid var(--line); border-radius: 18px; width: min(480px, calc(100% - 28px)); max-height: calc(100dvh - 32px); color: var(--ink); background: linear-gradient(150deg, #eef3ff, #fbf0fb); box-shadow: 0 20px 70px #14263155; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #17273288; backdrop-filter: blur(4px); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head, .dialog-foot { padding: 14px 20px; }
.dialog-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; }
.dialog-head button { border: 0; background: transparent; font-size: 23px; cursor: pointer; }
.dialog-body { overflow: auto; padding: 16px 20px; }
.summary { gap: 12px; background: #ffffff85; padding: 12px; border-radius: 12px; }
#item-price { color: var(--accent); font-size: 21px; }
.details p { margin: 15px 0 7px; }
#options { display: flex; flex-wrap: wrap; gap: 6px; }
#options button, .quantity button { border: 1px solid var(--line); background: #f6f9fa; border-radius: 6px; padding: 5px 9px; }
#options button:first-child { border-color: var(--accent); background: var(--soft); }
.quantity { margin-top: 14px; }
.quantity span { display: inline-flex; gap: 12px; align-items: center; margin-left: 10px; }
.dialog-foot { border-top: 1px solid var(--line); }
.dialog-foot button { width: 100%; padding: 10px; cursor: default; }
@media (max-width: 680px) {
  .shell { width: calc(100% - 24px); }
  .catalog { grid-template-columns: 1fr; gap: 10px; }
  aside { position: static; }
  #categories { display: flex; overflow-x: auto; }
  .hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
  .card .icon { width: 42px; height: 42px; font-size: 22px; }
  .card-action { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
  .price { margin: 0; }
}
@media (max-width: 360px) { .bar { gap: 8px; } }



.bar { position: relative; }
.home { position: absolute; left: 50%; transform: translateX(-50%); }
.shortcuts button { cursor: pointer; }
#announcement { width: min(448px, calc(100% - 28px)); border-radius: 28px; background: linear-gradient(160deg, #eff4ffd9, #e0e2eb9e); }
#announcement::backdrop { background: #2228389e; backdrop-filter: blur(2px); }
#announcement .dialog-head { padding: 20px 20px 6px; border-bottom: 0; }
#announcement h2 { display: flex; align-items: center; gap: 14px; }
.announcement-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #9183ff26; border: 1px solid #9183ff55; color: #6557f2; font-size: 22px; }
#announcement .dialog-head button { color: #586785; padding-inline: 10px; }
#announcement .dialog-body { color: #4a5875; font-size: 14px; line-height: 1.62; padding-block: 10px 18px; }
#announcement .dialog-body p { margin: 0 0 22px; }
#announcement .dialog-body p:last-child { margin-bottom: 0; }
#announcement .dialog-foot { border-color: #ffffff53; padding: 12px 20px 16px; }
#announcement .dialog-foot button { background: linear-gradient(105deg, #5e62f5, #705cf6 60%, #bf89db); padding: 7px 10px; cursor: pointer; }
@media (max-width: 540px) {
  .home { position: static; transform: none; }
}
