
:root {
  --page: #f3f5f4;
  --surface: #ffffff;
  --soft: #e9eeec;
  --ink: #161b1b;
  --muted: #4d5b57;
  --subtle: #5c6865;
  --line: #d8e0dc;
  --accent: #175948;
  --accent-soft: #deeee7;
  --positive: #1b634d;
  --danger: #a9343b;
  --stock-image: #dce5e2;
  --app-motion: cubic-bezier(.22,1,.36,1);
}
html[data-theme=dark] {
  --page: #090a0b;
  --surface: #141617;
  --soft: #202425;
  --ink: #f0f2f2;
  --muted: #adb8b5;
  --subtle: #a4afab;
  --line: #303637;
  --accent: #98d8c2;
  --accent-soft: #17392f;
  --positive: #a6e4cc;
  --danger: #ff9ca0;
  --stock-image: #252e2d;
  color-scheme: dark;
}

body { font-family: "Golos Text Variable", system-ui, sans-serif; }
button, input, textarea, select { font-family: inherit; }
main { padding-bottom: 32px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mobile-brand, .desktop-brand { font-size: 15px; font-weight: 650; letter-spacing: .015em; }
.mobile-brand { min-height: 44px; }
.desktop-brand { padding: 8px 0; }
.topbar { height: 64px; }
.avatar-button { font-weight: 600; }
.brand img { width: 44px; height: 32px; }
.mobile-brand img { width: 36px; height: 28px; }
.nav-item.active, .bottom-nav button.active { color: var(--accent); background: var(--accent-soft); }

.stock-hero {
  display: flex;
  align-items: center;
  min-height: 116px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
}
.stock-hero-copy { min-width: 0; }
.stock-hero h1 { margin: 0 0 10px; font-size: clamp(32px,4vw,44px); font-weight: 650; line-height: 1.02; letter-spacing: -.045em; }
.stock-hero p { display: flex; align-items:center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.stock-hero p span { display:inline-flex; align-items:baseline; gap:4px; }
.stock-hero p strong { color: var(--ink); font-size:15px; font-weight: 700; }
.stock-hero p i { width:4px; height:4px; border-radius:50%; background:var(--line); }

.stock-controls { display: flex; gap: 12px; margin: 16px 0 12px; }
.stock-controls .stock-search { flex: 1; max-width: none; min-width: 0; color: var(--muted); }
.stock-search svg, .stock-add svg { flex-shrink: 0; width: 18px; height: 18px; }
.stock-search input { height: 48px; font-size: 16px; }
.stock-controls .stock-add { flex-shrink: 0; gap: 8px; min-height: 48px; background: var(--accent); color: var(--surface); font-weight: 600; }
.stock-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.stock-filter {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: color 220ms var(--app-motion), background-color 220ms var(--app-motion), border-color 220ms var(--app-motion);
}
.stock-filter[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.stock-section { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 20px 0 12px; }
.stock-section h2 { font-size: 21px; font-weight: 600; }
#stock-result-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.stock-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.stock-unavailable { margin-top: 24px; }
.stock-unavailable > h3 { margin: 0 0 12px; color: var(--muted); font-size: 16px; font-weight: 600; }
.stock-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: auto;
  transition: border-color 260ms var(--app-motion), background-color 260ms var(--app-motion);
}
.stock-recent { border-color: var(--accent); }
.stock-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1.62;
  overflow: hidden;
  border-radius: 8px;
  background: var(--stock-image);
  isolation: isolate;
}
.stock-art img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter 300ms var(--app-motion); }
.stock-art img[data-art="reference"]:not([data-category-art="part"]) { filter: saturate(.7) brightness(.82); }
.stock-art img[data-art="product"], .stock-art img[data-category-art="part"] { object-fit: contain; mix-blend-mode: multiply; }
html[data-theme=dark] .stock-art img[data-art="product"], html[data-theme=dark] .stock-art img[data-category-art="part"] { mix-blend-mode: normal; }
html[data-theme=dark] .stock-art:has(img[data-art="product"]), html[data-theme=dark] .stock-art:has(img[data-category-art="part"]:not([data-art="upload"])) { background: #909e9b; }
.stock-art img[src$="/1/image"], .stock-art img[src$="/2/image"] { mix-blend-mode: normal; }
.stock-art img[data-art="product"][data-category-art="liquid"] {
  object-fit: cover;
  object-position: center 60%;
  filter: saturate(.85) brightness(.92);
  mix-blend-mode: normal;
}
.stock-new-label { position: absolute; top: 8px; left: 8px; padding: 4px 8px; color: var(--ink); background: var(--surface); border-radius: 6px; font-size: 11px; }
.stock-info { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px 4px 0; }
.stock-meta, .stock-variants { color: var(--muted); font-size: 12px; line-height: 1.4; }
.stock-info h3 { font-size: 16px; font-weight: 600; line-height: 1.28; overflow-wrap: anywhere; }
.stock-variants { overflow-wrap: anywhere; }
.stock-foot { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; padding-top: 8px; margin-top: auto; }
.stock-foot strong { font-size: 18px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stock-status { color: var(--muted); font-size: 11px; font-weight: 550; white-space: nowrap; }
.stock-status::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin: 0 5px 2px 0; background: currentColor; }
.stock-status[data-status="available"] { color: var(--positive); }
.stock-more { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin-top: 4px; padding: 0; border-top: 1px solid var(--line); border-radius: 0; text-align: left; color: var(--accent); font-size: 13px; font-weight: 550; }
.stock-more svg { width: 15px; height: 15px; }
.stock-empty { padding: 32px 16px; border: 1px solid var(--line); border-radius: 16px; text-align: center; background: var(--surface); }
.stock-empty svg { width: 28px; height: 28px; color: var(--muted); margin: auto; }
.stock-empty h3 { margin: 8px 0 4px; }
.stock-empty p { color: var(--muted); font-size: 13px; }
.stock-detail { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 16px; align-items: center; }
.stock-detail .stock-art { aspect-ratio: 1; }
.stock-detail strong { display: block; font-size: 21px; margin: 3px 0; }
.stock-detail small { display: block; margin-top: 4px; color: var(--subtle); font-size: 11px; }
.stock-detail-section { margin-top: 16px; }
.stock-detail-section h3 { font-size: 14px; margin-bottom: 6px; }
.stock-detail-section p, .stock-detail-section ul { color: var(--muted); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.stock-detail-section ul { padding-left: 18px; margin: 0; max-height: 184px; overflow: auto; }
.stock-detail-section li + li { margin-top: 4px; }
#stock-form > * + .form-grid, #stock-form .form-grid + .field { margin-top: 8px; }
#stock-form .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
#stock-form textarea { min-height: 76px; }
.admin-toolbar { flex-wrap: wrap; }
.bookmark-button[aria-pressed="true"], .bookmark-button[aria-pressed="true"]:hover { background: var(--accent); color: var(--surface); }

.settings-group { background: var(--surface); }
.settings-theme { min-width: 0; border: 0; margin: 0; padding: 14px 16px 12px; }
.settings-theme legend { float: left; width: 100%; display: inline-flex; gap: 10px; align-items: center; padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.settings-theme legend svg { width: 19px; height: 19px; color: var(--muted); }
.theme-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 4px; border-radius: 10px; background: var(--soft); }
.theme-options label { position: relative; cursor: pointer; }
.theme-options input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: inherit; }
.theme-options span { display: grid; place-items: center; padding: 0 3px; min-height: 44px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--muted); transition: color 240ms var(--app-motion), background-color 240ms var(--app-motion); }
.theme-options input:checked + span { color: var(--ink); background: var(--surface); }
.theme-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.settings-row { border-color: var(--line); }
.settings-row.settings-notice { cursor: pointer; border-top: 1px solid var(--line); }
.settings-copy { display: grid; gap: 2px; color: var(--ink); text-align: left; flex: 1; min-width: 0; }
.settings-copy small { color: var(--muted); font-size: 12px; }
.settings-arrow { margin-left: auto; color: var(--subtle); }
.settings-row > .settings-arrow svg { width: 15px; height: 15px; }
.settings-toggle[type=checkbox] { appearance: none; height: 28px; width: 48px; margin: 0 0 0 auto; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); display: grid; align-items: center; padding: 0 3px; cursor: pointer; transition: background-color 240ms var(--app-motion), border-color 240ms var(--app-motion); }
.settings-toggle::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: background-color 240ms var(--app-motion), transform 240ms var(--app-motion); }
.settings-toggle:checked { background: var(--accent); border-color: var(--accent); }
.settings-toggle:checked::after { background: var(--surface); transform: translateX(20px); }
.profile-logout { margin-top: 8px; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 210ms; animation-timing-function: var(--app-motion); }

