:root {
  color-scheme: dark;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #f4f9f6;
  background: #101714;
  --muted: #adbfb6;
  --line: #33453b;
  --mint: #adf2cc;
  --pale: #d4fae6;
  --card: #18231d;
  --field: #1a2720;
  --canvas: #101714;
  --primary-fill: #adf2cc;
  --hero-tint: 21 36 29;
  --price-color: #ff8580;
  font-synthesis: none;
}
:root[data-theme="light"] {
  color-scheme: light;
  color: #14271d;
  background: #f1f7f3;
  --muted: #4c6457;
  --line: #c5d8cb;
  --mint: #176747;
  --pale: #214c36;
  --card: #fff;
  --field: #f3f8f4;
  --canvas: #f1f7f3;
  --primary-fill: #a1e0bb;
  --hero-tint: 225 240 230;
  --price-color: #b62029;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
.local-auth { width: min(440px, calc(100% - 2rem)); margin: 10vh auto 2rem; padding: 2rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.local-auth form, .local-auth label { display: grid; gap: 0.6rem; }
.local-auth form { gap: 1rem; margin: 1.5rem 0 1rem; }
.local-auth input { display: block; width: 100%; padding: 0.75rem; background: var(--field); border: 1px solid var(--line); border-radius: 8px; color: inherit; }
.local-auth > a:last-child { color: var(--mint); }
.local-auth [role="alert"] { color: var(--price-color); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, input, a, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) {
  width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; position: absolute; white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 5; top: 10px; left: 10px; padding: 10px; background: var(--primary-fill); color: #102318; border-radius: 8px; }
.container { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #101714f5;
  border-bottom: 1px solid #29372f;
  backdrop-filter: blur(12px);
}
.header-content { min-height: 72px; display: flex; align-items: center; gap: 34px; }
.store-header .header-content { column-gap: clamp(10px, 2vw, 24px); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 24px; font-weight: 780; letter-spacing: -.065em; white-space: nowrap; }
.brand-logo { display: block; width: auto; height: 42px; max-width: 156px; object-fit: contain; object-position: left center; }
.brand-logo:not([hidden]) ~ span { display: none; }
.brand-accent { color: var(--mint); margin-left: 3px; }
.brand-icon { position: relative; width: 34px; height: 34px; display: inline-block; flex: none; border-radius: 10px; background: var(--primary-fill); }
.brand-icon::before, .brand-icon::after { position: absolute; content: ""; transform: rotate(45deg); border-radius: 2px; background: #11241a; }
.brand-icon::before { width: 13px; height: 13px; top: 9px; left: 8px; }
.brand-icon::after { width: 7px; height: 7px; top: 18px; left: 19px; }
.header-nav { display: flex; align-items: center; gap: 26px; margin-left: 12px; }
.header-nav a, .header-nav button { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted); font-size: 14px; font-weight: 650; }
.header-nav a:hover, .header-nav button:hover { color: var(--pale); }
.header-nav .admin-nav { color: var(--mint); }
.header-nav button { border: 0; padding: 0; background: none; }
.header-actions { display: flex; flex: none; align-items: center; gap: 7px; margin-left: auto; }
.header-profile { display: grid; flex: 0 1 auto; min-width: 0; max-width: 188px; padding-inline-start: 12px; border-inline-start: 1px solid var(--line); }
.header-profile button { min-width: 0; min-height: 24px; padding: 0; border: 0; background: none; text-align: right; white-space: nowrap; }
.header-profile button:hover { text-decoration: underline; text-underline-offset: 3px; }
.header-customer-name { overflow: hidden; text-overflow: ellipsis; color: var(--pale); font-size: 14px; font-weight: 720; }
.header-wallet { color: var(--mint); font-size: 12px; }
.header-wallet strong { font-variant-numeric: tabular-nums; }
.cart-button, .theme-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 10px; white-space: nowrap; border: 1px solid var(--line); border-radius: 9px;
  color: var(--pale); font-size: 13px; font-weight: 690; background: #1a2b21;
}
.cart-button:hover, .theme-switch:hover, .button-soft:hover, .icon-button:hover { background: #263e30; }
.cart-count { min-width: 22px; padding: 3px 4px; border-radius: 5px; text-align: center; background: #304b3b; color: var(--pale); font-variant-numeric: tabular-nums; font-size: 12px; }

.home-announcement {
  display: flex; align-items: baseline; gap: 8px 16px; margin-top: 18px; padding: 11px 15px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--field);
}
.home-announcement strong { flex: none; color: var(--price-color); font-size: 14px; }
.home-announcement p { margin: 0; min-width: 0; color: var(--muted); font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.home-feature { display: grid; gap: 14px; margin-top: 26px; }
.home-announcement + .home-feature { margin-top: 12px; }
.home-feature:has(.leaderboard) { grid-template-columns: minmax(0, 1fr) minmax(225px, .31fr); }
.leaderboard { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.leaderboard h2 { margin: 0 0 10px; font-size: 18px; }
.leaderboard-list { margin: 0 0 12px; padding-inline-start: 21px; font-size: 13px; }
.leaderboard-list li { padding: 9px 0 9px 3px; border-bottom: 1px solid var(--line); }
.leaderboard-list li::marker { color: var(--mint); font-weight: 750; }
.leaderboard-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.leaderboard-row strong { color: var(--mint); white-space: nowrap; }
.leaderboard-name { overflow-wrap: anywhere; }
.leaderboard-empty { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.leaderboard .button { align-self: start; margin-top: auto; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-width: 0; padding: 46px clamp(26px, 5.7vw, 74px); min-height: 430px;
  background: rgb(var(--hero-tint)); border: 1px solid #34483c; border-radius: 22px;
}
.hero-image { position: absolute; inset: 0 0 0 auto; z-index: -2; width: 74%; height: 100%; object-fit: cover; object-position: 50% 51%; }
.hero::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, rgb(var(--hero-tint)) 27%, rgb(var(--hero-tint) / .8) 41%, transparent 71%), linear-gradient(0deg, rgb(var(--hero-tint) / .38), transparent 48%); }
.hero-text { max-width: 560px; }
.hero h1 { margin: 0; font-size: clamp(49px, 6.25vw, 87px); line-height: 1.01; font-weight: 780; letter-spacing: -.073em; overflow-wrap: anywhere; }
.hero h1 em { color: var(--mint); font-style: normal; }
.hero-text > p { max-width: 345px; margin: 19px 0 0; color: #d3e3da; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  padding: 0 12px; border: 1px solid transparent; border-radius: 8px; background: none;
  font-weight: 730; font-size: 13px; line-height: 1.25; white-space: nowrap;
}
.button-primary { color: #13291c; background: var(--primary-fill); }
.button-primary:hover { background: #d2fce4; }
.button-soft { color: var(--pale); background: #20372a; border-color: #395846; }
.button:disabled, .icon-button:disabled { opacity: .48; cursor: default; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-button { gap: 12px; min-height: 43px; padding-inline: 15px; }

.catalog { padding: 39px 0 52px; scroll-margin-top: 82px; }
.catalog-head, .catalog-controls { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.catalog-head h2 { margin: 0; font-size: clamp(25px, 3.1vw, 36px); line-height: 1.05; font-weight: 750; letter-spacing: -.05em; }
.catalog-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.search, .sort select {
  min-height: 43px; border: 1px solid var(--line); border-radius: 9px;
  color: #f1f7f2; background: var(--field); font-size: 13px;
}
.search { display: flex; gap: 7px; align-items: center; width: min(320px, 36%); padding-inline: 10px 5px; }
.search:focus-within { outline: 2px solid var(--mint); outline-offset: 2px; }
.search .icon { color: var(--muted); }
.search input { width: 100%; min-width: 0; padding: 0 5px 0 0; height: 39px; border: 0; outline: 0; color: inherit; background: transparent; }
.search input::placeholder { color: var(--muted); }
.catalog-controls { margin: 19px 0 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  min-height: 36px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px;
  color: #c7d6cc; background: #18231c; font-size: 13px; font-weight: 640;
}
.filters button:hover { background: #253c2e; }
.filters button[aria-pressed="true"] { color: #d9fae8; background: #274a35; border-color: #538769; }
.sort select { min-height: 36px; padding: 0 8px; }

.catalog-group + .catalog-group { margin-top: clamp(26px, 4vw, 52px); }
.catalog-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 11px; }
.catalog-group-head h3 { margin: 0; min-width: 0; font-size: clamp(18px, 2.1vw, 26px); letter-spacing: -.025em; overflow-wrap: anywhere; }
.catalog-group-link { min-height: 34px; white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.product-card {
  display: flex; flex-direction: column; min-width: 0; padding: 8px;
  border: 1px solid #314439; border-radius: 15px; background: var(--card);
}
.product-card:hover { border-color: #567b64; }
.product-visual { position: relative; }
.product-stamps { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; margin-inline-start: auto; padding-block-start: 6px; }
.product-stamps:empty { display: none; }
.product-label { display: inline-block; padding: 4px 6px; color: white; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.label-hot { background: #a82e2b; }
.label-sale { background: #ffd36f; color: #2c210b; }
.product-stamps .product-label {
  position: relative; isolation: isolate; padding: 5px 8px;
  box-shadow: 0 2px 5px #200500b0, 0 0 10px var(--ember);
}
.product-stamps .label-hot { --flame: #ffac43; --ember: #ed421b; background: linear-gradient(#ad3015, #74190f); color: #fff7e7; }
.product-stamps .label-sale { --flame: #fff2a3; --ember: #ff791f; background: linear-gradient(#ffdf74, #ffa739); color: #351a05; }
.product-stamps .product-label::before {
  content: ""; position: absolute; z-index: -1; bottom: calc(100% - 3px);
  inset-inline: -2px; height: 22px; transform-origin: center bottom;
  background: linear-gradient(0deg, var(--ember), var(--flame) 63%, #fff3b0);
  clip-path: polygon(0 100%, 5% 80%, 11% 66%, 9% 42%, 25% 71%, 31% 56%, 31% 39%, 46% 5%, 43% 38%, 54% 64%, 64% 55%, 69% 23%, 76% 47%, 79% 66%, 92% 54%, 95% 84%, 100% 100%);
  animation: label-flame 1.3s ease-in-out infinite;
}
.product-stamps .product-label::after {
  content: ""; position: absolute; z-index: -1; bottom: calc(100% + 2px);
  inset-inline: 1px; height: 23px;
  background:
    radial-gradient(circle at 15% 54%, var(--flame) 0 1px, transparent 2px),
    radial-gradient(circle at 64% 34%, #fff1ad 0 1.3px, transparent 2.3px),
    radial-gradient(circle at 92% 71%, var(--ember) 0 1.3px, transparent 2.3px);
  animation: label-sparks 1.75s ease-out infinite;
}
.product-stamps .label-sale::before { animation-delay: -.63s; }
.product-stamps .label-sale::after { animation-delay: -.8s; }
@keyframes label-flame {
  0%, 100% { transform: scale(.94, .72) skewX(-12deg); }
  33% { transform: scale(1.05, 1.26) skewX(10deg); }
  64% { transform: scale(.91, .86) skewX(-5deg); }
  81% { transform: scale(1.03, 1.08) skewX(8deg); }
}
@keyframes label-sparks {
  0% { opacity: 0; transform: translate(0, 7px); }
  32% { opacity: 1; }
  85%, 100% { opacity: 0; transform: translate(4px, -7px); }
}
.product-art { display: block; padding: 0; overflow: hidden; border: 0; border-radius: 9px; background: #24382c; width: 100%; }
.product-art img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 8.7; object-fit: cover; }
.product-info { display: flex; flex: 1; flex-direction: column; padding: 12px 9px 7px; }
.product-sample { margin: 0 0 5px; color: var(--mint); font-size: 10px; text-transform: uppercase; letter-spacing: .11em; font-weight: 750; }
.product-info h4 { margin: 0; font-size: 16px; letter-spacing: -.025em; line-height: 1.25; }
.product-info h4 button { padding: 0; border: 0; color: inherit; background: none; font-weight: 720; text-align: left; overflow-wrap: anywhere; }
.product-info h4 button:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-summary { margin: 6px 0 14px; font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.product-stock { margin: -6px 0 10px; color: var(--mint); font-size: 12px; }
.product-bottom { display: grid; gap: 8px; margin-top: auto; padding-top: 11px; border-top: 1px solid #2d3d33; }
.product-price-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px; }
.price { color: var(--price-color); font-size: 17px; font-weight: 780; white-space: nowrap; letter-spacing: -.02em; }
.price-stack { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.old-price { color: var(--muted); font-size: 11px; white-space: nowrap; }
.purchase-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.product-bottom .purchase-buttons { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.product-bottom .button { min-width: 0; min-height: 36px; padding: 4px; font-size: 12px; line-height: 1.2; text-align: center; white-space: normal; }
.empty { grid-column: 1 / -1; padding: 25px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 14px; }
.shop-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 13px; padding-bottom: 40px; }
.shop-info-card { min-width: 0; padding: clamp(14px, 2.4vw, 23px); border: 1px solid var(--line); border-radius: 13px; background: var(--card); scroll-margin-top: 85px; }
.shop-info-card h2 { margin: 0 0 10px; font-size: 20px; }
.shop-info-card p { margin: 0; color: var(--muted); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.shop-info-card ul { display: flex; flex-wrap: wrap; gap: 6px 13px; margin: 8px 0 0; padding: 0; list-style: none; }
.shop-info-card a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.sign-out { color: var(--pale); font-size: 13px; white-space: nowrap; }
.sign-out:hover { text-decoration: underline; }

dialog {
  width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 17px;
  color: #f4f9f6; background: #17241c; border: 1px solid #4b6455; border-radius: 15px;
  box-shadow: 0 12px 46px #0008; overscroll-behavior: contain;
}
dialog::backdrop { background: #060c0ac2; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; font-size: clamp(20px, 4vw, 25px); line-height: 1.2; letter-spacing: -.035em; }
.icon-button { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 1px solid #3b5244; border-radius: 7px; color: var(--pale); background: #1e3025; }
.detail-image { display: block; width: 100%; height: auto; max-height: 230px; object-fit: cover; border-radius: 9px; }
.detail-description, .panel-note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.detail-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.panel-note[data-error="true"] { color: #ffb5bb; }
.account-dashboard { display: grid; gap: 12px; }
.account-section { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); }
.account-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.account-section h3 { margin: 0; font-size: 16px; }
.customer-profile { min-width: 0; overflow-wrap: anywhere; }
.customer-email { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.account-form { display: grid; gap: 10px; margin-top: 13px; }
.account-field { display: grid; gap: 4px; font-size: 14px; }
.account-field input, .order-filter select { min-width: 0; min-height: 38px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: inherit; }
.account-section > .panel-note:empty { display: none; }
.account-wallet { display: grid; gap: 8px; }
.account-balance { color: var(--mint); font-size: 22px; font-variant-numeric: tabular-nums; }
.account-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.account-shortcuts .button { text-align: center; }
.account-links { border-top: 1px solid var(--line); padding-top: 10px; justify-content: flex-end; }
.account-back { margin-bottom: 10px; }
.order-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.customer-balance { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--field); }
.customer-balance span { color: var(--muted); }
.wallet-topup-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 10px 0 14px; }
.wallet-field { display: grid; flex: 1 1 160px; gap: 5px; min-width: 0; font-size: 13px; }
.wallet-field input { min-width: 0; min-height: 40px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: inherit; }
.wallet-heading, .order-delivery h3 { margin: 16px 0 8px; font-size: 15px; }
.wallet-actions { margin-top: 8px; }
.wallet-actions .button { min-height: 33px; }
.detail-actions, .cart-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.detail-actions { flex-wrap: wrap; }
.cart-list, .order-list { list-style: none; padding: 0; margin: 0 0 13px; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item strong, .order-name { display: block; font-size: 14px; }
.cart-item small, .order-date { color: var(--muted); font-size: 12px; }
.quantity { display: flex; align-items: center; gap: 5px; flex: none; }
.quantity-input { width: 56px; min-height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--field); color: inherit; text-align: center; font-variant-numeric: tabular-nums; appearance: textfield; }
.quantity-input::-webkit-inner-spin-button, .quantity-input::-webkit-outer-spin-button { appearance: none; }
.quantity-price-tiers { display: flex; flex-wrap: wrap; gap: 5px 9px; margin: 0 0 10px; padding: 0; list-style: none; color: var(--pale); font-size: 12px; }
.quantity-price-tiers li { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; }
.order { margin-bottom: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; }
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; }
.order-head .price { margin-left: auto; font-size: 14px; }
.order-status { color: var(--mint); font-size: 11px; }
.order-details-button { margin-top: 10px; }
.order-delivery { margin-top: 12px; }
#panel-body > .order { margin-top: 10px; }
.delivery-heading { justify-content: space-between; margin-bottom: 8px; }
.delivery-heading h3 { margin: 0; }
.delivery-heading .button { min-height: 34px; }
.delivery-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.delivery-table th, .delivery-table td { padding: 7px 5px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.delivery-table thead th { color: var(--muted); font-size: 12px; }
.delivery-product th { color: var(--mint); }
.delivery-table td { font-family: ui-monospace, monospace; white-space: pre-wrap; user-select: all; }
.delivery-copy-text { width: 100%; margin-top: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; color: inherit; background: var(--field); font: 13px ui-monospace, monospace; resize: vertical; }
.delivery-copy-note:empty { display: none; }
.order ul { padding-left: 17px; color: var(--muted); font-size: 13px; margin: 9px 0 0; }
.toast {
  position: fixed; z-index: 3; right: 15px; bottom: 15px; margin: 0; max-width: calc(100% - 30px);
  padding: 10px 13px; border: 1px solid #588869; border-radius: 8px; background: #244e36;
  color: #ecfff2; opacity: 0; pointer-events: none; font-size: 13px; transition: opacity .15s ease;
}
.toast[data-visible="true"] { opacity: 1; }

:root[data-theme="light"] :is(.site-header, .product-bottom) { border-color: var(--line); }
:root[data-theme="light"] .site-header { background: #f6fbf8f5; }
:root[data-theme="light"] :is(.cart-button, .theme-switch, .button-soft, .icon-button) { background: #e6f3eb; border-color: #bdd8c7; }
:root[data-theme="light"] :is(.cart-button, .theme-switch, .button-soft, .icon-button):hover { background: #d5ebdf; }
:root[data-theme="light"] .cart-count { background: #cbebd8; }
:root[data-theme="light"] .hero { border-color: var(--line); }
:root[data-theme="light"] .hero-text > p { color: #344f40; }
:root[data-theme="light"] :is(.search, .sort select) { color: #14271d; }
:root[data-theme="light"] .filters button { color: var(--pale); background: #f9fdfb; }
:root[data-theme="light"] .filters button:hover { background: #ecf6ef; }
:root[data-theme="light"] .filters button[aria-pressed="true"] { color: #174c33; background: #d8efe2; border-color: #86b89a; }
:root[data-theme="light"] .product-card { border-color: var(--line); }
:root[data-theme="light"] .product-card:hover { border-color: #82af93; }
:root[data-theme="light"] dialog { color: #14271d; background: var(--card); border-color: var(--line); }
:root[data-theme="light"] dialog::backdrop { background: #12261a7a; }
:root[data-theme="light"] .panel-note[data-error="true"] { color: #a12634; }

.icon { position: relative; display: inline-block; flex: none; width: 18px; height: 18px; }
.icon::before, .icon::after { position: absolute; content: ""; }
.icon-bag::before { inset: 6px 2px 1px; border: 1.5px solid; border-radius: 2px; }
.icon-bag::after { inset: 2px 6px 7px; border: 1.5px solid; border-bottom: 0; border-radius: 4px 4px 0 0; }
.icon-search::before { width: 11px; height: 11px; border: 1.5px solid; border-radius: 50%; top: 2px; left: 2px; }
.icon-search::after { width: 6px; height: 1.5px; background: currentColor; top: 12px; left: 10px; transform: rotate(48deg); }
.icon-plus::before, .icon-plus::after, .icon-close::before, .icon-close::after { width: 11px; height: 1.5px; background: currentColor; top: 8px; left: 4px; }
.icon-plus::after { transform: rotate(90deg); }
.icon-close::before { transform: rotate(45deg); }
.icon-close::after { transform: rotate(-45deg); }

@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .container { width: calc(100% - 40px); }
  .home-feature:has(.leaderboard) { grid-template-columns: 1fr; }
  .hero { min-height: 360px; }
  .hero-image { width: 83%; }
}
@media (max-width: 790px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .container { width: calc(100% - 28px); }
  .site-header { position: static; }
  .header-content { min-height: 59px; gap: 12px; }
  .brand { font-size: 20px; gap: 6px; }
  .brand-logo { height: 34px; max-width: min(118px, 37vw); }
  .brand-icon { width: 30px; height: 30px; }
  .brand-icon::before { top: 7px; left: 6px; }
  .brand-icon::after { top: 15px; left: 17px; }
  .header-nav { margin-left: 0; gap: 8px; }
  .header-nav a { display: none; }
  .header-nav :is(.admin-nav, .home-nav) { display: inline-flex; font-size: 11px; white-space: nowrap; }
  .header-nav button, .cart-button, .theme-switch { font-size: 11px; }
  .cart-button, .theme-switch { gap: 4px; padding: 0 6px; min-height: 37px; }
  .cart-count { min-width: 18px; padding: 2px 3px; font-size: 11px; }
  .home-feature { margin-top: 13px; }
  .home-announcement { flex-direction: column; gap: 5px; }
  .hero { min-height: 360px; align-items: flex-start; padding: 21px 17px; border-radius: 14px; }
  .hero h1 { font-size: clamp(39px, 8.5vw, 62px); }
  .hero-text > p { margin-top: 12px; max-width: 260px; font-size: 13px; }
  .hero-actions { margin-top: 14px; }
  .hero-button { min-height: 38px; }
  .hero-image { width: 100%; height: 100%; object-position: 65% 65%; }
  .hero::after { background: linear-gradient(115deg, rgb(var(--hero-tint)) 3%, rgb(var(--hero-tint) / .95) 25%, rgb(var(--hero-tint) / .64) 53%, rgb(var(--hero-tint) / .14) 100%); }
  .catalog { padding: 25px 0 30px; scroll-margin-top: 12px; }
  .catalog-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .search { width: 100%; }
  .catalog-controls { align-items: flex-start; margin: 11px 0; }
  .filters { gap: 4px; }
  .filters button { min-height: 33px; font-size: 11px; padding-inline: 7px; }
  .sort select { max-width: 108px; min-height: 33px; font-size: 11px; padding-inline: 3px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-card { padding: 5px; border-radius: 10px; }
  .product-art { border-radius: 6px; }
  .product-info { padding: 8px 4px 3px; }
  .product-sample { font-size: 9px; }
  .product-info h4 { font-size: 14px; }
  .product-summary { font-size: 11px; margin-bottom: 8px; }
  .product-bottom { gap: 5px; padding-top: 7px; }
  .product-bottom .price { font-size: clamp(11px, 3.7vw, 14px); }
  .product-bottom .purchase-buttons { gap: 4px; }
  .product-bottom .button { min-height: 32px; padding: 3px; font-size: 11px; }
  .product-stamps .product-label { padding-inline: 5px; }
}
@media (max-width: 880px) {
  .store-header .header-content {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions" "nav profile";
    gap: 3px 10px; padding-block: 7px 3px;
  }
  .store-header .brand { grid-area: brand; justify-self: start; }
  .store-header .header-actions { grid-area: actions; }
  .store-header .header-nav { grid-area: nav; flex-wrap: wrap; column-gap: 15px; margin-left: 0; }
  .store-header .header-profile { grid-area: profile; justify-self: end; }
  .store-header .header-nav :is(a, button) { min-height: 29px; white-space: nowrap; }
}
@media (max-width: 500px) {
  .store-header .header-nav { column-gap: 9px; }
  .header-actions { gap: 5px; }
  .header-profile { max-width: min(124px, 38vw); padding-inline-start: 7px; }
  .header-customer-name { font-size: 12px; }
  .header-wallet { font-size: 11px; }
}
@media (max-width: 345px) {
  .cart-button .icon { display: none; }
  .brand { font-size: 18px; }
  .header-content { gap: 7px; }
  .hero { min-height: 310px; }
}
@media (max-width: 365px) {
  .header-content:has(.admin-nav) { flex-wrap: wrap; row-gap: 0; padding-block: 7px 3px; }
  .header-content:has(.admin-nav) .header-nav { order: 1; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
