@font-face {
  font-family: Inter;
  src: url("/assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --panel: #fff;
  --raised: #f2f2f3;
  --hover: #eaeaec;
  --line: #e2e2e5;
  --input-line: #bfbfc5;
  --text: #16171a;
  --muted: #56575f;
  --quiet: #63646d;
  --primary: #111214;
  --on-primary: #fff;
  --focus: #16171a;
  --danger: #a53d3d;
  --success: #35604c;
  --warning: #765631;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 4%);
  --shadow-float: 0 12px 32px rgb(0 0 0 / 12%);
  --radius-control: 8px;
  --radius-input: 10px;
  --radius-card: 16px;
  --radius-feature: 20px;
  --sidebar-width: 264px;
  --page-gutter: 28px;
  --topbar-height: 56px;
  --small-control: 36px;
  --control-height: 40px;
  --tap-target: 36px;
  font: 400 14px/22px Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121214;
  --panel: #19191b;
  --raised: #222225;
  --hover: #2b2b30;
  --line: #353539;
  --input-line: #626268;
  --text: #f3f3f4;
  --muted: #b4b4bb;
  --quiet: #a6a6ae;
  --primary: #f3f3f4;
  --on-primary: #101113;
  --focus: #f3f3f4;
  --danger: #f0adad;
  --success: #a6cbb7;
  --warning: #dfc5a5;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1 { font-size: 32px; line-height: 40px; font-weight: 700; }
h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .24em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .48; }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--focus); outline-offset: 4px; }
small, .caption { color: var(--quiet); font-size: 12px; line-height: 18px; font-weight: 400; }
small { display: block; }
code { font: .9em ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.skip-link { position: fixed; z-index: 30; inset: 8px auto auto 8px; padding: 8px 16px; border-radius: 8px; background: var(--panel); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.loading { margin: 10vh auto; text-align: center; color: var(--muted); }

.app-shell { height: 100dvh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); overflow: hidden; }
.app-shell.menu-collapsed { --sidebar-width: 72px; }
.main-content { min-width: 0; overflow: auto; overscroll-behavior: contain; scroll-padding-block: calc(var(--topbar-height) + 16px) 24px; }
.workspace { min-width: 0; display: grid; align-content: start; gap: 20px; padding: 20px var(--page-gutter) 32px; }
.topbar {
  position: sticky;
  z-index: 3;
  top: 0;
  min-height: var(--topbar-height);
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.topbar-entry, .topbar-actions, .actions, .button-row, .filter-bar { display: flex; align-items: center; gap: 8px; }
.topbar-entry { min-width: 0; }
.topbar-label { color: var(--text); font-size: 14px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.actions, .button-row, .filter-bar { flex-wrap: wrap; }
.workspace-actions { justify-content: flex-end; }
.topbar-actions { flex-shrink: 0; }
.env-label { color: var(--quiet); font-size: 12px; line-height: 18px; white-space: nowrap; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 var(--tap-target); width: var(--tap-target); height: var(--tap-target); padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); transition: background 150ms ease-out, color 150ms ease-out; }
.icon-button svg { width: 20px; height: 20px; }
.icon-button:hover { background: var(--hover); color: var(--text); }
.theme-toggle svg:last-child, [data-theme="dark"] .theme-toggle svg:first-child { display: none; }
[data-theme="dark"] .theme-toggle svg:last-child { display: block; }
.brand { min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 18px; line-height: 24px; font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; color: var(--on-primary); background: var(--primary); }
.brand-mark svg { width: 20px; height: 20px; }
.agent-brand-lockup { display: flex; align-items: center; gap: 8px; }
.agent-brand-lockup::before,
.agent-brand-lockup::after {
  content: "";
  height: 40px;
  background-image: url("/assets/brand-wanzhuan.png");
  background-repeat: no-repeat;
}
.agent-brand-lockup::before { width: 60px; background-position: left center; background-size: 124px auto; }
.agent-brand-lockup::after { width: 90px; background-position: right center; background-size: 192px auto; }
[data-theme="dark"] .agent-brand-lockup::after { filter: invert(1) hue-rotate(180deg); }

.menu-panel { display: flex; flex-direction: column; min-height: 0; padding: 16px; border-inline-end: 1px solid var(--line); background: var(--panel); overflow: auto; }
.menu-head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.menu-control { border-color: var(--line); }
.menu-shortcuts { display: grid; flex-shrink: 0; gap: 12px; margin-top: 16px; }
.menu-balance { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 96px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-card); color: var(--muted); font-size: 12px; line-height: 18px; }
.menu-balance:hover { background: var(--raised); text-decoration: none; }
.menu-balance > div { min-width: 0; }
.menu-balance strong { display: block; color: var(--text); font-size: 24px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.menu-balance b { color: var(--text); font-variant-numeric: tabular-nums; }
.menu-balance-icon { display: none; width: 18px; height: 18px; }
.menu-primary svg { width: 18px; height: 18px; }
.workspace-menu { display: grid; flex: 1; align-content: start; gap: 16px; min-height: 48px; margin-top: 20px; padding-bottom: 16px; overflow: auto; scrollbar-width: thin; }
.menu-group, .menu-children { display: grid; gap: 4px; }
.menu-group + .menu-group { padding-top: 16px; border-top: 1px solid var(--line); }
.menu-row { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; line-height: 20px; font-weight: 500; transition: background 150ms ease-out, color 150ms ease-out; }
.menu-row:hover { color: var(--text); background: var(--raised); text-decoration: none; }
.menu-row:focus-visible { outline-offset: -4px; }
.menu-row[aria-current="page"], .menu-section[data-active] > summary { background: var(--hover); color: var(--text); font-weight: 600; }
.menu-label { min-width: 0; overflow-wrap: anywhere; }
.menu-section > summary { cursor: pointer; list-style: none; }
.menu-section > summary::-webkit-details-marker { display: none; }
.menu-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; }
.menu-icon svg { width: 18px; height: 18px; }
.menu-row[aria-current="page"] > .menu-icon, .menu-section[data-active] > summary > .menu-icon { background: var(--primary); color: var(--on-primary); }
.menu-row > .chevron { margin-inline-start: auto; color: var(--quiet); }
.menu-section[open] > summary .chevron { transform: rotate(180deg); }
.menu-children { margin: 4px 0 4px 28px; padding-inline-start: 8px; border-inline-start: 1px solid var(--line); }
.menu-children .menu-row { min-height: var(--tap-target); font-size: 13px; }
.menu-children .menu-icon { display: none; }
.menu-footer { flex-shrink: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-account { min-height: 64px; display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.account-avatar { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: var(--raised); font-weight: 600; }
.account-info { flex: 1; min-width: 0; }
.account-info strong, .account-info small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-info strong { font: inherit; font-weight: 600; }
.menu-open, .menu-drawer { display: none; }

@media (width > 768px) {
  .menu-collapsed .menu-panel { padding-inline: 12px; }
  .menu-collapsed .menu-head { justify-content: center; }
  .menu-collapsed .menu-collapse svg { transform: rotate(180deg); }
  .menu-collapsed :is(.menu-head .brand, .menu-children, .menu-balance > div, .menu-balance > .chevron, .menu-row > .chevron, .account-avatar, .account-info) { display: none; }
  .menu-collapsed .menu-label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .menu-collapsed :is(.menu-balance, .menu-row, .menu-primary, .sidebar-account) { justify-content: center; padding-inline: 0; }
  .menu-collapsed .menu-balance { min-height: 44px; padding-block: 0; border-radius: 10px; }
  .menu-collapsed .menu-balance-icon { display: block; }
  .menu-collapsed .sidebar-account { border: 0; min-height: 40px; padding-block: 0; }
}

.section-heading, .list-heading, .dialog-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.login-heading p, .section-heading p { margin-top: 4px; color: var(--muted); }
.section-heading, .panel > h2 { margin-bottom: 12px; }
.section-heading-flat, .section-heading .filter-bar { margin: 0; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel); box-shadow: var(--shadow-card); }
.muted { color: var(--muted); }
.accent { color: var(--text); font-weight: 600; }
.danger, .form-message { color: var(--danger); }
.notice, .empty-state { padding: 12px 16px; border-radius: 10px; color: var(--muted); background: var(--raised); overflow-wrap: anywhere; }
.empty-state { margin: 8px 0 0; }
.list-panel > .empty-state { margin: 16px 20px; }
.text-button { display: inline-flex; align-items: center; gap: 4px; min-width: var(--tap-target); min-height: var(--tap-target); padding: 4px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); text-align: start; font-size: 13px; line-height: 20px; font-weight: 500; }
.text-button:hover, .inline-link:hover { color: var(--text); text-decoration: underline; }
.text-button:hover.danger { color: var(--danger); }
.text-button:disabled { text-decoration: none; }
.inline-link { display: inline-flex; align-items: center; min-height: var(--tap-target); text-decoration: underline; text-underline-offset: .24em; }
.chevron { display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; }
.chevron-end { transform: rotate(-90deg); }
.metrics-grid, .quick-grid, .dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-grid.commission-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { position: relative; display: grid; min-height: 104px; align-content: start; gap: 8px; }
.metric span, .commission-totals h2 { color: var(--muted); font-size: 13px; line-height: 20px; font-weight: 400; }
.metric strong, .commission-totals strong { display: block; color: var(--text); font-size: 32px; line-height: 40px; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metric small { display: inline; }
.metric strong small { font-size: 14px; }
.metric > .chevron { position: absolute; inset: 20px 20px auto auto; color: var(--quiet); }
.metric:has(> .chevron) > span { padding-inline-end: 20px; }
.commission-totals h2 { margin-bottom: 8px; }

.dashboard-grid { display: grid; gap: 20px; }
.dashboard-announcement { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; min-height: 72px; align-items: center; padding: 12px 16px; }
.dashboard-announcement h2 { font-size: 15px; line-height: 22px; font-weight: 600; }
.dashboard-guide { column-gap: 16px; }
.dashboard-guide .caption { margin-top: 4px; }
.dashboard-guide .btn { border-color: var(--line); white-space: nowrap; }
.dashboard-guide-icon { border: 1px solid var(--line); color: var(--primary); }
.dashboard-banner, .customer-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 128px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; border: 1px solid #2e2e32; border-radius: 20px; color: #fff; background: #111214; }
.dashboard-banner::before { content: ""; z-index: -1; position: absolute; inset: -48px -16px -48px 45%; background: repeating-linear-gradient(120deg, transparent 0 24px, rgb(255 255 255 / 5%) 24px 25px, transparent 25px 48px); pointer-events: none; }
.dashboard-banner h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.dashboard-banner p, .customer-hero p { margin-top: 4px; color: #d0d0d4; overflow-wrap: anywhere; }
.dashboard-banner .btn { flex: 0 0 auto; border-radius: 999px; color: #111214; background: #fff; }
.dashboard-banner .btn:hover { background: #ececee; }
.dashboard-banner .btn:focus-visible { outline-color: #fff; }
.dashboard-products, .dashboard-bottom { margin-top: 8px; }
.dashboard-product-heading { min-height: 32px; }
.dashboard-product-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.dashboard-products .section-heading { margin-bottom: 16px; }
.dashboard-trend, .dashboard-trend-totals { display: grid; gap: 4px; }
.dashboard-trend-label { font-size: 13px; font-weight: 600; }
.dashboard-trend-totals { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; color: var(--muted); font-size: 13px; line-height: 20px; }
.dashboard-trend-totals strong { color: var(--text); font-variant-numeric: tabular-nums; }
.dashboard-trend svg { display: block; width: 100%; height: 64px; overflow: visible; }
.trend-axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-fill { fill: color-mix(in srgb, var(--text) 12%, transparent); }
.trend-line { fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dashboard-trend-dates { display: flex; justify-content: space-between; gap: 4px; color: var(--muted); font-size: 12px; line-height: 18px; }
.dashboard-tasks .setting-list { padding: 0; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 208px; overflow: hidden; }
.product-watermark { z-index: -1; position: absolute; inset: -8px -16px auto auto; width: 96px; height: 96px; opacity: .07; pointer-events: none; }
img.product-watermark { filter: grayscale(1); }
.product-card-head { display: flex; align-items: center; gap: 12px; }
.product-card :is(h2, h3) { font: inherit; font-size: 16px; line-height: 24px; font-weight: 600; }
.product-logo { flex: 0 0 44px; border-radius: 12px; object-fit: contain; }
.product-icon, .dashboard-guide-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--raised); }
.product-icon svg, .dashboard-guide-icon svg { width: 22px; height: 22px; }
.product-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
[data-dashboard-product] .product-description { min-height: 40px; }
.product-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; margin-bottom: 12px; }
.product-card-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.product-card-price { display: grid; min-width: 0; overflow-wrap: anywhere; }
.product-card-price strong, .storefront-product-action strong { font-size: 20px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.product-card-footer .btn { white-space: nowrap; }
.product-card-footer .chevron { width: 16px; height: 16px; flex-basis: 16px; }
.catalog-grid .product-card {
  container-type: inline-size;
  padding: 0 16px 16px;
}
.catalog-cover {
  display: grid;
  place-items: start center;
  height: 152px;
  margin: 0 -16px 16px;
  padding: 20px 16px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 20%, var(--panel), transparent 78%),
    var(--raised);
}
.catalog-cover[data-artwork="notes"], .catalog-cover[data-artwork="knowledge"] {
  background:
    radial-gradient(ellipse at 52% 32%, #43444b, transparent 78%),
    #222327;
}
.catalog-cover-image {
  width: 100%;
  height: 100%;
  border: 1px solid var(--input-line);
  border-radius: 8px 8px 0 0;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
}
.catalog-grid .product-description { min-height: 40px; }
.catalog-grid .product-card-meta { margin-bottom: 16px; }
.catalog-grid .product-card-footer { padding-top: 12px; }
.catalog-workflow {
  container-type: inline-size;
  padding: 16px 20px 20px;
  border: 1px solid #2e2e32;
  border-radius: var(--radius-feature);
  color: #fff;
  background: radial-gradient(ellipse at 90% 0%, #27282d, transparent 70%), #111214;
}
.catalog-workflow-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 12px;
}
.catalog-workflow-header .text-button { padding-inline: 8px; color: #e3e3e6; }
.catalog-workflow-header .text-button:hover { color: #fff; }
.catalog-workflow-header svg { width: 16px; height: 16px; }
.catalog-workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.catalog-workflow-steps li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.catalog-workflow-steps li > .chevron { color: #93949e; }
.catalog-workflow-steps a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 64px;
  padding: 8px 12px;
  border: 1px solid #414248;
  border-radius: 12px;
  background: rgb(255 255 255 / 5%);
  transition: background 150ms ease-out, border-color 150ms ease-out;
}
.catalog-workflow-steps a:hover { border-color: #72737e; background: rgb(255 255 255 / 12%); text-decoration: none; }
.catalog-workflow a:focus-visible { outline-color: #fff; outline-offset: 2px; }
.catalog-step-number {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  height: 28px;
  border-radius: 8px;
  background: #f3f3f4;
  color: #16171a;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.catalog-step-copy { min-width: 0; overflow-wrap: anywhere; }
.catalog-step-copy strong { font-weight: 600; }
.catalog-step-copy small { color: #c9c9cf; }
@container (width < 760px) {
  .catalog-workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-workflow-steps li > .chevron { display: none; }
}
@container (width < 340px) {
  .catalog-workflow-steps a { gap: 8px; padding-inline: 8px; }
  .catalog-step-number { flex-basis: 20px; height: 20px; border-radius: 4px; font-size: 12px; }
}
@container (width < 260px) {
  .catalog-workflow-steps { grid-template-columns: minmax(0, 1fr); }
}
@container (width < 208px) {
  .catalog-grid .product-card-footer { grid-template-columns: minmax(0, 1fr); }
}
.edition-line { color: var(--muted); font-size: 12px; line-height: 18px; }
.product-preview { border: 1px solid var(--line); border-radius: var(--radius-control); overflow: hidden; background: var(--raised); min-width: 0; }
.product-preview img { width: 100%; }
:is(.product-card, a.shop-product, a.metric) { transition: transform 150ms ease-out, box-shadow 150ms ease-out; }
@media (hover: hover) {
  :is(.product-card, a.shop-product, a.metric):hover { transform: translateY(-2px); box-shadow: var(--shadow-float); text-decoration: none; }
}

.stack { display: grid; gap: 16px; }
.stack > *, .detail-grid > *, .sale-layout > *, .customer-layout > * { min-width: 0; }
.detail-grid, .sale-layout, .customer-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.overview-grid, .sale-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.sale-setup > .section-heading, .sale-side h2, .sale-side .actions, .detail-list + form { margin-bottom: 12px; }
.sale-side { border-inline-start: 1px solid var(--line); padding-inline-start: 24px; }
.sale-side > section + section { padding-top: 16px; border-top: 1px solid var(--line); }
.pricing-panel .actions, .link-panel .actions { margin: 12px 0 0; }
.inline-setting { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px; background: var(--raised); border-radius: 10px; }
.inline-setting p { color: var(--muted); overflow-wrap: anywhere; }
.inline-setting.stacked { display: grid; align-items: stretch; }
.detail-list { display: grid; }
.detail-list > div, .platform-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); flex-shrink: 0; }
.detail-list dd { margin: 0; min-width: 0; text-align: end; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.detail-list dd small { display: inline; }
.detail-list + form { margin-top: 16px; }
.pricing-panel .section-heading h2 { margin: 0; }
.agency-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
  gap: 20px;
  scroll-margin-block-start: 96px;
}
.agency-overview { display: grid; align-content: start; gap: 12px; }
.agency-overview-head { display: flex; align-items: center; gap: 12px; }
.agency-overview-head > :is(img, .product-icon) { flex-shrink: 0; }
.agency-versions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.agency-versions dt { color: var(--quiet); font-size: 13px; }
.agency-versions dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.agency-preview {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 16px 16px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  color: var(--muted);
  background: var(--raised);
  transition: background 150ms ease-out, color 150ms ease-out;
}
.agency-preview:hover { color: var(--text); background: var(--hover); }
.agency-preview img { max-height: 208px; width: auto; border: 1px solid var(--line); border-radius: 8px; object-fit: contain; }
.agency-preview span { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 20px; font-weight: 600; }
.agency-opening { display: flex; flex-direction: column; padding: 0; }
.agency-opening-head {
  display: grid;
  gap: 20px;
  padding: 20px 24px;
  border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0;
  color: #fff;
  background: #111214;
}
.agency-opening-head .status, .agency-manage-banner .status { background: rgb(255 255 255 / 12%); color: #f3f3f4; }
.agency-opening-head dt { color: #d0d0d4; font-size: 13px; line-height: 20px; }
.agency-opening-price { margin: 4px 0 0; font-size: 32px; line-height: 40px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.agency-opening-body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 20px 24px; }
.agency-payment { display: grid; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.agency-payment p { font-size: 13px; line-height: 20px; }
.agency-payment > .btn { width: 100%; }
.agency-supply { display: grid; gap: 12px; }
.agency-supply > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 8px 12px; }
.agency-supply dt { color: var(--muted); font-size: 13px; line-height: 20px; }
.agency-supply dd { min-width: 0; margin: 0; text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.agency-supply small { display: inline; }
.agency-steps ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: agency-step; }
.agency-steps li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 12px; }
.agency-steps li::before {
  counter-increment: agency-step;
  content: counter(agency-step);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--raised);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
}
.agency-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset: 28px auto -8px 12px;
  border-inline-start: 1px solid var(--line);
}
.agency-steps li p, .agency-earnings-list dd { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.agency-earnings-list { display: grid; gap: 12px; }
.agency-earnings-list dt { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.agency-earnings-list dt strong { font-variant-numeric: tabular-nums; }
.agency-plans, .agency-earnings > .caption { margin-top: 12px; border-top: 1px solid var(--line); }
.agency-earnings > .caption { padding-top: 12px; }
.agency-plans summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--tap-target); cursor: pointer; list-style: none; font-weight: 600; }
.agency-plans summary::-webkit-details-marker { display: none; }
.agency-plans summary span { display: inline-flex; align-items: center; flex-shrink: 0; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.agency-plans[open] summary svg { transform: rotate(180deg); }
.agency-plans .renewal-list { padding-inline: 0; border-top: 1px solid var(--line); }
.agency-manage { display: grid; gap: 20px; scroll-margin-block-start: 96px; }
.agency-manage-banner { min-height: 128px; padding-block: 20px; }
.agency-manage-banner::before { display: none; }
.agency-manage-banner h2 { margin-top: 8px; }
.agency-manage-banner h2:focus { outline-color: #fff; }
.agency-manage-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.agency-manage-metrics > div { display: grid; align-content: center; gap: 4px; min-height: 104px; }
.agency-manage-metrics dt { color: var(--muted); font-size: 13px; line-height: 20px; }
.agency-manage-metrics dd {
  margin: 0;
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.agency-manage-margin { background: var(--raised); }
.agency-manage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.agency-manage-column { display: grid; align-content: start; gap: 16px; min-width: 0; }
.agency-manage-card { display: grid; gap: 12px; }
.agency-manage-card > h2 { margin: 0; }
.agency-share input { background: var(--raised); }
.agency-manage-card > .muted { font-size: 13px; line-height: 20px; }
.agency-delivery .detail-list > div:last-child { border-bottom: 0; }
.agency-pricing input { font-variant-numeric: tabular-nums; }
.agency-brand { padding-block: 12px; }
.agency-brand summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.agency-brand summary::-webkit-details-marker { display: none; }
.agency-brand-summary { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.agency-brand[open] summary svg { transform: rotate(180deg); }
.agency-brand-body { margin-top: 8px; padding: 16px 0 8px; border-top: 1px solid var(--line); }
.agency-brand-logo { display: flex; align-items: flex-end; gap: 12px; }
.agency-brand-logo label { flex: 1; }
.agency-brand-logo .shop-icon { flex-shrink: 0; }
.agency-brand-logo input[type="file"] { padding: 4px 8px; color: var(--muted); }
.agency-brand-logo input::file-selector-button {
  margin-inline-end: 8px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--raised);
  font: inherit;
  cursor: pointer;
}
.agency-delivery-manager .agency-buy-cards { background: transparent; color: #fff; border-color: #727278; }
.agency-delivery-manager .agency-buy-cards:hover { background: #303034; }
.agency-delivery-manager .dashboard-banner .btn:disabled { opacity: .58; }
.agency-delivery-brand { display: flex; align-items: center; gap: 12px; }
.agency-delivery-brand img { flex: 0 0 44px; }
.setting-list.agency-version-list { display: flex; flex-wrap: wrap; gap: 8px; }
.setting-list.agency-version-list li {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font-size: 13px;
  line-height: 20px;
}
.agency-version-list .status { padding-inline: 4px; background: transparent; }
.agency-sale-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--raised);
}
.agency-sale-figures > div { display: grid; gap: 4px; padding: 8px 12px; }
.agency-sale-figures > div + div { border-inline-start: 1px solid var(--line); }
.agency-sale-figures dt { color: var(--muted); font-size: 12px; line-height: 18px; }
.agency-sale-figures dd { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.agency-sale-flow { display: grid; gap: 8px; margin: 0; padding-inline-start: 24px; }
.agency-sale-flow li { padding-inline-start: 4px; }
.agency-sale-flow li::marker { color: var(--muted); font-size: 13px; font-weight: 600; }
.agency-sale-flow p, .agency-sale-entitlement p { color: var(--muted); font-size: 13px; line-height: 20px; }
.agency-sale-entitlement { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.agency-inline-support [data-support-form] { margin: 0; gap: 12px; }
.agency-inline-support label { overflow-wrap: anywhere; }
.setting-list, .workflow { margin: 0; padding: 0; list-style: none; }
.setting-list li:last-child { border-bottom: 0; }
.setting-list li + li:not(.platform-row) { border-top: 1px solid var(--line); }
.setting-list a:not(.btn) { min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 4px; }
.setting-end { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; }
.renewal-list, .workflow { padding-inline: 20px; }
.renewal-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.renewal-list li > span { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.list-note { border-top: 1px solid var(--line); padding: 12px 20px; color: var(--muted); font-size: 13px; line-height: 20px; }
.list-panel { padding: 0; overflow: hidden; }
.list-heading { min-height: 56px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list-body { padding-inline: 20px; }
.product-row, .action-row, .workflow-step { display: flex; align-items: center; gap: 12px; min-height: 72px; padding-block: 12px; }
.product-row + .product-row, .action-row + .action-row, .workflow li + li { border-top: 1px solid var(--line); }
.product-row img { width: 72px; aspect-ratio: 3 / 2; flex: 0 0 auto; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.row-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-copy strong { display: block; font-size: 14px; font-weight: 600; }
.row-platforms, .action-row b { font-variant-numeric: tabular-nums; }
.action-row b { font-size: 20px; line-height: 28px; font-weight: 700; }
.workflow-number { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.support-qr { border: 1px solid var(--line); border-radius: 8px; object-fit: contain; }
[data-support-form], .commission-totals + .panel .filter-bar { margin-top: 16px; }
.order-progress { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.order-progress h2, .order-progress p { margin-top: 4px; }
.order-progress [data-supply-payment-details] { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.order-progress [data-supply-payment-details] .actions { margin-top: 8px; }
@media (width > 768px) {
  .payment-mobile-link { display: none; }
}

.table-scroll { max-width: 100%; overflow: auto; scrollbar-width: thin; }
.data-table { width: 100%; border-collapse: collapse; text-align: start; font-size: 13px; line-height: 20px; }
.data-table th { background: var(--raised); color: var(--muted); font-weight: 600; }
.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--raised); }
.agency-plan-table { table-layout: fixed; font-variant-numeric: tabular-nums; }
.agency-plan-table th:first-child { text-align: start; }
.agency-plan-table thead th:first-child { width: 50%; }
.agency-plan-table :is(th, td):not(:first-child) { text-align: end; }
.agency-plan-table tbody th { background: transparent; }
.agency-plan-table tbody th strong { color: var(--text); font-weight: 600; }
.agency-plan-table tbody tr:last-child th { border-bottom: 0; }
.agency-product-list { container-type: inline-size; }
.agency-product-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 20px 24px;
  background: #111214;
  color: #fff;
}
.agency-product-summary dl { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px 24px; }
.agency-product-summary dl > div + div { padding-inline-start: 24px; border-inline-start: 1px solid #44454a; }
.agency-product-summary dt, .agency-product-summary small { color: #c9c9cf; font-size: 13px; line-height: 20px; }
.agency-product-summary dd { margin: 4px 0 0; font-size: 24px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.agency-product-summary dl > div:first-child dd { font-size: 32px; line-height: 40px; }
.agency-product-summary small { display: inline; margin-inline-start: 4px; }
.agency-product-summary .btn { color: #111214; background: #fff; }
.agency-product-summary .btn:hover { background: #eaeaec; }
.agency-product-summary .btn:focus-visible { outline-color: #fff; }
.agency-product-table th, .agency-product-table td { padding: 16px 12px; }
.agency-product-table th { text-align: start; }
.agency-product-table th:last-child, .agency-product-table td:last-child { padding-inline-end: 20px; }
.agency-product-table tbody tr:not(:last-child) > th { border-bottom-color: var(--line); }
.agency-product-table tbody tr:last-child > th { border-bottom: 0; }
.agency-product-table tbody th { color: var(--text); background: transparent; }
.agency-product-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.agency-product-identity strong { display: block; font-size: 16px; line-height: 24px; }
.agency-product-identity .status { margin-top: 4px; }
.agency-product-table td > strong { font-size: 16px; line-height: 24px; font-variant-numeric: tabular-nums; }
.agency-product-table td.agency-product-net { background: color-mix(in srgb, var(--raised) 45%, transparent); }
.agency-product-table td.agency-product-net > strong { font-size: 20px; line-height: 28px; }
.agency-product-actions .actions { gap: 4px 8px; }
.agency-product-actions :is(.btn, .text-button) { white-space: nowrap; }
.agency-product-mobile-label { display: none; }
@container (width < 700px) {
  .agency-product-table, .agency-product-table tbody { display: block; }
  .agency-product-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .agency-product-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 16px;
  }
  .agency-product-table tbody tr + tr { border-top: 1px solid var(--line); }
  .agency-product-list .agency-product-table tbody :is(th, td) { min-width: 0; padding: 0; border: 0; }
  .agency-product-table tbody :is(th, .agency-product-actions) { grid-column: 1 / -1; }
  .agency-product-table td.agency-product-net { background: transparent; }
  .agency-product-table td.agency-product-net > strong { font-size: 16px; line-height: 24px; }
  .agency-product-mobile-label { display: block; color: var(--muted); font-size: 12px; line-height: 18px; }
}
@container (width < 440px) {
  .agency-product-summary { padding: 16px; }
  .agency-product-summary dl { gap: 12px 16px; }
  .agency-product-summary dl > div + div { padding-inline-start: 16px; }
  .agency-product-summary dl > div:first-child dd { font-size: 24px; line-height: 32px; }
}
.list-panel .data-table th:first-child, .list-panel .data-table td:first-child { padding-inline-start: 20px; }
.status { display: inline-flex; flex: 0 0 auto; align-items: center; vertical-align: middle; min-height: 22px; padding-inline: 8px; border-radius: 999px; color: var(--muted); background: var(--raised); font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; }
.status.active, .status.paid, .status.activated, .status.settled, .status.available { background: color-mix(in srgb, var(--success) 10%, var(--panel)); color: var(--success); }
.status.pending, .status.reserved { background: color-mix(in srgb, var(--warning) 10%, var(--panel)); color: var(--warning); }
.status.void, .status.expired, .status.failed, .status.reversed { background: color-mix(in srgb, var(--danger) 10%, var(--panel)); color: var(--danger); }
.status:is([data-product-status="pending"], [data-product-status="refunding"]) { color: #85400e; background: #fef0bd; }
.status:is([data-product-status="opened"], [data-product-status="published"]) { color: #166534; background: #d9f9e3; }
[data-theme="dark"] .status:is([data-product-status="pending"], [data-product-status="refunding"]) { color: #fcd34d; background: #46300d; }
[data-theme="dark"] .status:is([data-product-status="opened"], [data-product-status="published"]) { color: #86efac; background: #173d2b; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: var(--control-height); padding: 4px 20px; border: 1px solid transparent; border-radius: var(--radius-input); font-size: 14px; line-height: 20px; font-weight: 600; transition: background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 88%, var(--on-primary)); }
.btn-secondary { background: var(--panel); border-color: var(--input-line); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--raised); }
.btn-small { min-height: var(--small-control); padding-inline: 14px; }
.btn-large { min-height: 48px; padding-inline: 24px; border-radius: 12px; font-size: 15px; }
.filter-bar { margin-bottom: 16px; }
label, .field { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 13px; line-height: 20px; font-weight: 500; }
input:not([type="checkbox"], [type="radio"]), select, textarea { width: 100%; min-width: 0; min-height: var(--control-height); border: 1px solid var(--input-line); border-radius: var(--radius-input); background: var(--panel); padding: 8px 12px; color: var(--text); font-size: 14px; line-height: 20px; font-weight: 400; }
input::placeholder, textarea::placeholder { color: var(--quiet); opacity: 1; }
input[readonly] { background: var(--raised); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--focus); width: 18px; height: 18px; flex: 0 0 18px; margin: 0; vertical-align: middle; }
select { cursor: pointer; }
.select-control, .search-control { position: relative; display: inline-grid; min-width: 0; max-width: 100%; }
.select-control select { appearance: none; padding-inline-end: 40px; text-overflow: ellipsis; }
.select-control > .chevron { position: absolute; inset-inline-end: 12px; inset-block-start: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-control input { padding-inline-start: 40px; }
.search-control > svg { position: absolute; inset-inline-start: 12px; inset-block-start: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.select-control select:disabled { cursor: not-allowed; }
.select-control select:disabled + .chevron { opacity: .48; }
.filter-bar > .search-control { width: min(100%, 256px); }
.record-filters > .select-control { min-width: 128px; }
.checkbox-label { display: inline-flex; align-items: center; justify-self: start; gap: 8px; min-height: var(--tap-target); }
.section-heading > .checkbox-label { justify-self: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid > .actions, .form-grid > p { grid-column: 1 / -1; }
.form-message:empty { display: none; }
.admin-search { max-width: 320px; margin-bottom: 16px; }
fieldset { min-inline-size: 0; margin: 16px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
legend { padding-inline: 8px; font-weight: 600; }
.entitlement-fields { margin-top: 8px; }
.plan-row { margin: 0; }
.jump-links, .segmented { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; padding: 4px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; }
.jump-links a, .segmented button { display: grid; place-items: center; min-height: var(--tap-target); min-width: var(--tap-target); padding: 4px 12px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: 13px; line-height: 20px; text-align: center; }
.jump-links a:hover, .segmented button:hover { color: var(--text); text-decoration: none; }
.jump-links a[aria-current="page"], .segmented button[aria-pressed="true"] { color: var(--text); background: var(--panel); border-color: var(--line); font-weight: 600; }
.segmented:has([data-auth-kind]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }

.product-catalog-editor { display: grid; gap: 20px; min-width: 0; container-type: inline-size; }
.product-editor-title { font-size: 24px; line-height: 32px; }
.product-editor-nav { display: flex; flex-wrap: wrap; gap: 4px; border-block-end: 1px solid var(--line); }
.product-editor-nav a {
  display: grid;
  place-items: center;
  min-height: max(44px, var(--tap-target));
  padding: 4px 16px;
  border-block-end: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}
.product-editor-nav a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.product-editor-nav a[aria-current="location"] { color: var(--text); border-color: var(--primary); }
.product-settings-panel { min-width: 0; scroll-margin-block-start: 16px; }
.product-settings-panel > h2 { margin-block-end: 16px; }
.product-settings-panel .form-grid { align-items: start; }
.product-settings-fields { width: min(100%, 800px); }
.product-settings-wide { grid-column: 1 / -1; }
.product-settings-wide textarea { resize: vertical; }
.product-settings-short { width: min(100%, 220px); }
.product-section-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px; padding-block-start: 16px; border-block-start: 1px solid var(--line); }
.product-section-actions .form-message { margin-inline-end: auto; }
.product-settings-panel [data-plans]:empty { display: none; }
.product-editor-heading { padding-block-start: 16px; border-block-start: 1px solid var(--line); }
.product-version { margin: 0; }
.product-version + .product-version { margin-block-start: 12px; }
.product-version [data-package-status]:empty { display: none; }
.card-plan-pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-plan-pricing fieldset { margin: 0; padding: 12px 16px 16px; }
.card-plan-pricing legend { font-size: 16px; line-height: 24px; }
.card-plan-pricing .card-plan-benefits { min-height: 66px; }
@container (width < 700px) {
  .card-plan-pricing { grid-template-columns: minmax(0, 1fr); }
  .card-plan-pricing .card-plan-benefits { min-height: 0; }
}
@container (width < 480px) {
  .product-editor-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-editor-nav a { padding-inline: 4px; }
}

.dialog { width: min(calc(100% - 32px), 560px); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: var(--panel); box-shadow: var(--shadow-float); }
.dialog[open] { animation: dialog-in 200ms ease-out; }
.dialog::backdrop, .menu-drawer::backdrop { background: rgb(0 0 0 / 40%); animation: backdrop-in 200ms ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes drawer-in { from { transform: translateX(-100%); } }
.toast { position: fixed; z-index: 15; inset: auto auto max(20px, env(safe-area-inset-bottom)) 50%; max-width: min(calc(100% - 32px), 600px); transform: translateX(-50%); padding: 8px 16px; border-radius: 10px; background: var(--primary); color: var(--on-primary); text-align: center; }
.toast[data-error="true"] { background: var(--panel); color: var(--danger); border: 1px solid var(--line); box-shadow: var(--shadow-float); }
.notice-page { width: min(600px, calc(100% - 32px)); margin: 12vh auto; }
.notice-page .panel { display: grid; gap: 16px; }

.login-shell { width: min(calc(100% - 32px), 480px); margin-inline: auto; padding: 48px 0 32px; }
.login-heading { margin-bottom: 20px; }
.login-card .panel { padding: 28px; }
.login-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 13px; line-height: 20px; }
.login-switch a { color: var(--text); font-weight: 600; }
.registration-code { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 8px; align-items: end; }
.registration-code .btn { padding-inline: 8px; min-height: max(var(--control-height), var(--tap-target)); white-space: nowrap; }
.registration-code input { min-height: max(var(--control-height), var(--tap-target)); font-variant-numeric: tabular-nums; }
.registration-status { color: var(--muted); font-size: 13px; line-height: 20px; }
.demo-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }

.customer-shell { width: 100%; padding: 0 var(--page-gutter) 32px; }
.customer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; min-height: 56px; border-bottom: 1px solid var(--line); }
.customer-bar > strong { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.customer-hero { margin-block: 20px; }
.customer-layout { grid-template-areas: "info action"; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.customer-info { grid-area: info; }
.customer-action { grid-area: action; }
.customer-activation .stack, .customer-activation .actions, .customer-activation > .btn, .customer-activation > p + p { margin-top: 12px; }
.customer-activation .status + h2 { margin-top: 8px; }
.customer-step { color: var(--muted); font-size: 12px; line-height: 18px; margin-bottom: 8px; }
.customer-price { font-size: 32px; line-height: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.customer-pricing .section-heading p { margin: 0; }
.customer-pricing.stack > h2 { margin-bottom: 0; }
.shop-brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.shop-brand strong, .shop-brand h1 { min-width: 0; overflow-wrap: anywhere; }
.shop-icon { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; flex: 0 0 auto; }
.customer-bar .shop-brand { min-height: var(--tap-target); }
.customer-bar .shop-icon { width: 32px; height: 32px; border-radius: 8px; }

html:has(.customer-product-page) { background: var(--panel); scroll-padding-block-start: 68px; }
.customer-product-page { max-width: 1184px; margin-inline: auto; padding-bottom: 48px; }
.customer-product-bar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  background: var(--panel);
}
.customer-product-bar .topbar-actions { justify-self: end; }
.customer-product-bar .btn { padding-inline: 12px; white-space: nowrap; }
.customer-detail-nav { display: flex; align-items: center; gap: 24px; }
.customer-detail-nav a { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); font-size: 13px; font-weight: 500; }
.customer-detail-nav a:hover { color: var(--text); }
.customer-preview-notice { margin-top: 12px; color: var(--muted); font-size: 13px; }
.customer-product-header {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  align-items: start;
  gap: 32px;
  width: min(100%, 896px);
  margin-inline: auto;
  padding-block: 32px 20px;
}
.customer-purchase-info { display: grid; grid-column: 2; gap: 12px; min-width: 0; }
@media (width >= 1024px) {
  .customer-product-header:has(.customer-purchase-info) {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(216px, .58fr);
    gap: 24px;
    width: min(100%, 1088px);
  }
  .customer-purchase-info { grid-column: auto; padding-inline-start: 16px; border-inline-start: 1px solid var(--line); }
}
.customer-product-name { display: flex; align-items: center; align-self: center; gap: 16px; min-width: 0; }
.customer-product-name > div { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.customer-product-name h1 { font-size: 32px; line-height: 40px; }
.customer-product-name p { color: var(--muted); }
.customer-access { width: min(100%, 848px); margin: 0 auto 32px; }
.customer-access-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--tap-target); margin-bottom: 4px; }
.customer-access h2 { font-size: 14px; line-height: 22px; font-weight: 600; }
.customer-editions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 192px), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.customer-edition {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
}
a.customer-edition { background: var(--panel); border-color: var(--input-line); transition: background 150ms ease-out, border-color 150ms ease-out; }
a.customer-edition:hover { background: var(--raised); border-color: var(--text); text-decoration: none; }
.customer-edition-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid var(--line); border-radius: var(--radius-input); background: var(--panel); }
.customer-edition-icon svg { width: 20px; height: 20px; }
.customer-edition-copy { min-width: 0; overflow-wrap: anywhere; }
.customer-edition-copy strong { font-weight: 600; }
.customer-edition-action { width: 18px; height: 18px; margin-inline-start: auto; }
.customer-access-help { padding-inline: 0; }
.customer-access-help svg { width: 16px; height: 16px; }

.customer-writing-page { max-width: none; padding-inline: 0; }
.customer-writing-page > :not(.customer-writing-hero), .customer-writing-hero-inner {
  width: min(calc(100% - 2 * var(--page-gutter)), 1128px);
  margin-inline: auto;
}
.customer-writing-hero {
  position: relative;
  isolation: isolate;
  --bg: #19191b;
  --panel: #151517;
  --raised: #232326;
  --hover: #303034;
  --line: #38383c;
  --input-line: #5e5e64;
  --text: #f5f5f6;
  --muted: #c1c1c6;
  --quiet: #ababaf;
  --primary: #f5f5f6;
  --on-primary: #151517;
  --focus: #fff;
  background: #111214;
  color: var(--text);
  color-scheme: dark;
}
.customer-writing-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: url("/assets/writing.webp") center / cover no-repeat;
  opacity: .028;
}
.customer-writing-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 376px);
  align-items: center;
  gap: 48px;
  padding: 48px 40px;
}
.customer-writing-intro { display: grid; align-content: center; justify-items: start; gap: 20px; min-width: 0; }
.customer-writing-intro .customer-product-name { display: grid; gap: 16px; }
.customer-writing-intro .customer-product-name > div { gap: 12px; }
.customer-writing-intro .customer-product-name h1 { font-size: 48px; line-height: 56px; }
.customer-writing-intro .customer-product-name p { max-width: 34em; font-size: 15px; line-height: 24px; }
.customer-writing-intro .customer-access { width: 100%; margin: 0; }
.customer-writing-intro .customer-editions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 152px), 1fr)); gap: 8px; border: 0; background: transparent; }
.customer-writing-intro .customer-editions li { border: 0; }
.customer-writing-intro .customer-edition {
  min-height: 56px;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--bg);
}
.customer-writing-intro a.customer-edition { border-color: var(--input-line); }
.customer-writing-intro a.customer-edition:hover { background: var(--hover); border-color: var(--muted); }
.customer-writing-intro .customer-edition-icon { width: 20px; height: 20px; flex-basis: 20px; border: 0; background: transparent; }
.customer-writing-intro :is(.customer-edition-icon svg, .customer-edition-action) { width: 16px; height: 16px; }
.customer-writing-intro .customer-edition-copy strong { font-size: 13px; }
.customer-writing-guide-link { gap: 8px; padding-inline: 0; }
.customer-writing-guide-link svg, .customer-guide-link svg { width: 16px; height: 16px; }
.customer-writing-guide-link svg:last-child { transform: rotate(-90deg); }
.customer-writing-order { display: grid; gap: 16px; min-width: 0; padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.customer-writing-order .customer-card-contact { padding-top: 12px; border-top: 1px solid var(--line); }
.customer-writing-order .customer-purchase-note { text-align: start; }
.customer-writing-page .customer-showcase { border: 0; background: none; padding-block-start: 40px; }
.customer-writing-page .customer-feature-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.customer-guide-link { justify-self: start; padding-inline: 0; }
.customer-writing-page .customer-guide { border-top: 1px solid var(--line); }
.customer-faq details { border-bottom: 1px solid var(--line); }
.customer-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; padding-block: 8px; font-weight: 600; cursor: pointer; list-style: none; }
.customer-faq summary::-webkit-details-marker { display: none; }
.customer-faq summary svg { width: 18px; height: 18px; color: var(--muted); }
.customer-faq details[open] summary svg { transform: rotate(180deg); }
.customer-faq details p { padding-bottom: 16px; color: var(--muted); }

.customer-product-gallery { min-width: 0; margin: 0; }
.customer-gallery-trigger {
  display: grid;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #38383c;
  border-radius: var(--radius-card);
  background: #19191b;
  box-shadow: 0 16px 40px rgb(0 0 0 / 16%);
  cursor: zoom-in;
}
.customer-gallery-trigger img { width: 100%; }
.customer-gallery-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 16px;
  color: #e3e3e6;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 150ms ease-out;
}
.customer-gallery-trigger:hover .customer-gallery-bar { background-color: #303035; }
.customer-gallery-bar svg { width: 16px; height: 16px; }
.customer-gallery-zoom { margin-inline-start: auto; }
.customer-gallery-dialog { width: min(calc(100% - 32px), 1280px); padding: 12px; }
.customer-gallery-dialog form { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.customer-gallery-dialog img { width: 100%; max-height: calc(100dvh - 112px); object-fit: contain; }
.customer-detail-section { display: grid; gap: 24px; padding-block: 32px; }
.customer-section-lead { display: grid; align-content: start; gap: 8px; }
.customer-section-lead h2 { font-size: 24px; line-height: 32px; }
.customer-section-lead p { max-width: 68ch; color: var(--muted); }
.customer-showcase {
  padding: 24px 40px 32px;
  border: 1px solid var(--line);
  border-inline: 0;
  background: var(--bg);
}
.customer-feature-list, .customer-tutorial { display: grid; margin: 0; padding: 0; list-style: none; }
.customer-feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; }
.customer-feature-list li, .customer-tutorial li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.customer-feature-list li { padding-top: 16px; border-top: 1px solid var(--line); }
.customer-feature-list svg { width: 20px; height: 20px; margin-top: 2px; }
.customer-feature-list p, .customer-tutorial p { margin-top: 4px; color: var(--muted); }
.customer-guide { grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr); gap: 24px; padding: 32px 40px; }
.customer-tutorial { gap: 16px; }
.customer-tutorial li + li { padding-top: 16px; border-top: 1px solid var(--line); }
.customer-tutorial-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--raised);
  font-size: 12px;
  font-weight: 600;
}
.customer-purchase { gap: 16px; }
.customer-plan-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.customer-plan-options button {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 64px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel);
  overflow-wrap: anywhere;
  transition: background 150ms ease-out, border-color 150ms ease-out;
}
.customer-plan-options button:hover { background: var(--raised); border-color: var(--input-line); }
.customer-plan-options button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.customer-plan-options button strong { font-size: 13px; line-height: 20px; }
.customer-plan-options button span { font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }
.customer-purchase-action { gap: 8px; }
.customer-purchase-action:empty { display: none; }
.customer-plan-summary { display: grid; gap: 4px; }
.customer-product-page .btn svg { width: 18px; height: 18px; }
.customer-purchase-note { text-align: center; }
.customer-card-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 13px; overflow-wrap: anywhere; }
.customer-plan-summary + .customer-card-contact { padding-top: 12px; border-top: 1px solid var(--line); }
.customer-card-contact:target { outline: 1px solid var(--focus); outline-offset: 4px; }
.customer-contact-icon { display: grid; place-items: center; align-self: start; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid var(--line); border-radius: var(--radius-input); background: var(--bg); }
.customer-contact-icon svg { width: 18px; height: 18px; }
.customer-card-contact > div { flex: 1 1 128px; min-width: 0; }
.customer-card-contact p { color: var(--muted); }
.customer-card-contact a { display: flex; align-items: center; min-height: var(--tap-target); width: fit-content; max-width: 100%; color: var(--muted); text-decoration: underline; text-underline-offset: .24em; }
.customer-card-contact a:hover { color: var(--text); }
.customer-activation-column { max-width: 520px; margin: 32px auto 0; }
.customer-activation-column .customer-activation { background: var(--bg); box-shadow: none; }
.customer-activation-column .customer-activation h2 + p { margin-top: 8px; }

.workspace:has(> .shop-settings) {
  --shop-bar-bottom: max(16px, env(safe-area-inset-bottom));
  min-height: calc(100dvh - var(--topbar-height));
  grid-template-rows: 1fr;
  padding-bottom: var(--shop-bar-bottom);
}
.shop-settings, .shop-settings-fields { display: grid; gap: 16px; min-width: 0; }
.shop-settings { grid-template-rows: 1fr auto; }
.shop-settings-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: start; gap: 20px; }
.shop-settings-fields { align-content: start; padding: 0; margin: 0; border: 0; }
.shop-editor-card { display: grid; gap: 16px; }
.shop-editor-card > h2 { margin: 0; }
.shop-brand-lock, .shop-share-note, .shop-preview-caption { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
.shop-brand-lock { font-size: 12px; }
.shop-brand-lock svg, .shop-share-note svg, .shop-preview-caption svg { width: 16px; height: 16px; }
.shop-logo-field { display: flex; align-items: center; gap: 16px; }
.shop-logo-tile { flex: 0 0 72px; height: 72px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--raised); font-size: 24px; font-weight: 700; overflow: hidden; }
.shop-logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.shop-field-title { color: var(--text); font-weight: 600; }
.shop-required { display: inline; margin-inline-start: 4px; color: var(--danger); }
.shop-field-title-row { display: flex; justify-content: space-between; gap: 8px; }
.shop-logo-field .btn { margin-top: 8px; }
.shop-logo-field .form-message { margin-top: 4px; font-size: 13px; }
.shop-settings .btn svg, .shop-device-options svg { width: 16px; height: 16px; }
.shop-editor-card textarea { min-height: 68px; resize: vertical; }
.shop-theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shop-theme-option {
  position: relative; display: grid; align-content: start; gap: 8px; padding: 8px;
  min-width: 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); cursor: pointer; transition: background 150ms ease-out, border-color 150ms ease-out;
}
.shop-theme-option:hover { border-color: var(--input-line); }
.shop-theme-option:has(input:checked) { border-color: var(--focus); background: var(--raised); box-shadow: inset 0 0 0 1px var(--focus); }
.shop-theme-option:has(input:focus-visible) { outline: 1px solid var(--focus); outline-offset: 3px; }
.shop-theme-option input { position: absolute; inset: 8px auto auto 8px; opacity: 0; }
.shop-theme-copy { display: grid; gap: 2px; padding: 0 2px 4px; }
.shop-theme-copy strong { color: var(--text); font-size: 14px; font-weight: 600; }
.shop-theme-copy small { line-height: 16px; }
.shop-theme-check {
  display: none; position: absolute; inset: 12px 12px auto auto; width: 20px; height: 20px;
  place-items: center; border: 1px solid var(--panel); border-radius: 50%; color: var(--on-primary); background: var(--primary);
}
.shop-theme-check svg { width: 12px; height: 12px; }
.shop-theme-option input:checked + .shop-theme-check { display: grid; }
.shop-theme-thumbnail { min-width: 0; }
.shop-theme-sample {
  display: grid; grid-template-rows: 1fr .75fr; gap: 5px; height: 96px; padding: 6px;
  overflow: hidden; border: 1px solid #d8d8dc; border-radius: 8px; background: #e9e9eb; color: #141518;
}
.shop-sample-brand { display: grid; align-content: center; justify-items: start; gap: 3px; min-width: 0; padding: 5px; border-radius: 4px; background: #fff; }
.shop-sample-brand > i { display: block; width: 42%; height: 2px; background: currentColor; border-radius: 2px; opacity: .6; }
.shop-sample-brand > i:last-child { width: 60%; opacity: .23; }
.shop-theme-sample .storefront-icon { width: 12px; height: 12px; border-radius: 3px; color: #16171a; background: #f0f0f1; font-size: 8px; line-height: 1; }
.shop-sample-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.shop-sample-products > span { display: grid; align-content: center; justify-items: center; gap: 3px; padding: 3px; border-radius: 4px; background: #fff; }
.shop-sample-products i { width: 55%; height: 2px; border-radius: 2px; background: #b7b7bd; }
[data-sample="classic"] .shop-sample-brand { color: #fff; background: radial-gradient(ellipse at 87% 35%, #666871 0%, #23242a 52%, #111214 75%); }
[data-sample="minimal"] { background: #f0f0f1; }
[data-sample="minimal"] .shop-sample-brand { justify-items: center; }
[data-sample="catalog"] { grid-template: 1fr / .8fr 1.2fr; }
[data-sample="catalog"] .shop-sample-brand { align-content: start; padding-top: 8px; }
[data-sample="catalog"] .shop-sample-products { grid-template: repeat(2, minmax(0, 1fr)) / 1fr; }
[data-sample="catalog"] .shop-sample-products > span { grid-template-columns: auto 1fr; align-items: center; padding: 4px; }
.shop-preview { align-self: start; }
.shop-preview > .section-heading { margin-bottom: 16px; }
.shop-device-options { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.shop-device-options button { display: inline-flex; min-height: var(--tap-target); align-items: center; justify-content: center; gap: 4px; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; line-height: 20px; }
.shop-device-options button[aria-pressed="true"] { border-color: var(--line); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); font-weight: 600; }
.shop-preview-stage {
  display: grid; justify-items: center; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px;
  background-color: var(--raised);
  background-image: radial-gradient(circle, var(--input-line) .7px, transparent .8px);
  background-size: 12px 12px;
}
.shop-preview-screen {
  width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--input-line);
  border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-float);
}
.shop-preview-screen[data-device="mobile"] { max-width: 304px; border: 4px solid var(--text); border-radius: 24px; }
.shop-preview-page { container-type: inline-size; max-height: 560px; overflow: auto; overscroll-behavior: contain; }
.shop-preview-caption { margin-top: 12px; }
.shop-settings-footer {
  position: sticky;
  z-index: 2;
  bottom: var(--shop-bar-bottom);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 12px 16px;
  box-shadow: var(--shadow-float);
}
.shop-settings-footer .actions { margin-inline-start: auto; }
.shop-footer-info { flex: 1 1 220px; min-width: 0; }
.shop-footer-info:not(:has(> :not([hidden]))) { display: none; }
.shop-footer-info input { font-size: 13px; }
.shop-footer-info > :not([hidden]) ~ :not([hidden]) { margin-top: 4px; }
.shop-save-status { color: var(--muted); font-size: 13px; line-height: 20px; }
.main-content:has(.shop-settings) { scroll-padding-block-end: 128px; }
body:has(.shop-settings) .toast { inset-block: calc(var(--topbar-height) + 12px) auto; }

.public-storefront { max-width: 1320px; margin-inline: auto; container-type: inline-size; }
.storefront-preview-notice {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 4px 12px; padding-block: 4px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.storefront {
  --store-gap: 28px;
  --store-padding: 32px;
  --store-hero-size: 232px;
  --store-title-size: 32px;
  --store-title-line: 40px;
  --store-card-padding: 20px;
  --store-media-size: 144px;
  --store-art-icon: 64px;
  min-width: 0;
}
.storefront-nav, .storefront-nav-brand, .storefront-nav-actions {
  display: flex; min-width: 0; align-items: center; gap: 12px;
}
.storefront-nav { min-height: 64px; justify-content: space-between; border-bottom: 1px solid var(--line); }
.storefront-nav-brand strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.storefront-nav-actions { flex: 0 0 auto; gap: 16px; font-size: 13px; }
.storefront-nav-actions a { display: inline-flex; min-height: var(--tap-target); align-items: center; color: var(--muted); }
.storefront-nav .storefront-icon { width: 32px; height: 32px; border-radius: 8px; font-size: 16px; }
.storefront-layout { display: grid; align-items: start; gap: var(--store-gap); padding-block: 24px; }
.storefront-hero {
  display: grid; align-items: center; min-height: var(--store-hero-size); gap: 20px; min-width: 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-feature);
  color: var(--text); background: var(--panel);
}
.storefront-hero-copy { min-width: 0; padding: var(--store-padding); }
.storefront-title { font-size: var(--store-title-size); line-height: var(--store-title-line); font-weight: 700; }
.storefront-hero p { margin-top: 8px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.storefront-hero .storefront-contact { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font-size: 13px; line-height: 20px; }
.storefront-contact svg { width: 16px; height: 16px; margin-top: 2px; }
.storefront-icon { display: grid; flex: 0 0 auto; place-items: center; width: 56px; height: 56px; overflow: hidden; border-radius: 12px; background: var(--raised); color: var(--text); font-size: 24px; font-weight: 700; }
.storefront-icon img { width: 100%; height: 100%; object-fit: contain; }
.storefront-hero-brand { display: grid; place-items: center; }
[data-shop-theme="classic"] .storefront-hero {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0;
  background: #111214; border-color: #36373c; color: #fff;
}
[data-shop-theme="classic"] .storefront-hero p { color: #d4d4d8; }
[data-shop-theme="classic"] .storefront-hero-brand {
  grid-column: 2; grid-row: 1; align-self: stretch; position: relative; isolation: isolate; overflow: hidden;
  border-inline-start: 1px solid #414248;
  background: radial-gradient(ellipse at 50% 30%, #52545d 0%, #25262b 56%, #17181b 100%);
}
[data-shop-theme="classic"] .storefront-hero-brand::before {
  position: absolute; inset: 0; z-index: -1; content: "";
  background-image: linear-gradient(90deg, #ffffff17 1px, transparent 1px), linear-gradient(#ffffff17 1px, transparent 1px);
  background-size: 24px 24px; background-position: center; mask-image: radial-gradient(ellipse, #000, transparent 78%);
}
[data-shop-theme="classic"] .storefront-hero-brand::after {
  position: absolute; z-index: -1; content: ""; width: min(74%, 240px); aspect-ratio: 1.45; border: 1px solid #ffffff3b;
  box-shadow: 0 0 0 8px #ffffff0c, inset 0 0 32px #0005; border-radius: 16px; transform: rotate(-12deg);
}
[data-shop-theme="classic"] .storefront-hero-brand .storefront-icon {
  width: var(--store-art-icon); height: var(--store-art-icon); border-radius: 14px;
  background: #f1f1f2; color: #16171a; box-shadow: 0 8px 24px #0008, 0 0 0 1px #ffffff55; transform: rotate(-12deg);
}
[data-shop-theme="classic"] .storefront-hero-copy { grid-column: 1; grid-row: 1; }
[data-shop-theme="minimal"] .storefront-hero {
  grid-template-columns: minmax(0, 1fr); align-content: center; gap: 12px; text-align: center;
  padding: var(--store-padding);
  background: radial-gradient(ellipse at 50% 100%, var(--raised), transparent 70%), var(--panel);
}
[data-shop-theme="minimal"] .storefront-hero-brand .storefront-icon { border: 1px solid var(--line); box-shadow: var(--shadow-card); }
[data-shop-theme="minimal"] .storefront-hero-copy { padding: 0; }
[data-shop-theme="minimal"] .storefront-contact { justify-content: center; }
[data-shop-theme="catalog"] .storefront-layout { grid-template-columns: minmax(0, .38fr) minmax(0, 1fr); }
[data-shop-theme="catalog"] .storefront-hero {
  gap: 12px; min-height: 0; align-content: start; padding: var(--store-card-padding);
}
[data-shop-theme="catalog"] .storefront-hero-brand { justify-items: start; }
[data-shop-theme="catalog"] .storefront-hero-copy { padding: 0; }
[data-shop-theme="catalog"] .storefront-title { font-size: 24px; line-height: 32px; }
.storefront-products { min-width: 0; }
.storefront-product-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 32px; margin-bottom: 12px;
}
.storefront-product-heading span { flex-shrink: 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.shop-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (width < 1440px) {
  .shop-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (width < 1024px) {
  .shop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.shop-list:where(:has(> :nth-child(2):last-child)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-list:where(:has(> :only-child)) { grid-template-columns: minmax(0, 1fr); }
.shop-product {
  display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 208px;
  border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel); box-shadow: var(--shadow-card);
}
.storefront-product-media {
  display: grid; place-items: center; position: relative; isolation: isolate; overflow: hidden;
  min-height: var(--store-media-size); border-radius: 15px 15px 0 0; background-color: var(--raised);
}
[data-shop-theme="classic"] .storefront-product-media {
  background-image: radial-gradient(ellipse at 54% 40%, var(--panel), transparent 65%),
    repeating-linear-gradient(130deg, transparent 0 15px, var(--line) 16px, transparent 17px 30px);
}
[data-shop-theme="minimal"] .storefront-product-media {
  min-height: calc(var(--store-media-size) - 16px); margin: 8px 8px 0; border-radius: 10px;
  background-image: radial-gradient(ellipse at 50% 100%, var(--hover), transparent 75%);
}
.storefront-product-media .storefront-icon {
  width: var(--store-art-icon); height: var(--store-art-icon); border-radius: 16px; font-size: 18px;
  background: var(--panel); box-shadow: 0 8px 16px #0002, 0 0 0 1px #0001;
}
.storefront-product-copy, .storefront-product-action { padding-inline: var(--store-card-padding); min-width: 0; }
.storefront-product-copy { align-content: start; padding-top: 12px; }
.storefront-product-copy p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 20px; overflow-wrap: anywhere;
}
.storefront-product-action {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 4px 8px; padding-block: 12px; font-variant-numeric: tabular-nums;
}
.storefront-product-action span { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 13px; line-height: 20px; }
.storefront-product-action .storefront-unavailable { color: var(--muted); }
.storefront-product-action .chevron { width: 16px; height: 16px; flex-basis: 16px; }
[data-shop-theme="catalog"] .shop-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
[data-shop-theme="catalog"] .shop-product {
  grid-template: auto / auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  min-height: 0; padding: 12px var(--store-card-padding);
}
[data-shop-theme="catalog"] .storefront-product-media { min-height: 0; border-radius: 10px; }
[data-shop-theme="catalog"] .storefront-product-media .storefront-icon { width: 44px; height: 44px; border-radius: 10px; box-shadow: none; }
[data-shop-theme="catalog"] :is(.storefront-product-copy, .storefront-product-action) { padding: 0; }
.storefront-empty { display: grid; min-height: 128px; align-content: center; justify-items: center; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--muted); text-align: center; }
.storefront-empty svg { width: 22px; height: 22px; }
@container (width >= 640px) {
  .storefront:not([data-shop-theme="catalog"]) .shop-product:only-child {
    grid-template: 1fr auto / minmax(0, 1fr) minmax(0, 1fr);
  }
  .storefront:not([data-shop-theme="catalog"]) .shop-product:only-child .storefront-product-media {
    grid-row: 1 / -1; min-height: 208px; margin: 0; border-radius: 15px 0 0 15px;
  }
  .storefront:not([data-shop-theme="catalog"]) .shop-product:only-child .storefront-product-copy { align-content: end; }
}
[data-storefront-preview] {
  --store-gap: 16px; --store-padding: 16px; --store-hero-size: 148px;
  --store-title-size: 19px; --store-title-line: 26px; --store-card-padding: 12px;
  --store-media-size: 76px; --store-art-icon: 40px;
  min-height: 328px; padding-inline: 12px;
}
[data-storefront-preview] .storefront-nav { min-height: 40px; }
[data-storefront-preview] .storefront-nav-brand { gap: 8px; font-size: 12px; }
[data-storefront-preview] .storefront-nav .storefront-icon { width: 20px; height: 20px; border-radius: 4px; font-size: 12px; }
[data-storefront-preview] .storefront-layout { padding-block: 12px; }
[data-storefront-preview] .storefront-hero { gap: 8px; border-radius: 12px; }
[data-storefront-preview] .storefront-hero-brand .storefront-icon { width: 40px; height: 40px; border-radius: 8px; font-size: 16px; }
[data-storefront-preview] .storefront-hero p { margin-top: 4px; font-size: 12px; line-height: 18px; }
[data-storefront-preview] .storefront-contact svg { width: 14px; height: 14px; }
[data-storefront-preview] .storefront-product-heading { min-height: 24px; margin-bottom: 8px; }
[data-storefront-preview] .storefront-product-heading h2 { font-size: 14px; line-height: 20px; }
[data-storefront-preview] .storefront-product-heading span { font-size: 12px; }
[data-storefront-preview] .shop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
[data-storefront-preview] .shop-list:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
[data-storefront-preview] .shop-product { min-height: 0; border-radius: 10px; }
[data-storefront-preview] .storefront-product-media { border-radius: 9px 9px 0 0; }
[data-storefront-preview] .storefront-product-media .storefront-icon { border-radius: 8px; }
[data-storefront-preview] .storefront-product-copy { padding-top: 8px; }
[data-storefront-preview] .storefront-product-copy h3 { font-size: 13px; line-height: 20px; }
[data-storefront-preview] :is(.storefront-product-copy p, .storefront-product-action span) { font-size: 12px; line-height: 18px; }
[data-storefront-preview] .storefront-product-action { padding-block: 8px; }
[data-storefront-preview] .storefront-product-action strong { font-size: 14px; line-height: 20px; }
[data-storefront-preview][data-shop-theme="catalog"] .storefront-title { font-size: 17px; line-height: 24px; }
[data-storefront-preview][data-shop-theme="catalog"] .shop-list { grid-template-columns: minmax(0, 1fr); }
[data-storefront-preview][data-shop-theme="catalog"] .shop-product { padding: 8px; gap: 8px; }
[data-storefront-preview][data-shop-theme="catalog"] .storefront-product-media .storefront-icon { width: 28px; height: 28px; }
[data-storefront-preview][data-shop-theme="catalog"] :is(.storefront-product-copy, .storefront-product-action) { padding: 0; }
@container (width < 700px) {
  .public-storefront .storefront { --store-gap: 20px; --store-padding: 20px; --store-hero-size: 172px; --store-media-size: 108px; --store-art-icon: 52px; }
  .public-storefront [data-shop-theme="catalog"] .storefront-layout { grid-template-columns: minmax(0, 1fr); }
}
@container (width < 449px) {
  .public-storefront .shop-list { grid-template-columns: minmax(0, 1fr); }
}
@container (width < 410px) {
  .storefront-nav-actions { gap: 8px; }
  .public-storefront .storefront-title { font-size: 24px; line-height: 32px; }
  [data-storefront-preview][data-shop-theme="catalog"] .storefront-layout { grid-template-columns: minmax(0, 1fr); }
  [data-shop-theme="catalog"] .shop-product { grid-template-columns: auto minmax(0, 1fr); }
  [data-shop-theme="catalog"] .storefront-product-action { grid-column: 2; justify-content: start; }
}
@container (width < 320px) {
  [data-storefront-preview] .shop-list { grid-template-columns: minmax(0, 1fr); }
  .storefront-nav-actions a[href="#storefront-contact"] { display: none; }
}
@media (width <= 1050px) {
  .shop-settings-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (width <= 768px) {
  html:has(.shop-settings) { scroll-padding-block-end: 144px; }
}
@media (width <= 480px) {
  .shop-editor-card, .shop-preview { padding: 16px; }
  .shop-theme-options { grid-template-columns: minmax(0, 1fr); }
  .shop-theme-option { grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 12px; }
  .shop-theme-copy { padding: 0 24px 0 0; }
  .shop-theme-sample { height: 64px; }
  .shop-theme-check { inset: 50% 12px auto auto; transform: translateY(-50%); }
  .shop-preview-stage { padding: 8px; }
  .shop-settings-footer { padding: 8px; }
  .shop-settings-footer .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .shop-settings-footer .btn { padding-inline: 4px; }
  .shop-settings-footer .btn svg { display: none; }
}
.customer-action details > summary { cursor: pointer; min-height: var(--tap-target); align-content: center; font-weight: 600; }
.product-dialog .product-preview { background: var(--raised); }

.menu-primary[aria-current="page"] { color: var(--text); background: var(--hover); border-color: var(--input-line); }
.workspace:has(> .order-workspace) { padding: 0; }
.order-workspace { display: grid; grid-template-columns: minmax(320px, .7fr) minmax(0, 1.3fr); min-width: 0; }
.order-catalog { container: order-catalog / inline-size; display: flex; flex-direction: column; min-width: 0; min-height: 0; border-inline-end: 1px solid var(--line); background: var(--panel); }
.order-catalog-controls { display: grid; flex-shrink: 0; gap: 12px; padding: 16px; }
.order-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
.order-categories button { display: flex; justify-content: center; align-items: center; gap: 4px; padding-inline: 8px; }
.order-categories button span { color: var(--quiet); font-size: 12px; font-variant-numeric: tabular-nums; }
.order-list { min-height: 0; overflow: auto; }
.order-list-title { padding: 8px 16px; border-block: 1px solid var(--line); background: var(--raised); color: var(--muted); font-size: 12px; line-height: 18px; font-weight: 500; }
.order-list ul { margin: 0; padding: 0; list-style: none; }
.order-product { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.order-product > .product-logo { width: 88px; height: 88px; }
.order-product[data-selected] { background: var(--raised); }
.order-product-copy { display: grid; gap: 4px; }
.order-product-copy p { color: var(--muted); font-size: 13px; line-height: 20px; }
.order-product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.order-product-meta strong { font-variant-numeric: tabular-nums; }
.order-product-action { border-color: var(--line); color: var(--text); background: var(--panel); }
.order-product-action[aria-pressed="true"], .order-product-action[aria-pressed="true"]:hover { color: var(--on-primary); background: var(--primary); }
.order-product-action .order-pick-check, .order-product-action[aria-pressed="true"] .order-pick-plus { display: none; }
.order-product-action[aria-pressed="true"] .order-pick-check { display: block; }
@container order-catalog (width < 380px) {
  .order-product { gap: 8px; padding-inline: 8px; }
}
@container order-catalog (width < 320px) {
  .order-product:has(> .product-logo) { grid-template-columns: auto minmax(0, 1fr); column-gap: 4px; padding-inline: 4px; }
  .order-product:has(> .product-logo) .order-product-action { grid-column: 2; justify-self: end; }
}
@container order-catalog (width < 300px) {
  .order-product-copy p { font-size: 12px; }
}
.order-empty { padding: 20px 16px; color: var(--quiet); }
.order-main { container: order-main / inline-size; min-width: 0; padding: 28px var(--page-gutter) 32px; }
.order-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 20px; }
.order-heading p { margin-top: 4px; color: var(--muted); }
.order-cart-count { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); white-space: nowrap; }
.order-cart-empty { display: flex; align-items: center; gap: 16px; min-height: 104px; }
.order-cart-empty h2, .order-cart-product h2 { font-size: 16px; line-height: 24px; font-weight: 600; }
.order-cart-empty p, .order-cart-benefits { color: var(--muted); font-size: 13px; line-height: 20px; }
.order-cart { padding: 0; }
.order-cart-items { margin: 0; padding: 0; list-style: none; }
.order-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(64px, 88px) minmax(80px, auto) auto;
  align-items: center;
  gap: 12px;
  padding: 20px;
}
.order-cart-item:not([hidden]) ~ .order-cart-item { border-block-start: 1px solid var(--line); }
.order-cart-product { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.order-cart-product > div { min-width: 0; overflow-wrap: anywhere; }
.order-cart-product .card-plan-picker { margin-block: 8px; }
.card-plan-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 22rem); }
.card-plan-picker button { min-width: 0; padding-inline: 4px; white-space: nowrap; }
.card-plan-picker button[aria-pressed="true"] { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.card-plan-benefits { margin: 0; padding-inline-start: 16px; color: var(--muted); line-height: 22px; }
.order-cart-benefits { margin: 4px 0 0; padding-inline-start: 16px; }
.order-cart-benefits li::marker { color: var(--quiet); font-size: .75em; }
.order-cart-product small { margin-top: 8px; }
.order-cart-quantity { gap: 4px; color: var(--quiet); font-size: 12px; line-height: 18px; }
.order-cart-quantity input { width: 100%; color: var(--text); font-size: 14px; }
.order-cart-subtotal { text-align: end; }
.order-cart-subtotal strong, .order-cart-payment strong { display: block; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.order-cart-subtotal strong { font-size: 16px; line-height: 24px; }
.order-cart-item > button { color: var(--quiet); }
.order-cart-item > button svg { width: 16px; height: 16px; }
.order-cart-checkout { display: grid; gap: 12px; padding: 16px 20px 20px; border-block-start: 1px solid var(--line); border-radius: 0 0 var(--radius-card) var(--radius-card); background: var(--raised); }
.order-cart-payment { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; }
.order-cart-payment strong { font-size: 24px; line-height: 32px; font-weight: 700; }
.order-cart-jump { display: none; }
@container order-main (width < 460px) {
  .order-cart-item { grid-template-columns: minmax(64px, 88px) minmax(0, 1fr) auto; gap: 12px; padding: 16px; }
  .order-cart-product { grid-column: 1 / 3; }
  .order-cart-item > button { grid-column: 3; grid-row: 1; align-self: start; }
  .order-cart-subtotal { grid-column: 2 / -1; }
  .order-cart-checkout { padding-inline: 16px; }
}

@media (width >= 1024px) {
  .order-workspace { height: calc(100dvh - var(--topbar-height)); }
  .order-main { min-height: 0; overflow: auto; scrollbar-width: thin; }
}
@media (width < 1024px) {
  .order-workspace { grid-template-columns: minmax(0, 1fr); }
  .order-catalog { border-inline-end: 0; }
  .order-cart-jump { display: inline-flex; align-self: start; margin: 12px 16px; }
  #order-quantity-title { scroll-margin-block-start: 16px; }
}

@media (width < 1440px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (width < 1024px) {
  .product-grid, .metrics-grid, .quick-grid.commission-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sale-layout, .agency-detail, .agency-manage-grid { grid-template-columns: minmax(0, 1fr); }
  .sale-side { border: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
}
@media (width <= 768px) {
  :root { --page-gutter: 16px; --tap-target: 44px; --control-height: 44px; --small-control: 44px; }
  html { scroll-padding-block-start: calc(var(--topbar-height) + 16px); }
  .app-shell { display: block; height: auto; min-height: 100dvh; overflow: visible; }
  .main-content { overflow: visible; }
  .sidebar { display: none; }
  .menu-open { display: inline-grid; }
  .menu-drawer[open] { display: flex; position: fixed; inset: 0 auto 0 0; width: min(264px, calc(100% - 32px)); max-width: none; height: 100dvh; max-height: none; margin: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); border: 0; border-inline-end: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow-float); animation: drawer-in 200ms ease-out; }
  html:has(.menu-drawer[open]) { overflow: hidden; }
  .detail-grid, .customer-layout { grid-template-columns: minmax(0, 1fr); }
  .customer-layout { grid-template-areas: "action" "info"; }
  .mobile-records thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mobile-records, .mobile-records tbody { display: block; }
  .mobile-records tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; border-bottom: 1px solid var(--line); padding-block: 8px; }
  .mobile-records tr:last-child { border-bottom: 0; }
  .mobile-records td, .list-panel .mobile-records td:first-child { display: block; min-width: 0; padding: 4px 0; border: 0; }
  .list-panel .mobile-records tr { padding-inline: 16px; }
  .mobile-records td:first-child, .mobile-records td:last-child:has(button, a) { grid-column: 1 / -1; }
  .mobile-records td:first-child { font-weight: 600; }
  .mobile-records td[data-label]:not(:first-child)::before { content: attr(data-label) " "; color: var(--muted); font-size: 12px; }
  .mobile-records td.record-empty-action { display: none; }
  .dashboard-banner .btn { align-self: flex-start; }
  .agency-brand summary { min-height: 44px; }
  .customer-product-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .customer-detail-nav { display: none; }
  .customer-product-header { grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 520px; padding-block: 24px; }
  .customer-purchase-info { grid-column: auto; }
  .customer-access { margin-bottom: 24px; }
  .customer-showcase, .customer-guide { padding-inline: 20px; }
  .customer-guide { grid-template-columns: minmax(0, 1fr); }
  .customer-writing-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 12px; }
  .customer-writing-intro { gap: 16px; }
  .customer-writing-intro .customer-product-name { gap: 12px; }
  .customer-writing-intro .customer-product-name h1 { font-size: 36px; line-height: 44px; }
  .customer-writing-order { padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); }
  .customer-writing-page .customer-feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (width <= 640px) {
  .customer-editions {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--bg);
  }
  .customer-editions li + li { border-top: 1px solid var(--line); }
  .customer-edition, a.customer-edition {
    min-height: 56px;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .customer-editions li:first-child .customer-edition { border-start-start-radius: var(--radius-card); border-start-end-radius: var(--radius-card); }
  .customer-editions li:last-child .customer-edition { border-end-start-radius: var(--radius-card); border-end-end-radius: var(--radius-card); }
  .customer-edition-icon { width: 36px; height: 36px; flex-basis: 36px; }
}
@media (width <= 480px) {
  .dashboard-metrics, .metrics-grid, .quick-grid, .quick-grid.commission-totals, .product-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar .env-label { display: none; }
  .dashboard-banner, .customer-hero { align-items: flex-start; flex-direction: column; padding: 20px; }
  .dashboard-product-tools { row-gap: 4px; }
  .record-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .record-filters > .select-control { min-width: 0; }
  .record-filters > .search-control { grid-column: 1 / -1; width: 100%; }
  .dashboard-announcement .btn { grid-column: 2; justify-self: start; }
  .dashboard-announcement { grid-template-columns: auto minmax(0, 1fr); }
  .dialog { padding: 20px; }
  .login-card .panel { padding: 20px; }
  .agency-opening-head, .agency-opening-body { gap: 12px; padding: 16px 20px; }
  .agency-preview { grid-template-columns: minmax(0, 112px) auto; align-items: center; justify-content: space-between; padding: 8px 12px; }
  .agency-preview img { width: 100%; max-height: 80px; }
  .agency-supply { gap: 8px; }
  .agency-manage-metrics {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
  }
  .agency-manage-metrics > div {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 56px;
    padding: 8px 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .agency-manage-metrics > div + div { border-top: 1px solid var(--line); }
  .agency-manage-metrics dd { font-size: 24px; line-height: 32px; }
  .agency-sale-figures > div { padding-inline: 8px; }
  .agency-sale-figures dd { font-size: 16px; line-height: 24px; }
  .agency-plan-table :is(td, th) { padding-inline: 8px; }
  .customer-product-bar .topbar-actions { gap: 4px; }
  .customer-product-bar .btn { padding-inline: 8px; font-size: 13px; }
  .customer-product-name { gap: 12px; }
  .customer-product-name .shop-icon { width: 48px; height: 48px; }
  .customer-product-name h1 { font-size: 24px; line-height: 32px; }
  .customer-showcase { padding-inline: 12px; }
  .customer-feature-list { grid-template-columns: minmax(0, 1fr); }
  .customer-guide { padding-inline: 8px; }
  .customer-gallery-dialog { padding: 8px; }
  .customer-writing-hero-inner { gap: 12px; padding: 16px 0; }
  .customer-writing-intro { gap: 12px; }
  .customer-writing-intro .customer-product-name { grid-template-columns: auto minmax(0, 1fr); }
  .customer-writing-intro .customer-product-name > div { gap: 4px; }
  .customer-writing-intro .customer-product-name h1 { font-size: 28px; line-height: 36px; }
  .customer-writing-intro .customer-product-name p { font-size: 13px; line-height: 20px; }
  .customer-writing-intro .customer-editions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 88px), 1fr)); }
  .customer-writing-intro .customer-edition {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 4px;
    min-height: 44px;
    padding: 8px;
  }
  .customer-writing-intro .customer-edition-action { display: none; }
  .customer-writing-intro .customer-edition-copy strong { font-size: 12px; }
  .customer-writing-order { gap: 12px; padding-block-start: 12px; }
  .customer-writing-page .customer-showcase { padding-block-start: 16px; }
  .customer-writing-page .customer-feature-list { grid-template-columns: minmax(0, 1fr); }
}
@media (forced-colors: active) {
  .select-control select { appearance: auto; padding-inline-end: 12px; }
  .select-control > .chevron { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  :is(.product-card, a.shop-product, a.metric):hover { transform: none; }
}
