:root {
    color-scheme: dark;
    --bg: #0b1020;
    --hero: #111827;
    --card: #151b2b;
    --card-soft: #1d2435;
    --card-strong: #253047;
    --text: #ffffff;
    --muted: #d1d5db;
    --muted-soft: #9ca3af;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --blue: #0ea5ff;
    --blue-soft: #93c5fd;
    --orange: #ff6a2a;
    --green: #18c96e;
    --yellow: #facc15;
    --yellow-soft: #fef3c7;
    --danger: #ef4444;
    --shadow: rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 8% 6%, rgba(14, 165, 255, 0.22), transparent 30%),
        radial-gradient(circle at 74% 4%, rgba(255, 106, 42, 0.18), transparent 32%),
        radial-gradient(circle at 92% 44%, rgba(24, 201, 110, 0.12), transparent 28%),
        linear-gradient(180deg, #0b1020 0%, #0e1017 62%, #101827 100%);
    color: var(--text);
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.7; }

.app-shell {
    width: min(1840px, calc(100% - clamp(24px, 3vw, 56px)));
    margin: 0 auto;
    padding: 34px 0 64px;
}

.hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding: 30px 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--hero) 0%, #121826 58%, #1f160c 100%);
    border: 1px solid #1f2937;
    box-shadow: 0 22px 80px var(--shadow);
    overflow: hidden;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -130px auto;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.18), transparent 64%);
    pointer-events: none;
}

.brand-lockup {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.brand-mark {
    position: relative;
    width: 132px;
    height: 132px;
    flex: 0 0 auto;
}

.element-icon {
    display: block;
    width: 132px;
    height: 132px;
    border-radius: 38px;
    background: #111827;
    border: 1px solid #3b4b64;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(14, 165, 255, 0.14),
        0 20px 58px rgba(0, 0, 0, 0.34),
        inset 0 0 30px rgba(14, 165, 255, 0.08);
}

.crystal-glow {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: #172554;
    border: 1px solid #3b82f6;
    box-shadow: 0 0 22px rgba(14, 165, 255, 0.45);
}

.crystal-emoji {
    position: absolute;
    top: 17px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 43px;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(125, 211, 252, 0.62));
}

.box-front,
.box-top-left,
.box-top-right,
.box-fold-left,
.box-fold-right,
.seam-vertical,
.seam-horizontal,
.icon-bubble {
    position: absolute;
    display: block;
}

.box-front {
    width: 73px;
    height: 28px;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    border-radius: 5px;
    background: #bc7d46;
    border: 1px solid #efc49c;
}

.box-top-left,
.box-top-right {
    width: 31px;
    height: 14px;
    bottom: 40px;
    border-radius: 4px 4px 1px 1px;
    background: #cb8f5b;
    border: 1px solid #f5d4b2;
}

.box-top-left { left: 26px; }
.box-top-right { right: 26px; }

.box-fold-left,
.box-fold-right {
    width: 28px;
    height: 13px;
    bottom: 49px;
    background: #d69b67;
    border: 1px solid #f7dbc0;
}

.box-fold-left {
    left: 21px;
    transform: rotate(-18deg);
}

.box-fold-right {
    right: 21px;
    transform: rotate(18deg);
}

.seam-vertical {
    width: 1px;
    height: 26px;
    bottom: 16px;
    left: 50%;
    background: #8b5a2b;
}

.seam-horizontal {
    width: 70px;
    height: 1px;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #9a6433;
}

.icon-bubble {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.82);
    box-shadow: 0 0 10px currentColor;
    z-index: 2;
}

.bubble-one {
    left: 25px;
    bottom: 43px;
    background: var(--blue);
    color: var(--blue);
}

.bubble-two {
    left: 50%;
    bottom: 55px;
    transform: translateX(-50%);
    background: var(--orange);
    color: var(--orange);
}

.bubble-three {
    right: 24px;
    bottom: 43px;
    background: var(--green);
    color: var(--green);
}

.app-wordmark {
    margin: 0 0 8px;
    font-size: clamp(32px, 3.1vw, 50px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: 0.03em;
    text-shadow: 1px 2px 3px rgba(2, 6, 23, 0.98);
}

.wordmark-element { color: #ffffff; }
.wordmark-one { color: var(--blue); }
.wordmark-two { color: var(--orange); }
.wordmark-three { color: var(--green); }

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 900;
    color: var(--blue-soft);
}

h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(38px, 4vw, 62px); line-height: 0.96; letter-spacing: -0.04em; }
h2 { font-size: 24px; letter-spacing: -0.01em; }
h3 { font-size: 25px; line-height: 1.12; letter-spacing: -0.02em; }

