:root {
  color-scheme: dark;
  --background: #0c0c16;
  --surface: #151524;
  --surface-2: #1d1b30;
  --text: #f8f5ff;
  --muted: #bcb8d1;
  --line: #39334e;
  --accent: #c4a8ff;
  --focus: #d8c4ff;
  --button: #a888f2;
  --button-text: #170e30;
  --glow: #262047;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
:root[data-theme="light"] {
  color-scheme: light;
  --background: #faf8ff;
  --surface: #fff;
  --surface-2: #eee9f7;
  --text: #17122a;
  --muted: #514860;
  --line: #ccc0dc;
  --accent: #513296;
  --focus: #6035a5;
  --button: #5b389d;
  --button-text: #fff;
  --glow: #e9ddff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); }
[hidden] { display: none !important; }
p { margin: 0 0 1em; color: var(--muted); }
h1, h2, h3 { margin: 0 0 .48em; font-weight: 690; line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2.5rem, 8vw, 5rem); overflow-wrap: anywhere; }
h2 { font-size: clamp(1.35rem, 3.2vw, 2rem); }
h3 { font-size: 1.3rem; }
strong, th { font-weight: 650; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--text); }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button, .utility { min-height: 44px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
.shell { width: min(100% - 2.5rem, 1200px); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner, .footer-inner, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar-inner { min-height: 72px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: .72rem; color: var(--text); font-size: .9rem; letter-spacing: .1em; font-weight: 800; text-decoration: none; white-space: nowrap; }
.wordmark-accent { color: var(--accent); }
.logomark { display: grid; place-items: center; width: 34px; height: 34px; background: url('/assets/brand-icon.svg') center / contain no-repeat; }
.topbar nav, .footer-inner nav, .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.1rem; }
.topbar nav a, .footer-inner nav a { color: var(--muted); text-decoration: none; padding-block: .6rem; }
.topbar nav a:hover, .topbar nav a[aria-current], .footer-inner nav a:hover { color: var(--text); text-decoration: underline; }
.toolbar { gap: .45rem; }
.utility { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .32rem .7rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; text-decoration: none; font-size: .88rem; }
#cart-count:not(:empty) { padding-inline: .35rem; border-radius: 99px; background: var(--button); color: var(--button-text); }
#theme { width: 44px; font-size: 1.2rem; }
main { padding-block: 2.5rem 5rem; min-height: 60vh; }
.hero { display: grid; grid-template-columns: .94fr 1.06fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(1.6rem, 4.4vw, 4rem); border: 1px solid var(--line); border-radius: 23px; background: radial-gradient(ellipse at 79% 30%, var(--glow), transparent 68%), var(--surface); }
.hero h1 { font-size: clamp(3rem, 5.4vw, 5rem); letter-spacing: -.065em; margin: .12em 0 .22em; }
.hero h1 span { color: var(--accent); }
.hero-art { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #101224; }
.hero-art img { width: 100%; }
figcaption { padding: .66rem .9rem; color: var(--muted); background: var(--surface); font-size: .81rem; }
.hero-art figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; background: #16142b; color: #e5dcff; }
.eyebrow { color: var(--accent); font-size: .77rem; font-weight: 730; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .7rem; }
.lede { max-width: 63ch; font-size: clamp(1rem, 2.5vw, 1.16rem); }
.actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-top: 1.25rem; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: .62rem 1rem; color: var(--button-text); background: var(--button); border: 1px solid transparent; border-radius: 9px; font-weight: 700; text-decoration: none; }
.button:hover { color: var(--button-text); filter: brightness(1.12); }
.button.secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.feature-section { margin-top: 2.65rem; }
.section-heading { margin-bottom: 1rem; flex-wrap: wrap; }
.section-heading :is(h2, p) { margin: 0; }
.page-heading { margin: .65rem 0 2rem; max-width: 900px; }
.page-heading h1 { font-size: clamp(2.35rem, 6vw, 4.45rem); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.catalog-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.panel, .product-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.panel { padding: clamp(1rem, 2.8vw, 1.6rem); }
.panel > :last-child, .card-body > :last-child { margin-bottom: 0; }
.product-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-art { display: block; background: #0e1121; border-bottom: 1px solid var(--line); }
.card-art img { width: 100%; height: auto; aspect-ratio: 1.67; object-fit: contain; }
.card-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; align-items: start; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.card-body small { color: var(--muted); }
.price { color: var(--text); font-weight: 750; margin-bottom: .25rem; }
.card-body .price { margin-top: auto; }
.card-actions, .gallery-controls, .inline-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .45rem; margin-top: .7rem; }
.card-actions button, .gallery-controls button, .table-wrap button, .cart-row button { color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .66rem; }
button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.catalog-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; gap: .85rem; padding: 1rem; margin-bottom: 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
label { display: block; color: var(--text); font-weight: 610; }
input:not([type="checkbox"]), select { display: block; width: 100%; min-height: 44px; margin-top: .35rem; padding: .45rem .65rem; background: var(--background); color: var(--text); border: 1px solid var(--line); border-radius: 8px; }
input::placeholder { color: var(--muted); }
label.check { display: flex; gap: .45rem; align-items: center; min-height: 44px; }
input[type="checkbox"] { inline-size: 1.15rem; block-size: 1.15rem; accent-color: var(--accent); }
.breadcrumbs, .muted { color: var(--muted); font-size: .91rem; }
.detail-layout { display: grid; gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
.detail-layout.with-art { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.gallery figure { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: #0e1121; }
.gallery img { width: 100%; max-height: 550px; object-fit: contain; }
.price-list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.price-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .42rem 0; border-bottom: 1px solid var(--line); }
.price-list strong { white-space: nowrap; }
[data-add] { margin-top: .7rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: pre-line; }
caption { text-align: left; color: var(--muted); margin: .65rem 0; }
th, td { min-width: 7.25rem; text-align: left; padding: .8rem; vertical-align: top; border: 1px solid var(--line); }
thead { background: var(--surface-2); }
.table-wrap button { margin-top: .4rem; }
.inline-controls select { width: auto; flex: 1; min-width: min(100%, 12rem); }
.cart-row { display: grid; grid-template-columns: 1fr minmax(5.5rem, 8rem) auto; align-items: center; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.cart-row p { margin: 0; }
#cart > .price { margin-top: 1rem; }
#calculator { padding: 0; border: 0; }
#calculator-result { font-weight: 700; }
summary { cursor: pointer; color: var(--accent); padding-block: .4rem; }
footer { padding-block: 2rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { align-items: start; }
.footer-inner p { font-size: .88rem; margin: .65rem 0 0; }
.sr-only, .skip-link:not(:focus) { position: absolute; margin: -1px; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 5; left: 1rem; top: 1rem; background: var(--surface); padding: .7rem; }
@media (max-width: 920px) {
  .topbar-inner { padding-block: .65rem; gap: .25rem .8rem; }
  .topbar nav { order: 3; width: 100%; }
}
@media (max-width: 730px) {
  .hero, .detail-layout.with-art { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2.9rem, 10vw, 5rem); }
  .footer-inner { flex-direction: column; }
  .catalog-controls { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 390px) {
  .shell { width: calc(100% - 1.5rem); }
  .topbar nav { gap: .15rem .65rem; font-size: .92rem; }
  .toolbar { gap: .25rem; }
  .utility { padding-inline: .45rem; }
  .wordmark { gap: .35rem; }
  .cart-row { grid-template-columns: 1fr auto; }
  .cart-row > div { grid-column: 1 / -1; }
}
.announcement { position: fixed; z-index: 2; right: 1rem; bottom: 1rem; max-width: min(30rem, calc(100% - 2rem)); padding: .65rem .9rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--accent); border-radius: 9px; pointer-events: none; }
.announcement:empty { padding: 0; border: 0; }