@media (hover: hover) and (pointer: fine) {
  .stock-filter[aria-pressed="false"]:hover { background-color: var(--soft); }
  .stock-more:hover { color: var(--ink); }
  .stock-controls .stock-add:hover { background: var(--ink); }
}
@media (max-width: 1020px) and (min-width: 721px) { .stock-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 720px) {
  .topbar { height: 60px; }
  .phone-layout-link { display: none; }
  html[data-device=iphone18] .topbar { height: 99px; padding-top: 39px; }
  main { padding-top: 12px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .stock-hero { min-height: 128px; padding: 16px; border-radius: 16px; }
  .stock-controls { margin-top: 12px; gap: 8px; }
  .stock-controls .stock-add { padding: 0 10px; font-size: 12px; gap: 6px; }
  .stock-filters { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 6px; }
  .stock-filter { padding: 0 4px; font-size: 12px; }
  .stock-filter:nth-child(1) { grid-column: span 2; }
  .stock-filter:nth-child(2), .stock-filter:nth-child(3) { grid-column: span 5; }
  .stock-filter:nth-child(4) { grid-column: span 6; }
  .stock-filter:nth-child(5), .stock-filter:nth-child(6) { grid-column: span 3; }
  .stock-section { margin-top: 14px; }
  .stock-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .stock-info h3 { font-size: 15px; }
  .stock-info { padding: 8px 2px 0; }
  .stock-art { aspect-ratio: 1.46; }
  .stock-foot strong { font-size: 16px; }
  .bottom-nav { height: 64px; padding: 6px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); }
  html[data-theme=dark] .bottom-nav { background: var(--surface); }
  .bottom-nav button { min-width: 0; min-height: 48px; padding: 0; border-radius: 14px; transition: color 280ms var(--app-motion), background-color 280ms var(--app-motion); }
  .bottom-nav button:active:not(:disabled) { transform: none; }
  .bottom-nav button > span { display: grid; place-items: center; transition: transform 350ms var(--app-motion); }
  .bottom-nav button.active > span { transform: translateY(-4px); }
  .bottom-nav button::after { content: ""; position: absolute; width: 4px; height: 4px; bottom: 7px; left: calc(50% - 2px); border-radius: 50%; background: currentColor; opacity: 0; transition: opacity 240ms var(--app-motion); }
  .bottom-nav button.active::after { bottom: 7px; opacity: 1; }
  html[data-device=iphone18] .bottom-nav { bottom: 25px; }
  #stock-form input, #stock-form select, #stock-form textarea { min-width: 0; font-size: 16px; }
}
@media (max-width: 360px) {
  .stock-search input { padding-left: 34px; }
  .stock-search svg { left: 10px; width: 16px; }
  .stock-controls .stock-add { padding-inline: 8px; }
  .stock-add svg { width: 16px; }
  .stock-meta, .stock-variants { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .bottom-nav button.active > span { transform: none; }
  .stock-art img, .theme-options span, .settings-toggle, .settings-toggle::after, .bottom-nav button > span { transition: none; }
}



.topbar { position: relative; z-index: 14; }
.avatar-anchor { position: relative; width: 44px; height: 44px; }
.avatar-anchor .avatar-button, .profile-avatar { position: relative; overflow: hidden; display: grid; place-items: center; padding: 0; }
.telegram-avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-initial { display: grid; place-items: center; }
.account-initial svg { width: 22px; height: 22px; }
.theme-quick { width: 44px; height: 44px; color: var(--muted); background: var(--soft); border-radius: 50%; }
.theme-quick svg { width: 18px; height: 18px; }
.avatar-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 144px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 8px 24px #0002;
  opacity: 1;
  transform: none;
  transition: opacity 200ms var(--app-motion), transform 220ms var(--app-motion), visibility 220ms;
}
.avatar-menu[aria-hidden="true"] { visibility: hidden; opacity: 0; transform: translateY(-5px); }
.avatar-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; min-height: 44px; border-radius: 8px; padding: 0 8px; font-size: 14px; }
.avatar-menu svg { color: var(--muted); width: 17px; height: 17px; }
.avatar-menu button:hover { background: var(--soft); }

.stock-meta { display: inline-flex; gap: 5px; align-items: center; }
.stock-meta svg { width: 13px; height: 13px; opacity: .78; }
.stock-card .stock-meta > svg, .stock-meta-strength { flex: none; }
.stock-meta-section { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-meta-strength { white-space: nowrap; }
@media (max-width: 400px) {
  .stock-card .stock-meta { gap: 3px; font-size: 11px; }
}
.stock-hero { min-height: 136px; }
.stock-detail h3 { font-weight: 600; }
.stock-detail { grid-template-columns: 92px minmax(0,1fr); }
.stock-detail-section ul { max-height: 145px; }
.stock-detail .stock-status { display: block; }
.stock-detail .sheet-footer button { min-height: 44px; }
.stock-detail ~ .sheet-footer { margin-top: 16px; }
.stock-more { transition: color 230ms var(--app-motion); }
.stock-more svg { transition: transform 280ms var(--app-motion); }
.stock-more:hover svg { transform: translateX(2px); }
.stock-filters { gap: 6px; }
.stock-filter { background: transparent; border-color: transparent; }
.stock-filter[aria-pressed="true"] { border-color: transparent; }
.stock-filters-admin .stock-filter { border-color: var(--line); }

.profile-layout { max-width: 620px; }
.profile-identity { padding: 16px; margin: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; background: var(--surface); }
.profile-identity > div:nth-child(2) { flex: 1; min-width: 0; }
.profile-identity h2 { font-size: 20px; overflow-wrap: anywhere; }
.profile-identity p { color: var(--muted); font-size: 12px; }
.telegram-id { font-variant-numeric: tabular-nums; }
.profile-role { margin: 0 0 0 auto; white-space: nowrap; align-self: center; background: var(--soft); color: var(--muted); }
.profile-balance { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 10px 0 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.profile-balance > span { color: var(--accent); background: var(--accent-soft); padding: 8px; border-radius: 9px; }
.profile-balance small, .profile-balance strong { display: block; }
.profile-balance small { color: var(--muted); font-size: 12px; }
.profile-balance strong { font-size: 21px; font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1.25; }
.settings-theme, .settings-row { padding-left: 16px; padding-right: 16px; }
.settings-row { min-height: 55px; gap: 10px; text-align: left; }
.settings-row strong { flex: 1; font-size: 14px; }
.settings-copy strong { line-height: 1.3; }
.settings-row.settings-notice { padding-block: 12px; }
.group-caption { margin: 16px 0 8px 4px; font-size: 13px; font-weight: 550; letter-spacing: 0; }
.privacy-account { padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); }
.privacy-account summary { cursor: pointer; margin-bottom: 8px; }
#overlay .sheet { transition-timing-function: var(--app-motion); }
.account-records { display: grid; gap: 8px; }
.account-records + form { margin-top: 16px; }
.account-record { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.account-record p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0; }
.account-record small, .account-note { color: var(--muted); font-size: 13px; }
.account-record strong { display: block; font-size: 13px; }
.account-answer { padding-left: 8px; border-left: 2px solid var(--accent); }
.review-score { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--accent); }
.review-score svg { width: 16px; height: 16px; }
.account-admin h2 { margin-bottom: 12px; }
.account-admin { max-width: 800px; }
.support-answer { margin-top: 12px; }
.balance-cell { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); min-height: 36px; padding: 0; white-space: nowrap; }
.balance-cell svg { width: 15px; height: 15px; }
.manage-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.manage-tabs button { min-height: 44px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 13px; }
.manage-tabs button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.admin-stock-title h2 { margin-bottom: 2px; }
.admin-stock-title p { color: var(--muted); font-size: 13px; }
.intake-list { display: grid; gap: 8px; max-width: 760px; }
.intake-row { display: grid; grid-template-columns: 62px minmax(0,1fr) 44px; gap: 12px; align-items: center; padding: 8px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); }
.intake-row .stock-art { aspect-ratio: 1; }
.intake-row h3 { font-size: 15px; }
.intake-row small { color: var(--accent); font-size: 11px; }
.intake-row > button { width: 44px; height: 44px; color: var(--muted); }
.intake-row > button svg { width: 18px; height: 18px; }