.hero-copy {
    max-width: 820px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
    margin: 14px 0 0;
}

.hero-badge {
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.07);
    font-weight: 800;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card {
    margin-top: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(21, 27, 43, 0.94);
    box-shadow: 0 16px 54px rgba(0, 0, 0, 0.24);
}

.login-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
    gap: 32px;
    align-items: start;
}

.login-card p, .muted { color: var(--muted); line-height: 1.5; }
.login-form { display: grid; gap: 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.26);
    outline: none;
}
textarea { resize: vertical; min-height: 82px; line-height: 1.45; }
textarea.description { min-height: 210px; }
input:focus, textarea:focus, select:focus { border-color: rgba(147, 197, 253, 0.85); box-shadow: 0 0 0 3px rgba(14, 165, 255, 0.14); }
select { cursor: pointer; }

.primary, .secondary, .ghost, .copy-button {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 900;
}
.primary { color: #1b1206; background: linear-gradient(135deg, var(--yellow-soft), var(--yellow)); }
.secondary { color: var(--text); background: rgba(255, 255, 255, 0.11); border: 1px solid var(--line); }
.ghost { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.copy-button {
    min-width: 76px;
    padding: 6px 10px;
    color: rgba(226, 232, 240, 0.86);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: none;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}
.primary:hover, .secondary:hover, .ghost:hover { filter: brightness(1.05); }
.copy-button:hover {
    color: #d1fae5;
    background: rgba(24, 201, 110, 0.1);
    border-color: rgba(24, 201, 110, 0.32);
}
.copy-button.copied {
    color: #d1fae5;
    background: rgba(24, 201, 110, 0.16);
    border-color: rgba(24, 201, 110, 0.46);
}

body.modal-open {
    overflow: hidden;
}

.confirmation-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(3, 7, 18, 0.78);
    backdrop-filter: blur(8px);
}

.confirmation-modal-card {
    width: min(100%, 460px);
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(14, 165, 255, 0.42);
    background: linear-gradient(145deg, #182033, #111827);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.confirmation-modal-card h2 {
    margin: 4px 0 14px;
    font-size: clamp(22px, 3vw, 28px);
}

.confirmation-article {
    margin: 0;
    color: var(--text);
    font-weight: 850;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.confirmation-reference {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.4;
}

.confirmation-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

.confirmation-actions button {
    min-height: 46px;
}

.hidden { display: none !important; }
.message { grid-column: 1 / -1; margin: 0; color: var(--yellow-soft); }
.cockpit { display: grid; gap: 20px; }
.toolbar {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) auto;
    align-items: center;
    gap: 28px;
    background: rgba(17, 24, 39, 0.94);
}
.toolbar-actions {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
}
.segmented-control,
.toolbar-command-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 4px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.toolbar-command-group { gap: 8px; background: transparent; border-color: transparent; padding: 0; }
.segmented-control button {
    border-radius: 13px;
    border-color: transparent;
    background: transparent;
    min-width: 132px;
    min-height: 46px;
    white-space: nowrap;
}
.scope-control button { min-width: 190px; }
.view-control {
    display: grid;
    grid-template-columns: repeat(5, minmax(112px, 1fr));
    min-width: 630px;
    max-width: none;
}
.view-control button {
    min-width: 0;
    width: 100%;
}
.segmented-control button + button { margin-left: 2px; }
.toolbar-actions button span {
    display: inline-grid;
    min-width: 24px;
    place-items: center;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
    font-size: 0.78em;
}
.toolbar-actions button.active {
    box-shadow: inset 0 0 0 2px var(--blue-soft);
    background: rgba(14, 165, 255, 0.18);
}
.toolbar-actions .scope-control button.active {
    box-shadow: inset 0 0 0 2px rgba(24, 201, 110, 0.86);
    background: rgba(24, 201, 110, 0.15);
}
.toolbar-actions .scope-control button.active span { background: rgba(24, 201, 110, 0.24); }
.toolbar-actions .view-control button.active span { background: rgba(14, 165, 255, 0.22); }
.filter-bar {
    margin-top: 0;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(180px, 220px) minmax(160px, 190px);
    gap: 16px;
    align-items: end;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 4px 0 0;
}
.pagination span {
    color: var(--muted);
    font-weight: 900;
    min-width: 180px;
    text-align: center;
}

.status-line { color: var(--muted); min-height: 24px; font-weight: 700; }

.listing-grid { display: grid; gap: 24px; }
.listing-card {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 26px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(21, 27, 43, 0.96));
    box-shadow: 0 16px 54px rgba(0, 0, 0, 0.24);
    align-items: start;
}
.photo-panel {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 12px;
}
.photo-slot {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    max-height: 340px;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
        #0f172a;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--muted-soft);
    overflow: hidden;
    position: relative;
}
.photo-slot::before {
    content: "📦";
    position: absolute;
    font-size: 58px;
    opacity: 0.18;
}
.photo-slot.crop-enabled {
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: contain;
}
.photo-slot.crop-enabled img,
.photo-slot.crop-enabled .photo-crop-layer {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.photo-slot.crop-enabled img { -webkit-user-drag: none; }
.photo-slot img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: rgba(0, 0, 0, 0.18);
}
.photo-crop-layer {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}
.photo-crop-selection {
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(15, 23, 42, 0.9);
    background: rgba(14, 165, 233, 0.08);
}
.photo-crop-hint {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.78);
    color: rgba(226, 232, 240, 0.9);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}
