:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #fff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #dedee3;
  --line-soft: #ececf0;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --red: #d70015;
  --green: #16843b;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
  --radius: 18px;
}

/* V4：成熟克制的服装品牌视觉，保留原有结构与无障碍交互。 */
:root { --bg:#f3f1ed; --surface:rgba(255,255,255,.92); --text:#24221f; --muted:#746f68; --line:#dcd7d0; --line-soft:#ebe7e1; --blue:#76553f; --blue-hover:#604331; --red:#a33131; --green:#3f7654; --shadow:0 16px 46px rgba(43,36,30,.08); --radius:16px; }

* { box-sizing: border-box; }
html { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
body { margin: 0; min-width: 320px; min-height: 100vh; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell { width: min(1280px, calc(100% - 48px)); margin-inline: auto; }
.main-content { padding-top: 48px; padding-bottom: 80px; }

.topbar { position: sticky; top: 0; z-index: 40; height: 64px; border-bottom: 1px solid rgba(0,0,0,.07); background: rgba(248,248,250,.82); backdrop-filter: saturate(180%) blur(20px); }
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: .96rem; font-weight: 650; letter-spacing: -.01em; }
.brand-mark, .auth-icon { display: grid; place-items: center; color: white; background: linear-gradient(145deg, #2d8cff, #0058b8); box-shadow: 0 5px 16px rgba(0,113,227,.25); }
.brand-mark { width: 31px; height: 31px; border-radius: 9px; font-size: 14px; }
.version-badge { padding: 2px 7px; border: 1px solid #d8d8dd; border-radius: 999px; color: var(--muted); background: #fff; font-size: .68rem; letter-spacing: .02em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.admin-name { color: var(--muted); font-size: .88rem; }
.mobile-admin-menu { display: none; position: relative; }
.release-strip { border-bottom: 1px solid #d9e6f5; background: #eef6ff; color: #164a7a; }
.release-strip-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .82rem; }
.release-link { flex: 0 0 auto; padding: 4px 0; border: 0; color: var(--blue); background: transparent; cursor: pointer; font-weight: 700; }
.release-card { width: min(620px, calc(100vw - 32px)); }
.release-date { margin: -10px 0 18px; color: var(--muted); font-size: .82rem; }
.release-content { padding: 17px 18px; border-radius: 14px; background: #f6f6f8; color: #39393e; line-height: 1.85; white-space: normal; }

.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; line-height: 1.14; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 4vw, 3.15rem); font-weight: 730; }
h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
h3 { font-size: 1.05rem; }
.muted, .heading-note, .field-help { color: var(--muted); }
.heading-note { margin: 10px 0 0; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 32px; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); margin-bottom: 28px; font-size: .94rem; }

.button { appearance: none; min-height: 42px; padding: 9px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 620; line-height: 1.2; transition: transform .16s ease, background .16s ease, box-shadow .16s ease, opacity .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .icon-button:focus-visible { outline: 3px solid rgba(0,113,227,.25); outline-offset: 2px; }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button-primary { color: white; background: var(--blue); box-shadow: 0 5px 14px rgba(0,113,227,.18); }
.button-primary:hover:not(:disabled) { background: var(--blue-hover); }
.button-secondary { color: var(--text); background: var(--surface-solid); border-color: var(--line); }
.button-ghost { min-height: 34px; background: transparent; color: var(--blue); }
.button-danger { color: white; background: var(--red); }
.button-danger-ghost { color: var(--red); background: #fff; border-color: #f0c3c8; }
.button-small { min-height: 34px; padding: 7px 13px; font-size: .875rem; }
.button-block { width: 100%; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f0f0f3; color: var(--text); cursor: pointer; font-size: 1.4rem; }

input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); padding: 11px 13px; transition: border .16s, box-shadow .16s; }
input:focus, textarea:focus, select:focus { border-color: #85bdf4; box-shadow: 0 0 0 4px rgba(0,113,227,.09); outline: 0; }
textarea { resize: vertical; min-height: 170px; line-height: 1.7; }
.field-label { display: grid; gap: 8px; font-size: .9rem; font-weight: 620; }
.field-help { margin: 0; font-size: .82rem; font-weight: 400; }

.control-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px; margin-bottom: 24px; border: 1px solid var(--line-soft); border-radius: 17px; background: var(--surface); box-shadow: 0 4px 25px rgba(0,0,0,.035); }
.search-field { position: relative; flex: 1; max-width: 520px; }
.search-field input { height: 42px; padding-left: 42px; background: #f5f5f7; border-color: transparent; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 1.25rem; }
.batch-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.selection-summary { margin-right: 4px; color: var(--muted); font-size: .82rem; white-space: nowrap; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(0,0,0,.07); border-radius: var(--radius); background: var(--surface-solid); box-shadow: 0 4px 24px rgba(0,0,0,.045); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-check { position: absolute; top: 12px; left: 12px; z-index: 4; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.94); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.card-check input, .image-check input { width: 16px; height: 16px; accent-color: var(--blue); }
.product-cover { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(145deg, #ececf0, #fafafa); }
.product-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-cover img { transform: scale(1.025); }
.cover-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #aaaab0; font-size: 2rem; }
.product-card-body { padding: 17px; }
.product-card h3 { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.product-title-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.product-title-row h3 { flex: 1; }
.feedback-alert { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; background: #fff1dd; color: #985d00; font-size: .68rem; font-weight: 750; }
.product-card-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 13px; }
.meta-stat { padding: 8px 5px; text-align: center; border-radius: 10px; background: #f7f7f9; color: var(--muted); font-size: .72rem; }
.meta-stat strong { display: block; color: var(--text); font-size: .94rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .75rem; }
.card-manage-actions { margin-top: 12px; }
.notes-status { display: inline-flex; align-items: center; gap: 5px; }
.notes-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #aaa; }
.notes-status.ready::before { background: var(--green); }

.loading-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.skeleton-card { height: 320px; border-radius: var(--radius); background: linear-gradient(100deg, #e9e9ed 25%, #f4f4f6 42%, #e9e9ed 60%); background-size: 300% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -150%; } }
.empty-state { padding: 72px 24px; text-align: center; border: 1px dashed #ceced4; border-radius: var(--radius); background: rgba(255,255,255,.45); }
.empty-state h2 { margin: 10px 0 8px; }
.empty-state p { max-width: 500px; margin: 0 auto 22px; color: var(--muted); }
.empty-icon { font-size: 2.7rem; color: #9999a0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 32px; }
.page-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.page-button.active { color: white; border-color: var(--blue); background: var(--blue); }

.notes-card { margin-bottom: 42px; padding: 25px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface-solid); box-shadow: 0 6px 30px rgba(0,0,0,.045); }
.feedback-card { margin-bottom: 42px; padding: 25px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface-solid); box-shadow: 0 6px 30px rgba(0,0,0,.045); }
.feedback-form { display: grid; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.feedback-form textarea { min-height: 112px; }
.feedback-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.feedback-list { display: grid; gap: 11px; margin-top: 20px; }
.feedback-item { padding: 16px 17px; border: 1px solid var(--line-soft); border-radius: 14px; background: #fbfbfc; }
.feedback-item.pending { border-color: #f0d6ad; background: #fffaf2; }
.feedback-item-top, .feedback-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.feedback-identity { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.feedback-identity span, .feedback-item-footer { color: var(--muted); font-size: .78rem; }
.feedback-content { margin: 12px 0; color: #343438; line-height: 1.75; white-space: pre-wrap; }
.status-pill.pending { background: #fff0d8; color: #8a5500; }
.status-pill.processed { background: #eaf7ee; color: #137334; }
.password-card { max-width: 620px; margin-inline: auto; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.section-heading.compact { align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.notes-form { display: grid; gap: 18px; }
.notes-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.save-state { color: var(--muted); font-size: .84rem; }
.save-state.saved { color: var(--green); }
.save-state.unsaved { color: #a65f00; }
.images-section { margin-top: 10px; }
.drag-tip { margin: -6px 0 17px; color: var(--muted); font-size: .83rem; }
.image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.image-card { position: relative; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 3px 20px rgba(0,0,0,.04); transition: opacity .16s, border-color .16s, transform .16s; }
.image-card.dragging { opacity: .48; transform: scale(.98); }
.image-card.drag-over { border-color: var(--blue); }
.image-check { position: absolute; z-index: 3; left: 18px; top: 18px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.94); box-shadow: 0 2px 9px rgba(0,0,0,.14); }
.drag-handle { position: absolute; z-index: 3; right: 18px; top: 18px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: rgba(255,255,255,.94); box-shadow: 0 2px 9px rgba(0,0,0,.14); cursor: grab; touch-action: none; color: #56565b; }
.drag-handle:active { cursor: grabbing; }
.image-thumb { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 11px; background: #f1f1f3; cursor: zoom-in; }
.image-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cover-badge { position: absolute; left: 18px; bottom: 142px; padding: 4px 9px; border-radius: 999px; color: white; background: rgba(0,113,227,.9); backdrop-filter: blur(8px); font-size: .72rem; font-weight: 700; }
.image-info { padding: 12px 3px 4px; }
.image-name { display: block; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .83rem; font-weight: 630; }
.image-properties { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: .72rem; }
.image-info select { height: 36px; padding: 6px 9px; border-radius: 9px; font-size: .82rem; }
.readonly-type { height: 36px; display: flex; align-items: center; padding: 6px 10px; border-radius: 9px; background: #f2f2f5; color: var(--muted); font-size: .82rem; }
.image-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 9px; }
.image-action { min-width: 0; padding: 7px 4px; border: 0; border-radius: 9px; background: #f2f2f5; color: #343438; cursor: pointer; text-align: center; font-size: .72rem; }
.image-action:hover { background: #e9e9ed; }
.image-action.danger { color: var(--red); }
.compact-empty { padding-block: 56px; }
.image-loading { grid-template-columns: repeat(4, 1fr); }
.image-loading .skeleton-card { height: 390px; }

.upload-button { position: relative; overflow: hidden; }
.upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-panel { margin: -10px 0 30px; padding: 18px 20px; border-radius: 15px; border: 1px solid #c9def5; background: #f3f8fe; }
.upload-status-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .88rem; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #dfeaf6; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .18s linear; }
.upload-results { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; font-size: .78rem; }
.upload-result { padding: 4px 8px; border-radius: 7px; background: rgba(255,255,255,.8); }
.upload-result.fail { color: var(--red); }

.modal, .viewer-modal { padding: 0; border: 0; background: transparent; }
.modal::backdrop, .viewer-modal::backdrop { background: rgba(0,0,0,.46); backdrop-filter: blur(8px); }
.modal-card { width: min(470px, calc(100vw - 32px)); padding: 26px; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.danger-modal { text-align: center; }
.danger-symbol { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: #fff0f1; color: var(--red); font-size: 1.5rem; font-weight: 750; }
.danger-modal p { color: var(--muted); }
.danger-modal .modal-actions { justify-content: center; }
.stack-form { display: grid; gap: 17px; margin-top: 24px; }
.stack-form label { display: grid; gap: 7px; font-size: .9rem; font-weight: 620; }
.auth-secondary { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: .88rem; }
.auth-secondary a { color: var(--blue); }

.admin-section { margin-bottom: 28px; padding: 24px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fff; box-shadow: 0 5px 26px rgba(0,0,0,.04); }
.data-list { display: grid; gap: 10px; }
.data-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: #fbfbfc; }
.data-main { min-width: 0; flex: 1; }
.data-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.data-description { margin: 6px 0 3px; color: #46464b; }
.data-meta, .log-target { margin: 0; color: var(--muted); font-size: .78rem; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.status-pill, .count-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: #ececf0; color: #5b5b61; font-size: .7rem; font-weight: 700; }
.status-pill.blue, .count-badge { background: #eaf3fd; color: #0065ca; }
.status-pill.active, .status-pill.success { background: #eaf7ee; color: #137334; }
.status-pill.disabled, .status-pill.failed { background: #fff0f1; color: #ae1020; }
.status-pill.used { background: #edf1f5; color: #50555d; }
.status-pill.expired { background: #fff4e4; color: #985d00; }
.protected-label { color: var(--muted); font-size: .8rem; }
.record-check { display: inline-flex; align-items: center; }
.record-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.code-safety-note { margin: -8px 0 16px; }
.skeleton-row { height: 88px; border-radius: 14px; background: linear-gradient(100deg,#ededf0 25%,#f6f6f8 42%,#ededf0 60%); background-size:300% 100%; animation:shimmer 1.4s infinite; }
.mini-empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.wide-modal { width: min(720px, calc(100vw - 32px)); }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.permission-fieldset { margin: 20px 0 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.permission-fieldset legend { padding: 0 7px; color: var(--muted); font-size: .83rem; font-weight: 650; }
.permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.permission-option { display: flex; align-items: flex-start; gap: 8px; padding: 9px; border-radius: 9px; background: #f7f7f9; font-size: .82rem; cursor: pointer; }
.permission-option input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); flex: 0 0 auto; }
.generated-code { margin: 20px 0; padding: 16px; border: 1px dashed #8db9e7; border-radius: 12px; background: #f1f7fe; color: #004b95; text-align: center; font: 700 1rem/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; word-break: break-all; user-select: all; }
.code-hint { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.log-list { padding-block: 10px; }
.log-row { display: flex; gap: 14px; padding: 15px 5px; border-bottom: 1px solid var(--line-soft); }
.log-row:last-child { border-bottom: 0; }
.log-dot { width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px #eaf3fd; flex: 0 0 auto; }
.log-body { min-width: 0; }
.log-target { margin-top: 4px; }
.page-button { display: grid; place-items: center; }
.version-hero { padding: 10px 17px; border-radius: 999px; background: #1d1d1f; color: #fff; font-size: 1.1rem; font-weight: 750; letter-spacing: -.02em; }
.safety-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px; }
.safety-grid > div { padding: 15px; border-radius: 13px; background: #f6f6f8; }
.safety-grid p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.update-form { display: grid; gap: 14px; }
.drop-file { position: relative; display: grid; place-items: center; min-height: 130px; padding: 20px; border: 1px dashed #a9a9b0; border-radius: 15px; background: #fbfbfc; text-align: center; cursor: pointer; }
.drop-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-title { color: var(--blue); font-weight: 700; }
.confirm-update { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: .85rem; }
.confirm-update input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
.error-text { margin: 7px 0 0; color: var(--red); font-size: .82rem; }

.viewer-modal { width: min(96vw, 1500px); height: min(94vh, 1050px); overflow: hidden; border-radius: 18px; background: #171719; color: white; }
.viewer-toolbar { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 16px 0 20px; background: #242426; }
.viewer-toolbar span { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.viewer-close { color: white; background: #3b3b3d; }
.viewer-stage { height: calc(100% - 58px); display: grid; place-items: center; overflow: auto; padding: 18px; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }

.auth-page { display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(circle at 50% 0, #fff 0, #f5f5f7 58%); }
.auth-card { width: min(430px, 100%); padding: 38px; border: 1px solid rgba(0,0,0,.07); border-radius: 26px; background: rgba(255,255,255,.92); box-shadow: 0 25px 80px rgba(0,0,0,.1); }
.auth-icon { width: 56px; height: 56px; margin-bottom: 25px; border-radius: 16px; font-size: 1.25rem; }
.auth-card h1 { font-size: 2.25rem; }
.auth-card > .muted { margin: 10px 0 0; }
.alert { margin: 20px 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #f7f7f9; color: #45454a; font-size: .88rem; }
.alert-error { border-color: #f2c2c7; background: #fff2f3; color: #a80b1b; }
.alert-success { border-color: #b9dfc4; background: #effaf2; color: #156d30; }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { width: min(390px, calc(100vw - 40px)); padding: 12px 15px; border-radius: 13px; color: white; background: rgba(30,30,32,.94); box-shadow: 0 10px 40px rgba(0,0,0,.2); animation: toastIn .24s ease; font-size: .88rem; }
.toast.error { background: rgba(183,10,28,.96); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1050px) {
  .product-grid, .image-grid, .loading-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1280px); }
  .main-content { padding-top: 32px; padding-bottom: 60px; }
  .admin-name { display: none; }
  .admin-nav-link { display: none; }
  .mobile-admin-menu { display: block; }
  .mobile-admin-menu summary { list-style: none; padding: 6px 9px; border-radius: 999px; color: var(--blue); cursor: pointer; font-size: .82rem; }
  .mobile-admin-menu summary::-webkit-details-marker { display:none; }
  .mobile-admin-menu div { position: absolute; right: 0; top: 38px; width: 150px; display: grid; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
  .mobile-admin-menu div a { padding: 9px 10px; border-radius: 8px; font-size: .84rem; }
  .mobile-admin-menu div a:hover { background: #f2f2f5; }
  .page-heading, .section-heading { align-items: stretch; flex-direction: column; gap: 18px; }
  .heading-actions { justify-content: stretch; }
  .heading-actions .button { flex: 1; }
  .control-panel { align-items: stretch; flex-direction: column; }
  .search-field { max-width: none; }
  .batch-actions { width: 100%; }
  .selection-summary { width: 100%; }
  .product-grid, .image-grid, .loading-grid, .image-loading { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card-body { padding: 14px; }
  .product-card-meta { gap: 4px; }
  .meta-stat { font-size: .66rem; }
  .notes-card { padding: 19px; }
  .notes-footer { align-items: stretch; flex-direction: column; }
  .notes-footer .button { width: 100%; }
  .feedback-submit-row, .feedback-item-footer { align-items: stretch; flex-direction: column; }
  .feedback-submit-row .button, .feedback-item-footer .button { width: 100%; }
  .release-strip-inner { padding-block: 8px; align-items: flex-start; }
  .image-actions { grid-template-columns: repeat(2, 1fr); }
  .cover-badge { bottom: 178px; }
  .data-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .row-actions { justify-content: flex-start; }
  .two-fields, .permission-grid, .safety-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  .product-grid, .image-grid, .loading-grid, .image-loading { grid-template-columns: 1fr; }
  .page-heading > .button { width: 100%; }
  .batch-actions .button { flex: 1; }
  .product-card-meta { grid-template-columns: repeat(3, 1fr); }
  .auth-card { padding: 27px 22px; }
  .modal-card { padding: 22px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
  .image-actions { grid-template-columns: repeat(3, 1fr); }
  .cover-badge { bottom: 142px; }
  .top-actions { gap: 4px; }
  .top-actions > .button { padding-inline: 8px; font-size: .76rem; }
  .brand { gap: 6px; font-size: .82rem; }
  .version-badge { display: none; }
  .release-strip-inner { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.topbar { background:rgba(248,246,242,.9); border-color:rgba(69,57,47,.1); }
.brand-mark,.auth-icon { background:#292622; box-shadow:none; }
.button { border-radius:10px; }
.button-primary { box-shadow:0 7px 18px rgba(96,67,49,.16); }
.product-card,.notes-card,.feedback-card,.admin-section { border-color:rgba(73,61,51,.1); box-shadow:0 8px 28px rgba(47,40,34,.055); }
.product-card:hover { transform:translateY(-2px); }
.release-strip { background:#e9e4dc; border-color:#d9d0c4; color:#51483f; }
.profile-chip { display:inline-flex; align-items:center; gap:8px; padding:4px 8px 4px 4px; border-radius:999px; color:var(--text); background:#fff; border:1px solid var(--line-soft); }
.profile-avatar { width:28px; height:28px; display:grid; place-items:center; overflow:hidden; border-radius:50%; color:#fff; background:#746151; font-size:.75rem; font-weight:700; }
.profile-avatar img,.profile-avatar-large img { width:100%; height:100%; object-fit:cover; }
.brand-splash { position:fixed; z-index:200; inset:0; display:grid; place-items:center; pointer-events:none; background:#f4f1ec; animation:rbbroSplash 1.45s ease both; }
.brand-splash div { display:grid; gap:9px; text-align:center; animation:rbbroWord 1.25s cubic-bezier(.22,.72,.2,1) both; }
.brand-splash strong { font:650 clamp(2.4rem,8vw,5.2rem)/1 Georgia,"Times New Roman",serif; letter-spacing:.16em; color:#24211e; }
.brand-splash span { color:#766d65; font-size:.78rem; letter-spacing:.22em; }
@keyframes rbbroSplash { 0%,68%{opacity:1} 100%{opacity:0;visibility:hidden} }
@keyframes rbbroWord { from{opacity:0;transform:translateY(10px);letter-spacing:.22em} 35%{opacity:1;transform:none} to{opacity:1} }
.profile-panel { max-width:780px; margin-inline:auto; }
.profile-form { display:grid; grid-template-columns:150px 1fr; gap:32px; align-items:start; }
.profile-avatar-large { width:140px; aspect-ratio:1; display:grid; place-items:center; overflow:hidden; border-radius:28px; background:#dfd8cf; color:#655648; font:600 3rem/1 Georgia,serif; }
.profile-fields { display:grid; gap:18px; }
.assistant-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; }
.assistant-compose,.assistant-result { padding:25px; border:1px solid var(--line-soft); border-radius:var(--radius); background:#fff; box-shadow:0 8px 28px rgba(47,40,34,.05); }
.assistant-compose textarea { min-height:300px; }
.assistant-compose-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px; }
.assistant-result-body { min-height:300px; padding:20px; border-radius:13px; background:#f6f4f1; color:#34302c; line-height:1.85; white-space:pre-wrap; }
.assistant-result-body.empty-copy,.assistant-result-body.loading-copy { color:var(--muted); }
.assistant-result-body.error-copy { color:var(--red); }
.settings-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:16px; align-items:end; }
.settings-full { grid-column:1/-1; }
.knowledge-preview { max-height:5.3em; overflow:hidden; white-space:pre-wrap; }
.compact-release { margin-top:12px; font-size:.88rem; }
.image-grid { align-items:start; }
.image-thumb { aspect-ratio:auto; min-height:0; background:#eeeae4; }
.image-thumb img { width:100%; height:auto; max-height:none; object-fit:contain; }
.cover-badge { bottom:auto; top:18px; left:54px; }
.assistant-result-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.voice-toggle { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--line-soft); border-radius:10px; background:#faf9f7; color:var(--muted); font-size:.8rem; cursor:pointer; }
.voice-toggle input { width:16px; height:16px; margin:0; accent-color:var(--blue); }
.knowledge-toolbar { display:grid; grid-template-columns:minmax(220px,1fr) 190px 170px; gap:10px; margin-bottom:12px; }
.batch-bar { display:flex; align-items:center; gap:9px; padding:10px 12px; margin-bottom:12px; border:1px solid var(--line-soft); border-radius:12px; background:#faf9f7; color:var(--muted); font-size:.82rem; }
.batch-bar label { display:flex; align-items:center; gap:6px; margin-right:auto; }
.knowledge-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:start; }
.knowledge-row > input { width:17px; height:17px; margin-top:4px; accent-color:var(--blue); }
.knowledge-scope { padding:3px 8px; border-radius:999px; background:#eee9e2; color:#67594d; font-size:.72rem; font-weight:650; }
.form-grid-two { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.import-preview-list { display:grid; gap:8px; max-height:52vh; overflow:auto; padding-right:4px; }
.import-preview-item { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:start; padding:12px; border:1px solid var(--line-soft); border-radius:12px; background:#fff; }
.import-preview-item > input { width:17px; height:17px; margin-top:2px; accent-color:var(--blue); }
.import-preview-item span { display:grid; gap:5px; min-width:0; }
.import-preview-item small { display:-webkit-box; overflow:hidden; color:var(--muted); line-height:1.55; -webkit-line-clamp:3; -webkit-box-orient:vertical; white-space:pre-wrap; }
.import-preview-item em { color:#547360; font-size:.73rem; font-style:normal; white-space:nowrap; }
.import-preview-item.duplicate { opacity:.62; background:#f7f6f4; }
.import-preview-item.duplicate em { color:var(--red); }

@media (max-width:900px){.assistant-workspace{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr 1fr}.assistant-compose textarea,.assistant-result-body{min-height:220px}}
@media (max-width:760px){.assistant-nav-link{padding-inline:8px}.profile-chip{padding-right:4px}.profile-form{grid-template-columns:1fr}.profile-avatar-large{width:112px}.assistant-compose-footer{align-items:stretch;flex-direction:column}.assistant-compose-footer .button{width:100%}.knowledge-toolbar{grid-template-columns:1fr}.batch-bar{align-items:stretch;flex-wrap:wrap}.batch-bar label{width:100%}.knowledge-row{grid-template-columns:auto minmax(0,1fr)}.knowledge-row .row-actions{grid-column:2}.assistant-result-actions{justify-content:flex-start}.form-grid-two{grid-template-columns:1fr}}
@media (max-width:480px){.settings-grid{grid-template-columns:1fr}.profile-avatar{width:30px;height:30px}.brand-splash strong{letter-spacing:.11em}.assistant-nav-link{font-size:.74rem}.assistant-result-actions .button{flex:1}.import-preview-item{grid-template-columns:auto minmax(0,1fr)}.import-preview-item em{grid-column:2}}
