:root {
  color-scheme: light;
  --ink: #101820;
  --muted: #5d6973;
  --line: #d9e1e7;
  --ice: #eaf6fb;
  --blue: #086f9a;
  --blue-dark: #064d6a;
  --danger: #9d2c2c;
  --success: #176b45;
  --surface: #ffffff;
  --background: #f3f6f8;
}

html { scrollbar-gutter: stable; }
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  caret-color: var(--blue);
}
::selection { color: #fff; background: var(--blue-dark); }

button, input, select, textarea { font: inherit; }
a { color: var(--blue-dark); }
.brand { color: var(--ink); font-size: 20px; font-weight: 900; letter-spacing: .02em; text-decoration: none; }

.test-banner {
  padding: 10px 20px;
  color: #fff;
  background: #8a2d20;
  text-align: center;
  font-weight: 700;
  letter-spacing: .02em;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: auto;
  padding: 22px 24px;
}
.site-header strong { font-size: 20px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-header nav a { font-weight: 700; text-underline-offset: 5px; }
.site-header nav a[aria-current="page"] { font-weight: 700; text-decoration-thickness: 2px; }
.admin-header { max-width: none; padding-inline: max(24px, calc((100vw - 1180px) / 2)); background: #17252d; color: #fff; }
.admin-header span { color: #c6d4db; font-size: 14px; }
.admin-shell { background: #e9eef1; }

.page {
  max-width: 1180px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.product-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  min-height: 650px;
  overflow: hidden;
  border-radius: 16px;
  background: #eaf3f5;
  box-shadow: 0 24px 60px rgba(16, 40, 52, .12);
}
.product-visual { position: relative; min-height: 650px; background: #dcebee; }
.product-visual img { position: absolute; object-fit: contain; filter: drop-shadow(0 22px 25px rgba(11, 34, 44, .18)); }
.helmet-main { inset: 8% 10% 24% 4%; width: 74%; height: 66%; }
.helmet-secondary { right: -2%; bottom: 2%; width: 48%; height: 46%; }
.product-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 6vw, 76px); }
.test-tag { align-self: flex-start; margin: 0 0 20px; padding: 5px 9px; border-radius: 999px; color: #0a526f; background: #d6edf5; font-size: 12px; font-weight: 800; }
.product-copy h1 { margin: 0; max-width: 10ch; font-size: clamp(42px, 5.4vw, 76px); line-height: .98; letter-spacing: -.035em; }
.product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin: 30px 0 18px; font-size: 36px; font-weight: 900; }
.product-price span { color: var(--muted); font-size: 14px; font-weight: 600; }
.product-lead { max-width: 42ch; margin: 0 0 26px; color: #34434c; font-size: 17px; }
.product-facts { display: grid; gap: 10px; margin: 0 0 30px; }
.product-facts div { display: grid; grid-template-columns: 64px 1fr; gap: 14px; }
.product-facts dt { color: var(--muted); }
.product-facts dd { margin: 0; font-weight: 700; }
.primary-action { align-self: flex-start; min-width: 180px; text-align: center; }
.store-note { max-width: 720px; margin: 52px auto 0; text-align: center; }
.store-note h2 { margin-bottom: 8px; }
.store-note p { color: var(--muted); }
.page-intro { max-width: 820px; margin: 20px 0 34px; }
.page-intro h1 { margin: 18px 0 8px; font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -.03em; }
.page-intro p { color: var(--muted); font-size: 17px; }
.back-link { font-weight: 750; text-underline-offset: 4px; }

.hero {
  padding: 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0e2632, #0b6788);
  color: #fff;
}
.hero h1 { max-width: 720px; margin: 4px 0 12px; font-size: clamp(32px, 6vw, 64px); line-height: 1.03; }
.hero p { max-width: 760px; color: #d8edf5; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 22px;
  margin-top: 22px;
}
.card {
  padding: 28px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(20, 45, 58, .09);
}
.card h2, .card h3 { margin-top: 0; }
.stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: 14px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b9c5cd;
  border-radius: 10px;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(8,111,154,.16); border-color: var(--blue); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading span { color: var(--muted); font-weight: 700; }
.sku-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sku-choice { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafb; }
.sku-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sku-identity strong, .sku-identity small { display: block; }
.sku-identity small { margin-top: 2px; color: var(--muted); }
.color-swatch { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; }
.color-swatch.black { background: #171a1c; }
.color-swatch.white { border: 1px solid #aeb9bf; background: #fff; }
.sku-quantity { display: grid; grid-template-columns: auto 62px; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.sku-quantity input { min-height: 40px; padding: 7px; text-align: center; }
.selected-items { display: grid; gap: 10px; }
.selected-items > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.selected-items p { margin: 0; }
.order-summary-card { align-self: start; position: sticky; top: 18px; }
.checkbox { display: flex; align-items: flex-start; gap: 9px; }
.checkbox input { width: 18px; min-height: 18px; margin-top: 3px; }

.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
button, .button {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--blue-dark);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}
button.secondary, .button.secondary { color: var(--blue-dark); background: var(--ice); }
button.danger { background: var(--danger); }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 3px solid rgba(8,111,154,.28); outline-offset: 3px; }
.button.disabled, .button[aria-disabled="true"] { pointer-events: none; cursor: not-allowed; opacity: .45; }

.catalog-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin: 28px 0 24px;
  padding: 34px 0 28px;
  border-bottom: 1px solid var(--line);
}
.catalog-intro h1 { max-width: 10ch; margin: 0 0 12px; font-size: clamp(42px, 6vw, 76px); line-height: 1; letter-spacing: -.035em; }
.catalog-intro p { max-width: 64ch; margin: 0; color: var(--muted); font-size: 17px; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.catalog-product { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 1.2fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.catalog-product.is-requested { outline: 4px solid rgba(8,111,154,.22); outline-offset: 3px; }
.catalog-product > img { width: 100%; height: 100%; min-height: 310px; object-fit: contain; padding: 18px; background: #eaf3f5; }
.catalog-product-body { display: flex; flex-direction: column; padding: 24px; }
.catalog-product h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.catalog-price { margin: 12px 0 6px; color: var(--blue-dark); font-size: 22px; font-weight: 900; }
.catalog-product .muted { margin: 0 0 16px; font-size: 13px; }
.catalog-sku-list { display: grid; gap: 8px; margin-bottom: 16px; }
.catalog-sku-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.catalog-sku-row strong, .catalog-sku-row small { display: block; }
.catalog-sku-row small { color: var(--muted); font-weight: 500; }
.catalog-sku-row input { width: 62px; min-height: 40px; padding: 7px; text-align: center; }
.catalog-product button { margin-top: auto; }
.unavailable-products { margin-top: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.unavailable-products h2 { margin-bottom: 6px; }
.unavailable-products p { max-width: 70ch; margin: 0; color: var(--muted); }

.shop-page .page { padding-bottom: 92px; }
.floating-cart {
  position: fixed;
  right: 24px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(340px, calc(100vw - 32px));
  min-height: 72px;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  color: #fff;
  background: #0e2632;
  box-shadow: 0 18px 42px rgba(14, 38, 50, .28);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(.16, 1, .3, 1), background-color 180ms ease;
}
.floating-cart:hover { transform: translateY(-2px); }
.floating-cart-icon {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 12px;
  color: var(--blue-dark);
  background: #d6edf5;
}
.floating-cart-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.floating-cart-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.floating-cart-badge.is-changing { display: grid; }
.floating-cart-copy { min-width: 0; }
.floating-cart-copy small, .floating-cart-copy strong { display: block; }
.floating-cart-copy small { color: #b9d5df; font-size: 12px; }
.floating-cart-copy strong { overflow: hidden; margin-top: 2px; text-overflow: ellipsis; white-space: nowrap; }
.floating-cart-action { padding-inline-start: 10px; color: #d8edf5; font-weight: 800; }
.floating-cart.is-receiving { animation: cart-dock-receive 520ms cubic-bezier(.16, 1, .3, 1); }
.cart-feedback {
  position: fixed;
  right: 24px;
  bottom: 106px;
  z-index: 41;
  width: min(390px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 16px 36px rgba(14, 38, 50, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.98);
  transition: opacity 180ms ease, transform 260ms cubic-bezier(.16, 1, .3, 1), visibility 0s linear 260ms;
  pointer-events: none;
}
.cart-feedback.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); transition-delay: 0s; }
.cart-flyer {
  position: fixed;
  z-index: 60;
  width: 76px;
  height: 76px;
  padding: 7px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(14, 38, 50, .2);
  object-fit: contain;
  pointer-events: none;
  will-change: transform, opacity;
}
.catalog-product.is-added { animation: catalog-product-added 540ms cubic-bezier(.16, 1, .3, 1); }
.catalog-product button.is-confirmed { background: var(--success); }
.is-changing { display: inline-block; animation: cart-value-change 420ms cubic-bezier(.16, 1, .3, 1); font-variant-numeric: tabular-nums; }

.cart-language-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cart-language-switch button { min-height: 40px; padding: 7px 13px; color: var(--muted); background: transparent; }
.cart-language-switch button[aria-pressed="true"] { color: #fff; background: var(--blue-dark); }
.cart-row.is-updated { animation: cart-row-updated 500ms cubic-bezier(.16, 1, .3, 1); }

@keyframes cart-dock-receive {
  0% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-5px) scale(1.025); background: var(--blue-dark); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes catalog-product-added {
  0% { transform: scale(1); outline: 0 solid rgba(23, 107, 69, 0); }
  42% { transform: scale(.992); outline: 4px solid rgba(23, 107, 69, .28); outline-offset: 2px; }
  100% { transform: scale(1); outline: 0 solid rgba(23, 107, 69, 0); outline-offset: 5px; }
}
@keyframes cart-value-change {
  0% { transform: scale(.82); color: var(--success); opacity: .55; }
  55% { transform: scale(1.18); color: var(--success); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes cart-row-updated {
  0% { transform: translateY(5px); background: rgba(23, 107, 69, .12); }
  100% { transform: translateY(0); background: transparent; }
}

.cart-items { display: grid; gap: 0; }
.cart-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-row:first-child { padding-top: 0; }
.cart-row img { width: 92px; height: 78px; object-fit: contain; padding: 6px; background: #edf4f6; }
.cart-row-copy strong, .cart-row-copy span, .cart-row-copy small { display: block; }
.cart-row-copy span { margin-top: 4px; color: #34434c; }
.cart-row-copy small { margin-top: 5px; color: var(--muted); }
.cart-row-controls { display: grid; grid-template-columns: 68px auto; align-items: center; gap: 8px; }
.cart-row-controls input { min-height: 40px; text-align: center; }
.text-action { min-height: 40px; padding: 7px 10px; color: var(--danger); background: transparent; }
.cart-empty { padding: 36px 8px; text-align: center; }
.cart-empty h3 { margin: 0 0 8px; font-size: 24px; }
.cart-empty p { margin: 0 0 20px; color: var(--muted); }

.summary-list { display: grid; gap: 10px; margin: 0; }
.summary-list div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; text-align: right; font-weight: 700; }
.total { font-size: 22px; }

.notice { padding: 14px 16px; border-radius: 12px; background: var(--ice); }
.notice.error { color: var(--danger); background: #fff0ef; }
.notice.success { color: var(--success); background: #eaf8f1; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: inherit; overflow-wrap: anywhere; }

.order-card { margin-top: 22px; }
.secure-link-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  margin: 22px 0 14px;
  padding: 22px;
  color: #fff;
  background: var(--blue-dark);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(6, 77, 106, .18);
}
.secure-link-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--blue-dark);
  background: #dff3fa;
  border-radius: 12px;
}
.secure-link-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.secure-link-callout h3 { margin: 0 0 8px; color: #fff; font-size: 22px; line-height: 1.25; }
.secure-link-callout p { max-width: 70ch; margin: 0; color: #d7edf5; line-height: 1.7; }
.secure-link-callout .secure-link-warning { margin-top: 10px; color: #fff; font-weight: 800; }
.secure-link-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; background: var(--ice); border-radius: 12px; }
.secure-link-field a { min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.55; }
.secure-link-field button { white-space: nowrap; }
.secure-link-status { min-height: 24px; margin: 8px 0 20px; color: var(--success); font-size: 14px; font-weight: 700; }
.secure-link-status.error { color: var(--danger); }
.payment-qr { display: block; width: min(280px, 100%); height: auto; margin: 16px auto; border: 12px solid #fff; border-radius: 12px; }
.payment-code { white-space: pre-wrap; word-break: break-all; background: #f5f5f5; padding: .75rem; border-radius: 6px; }
.order-status { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--ice); font-weight: 800; }
.order-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.order-detail div { padding: 12px; border-radius: 10px; background: #f7f9fa; }
.order-detail small { display: block; color: var(--muted); }

.admin-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eef4f6; white-space: nowrap; }
td .button-row { min-width: 240px; }
td button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
td { white-space: pre-line; }
.admin-editor { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }

.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.admin-tab {
  flex: 1 1 0;
  min-height: 48px;
  border: 0;
  color: var(--muted);
  background: transparent;
}
.admin-tab[aria-selected="true"] { color: var(--surface); background: var(--blue-dark); }
.admin-panel { margin-top: 12px; }
.admin-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.admin-panel-heading h2, .admin-panel-heading h3 { margin: 0; }
.admin-panel-heading .muted { max-width: 62ch; margin: 6px 0 0; }
.admin-eyebrow {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.inventory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: var(--line);
}
.inventory-summary > div { padding: 16px; background: var(--surface); }
.inventory-summary span { display: block; color: var(--muted); }
.inventory-summary strong { display: block; margin-top: 4px; font-size: 24px; }
.inventory-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.inventory-toolbar .field { width: min(420px, 100%); }
.inventory-toolbar p { margin: 0 0 10px; white-space: nowrap; }
.stock-badge { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); font-weight: 800; white-space: nowrap; }
.stock-ok { color: var(--blue-dark); background: var(--ice); }
.stock-low { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.stock-empty { color: var(--surface); border-color: var(--danger); background: var(--danger); }
.stock-positive { color: var(--success); font-weight: 800; }
.stock-negative { color: var(--danger); font-weight: 800; }
.inventory-editor { padding: 20px; border: 1px solid var(--line); background: var(--background); }
.inventory-editor h3 { margin: 0; }
.inventory-editor .muted { margin: 6px 0 18px; }
.inventory-editor small { color: var(--muted); }
.inventory-movement-fields { grid-template-columns: minmax(150px, .7fr) minmax(180px, 1fr) minmax(260px, 1.6fr); }
.inventory-history { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.inventory-history .admin-panel-heading { margin-bottom: 12px; }
.table-empty { padding-block: 28px; color: var(--muted); text-align: center; }

.customer-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.customer-footer > div { display: grid; gap: 6px; }
.customer-footer strong { color: var(--ink); letter-spacing: .03em; }
.customer-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; }
.customer-footer a { color: inherit; font-weight: 700; text-underline-offset: 4px; }

.terms-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
}
.terms-gate p { max-width: 62ch; margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.terms-gate a { flex: 0 0 auto; font-size: 13px; font-weight: 800; text-underline-offset: 4px; }

.policy-main { margin-bottom: 80px; }
.policy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 52px;
  padding: clamp(38px, 7vw, 82px);
  color: #fff;
  background: #0e2632;
  border-radius: 16px;
  box-shadow: 0 26px 60px rgba(14, 38, 50, .18);
}
.policy-hero h1 { max-width: 10ch; margin: 0 0 18px; font-size: clamp(48px, 7vw, 84px); line-height: 1; letter-spacing: -.035em; }
.policy-hero > div > p { max-width: 52ch; margin: 0; color: #cfe4eb; font-size: 17px; line-height: 1.75; }
.policy-contact-strip { display: grid; align-content: end; gap: 0; margin: 0; }
.policy-contact-strip div { padding: 15px 0; border-top: 1px solid rgba(255, 255, 255, .24); }
.policy-contact-strip dt { color: #9fc4d1; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.policy-contact-strip dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 800; }
.policy-contact-strip a { color: #fff; text-underline-offset: 4px; }

.policy-section { margin-top: 70px; }
.policy-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.policy-section-heading h2, .policy-copy-section > h2, .policy-resolution h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -.025em; }
.policy-status-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); background: var(--surface); }
.policy-status-flow article { min-width: 0; padding: 28px; border-right: 1px solid var(--line); }
.policy-status-flow article:last-child { border-right: 0; }
.policy-state-marker { display: block; color: var(--blue); font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.policy-state-status { display: inline-block; margin-top: 26px; color: var(--muted); font-size: 13px; }
.policy-status-flow h3 { margin: 7px 0 10px; font-size: 23px; line-height: 1.2; }
.policy-status-flow p { margin: 0; color: #3d4b54; line-height: 1.7; }

.policy-reading-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(34px, 7vw, 86px); margin-top: 86px; }
.policy-toc { position: sticky; top: 24px; align-self: start; display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--ink); }
.policy-toc strong { font-size: 13px; }
.policy-toc a { color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.45; text-underline-offset: 4px; }
.policy-copy-section { max-width: 780px; scroll-margin-top: 24px; }
.policy-copy-section + .policy-copy-section { margin-top: 92px; }
.policy-lead { max-width: 68ch; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.75; }
.policy-copy-list { margin-top: 36px; }
.policy-copy-list article { padding: 28px 0; border-top: 1px solid var(--line); }
.policy-copy-list article:last-child { border-bottom: 1px solid var(--line); }
.policy-copy-list h3 { margin: 0 0 12px; font-size: 21px; }
.policy-copy-list p { max-width: 72ch; margin: 10px 0 0; color: #394750; line-height: 1.8; }
.policy-resolution { display: flex; align-items: end; justify-content: space-between; gap: 34px; margin-top: 86px; padding: 42px; color: #fff; background: var(--blue-dark); border-radius: 16px; }
.policy-resolution h2 { color: #fff; }
.policy-resolution p { max-width: 58ch; margin: 12px 0 0; color: #cfe4eb; }
.policy-resolution .button { color: var(--blue-dark); background: #fff; }
.policy-resolution .button.secondary { color: #fff; background: transparent; outline: 1px solid rgba(255, 255, 255, .46); outline-offset: -1px; }

html.dialog-open { scrollbar-gutter: auto; }
body.dialog-open { overflow: hidden; }
.purchase-terms-dialog {
  width: min(920px, calc(100vw - 32px));
  max-width: none;
  height: min(860px, calc(100dvh - 32px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 36px 90px rgba(5, 22, 30, .36);
}
.purchase-terms-dialog::backdrop { background: rgba(8, 20, 27, .72); }
.purchase-terms-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; }
.purchase-terms-header { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding: 26px 28px 20px; }
.purchase-terms-header h2 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.025em; }
.purchase-terms-header p { max-width: 62ch; margin: 8px 0 0; color: var(--muted); }
.dialog-close { display: grid; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; place-items: center; color: var(--ink); background: var(--background); }
.dialog-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.terms-progress-wrap { padding: 0 28px 18px; border-bottom: 1px solid var(--line); }
.terms-progress-copy { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.terms-progress-copy strong { color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.terms-progress-track { height: 4px; overflow: hidden; background: var(--line); }
.terms-progress-track span { display: block; width: 0; height: 100%; background: var(--blue); }
.terms-scroll { min-height: 0; overflow-y: auto; padding: 12px 28px 32px; outline: none; scrollbar-color: var(--blue) #e3ebef; scrollbar-width: thin; }
.terms-scroll:focus-visible { box-shadow: inset 0 0 0 3px rgba(8, 111, 154, .26); }
.terms-group + .terms-group { margin-top: 38px; }
.terms-group-title { margin: 18px 0 4px; color: var(--blue-dark); font-size: 22px; line-height: 1.25; }
.terms-sections article { padding: 24px 0; border-bottom: 1px solid var(--line); }
.terms-sections article h3 { margin: 0 0 10px; font-size: 19px; }
.terms-sections p { max-width: 74ch; margin: 9px 0 0; color: #394750; line-height: 1.78; }
.terms-rights-note { margin-top: 26px; padding: 24px; color: #fff; background: #0e2632; border-radius: 12px; }
.terms-rights-note p { margin: 8px 0 0; color: #cfe4eb; line-height: 1.7; }
.purchase-terms-footer { padding: 20px 28px 24px; border-top: 1px solid var(--line); background: #f8fafb; }
.terms-read-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.terms-read-state > span:first-child { width: 9px; height: 9px; border-radius: 50%; background: #a9b3b9; }
.terms-read-state > span:first-child.is-complete { background: var(--success); }
.terms-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; line-height: 1.55; }
.terms-consent input { flex: 0 0 auto; width: 19px; min-height: 19px; margin-top: 2px; accent-color: var(--blue-dark); }
.terms-dialog-actions { justify-content: flex-end; margin-top: 18px; }
.terms-dialog-actions button { min-width: 190px; }

@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 18px; }
  .page { padding: 0 14px; }
  .hero { padding: 28px 20px; border-radius: 18px; }
  .product-stage { grid-template-columns: 1fr; min-height: 0; }
  .product-visual { min-height: 360px; }
  .helmet-main { inset: 3% 12% 18% 2%; width: 76%; height: 74%; }
  .helmet-secondary { right: -5%; bottom: 0; width: 52%; height: 50%; }
  .product-copy { padding: 30px 22px 36px; }
  .product-copy h1 { font-size: 44px; }
  .product-price { margin-top: 24px; font-size: 32px; }
  .layout { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .form-grid, .order-detail { grid-template-columns: 1fr; }
  .sku-grid { grid-template-columns: 1fr; }
  .order-summary-card { position: static; }
  .field.full { grid-column: auto; }
  .button-row > * { flex: 1 1 150px; text-align: center; }
  .catalog-intro { align-items: stretch; flex-direction: column; }
  .catalog-intro .primary-action { align-self: stretch; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-product { grid-template-columns: 1fr; }
  .catalog-product > img { min-height: 260px; max-height: 320px; }
  .cart-row { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .cart-row img { width: 72px; height: 64px; }
  .cart-row-controls { grid-column: 2; justify-content: start; }
  .shop-page .page { padding-bottom: 118px; }
  .floating-cart { right: 14px; bottom: max(12px, env(safe-area-inset-bottom)); left: 14px; width: auto; }
  .cart-feedback { right: 14px; bottom: calc(94px + env(safe-area-inset-bottom)); left: 14px; width: auto; }
  .admin-tabs { position: sticky; top: 0; z-index: 2; }
  .admin-panel-heading, .inventory-toolbar { align-items: stretch; flex-direction: column; }
  .inventory-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-movement-fields { grid-template-columns: 1fr; }
  .inventory-toolbar p { margin: 0; }
  .inventory-toolbar .field { width: 100%; }
  .customer-footer { align-items: flex-start; flex-direction: column; padding-inline: 18px; }
  .customer-footer nav { justify-content: flex-start; }
  .terms-gate { align-items: flex-start; flex-direction: column; }
  .secure-link-callout { grid-template-columns: 1fr; padding: 20px; }
  .secure-link-icon { width: 44px; height: 44px; }
  .secure-link-field { grid-template-columns: 1fr; }
  .secure-link-field button { width: 100%; white-space: normal; }
  .policy-main { margin-bottom: 54px; }
  .policy-hero { grid-template-columns: 1fr; gap: 36px; padding: 34px 24px; }
  .policy-hero h1 { font-size: 48px; }
  .policy-section { margin-top: 54px; }
  .policy-section-heading { align-items: flex-start; flex-direction: column; }
  .policy-section-heading .button { width: 100%; text-align: center; }
  .policy-status-flow { grid-template-columns: 1fr; }
  .policy-status-flow article { border-right: 0; border-bottom: 1px solid var(--line); }
  .policy-status-flow article:last-child { border-bottom: 0; }
  .policy-reading-layout { grid-template-columns: 1fr; margin-top: 58px; }
  .policy-toc { position: static; }
  .policy-copy-section + .policy-copy-section { margin-top: 68px; }
  .policy-resolution { align-items: stretch; flex-direction: column; margin-top: 62px; padding: 28px 22px; }
  .policy-resolution .button-row > * { width: 100%; flex-basis: 100%; }
  .purchase-terms-dialog { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; }
  .purchase-terms-header { padding: 20px 18px 16px; }
  .purchase-terms-header h2 { font-size: 24px; }
  .terms-progress-wrap { padding: 0 18px 14px; }
  .terms-scroll { padding: 8px 18px 24px; }
  .purchase-terms-footer { padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
  .terms-dialog-actions { display: grid; grid-template-columns: 1fr; }
  .terms-dialog-actions button { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-cart, .cart-feedback { transition-duration: 1ms; }
  .cart-feedback { transform: none; }
  .cart-flyer { display: none; }
  .floating-cart.is-receiving, .catalog-product.is-added, .cart-row.is-updated, .is-changing { animation: none; }
  .floating-cart.is-receiving { background: var(--blue); }
  .catalog-product button.is-confirmed { background: var(--success); }
}