.photo-crop-hint-active {
    color: #d1fae5;
    background: rgba(6, 78, 59, 0.82);
}
.photo-preview-error {
    position: relative;
    z-index: 1;
    max-width: 75%;
    text-align: center;
    line-height: 1.45;
    color: var(--muted-soft);
}
.photo-loading-hint {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 80%;
    border-radius: 999px;
    padding: 8px 12px;
    color: rgba(226, 232, 240, 0.92);
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}
.photo-summary {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}
.photo-summary strong { color: var(--text); }
.photo-sync-hint { color: var(--yellow-soft); }
.photo-crop-info {
    color: var(--muted-soft);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 750;
}
.photo-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.photo-zip-options {
    display: grid;
    gap: 7px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}
.photo-zip-option {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}
.photo-zip-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--blue);
}
.photo-zip-option input:disabled {
    cursor: default;
}
.photo-zip-option input:disabled + span {
    color: var(--muted-soft);
    opacity: 0.65;
}
.photo-download-button {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    font-weight: 900;
}
.photo-download-button:hover { filter: brightness(1.05); }
.photo-download-button-primary {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(14, 165, 233, 0.18);
}
.photo-crop-reset-button {
    color: rgba(226, 232, 240, 0.82);
    background: rgba(255, 255, 255, 0.055);
}
.photo-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.photo-thumb {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    color: var(--muted-soft);
    font-size: 12px;
    font-weight: 900;
    position: relative;
}
.photo-thumb.active { outline: 2px solid var(--blue-soft); }
.photo-thumb-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,255,255,0.04), rgba(255,255,255,0.18), rgba(255,255,255,0.04));
    transform: translateX(-100%);
    animation: photo-thumb-loading 1.2s ease-in-out infinite;
}