@media (max-width: 720px) {
  .shell { display: grid; grid-template-rows: minmax(0,1fr) auto; height: 100dvh; min-height: 0; overflow: hidden; }
  .workspace { display:grid; grid-template-rows:auto minmax(0,1fr); min-height:0; overflow:hidden; }
  main { min-height: 0; width: 100%; padding-bottom: 18px; overflow: auto; overscroll-behavior-y: contain; }
  .page { min-height: 0; }
  .topbar { padding-inline: 12px; gap: 4px; }
  .topbar-right { gap: 6px; }
  .topbar-right .connection { display: none; }
  .mobile-brand { gap: 5px; font-size: 13px; }
  .stock-hero { min-height: 108px; }
  .stock-hero h1 { font-size: 33px; margin-bottom: 5px; }
  .stock-orca { opacity: .9; }
  .stock-controls { margin: 10px 0 8px; }
  .stock-filter { padding: 0 2px; min-height: 44px; font-size: 11px; }
  .stock-filters:not(.stock-filters-admin) { grid-template-columns: .75fr 1.28fr 1.32fr .9fr .78fr; gap: 2px; background: var(--soft); padding: 3px; border-radius: 12px; }
  .stock-filters:not(.stock-filters-admin) .stock-filter { grid-column: auto; }
  .stock-filters-admin .stock-filter:nth-child(4) { grid-column: span 5; }
  .stock-filters-admin .stock-filter:nth-child(5) { grid-column: span 3; }
  .stock-filters-admin .stock-filter:nth-child(6) { grid-column: span 4; }
  .stock-art { aspect-ratio: 1.6; }
  .stock-section { margin-top: 11px; }
  .bottom-nav { position: relative; inset: auto; height: 56px; margin: 2px 12px max(8px,env(safe-area-inset-bottom)); padding: 4px; border-radius: 18px; box-shadow: none; }
  .bottom-nav, html[data-theme=dark] .bottom-nav {
    background: color-mix(in srgb,var(--surface) 52%,transparent);
    backdrop-filter: blur(24px) saturate(135%);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
  }
  .bottom-nav button { min-height: 44px; }
  .bottom-nav button::after,.bottom-nav button.active::after { bottom: 6px; }
  html[data-device=iphone18] .bottom-nav { bottom: auto; margin-bottom: 20px; }
  .group-caption { margin-top: 14px; }
  .profile-identity { padding: 14px 16px; }
  .profile-identity .profile-avatar { width: 45px; height: 45px; }
  .profile-role { font-size: 10px; }
}
@media (max-width: 360px) {
  .profile-role { padding-inline: 5px; }
  .stock-filter { font-size: 10.5px; }
  .intake-row { grid-template-columns: 52px minmax(0,1fr) 44px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .avatar-menu, .stock-more svg { transition-duration: 0s; }
}
:root {
  --page:#f4f4f4; --surface:#fff; --soft:#ededed; --ink:#171717;
  --muted:#585858; --subtle:#626262; --line:#dedede; --accent:#292929;
  --accent-soft:#e4e4e4; --stock-image:#e5e5e5; --positive:#414141; --danger:#232323;
}
html[data-theme=dark] {
  --page:#000000; --surface:#090909; --soft:#121212; --ink:#f2f2f2;
  --muted:#aaa; --subtle:#a1a1a1; --line:#252525; --accent:#ededed;
  --accent-soft:#202020; --stock-image:#101010; --positive:#d3d3d3; --danger:#e2e2e2;
}
html[data-theme=dark] .stock-hero { background:#070707; }
html,body { height:100%; overflow:hidden; }
main { overflow-y:scroll; scrollbar-gutter:stable; overflow-x:hidden; overscroll-behavior:contain; }
main, .sheet { scrollbar-width:thin; scrollbar-color:color-mix(in srgb,var(--muted) 52%,transparent) transparent; }
main::-webkit-scrollbar, .sheet::-webkit-scrollbar { width:7px; height:7px; }
main::-webkit-scrollbar-button, .sheet::-webkit-scrollbar-button { display:none; width:0; height:0; }
main::-webkit-scrollbar-thumb, .sheet::-webkit-scrollbar-thumb { background:color-mix(in srgb,var(--muted) 52%,transparent); border-radius:8px; }
body,.workspace,.topbar,.sidebar,.stock-card,.profile-identity,.profile-balance,.settings-group,.intake-row,.theme-options,.stock-filter,.stock-search input,.bottom-nav,.theme-quick {
  transition:background-color 240ms var(--app-motion),color 240ms var(--app-motion),border-color 240ms var(--app-motion);
}
.stock-search input:focus-visible { outline-offset:-2px; outline-width:2px; }
.stock-card { transition:none; }
.stock-more {
  border:1px solid transparent; border-radius:9px; background:var(--soft); min-height:38px;
  margin-top:8px; padding:0 12px; justify-content:center; color:var(--accent); font-weight:620;
  transition:background-color 200ms var(--app-motion),color 200ms var(--app-motion);
}
.stock-more:hover { background:var(--accent-soft); color:var(--accent); }
.stock-info h3 { display:flex; gap:6px; align-items:flex-start; }
.stock-saved-mark { margin-left:auto; color:var(--accent); flex:none; }
.stock-saved-mark svg { width:14px; height:14px; }
.stock-status { white-space:normal; }
.stock-status[data-status=out] { color:var(--muted); }
.stock-card .stock-art { background:var(--stock-image); }
.stock-card .stock-art img[data-art=product], .detail-photo img {
  object-fit:contain; object-position:center; mix-blend-mode:normal; background:var(--stock-image);
}
.planned-art { height:100%; min-height:90px; display:grid; place-items:center; color:var(--accent); background:linear-gradient(148deg,var(--accent-soft),var(--stock-image)); }
.planned-art svg { width:32px; height:32px; }
.brand img, .mobile-brand img { filter:grayscale(1); }
html[data-theme=dark] .brand img, html[data-theme=dark] .mobile-brand img { filter:grayscale(1) invert(1); }
.section-title { display:flex; align-items:center; justify-content:flex-start; gap:12px; }
.section-icon { width:30px; height:36px; display:grid; place-items:center; color:var(--accent); flex:none; }
.section-icon svg { width:21px;height:21px; }
.saved-empty { padding:16px; display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--line); border-radius:13px; max-width:650px; }
.saved-empty>span { padding:9px; background:var(--accent-soft); color:var(--accent); border-radius:8px; flex:none;}
.saved-empty h2 { font-size:17px; }
.saved-empty p { font-size:13px; color:var(--muted); }
.intake-list { gap:6px; max-width:none; }
.intake-row { grid-template-columns:44px minmax(0,1fr) 38px; min-height:64px; gap:9px; padding:6px 9px; }
.intake-row .stock-art { border-radius:7px; }
.intake-row > button { width:36px; height:36px; }
.intake-row h3 { font-size:14px; }
.intake-row small, .intake-row .stock-meta { font-size:11px; }
.stock-filters:not(.stock-filters-admin) .stock-filter { min-height:38px; }
.theme-quick.icon-button,
.theme-quick.icon-button:hover,
.theme-quick.icon-button:active {
  position:relative;
  background:transparent;
  color:var(--telegram-header-muted,var(--muted));
}
.theme-glyph { position:absolute; inset:0; display:grid; place-items:center; opacity:1; transform:rotate(0); transition:opacity 220ms var(--app-motion),transform 260ms var(--app-motion); }
.theme-glyph[data-icon=sun], html[data-theme=dark] .theme-glyph[data-icon=moon] { opacity:0; transform:rotate(-35deg); }
html[data-theme=dark] .theme-glyph[data-icon=sun] { opacity:1;transform:rotate(0); }
html[data-telegram=true] .topbar {
  --telegram-header-muted:#595959;
  --telegram-brand-filter:grayscale(1);
  background:var(--telegram-header,var(--page));
  border-color:transparent;
  transition:none;
}
html[data-telegram-header-dark] .topbar {
  --telegram-header-muted:#aaa;
  --telegram-brand-filter:grayscale(1) invert(1);
}
html[data-telegram=true] .topbar :is(.breadcrumb,.connection) { color:var(--telegram-header-muted); }
html[data-telegram=true] .topbar .mobile-brand img { filter:var(--telegram-brand-filter); }
html[data-telegram=true] .topbar .theme-quick:focus-visible { outline-color:var(--telegram-header-muted); }
html[data-telegram=true] .mobile-brand span { display:none; }
html[data-telegram=true] .desktop-brand { display:none; }
html[data-telegram=true] .breadcrumb > span:first-child { display:none; }
html[data-telegram=true] .bottom-nav { background:color-mix(in srgb,var(--page) 54%,transparent); }
.modal-overlay { transition:opacity 240ms var(--app-motion),visibility 0s linear 300ms; }
.modal-overlay.open { transition-delay:0s; }
.modal-overlay .sheet { max-width:610px; transform:translateY(22px); transition:transform 300ms var(--app-motion); scrollbar-gutter:stable; }
.modal-overlay.open .sheet { transform:translateY(0); }
.sheet-grip { display:none; }
.modal-overlay.open .sheet[data-dragging] { transform:translateY(var(--sheet-drag-y,0px)); transition:none; }
.modal-overlay:not(.open) .sheet[data-swipe-dismissed] { transform:translateY(100%); }
.sheet[data-kind=stock-details] { max-width:860px; }
.sheet-header { align-items:center; margin-bottom:16px; }
.sheet-header h2 { padding-top:0; }
.sheet-actions { display:flex;gap:6px; flex:none; }
.sheet-actions .icon-button { width:40px;height:40px; }
.detail-watch { background:var(--soft); color:var(--muted); }
.detail-watch[aria-pressed=true] { color:var(--accent);background:var(--accent-soft); }
.detail-watch[aria-pressed=true] svg { transform:scale(1.08); }
.detail-watch svg { transition:transform 220ms var(--app-motion); }
.stock-detail { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:20px; align-items:start; }
.stock-detail .detail-photo { aspect-ratio:4/3; }
.detail-photo img { filter:none !important; }
.detail-spec > strong { margin-block:5px; }
.detail-spec > .stock-status { display:block; font-size:12px; }
.detail-thumbs { display:flex; gap:7px; margin-top:8px; }
.detail-thumbs button { display:grid; place-items:center; width:62px; height:52px; padding:4px; border-radius:8px; border:1px solid var(--line); background:var(--soft); }
.detail-thumbs button[aria-pressed=true] { border-color:var(--accent); }
.detail-thumbs img { width:100%; height:42px; object-fit:contain; border-radius:4px; }
.sheet[data-kind=stock-details] .sheet-footer { justify-content:flex-end; }
.sheet[data-kind=stock-details] .sheet-footer button { flex:0 1 auto; }
.disclosure summary { cursor:pointer; list-style:none; display:flex; gap:9px; align-items:center; min-height:52px; padding:8px 16px; }
.disclosure summary::-webkit-details-marker { display:none; }
.disclosure summary > span:first-child svg { width:19px; height:19px; }
.disclosure summary > span:last-child { margin-left:auto; color:var(--muted); transition:transform 220ms var(--app-motion); }
.disclosure[open] summary > span:last-child { transform:rotate(90deg); }
.disclosure-body { padding:0 16px 12px; }
.disclosure-body .settings-theme { padding:0; }
.disclosure[open]>.disclosure-body { animation:disclose 230ms var(--app-motion) both; }
@keyframes disclose { from { opacity:.35; transform:translateY(-5px); } to { opacity:1; transform:none; } }
.profile-actions { border:1px solid var(--line);border-radius:13px; margin-top:12px; background:var(--surface); }
.profile-balance > div { flex:1; }
.profile-balance .secondary { gap:5px; padding-inline:10px; min-height:36px; }
.profile-balance .secondary svg { width:14px; height:14px; }
.review-rating { border:0; padding:0; margin:8px 0 12px; }
.review-rating legend { font-size:13px; }
.review-stars { display:flex; gap:4px; margin-top:6px; }
.review-stars label { position:relative; width:42px;height:42px; display:grid; place-items:center; border-radius:8px; background:var(--soft); color:var(--muted); cursor:pointer; }
.review-stars input { position:absolute;opacity:0; }
.review-stars label:has(input:checked), .review-stars label:has(~ label input:checked), .review-stars label:hover { color:var(--accent); background:var(--accent-soft); }
.review-stars label:has(input:focus-visible) { outline:2px solid var(--accent); }
.review-rating + .field textarea { min-height:82px; }
.review-help { padding:12px; margin-top:12px; border-radius:10px; background:var(--soft); display:flex; gap:9px; align-items:center; color:var(--muted);font-size:13px; }
.review-help svg { color:var(--accent); flex:none; }
.manage-tabs button { display:inline-flex; gap:6px; align-items:center; justify-content:center; }
.manage-tabs svg { width:15px; height:15px; }
.members-list { display:grid; gap:8px; }
.member-row { display:grid; grid-template-columns:minmax(120px,1fr) auto auto; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.member-profile { display:flex; gap:9px; min-width:0; align-items:center; }
.member-profile .profile-avatar { width:38px;height:38px; min-width:38px; border-radius:9px; }
.member-profile strong,.member-profile small { display:block; overflow-wrap:anywhere; }
.member-profile small { font-size:11px;color:var(--muted); }
.member-action { display:inline-flex; align-items:center; gap:5px; font-size:12px; min-height:37px; }
.member-action svg { width:15px;height:15px; }
.member-status { color:var(--accent); }
@media(min-width:721px){
  .shell { display:grid;grid-template-columns:76px minmax(0,1fr);height:100dvh;min-height:0; }
  .sidebar { position:relative;inset:auto;width:auto;align-items:center; padding:12px 0; }
  .sidebar .brand { width:56px;height:48px;justify-content:center; }
  .brand img { width:48px;height:36px; }
  .navigation { width:100%;margin-top:14px;gap:5px; align-items:center; }
  .navigation .nav-item { justify-content:center;width:48px;height:46px;background:transparent; }
  .navigation .nav-item.active, .navigation .nav-item:hover { color:var(--ink);background:transparent; }
  .navigation .nav-item.active > span { transform:none; }
  .navigation .nav-item > span { transition:transform 240ms var(--app-motion); }
  .workspace { display:grid;grid-template-rows:auto minmax(0,1fr);margin:0; min-width:0; min-height:0; }
  .topbar { justify-content:flex-start; gap:12px; padding-inline:clamp(20px,3vw,48px); }
  .breadcrumb { display:flex;align-items:center;gap:10px; }
  .topbar-right { margin-left:auto; }
  main { width:100%;max-width:none;min-height:0;padding:22px clamp(20px,3vw,48px) 36px; }
  #page { max-width:1540px;margin-inline:auto; }
  .stock-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .intake-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profile-layout { display:grid;grid-template-columns: minmax(0,1fr) minmax(0,1fr);gap:12px;max-width:950px; }
  .profile-identity,.profile-balance,.profile-layout .settings-group,.profile-actions { margin:0; }
  .profile-layout > .group-caption {display:none;}
  .profile-layout > .profile-actions { grid-column:1/-1; }
  .modal-overlay .sheet { border-radius:20px; }
}
@media(min-width:1050px){ .stock-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(min-width:1510px){ .stock-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media(min-width:721px) and (max-width:920px){
  .shell {grid-template-columns:64px minmax(0,1fr);}
  .intake-list { grid-template-columns:1fr;}
}
@media(max-width:720px){
  main { overflow-y:scroll; }
  .stock-hero {
    min-height:96px;
    padding:15px 16px;
    border-radius:14px;
  }
  .stock-hero h1 { font-size:30px; margin:0 0 8px; }
  .stock-hero p { font-size:12px; }
  .stock-info { padding-top:6px; gap:3px; }
  .stock-info h3 { font-size:14px; }
  .stock-foot { padding-top:4px; }
  .stock-more { min-height:36px; margin-top:6px; }
  .stock-filters:not(.stock-filters-admin) { padding:2px; }
  .stock-filters:not(.stock-filters-admin) .stock-filter {min-height:36px;font-size:11px;}
  .modal-overlay .sheet { padding-top:20px;scrollbar-gutter:auto; }
  .modal-overlay .sheet::before { content:none; }
  .sheet-grip { display:grid; place-items:center; min-height:24px; margin:-16px 0 4px; touch-action:none; user-select:none; cursor:grab; }
  .sheet-grip::before { content:""; width:32px; height:4px; border-radius:4px; background:color-mix(in srgb,var(--muted) 48%,transparent); }
  .sheet[data-dragging] .sheet-grip { cursor:grabbing; }
  .stock-detail { grid-template-columns:1fr; gap:11px; }
  .stock-detail .detail-photo { aspect-ratio:1.55; }
  .sheet[data-kind=stock-details] .sheet-footer button { flex:1; }
  .manage-tabs { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px; }
  .manage-tabs button { min-height:38px; padding-inline:4px; font-size:11px;}
  .member-row { grid-template-columns:minmax(0,1fr) auto;gap:5px 6px; }
  .member-row .member-verify { grid-column:1/-1; justify-self:start; }
}

html[data-session-active] .shell { isolation:isolate; background:var(--page); }
html[data-session-active] .shell::before {
  position:fixed;
  inset:-14%;
  z-index:-1;
  content:"";
  pointer-events:none;
  background:radial-gradient(ellipse at 72% 33%, #788b9e21, transparent 52%);
}
html[data-session-active] #main { background:transparent; }
html[data-session-active] .sidebar,
html[data-session-active]:not([data-telegram=true]) .topbar {
  background:color-mix(in srgb,var(--surface) 76%,transparent);
}
html[data-theme=dark][data-session-active] .shell::before { content:none; }
html[data-theme=dark][data-session-active] .sidebar,
html[data-theme=dark][data-session-active]:not([data-telegram=true]) .topbar { background:var(--page); }
@media (prefers-reduced-motion:no-preference) {
  html[data-session-active] .shell::before { animation:workspace-light 24s ease-in-out infinite alternate; }
  @keyframes workspace-light {
    from { transform:translate3d(-4%,-3%,0); opacity:.48; }
    to { transform:translate3d(4%,4%,0); opacity:.92; }
  }
}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:2px solid color-mix(in srgb,var(--ink) 52%,transparent);
  outline-offset:2px;
}
.settings-row:active:not(:disabled) { transform:none; }
.stock-card,.stock-recent { border-color:var(--line); box-shadow:none; }
.stock-card { padding:6px; border-radius:14px; }
.stock-card .stock-art { --art-radius:9px; background:#151719; }
.stock-card .stock-info { gap:3px; padding:9px 4px 2px; }
.stock-title-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.stock-card .stock-variants { min-height:1.4em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stock-card .stock-status { min-height:1.4em; }
.stock-card .stock-more { min-height:38px; }

.section-title { gap:10px; }
.section-title .section-icon {
  width:34px;
  height:40px;
  border-radius:0;
  background:transparent;
  color:var(--muted);
}
.section-title .section-icon svg { width:26px; height:26px; }

.stock-filters.stock-filters-admin,
.manage-tabs {
  border:1px solid var(--line);
  border-radius:12px;
  background:color-mix(in srgb,var(--surface) 92%,var(--page));
  padding:3px;
  gap:3px;
}
.stock-filters.stock-filters-admin {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(94px,1fr));
  width:100%;
}
.stock-filters-admin .stock-filter,
.stock-filters-admin .stock-filter:nth-child(n) {
  grid-column:auto;
  min-height:38px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
}
.manage-tabs {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:16px;
}
.manage-tabs button {
  min-height:40px;
  padding:0 8px;
  border:1px solid transparent;
  border-radius:8px;
  color:var(--muted);
  font-size:12px;
}
.manage-tabs button:active:not(:disabled) { transform:none; }

.detail-gallery,.detail-photo { min-width:0; }
.detail-photo { --art-radius:10px; background:#151719; }
.detail-photo > img { object-fit:cover; opacity:1; }
.purchase-variant { margin:14px 0 0; }
.purchase-variant select { background:var(--surface); }

.intake-list { gap:6px; }
.intake-row {
  grid-template-columns:68px minmax(0,1fr) 36px;
  min-height:66px;
  gap:10px;
  padding:7px 8px;
  border-radius:12px;
  background:color-mix(in srgb,var(--surface) 96%,var(--page));
}
.intake-row .stock-art { aspect-ratio:4/3; }
.intake-row h3 { margin-top:2px; font-size:14px; line-height:1.25; }
.intake-row small { color:var(--muted); }
.intake-row > button { width:36px; height:36px; }

.toast {
  color:#f3f5f5;
  background:rgba(18,20,21,.97);
  border:1px solid rgba(255,255,255,.11);
  box-shadow:0 14px 42px rgba(0,0,0,.38);
  backdrop-filter:none;
}
html[data-theme=dark] .toast { color:#f3f5f5; }

.review-rating { margin:6px 0 10px; }
.review-stars { gap:3px; margin-top:5px; }
.review-stars label { width:40px; height:40px; background:transparent; color:var(--line); }
.review-stars label:has(input:checked),
.review-stars label:has(~ label input:checked),
.review-stars label:hover { color:#f3b523; background:rgba(243,181,35,.09); }
.review-body { margin-top:2px; }
.review-score { gap:2px; color:var(--line); }
.review-score .review-star { display:inline-grid; color:var(--line); }
.review-score .review-star.selected { color:#f3b523; }
.review-score svg { width:15px; height:15px; }
.moderation-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.moderation-head .review-score { flex:none; }
.moderation-card > .secondary { margin-top:8px; }

.member-row { grid-template-columns:minmax(0,1fr) auto; }
.access-panel { max-width:820px; }
.admin-access-form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.admin-access-form .field { margin:0; }
.admin-access-form .inline-error { grid-column:1/-1; margin:0; }
.admin-access-form .inline-error:empty { display:none; }
.admin-access-form .primary { min-height:46px; }
.access-note { margin:9px 2px 12px; }
.admin-access-list { display:grid; gap:6px; }
.admin-access-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:9px 10px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.access-owner { padding:5px 8px; border-radius:7px; background:var(--soft); color:var(--muted); font-size:11px; }

@media(max-width:720px) {
  .stock-grid { gap:7px; }
  .stock-card { padding:5px; border-radius:12px; }
  .stock-card .stock-info { padding:8px 3px 1px; }
  .stock-card .stock-info h3 { font-size:14px; }
  .stock-card .stock-foot strong { font-size:15px; }
  .stock-card .stock-more { min-height:36px; font-size:12px; }
  .section-title .section-icon { width:32px; height:36px; }
  .section-title .section-icon svg { width:25px; height:25px; }
  .profile-identity .profile-avatar { width:54px; height:54px; min-width:54px; }
  .manage-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px; }
  .manage-tabs button { min-width:0; min-height:38px; padding:0 3px; gap:4px; font-size:10.5px; }
  .manage-tabs svg { width:13px; height:13px; }
  .stock-filters.stock-filters-admin { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stock-filters-admin .stock-filter:nth-child(n) { grid-column:auto; min-height:37px; font-size:10.5px; }
  .intake-row { grid-template-columns:58px minmax(0,1fr) 34px; min-height:58px; padding:6px 7px; gap:8px; }
  .intake-row > button { width:34px; height:34px; }
  .sales-panel { padding:12px; }
  .moderation-head { align-items:flex-start; }
  .moderation-head .review-score svg { width:13px; height:13px; }
  .admin-access-form { grid-template-columns:1fr; }
  .admin-access-form .primary { width:100%; justify-content:center; }
  .admin-access-row { align-items:start; }
  .admin-access-row .secondary { padding-inline:9px; font-size:11px; }
}
@media(prefers-reduced-motion:reduce){
  .disclosure[open]>.disclosure-body {animation:none;}
  .theme-glyph,.modal-overlay .sheet {transition-duration:0s;}
}


.stock-card .stock-art img[data-branded=true], .stock-detail .detail-photo > img[data-branded=true] { object-fit:cover; object-position:center; filter:saturate(.96) contrast(1.03) !important; background:#15171a; }
.stock-card .stock-art:has(img[data-branded=true]), .stock-detail .detail-photo:has(> img[data-branded=true]) { aspect-ratio:1.5; }
.product-brand { position:absolute;top:8px;left:8px;display:flex;gap:4px;align-items:center;color:#fafafa;font-size:clamp(9px,2.2vw,13px);font-weight:650;letter-spacing:.045em;pointer-events:none; }
.stock-art img[data-branded=false] + .product-brand { display:none; }
.stock-art .product-brand img { position:static;width:25px;height:15px;filter:brightness(0) invert(1)!important;mix-blend-mode:normal;background:none; }
.detail-photo .product-brand { left:12px;top:12px; }
.detail-photo .product-brand img { width:32px;height:19px; }

.detail-thumbs button > span { font-size:13px; color:var(--muted); }
.shop-contact { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.shop-contact svg { width:18px; height:18px; }
.members-note { margin:0 0 12px; }

.admin-metrics { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; max-width:1120px; }
.metrics-panel { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:16px; }
.metrics-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:12px; }
.metrics-heading h2 { font-size:19px; line-height:1.2; margin:0; }
.metrics-heading > span, .metrics-panel small { color:var(--muted); font-size:12px; }
.metrics-heading button { min-height:38px; gap:5px; }
.metrics-heading svg { width:16px;height:16px; }
.metrics-panel .account-note { margin-top:10px; }
.engagement-values span { color:var(--muted); font-size:12px; }
.engagement-values strong { font-variant-numeric:tabular-nums; font-size:clamp(15px,2.1vw,25px); overflow-wrap:anywhere; }
.engagement-values { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:14px; }
.engagement-values > div { display:grid; gap:4px; border-bottom:1px solid var(--line); padding-bottom:9px; }
.metrics-panel h3 { font-size:14px; margin:0 0 6px; }
.popular-lots { list-style:none; padding:0; margin:0; }
.popular-lots li { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid var(--line); }
.popular-lots li:last-child { border-bottom:0; }
.popular-lots strong { display:block; font-size:14px; overflow-wrap:anywhere; }
.popular-lots meter { width:clamp(44px,12vw,112px); height:12px; accent-color:var(--ink); }
.popular-lots meter::-webkit-meter-bar { background:var(--soft); border:0; }
.popular-lots meter::-webkit-meter-optimum-value { background:var(--muted); }
.sales-panel { max-width:920px; }
.sale-more { margin-top:12px; }
.sale-more[hidden] { display:none; }

@media(max-width:720px){
  .bottom-nav {
    display:flex; align-items:stretch; gap:4px; height:68px; margin-inline:10px;
    padding:6px; border-radius:24px;
  }
  .bottom-nav, html[data-theme=dark] .bottom-nav, html[data-telegram=true] .bottom-nav {
    background:color-mix(in srgb,var(--surface) 56%,transparent);
    backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px);
  }
  html[data-theme=dark][data-session-active] .bottom-nav {
    background:var(--page);
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  .bottom-nav button {
    flex:1 1 0; min-width:44px; border-radius:18px;
    transition:flex-grow 340ms var(--app-motion),color 220ms var(--app-motion);
  }
  .bottom-nav button.active { flex-grow:1.36; background:transparent; color:var(--ink); }
  .bottom-nav button::after {
    inset:0; width:auto;height:auto; border-radius:inherit; background:var(--accent-soft);
    transform:scale(.88); opacity:0; pointer-events:none;
    transition:transform 340ms var(--app-motion),opacity 260ms var(--app-motion);
  }
  .bottom-nav button.active::after {
    inset:0; width:auto; height:auto; border-radius:inherit; background:var(--accent-soft);
    transform:scale(1); opacity:1;
  }
  .bottom-nav button > span { position:relative; z-index:1; }
  .bottom-nav button.active > span { transform:translateY(-2px); }
}
@media(prefers-reduced-motion:reduce){
  .navigation .nav-item > span, .bottom-nav button, .bottom-nav button::after { transition:none; }
  .bottom-nav button.active > span, .navigation .nav-item.active > span { transform:none; }
}
html:not([data-session-active]) .sidebar,
html:not([data-session-active]) .topbar,
html:not([data-session-active]) .bottom-nav { display:none; }

/* Equal icon frames with optical sizes for differently padded SVG paths. */
:is(.navigation, .bottom-nav) [data-icon] { width:24px; height:24px; display:grid; place-items:center; flex:none; }
:is(.navigation, .bottom-nav) [data-icon] svg { width:22px; height:22px; flex:none; }
:is(.navigation, .bottom-nav) [data-icon="basket"] svg { width:20px; height:20px; }
:is(.navigation, .bottom-nav) [data-icon="user"] svg { width:28px; height:28px; }

html:not([data-session-active]) .shell,
html:not([data-session-active]) .workspace { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); }
html:not([data-session-active]) #main {
  display:grid;
  align-content:safe center;
  justify-items:center;
  padding:clamp(18px,5vw,40px);
  padding-block:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-bottom));
  overflow-y:auto;
  scrollbar-gutter:auto;
}
html:not([data-session-active]) #page { width:min(100%,380px); min-height:0; }
html:not([data-session-active]) #page:has(.consent-panel) { margin-inline:auto; justify-self:center; }
.consent-panel {
  width:100%;
  padding:clamp(20px,5vw,28px);
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface);
}
.entry-brand { display:flex; gap:8px; align-items:center; color:var(--muted); font-size:12px; font-weight:650; margin-bottom:12px; }
.entry-brand img { object-fit:contain; filter:grayscale(1); }
html[data-theme=dark] .entry-brand img { filter:grayscale(1) invert(1); }
.consent-panel h1 { margin:0; font-size:clamp(23px,5vw,28px); font-weight:650; letter-spacing:-.035em; line-height:1.15; }
.consent-panel > p { margin-top:8px; color:var(--muted); font-size:14px; line-height:1.5; }
.consent-policy { display:flex; align-items:center; gap:5px; margin-top:8px; min-height:40px; width:fit-content; font-size:13px; }
.consent-policy svg { width:13px; height:13px; }
.consent-choice { display:flex; align-items:center; gap:11px; min-height:44px; padding-block:5px; color:var(--ink); font-size:13px; line-height:1.35; cursor:pointer; }
.consent-choice input { flex:none; width:19px; height:19px; margin:0; accent-color:var(--ink); }
#consent-button {
  width:100%;
  margin-top:8px;
  justify-content:center;
  min-height:44px;
  transition:background-color 220ms var(--app-motion), color 220ms var(--app-motion), opacity 220ms var(--app-motion), transform 180ms var(--app-motion);
}
#consent-button:hover:not(:disabled) { background:color-mix(in srgb,var(--ink) 85%,var(--surface)); opacity:1; }
#consent-button:disabled { opacity:.52; }
#consent-error { margin-bottom:0; }
#consent-error:empty { display:none; }
.sheet[data-kind=privacy] { max-width:660px; }
.sheet[data-kind=privacy] .sheet-header { position:sticky; top:-1px; background:var(--surface); z-index:1; }
.sheet[data-kind=privacy] .sheet-header h2 { font-size:clamp(17px,4.7vw,23px); line-height:1.2; }
html[data-layout=privacy] {
  color-scheme:light dark;
  --page:light-dark(#f4f4f4,#000);
  --ink:light-dark(#171717,#f2f2f2);
  --muted:light-dark(#585858,#aaa);
  --line:light-dark(#dedede,#303030);
}
html[data-layout=privacy], html[data-layout=privacy] body { height:auto; overflow:auto; }
.policy-document { width:min(100%,720px); min-height:0; padding:clamp(18px,5vw,44px); overflow:visible; }
.policy-document h1 { font-size:clamp(25px,6vw,36px); line-height:1.18; margin-block:16px 8px; }
.policy-back { color:var(--ink); font-size:14px; text-decoration:underline; text-underline-offset:3px; }
.stock-filters.segment-rail, .manage-tabs.segment-rail {
  position:relative;
  display:grid;
  grid-template-columns:repeat(var(--segment-columns,4),minmax(0,1fr));
  grid-auto-rows:1fr;
  gap:0;
  isolation:isolate;
}
.manage-tabs.segment-rail { --segment-rows:1; --segment-columns:var(--tabs-wide,6); max-width:920px; }
.segment-rail::before {
  content:"";
  box-sizing:border-box;
  position:absolute;
  z-index:-1;
  inset-block:3px;
  inset-inline-start:3px;
  width:calc((100% - 6px) / var(--segment-columns,4));
  height:calc((100% - 6px) / var(--segment-rows,1));
  transform:translate(calc(var(--segment-x) * 100%),calc(var(--segment-y) * 100%));
  background:var(--accent-soft);
  border:1px solid color-mix(in srgb,var(--line) 88%,var(--ink));
  border-radius:8px;
  transition:transform 290ms var(--app-motion),background-color 200ms var(--app-motion);
  pointer-events:none;
}
.segment-rail.stock-filters .stock-filter[aria-pressed],
.segment-rail.manage-tabs button[aria-pressed] { background:transparent; border-color:transparent; box-shadow:none; }
.segment-rail.stock-filters .stock-filter[aria-pressed=true],
.segment-rail.manage-tabs button[aria-pressed=true] { color:var(--ink); }
.segment-rail button:focus-visible { outline-offset:-3px; }

.stock-filter-scroll {
  max-inline-size:568px;
  min-inline-size:0;
  overflow:clip;
  border-radius:8px;
  background:color-mix(in srgb,var(--surface) 82%,var(--page));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 13%,transparent);
  --category-edge:color-mix(in srgb,var(--ink) 22%,transparent);
}
html[data-theme=dark] .stock-filter-scroll {
  --category-edge:color-mix(in srgb,var(--ink) 44%,transparent);
}
.stock-filters.stock-filter-rail {
  position:relative;
  isolation:isolate;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:0;
  inline-size:100%;
  padding:0;
  background:transparent;
}
.stock-filter-rail::before {
  content:"";
  position:absolute;
  inset-block-start:0;
  inset-inline-start:0;
  z-index:-1;
  box-sizing:border-box;
  inline-size:var(--active-category-width,0px);
  block-size:var(--active-category-height,44px);
  transform:translate(var(--active-category-x,0px),var(--active-category-y,0px));
  border-inline:1px solid var(--category-edge);
  border-radius:7px;
  background:color-mix(in srgb,var(--surface) 93%,var(--ink));
  pointer-events:none;
}
.stock-filter-rail[data-animated]::before {
  transition:transform 420ms var(--app-motion), inline-size 420ms var(--app-motion), block-size 420ms var(--app-motion);
}
.stock-filters.stock-filter-rail .stock-filter {
  max-inline-size:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  min-inline-size:0;
  min-block-size:44px;
  padding:5px 12px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  line-height:1.25;
  text-align:center;
  font-weight:570;
}
.stock-filters.stock-filter-rail .stock-filter[aria-pressed=true] { color:var(--ink); }
@media (hover:hover) and (pointer:fine) {
  .stock-filters.stock-filter-rail .stock-filter:hover { color:var(--ink); }
}
.stock-filters.stock-filter-rail .stock-filter:active { transform:none; }
.stock-filters.stock-filter-rail .stock-filter:focus-visible { outline-offset:-3px; }

.stock-art {
  border-radius:0;
  overflow:clip;
  clip-path:inset(0 round var(--art-radius, 8px));
}
html[data-theme=dark] .stock-art:has(> img[data-branded=true]),
.stock-art:has(> img[data-branded=true]) { background:#171717; }
.stock-art > img {
  width:calc(100% + 2px);
  height:calc(100% + 2px);
  inset:-1px;
}

@media(max-width:720px){
  .manage-tabs.segment-rail { --segment-rows:var(--tabs-narrow-rows,2); --segment-columns:var(--tabs-narrow,3); }
  .manage-tabs.segment-rail::before { transform:translate(calc(var(--segment-mobile-x) * 100%),calc(var(--segment-mobile-y) * 100%)); }
  .stock-filters.stock-filter-rail .stock-filter { padding-inline:8px; font-size:11px; }
}
@media(prefers-reduced-motion:reduce){
  .segment-rail::before, .stock-filter-rail[data-animated]::before, .modal-overlay, .detail-photo > img { transition:none; }
}
.stock-card .stock-art,
.stock-card .stock-art:has(> img[data-branded=true]),
.stock-detail .detail-photo,
.stock-detail .detail-photo:has(> img[data-branded=true]) {
  aspect-ratio:4/3;
}
.stock-card .stock-variants { min-height:1.4em; }
.stock-card .stock-status { min-height:0; }
.stock-card .stock-foot { padding-top:4px; }
.stock-card .product-brand { left:auto; right:8px; }
.stock-card .stock-new-label { top:auto; bottom:8px; }
.stock-detail .detail-photo .product-brand { left:12px; right:auto; }
.detail-photo { contain:layout paint; }
.detail-photo > img { transition:opacity 220ms var(--app-motion); }
.stock-detail .detail-photo > img[data-branded=false] {
  object-fit:contain;
  object-position:center;
  filter:none;
  background:#151719;
}
.stock-added { margin-top:7px; color:var(--muted); font-size:12px; }

.section-title .section-icon { width:34px; height:40px; }
.section-title .section-icon svg { width:27px; height:27px; }

.profile-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; max-width:700px; }
.profile-layout > * { margin-block:0; }
.profile-layout .group-caption { display:block; margin-top:20px; }
.profile-identity .profile-avatar { width:58px; height:58px; min-width:58px; }
.member-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.settings-toggle:disabled { opacity:.45; cursor:default; }
.settings-group .settings-row { text-decoration:none; color:inherit; }

.purchase-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; padding:13px 14px; border:1px solid var(--line); border-radius:12px; background:var(--soft); }
.purchase-summary span { font-weight:650; overflow-wrap:anywhere; }
.purchase-summary strong { font-variant-numeric:tabular-nums; }
.purchase-summary small { grid-column:1/-1; color:var(--muted); }
.purchase-terms { display:grid; gap:9px; margin:16px 0; color:var(--muted); font-size:14px; line-height:1.48; }
.purchase-terms strong { color:var(--ink); }
.purchase-confirm { display:flex; align-items:flex-start; gap:10px; min-height:44px; padding:10px 0; cursor:pointer; font-size:13px; line-height:1.4; }
.purchase-confirm input { width:19px; height:19px; margin:0; flex:none; accent-color:var(--ink); }
.purchase-contact { min-height:40px; margin-block-end:8px; }
.purchase-grid { margin-top:14px; }
#purchase-form > .field { margin-top:14px; margin-bottom:0; }
#purchase-form .field textarea { min-height:76px; }
#purchase-form .field > small { color:var(--muted); font-weight:400; }
.payment-choice { margin:16px 0 0; padding:0; border:0; }
.payment-choice legend { margin-bottom:8px; font-size:12px; font-weight:600; }
.payment-choice > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.payment-choice label { position:relative; cursor:pointer; }
.payment-choice input { position:absolute; opacity:0; pointer-events:none; }
.payment-choice span { display:grid; place-items:center; min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:11px; color:var(--muted); background:var(--surface); font-size:13px; transition:background 160ms ease,color 160ms ease,border-color 160ms ease; }
.payment-choice input:checked + span { border-color:var(--accent); background:var(--accent-soft); color:var(--ink); }
.payment-choice input:focus-visible + span { outline:2px solid var(--accent); outline-offset:2px; }
.fulfillment-choice label > span { justify-items:start; align-content:center; gap:3px; min-height:58px; }
.fulfillment-choice small { color:var(--muted); font-size:12px; }
.purchase-delivery { min-inline-size:0; padding:0; margin:0; border:0; }
.purchase-delivery .field { margin:14px 0 0; }
.purchase-totals { display:grid; gap:8px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--soft); }
.purchase-totals > div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; color:var(--muted); font-size:13px; }
.purchase-totals strong, .purchase-total output { color:var(--ink); font-variant-numeric:tabular-nums; }
.purchase-totals .purchase-total { color:var(--ink); font-size:15px; font-weight:650; }
.purchase-totals div:not([hidden]) + .purchase-total { padding-top:8px; border-top:1px solid var(--line); }
.order-success { display:flex; gap:12px; align-items:flex-start; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--soft); }
.order-success > svg { width:24px; height:24px; flex:none; color:var(--positive); }
.order-success strong { display:block; margin-bottom:4px; font-size:18px; }
.order-success p { color:var(--muted); font-size:13px; line-height:1.45; }
.sheet[data-kind=purchase] { max-width:520px; }
.stock-card .stock-more[data-stock-edit] { gap:9px; }
.stock-more[data-stock-edit] svg { flex:none; }
.empty-state .error-icon { background:transparent; border:0; box-shadow:none; }
.error-icon svg { width:32px; height:32px; }
.order-status { display:inline-flex; align-items:center; justify-content:center; gap:4px; width:max-content; min-height:26px; padding:4px 9px; border-radius:999px; background:var(--soft); color:var(--muted); font-size:11px; font-weight:650; }
.order-status[data-status="new"] { background:var(--accent-soft); color:var(--accent); }
.order-status[data-status="completed"] { background:color-mix(in srgb,var(--positive) 15%,transparent); color:var(--positive); }
.order-status[data-status="cancelled"] { color:var(--danger); }
.order-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 12px; padding:0 10px 10px; color:var(--muted); font-size:12px; }
.order-details span { display:flex; align-items:flex-start; gap:6px; min-width:0; overflow-wrap:anywhere; }
.order-details svg { width:14px; height:14px; flex:none; margin-top:1px; }
.order-details p { grid-column:1/-1; padding-top:7px; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.order-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.order-card-head strong,.order-card-head small { display:block; }
.order-card-head small { margin-top:3px; color:var(--muted); font-size:11px; }
.own-order > p { margin:10px 0; color:var(--muted); }
.order-card-meta { display:flex; flex-wrap:wrap; gap:6px 12px; font-size:12px; }
.order-card-meta span:first-child { color:var(--ink); font-weight:650; }
@media(max-width:420px){
  .purchase-grid { grid-template-columns:1fr; gap:0; }
  .purchase-grid .field + .field { margin-top:14px; }
  .order-details { grid-template-columns:1fr; }
  .order-details p { grid-column:1; }
}
.staff-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px; }
.staff-controls .field { margin:0; }
.admin-access-form { grid-template-columns:minmax(0,1fr) minmax(135px,.5fr) auto; }
.field select:not([multiple]):not([size]) {
  appearance:none;
  padding-inline-end:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 6 4.5 4.5L12.5 6' fill='none' stroke='%237d7d7d' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 13px center;
  background-size:15px 15px;
}
@media(forced-colors:active) {
  .field select:not([multiple]):not([size]) { appearance:auto; background-image:none; }
}
.stock-photo-field input::file-selector-button { border:0; border-radius:6px; background:var(--soft); color:var(--ink); padding:7px 10px; margin-inline-end:10px; cursor:pointer; }
.stock-photo-preview:not([hidden]) { display:block; margin:8px 0 12px; width:min(100%,180px); aspect-ratio:4/3; border-radius:8px; object-fit:cover; }
.stock-admin-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
.stock-admin-actions > button { min-width:0; min-height:44px; gap:6px; padding-inline:8px; }
.stock-admin-actions > [data-stock-archive] { grid-column:1 / -1; justify-self:end; padding-inline:12px; }
.stock-card-actions { display:grid; gap:6px; margin-top:auto; padding-top:8px; }
.stock-card-actions button { width:100%; min-height:44px; padding:6px 8px; font-size:13px; line-height:1.25; }
.stock-card-actions .stock-remove { color:var(--danger); }
.stock-detail-actions { flex-wrap:wrap; }
.stock-detail-actions > button { flex:1 1 160px; }
.stock-admin-actions svg, .stock-sections-heading svg, .stock-photo-field svg, .stock-inline-section summary svg { width:16px; height:16px; vertical-align:middle; flex:none; }
.stock-sections-panel { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.stock-sections-heading { display:flex; align-items:center; gap:7px; font-size:16px; }
.stock-sections-panel > p { margin-top:8px; }
.stock-section-list small { display:block; color:var(--muted); font-size:12px; }
.stock-inline-section { margin:4px 0 10px; }
.stock-inline-section summary { display:flex; align-items:center; gap:6px; min-height:44px; list-style:none; width:fit-content; cursor:pointer; font-size:13px; }
.stock-inline-section summary::-webkit-details-marker, .access-panel summary::-webkit-details-marker { display:none; }
.stock-inline-section > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; }
.stock-inline-section .field { margin:0; }
.stock-inline-section button { min-height:44px; padding-inline:10px; }
.stock-inline-section .inline-error:empty { display:none; }
.members-panel { max-width:920px; }
.members-panel .member-action, .staff-controls button { min-height:44px; padding-inline:10px; }
.members-panel .access-panel { max-width:none; margin-bottom:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.access-panel > summary { display:flex; align-items:center; gap:8px; min-height:48px; padding:8px 12px; border-radius:inherit; cursor:pointer; list-style:none; font-size:14px; }
.access-panel > summary > span { margin-inline-start:auto; color:var(--muted); }
.access-panel > summary svg { width:16px; height:16px; flex:none; }
.access-panel[open] > summary svg:last-child { transform:rotate(90deg); }
.access-content { padding:0 12px 12px; }
.member-detail, .member-detail-section, .member-purchases { display:grid; gap:8px; }
.member-detail { gap:16px; }
.member-detail-section h3 { font-size:15px; }
.member-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:0; }
.member-facts > div { padding:8px; border-radius:8px; background:var(--soft); }
.member-facts dt { font-size:12px; color:var(--muted); }
.member-facts dd { margin:3px 0 0; overflow-wrap:anywhere; font-size:13px; }
.member-profile-actions { display:flex; flex-wrap:wrap; gap:8px; }
.member-role-field { max-width:270px; }
.member-detail .member-action { min-height:44px; padding-inline:10px; justify-self:start; }
.member-purchases .order-card-head { flex-wrap:wrap; }
.member-purchases .order-card-head > div { min-width:0; overflow-wrap:anywhere; }
.member-purchases .order-card-meta { margin-top:7px; color:var(--muted); }
.navigation button[hidden], .bottom-nav button[hidden], .cart-count[hidden] { display:none; }
[data-page=cart] { position:relative; }
.navigation button > .cart-count, .bottom-nav button > .cart-count {
  position:absolute; inset-block-start:4px; inset-inline-end:4px; min-width:16px; height:16px;
  padding-inline:3px; border-radius:8px; background:var(--accent); color:var(--surface);
  font-size:10px; line-height:16px; text-align:center; font-variant-numeric:tabular-nums; transform:none; pointer-events:none;
}
.cart-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,300px); gap:12px; align-items:start; max-width:940px; }
.cart-items { display:grid; gap:8px; min-width:0; }
.cart-item, .cart-summary { border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.cart-item { display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:8px 10px; padding:10px; align-items:start; }
.cart-image { display:grid; place-items:center; aspect-ratio:1; border-radius:8px; background:var(--soft); color:var(--muted); overflow:hidden; }
.cart-image img { width:100%; height:100%; object-fit:cover; }
.cart-item-info h2 { font-size:14px; line-height:1.35; overflow-wrap:anywhere; }
.cart-item-info p, .cart-item-info small { font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.cart-item-info .cart-unavailable { color:var(--danger); }
.cart-remove { width:44px; height:44px; color:var(--muted); }
.cart-remove svg { width:17px; height:17px; }
.cart-item-footer { grid-column:2/-1; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 10px; }
.cart-item-footer > strong, .cart-summary strong { font-variant-numeric:tabular-nums; white-space:nowrap; }
.cart-stepper { display:inline-grid; grid-template-columns:44px minmax(24px,auto) 44px; align-items:center; border-radius:9px; background:var(--soft); }
.cart-stepper button { min-height:44px; border-radius:inherit; font-size:18px; }
.cart-stepper button:disabled { opacity:.42; }
.cart-stepper output { text-align:center; font-size:13px; font-variant-numeric:tabular-nums; }
.cart-summary { display:grid; gap:10px; padding:14px; }
.cart-summary > div { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cart-summary h2 { font-size:14px; }
.cart-summary p { color:var(--muted); font-size:12px; line-height:1.4; }
.cart-summary button { min-height:44px; justify-content:space-between; }
.cart-empty { grid-column:1/-1; }
.cart-empty button { margin-top:8px; min-height:44px; }
#cart-variant-form .inline-error:empty { display:none; }
.order-products { display:grid; gap:5px; padding:8px 0; margin:0; list-style:none; }
.order-products li { display:flex; justify-content:space-between; gap:8px; font-size:13px; }
.order-products li span { min-width:0; overflow-wrap:anywhere; }
.order-products li strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
@media(max-width:720px) {
  .cart-layout { grid-template-columns:minmax(0,1fr); }
  .cart-item { grid-template-columns:52px minmax(0,1fr) auto; }
}
.stock-photo-upload { padding:12px; margin-bottom:14px; border:1px solid var(--line); border-radius:12px; background:var(--soft); }
#stock-form .stock-photo-field { margin:0 0 4px; }
#stock-form .stock-photo-field input { padding:6px; }
.stock-section-list { list-style:none; margin:12px 0 0; padding:0; }
.stock-section-list li { display:grid; grid-template-columns:minmax(0,1fr) 44px 44px; align-items:center; gap:4px; padding:4px 0; border-top:1px solid var(--line); }
.stock-section-list strong { overflow-wrap:anywhere; font-size:14px; }
.stock-section-list button { width:44px; height:44px; }
.stock-section-list [data-section-remove] { color:var(--danger); }

.metrics-heading h2 { display:flex; align-items:center; gap:8px; min-width:0; }
.metrics-heading h2 svg { width:19px; height:19px; flex:none; color:var(--accent); }
.metrics-heading > span { white-space:nowrap; }
.sales-periods { display:grid; gap:6px; }
.sales-periods article { min-width:0; padding:11px 12px; border-radius:10px; background:var(--soft); }
.period-top, .period-counts { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; }
.period-top h3 { margin:0; color:var(--muted); font-size:13px; font-weight:550; }
.period-top strong { min-width:0; overflow-wrap:anywhere; font-size:clamp(18px,3vw,26px); font-variant-numeric:tabular-nums; }
.period-counts { justify-content:flex-start; margin-top:4px; color:var(--muted); font-size:12px; }
.period-counts span { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.period-counts svg { width:14px; height:14px; }
.daily-charts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,218px),1fr)); gap:8px; }
.daily-chart { min-width:0; margin:0; padding:12px; border:1px solid var(--line); border-radius:11px; --bar-color:var(--accent); }
.daily-chart[data-metric="sales"] { --bar-color:var(--positive); }
.daily-chart[data-metric="views"] { --bar-color:var(--muted); }
.daily-chart figcaption { display:flex; align-items:center; gap:6px; margin-bottom:6px; font-size:13px; font-weight:650; }
.daily-chart figcaption svg { width:16px; height:16px; color:var(--bar-color); flex:none; }
.daily-bars { display:grid; grid-template-columns:repeat(14,minmax(0,1fr)); gap:2px; height:84px; padding:0; margin:0; list-style:none; border-bottom:1px solid var(--line); background:repeating-linear-gradient(to top,transparent 0 calc(25% - 1px),var(--line) calc(25% - 1px) 25%); }
.daily-bars li { min-width:0; }
.daily-point { display:flex; align-items:end; width:100%; height:100%; padding:0; background:transparent; border-radius:4px 4px 0 0; transition:background-color 180ms var(--app-motion); touch-action:manipulation; }
.daily-point span { width:100%; height:max(2px,calc(var(--bar-level)*100%)); background:var(--bar-color); opacity:.62; border-radius:3px 3px 0 0; transform-origin:bottom; }
.daily-point[aria-pressed=true] { background:color-mix(in srgb,var(--bar-color) 18%,transparent); }
.daily-point[aria-pressed=true] span { opacity:1; }
.daily-point:focus-visible { outline-offset:-2px; }
.daily-value { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; margin-bottom:8px; color:var(--muted); font-size:12px; }
.daily-value strong { color:var(--ink); font-size:21px; font-variant-numeric:tabular-nums; }
.daily-axis { display:flex; justify-content:space-between; margin-top:6px; color:var(--muted); font-size:11px; }

.sales-panel .metrics-heading button { min-height:44px; padding-inline:10px; }
.order-filter { max-width:240px; }
.order-filter select { min-height:44px; }
.sale-list { display:grid; gap:8px; }
.admin-order { display:grid; gap:10px; padding:12px; border:1px solid var(--line); border-radius:12px; }
.admin-order-header { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:6px; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.admin-order-product, .order-confirm-product { display:grid; grid-template-columns:64px minmax(0,1fr); align-items:center; gap:10px; }
.order-photo { position:relative; width:64px; height:64px; overflow:hidden; display:grid; place-items:center; border-radius:9px; color:var(--muted); background:var(--soft); }
.order-photo svg { width:24px; height:24px; }
.order-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:var(--soft); }
.admin-order-product h3 { margin:0; overflow-wrap:anywhere; font-size:15px; }
.admin-order-product small { display:block; margin-top:3px; overflow-wrap:anywhere; }
.admin-order-meta { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 9px; margin-top:5px; color:var(--muted); font-size:11px; }
.admin-order-meta span { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.admin-order-meta strong { color:var(--ink); font-size:15px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.admin-order-meta svg, .admin-order-date svg, .order-status svg { width:13px; height:13px; flex:none; }
.admin-order-date { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:11px; }
.admin-order-delivery { border-radius:9px; background:var(--soft); }
.admin-order-delivery summary { display:flex; align-items:center; gap:6px; min-height:44px; padding:6px 10px; border-radius:inherit; list-style:none; cursor:pointer; font-size:12px; }
.admin-order-delivery summary::-webkit-details-marker { display:none; }
.admin-order-delivery summary svg { width:15px; height:15px; color:var(--muted); }
.admin-order-delivery summary svg:last-child { margin-inline-start:auto; transition:transform 180ms var(--app-motion); }
.admin-order-delivery[open] summary svg:last-child { transform:rotate(90deg); }
.order-actions { display:flex; flex-wrap:wrap; gap:8px; }
.order-actions button { min-height:44px; padding-inline:12px; gap:6px; }
.order-actions svg { width:16px; height:16px; }
.order-confirm-product strong, .order-confirm-product small { display:block; overflow-wrap:anywhere; }
.order-confirm-product small { margin-top:4px; color:var(--muted); }
@media(min-width:560px){ .sales-periods { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; } }
@media(min-width:740px){ .sale-list { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; } }
@media(max-width:360px){ .sales-panel { padding:12px; } .sales-panel .metrics-heading h2 { font-size:17px; } }
@media(prefers-reduced-motion:no-preference){
  .daily-point span { animation:sales-bar-rise 340ms var(--app-motion) both; }
  @keyframes sales-bar-rise { from { transform:scaleY(.18); opacity:.25; } }
}
@media(prefers-reduced-motion:reduce){
  .daily-point, .admin-order-delivery summary svg:last-child { transition:none; }
}
.stock-art > img[data-art=upload],
.stock-detail .detail-photo > img[data-art=upload] { object-fit:cover; mix-blend-mode:normal; }
.staff-controls .field { min-inline-size:min(100%,11.25rem); }
.stock-hero h1 { display:flex; align-items:center; gap:.25em; }
.stock-hero h1 svg { width:.7em; height:.7em; flex:none; opacity:.88; }
.intake-row { grid-template-columns:58px minmax(0,1fr) 36px; padding-inline:9px 14px; }
.intake-row > button { width:36px; height:44px; }
.intake-row > button svg { width:21px; height:21px; }
@media(min-width:721px) {
  .stock-hero { min-height:112px; padding-block:20px; }
  .stock-hero h1 { font-size:clamp(34px,3.3vw,44px); }
  .manage-tabs.segment-rail { margin-bottom:16px; }
  .manage-tabs.segment-rail button { min-height:37px; }
}
.admin-pending { display:flex; align-items:center; justify-content:center; gap:10px; min-height:120px; color:var(--muted); }
.admin-pending .loader { width:18px; height:18px; margin:0; }
@media(prefers-reduced-motion:reduce) { .admin-pending .loader { animation:none; } }
@media(max-width:640px) {
  .admin-access-form, .admin-access-row:has(.staff-controls) { grid-template-columns:1fr; }
}


@media(min-width:721px){
  .profile-layout > .group-caption { display:block; }
}
@media(max-width:720px){
  .member-controls { grid-column:1/-1; justify-content:flex-start; }
  .stock-detail .detail-photo { aspect-ratio:4/3; }
  .section-title .section-icon { width:38px; height:38px; }
  .section-title .section-icon svg { width:25px; height:25px; }
  .sales-panel .metrics-heading,
  .admin-panel-heading { flex-wrap:wrap; }
  .sales-panel .metrics-heading h2 { font-size:17px; }
  .sales-panel .metrics-heading .primary { font-size:12px; padding-inline:10px; }
}
@media(max-width:380px){
  .manage-tabs button {
    display:grid;
    justify-items:center;
    align-content:center;
    gap:3px;
    min-height:44px;
  }
}

.shop-notice{margin:0 0 24px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.shop-notice h2{margin:0 0 8px;font-size:17px}
.shop-notice p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55}
.shop-settings{max-width:760px}
.shop-settings form{display:grid;gap:16px}
.shop-settings .account-note{margin:0}
.order-time-filters{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:12px;margin:12px 0 20px}
.order-time-filters .field{min-width:0}
.order-time-filters input{min-width:0;width:100%}
.period-finance{display:grid;gap:8px;margin:14px 0;font-size:12px;line-height:1.5}
.period-finance span{display:flex;justify-content:space-between;gap:12px}
.period-finance small{line-height:1.5}
.profit-forecast{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.profit-forecast>div{display:grid;gap:8px}
.profit-forecast strong{font-size:24px}
@media(max-width:600px){.order-time-filters{grid-template-columns:1fr 1fr}.order-time-filters>.field:first-child{grid-column:1/-1}.profit-forecast{grid-template-columns:1fr}.period-finance span{flex-wrap:wrap}}
.detail-variants{min-width:0;margin:20px 0 0;padding:0;border:0}
.detail-variants legend{padding:0;margin-bottom:10px;font-size:14px;font-weight:650}
.detail-variants>div{display:flex;flex-wrap:wrap;gap:8px}
.detail-variant{position:relative;cursor:pointer;max-width:100%}
.detail-variant input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:inherit}
.detail-variant span{display:flex;align-items:center;min-height:44px;padding:9px 13px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:var(--surface);font-size:13px;line-height:1.35;overflow-wrap:anywhere;transition:background-color 180ms ease,border-color 180ms ease,color 180ms ease}
.detail-variant input:checked+span{color:var(--surface);background:var(--ink);border-color:var(--ink)}
.detail-variant input:focus-visible+span{outline:2px solid var(--ink);outline-offset:3px}
.detail-variants:disabled{opacity:.5}
.sheet[data-kind=stock-details] .stock-detail-actions{display:flex;gap:10px;align-items:center}
.sheet[data-kind=stock-details] .stock-detail-actions .detail-cart-button{flex:0 0 48px;width:48px;min-height:48px;padding:0;display:grid;place-items:center}
.detail-cart-button svg{width:23px;height:23px}
.sheet[data-kind=stock-details] .stock-detail-actions .detail-buy-now{flex:1;min-height:48px;justify-content:center}
.detail-cart-button,.detail-buy-now{transition:transform 150ms ease,opacity 180ms ease,background-color 180ms ease}
.detail-cart-button:active:not(:disabled),.detail-buy-now:active:not(:disabled){transform:scale(.97)}
.detail-cart-button:disabled,.detail-buy-now:disabled{opacity:.4;cursor:not-allowed}
.detail-purchase-feedback{min-height:18px;margin:12px 0 0;font-size:12px;color:var(--muted);line-height:1.5}
.quick-purchase-product{display:grid;gap:5px;padding:14px;margin-bottom:14px;background:var(--soft);border-radius:12px;overflow-wrap:anywhere}
.quick-purchase-product span,.quick-purchase-product small{font-size:12px;color:var(--muted)}
.cart-flight{position:fixed;z-index:10000;width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:14px;background:var(--ink);color:var(--surface);pointer-events:none;box-shadow:0 6px 20px #0002}
.cart-flight svg{width:24px;height:24px}
.cart-item{transform-origin:50% 50%}
@media(prefers-reduced-motion:reduce){.detail-variant span,.detail-cart-button,.detail-buy-now{transition:none}}
