:root {
    color-scheme: light;
    --ink: #20211f;
    --muted: #535651;
    --line: #dce0d8;
    --field-line: #797d76;
    --paper: #fff;
    --canvas: #f3f5f1;
    --soft: #f8faf6;
    --stage: #e9ede7;
    --accent: var(--ink);
    --accent-dark: #363932;
    --accent-soft: #eff6df;
    --accent-line: #bdcbb0;
    --highlight: #a8ec36;
    --highlight-hover: #bdf568;
    --highlight-ink: #1a250c;
    --dark-surface: var(--ink);
    --on-dark-muted: #e2e2dd;
    --focus: #515157;
    --focus-on-dark: #e2e2dd;
    --danger: #a12d45;
    --radius: 20px;
    --radius-lg: 28px;
    --radius-control: 14px;
    --radius-pill: 999px;
    --control-height: 46px;
    --surface-shadow: 0 1px 2px #1717190d;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    color: var(--ink);
    background: var(--canvas);
    -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-inline-size: 0; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2, strong, small, dd, .intro { overflow-wrap: anywhere; }
h1 { font-weight: 760; line-height: 1.08; letter-spacing: -.05em; }
h2 { font-size: 1.125rem; letter-spacing: -.018em; line-height: 1.3; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}
.sr-only, .skip-link:not(:focus) {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip-link:focus {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20;
    background: var(--paper);
    padding: 12px;
    border-radius: 9px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.16rem; font-weight: 750; letter-spacing: -.04em; }
.brand-link { display: inline-flex; align-items: center; min-height: 44px; width: fit-content; }
.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--highlight);
    color: var(--highlight-ink);
    display: grid;
    place-items: center;
}
.brand-mark i, .art-bag i {
    width: 16px;
    height: 13px;
    position: relative;
    display: block;
    border: 1.7px solid currentColor;
    border-radius: 3px;
    margin-top: 3px;
}
.brand-mark i::before, .art-bag i::before {
    position: absolute;
    content: "";
    width: 6px;
    height: 6px;
    border: inherit;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    top: -6px;
    left: 50%;
    translate: -50% 0;
}
.button {
    display: inline-flex;
    min-height: var(--control-height);
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: .92rem;
    font-weight: 680;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}
.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: var(--paper); border-color: var(--line); color: var(--ink); }
.button.secondary:hover, .button.quiet:hover { background: var(--accent-soft); color: var(--accent-dark); }
.button.quiet { color: var(--muted); background: transparent; }
.button.danger { color: var(--danger); background: #fff5f7; border-color: #f1dbe2; }
.button.danger:hover { background: #fce8ef; }
.button-full { width: 100%; }
.text-link, .back-link { color: var(--accent-dark); font-weight: 650; }
.text-link:hover, .back-link:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0 8px; font-size: .88rem; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: .91rem; font-weight: 680; }
input, select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: var(--control-height);
    padding: 10px 13px;
    border: 1px solid var(--field-line);
    border-radius: var(--radius-control);
    background: var(--paper);
    color: var(--ink);
    font-size: 1rem;
}
input::placeholder { color: var(--muted); opacity: 1; }
input[readonly] { background: var(--soft); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); }
.hint, .field-error { font-size: .82rem; overflow-wrap: anywhere; }
.hint { color: var(--muted); }
.field-error { color: var(--danger); }
.form-stack { display: grid; gap: 18px; margin-top: 26px; }
.form-stack .button { min-height: 50px; margin-top: 2px; }