@keyframes photo-thumb-loading {
    100% { transform: translateX(100%); }
}
.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-thumb-badge {
    position: absolute;
    left: 5px;
    top: 5px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.62);
    color: var(--text);
    font-size: 11px;
    font-weight: 950;
}
.listing-main { display: grid; gap: 16px; min-width: 0; }
.listing-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.listing-header > div:first-child { min-width: 0; }
.header-pills {
    flex: 0 1 520px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    justify-content: flex-end;
}
.sku, .meta { margin: 0; color: var(--muted); }
.sku { font-weight: 950; letter-spacing: 0.08em; color: var(--blue-soft); text-transform: uppercase; }
.meta { margin-top: 6px; }
.owner-pill,
.fulfillment-pill,
.status-pill {
    flex: 0 0 auto;
    height: max-content;
    border-radius: 999px;
    padding: 7px 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    line-height: 1.1;
    border: 1px solid transparent;
}
.owner-pill {
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(147, 197, 253, 0.32);
    text-transform: none;
    letter-spacing: 0;
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fulfillment-pill.allowed {
    color: #dcfce7;
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(74, 222, 128, 0.34);
    text-transform: none;
    letter-spacing: 0;
}
.fulfillment-pill.owner-only {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(251, 191, 36, 0.34);
    text-transform: none;
    letter-spacing: 0;
}
.status-pill.status-ready {
    color: #e0f2fe;
    background: rgba(14, 165, 255, 0.16);
    border-color: rgba(125, 211, 252, 0.34);
}
.status-pill.status-listed {
    color: #fef3c7;
    background: rgba(250, 204, 21, 0.14);
    border-color: rgba(250, 204, 21, 0.34);
}
.status-pill.status-draft {
    color: #ede9fe;
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(196, 181, 253, 0.32);
}
.status-pill.status-sold {
    color: #dcfce7;
    background: rgba(24, 201, 110, 0.16);
    border-color: rgba(74, 222, 128, 0.32);
}
.status-pill.status-shipped {
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(94, 234, 212, 0.32);
}
.status-pill.status-neutral {
    color: #e5e7eb;
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.28);
}
.listing-card.restricted .listed-form {
    opacity: 0.74;
}
.listing-card.restricted .copy-button:disabled,
.listing-card.restricted .mark-listed:disabled {
    cursor: default;
}

