/* MiniApps / Premium Web. Shared visual tokens, existing brand palette and role gates. */
:root {
  --ui-space: 8px;
  --ui-radius: 16px;
  --ui-radius-sm: 10px;
  --ui-panel: color-mix(in srgb, var(--surface) 96%, var(--text));
  --ui-quiet: var(--muted);
  --ui-edge: color-mix(in srgb, var(--text) 17%, var(--bg));
  --ui-control-edge: color-mix(in srgb, var(--text) 42%, var(--surface));
  --ui-selected: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --ui-fast: 160ms;
  --ui-enter: 240ms;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --line: var(--ui-edge);
  --line-strong: color-mix(in srgb, var(--accent) 48%, var(--surface));
  --hud-edge: var(--ui-edge);
  --hud-edge-strong: var(--line-strong);
  --marble-gold: var(--accent);
  --marble-deep: var(--surface);
  --marble-page: linear-gradient(var(--bg), var(--bg));
  --marble-surface: linear-gradient(var(--surface), var(--surface));
  --marble-tab: linear-gradient(var(--ui-panel), var(--ui-panel));
}
html { scroll-padding-top: calc(var(--header) + 24px); }
body { font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
html, body { background-attachment: scroll; }
.ambient, .ambient-grid { display: none; }
.ui-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.skip-content { position: fixed; top: 12px; left: 12px; z-index: 10050; padding: 14px 20px; border: 2px solid var(--text); border-radius: 10px; background: var(--surface); color: var(--text); transform: translateY(-160%); }
.skip-content:focus { transform: none; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
:where(button, a, input, select, textarea, summary, [tabindex]) { scroll-margin-block: calc(var(--header) + 24px) 190px; }
button { touch-action: manipulation; }
.glass, .panel, .card, .quick-card, .info-sheet, .cart-item, .ops-list,
.home-live-feed, .timeline-card, .catalog-product-section, .owner-section-nav, dialog,
.product-admin-card, .item-editor-section, .security-list, .security-row {
  outline: none;
  background-attachment: scroll;
  background-size: 100% 100%;
  backdrop-filter: none;
  box-shadow: none;
}
/* Shell: strong alignment, calm surfaces, one active destination. */
.global-header { padding-inline: 24px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: none; }
.identity { gap: 12px; }
.identity strong { font-size: 15px; letter-spacing: -.025em; }
.identity small { font-size: 10px; color: var(--ui-quiet); letter-spacing: .1em; }
.logo { width: 44px; height: 44px; border-radius: 12px; }
.header-copy { padding-left: 24px; }
.header-copy .eyebrow { font-size: 10px; color: var(--ui-quiet); }
.header-copy h2 { font-size: 19px; font-weight: 650; margin-top: 6px; }
.sidebar { inset: var(--header) auto 0 0; width: var(--sidebar); border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 24px 16px 16px; background: var(--bg); overflow-y: auto; }
.sidebar nav { gap: 12px; }
.sidebar .nav-label { font-size: 10px; line-height: 1.4; color: var(--ui-quiet); letter-spacing: .09em; margin: 12px 12px 8px; }
.sidebar nav button { min-height: 48px; padding: 10px 12px; grid-template-columns: 24px minmax(0,1fr) auto; gap: 10px; border-radius: 10px; }
.sidebar nav button>b { font-size: 13px; font-weight: 550; }
.sidebar nav button>span { display: grid; place-items: center; width: 24px; height: 24px; border: 0; background: none; color: inherit; }
.sidebar nav button[data-owner-section]>span { border: 0; background: none; color: inherit; }
.sidebar nav button.active { border-color: transparent; color: var(--text); background: var(--ui-selected); box-shadow: none; }
.sidebar nav button.active::before { left: 0; top: 14px; bottom: 14px; }
.sidebar nav button.active>span { filter: none; color: var(--accent); }
.sidebar nav button>em { font-size: 8px; padding: 4px; }
.sidebar .nav-group+.nav-group { margin: 0; padding-top: 8px; }
.side-bottom { padding-top: 28px; }
.session-note { padding: 16px 10px; border-top: 1px solid var(--line); }
.session-note b { font-size: 11px; }
.session-note small { font-size: 10px; color: var(--ui-quiet); }
.session-note>i { width: 6px; height: 6px; box-shadow: none; }
#menuBtn { width: 44px; height: 44px; }
.drawer-heading, .nav-backdrop { display: none; }
.workspace { padding: 40px clamp(24px,3.5vw,56px) 136px; }
.page { max-width: 1280px; }
.page-intro, .console-head { padding: 0 0 28px; margin-bottom: 28px; gap: 24px; }
.page-intro h1, .console-head h1 { margin: 12px 0; font-size: clamp(32px,4vw,52px); font-weight: 650; letter-spacing: -.055em; line-height: 1.08; }
.page-intro p, .console-head p { max-width: 64ch; color: var(--ui-quiet); font-size: 14px; line-height: 1.65; }
.eyebrow, .console-tag { font-size: 10px; letter-spacing: .12em; }
.console-tag { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.section-head h2, .panel-head h2 { font-size: 24px; font-weight: 650; line-height: 1.15; letter-spacing: -.035em; }
.section-meta { font-size: 11px; color: var(--ui-quiet); }
/* Home: editorial introduction and a short, useful route into the catalog. */
.hero { min-height: 0; margin-top: 0; padding: clamp(28px,4vw,56px); gap: 40px; align-items: center; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: none; }
.hero::before, .hero::after { display: none; }
.hero-copy { flex: 1; }
.hero-copy>.eyebrow { display: inline-block; padding: 0; border: 0; border-radius: 0; background: none; font-size: 10px; }
.hero h1 { max-width: 15ch; font-size: clamp(38px,4.8vw,68px); font-weight: 650; line-height: 1.04; letter-spacing: -.06em; margin: 24px 0; text-wrap: balance; }
.hero-description, .hero p { max-width: 56ch; color: var(--ui-quiet); font-size: 15px; line-height: 1.7; }
.hero-actions { margin-top: 28px; }
.hero-guide { flex: 0 0 220px; padding-left: 28px; border-left: 1px solid var(--line); }
.hero-guide>span { display: block; font-size: 10px; letter-spacing: .12em; color: var(--ui-quiet); }
.hero-guide ol { display: grid; gap: 24px; list-style: none; padding: 0; margin: 24px 0 0; counter-reset: guide; }
.hero-guide li { position: relative; padding-left: 32px; counter-increment: guide; }
.hero-guide li::before { content: counter(guide,decimal-leading-zero); position: absolute; top: 2px; left: 0; font-size: 11px; color: var(--accent); font-variant-numeric: tabular-nums; }
.hero-guide b { font-size: 13px; font-weight: 600; }
.hero-guide small { display: block; margin-top: 5px; font-size: 12px; color: var(--ui-quiet); line-height: 1.5; }
.dashboard-shortcuts { gap: 0; margin: 24px 0 40px; border-block: 1px solid var(--line); }
.dashboard-shortcuts button { min-height: 100px; padding: 24px 16px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.dashboard-shortcuts button:last-child { border-right: 0; }
.dashboard-shortcuts b { font-size: 13px; }
.dashboard-shortcuts small { font-size: 11px; color: var(--ui-quiet); line-height: 1.5; }
.dashboard-shortcuts>button>span { font-size: 11px; font-variant-numeric: tabular-nums; }
.home-live-feed { padding: 20px 24px; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 24px; background: var(--surface); }
.home-live-feed::after { display: none; }
.live-feed-head h2 { font-size: 20px; }
.home-live-feed .timeline-card { min-height: 0; border-radius: 10px; background: var(--bg); }
.timeline-card p { font-size: 13px; color: var(--ui-quiet); line-height: 1.6; }
.feed-label { font-size: 9px; }
.feed-index time { font-size: 10px; }
/* Catalog: section dividers replace nested panels; media stays central. */
.catalog-category-filter { justify-content: flex-start; margin: 0 0 32px; padding: 4px; border-radius: 12px; background: var(--surface); box-shadow: none; }
.catalog-category-filter button { min-height: 44px; padding-inline: 16px; font-size: 12px; text-transform: none; letter-spacing: 0; border-radius: 8px; }
.catalog-category-filter button.active { border-color: var(--line-strong); background: var(--ui-selected); box-shadow: none; }
.catalog-category-filter button small { font-size: 10px; }
.catalog-product-section { padding: 0 0 32px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.catalog-section-head { padding-left: 48px; margin-bottom: 24px; align-items: center; }
.catalog-section-head::before { width: 32px; height: 32px; border: 0; border-radius: 0; box-shadow: none; font-size: 12px; color: var(--ui-quiet); }
.catalog-section-head h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.035em; }
.catalog-section-head>small { font-size: 11px; }
.catalog-section-head p { font-size: 13px; color: var(--ui-quiet); }
.product-catalog { max-width: 820px; gap: 24px; }
.product-catalog.compact-grid { max-width: none; gap: 20px; }
.product-card, .product-admin-card, .product-detail-shell { border-color: var(--line)!important; box-shadow: none!important; }
.product-card { padding: 8px; gap: 0; border-radius: 18px; background: var(--surface); }
.product-card::before, .product-card::after, .product-admin-card::after, .product-lower::before, .product-lower::after { display: none; }
.product-media-frame, .compact-grid .product-media-frame { border-radius: 12px; }
.product-media-frame .menu-media { transition: transform 320ms var(--ease); }
.product-lower { border-radius: 0; box-shadow: none!important; }
.product-copy { padding: 24px 16px; }
.product-copy h3 { font-size: 28px; letter-spacing: -.04em; line-height: 1.15; }
.product-copy p { font-size: 14px; color: var(--ui-quiet); line-height: 1.65; }
.product-catalog.compact-grid .product-copy { padding: 20px 12px; min-height: 0; }
.product-catalog.compact-grid .product-copy h3 { height: auto; font-size: 23px; line-height: 1.15; }
.product-catalog.compact-grid .product-copy p { height: auto; font-size: 13px; line-height: 1.6; }
.product-card-tag-row, .product-catalog.compact-grid .product-card-tag-row { max-height: none; min-height: 0; flex-wrap: wrap; gap: 6px; }
.product-tag-button, .product-catalog.compact-grid .product-tag-button { min-height: 24px; padding: 4px 8px; max-width: 100%; font-size: 10px; line-height: 1.3; letter-spacing: .02em; }
.product-producer { font-size: 11px; }
.product-details-trigger { min-height: 44px; font-size: 12px; }
.product-pricing, .product-catalog.compact-grid .product-pricing { padding: 20px 12px; min-height: 0; background: none; }
.pricing-head>span, .pricing-head small { font-size: 10px; }
.product-pricing .price-list li:nth-child(n) { min-height: 40px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.product-pricing .price-list span, .product-pricing .price-list b { font-size: 13px; }
.purchase-label { font-size: 10px; }
.purchase-control select, .purchase-control .primary { min-height: 48px; font-size: 13px; }
.menu-media-placeholder { background: var(--ui-panel); }
.menu-media-placeholder b { color: var(--ui-quiet); font-weight: 450; }
.product-detail-content { padding: 32px; gap: 16px; }
.product-detail-content h2 { font-size: clamp(30px,4vw,44px); line-height: 1.1; }
.product-detail-content>p { font-size: 14px; color: var(--ui-quiet); line-height: 1.7; }
.product-detail-tags .product-tag-button { font-size: 11px; padding: 6px 10px; }
.product-detail-price { min-height: 52px; border-radius: 10px; border-color: var(--ui-control-edge); background: var(--surface); }
.product-detail-price span, .product-detail-price b { font-size: 14px; }
.product-detail-price:has(input:checked) { background: var(--ui-selected); border-color: var(--accent); }
/* Shared form controls and operational workspaces. */
.primary, .ghost, .cart-open, .text-button { min-height: 44px; font-size: 12px; border-radius: 10px; letter-spacing: .01em; text-transform: none; transition: background var(--ui-fast), border-color var(--ui-fast), box-shadow var(--ui-fast), transform var(--ui-fast); }
.primary { background: var(--button-accent); box-shadow: none; border: 1px solid transparent; }
.primary::before, .ghost::before { display: none; }
.ghost { border-color: var(--ui-control-edge); background: transparent; box-shadow: none; }
button:disabled { cursor: not-allowed; opacity: .5; transform: none!important; }
label { font-size: 13px; color: var(--text); gap: 8px; }
label small { font-size: 12px; color: var(--ui-quiet); }
input, select, textarea { border-color: var(--ui-control-edge); border-radius: 10px; background: var(--bg); padding: 12px; min-height: 44px; font-size: 14px; }
input[type=checkbox], input[type=radio] { min-height: 0; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent); }
.management-workspace { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
.panel, .card, .info-sheet, .management-workspace form { padding: 24px; border-radius: 16px; background: var(--surface); }
.panel-head { padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel p, .card p { font-size: 14px; color: var(--ui-quiet); line-height: 1.6; }
.quick-grid { grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 12px; margin-bottom: 28px; }
.quick-card { padding: 20px; border-radius: 12px; background: var(--surface); }
.quick-card b { color: var(--text); font-size: 36px; font-weight: 550; margin: 12px 0 8px; font-variant-numeric: tabular-nums; }
.quick-card span { font-size: 10px; color: var(--ui-quiet); }
.quick-card small { font-size: 11px; letter-spacing: 0; color: var(--ui-quiet); }
.content-tabs.segmented { padding: 0; gap: 24px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; overflow-x: auto; }
.content-tabs.segmented button { flex: 0 0 auto; min-height: 48px; padding: 12px 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-size: 13px; white-space: nowrap; }
.content-tabs.segmented button.active { background: none; color: var(--text); border-bottom-color: var(--accent); box-shadow: none; }
.view-toggle { border-radius: 10px; background: var(--surface); box-shadow: none; }
.view-toggle button, .stats-range button { min-height: 40px; padding: 10px 16px; font-size: 12px; }
.owner-section-nav { padding: 0 0 12px; gap: 16px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.owner-nav-cluster, .owner-nav-cluster:nth-child(2) { grid-template-columns: repeat(2,minmax(180px,1fr)); padding: 28px 0 0; border: 0; background: none; }
.owner-nav-cluster::before { top: 4px; left: 0; font-size: 10px; color: var(--ui-quiet); }
.owner-section-nav .owner-nav-cluster button { width: 200px; min-height: 80px; border-radius: 12px; padding: 12px; background: var(--surface); }
.owner-section-nav button b { font-size: 13px; }
.owner-section-nav button small { font-size: 11px; line-height: 1.4; }
.owner-section-nav button.active { transform: none; box-shadow: none; background: var(--ui-selected); }
.owner-save-bar { padding: 20px; border-radius: 12px; background: var(--ui-panel); }
.owner-section-group legend { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.ops-main>b, .order-list-customer b { font-size: 13px; }
.ops-main>small, .order-list-customer small { font-size: 11px; color: var(--ui-quiet); }
.ops-row { min-height: 80px; }
.ops-status, .ops-channel { font-size: 10px; }
.ops-date { font-size: 11px; }
.order-list-total b { font-size: 20px; }
.order-list-meta span, .order-list-meta time { font-size: 10px; }
.order-list-note { font-size: 12px; }
.product-admin-body h3 { font-size: 20px; }
.product-admin-body p { font-size: 12px; }
.product-admin-body .row-actions { gap: 8px; flex-wrap: wrap; }
.product-admin-body .row-actions .move-item { display: inline-flex; }
.product-admin-body .row-actions button { min-width: 0; }
.row-action-menu>div button { min-height: 44px; font-size: 12px; }
.stat-kpi { border-radius: 12px; padding: 24px; background: var(--surface); box-shadow: none; }
.stat-kpi::before, .stat-kpi::after { display: none; }
.stat-kpi>small, .stat-kpi>em { font-size: 12px; color: var(--ui-quiet); }
.stat-kpi>b { font-weight: 550; font-variant-numeric: tabular-nums; }
.stats-chart-meta small, .stats-chart-meta em, .stats-chart-legend { font-size: 11px; }
.event { padding: 16px; border-radius: 10px; }
.event p, .event small { font-size: 12px; }
.status-pill { font-size: 10px; min-height: 28px; letter-spacing: .04em; box-shadow: none; }
/* Checkout and content pages. */
.cart-dock { min-height: 76px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border-color: var(--line-strong); box-shadow: 0 8px 32px color-mix(in srgb,var(--bg) 45%,transparent); }
.cart-dock-copy b { font-size: 13px; }
.cart-dock-copy small { font-size: 12px; color: var(--ui-quiet); }
.cart-mark { background: var(--ui-selected); }
.cart-quantity { grid-template-columns: 44px 32px 44px; }
.cart-quantity button { width: 44px; min-height: 44px; }
.cart-item-copy>b { font-size: 15px; }
.cart-item-copy>small { font-size: 12px; }
.info-sheet { min-height: 0; padding: clamp(24px,5vw,56px); }
.info-sheet h1 { font-size: clamp(34px,5vw,56px); margin: 16px 0 32px; }
.info-sheet .rich-text { max-width: 68ch; line-height: 1.8; color: var(--ui-quiet); }
.empty-state { padding: 32px 24px; font-size: 14px; line-height: 1.6; color: var(--ui-quiet); border-color: var(--ui-edge); background: var(--surface); }
.app-footer { padding-block: 24px; }
.app-footer, .app-footer button, .app-footer a { font-size: 11px; color: var(--ui-quiet); }
.app-footer button, .app-footer a { min-height: 44px; display: inline-flex; align-items: center; }
/* Authentication: same materials, readable supporting text. */
.access-card { border-color: var(--line); border-radius: 20px; box-shadow: none; }
.access-card .auth-art, .access-card .auth-form { background: var(--surface); }
.access-card .auth-art h1 em { color: var(--accent); }
.access-card .auth-art p, .access-card .auth-form>p:not(.micro) { font-size: 14px; line-height: 1.7; color: var(--ui-quiet); }
.access-card #authForm label { font-size: 12px; color: var(--ui-quiet); letter-spacing: .02em; text-transform: none; }
.access-card #authForm input { border-color: var(--ui-control-edge); }
.access-card .micro, .access-footline, .access-footline b { font-size: 11px; color: var(--ui-quiet); }
.access-card .trust-row span { font-size: 10px; color: var(--ui-quiet); }
.access-card::after { animation: none!important; }
/* Motion is feedback, not a loading requirement. */
.page.active { animation: premiumPage var(--ui-enter) var(--ease); }
dialog[open] { animation: premiumDialog 200ms var(--ease); }
dialog::backdrop { background: color-mix(in srgb,var(--bg) 80%,transparent); backdrop-filter: blur(6px); }
.toast { border-radius: 12px; font-size: 13px; }
.live-pulse, .access-live i, .access-footline i, .sale-hype-badge { animation: none; }
@keyframes premiumPage { from { opacity: .7; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes premiumDialog { from { opacity: .5; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@media (hover:hover) and (pointer:fine) {
  .sidebar nav button:hover { transform: none; background: var(--ui-selected); }
  .primary:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: none; }
  .ghost:not(:disabled):hover { background: var(--ui-selected); border-color: var(--text); }
  .product-card:hover { transform: none; border-color: var(--line-strong)!important; }
  .product-media-frame:hover .menu-media { transform: scale(1.025); }
  .dashboard-shortcuts button:hover, .quick-card:hover { transform: none; background: var(--ui-selected); }
}
button:not(:disabled):active { transform: scale(.985); }
@media (min-width:951px) { .nav-backdrop { display: none!important; } }
@media (max-width:1100px) { .management-workspace { grid-template-columns: 1fr; } .hero-guide { flex-basis: 180px; padding-left: 24px; } }
@media (max-width:950px) {
  :root { --header: calc(72px + env(safe-area-inset-top,0px)); }
  .global-header { padding: env(safe-area-inset-top,0px) 20px 0; }
  .workspace { padding: 28px 24px calc(204px + env(safe-area-inset-bottom,0px)); }
  body:not([data-surface=user]) .workspace { padding-bottom: calc(48px + env(safe-area-inset-bottom,0px)); }
  .sidebar { inset: var(--header) auto 0 0; width: min(320px,88vw); padding: 16px 16px max(16px,env(safe-area-inset-bottom)); transform: translateX(-102%); visibility: hidden; transition: transform 220ms var(--ease), visibility 220ms; z-index: 62; background: var(--surface); }
  .sidebar.open { transform: none; visibility: visible; }
  .drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 8px 16px; border-bottom: 1px solid var(--line); }
  .drawer-heading b { font-size: 16px; }
  #closeNav { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
  .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: var(--header) 0 0; z-index: 61; border: 0; border-radius: 0; background: color-mix(in srgb,var(--bg) 72%,transparent); transform: none; }
  .dashboard-shortcuts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-shortcuts button { padding: 20px 12px; grid-template-columns: 1fr auto; gap: 12px; }
  .dashboard-shortcuts button>div { grid-row: 2; grid-column: 1/-1; }
  .hero-guide { display: none; }
  .hero { margin-top: 0; }
  .cart-dock { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom,0px)); }
  .mobile-footer { left: 0; right: 0; bottom: 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom,0px)); border-radius: 0; border: 0; border-top: 1px solid var(--line); background: var(--bg); box-shadow: none; }
  .mobile-footer button { min-height: 52px; gap: 4px; font-size: 11px; color: var(--ui-quiet); }
  .mobile-footer button>span { display: grid; place-items: center; }
  .mobile-footer button.active { background: var(--ui-selected); color: var(--text); }
  .mobile-footer button.active .ui-icon { color: var(--accent); }
  input, select, textarea { font-size: 16px; }
}
@media (max-width:680px) {
  .global-header { padding-inline: 16px; }
  .workspace { padding-inline: 16px; padding-top: 24px; }
  .hero { padding: 28px 24px; border-radius: 16px; }
  .hero h1 { font-size: clamp(34px,9.5vw,48px); margin-block: 20px; }
  .hero-description, .hero p { font-size: 14px; }
  .hero-actions { margin-top: 24px; }
  .hero-actions .primary { width: 100%; min-height: 48px; }
  .dashboard-shortcuts { grid-template-columns: 1fr; margin: 20px 0 32px; }
  .dashboard-shortcuts button { min-height: 84px; grid-template-columns: 24px minmax(0,1fr) 20px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 4px; }
  .dashboard-shortcuts button:last-child { border-bottom: 0; }
  .dashboard-shortcuts button>div { grid-row: auto; grid-column: auto; }
  .home-live-feed { padding: 16px; }
  .page-intro, .console-head { gap: 16px; padding-bottom: 20px; margin-bottom: 24px; }
  .page-intro h1, .console-head h1 { font-size: 34px; }
  .catalog-controls { justify-items: start; }
  .catalog-category-filter { margin-bottom: 24px; }
  .catalog-product-section { padding-bottom: 24px; }
  .catalog-section-head h2 { font-size: 22px; }
  .product-catalog.compact-grid { gap: 12px; }
  .product-catalog.compact-grid .product-copy { padding: 16px 8px; }
  .product-catalog.compact-grid .product-copy h3 { font-size: 18px; }
  .product-catalog.compact-grid .product-copy p { font-size: 12px; }
  .product-catalog.compact-grid .product-pricing { padding: 16px 8px; }
  .product-catalog.compact-grid .purchase-control { grid-template-columns: 1fr; }
  .product-card { border-radius: 14px; padding: 6px; }
  .product-detail-content { padding: 24px 16px; }
  .panel, .card, .management-workspace form { padding: 20px 16px; }
  .quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .quick-card { padding: 16px; }
  .content-tabs.segmented { gap: 20px; }
  .owner-nav-cluster, .owner-nav-cluster:nth-child(2) { grid-template-columns: 1fr; flex-basis: min(88%,300px); }
  .owner-section-nav .owner-nav-cluster button { width: 100%; }
  .owner-save-bar { flex-wrap: wrap; padding: 16px; }
  .owner-save-bar .primary { width: 100%; }
  .cart-dock { padding: 12px; gap: 10px; }
  .cart-dock-copy b { font-size: 12px; }
  .cart-dock-copy small { font-size: 11px; }
  .cart-item { gap: 10px; padding: 16px 12px; }
  .cart-quantity { grid-template-columns: 44px 32px 44px; }
  .access-card .auth-form { padding: 24px; }
}
@media (max-width:380px) { .product-catalog.compact-grid, .product-library-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
  html.booting #loadingView .loading-frame-stage img { opacity: 1!important; filter: none!important; transform: none!important; }
}

/* Product varieties: catalog choice, editor and order snapshot. */
.strain-picker { display: grid; gap: 8px; margin: 16px 0; min-width: 0; }
.strain-picker label, .strain-name { font-weight: 600; }
.strain-picker select { width: 100%; max-width: 100%; min-height: 44px; }
.strain-summary { display: block; color: var(--text); font-size: 14px; overflow-wrap: anywhere; margin: 6px 0; }
.strain-editor-rows { display: grid; gap: 12px; }
.strain-editor-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px 16px; align-items: center; border: 1px solid var(--ui-control-edge); border-radius: var(--ui-radius-sm); padding: 16px; background: var(--surface); }
.strain-editor-row:focus-within { border-color: var(--accent); }
.strain-editor-row input:not([type=checkbox]) { width: 100%; min-width: 0; }
.strain-active { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; }
.strain-active input { width: 20px; height: 20px; accent-color: var(--accent); }
.strain-row-actions { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 8px; }
.strain-row-actions button, [data-strain-add] { min-height: 44px; min-width: 44px; transition: border-color var(--ui-fast), background-color var(--ui-fast); }
.strain-editor-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.strain-empty, [data-strain-count] { color: var(--ui-quiet); }
.strain-error { color: var(--text); border-left: 3px solid var(--accent); padding-left: 12px; font-size: 14px; overflow-wrap: anywhere; }
.strain-error:empty { display: none; }
.strain-legacy-description { margin-top: 20px; }
.strain-legacy-description summary { cursor: pointer; padding: 12px 0; }
.strain-legacy-description label { margin-top: 12px; }
.receipt-items small { display: block; }
@media (max-width: 560px) { .strain-editor-row { grid-template-columns: minmax(0,1fr); } .strain-row-actions { grid-column: 1; } }
@media (prefers-reduced-motion: reduce) { .strain-row-actions button, [data-strain-add] { transition: none; } }
/* The floating shortcut must not cover controls inside checkout. */
body:has(#page-cart.active) #cartDock { display: none; }

/* 21st.dev adapted patterns: selected surface (ibelick) and transform progress (ddoemonn). */
:root { --ui-enter: 320ms; --ui-raised: color-mix(in srgb,var(--surface) 92%,var(--text)); --ui-soft: color-mix(in srgb,var(--accent) 7%,var(--surface)); }
.topbar { border-bottom-color: var(--ui-edge); }
.page-intro, .console-head { padding-bottom: 24px; border-bottom: 1px solid var(--ui-edge); margin-bottom: 28px; }
.page-intro h1, .console-head h1 { font-weight: 600; letter-spacing: -.045em; }
.hero { border: 1px solid var(--ui-edge); border-radius: 24px; background: var(--surface); overflow: hidden; }
.hero-copy { padding: clamp(24px,4vw,56px); }
.hero-guide { background: var(--ui-soft); border-left: 1px solid var(--ui-edge); padding: 32px; }
.dashboard-shortcuts { gap: 12px; border: 0; }
.dashboard-shortcuts button { border: 1px solid var(--ui-edge); border-radius: 14px; padding: 24px; background: var(--surface); }
.dashboard-shortcuts button:last-child { border-right: 1px solid var(--ui-edge); }
.product-card { border-radius: 20px; padding: 10px; background: var(--surface); transition: border-color 180ms,box-shadow 180ms; }
.product-copy { padding: 24px 18px 16px; }
.product-copy h3 { font-weight: 600; }
.product-pricing, .product-catalog.compact-grid .product-pricing { margin: 0 4px 4px; padding: 20px 16px; border: 1px solid var(--ui-edge); border-radius: 14px; background: var(--ui-raised); }
.strain-picker { padding: 14px; border: 1px solid var(--ui-control-edge); border-radius: 12px; background: var(--surface); transition: border-color 180ms,background-color 180ms; }
.strain-picker[data-selected=true] { border-color: var(--accent); background: var(--ui-soft); }
.strain-picker label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.strain-picker select { background: var(--bg); font-size: 16px; }
.strain-summary { display: inline-block; padding: 5px 9px; border: 1px solid var(--ui-edge); border-radius: 6px; background: var(--ui-soft); font-size: 13px; line-height: 1.5; }
.cart-item { border-radius: 16px; background: var(--surface); border-color: var(--ui-edge); padding: 20px; }
.cart-item-copy { min-width: 0; }
.cart-checkout { background: var(--ui-raised); border-top: 2px solid var(--accent); }
.product-admin-card, .order-list-entry { border-radius: 16px; background: var(--surface); }
.product-admin-body { padding: 20px; }
.item-editor-section { border-radius: 16px; border-color: var(--ui-edge); background: var(--surface); }
.item-editor-title { padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--ui-edge); }
.strain-editor-row { background: var(--ui-raised); }
.owner-section-nav, .content-tabs, .view-toggle, .stats-range { gap: 6px; padding: 6px; border: 1px solid var(--ui-edge); border-radius: 12px; background: var(--surface); }
.motion-tabs { position: relative; isolation: isolate; }
.motion-tabs>button { position: relative; z-index: 1; background: transparent!important; border-color: transparent!important; }
.motion-tabs>button.active { color: var(--text); }
.tab-motion-indicator { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; border: 1px solid var(--ui-control-edge); border-radius: 8px; background: var(--ui-soft); transform-origin: top left; }
.primary, .cart-open { font-size: 14px; font-weight: 650; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.page.active { animation: premiumPage 300ms var(--ease); }
dialog[open] { animation: premiumDialog 260ms var(--ease); border-color: var(--ui-control-edge); border-radius: 22px; }
@keyframes premiumPage { from { opacity: .65; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes premiumDialog { from { opacity: .6; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@media (hover:hover) { .product-card:hover { border-color: var(--ui-control-edge)!important; } .dashboard-shortcuts button:hover { background: var(--ui-raised); } }
@media (max-width: 650px) {
  .hero-copy { padding: 28px 20px; }
  .hero-guide { border-left: 0; border-top: 1px solid var(--ui-edge); padding: 24px; }
  .page-intro, .console-head { margin-bottom: 24px; padding-bottom: 20px; }
  .product-catalog.compact-grid .product-pricing { padding: 12px 8px; margin: 0; }
  .product-catalog.compact-grid .strain-picker { padding: 8px; }
  .cart-item { padding: 16px; }
  input, select, textarea { font-size: 16px; }
}
/* Loading follows real stages. The only looping motion represents pending work. */
#loadingView .loading-track { position: relative; height: 5px!important; visibility: visible!important; opacity: 1!important; overflow: hidden; border-radius: 4px!important; }
html.booting #loadingView .loading-track i, #loadingView .loading-track i { width: 100%!important; min-width: 0; transform: scaleX(var(--loading-fraction,.12)); transform-origin: left; animation: none!important; transition: transform 280ms var(--ease); will-change: auto; }
#loadingView .loading-track::after { content: ""; position: absolute; inset: 0; width: 40%; background: #b28b35; animation: pendingSweep 1.25s ease-in-out infinite; }
#loadingView.is-complete .loading-track::after { display: none; }
#loadingView.is-complete .loading-track i { transform: scaleX(1); }
html.booting #loadingView .loading-frame-stage img, #loadingView .loading-frame-stage img { filter: none!important; animation: brandArrival 700ms var(--ease) both!important; }
#loadingView.is-leaving { opacity: 0; pointer-events: none; transition: opacity 200ms ease-out; }
#loadingView .loading-a11y { display: block!important; position: absolute!important; width: 1px!important; height: 1px!important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.save-overlay:not(.hidden) .save-orbit i { animation: pendingTurn 1.4s linear infinite; }
.save-overlay:not(.hidden) .save-overlay-card { animation: premiumDialog 240ms var(--ease); }
@keyframes pendingSweep { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@keyframes pendingTurn { to { transform: rotate(360deg); } }
@keyframes brandArrival { from { opacity: .3; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
  html.booting #loadingView .loading-frame-stage img, #loadingView .loading-frame-stage img { animation: none!important; opacity: 1!important; transform: none!important; }
  #loadingView .loading-track::after { display: none; }
}

.mobile-footer.motion-tabs { position: fixed; }

/* Product purchase fields share one geometry at every card width. */
.product-card .product-lower { box-shadow: none!important; }
.product-card .product-lower::before, .product-card .product-lower::after { display: none; }
.product-card .product-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.product-card .product-copy h3 { margin: 0; overflow-wrap: anywhere; }
.product-card .product-description-preview { margin: 0; color: var(--ui-quiet); font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .product-details-trigger { margin-top: auto; }
.product-card .product-pricing { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.product-card .product-pricing .price-list { margin: 0; }
.product-card .strain-picker, .product-detail-content .strain-picker { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; gap: 8px; }
.product-card .product-pricing .purchase-control { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; margin: 0; width: 100%; }
.product-card .format-picker { display: grid; gap: 8px; width: 100%; min-width: 0; margin: 0; }
.product-card .format-picker>span, .product-card .strain-picker>label, .product-detail-content .strain-picker>label { margin: 0; font-size: 12px; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; color: var(--text); }
.product-card .product-pricing select, .product-detail-content .strain-picker select { display: block; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; min-height: 48px; height: 48px; margin: 0; padding: 0 36px 0 12px; font-size: 16px; line-height: normal; text-align: left; border: 1px solid var(--ui-control-edge); border-radius: 10px; background-color: var(--bg); }
.product-card .product-pricing .purchase-control .primary { width: 100%; min-height: 48px; height: auto; padding: 12px; font-size: 14px; }
.product-information { padding: 16px 0; border-block: 1px solid var(--ui-edge); }
.product-information h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.product-information p { margin: 0; color: var(--ui-quiet); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.product-detail-price { min-width: 0; }
.product-detail-price:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.product-detail-price span, .product-detail-price b { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 650px) {
 .product-card .product-copy { padding: 20px 12px; }
 .product-catalog.compact-grid .product-copy { padding: 16px 4px; }
 .product-catalog.compact-grid .product-copy h3 { font-size: 20px; }
 .product-catalog.compact-grid .product-pricing { padding: 12px 8px; }
 .product-catalog.compact-grid .product-pricing .strain-picker { padding: 0; }
 .product-catalog.compact-grid .product-description-preview { font-size: 13px; }
 .product-detail-content { padding: 24px 16px; }
}

/* Shared typography: existing UI family, deliberate weights and readable labels. */
:root { --type-body: 500; --type-label: 600; --type-bold: 700; --type-title: 750; }
body { font-weight: var(--type-body); line-height: 1.5; letter-spacing: 0; }
body :is(h1,h2,h3,h4,h5,h6,p,small,span,b,strong,label,legend,button,input,select,textarea,summary,a,li,td,th) { font-family: var(--font-ui); }
body :is(h1,h2,h3,h4,h5,h6) { font-weight: var(--type-title)!important; letter-spacing: -.035em; line-height: 1.15; overflow-wrap: anywhere; text-wrap: balance; }
body :is(b,strong) { font-weight: var(--type-bold)!important; }
body :is(button,summary), body :is(input,select,textarea) { font-weight: var(--type-label); letter-spacing: 0; }
body button { font-weight: var(--type-bold)!important; }
body :is(p,small) { font-weight: var(--type-body); }
body :is(label,legend,th) { font-weight: var(--type-label); }
body :is(.eyebrow,.console-tag,.nav-label,.section-label,.section-meta,.field-label,.purchase-label,.pricing-head,.status-pill,.feed-label) { font-weight: var(--type-bold)!important; letter-spacing: .06em; }
body :is(.page-intro,.console-head) h1 { font-size: clamp(32px,4vw,48px); letter-spacing: -.04em; line-height: 1.12; }
body :is(.page-intro,.console-head) p { font-size: 15px; line-height: 1.65; }
body :is(.section-head,.panel-head,.catalog-section-head) h2 { font-size: 24px; line-height: 1.2; }
body :is(.eyebrow,.console-tag,.nav-label,.section-label,.section-meta,.feed-label,.field-label) { font-size: 12px; line-height: 1.5; }
body :is(.identity small,.session-note small,.catalog-section-head>small,.pricing-head>span,.pricing-head small,.product-producer,.field-help) { font-size: 12px; line-height: 1.5; letter-spacing: .02em; }
body .sidebar nav button>b { font-size: 14px; }
body .mobile-footer button { font-size: 12px; letter-spacing: 0; }
body :is(.product-card .product-copy h3,.product-admin-card h3) { font-size: 28px; letter-spacing: -.03em; }
body .product-catalog.compact-grid .product-copy h3 { font-size: 22px; }
body :is(.product-information p,.product-description-preview,.cart-item p,.timeline-card p,.info-sheet p) { font-size: 15px; line-height: 1.65; }
body :is(.product-card .product-pricing select,.product-detail-content select,.form-grid input,.form-grid select,.form-grid textarea) { font-size: 16px; font-weight: var(--type-label); }
body :is(.price-list b,.price-hype strong,.cart-total,.stat-card strong,.stat-kpi strong) { font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.025em; }
body :is(.content-tabs,.owner-section-nav,.view-toggle,.stats-range) button { font-size: 13px; line-height: 1.35; }
body :is(.product-details-trigger,.product-tag-button,.strain-summary) { letter-spacing: .015em; }
body :is(.item-editor-title,.product-admin-body,.order-list-entry,.cart-item-copy) { overflow-wrap: anywhere; }
body .item-editor-title small { font-size: 13px; line-height: 1.5; }
body :is(.owner-access-key input[type=password],.secret-key,code,pre) { font-family: ui-monospace,monospace; }
@media (max-width:650px) {
 body .product-catalog.compact-grid .product-copy h3 { font-size: 20px; }
 body .product-catalog.compact-grid .product-description-preview { font-size: 14px; }
 body .content-tabs { flex-wrap: wrap; }
}

/* Marble veins: a single non-interactive layer, opaque reading surfaces above. */
#marbleBackdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; contain: strict; background: radial-gradient(ellipse at 12% 25%,color-mix(in srgb,var(--accent) 5%,transparent),transparent 55%),radial-gradient(ellipse at 90% 80%,color-mix(in srgb,var(--text) 4%,transparent),transparent 60%); }
#marbleBackdrop svg { display: block; width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
#marbleBackdrop path { vector-effect: non-scaling-stroke; }
.marble-stone { stroke: var(--text); stroke-width: 1; opacity: .065; }
.marble-light { stroke: var(--accent); stroke-width: 1.6; opacity: .08; animation: marbleGlow 12s ease-in-out infinite; }
.marble-light-b { animation-delay: -6s; animation-duration: 15s; }
#appView, .auth-shell { position: relative; z-index: 1; }
#backgroundMotionToggle { margin-bottom: 10px; }
#backgroundMotionToggle[aria-pressed=true] { border-color: var(--ui-control-edge); }
html.marble-paused .marble-light { animation-play-state: paused; }
html.marble-static .marble-light { animation: none; opacity: .1; }
@keyframes marbleGlow { 0%,100% { opacity: .07; } 45%,55% { opacity: .28; } }
@media (max-width:650px) { .marble-light { stroke-width: 1.2; } }
@media (prefers-reduced-motion:reduce) { .marble-light { animation: none!important; opacity: .1; } }
@media (forced-colors:active) { #marbleBackdrop { display: none; } }