.auth-body { background: var(--canvas); }
.auth-shell {
    max-width: 1580px;
    min-height: 100vh;
    min-height: 100svh;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    padding: 22px;
    gap: clamp(18px, 3vw, 38px);
}
.auth-main {
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    min-width: 0;
    padding: 12px clamp(22px, 3vw, 48px);
}
.auth-content {
    width: min(100%, 488px);
    margin: 28px auto;
    padding: clamp(18px, 3vw, 36px);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--surface-shadow);
}
.context-label { color: var(--highlight-ink); background: var(--accent-soft); border-radius: var(--radius-pill); display: inline-block; padding: 5px 10px; font-weight: 700; font-size: .8rem; margin-bottom: 12px; }
.auth-content h1 { font-size: clamp(2rem, 4vw, 3.35rem); }
.auth-turnstile { width: 100%; min-width: 0; min-height: 65px; }
.auth-turnstile[data-size=compact] {
    display: grid;
    justify-items: center;
    padding-block: 8px;
    border-radius: var(--radius-control);
    background: var(--soft);
}
.customer-auth-link { margin-top: 20px; color: var(--muted); font-size: .9rem; }
.registration-phone { display: grid; gap: 10px; margin-block: 12px; }
.registration-phone .form-stack { margin-top: 0; }
.registration-phone .form-actions form { display: flex; flex-wrap: wrap; gap: 8px; }
.registration-sms code { display: inline-block; padding: 8px 14px; border-radius: var(--radius-control); background: var(--stage); font-size: 1.25rem; }
.customer-auth-link a { display: inline-flex; align-items: center; min-height: 44px; margin-inline-start: 4px; text-decoration: underline; text-underline-offset: 3px; }
.intro { color: var(--muted); margin: 13px 0 0; }
.intro + .button, .intro + .notice { margin-top: 22px; }
.auth-footer { color: var(--muted); font-size: .85rem; }
.auth-footer a { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; }
.auth-footer a:hover { color: var(--accent-dark); }
.auth-art {
    position: relative;
    min-height: 510px;
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at 75% 20%, #ecf6dc 0%, #dce7d1 55%, #c8d3bc 100%);
}
.art-light {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, #ffffff66 0 35%, transparent 35% 67%, #17171913 67%);
}
.art-orbit {
    position: absolute;
    aspect-ratio: 1;
    border: 1px solid #ffffffab;
    border-radius: 32%;
    transform: rotate(-21deg);
}
.art-orbit-large { width: 105%; }
.art-orbit-small { width: 81%; }
.art-store {
    position: relative;
    width: 65%;
    max-width: 430px;
    border-radius: var(--radius-lg);
    padding: clamp(13px, 2.1vw, 25px);
    background: var(--paper);
    z-index: 1;
    transform: rotate(-5deg);
    box-shadow: 12px 28px 55px #17171935, 0 0 0 1px #ffffffa6;
}
.art-toolbar { display: flex; gap: 5px; padding-bottom: 15px; }
.art-toolbar span { height: 7px; width: 7px; border-radius: 50%; background: var(--line); }
.art-toolbar span:first-child { background: var(--highlight); }
.art-banner {
    display: flex;
    aspect-ratio: 2.9;
    flex-direction: column;
    gap: clamp(4px, .7vw, 9px);
    justify-content: center;
    border-radius: var(--radius-control);
    background: radial-gradient(circle at 102% -20%, var(--highlight) 0 38%, transparent 38.4%), var(--dark-surface);
    padding: 12px 15px;
}
.art-banner span { width: 46%; height: 7%; min-height: 4px; background: var(--accent-soft); border-radius: 8px; }
.art-banner span:nth-child(2) { width: 31%; }
.art-banner span:nth-child(3) { width: 14%; height: 11%; background: var(--highlight); }
.art-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.art-products div { aspect-ratio: .9; background: var(--stage); border-radius: 9px; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 9px; }
.art-products i { width: 56%; aspect-ratio: 1; background: #4b4b4a; border-radius: 8px; transform: rotate(-12deg); }
.art-products div:nth-child(2) i { background: #90918c; border-radius: 50%; }
.art-products div:nth-child(3) i { background: #b9bab4; border-radius: 45% 45% 22% 22%; }
.art-products span { width: 50%; height: 4px; background: #a7a7a1; border-radius: var(--radius-pill); }
.art-bag {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    box-shadow: 0 12px 30px #17171940;
    width: 14%;
    max-width: 92px;
    top: 20%;
    right: 12%;
    border-radius: 50%;
    background: var(--highlight);
    color: var(--highlight-ink);
    transform: rotate(10deg);
}
.art-bag i { scale: 1.9; }

.panel-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.panel-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    max-height: 100vh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 22px 16px;
    background: var(--paper);
    border-inline-end: 1px solid var(--line);
}
.panel-sidebar .brand-link { margin-left: 8px; }
.sidebar-context { margin: 30px 8px 10px; font-size: .78rem; font-weight: 650; color: var(--muted); }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    border-radius: var(--radius-pill);
    padding: 9px 12px;
    font-size: .9rem;
    font-weight: 650;
    color: var(--muted);
}
.sidebar-nav a:hover, .workspace-nav-sidebar a:hover { background: var(--accent-soft); color: var(--ink); }
.sidebar-nav a[aria-current], .workspace-nav a[aria-current] { background: var(--highlight); color: var(--highlight-ink); }
.nav-icon { font-size: 1.2rem; color: inherit; }
.panel-workspace { min-width: 0; }
.topbar {
    position: sticky;
    z-index: 2;
    top: 0;
    min-height: 68px;
    padding: 8px clamp(16px, 3.2vw, 45px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.topbar-heading { min-width: 0; }
.topbar-context { display: block; font-size: .89rem; font-weight: 690; color: var(--muted); overflow-wrap: anywhere; }
.topbar-account { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar-account form { flex-shrink: 0; margin-left: 4px; }
.topbar-account .logout { border-color: var(--line); }
.account-avatar, .shop-avatar {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 750;
}
.account-avatar { border-radius: 50%; }
.account-name { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; font-weight: 670; }
.mobile-brand { display: none; }
.workspace-content { width: 100%; max-width: 1260px; margin: 0 auto; padding: 35px clamp(16px, 3.2vw, 45px) 48px; }
.panel-body :focus-visible { scroll-margin-top: 85px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin: 0 0 24px; }
.page-heading h1 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
.page-heading p { margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.page-heading > .button { flex-shrink: 0; }
.surface, .metric { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--surface-shadow); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 21px; }
.metric { display: flex; flex-direction: column; min-width: 0; min-height: 108px; padding: clamp(12px, 1.8vw, 22px); }
.metric dt { color: var(--muted); font-size: .84rem; font-weight: 630; overflow-wrap: anywhere; }
.metric dd { font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 750; line-height: 1.1; margin-top: auto; padding-top: 9px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-primary { background: var(--dark-surface); border-color: var(--dark-surface); color: var(--paper); }
.metric-primary dt { color: var(--on-dark-muted); }
.metric-primary dd { color: var(--highlight); }
.list-heading, .directory-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.list-heading { padding: 16px 18px 8px; }
.directory-heading { margin-bottom: 13px; }
.list-count { display: inline-flex; align-items: center; min-height: 27px; padding: 2px 8px; border-radius: 999px; background: var(--stage); color: var(--muted); font-size: .79rem; font-weight: 680; }
.list-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px, auto) auto; gap: 9px; padding: 10px 18px 17px; }
.shop-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .88rem; }
.shop-table th { color: var(--muted); background: var(--soft); text-align: left; font-size: .78rem; font-weight: 670; }
.shop-table th, .shop-table td { padding: 11px 14px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.shop-table tbody tr:hover { background: var(--soft); }
.shop-table th:nth-child(1) { width: 32%; }
.shop-table th:nth-child(2) { width: 32%; }
.shop-table th:nth-child(3) { width: 18%; }
.shop-table th:nth-child(4) { width: 18%; }
.shop-table strong, .owner-shop strong { font-weight: 670; }
.shop-table small, .owner-shop small { display: block; color: var(--muted); margin-top: 2px; }
.shop-table .shop-cell > div { display: inline-block; vertical-align: middle; max-width: calc(100% - 42px); }
.shop-table .shop-avatar { display: inline-grid; vertical-align: middle; margin-right: 4px; }
.table-action { text-align: right; }
.table-action a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--accent-dark); font-size: .8rem; font-weight: 670; }
.table-action a:hover { text-decoration: underline; }
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 5px 8px;
    max-width: 100%;
    font-size: .77rem;
    line-height: 1.3;
    font-weight: 700;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-active { color: var(--accent-dark); background: var(--accent-soft); }
.status-pending { color: #764d0d; background: #fff1d9; }
.status-suspended { color: #8b294b; background: #f9e8ef; }
.empty-state { padding: 40px 18px; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); margin: 0 0 7px; }
.empty-icon { color: var(--accent-dark); background: var(--accent-soft); border-radius: 13px; display: inline-grid; place-items: center; width: 42px; height: 42px; font-size: 1.4rem; margin-bottom: 11px; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 12px; color: var(--muted); font-size: .86rem; }
.notice { padding: 12px 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-control); color: var(--accent-dark); margin-bottom: 15px; }
.notice[role=alert] { background: #fff5f7; border-color: #f1dbe2; color: var(--danger); }
.edit-form, .detail-card, .invitation-card { max-width: 820px; padding: clamp(15px, 2.6vw, 28px); margin-bottom: 15px; }
.edit-form fieldset { border: 0; padding: 0; margin: 0 0 23px; min-width: 0; }
.edit-form legend { font-size: 1.04rem; font-weight: 720; padding: 0; margin: 0 0 13px; }
.form-grid, .details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.product-actions { justify-content: flex-end; }
.detail-card .form-actions, .invitation-card .copy-field { margin-top: 15px; }
.detail-card p, .invitation-card p { margin-top: 7px; color: var(--muted); }
.invitation-card { border-color: var(--accent-line); background: var(--soft); }
.copy-field { display: flex; gap: 8px; }
.details { margin-top: 14px; }
.details dt { color: var(--muted); font-size: .83rem; margin-bottom: 3px; }
.details dd { font-weight: 660; }
.owner-shop { max-width: 820px; display: flex; align-items: center; gap: 12px; padding: 15px; margin-bottom: 9px; }
.owner-shop:hover { border-color: var(--accent-line); }
.owner-shop-arrow { margin-inline-start: auto; color: var(--accent-dark); }

@media (max-width: 980px) {
    .panel-shell { grid-template-columns: 182px minmax(0, 1fr); }
    .panel-sidebar { padding-inline: 11px; }
    .topbar, .workspace-content { padding-inline: 20px; }
}

@media (max-width: 850px) {
    .auth-shell { display: block; padding: 0; }
    .auth-art, .panel-sidebar, .account-name, .account-avatar { display: none; }
    .auth-main {
        min-height: 100vh;
        min-height: 100svh;
        padding: 14px max(20px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    }
    .auth-content { margin: 30px auto; }
    .auth-content:has(.auth-turnstile) { padding-inline: 15px; }
    .auth-footer { width: min(100%, 488px); margin: 0 auto; }
    .panel-shell { display: block; }
    .mobile-brand { display: inline-flex; }
    .topbar-context { font-size: .77rem; margin-bottom: 4px; }
    .topbar-heading .brand-mark { width: 29px; height: 29px; }
    .topbar-heading .brand { font-size: 1.04rem; }
    .topbar { min-height: 60px; padding-block: 6px; }
    .topbar, .workspace-content { padding-inline: 16px; }
    .workspace-content { padding-top: 23px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .shop-list { overflow: hidden; }
    .shop-table, .shop-table tbody { display: block; }
    .shop-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .shop-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 11px 12px; border-top: 1px solid var(--line); align-items: center; }
    .shop-table td { display: block; border: 0; padding: 0; min-width: 0; }
    .shop-table .shop-cell { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 7px; }
    .shop-table .shop-cell > div { max-width: none; min-width: 0; }
    .shop-table .shop-avatar { margin-right: 0; }
    .shop-table .owner-cell { grid-column: 1; grid-row: 2; padding-left: 41px; }
    .shop-table td:nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
    .shop-table .table-action { grid-column: 2; grid-row: 2; }
}

@media (max-width: 515px) {
    .page-heading { flex-wrap: wrap; margin-bottom: 17px; gap: 12px; }
    .page-heading > .button { width: 100%; }
    .product-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-actions > .primary { grid-column: 1 / -1; }
    .list-filters { padding: 10px; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
    .list-heading { padding: 13px 10px 2px; }
    .list-filters input { grid-column: 1 / -1; }
    .form-grid, .details { grid-template-columns: 1fr; }
}

@media (max-width: 350px) {
    .shop-table tr { grid-template-columns: minmax(0, 1fr); }
    .shop-table td:nth-child(3), .shop-table .table-action { grid-column: 1; grid-row: auto; justify-self: start; }
}

.workspace-nav { gap: 6px; }
.workspace-nav-sidebar { display: grid; margin-top: 14px; }
.sidebar-shop { display: flex; align-items: center; gap: 9px; padding: 9px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-control); }
.sidebar-shop-avatar { display: grid; place-items: center; flex: 0 0 29px; aspect-ratio: 1; border-radius: 50%; background: var(--accent); color: var(--paper); font-size: .84rem; font-weight: 750; }
.sidebar-shop-name { display: block; min-width: 0; overflow-wrap: anywhere; font-size: .87rem; }
.workspace-nav-mobile { display: none; }
.workspace-nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 11px; border-radius: var(--radius-pill); font-size: .9rem; font-weight: 650; }
.workspace-nav-sidebar a { color: var(--muted); }
.workspace-columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.workspace-card { max-width: none; }
.section-heading, .workspace-filter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.workspace-filter { justify-content: start; align-items: end; margin-bottom: 12px; }
.workspace-filter > input, .workspace-filter > .field { width: min(100%, 360px); }
.record-list { list-style: none; margin: 10px 0 0; padding: 0; }
.record-list > li { border-top: 1px solid var(--line); }
.record-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px 14px; padding: 12px 0; }
.record-row > :first-child { flex: 1 1 165px; }
.record-row small { display: block; color: var(--muted); }
.record-row input[type=number] { max-width: 140px; }
.total-row { font-size: 1.08rem; }
input[type=number] { font-variant-numeric: tabular-nums; }
.field textarea { width: 100%; padding: 11px 13px; min-height: 95px; resize: vertical; border: 1px solid var(--field-line); border-radius: var(--radius-control); font: inherit; color: var(--ink); background: var(--paper); }
.full-field { grid-column: 1 / -1; }
.order-lines { margin: 9px 0; }
.order-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 150px) auto; align-items: end; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 850px) {
    .workspace-nav-sidebar { display: none; }
    .workspace-nav-mobile { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
    .workspace-nav-mobile a { justify-content: center; background: var(--soft); border: 1px solid var(--line); color: var(--ink); overflow-wrap: anywhere; }
    .workspace-nav-mobile a[aria-current] { border-color: var(--highlight); }
    .workspace-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

@media (max-width: 515px) {
    .workspace-filter > input, .workspace-filter > .field { width: 100%; }
    .order-line { grid-template-columns: minmax(0, 1fr) auto; }
    .order-line > .field:first-child { grid-column: 1 / -1; }
    .record-row > :first-child { flex-basis: 100%; }
    .record-row input[type=number] { max-width: 100px; }
}

.product-summary { display: flex; align-items: center; gap: 11px; min-width: 0; }
.product-thumb { flex: 0 0 54px; width: 54px; height: 54px; object-fit: cover; border-radius: 9px; background: var(--canvas); }
.product-image-link { display: block; flex-shrink: 0; cursor: zoom-in; }
.product-image-link .product-thumb { display: block; }
.product-option-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.product-option-choice { display: inline-flex; cursor: pointer; }
.product-option-choice span { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.product-option-choice input:checked + span, .image-editor-tools .button[aria-pressed=true] { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.product-option-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.edit-form .product-color-field { align-content: start; margin: 0; }
.product-color-field legend { margin-bottom: 7px; font-size: .91rem; font-weight: 680; }
.product-color-picker { border: 1px solid var(--field-line); border-radius: var(--radius-control); background: var(--paper); }
.product-color-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: calc(var(--control-height) - 2px); padding: 8px 13px; border-radius: inherit; cursor: pointer; list-style: none; }
.product-color-summary::-webkit-details-marker { display: none; }
.product-color-summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-color-summary::after { content: ""; flex: 0 0 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; rotate: 45deg; }
.product-color-picker[open] .product-color-summary::after { rotate: 225deg; }
.product-color-list { max-height: 240px; overflow: auto; border-top: 1px solid var(--line); padding: 4px 6px; }
.product-color-list label { cursor: pointer; }
.product-color-list label:hover { background: var(--soft); }
.product-image-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 10px; margin: 0 0 14px; padding: 0; }
.product-image-list li { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.product-image-list img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.product-image-edit-trigger { width: calc(100% - 16px); margin: 6px 8px 0; }
.photo-remove { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; font-size: .8rem; }
.photo-remove input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 0; }
.product-image-dialog {
    width: min(760px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    padding: clamp(12px, 2.5vw, 22px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    color: var(--ink);
}
.product-image-dialog::backdrop { background: rgb(12 15 12 / 72%); }
.product-image-dialog > img { display: block; max-width: 100%; max-height: 76dvh; object-fit: contain; border-radius: var(--radius); margin: 12px auto 0; }
html:has(.product-image-dialog:modal) { overflow: hidden; }
.product-image-editor {
    width: min(1000px, calc(100% - 24px));
    overflow: auto;
    overscroll-behavior: contain;
}
.product-image-editor > [role=status] { margin: 8px 0; }
.image-editor-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(254px, 290px); gap: 14px; }
.image-editor-view { display: grid; min-width: 0; gap: 8px; }
.image-editor-zoom-value { align-self: center; font-size: .87rem; font-variant-numeric: tabular-nums; }
.image-editor-stage {
    min-width: 0;
    height: clamp(180px, 54dvh, 580px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: repeating-conic-gradient(#e1e4e0 0 25%, #f7f8f6 0 50%) 0 0 / 20px 20px;
}
.image-editor-stage:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.image-editor-stage.is-panning { cursor: grab; touch-action: none; }
.image-editor-stage.is-dragging { cursor: grabbing; }
.image-editor-layout:has([data-image-black-background]:checked) .image-editor-stage { background: #000; }
.image-editor-surface {
    position: relative;
    display: grid;
    place-items: center;
    width: max-content;
    height: max-content;
    min-width: 100%;
    min-height: 100%;
    overflow: clip;
}
.image-editor-stage canvas { display: block; object-fit: contain; }
.image-editor-stage canvas.is-selecting { cursor: crosshair; }
.image-editor-stage canvas.is-erasing { cursor: crosshair; touch-action: none; }
.image-eraser-cursor {
    position: absolute;
    z-index: 1;
    min-width: 2px;
    min-height: 2px;
    transform: translate(-50%, -50%);
    border: 1px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #20211f;
    pointer-events: none;
}
.image-editor-controls { display: grid; gap: 10px; }
.image-editor-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.button.image-editor-icon { flex: 0 0 auto; width: var(--control-height); padding: 0; }
.image-editor-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.image-editor-controls fieldset { display: grid; gap: 6px; margin: 0; }
.image-editor-controls input[type=range] { width: 100%; min-height: 30px; padding: 0; accent-color: var(--accent); }
.image-editor-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.image-editor-dimensions input { width: 100%; }
.image-editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.product-image-editor .button:disabled { opacity: .5; cursor: default; }
@media (max-width: 680px) {
    .image-editor-layout { grid-template-columns: minmax(0, 1fr); }
    .image-editor-view { position: sticky; top: 0; z-index: 1; background: var(--paper); }
    .image-editor-stage { height: clamp(120px, 34dvh, 330px); }
}
.field input[type=file] { max-width: 100%; min-width: 0; }
.field input[type=file]::file-selector-button { margin-inline-end: 9px; padding: 5px 9px; border: 0; border-radius: 7px; background: var(--accent-soft); color: var(--accent-dark); font: inherit; cursor: pointer; }

.storefront-body { min-height: 100vh; }
.storefront-container { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.storefront-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.storefront-header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 12px; }
.storefront-main { padding-block: clamp(22px, 4.5vw, 58px) 56px; }
.storefront-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(32px, 7vw, 94px) clamp(22px, 5vw, 64px);
    margin-bottom: clamp(18px, 3vw, 33px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--dark-surface);
    color: var(--paper);
}
.storefront-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: clamp(180px, 43vw, 580px);
    aspect-ratio: 1;
    inset: auto -8% 12% auto;
    border-radius: 36%;
    transform: rotate(32deg);
    background: var(--highlight);
}
.storefront-hero h1 { max-width: 11ch; font-size: clamp(2.25rem, 6vw, 4.7rem); }
.storefront-hero p { margin-top: 12px; color: var(--on-dark-muted); }
.storefront-hero .button { margin-top: 20px; background: var(--highlight); color: var(--highlight-ink); }
.storefront-hero .button:hover { background: var(--highlight-hover); }
.storefront-hero :focus-visible { outline-color: var(--focus-on-dark); }
.storefront-hero .brand-mark { position: absolute; inset: 50% 16% auto auto; width: clamp(68px, 12vw, 148px); height: auto; aspect-ratio: 1; transform: translateY(-50%) rotate(-12deg); background: var(--dark-surface); color: var(--highlight); }
.storefront-hero .brand-mark i { scale: 3; }
.storefront-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.storefront-shop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 94px; height: 100%; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--surface-shadow); }
.storefront-shop:hover { background: var(--soft); border-color: var(--accent-line); }
.storefront-monogram { display: grid; place-items: center; width: 46px; aspect-ratio: 1; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font-size: 1.24rem; font-weight: 720; }
.storefront-shop-arrow { display: grid; place-items: center; width: 36px; aspect-ratio: 1; border-radius: 50%; background: var(--accent); color: var(--paper); font-size: 1rem; }
.storefront-shop:hover .storefront-shop-arrow { background: var(--highlight); color: var(--highlight-ink); }

@media (max-width: 660px) {
    .storefront-hero { padding-top: 126px; }
    .storefront-hero::before { inset: -90px -20px auto auto; width: 210px; }
    .storefront-hero .brand-mark { inset: 28px 28px auto auto; transform: rotate(-12deg); }
    .storefront-hero .brand-mark i { scale: 2; }
}