.copy-block {
    display: grid;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.045);
}
.copy-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 12px;
    align-items: stretch;
}
.copy-row-listing-meta {
    grid-template-columns:
        minmax(235px, 1.15fr)
        minmax(155px, 0.72fr)
        minmax(225px, 1.08fr)
        minmax(320px, 1.55fr);
}
.copy-row-listing-meta .copy-header {
    align-items: center;
    flex-wrap: nowrap;
}
.copy-row-listing-meta .copy-header strong {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.copy-row-listing-meta .copy-button {
    flex: 0 0 auto;
}
.copy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.copy-header strong { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.copy-button { flex: 0 0 auto; max-width: 100%; white-space: nowrap; }
.copy-block input,
.copy-block textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.copy-title-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title-length {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 950;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.24);
}
.title-length.good {
    color: #bbf7d0;
    border-color: rgba(24, 201, 110, 0.32);
    background: rgba(24, 201, 110, 0.1);
}
.title-length.short {
    color: var(--yellow-soft);
    border-color: rgba(250, 204, 21, 0.28);
    background: rgba(250, 204, 21, 0.08);
}
.title-length.over {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(248, 113, 113, 0.1);
}
.copy-block.compact input { min-height: 45px; }

details {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.035);
}
summary { cursor: pointer; font-weight: 950; color: var(--yellow-soft); }
.detail-list { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 10px 16px; margin: 16px 0 0; }
dt { color: var(--muted-soft); font-weight: 850; }
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-copy-row { display: flex; align-items: flex-start; gap: 10px; }
.detail-copy-row span { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-copy-button { flex: 0 0 auto; padding: 7px 10px; font-size: 0.78rem; }
.warnings { margin-top: 16px; color: var(--yellow-soft); }
.market-check-actions {
    margin-top: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(250, 204, 21, 0.26);
    background: rgba(250, 204, 21, 0.08);
    color: var(--yellow-soft);
}
.market-check-actions.done {
    border-color: rgba(24, 201, 110, 0.28);
    background: rgba(24, 201, 110, 0.08);
    color: #bbf7d0;
}
.market-check-actions p {
    margin: 8px 0 12px;
    color: var(--muted);
    line-height: 1.45;
}
.market-search-link {
    display: inline-grid;
    place-items: center;
    min-height: 38px;
    border-radius: 12px;
    padding: 9px 12px;
    color: #1b1206;
    background: linear-gradient(135deg, var(--yellow-soft), var(--yellow));
    font-weight: 950;
    text-decoration: none;
}
.market-search-link:hover { filter: brightness(1.05); }
.listed-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; align-items: end; }
.listed-form input { width: 100%; min-width: 0; box-sizing: border-box; }
.listed-form .mark-listed { justify-self: stretch; }
.mark-listed.already-listed {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
}
.mark-listed.already-listed:disabled {
    cursor: default;
    opacity: 1;
}
.ebay-open-link {
    display: inline-grid;
    place-items: center;
    min-height: 45px;
    border-radius: 14px;
    padding: 12px 16px;
    color: #071915;
    background: linear-gradient(135deg, #bbf7d0, var(--green));
    font-weight: 950;
    text-decoration: none;
}
.ebay-open-link:hover { filter: brightness(1.05); }
.empty-state { text-align: center; padding: 52px; border: 1px dashed var(--line); border-radius: 26px; color: var(--muted); }

@media (min-width: 1180px) {
    .listing-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1320px) {
    .copy-row-listing-meta {
        grid-template-columns: repeat(2, minmax(min(100%, 260px), 1fr));
    }
}

@media (max-width: 1500px) {
    .toolbar { grid-template-columns: 1fr; }
    .toolbar-actions {
        grid-template-columns: auto minmax(630px, 1fr) auto;
        justify-content: stretch;
    }
}

@media (max-width: 1280px) {
    .toolbar-actions {
        grid-template-columns: 1fr auto;
    }
    .scope-control {
        grid-column: 1;
        grid-row: 1;
    }
    .toolbar-command-group {
        grid-column: 2;
        grid-row: 1;
    }
    .view-control {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 980px) {
    .app-shell { width: min(100% - 32px, 1840px); }
    .hero, .toolbar, .filter-bar { grid-template-columns: 1fr; display: grid; }
    .brand-lockup { grid-template-columns: 122px minmax(0, 1fr); }
    .toolbar-actions { grid-template-columns: 1fr; justify-content: stretch; }
    .scope-control,
    .view-control,
    .toolbar-command-group {
        grid-column: 1;
        grid-row: auto;
    }
    .segmented-control,
    .toolbar-command-group { justify-content: stretch; }
    .view-control {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-width: 0;
        width: 100%;
    }
    .toolbar-actions button { flex: 1 1 160px; }
    .login-card, .listing-card, .listed-form { grid-template-columns: 1fr; display: grid; }
    .photo-panel { position: relative; top: auto; }
    .photo-slot { max-height: 420px; }
}

@media (max-width: 760px) {
    .view-control {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(118px, 1fr);
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }
}

@media (max-width: 680px) {
    .confirmation-modal { padding: 16px; }
    .confirmation-modal-card { padding: 20px; border-radius: 20px; }
    .confirmation-actions { grid-template-columns: 1fr; }
    .app-shell { width: min(100% - 24px, 1840px); padding-top: 20px; }
    .hero { padding: 22px; border-radius: 24px; }
    .brand-lockup { grid-template-columns: 1fr; }
    .brand-mark { display: none; }
    h1 { font-size: 38px; }
    .hero-badge { max-width: 100%; }
    .copy-row { grid-template-columns: 1fr; }
    .copy-header { flex-direction: column; align-items: stretch; }
    .copy-row-listing-meta .copy-header { flex-direction: row; align-items: center; }
    .copy-row-listing-meta .copy-button { width: auto; }
    .copy-button { width: 100%; }
    .copy-title-heading { align-items: flex-start; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-copy-row { flex-wrap: wrap; }
    .detail-copy-button { width: auto; }
    .market-search-link { width: 100%; }
    .photo-actions { grid-template-columns: 1fr; }
    .listed-form { grid-template-columns: 1fr; }
    .listing-card { padding: 18px; border-radius: 24px; }
}

.sale-form {
    border: 1px solid rgba(24, 201, 110, 0.2);
    border-radius: 18px;
    padding: 0;
    background: rgba(24, 201, 110, 0.055);
    overflow: hidden;
}
.sale-form-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    color: #d1fae5;
    list-style-position: inside;
}
.sale-form-summary span {
    font-weight: 950;
}
.sale-form-summary small {
    color: var(--muted);
    line-height: 1.35;
    font-weight: 750;
    text-align: right;
}
.sale-form-content {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}
.sale-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 12px;
    align-items: end;
}
.sale-form textarea {
    min-height: 72px;
}
.sale-checkbox-label {
    align-self: stretch;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.18);
}
.sale-checkbox-label input {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}
.sale-action-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 10px;
}
.sale-form.readonly { opacity: 0.72; }

.sale-form-message {
    display: none;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(24, 201, 110, 0.12);
    border: 1px solid rgba(24, 201, 110, 0.32);
    color: #d1fae5;
    font-weight: 800;
    line-height: 1.4;
}
.sale-form-message.visible { display: block; }
