:root {
  color-scheme: dark;
  --ink: #11110f;
  --panel: #191917;
  --paper: #f4eddd;
  --muted: #b4aca0;
  --line: #3b3933;
  --accent: #f36952;
  --mono: 'Courier New', monospace;
  --display: 'Arial Narrow', 'Liberation Sans Narrow', 'Franklin Gothic Heavy', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 1rem/1.5 'Trebuchet MS', sans-serif; }
button, a, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin: 0; }
.frame { width: min(1220px, calc(100% - 88px)); margin-inline: auto; }
.label { font: 700 .75rem/1.35 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.topbar { position: sticky; top: 0; z-index: 2; background: var(--ink); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 900 1rem/1 var(--display); letter-spacing: .08em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 31px; background: var(--accent); color: var(--ink); font: 900 .95rem/1 var(--mono); letter-spacing: -.09em; }
.top-caption { color: var(--muted); }
.cart-toggle { display: inline-flex; align-items: center; gap: 9px; padding: 6px 9px 6px 12px; border: 1px solid var(--line); background: var(--panel); color: var(--paper); font: 700 .75rem/1 var(--mono); text-transform: uppercase; }
.cart-toggle:hover { border-color: var(--accent); }
.cart-toggle span { display: grid; place-items: center; min-width: 26px; min-height: 26px; padding-inline: 4px; background: var(--accent); color: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: clamp(24px, 4.5vw, 68px); padding-block: clamp(36px, 6.5vw, 96px); align-items: stretch; border-bottom: 1px solid var(--line); }
.hero-copy { align-self: center; }
.issue { display: flex; align-items: center; gap: 9px; color: var(--accent); }
.issue span { width: 8px; aspect-ratio: 1; background: currentColor; }
h1 { margin-block: 17px 19px; font: 950 clamp(2rem, 5.35vw, 5rem)/.92 var(--display); letter-spacing: -.075em; }
h1 span { display: block; }
h1 span + span { color: var(--accent); }
.hero-description { color: var(--muted); margin-bottom: 26px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); color: var(--paper); background: transparent; text-decoration: none; font: 700 .78rem/1.3 var(--mono); text-transform: uppercase; }
.button:hover { border-color: var(--accent); color: var(--accent); }
.button.primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.button.primary:hover { background: var(--paper); border-color: var(--paper); }
.button span { font-size: 1.05rem; }
.button.fill { width: 100%; }
.hero-plate { position: relative; min-height: 270px; display: grid; align-content: space-between; overflow: hidden; isolation: isolate; color: var(--ink); border: 1px solid #c95745; background: repeating-linear-gradient(0deg, transparent 0 3px, #11110f10 3px 4px), var(--accent); padding: 13px; }
.hero-plate::before { content: ''; position: absolute; inset: 34px 13px; border: 1px solid #11110f64; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), #11110f30 calc(25% - 1px) 25%); z-index: -1; }
.plate-top, .plate-bottom { display: flex; justify-content: space-between; gap: 8px; font-size: .66rem; }
.plate-number { justify-self: center; font: 950 clamp(9rem, 17vw, 16rem)/.77 var(--display); letter-spacing: -.13em; padding-right: .13em; }
.wire { position: absolute; inset: 41% -2% auto; width: 104%; transform: rotate(-12deg); color: var(--paper); }

.catalog-section { padding-block: 37px 66px; scroll-margin-top: 77px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-index { color: var(--accent); margin-bottom: 6px; }
h2 { font: 900 clamp(1.65rem, 4vw, 3rem)/1 var(--display); letter-spacing: -.055em; }
.text-button { min-height: 38px; padding: 3px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--paper); font: 700 .75rem/1.4 var(--mono); text-align: right; text-transform: uppercase; }
.text-button span { color: var(--accent); }
.text-button:hover { border-color: var(--accent); }
.catalog-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block: 20px 15px; }
.filters { display: flex; gap: 5px; flex-wrap: wrap; }
.filters button { min-height: 38px; padding: 6px 11px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 700 .74rem/1.2 var(--mono); text-transform: uppercase; }
.filters button:hover { border-color: var(--accent); color: var(--paper); }
.filters button[aria-pressed='true'] { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.result-count { color: var(--muted); flex-shrink: 0; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel); }
.card:hover { border-color: #756a5e; }
.card-art { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: #eef0ef; border-bottom: 1px solid var(--line); }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.card-status { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 5px 7px; background: var(--ink); color: var(--paper); font-size: .62rem; }
.card-status.preorder { color: var(--ink); background: var(--accent); }
.card-info { display: flex; flex: 1; flex-direction: column; gap: 7px; padding: 12px; }
.card h3 { font-size: .94rem; line-height: 1.3; }
.card-tag { color: var(--muted); font-size: .78rem; }
.card-price { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-top: auto; font-weight: 800; }
.card-price s { color: var(--muted); font-size: .75rem; font-weight: 400; }
.footer { border-top: 1px solid var(--line); color: var(--muted); padding-block: 20px max(20px, env(safe-area-inset-bottom)); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footer a:hover { color: var(--accent); }

dialog { width: min(540px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); color: var(--paper); }
dialog::backdrop { background: #11110fdf; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-content { position: relative; padding: clamp(16px, 4vw, 27px); }
.dialog-content h2 { margin-right: 30px; font-size: clamp(1.45rem, 4vw, 2.6rem); }
.dialog-close { position: absolute; top: 10px; right: 10px; }
.dialog-close button, .remove-item { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--ink); color: var(--paper); font-size: 1.25rem; }
.dialog-close button:hover, .remove-item:hover { color: var(--accent); border-color: var(--accent); }
#product-media { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: center; gap: 6px; margin-top: 12px; }
#product-media img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--ink); }
#product-media img:first-child { aspect-ratio: 5 / 4; background: #eef0ef; }
.description { color: var(--muted); margin-block: 12px; }
.description.small { font-size: .81rem; }
.text-link { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.text-link:hover { color: var(--accent); }
.dialog-price { font-weight: 900; margin-bottom: 13px; }
fieldset { padding: 0; border: 0; margin: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.size-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.size-options label { display: grid; cursor: pointer; }
.size-options input, .size-options span { grid-area: 1 / 1; }
.size-options input { opacity: 0; }
.size-options span { display: grid; place-items: center; min-height: 42px; border: 1px solid var(--line); font: 700 .9rem/1 var(--mono); }
.size-options input:checked + span { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.size-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; text-align: center; }
caption { text-align: left; color: var(--muted); margin-bottom: 4px; }
td, th { border: 1px solid var(--line); padding: 6px; }
th { background: var(--ink); }
.cart-items { list-style: none; padding: 0; margin-block: 12px; }
.cart-items li { padding-block: 9px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cart-items small { display: block; color: var(--muted); }
.remove-item { flex: 0 0 auto; }
.cart-total { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 13px; }
.cart-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 6px; }
#copy-status:empty { margin: 0; }
.order-fallback { display: grid; gap: 6px; color: var(--muted); font-size: .81rem; }
.order-fallback textarea { width: 100%; padding: 8px; resize: vertical; border: 1px solid var(--line); background: var(--ink); color: var(--paper); font: inherit; }
.order-fallback textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toast { position: fixed; z-index: 3; bottom: 16px; inset-inline-end: max(16px, calc((100vw - 1220px) / 2)); padding: 9px 13px; color: var(--ink); background: var(--paper); font-size: .85rem; }
.toast:empty { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; padding: 0; }

@media (max-width: 850px) {
  .frame { width: calc(100% - 42px); }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
  .hero-plate { min-height: 235px; }
}

@media (max-width: 590px) {
  .frame { width: calc(100% - 28px); }
  .topbar-inner { min-height: 56px; }
  .top-caption { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 25px; }
  h1 { font-size: clamp(2.05rem, 10.35vw, 3.6rem); }
  .hero-plate { min-height: 145px; max-height: 185px; }
  .plate-number { font-size: clamp(6rem, 23vw, 8rem); }
  .wire { width: 80%; inset: 30% 10% auto; }
  .catalog-section { padding-block: 26px 40px; scroll-margin-top: 68px; }
  .catalog-grid { gap: 7px; }
  .card-info { padding: 8px; }
  .card h3 { font-size: .83rem; }
  .card .button { font-size: .62rem; gap: 4px; padding-inline: 6px; }
  .result-count { font-size: .63rem; }
  .card-status { inset: 8px auto auto 8px; font-size: .56rem; }
  .footer-inner { font-size: .62rem; }
}
