:root {
  color-scheme: dark;
  --section-title-size: 0.94rem;
  --paper: #f4eedf;
  --paper-bright: #fff8eb;
  --gold: #f0c174;
  --blue: #487e8e;
  --bg: #071017;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--paper);
}

* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; }
body {
  min-width: 320px;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(218, 163, 74, 0.18), transparent 32rem), radial-gradient(circle at bottom right, rgba(72, 126, 142, 0.16), transparent 28rem), var(--bg);
}

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

.admin-toast-root {
  position: fixed;
  z-index: 80;
  top: 0.82rem;
  right: 0.82rem;
  display: grid;
  gap: 0.44rem;
  width: min(22rem, calc(100vw - 1.64rem));
  pointer-events: none;
}

.admin-toast {
  display: grid;
  gap: 0.14rem;
  padding: 0.68rem 0.76rem;
  border: 1px solid rgba(240, 193, 116, 0.3);
  border-radius: 0.76rem;
  color: #f4eedf;
  background: rgba(5, 14, 20, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.admin-toast.is-danger { border-color: rgba(242, 154, 147, 0.38); }
.admin-toast.is-warning { border-color: rgba(240, 193, 116, 0.42); }

.admin-toast strong {
  color: #f7d9a6;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08rem;
  line-height: 1;
  text-transform: uppercase;
}

.admin-toast span {
  color: rgba(244, 238, 223, 0.84);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.32;
}

.admin-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); height: 100dvh; min-height: 0; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; gap: 0.76rem; height: 100%; min-height: 0; overflow: auto; padding: 0.82rem; border-right: 1px solid rgba(244, 238, 223, 0.1); background: rgba(5, 14, 20, 0.86); backdrop-filter: blur(18px); }
.lockup { display: flex; align-items: center; gap: 0.58rem; padding: 0.56rem; border: 1px solid rgba(240, 193, 116, 0.2); border-radius: 0.86rem; background: rgba(240, 193, 116, 0.06); }
.mark { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid rgba(240, 193, 116, 0.34); border-radius: 0.72rem; color: var(--gold); background: rgba(240, 193, 116, 0.08); font-size: 0.72rem; font-weight: 950; letter-spacing: 0.11rem; }
.lockup strong { display: block; color: var(--paper-bright); font-size: 0.94rem; line-height: 1.1; }
.lockup span:not(.mark), .eyebrow { display: block; margin: 0; color: var(--gold); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.1rem; text-transform: uppercase; }
.lockup span:not(.mark) { margin-top: 0.14rem; color: rgba(244, 238, 223, 0.58); }
.nav { display: flex; flex-direction: column; gap: 0.3rem; }
.nav button, .pill-button, .marketplace-view-switcher button, .editor-actions button, .upload-actions button, .modal-actions button, .image-change-button, .danger-button { border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 999px; color: rgba(244, 238, 223, 0.84); background: rgba(244, 238, 223, 0.04); font-weight: 860; }
.nav button { width: 100%; padding: 0.62rem 0.72rem; font-size: var(--section-title-size); line-height: 1.14; text-align: left; }
.nav button.is-active, .nav button:hover, .pill-button.is-primary, .marketplace-view-switcher button.is-active, .marketplace-view-switcher button:hover, .editor-actions button:first-child, .upload-actions button:first-child, .modal-actions button:first-child { border-color: rgba(240, 193, 116, 0.42); color: #f7d9a6; background: rgba(240, 193, 116, 0.13); }
.sidebar-note { margin-top: auto; padding: 0.72rem; border: 1px solid rgba(72, 126, 142, 0.25); border-radius: 0.84rem; background: rgba(72, 126, 142, 0.08); }
.sidebar-note p, .muted, .card p, .empty p, small { margin: 0.42rem 0 0; color: rgba(244, 238, 223, 0.62); font-size: 0.82rem; line-height: 1.45; }

.workspace { display: flex; flex-direction: column; gap: 0.72rem; min-width: 0; min-height: 0; height: 100%; overflow: hidden; padding: clamp(0.72rem, 1.45vw, 1rem); }
.panel { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.72rem; min-width: 0; min-height: 0; overflow: hidden; }

.stats, .two-column, .media-layout, .form-grid, .media-grid, .facts, .price-editor, .marketplace-browser-grid, .marketplace-form, .marketplace-product-layout, .marketplace-product-main, .marketplace-product-rail, .marketplace-copy-grid, .rail-form-grid, .publishing-controls { display: grid; gap: 0.72rem; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-column { grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr); flex: 1 1 auto; min-height: 0; overflow: hidden; }
.media-layout { grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.42fr); flex: 1 1 auto; min-height: 0; align-items: stretch; overflow: hidden; }
.card, .metric, .editor, .gallery-panel, .modal-card, .empty { border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.92rem; background: linear-gradient(180deg, rgba(14, 31, 40, 0.82), rgba(5, 14, 20, 0.82)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0.7rem 1.8rem rgba(0, 0, 0, 0.18); }
.card, .editor, .gallery-panel, .modal-card, .empty { padding: 0.78rem; min-height: 0; overflow: auto; }
.metric { padding: 0.72rem; }
.metric span, .facts span { display: block; color: rgba(244, 238, 223, 0.58); font-size: 0.72rem; font-weight: 860; letter-spacing: 0.08rem; text-transform: uppercase; }
.metric strong { display: block; margin-top: 0.4rem; color: #f7d9a6; font-family: Georgia, "Times New Roman", serif; font-size: 1.76rem; line-height: 1; }
.card-heading, .editor-header, .gallery-panel-header, .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.62rem; padding-bottom: 0.72rem; border-bottom: 1px solid rgba(244, 238, 223, 0.1); }
.card-heading h2, .editor-header h2, .gallery-panel-header h1, .modal-header h2 { margin: 0; color: var(--paper-bright); font-size: var(--section-title-size); font-weight: 900; line-height: 1.14; }
.status-pill, .record-status { display: inline-block; padding: 0.32rem 0.46rem; border: 1px solid rgba(240, 193, 116, 0.28); border-radius: 999px; color: var(--gold); background: rgba(240, 193, 116, 0.08); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08rem; text-transform: uppercase; white-space: nowrap; }
.panel-copy { display: grid; gap: 0.64rem; margin-top: 0.72rem; }
.panel-copy strong, .empty strong { color: var(--paper-bright); font-size: 0.9rem; }
.pill-button, .editor-actions button, .upload-actions button, .modal-actions button, .image-change-button, .danger-button { padding: 0.56rem 0.72rem; }
.danger-button { border-color: rgba(255, 107, 99, 0.34) !important; color: #ffb2ac !important; background: rgba(255, 107, 99, 0.08) !important; }
.editor { display: flex; flex-direction: column; gap: 0.72rem; }
.editor-actions, .upload-actions, .modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.42rem; }
.gallery-panel { display: flex; flex-direction: column; gap: 0.72rem; overflow: hidden; }
.gallery-panel-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 0.72rem; min-height: 0; overflow: auto; }
.media-intro { margin: 0.32rem 0 0; color: rgba(244, 238, 223, 0.62); font-size: 0.84rem; font-weight: 700; line-height: 1.35; }
.record-list { display: grid; gap: 0.44rem; }
.record { display: grid; grid-template-columns: 3.45rem minmax(0, 1fr) auto; gap: 0.24rem 0.56rem; width: 100%; padding: 0.6rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.76rem; color: inherit; background: rgba(244, 238, 223, 0.035); text-align: left; overflow: hidden; }
.record img, .record-thumb { grid-column: 1; grid-row: 1 / span 2; width: 3.45rem; height: 3.45rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.56rem; object-fit: cover; background: rgba(72, 126, 142, 0.08); }
.record strong { grid-column: 2; grid-row: 1; color: var(--paper-bright); font-size: 0.9rem; line-height: 1.14; }
.record em { grid-column: 2; grid-row: 2; color: rgba(244, 238, 223, 0.56); font-size: 0.68rem; font-style: normal; font-weight: 860; letter-spacing: 0.06rem; text-transform: uppercase; }
.record-status { grid-column: 3; grid-row: 1 / span 2; align-self: center; justify-self: end; }
.record.is-selected { border-color: rgba(240, 193, 116, 0.42); background: rgba(240, 193, 116, 0.1); }
.record.is-hidden .record-status { border-color: rgba(244, 238, 223, 0.14); color: rgba(244, 238, 223, 0.52); background: rgba(244, 238, 223, 0.035); }

.preview-card { display: flex; flex-direction: column; gap: 0.62rem; padding: 0.64rem; border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.92rem; background: rgba(245, 239, 226, 0.04); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045); overflow: hidden; }
.preview-card.is-hidden { opacity: 0.7; }
.preview-visual { position: relative; height: clamp(8.2rem, 16vw, 11.2rem); border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.74rem; background: rgba(5, 14, 20, 0.55); overflow: hidden; }
.preview-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-status { position: absolute; top: 0.54rem; right: 0.54rem; padding: 0.3rem 0.46rem; border: 1px solid rgba(240, 193, 116, 0.32); border-radius: 999px; color: var(--gold); background: rgba(5, 14, 20, 0.78); font-size: 0.6rem; font-weight: 900; letter-spacing: 0.08rem; text-transform: uppercase; }
.preview-copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 0.52rem; }
.preview-copy h3 { margin: 0; color: var(--paper-bright); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 2vw, 1.46rem); line-height: 1.04; }
.preview-copy p { margin: 0; color: rgba(244, 238, 223, 0.64); font-size: 0.84rem; line-height: 1.46; }
.preview-kicker { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.preview-kicker span { padding: 0.2rem 0.34rem; border: 1px solid rgba(72, 126, 142, 0.34); border-radius: 999px; color: rgba(244, 238, 223, 0.7); background: rgba(72, 126, 142, 0.12); font-size: 0.58rem; font-weight: 900; letter-spacing: 0.06rem; text-transform: uppercase; }
.preview-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.62rem; margin-top: auto; padding-top: 0.56rem; }
.preview-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.26rem; min-width: 0; overflow: hidden; }
.preview-footer strong { color: rgba(244, 238, 223, 0.88); font-size: 0.76rem; }
.preview-footer > span { flex: 0 0 auto; color: var(--gold); font-size: 0.66rem; font-weight: 900; letter-spacing: 0.08rem; text-transform: uppercase; white-space: nowrap; }
.tag-list { display: flex; align-items: center; flex-wrap: nowrap; gap: 0.28rem; max-width: 100%; min-width: 0; overflow: hidden; }
.tag { flex: 0 1 auto; max-width: 6.4rem; overflow: hidden; padding: 0.24rem 0.36rem; border: 1px solid rgba(240, 193, 116, 0.2); border-radius: 999px; color: rgba(244, 238, 223, 0.78); background: rgba(240, 193, 116, 0.075); font-size: 0.58rem; font-weight: 900; letter-spacing: 0.045rem; line-height: 1; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }

.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.marketplace-browser-panel { flex: 1 1 auto; min-height: 0; }
.marketplace-view-switcher { display: flex; flex-wrap: wrap; gap: 0.34rem; justify-content: flex-end; min-width: min(100%, 18rem); }
.marketplace-view-switcher button { padding: 0.44rem 0.58rem; font-size: 0.78rem; line-height: 1; }
.marketplace-browser-grid { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); align-content: start; gap: 0.56rem; }
.marketplace-new-card, .marketplace-item-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 8.6rem; padding: 0.48rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.82rem; color: inherit; background: rgba(244, 238, 223, 0.035); text-align: left; overflow: hidden; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.marketplace-new-card { align-items: center; justify-content: center; gap: 0.36rem; border-style: dashed; }
.marketplace-new-card strong { color: var(--paper-bright); font-size: 0.92rem; line-height: 1; }
.marketplace-new-card span { color: rgba(244, 238, 223, 0.58); font-size: 0.74rem; font-weight: 760; }
.marketplace-new-card:hover:not(:disabled), .marketplace-item-card:hover { border-color: rgba(240, 193, 116, 0.36); background: rgba(240, 193, 116, 0.08); transform: translateY(-1px); }
.marketplace-new-card:disabled { cursor: wait; opacity: 0.62; transform: none; }
.marketplace-item-card { gap: 0.4rem; }
.marketplace-item-card.is-hidden { opacity: 0.72; }
.marketplace-item-card .record-status { position: absolute; z-index: 1; top: 0.52rem; right: 0.52rem; padding: 0.24rem 0.36rem; font-size: 0.56rem; }
.marketplace-item-card img { display: block; width: 100%; height: clamp(4.5rem, 7vw, 5.4rem); border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.64rem; object-fit: cover; background: rgba(72, 126, 142, 0.08); }
.marketplace-item-card .marketplace-image-frame { height: clamp(4.5rem, 7vw, 5.4rem); border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.64rem; }
.marketplace-item-card .marketplace-image-frame > img { height: 100%; border: 0; border-radius: 0; }
.marketplace-item-card-copy { display: grid; gap: 0.16rem; min-width: 0; }
.marketplace-item-card-copy strong { color: var(--paper-bright); font-size: 0.86rem; line-height: 1.12; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-item-card-copy em { color: rgba(244, 238, 223, 0.62); font-size: 0.62rem; font-style: normal; font-weight: 880; letter-spacing: 0.06rem; text-transform: uppercase; }
.marketplace-item-card-copy span { display: -webkit-box; overflow: hidden; color: rgba(244, 238, 223, 0.56); font-size: 0.72rem; font-weight: 680; line-height: 1.28; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.marketplace-browser-grid.is-medium { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.64rem; }
.marketplace-browser-grid.is-medium .marketplace-new-card, .marketplace-browser-grid.is-medium .marketplace-item-card { min-height: 10.2rem; padding: 0.56rem; border-radius: 0.86rem; }
.marketplace-browser-grid.is-medium .marketplace-item-card { gap: 0.48rem; }
.marketplace-browser-grid.is-medium .marketplace-item-card .record-status { top: 0.6rem; right: 0.6rem; padding: 0.28rem 0.42rem; }
.marketplace-browser-grid.is-medium .marketplace-item-card img { height: clamp(5.5rem, 9vw, 6.5rem); border-radius: 0.68rem; }
.marketplace-browser-grid.is-medium .marketplace-item-card .marketplace-image-frame { height: clamp(5.5rem, 9vw, 6.5rem); border-radius: 0.68rem; }
.marketplace-browser-grid.is-large { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 0.72rem; }
.marketplace-browser-grid.is-large .marketplace-new-card, .marketplace-browser-grid.is-large .marketplace-item-card { min-height: 12rem; padding: 0.62rem; border-radius: 0.9rem; }
.marketplace-browser-grid.is-large .marketplace-item-card { gap: 0.58rem; }
.marketplace-browser-grid.is-large .marketplace-item-card .record-status { top: 0.72rem; right: 0.72rem; padding: 0.32rem 0.46rem; }
.marketplace-browser-grid.is-large .marketplace-item-card img { height: clamp(6.8rem, 11vw, 8.2rem); border-radius: 0.72rem; }
.marketplace-browser-grid.is-large .marketplace-item-card .marketplace-image-frame { height: clamp(6.8rem, 11vw, 8.2rem); border-radius: 0.72rem; }
.marketplace-browser-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 0.44rem; }
.marketplace-browser-grid.is-list .marketplace-new-card { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 4.2rem; padding: 0.56rem 0.68rem; }
.marketplace-browser-grid.is-list .marketplace-item-card { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr) auto; align-items: center; min-height: 0; gap: 0.68rem; padding: 0.44rem 0.58rem; }
.marketplace-browser-grid.is-list .marketplace-item-card .record-status { position: static; grid-column: 3; grid-row: 1; justify-self: end; }
.marketplace-browser-grid.is-list .marketplace-item-card img { grid-column: 1; grid-row: 1; height: 4rem; border-radius: 0.58rem; }
.marketplace-browser-grid.is-list .marketplace-item-card .marketplace-image-frame { grid-column: 1; grid-row: 1; height: 4rem; border-radius: 0.58rem; }
.marketplace-browser-grid.is-list .marketplace-item-card-copy { grid-column: 2; grid-row: 1; gap: 0.12rem; }
.marketplace-browser-grid.is-list .marketplace-item-card-copy span { -webkit-line-clamp: 1; }
.marketplace-empty { margin-top: 0.72rem; }
.marketplace-editor { gap: 0.72rem; }
.marketplace-form { gap: 0.78rem; }
.marketplace-product-layout { grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.38fr); align-items: start; }
.marketplace-product-main { min-width: 0; }
.marketplace-product-rail { min-width: 0; }
.marketplace-product-main .preview-card { min-height: 28rem; }
.marketplace-copy-grid { gap: 0.6rem; }
.marketplace-copy-section textarea[name="description"] { min-height: 12rem; }
.rail-form-grid { gap: 0.58rem; }
.publishing-controls { gap: 0.5rem; }
label.field, .toggle { display: flex; min-width: 0; }
label.field { flex-direction: column; gap: 0.28rem; }
.is-wide, label.field.is-wide, .toggle, .price-editor { grid-column: 1 / -1; }
label.field span { color: rgba(244, 238, 223, 0.66); font-size: 0.74rem; font-weight: 840; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.76rem; color: var(--paper-bright); background: rgba(3, 10, 14, 0.72); outline: none; }
input, select { min-height: 2.38rem; padding: 0 0.66rem; }
input[type="file"] { padding: 0.52rem 0.66rem; }
textarea { resize: vertical; padding: 0.58rem 0.66rem; line-height: 1.42; }
input:focus, select:focus, textarea:focus { border-color: rgba(240, 193, 116, 0.48); box-shadow: 0 0 0 3px rgba(240, 193, 116, 0.1); }
.field-message { display: none; margin: -0.04rem 0 0; color: #ff7a72; font-size: 0.76rem; font-weight: 820; line-height: 1.3; }
label.field input:required:invalid { border-color: rgba(255, 107, 99, 0.62); box-shadow: 0 0 0 3px rgba(255, 107, 99, 0.08); }
label.field input:required:invalid + .field-message { display: block; }
.toggle { position: relative; align-items: center; gap: 0.68rem; padding: 0.62rem; border: 1px solid rgba(240, 193, 116, 0.18); border-radius: 0.84rem; background: rgba(240, 193, 116, 0.055); cursor: pointer; }
.toggle input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.switch-shell { position: relative; flex: 0 0 3.7rem; height: 2.05rem; border: 1px solid rgba(244, 238, 223, 0.14); border-radius: 999px; background: rgba(3, 10, 14, 0.74); }
.switch-knob { position: absolute; top: 0.24rem; left: 0.24rem; width: 1.46rem; height: 1.46rem; border-radius: 999px; background: rgba(244, 238, 223, 0.64); box-shadow: 0 0.42rem 0.85rem rgba(0, 0, 0, 0.28); transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), background 160ms ease; }
.switch-copy { display: grid; gap: 0.12rem; min-width: 0; }
.switch-copy strong { color: rgba(244, 238, 223, 0.86); font-size: 0.8rem; line-height: 1.1; }
.switch-copy em { color: rgba(244, 238, 223, 0.54); font-size: 0.68rem; font-style: normal; font-weight: 900; letter-spacing: 0.08rem; text-transform: uppercase; }
.switch-copy em::after { content: "Hidden"; }
.toggle input:checked + .switch-shell { border-color: rgba(240, 193, 116, 0.48); background: rgba(240, 193, 116, 0.18); }
.toggle input:checked + .switch-shell .switch-knob { transform: translateX(1.62rem); background: var(--gold); }
.toggle input:checked ~ .switch-copy em::after { content: "Public"; color: var(--gold); }
.price-editor { grid-template-columns: minmax(9.5rem, 0.48fr) minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.marketplace-price-editor { grid-template-columns: minmax(8rem, 0.38fr) minmax(0, 0.62fr); }
.price-static { display: grid; min-height: 2.38rem; align-content: center; gap: 0.08rem; padding: 0 0.66rem; border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.76rem; color: rgba(244, 238, 223, 0.72); background: rgba(3, 10, 14, 0.42); }
.price-static span { color: rgba(244, 238, 223, 0.48); font-size: 0.62rem; font-weight: 820; letter-spacing: 0.06rem; text-transform: uppercase; }
.price-static strong { color: rgba(244, 238, 223, 0.88); font-size: 0.82rem; }
.status { margin: 0; padding: 0.62rem 0.72rem; border: 1px solid rgba(240, 193, 116, 0.18); border-radius: 0.76rem; color: var(--gold); background: rgba(240, 193, 116, 0.07); font-size: 0.84rem; font-weight: 800; line-height: 1.35; }
.property-section { display: grid; gap: 0.58rem; padding: 0.62rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.84rem; background: rgba(3, 10, 14, 0.38); }
.marketplace-product-main .property-section { padding: 0.72rem; }
.publishing-card { border-color: rgba(240, 193, 116, 0.18); background: rgba(240, 193, 116, 0.055); }
.pricing-card { border-color: rgba(72, 126, 142, 0.22); background: rgba(72, 126, 142, 0.075); }
.property-section-heading { display: grid; gap: 0.18rem; }
.property-section-heading h3 { margin: 0; color: var(--paper-bright); font-size: 0.9rem; line-height: 1.14; }
.property-section-heading p { margin: 0; color: rgba(244, 238, 223, 0.54); font-size: 0.74rem; line-height: 1.35; }
.image-current { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr) auto; gap: 0.58rem; align-items: center; }
.image-current img { width: 100%; height: 4.6rem; border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.62rem; object-fit: cover; background: rgba(72, 126, 142, 0.08); }
.image-current strong { display: block; color: var(--paper-bright); font-size: 0.9rem; }
.image-current span { display: block; margin-top: 0.16rem; color: rgba(244, 238, 223, 0.52); font-size: 0.72rem; line-height: 1.28; }
.image-change-button { white-space: nowrap; }
.image-picker-modal { width: min(44rem, 100%); }
.image-choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.52rem; max-height: 22rem; overflow: auto; }
.image-choice-grid button { min-width: 0; padding: 0.34rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.82rem; color: inherit; background: rgba(244, 238, 223, 0.035); text-align: left; overflow: hidden; }
.image-choice-grid button.is-selected { border-color: rgba(240, 193, 116, 0.46); background: rgba(240, 193, 116, 0.1); }
.image-choice-grid img { display: block; width: 100%; height: 5.6rem; border-radius: 0.56rem; object-fit: cover; background: rgba(72, 126, 142, 0.08); }
.image-choice-grid strong, .image-choice-grid span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-choice-grid strong { margin-top: 0.36rem; color: var(--paper-bright); font-size: 0.78rem; }
.image-choice-grid span { margin-top: 0.12rem; color: rgba(244, 238, 223, 0.52); font-size: 0.64rem; }
.image-choice-grid + .modal-actions { margin-top: 0.72rem; }
.price-display-preview { padding: 0.56rem 0.64rem; border: 1px solid rgba(240, 193, 116, 0.2); border-radius: 0.76rem; color: #f7d9a6; background: rgba(240, 193, 116, 0.08); font-size: 0.82rem; font-weight: 900; line-height: 1.2; }
.image-current-simple { grid-template-columns: 6.8rem auto; justify-content: start; }
.marketplace-signals-card { gap: 0.62rem; }
.marketplace-signals-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.48rem; }
.marketplace-signal { display: grid; align-content: center; min-height: 3.2rem; padding: 0.52rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.72rem; background: rgba(3, 10, 14, 0.42); }
.marketplace-signal span { color: rgba(244, 238, 223, 0.52); font-size: 0.66rem; font-weight: 880; letter-spacing: 0.06rem; text-transform: uppercase; }
.marketplace-signal strong { margin-top: 0.18rem; color: var(--paper-bright); font-size: 0.88rem; line-height: 1.15; }
.marketplace-sold-field { min-height: 3.2rem; padding: 0.52rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.72rem; background: rgba(3, 10, 14, 0.42); }
.marketplace-sold-field input { min-height: 1.72rem; margin-top: 0.24rem; padding: 0 0.42rem; }
.marketplace-delete-button { width: 100%; }

.media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.media-grid button { min-width: 0; padding: 0.34rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.82rem; color: inherit; background: rgba(244, 238, 223, 0.035); text-align: left; overflow: hidden; }
.media-grid button.is-selected { border-color: rgba(240, 193, 116, 0.46); background: rgba(240, 193, 116, 0.1); }
.media-grid img, .media-grid video, .media-detail-preview { display: block; width: 100%; object-fit: cover; background: rgba(72, 126, 142, 0.08); }
.media-grid img, .media-grid video { height: 6.1rem; border-radius: 0.56rem; }
.media-grid strong, .media-grid span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-grid strong { margin-top: 0.42rem; color: var(--paper-bright); font-size: 0.84rem; }
.media-grid span { margin-top: 0.16rem; color: rgba(244, 238, 223, 0.52); font-size: 0.68rem; }
.media-detail-preview-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 0.8rem; color: inherit; background: transparent; }
.media-detail-preview-button:focus-visible { outline: 3px solid rgba(240, 193, 116, 0.44); outline-offset: 3px; }
.media-detail-preview-button:hover .media-detail-preview { border-color: rgba(240, 193, 116, 0.4); filter: brightness(1.05); }
.media-detail-preview { height: 11.5rem; border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.8rem; }
.media-file-thumb, .media-detail-file { display: grid; place-items: center; border: 1px solid rgba(244, 238, 223, 0.12); border-radius: 0.68rem; background: rgba(72, 126, 142, 0.1); text-align: center; }
.media-file-thumb { height: 6.1rem; padding: 0.62rem; }
.media-detail-file { min-height: 11.5rem; padding: 0.78rem; }
.media-file-thumb strong, .media-detail-file strong { margin: 0; color: #f7d9a6; font-size: 1rem; letter-spacing: 0.08rem; text-transform: uppercase; }
.media-usage-section { display: grid; gap: 0.5rem; padding: 0.62rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.84rem; background: rgba(3, 10, 14, 0.38); }
.media-usage-list { display: grid; gap: 0.36rem; }
.media-usage-item { display: flex; align-items: center; justify-content: space-between; gap: 0.58rem; min-width: 0; padding: 0.5rem 0.56rem; border: 1px solid rgba(244, 238, 223, 0.1); border-radius: 0.68rem; background: rgba(244, 238, 223, 0.035); }
.media-usage-item div { display: grid; gap: 0.12rem; min-width: 0; }
.media-usage-item a, .media-usage-item strong { min-width: 0; overflow: hidden; color: var(--paper-bright); font-size: 0.84rem; font-weight: 900; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.media-usage-item a:hover { color: #f7d9a6; }
.media-usage-item span { overflow: hidden; color: rgba(244, 238, 223, 0.48); font-size: 0.64rem; font-weight: 820; letter-spacing: 0.06rem; line-height: 1; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.media-usage-item em { flex: 0 0 auto; padding: 0.26rem 0.4rem; border: 1px solid rgba(240, 193, 116, 0.24); border-radius: 999px; color: #f7d9a6; background: rgba(240, 193, 116, 0.08); font-size: 0.6rem; font-style: normal; font-weight: 900; letter-spacing: 0.06rem; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.media-usage-empty { margin: 0; color: rgba(244, 238, 223, 0.54); font-size: 0.78rem; font-weight: 740; line-height: 1.35; }
.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; padding-top: 0.64rem; border-top: 1px solid rgba(244, 238, 223, 0.09); }
.facts strong { color: rgba(244, 238, 223, 0.78); font-size: 0.86rem; overflow-wrap: anywhere; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 0.72rem; background: rgba(0, 0, 0, 0.68); backdrop-filter: blur(10px); }
.modal-card { width: min(36rem, 100%); max-height: calc(100vh - 1.44rem); }
.marketplace-editor-backdrop { z-index: 25; }
.marketplace-editor-modal { width: min(78rem, calc(100vw - 1.44rem)); max-height: calc(100dvh - 1.44rem); }
.marketplace-editor-modal .marketplace-form { min-width: 0; }
.modal-header { margin-bottom: 0.72rem; }
.upload-form { display: grid; gap: 0.6rem; min-width: min(100%, 26rem); }
.media-viewer-backdrop { z-index: 30; padding: clamp(0.72rem, 2vw, 1.4rem); background: rgba(0, 0, 0, 0.48); }
.media-viewer-card { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 0.72rem; width: min(82rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0.82rem; border: 1px solid rgba(244, 238, 223, 0.14); border-radius: 1rem; background: linear-gradient(180deg, rgba(14, 31, 40, 0.94), rgba(5, 14, 20, 0.94)); box-shadow: 0 1rem 3.2rem rgba(0, 0, 0, 0.42); }
.media-viewer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding-bottom: 0.68rem; border-bottom: 1px solid rgba(244, 238, 223, 0.1); }
.media-viewer-header h2 { margin: 0.16rem 0 0; color: var(--paper-bright); font-size: clamp(1rem, 2vw, 1.34rem); line-height: 1.1; }
.media-viewer-header p:not(.eyebrow) { margin: 0.3rem 0 0; color: rgba(244, 238, 223, 0.66); font-size: 0.82rem; line-height: 1.35; }
.media-viewer-image { display: block; justify-self: center; max-width: min(100%, 82vw); max-height: min(78dvh, calc(100dvh - 9rem)); border-radius: 0.72rem; object-fit: contain; box-shadow: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.36); }

@media (max-width: 1180px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { max-height: 34dvh; border-right: 0; border-bottom: 1px solid rgba(244, 238, 223, 0.1); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav button { width: auto; }
  .media-layout, .two-column, .marketplace-product-layout { grid-template-columns: minmax(0, 1fr); }
  .marketplace-product-main .preview-card { min-height: 0; }
}

@media (max-width: 820px) {
  .stats, .media-grid, .form-grid, .facts, .price-editor, .marketplace-price-editor, .image-current, .rail-form-grid { grid-template-columns: minmax(0, 1fr); }
  .marketplace-browser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marketplace-item-card img { height: 5.4rem; }
  .image-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-heading, .editor-header, .gallery-panel-header, .modal-header, .media-viewer-header { flex-direction: column; align-items: stretch; }
  .editor-actions { justify-content: flex-start; flex-wrap: wrap; }
  .marketplace-editor-modal { width: min(100%, calc(100vw - 1rem)); max-height: calc(100dvh - 1rem); padding: 0.68rem; }
  .media-viewer-card { width: min(100%, calc(100vw - 1rem)); max-height: calc(100dvh - 1rem); padding: 0.68rem; }
  .media-viewer-image { max-width: 100%; max-height: min(70dvh, calc(100dvh - 12rem)); }
}

@media (max-width: 540px) {
  .workspace, .sidebar { padding: 0.75rem; }
  .marketplace-browser-grid { grid-template-columns: minmax(0, 1fr); }
  .record { grid-template-columns: minmax(0, 1fr); }
  .record img, .record-thumb { grid-row: auto; width: 100%; height: 8rem; }
  .record strong, .record em, .record-status { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* Calm production-admin palette. Keep color reserved for active, primary, and destructive states. */
:root {
  --bg: #080c11;
  --surface-0: #0b1016;
  --surface-1: #101720;
  --surface-2: #141d27;
  --surface-3: #182331;
  --line: rgba(226, 232, 240, 0.11);
  --line-strong: rgba(226, 232, 240, 0.18);
  --text: #eef2f4;
  --text-soft: rgba(238, 242, 244, 0.72);
  --text-muted: rgba(238, 242, 244, 0.5);
  --accent: #c5a46b;
  --accent-soft: rgba(197, 164, 107, 0.11);
  --accent-line: rgba(197, 164, 107, 0.34);
  --danger: #f29a93;
  --danger-soft: rgba(242, 154, 147, 0.1);
  --gold: var(--accent);
  --blue: #8b98a5;
  background: var(--bg);
  color: var(--text);
}

body {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.035), transparent 30rem), var(--bg);
}

.sidebar {
  border-color: var(--line);
  background: rgba(11, 16, 22, 0.92);
}

.lockup,
.sidebar-note,
.card,
.metric,
.editor,
.gallery-panel,
.modal-card,
.empty,
.property-section,
.preview-card,
.marketplace-new-card,
.marketplace-item-card,
.price-static,
.media-detail-file,
.media-file-thumb {
  border-color: var(--line);
  background: var(--surface-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 0.65rem 1.5rem rgba(0, 0, 0, 0.16);
}

.property-section,
.price-static,
.record,
.media-grid button,
.image-choice-grid button {
  background: var(--surface-0);
}

.publishing-card,
.pricing-card,
.media-price-card {
  border-color: var(--line);
  background: var(--surface-1);
}

.mark {
  border-color: var(--line-strong);
  color: var(--text-soft);
  background: var(--surface-2);
}

.lockup strong,
.card-heading h2,
.editor-header h2,
.gallery-panel-header h1,
.modal-header h2,
.preview-copy h3,
.property-section-heading h3,
.record strong,
.marketplace-new-card strong,
.marketplace-item-card-copy strong,
.image-current strong,
.metric strong,
.empty strong {
  color: var(--text);
}

.lockup span:not(.mark),
.eyebrow,
.metric span,
.facts span,
label.field span,
.property-section-heading p,
.media-intro,
.sidebar-note p,
.muted,
.card p,
.empty p,
small,
.record em,
.marketplace-new-card span,
.marketplace-item-card-copy em,
.marketplace-item-card-copy span,
.image-current span,
.media-grid span,
.image-choice-grid span,
.preview-copy p,
.media-viewer-header p:not(.eyebrow) {
  color: var(--text-muted);
}

.nav button,
.pill-button,
.marketplace-view-switcher button,
.editor-actions button,
.upload-actions button,
.modal-actions button,
.image-change-button {
  border-color: var(--line);
  color: var(--text-soft);
  background: var(--surface-1);
}

.nav button.is-active,
.nav button:hover,
.pill-button.is-primary,
.marketplace-view-switcher button.is-active,
.marketplace-view-switcher button:hover,
.editor-actions button:first-child,
.upload-actions button:first-child,
.modal-actions button:first-child {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.preview-footer > span {
  border-color: var(--line);
  color: var(--text-soft);
  background: var(--surface-1);
}

.status,
.status-pill,
.record-status,
.preview-status,
.price-display-preview {
  border-color: var(--line-strong);
  color: var(--text-soft);
  background: var(--surface-2);
}

.status.is-success {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.status.is-danger {
  border-color: rgba(242, 154, 147, 0.34);
  color: var(--danger);
  background: var(--danger-soft);
}

.record {
  border-color: var(--line);
  color: var(--text);
}

.marketplace-new-card,
.marketplace-item-card {
  border-color: var(--line);
  color: var(--text);
}

.record.is-selected,
.media-grid button.is-selected,
.image-choice-grid button.is-selected {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.record.is-hidden .record-status,
.preview-card.is-hidden .preview-status {
  border-color: var(--line);
  color: var(--text-muted);
  background: var(--surface-1);
}

.preview-visual,
.record img,
.record-thumb,
.marketplace-item-card img,
.image-current img,
.media-grid img,
.media-grid video,
.media-detail-preview,
.image-choice-grid img {
  border-color: var(--line);
  background: var(--surface-2);
}

.preview-kicker span,
.tag,
.service-preview-tag {
  border-color: var(--line);
  color: var(--text-soft);
  background: var(--surface-2);
}

input,
select,
textarea {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-0);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(197, 164, 107, 0.09);
}

.toggle {
  border-color: var(--line);
  background: var(--surface-0);
}

.switch-shell {
  border-color: var(--line-strong);
  background: #070b10;
}

.switch-knob {
  background: rgba(238, 242, 244, 0.55);
}

.toggle input:checked + .switch-shell {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.toggle input:checked + .switch-shell .switch-knob {
  background: var(--accent);
}

.toggle input:checked ~ .switch-copy em::after {
  color: var(--accent);
}

.danger-button {
  border-color: rgba(242, 154, 147, 0.34) !important;
  color: var(--danger) !important;
  background: var(--danger-soft) !important;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.56);
}

.media-viewer-backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.media-viewer-card {
  border-color: var(--line-strong);
  background: var(--surface-1);
}

/* Readability bump for preview admin. */
:root {
  --section-title-size: 1rem;
}

.nav button,
input,
select,
textarea,
.pill-button,
.editor-actions button,
.upload-actions button,
.modal-actions button,
.image-change-button {
  font-size: 0.92rem;
}

label.field span,
.property-section-heading p,
.media-intro,
.sidebar-note p,
.muted,
.card p,
.empty p,
small,
.image-current span,
.media-grid span,
.image-choice-grid span,
.media-viewer-header p:not(.eyebrow) {
  font-size: 0.86rem;
}

.lockup strong,
.record strong,
.image-current strong,
.empty strong,
.property-section-heading h3 {
  font-size: 0.98rem;
}

.record em,
.record-status,
.status-pill,
.preview-status,
.preview-footer > span,
.preview-kicker span,
.tag {
  font-size: 0.66rem;
}

.preview-copy p,
.status {
  font-size: 0.9rem;
}

.preview-copy h3 {
  font-size: clamp(1.24rem, 2vw, 1.58rem);
}

.price-display-preview,
.preview-footer strong {
  font-size: 0.86rem;
}

/* Marketplace browser polish. */
.marketplace-view-switcher {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: flex-end;
  min-width: 0;
  padding: 0.14rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 11, 16, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.marketplace-view-switcher button {
  padding: 0.34rem 0.46rem;
  border: 0;
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.055rem;
  line-height: 1;
  text-transform: uppercase;
}

.marketplace-view-switcher button:hover,
.marketplace-view-switcher button.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.marketplace-new-card,
.marketplace-item-card {
  border-color: rgba(226, 232, 240, 0.18);
  background: linear-gradient(180deg, rgba(22, 31, 42, 0.98), rgba(12, 18, 26, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 0.65rem 1.45rem rgba(0, 0, 0, 0.24);
}

.marketplace-new-card {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(197, 164, 107, 0.16), rgba(197, 164, 107, 0.07));
}

.marketplace-new-card strong {
  color: var(--accent);
}

.marketplace-new-card span {
  color: var(--text-soft);
}

.marketplace-item-card img {
  border-color: rgba(226, 232, 240, 0.18);
  box-shadow: 0 0.42rem 0.9rem rgba(0, 0, 0, 0.18);
}

.marketplace-new-card:hover:not(:disabled),
.marketplace-item-card:hover {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(26, 37, 50, 0.99), rgba(15, 23, 33, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0.9rem 1.9rem rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(197, 164, 107, 0.08);
  transform: translateY(-2px);
}

.marketplace-new-card:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(197, 164, 107, 0.22), rgba(197, 164, 107, 0.1));
}

/* Marketplace editor sheet. */
.marketplace-editor-backdrop {
  padding: clamp(0.7rem, 1.8vw, 1.25rem);
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
}

.marketplace-editor-modal {
  display: grid;
  width: min(82rem, calc(100vw - 1.6rem));
  max-height: calc(100dvh - 1.6rem);
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 1.18rem;
  background: linear-gradient(180deg, rgba(18, 27, 38, 0.98), rgba(8, 13, 20, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1.4rem 4rem rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.marketplace-editor-form {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  max-height: inherit;
}

.marketplace-editor-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.92rem 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.12);
  background: linear-gradient(180deg, rgba(22, 32, 45, 0.98), rgba(13, 20, 29, 0.96));
}

.marketplace-editor-title {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.marketplace-editor-title h2 {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.78rem);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.marketplace-editor-modal .editor-actions {
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
}

.marketplace-editor-modal .editor-actions button {
  min-height: 2.15rem;
  padding: 0.48rem 0.68rem;
}

.marketplace-editor-modal .status {
  margin: 0.82rem 1rem 0;
}

.marketplace-editor-body {
  min-height: 0;
  overflow: auto;
  padding: 0.9rem 1rem 1rem;
}

.marketplace-editor-modal .marketplace-product-layout {
  grid-template-columns: minmax(0, 1fr) minmax(18.5rem, 0.42fr);
  gap: 0.86rem;
  align-items: start;
}

.marketplace-editor-modal .marketplace-product-main,
.marketplace-editor-modal .marketplace-product-rail {
  align-content: start;
}

.marketplace-editor-modal .marketplace-product-main .preview-card {
  min-height: 0;
  padding: 0.72rem;
  border-color: rgba(226, 232, 240, 0.16);
  background: linear-gradient(180deg, rgba(20, 29, 40, 0.96), rgba(11, 17, 25, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0.72rem 1.6rem rgba(0, 0, 0, 0.2);
}

.marketplace-editor-modal .preview-visual {
  height: clamp(10rem, 19vw, 15.25rem);
  border-color: rgba(226, 232, 240, 0.16);
}

.marketplace-editor-modal .preview-copy h3 {
  font-size: clamp(1.22rem, 1.7vw, 1.52rem);
}

.marketplace-editor-modal .preview-copy p {
  font-size: 0.88rem;
}

.marketplace-editor-modal .property-section {
  gap: 0.64rem;
  padding: 0.72rem;
  border-color: rgba(226, 232, 240, 0.14);
  background: rgba(11, 17, 25, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.marketplace-editor-modal .marketplace-copy-section {
  border-color: rgba(197, 164, 107, 0.24);
  background: linear-gradient(180deg, rgba(197, 164, 107, 0.095), rgba(11, 17, 25, 0.76));
}

.marketplace-editor-modal .property-section-heading h3 {
  font-size: 0.98rem;
}

.marketplace-editor-modal .property-section-heading p {
  max-width: 46rem;
  font-size: 0.82rem;
}

.marketplace-editor-modal label.field span {
  font-size: 0.78rem;
}

.marketplace-editor-modal input,
.marketplace-editor-modal select,
.marketplace-editor-modal textarea {
  border-color: rgba(226, 232, 240, 0.15);
  background: rgba(5, 9, 14, 0.72);
}

.marketplace-editor-modal input,
.marketplace-editor-modal select {
  min-height: 2.32rem;
}

.marketplace-editor-modal textarea[name="description"] {
  min-height: 9.5rem;
}

.marketplace-editor-modal .image-current {
  grid-template-columns: 6.4rem minmax(0, 1fr) auto;
}

.marketplace-editor-modal .image-current img {
  height: 4.2rem;
}

.marketplace-editor-modal .toggle {
  padding: 0.52rem;
  background: rgba(5, 9, 14, 0.55);
}

.marketplace-editor-modal .switch-shell {
  flex-basis: 3.25rem;
  height: 1.78rem;
}

.marketplace-editor-modal .switch-knob {
  top: 0.2rem;
  left: 0.2rem;
  width: 1.28rem;
  height: 1.28rem;
}

.marketplace-editor-modal .toggle input:checked + .switch-shell .switch-knob {
  transform: translateX(1.42rem);
}

@media (max-width: 1180px) {
  .marketplace-editor-modal .marketplace-product-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .marketplace-editor-backdrop {
    padding: 0.5rem;
  }

  .marketplace-editor-modal {
    width: min(100%, calc(100vw - 1rem));
    max-height: calc(100dvh - 1rem);
    padding: 0;
  }

  .marketplace-editor-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.72rem;
    padding: 0.78rem;
  }

  .marketplace-editor-modal .editor-actions {
    justify-content: flex-start;
  }

  .marketplace-editor-body {
    padding: 0.72rem;
  }

  .marketplace-editor-modal .image-current {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Integrated Marketplace editor layout. */
.marketplace-editor-modal {
  width: min(62rem, calc(100vw - 1.5rem));
}

.marketplace-editor-topbar {
  align-items: center;
  padding-bottom: 0.62rem;
}

.marketplace-editor-title h2 {
  font-size: clamp(1.18rem, 1.6vw, 1.42rem);
}

.marketplace-editor-modal .preview-copy {
  min-width: 0;
}

.marketplace-editor-modal .preview-copy .marketplace-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.58rem;
}

.marketplace-editor-modal .preview-copy .preview-inline-title {
  width: auto;
  min-width: 0;
}

.marketplace-editor-modal .preview-copy .marketplace-state-pills {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.marketplace-editor-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.1rem;
}

.marketplace-editor-footer button {
  min-height: 2.18rem;
  padding: 0.48rem 0.74rem;
}

@media (max-width: 820px) {
  .marketplace-editor-modal {
    width: min(100%, calc(100vw - 1rem));
  }

  .marketplace-editor-modal .preview-copy .marketplace-title-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-editor-modal .preview-copy .marketplace-state-pills {
    justify-content: flex-start;
  }

  .marketplace-editor-footer {
    justify-content: flex-start;
  }
}

/* Marketplace publishing pills and tag chips. */
.marketplace-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
}

.marketplace-title-row h2 {
  flex: 0 1 auto;
}

.marketplace-state-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
}

.marketplace-state-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.marketplace-state-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.marketplace-state-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.18rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-2);
  font-size: 0.8rem;
  font-weight: 930;
  letter-spacing: 0.055rem;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.marketplace-state-pill input:not(:checked) ~ [data-state-on],
.marketplace-state-pill input:checked ~ [data-state-off] {
  display: none;
}

.marketplace-state-pill input:checked ~ [data-state-on] {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.marketplace-state-pill input:not(:checked) ~ [data-state-off] {
  border-color: var(--line-strong);
  color: var(--text-soft);
  background: rgba(226, 232, 240, 0.055);
}

.marketplace-state-pill:focus-within span {
  box-shadow: 0 0 0 3px rgba(197, 164, 107, 0.1);
}

.marketplace-tag-editor {
  display: grid;
  align-items: stretch;
  gap: 0.48rem;
  min-width: 0;
  min-height: 4.7rem;
  padding: 0.56rem;
  border: 1px solid var(--line);
  border-radius: 0.78rem;
  background: #070b10;
}

.marketplace-tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.marketplace-tag-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.48rem;
  min-width: 0;
  min-height: 1.45rem;
}

.marketplace-tag-status {
  flex: 1 1 auto;
  margin: 0;
  color: #ff6b63;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.25;
}

.marketplace-listing-editor-card .marketplace-card-tag-section .marketplace-tag-status {
  color: #ff6b63;
}

.marketplace-tag-status[hidden] {
  display: none;
}

.marketplace-tag-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.34rem;
  margin-left: auto;
  min-width: 0;
}

.marketplace-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
  padding: 0.34rem 0.42rem 0.34rem 0.52rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-2);
  font-size: 0.74rem;
  font-weight: 860;
  line-height: 1;
}

.marketplace-tag-chip button,
.marketplace-tag-add {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-1);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.marketplace-tag-chip button span,
.marketplace-tag-add span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  transform: translateY(-0.04rem);
}

.marketplace-tag-chip button:hover,
.marketplace-tag-add:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.marketplace-tag-input {
  flex: 0 1 8.5rem;
  min-height: 1.86rem !important;
  padding: 0 0.48rem !important;
  border-radius: 999px !important;
  font-size: 0.78rem !important;
}

.marketplace-tag-add {
  flex: 0 0 auto;
}

@media (max-width: 540px) {
  .marketplace-title-row {
    align-items: flex-start;
  }

  .marketplace-state-pills {
    width: 100%;
  }

  .marketplace-tag-editor {
    gap: 0.42rem;
  }

  .marketplace-tag-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .marketplace-tag-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .marketplace-tag-status {
    flex-basis: 100%;
  }

  .marketplace-tag-input {
    flex: 1 1 min(100%, 12rem);
  }
}

.marketplace-editor-modal .image-current-simple {
  grid-template-columns: 6.2rem auto;
}

@media (max-width: 820px) {
  .marketplace-editor-modal .image-current-simple {
    grid-template-columns: minmax(0, 1fr);
  }
}

.marketplace-editor-modal .preview-inline-title,
.marketplace-editor-modal .preview-inline-description {
  width: 100%;
  min-height: 0;
  padding: 0.18rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 0.42rem;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

.marketplace-editor-modal .preview-inline-title {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  font-weight: 900;
  line-height: 1.08;
}

.marketplace-editor-modal .preview-inline-description {
  resize: vertical;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 680;
  line-height: 1.45;
}

.marketplace-editor-modal .preview-inline-title::placeholder,
.marketplace-editor-modal .preview-inline-description::placeholder {
  color: var(--text-muted);
}

.marketplace-editor-modal .preview-inline-title:hover,
.marketplace-editor-modal .preview-inline-description:hover {
  border-color: var(--line);
  background: rgba(238, 242, 244, 0.025);
}

.marketplace-editor-modal .preview-inline-title:focus,
.marketplace-editor-modal .preview-inline-description:focus {
  border-color: var(--accent-line);
  background: rgba(197, 164, 107, 0.06);
  box-shadow: 0 0 0 3px rgba(197, 164, 107, 0.08);
}

/* Marketplace editor column balance. */
.marketplace-editor-modal .marketplace-product-layout {
  grid-template-columns: minmax(0, 1.04fr) minmax(19rem, 0.44fr);
  gap: clamp(0.82rem, 1.4vw, 1.08rem);
  align-items: stretch;
}

.marketplace-editor-modal .marketplace-product-main,
.marketplace-editor-modal .marketplace-product-rail {
  gap: 0.78rem;
}

.marketplace-editor-modal .marketplace-product-main {
  grid-template-rows: auto auto minmax(0, 0.58fr);
}

.marketplace-editor-modal .marketplace-product-rail {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.marketplace-editor-modal .preview-visual {
  height: clamp(8.8rem, 15vw, 12.8rem);
}

.marketplace-editor-modal .marketplace-copy-section textarea[name="description"] {
  min-height: 7.4rem;
}

.marketplace-editor-modal .marketplace-tags-section {
  align-content: start;
  border-color: rgba(226, 232, 240, 0.13);
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.045), rgba(11, 17, 25, 0.76));
}

.marketplace-editor-modal .marketplace-tags-section textarea {
  min-height: 4.2rem;
}

.marketplace-editor-modal .marketplace-product-rail > .property-section:last-child {
  align-content: start;
  min-height: 100%;
}

.marketplace-editor-modal .marketplace-product-rail .rail-form-grid {
  gap: 0.54rem;
}

.marketplace-editor-modal .marketplace-product-rail .property-section {
  padding-block: 0.78rem;
}

@media (max-width: 1180px) {
  .marketplace-editor-modal .marketplace-product-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-editor-modal .marketplace-product-main,
  .marketplace-editor-modal .marketplace-product-rail {
    grid-template-rows: none;
  }
}

/* Marketplace editor cleanup: compact, predictable admin modal. */
.marketplace-editor-backdrop {
  padding: clamp(0.72rem, 1.6vw, 1.1rem);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.marketplace-editor-modal {
  width: min(74rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 0.72rem;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 1.18rem;
  background: radial-gradient(circle at 8% 0%, rgba(197, 164, 107, 0.12), transparent 18rem), linear-gradient(180deg, rgba(16, 25, 36, 0.98), rgba(6, 10, 15, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 1.15rem 3.2rem rgba(0, 0, 0, 0.46);
  overflow: auto;
}

.marketplace-editor-form {
  display: grid;
  grid-template-rows: none;
  gap: 0.72rem;
  min-height: 0;
  max-height: none;
}

.marketplace-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.68rem 0.72rem;
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(22, 32, 45, 0.92), rgba(9, 14, 20, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.marketplace-editor-title {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.marketplace-editor-title h2 {
  margin: 0;
  color: var(--text);
  font-family: inherit;
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.marketplace-editor-close {
  flex: 0 0 auto;
  min-height: 2.05rem;
  padding: 0.46rem 0.72rem;
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(226, 232, 240, 0.055);
}

.marketplace-editor-modal .editor-actions {
  align-items: center;
  justify-content: flex-end;
}

.marketplace-editor-modal .editor-actions button {
  min-height: 2.1rem;
  padding: 0.46rem 0.66rem;
}

.marketplace-editor-modal .status {
  margin: 0;
}

.marketplace-editor-body {
  min-height: 0;
  padding: 0;
  overflow: visible;
}

.marketplace-editor-modal .marketplace-product-layout {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.42fr);
  gap: 0.72rem;
  align-items: start;
}

.marketplace-editor-modal .marketplace-product-main,
.marketplace-editor-modal .marketplace-product-rail {
  gap: 0.72rem;
  grid-template-rows: none;
  align-content: start;
}

.marketplace-editor-modal .marketplace-product-main .preview-card,
.marketplace-editor-modal .property-section {
  border-color: var(--line);
  background: var(--surface-0);
  box-shadow: none;
}

.marketplace-editor-modal .marketplace-product-main .preview-card {
  min-height: 0;
  padding: 0.64rem;
}

.marketplace-editor-modal .preview-visual {
  height: clamp(8.5rem, 14vw, 11rem);
  border-color: var(--line);
}

.marketplace-editor-modal .preview-copy h3 {
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
}

.marketplace-editor-modal .preview-copy p {
  font-size: 0.86rem;
}

.marketplace-editor-modal .property-section {
  gap: 0.58rem;
  padding: 0.66rem;
}

.marketplace-editor-modal .marketplace-copy-section {
  border-color: var(--line);
  background: var(--surface-0);
}

.marketplace-editor-modal .property-section-heading h3 {
  font-size: 0.92rem;
}

.marketplace-editor-modal .property-section-heading p,
.marketplace-editor-modal label.field span {
  font-size: 0.78rem;
}

.marketplace-editor-modal input,
.marketplace-editor-modal select,
.marketplace-editor-modal textarea {
  border-color: var(--line);
  background: #070b10;
}

.marketplace-editor-modal textarea[name="description"] {
  min-height: 8rem;
}

.marketplace-editor-modal textarea[name="tagsText"] {
  min-height: 4.6rem;
}

.marketplace-editor-modal .image-current {
  grid-template-columns: 6.2rem minmax(0, 1fr) auto;
}

.marketplace-editor-modal .image-current img {
  height: 4rem;
}

.marketplace-editor-modal .marketplace-product-rail > .property-section:last-child {
  min-height: 0;
  align-content: start;
}

@media (max-width: 1180px) {
  .marketplace-editor-modal .marketplace-product-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .marketplace-editor-backdrop {
    padding: 0.5rem;
  }

  .marketplace-editor-modal {
    width: min(100%, calc(100vw - 1rem));
    max-height: calc(100dvh - 1rem);
    padding: 0.68rem;
  }

  .marketplace-editor-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .marketplace-editor-modal .editor-actions {
    justify-content: flex-start;
  }

  .marketplace-editor-modal .image-current {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Editable listing-card Marketplace modal. Keep this last so it wins over older editor cleanup rules. */
.marketplace-editor-modal {
  width: min(70rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: hidden;
}

.marketplace-editor-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100dvh - 3.14rem);
}

.marketplace-editor-topbar {
  align-items: center;
  padding: 0 0 0.55rem;
  border-bottom: 0;
}

.marketplace-editor-title h2 {
  font-size: clamp(1.16rem, 1.6vw, 1.38rem);
}

.marketplace-editor-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.marketplace-editor-modal .marketplace-card-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: center;
  min-height: 0;
}

.marketplace-editor-modal .marketplace-card-editor-layout .marketplace-product-main {
  display: grid;
  width: min(100%, 66rem);
  align-content: start;
  gap: 0.68rem;
}

.marketplace-editor-modal .marketplace-card-editor-layout .marketplace-listing-editor-card {
  display: grid !important;
  grid-template-columns: minmax(20rem, 0.46fr) minmax(0, 0.54fr);
  align-items: start;
  gap: 0.78rem;
  min-height: 0;
  padding: 0.78rem;
  border: 1px solid rgba(240, 193, 116, 0.18);
  border-radius: 1.08rem;
  background: linear-gradient(180deg, rgba(245, 239, 226, 0.075), rgba(245, 239, 226, 0.032));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 0.9rem 1.9rem rgba(0, 0, 0, 0.22);
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-visual {
  height: clamp(18rem, 27vw, 25rem);
  min-height: 0;
  border-radius: 0.88rem;
}

.marketplace-card-image-action {
  position: absolute;
  left: 0.58rem;
  bottom: 0.58rem;
  background: rgba(5, 14, 20, 0.82);
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-copy {
  min-width: 0;
  gap: 0.58rem;
}

.marketplace-editor-modal .marketplace-listing-editor-card .marketplace-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.44rem;
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-inline-title {
  flex: 1 1 13rem;
  width: auto;
  min-width: 0;
  padding: 0.1rem 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: clamp(1.22rem, 2.2vw, 1.58rem);
}

.marketplace-editor-modal .marketplace-listing-editor-card .marketplace-state-pills {
  flex: 0 1 auto;
  gap: 0.28rem;
}

.marketplace-editor-modal .marketplace-listing-editor-card .marketplace-state-pill span {
  min-height: 1.78rem;
  padding: 0.34rem 0.5rem;
  font-size: 0.66rem;
  letter-spacing: 0.05rem;
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-inline-description {
  min-height: 5.8rem;
  max-height: clamp(8rem, 26vh, 14rem);
  overflow: auto;
  padding: 0.2rem 0;
  border-color: transparent;
  border-radius: 0.5rem;
  background: transparent;
  box-shadow: none;
  font-size: 0.9rem;
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-inline-title:hover,
.marketplace-editor-modal .marketplace-listing-editor-card .preview-inline-description:hover {
  border-color: rgba(244, 238, 223, 0.1);
  background: rgba(244, 238, 223, 0.025);
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-inline-title:focus,
.marketplace-editor-modal .marketplace-listing-editor-card .preview-inline-description:focus {
  border-color: rgba(240, 193, 116, 0.42);
  background: rgba(240, 193, 116, 0.055);
  box-shadow: 0 0 0 3px rgba(240, 193, 116, 0.09);
}

.marketplace-card-meta-grid,
.marketplace-card-price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.marketplace-card-field {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
  padding: 0.42rem 0.5rem;
  border: 1px solid rgba(244, 238, 223, 0.1);
  border-radius: 0.74rem;
  background: rgba(3, 10, 14, 0.36);
}

.marketplace-card-field span {
  color: rgba(244, 238, 223, 0.48);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.07rem;
  line-height: 1;
  text-transform: uppercase;
}

.marketplace-card-field input {
  min-height: 1.35rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: rgba(244, 238, 223, 0.86);
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.84rem;
  font-weight: 830;
}

.marketplace-card-price-display {
  grid-column: 1 / -1;
  padding: 0.44rem 0.52rem;
  border: 1px solid rgba(240, 193, 116, 0.2);
  border-radius: 0.74rem;
  color: #f7d9a6;
  background: rgba(240, 193, 116, 0.075);
  font-size: 0.8rem;
  line-height: 1.2;
}

.marketplace-listing-editor-card .marketplace-tag-editor {
  padding: 0;
  border: 0;
  background: transparent;
}

.marketplace-listing-editor-card .marketplace-tag-chip {
  border-color: rgba(226, 232, 240, 0.14);
  color: rgba(244, 238, 223, 0.72);
  background: rgba(226, 232, 240, 0.055);
}

.marketplace-listing-editor-card .marketplace-tag-add,
.marketplace-listing-editor-card .marketplace-tag-chip button {
  border-color: rgba(226, 232, 240, 0.12);
  color: rgba(244, 238, 223, 0.5);
  background: rgba(3, 10, 14, 0.44);
}

.marketplace-card-footer {
  align-items: center;
  margin-top: 0.06rem;
  padding-top: 0.54rem;
  border-top: 1px solid rgba(244, 238, 223, 0.08);
}

.marketplace-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.38rem;
}

.marketplace-card-actions button {
  min-height: 2rem;
  padding: 0.42rem 0.62rem;
}

.marketplace-card-actions .marketplace-save-button {
  border: 1px solid rgba(240, 193, 116, 0.42);
  border-radius: 999px;
  color: #f7d9a6;
  background: rgba(240, 193, 116, 0.13);
  font-weight: 900;
}

.marketplace-card-actions .marketplace-save-button:hover:not(:disabled),
.marketplace-card-actions .marketplace-save-button:focus-visible {
  border-color: rgba(240, 193, 116, 0.56);
  background: rgba(240, 193, 116, 0.18);
}

.marketplace-card-editor-layout .marketplace-signals-card {
  display: grid;
  grid-template-columns: minmax(11rem, 0.36fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.54rem;
  padding: 0.6rem;
  border: 1px solid rgba(244, 238, 223, 0.09);
  border-radius: 0.92rem;
  background: rgba(3, 10, 14, 0.26);
}

.marketplace-signals-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.56rem;
}

.marketplace-signals-heading h3,
.marketplace-signals-heading p {
  margin: 0;
}

.marketplace-signals-heading h3 {
  color: rgba(244, 238, 223, 0.84);
  font-size: 0.84rem;
  line-height: 1.1;
}

.marketplace-signals-heading p,
.marketplace-signals-card small {
  color: rgba(244, 238, 223, 0.48);
  font-size: 0.7rem;
  line-height: 1.3;
}

.marketplace-card-editor-layout .marketplace-signals-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.34rem;
}

.marketplace-card-editor-layout .marketplace-delete-button {
  width: auto;
  white-space: nowrap;
}

.marketplace-card-editor-layout .marketplace-signals-card small {
  grid-column: 1 / -1;
}

.marketplace-card-editor-layout .marketplace-signal,
.marketplace-card-editor-layout .marketplace-sold-field {
  min-height: 2.72rem;
  padding: 0.42rem 0.36rem;
  border-radius: 0.68rem;
}

.marketplace-card-editor-layout .marketplace-signal span,
.marketplace-card-editor-layout .marketplace-sold-field span {
  font-size: 0.54rem;
  letter-spacing: 0.05rem;
  line-height: 1.1;
}

.marketplace-card-editor-layout .marketplace-signal strong {
  font-size: 0.82rem;
}

.marketplace-card-editor-layout .marketplace-sold-field input {
  margin-top: 0;
}

@media (max-width: 540px) {
  .marketplace-card-meta-grid,
  .marketplace-card-price-row,
  .marketplace-card-editor-layout .marketplace-signals-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-card-footer {
    align-items: flex-start;
  }

  .marketplace-card-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .marketplace-editor-modal .marketplace-card-editor-layout .marketplace-product-main {
    width: min(100%, 34rem);
  }

  .marketplace-editor-modal .marketplace-card-editor-layout .marketplace-listing-editor-card,
  .marketplace-card-editor-layout .marketplace-signals-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-editor-modal .marketplace-listing-editor-card .preview-visual {
    height: clamp(14rem, 54vw, 22rem);
  }

  .marketplace-card-editor-layout .marketplace-signals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketplace-card-editor-layout .marketplace-delete-button {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .marketplace-card-meta-grid,
  .marketplace-card-price-row,
  .marketplace-card-editor-layout .marketplace-signals-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Marketplace route final pass. This supersedes older modal/card experiments above. */
.marketplace-browser-header {
  display: grid;
  grid-template-columns: minmax(13rem, 0.34fr) minmax(34rem, 1fr);
  align-items: stretch;
  gap: 0.68rem;
  padding: clamp(0.62rem, 1.2vw, 0.82rem);
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 1rem;
  background: radial-gradient(circle at 12% 18%, rgba(197, 164, 107, 0.13), transparent 16rem), linear-gradient(135deg, rgba(20, 29, 40, 0.92), rgba(7, 11, 16, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0.8rem 1.9rem rgba(0, 0, 0, 0.18);
}

.marketplace-browser-title {
  align-self: center;
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.marketplace-browser-title h1 {
  letter-spacing: -0.025em;
}

.marketplace-browser-title .media-intro {
  max-width: 28rem;
  margin-top: 0;
}

.marketplace-browser-eyebrow {
  width: fit-content;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.12rem;
  line-height: 1;
  text-transform: uppercase;
}

.marketplace-browser-panel {
  position: relative;
}

.marketplace-browser-panel .gallery-panel-body {
  padding-right: 0.7rem;
  padding-bottom: 3.6rem;
  scrollbar-gutter: stable;
}

.marketplace-browser-results {
  display: grid;
  gap: 0.62rem;
  min-width: 0;
}

.marketplace-result-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  padding: 0.02rem 0.1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 820;
  line-height: 1.2;
}

.marketplace-result-summary strong {
  color: var(--text-soft);
  font-size: inherit;
  font-weight: 900;
}

.marketplace-header-metrics {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(6.6rem, 7.8rem));
  grid-auto-rows: 1fr;
  align-self: stretch;
  align-items: stretch;
  gap: 0.42rem;
  width: 100%;
  min-width: 0;
  justify-content: end;
  justify-self: end;
}

.marketplace-header-metric {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 4.35rem;
  height: 100%;
  min-width: 0;
  padding: 0.56rem 0.48rem;
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 0.86rem;
  color: var(--text-soft);
  background: rgba(7, 11, 16, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  line-height: 1;
  text-align: center;
}

.marketplace-header-metric strong {
  color: var(--paper-bright);
  font-size: clamp(1.06rem, 1.45vw, 1.34rem);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.marketplace-header-metric span {
  margin-top: 0.16rem;
  color: var(--text-soft);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.04rem;
  line-height: 1.08;
  text-transform: uppercase;
  text-wrap: balance;
}

.marketplace-toolbar {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) auto;
  gap: 0.64rem;
  align-items: end;
  padding: 0.54rem;
  border: 1px solid var(--line);
  border-radius: 0.92rem;
  background: rgba(7, 11, 16, 0.72);
}

.marketplace-search-field {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.marketplace-search-field span {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.marketplace-search-field input {
  min-height: 2.26rem;
  border-color: var(--line);
  background: #070b10;
}

.marketplace-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.44rem;
  min-width: 0;
}

.marketplace-compact-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(11.5rem, 14.5rem));
  gap: 0.42rem;
  justify-content: end;
  align-items: end;
  min-width: 0;
}

.marketplace-filter-group {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.marketplace-filter-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.36rem;
  min-height: 2.16rem;
  padding: 0.36rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  background: #070b10;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.marketplace-filter-pill::-webkit-details-marker {
  display: none;
}

.marketplace-filter-pill::after {
  content: '';
  justify-self: end;
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 160ms ease;
}

.marketplace-filter-group[open] .marketplace-filter-pill::after {
  transform: translateY(0.1rem) rotate(225deg);
}

.marketplace-filter-pill span {
  min-width: 0;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08rem;
  line-height: 1;
  text-transform: uppercase;
}

.marketplace-filter-pill strong {
  min-width: 0;
  overflow: hidden;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-filter-group[open] .marketplace-filter-pill,
.marketplace-filter-pill:hover {
  border-color: rgba(240, 193, 116, 0.36);
  background: rgba(240, 193, 116, 0.08);
}

.marketplace-filter-options {
  position: absolute;
  z-index: 12;
  top: calc(100% + 0.28rem);
  right: 0;
  left: 0;
  display: grid;
  gap: 0.22rem;
  max-height: 18rem;
  min-width: 16rem;
  overflow: auto;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 0.68rem;
  background: #070b10;
}

.marketplace-filter-check {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 1.64rem;
  padding: 0.24rem 0.32rem;
  border: 1px solid transparent;
  border-radius: 0.52rem;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 820;
  line-height: 1.1;
  cursor: pointer;
}

.marketplace-filter-check:hover,
.marketplace-filter-check.is-checked {
  border-color: rgba(240, 193, 116, 0.32);
  color: var(--accent);
  background: rgba(240, 193, 116, 0.09);
}

.marketplace-filter-check input {
  flex: 0 0 auto;
  width: 0.88rem;
  height: 0.88rem;
  margin: 0;
  accent-color: var(--accent);
}

.marketplace-filter-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.08rem 0 0;
  color: var(--text-muted);
}

.marketplace-pagination button {
  min-height: 2.12rem;
  padding: 0.38rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-1);
  font-size: 0.875rem;
  font-weight: 860;
}

.marketplace-pagination button:hover:not(:disabled) {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.marketplace-pagination span {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
}

.marketplace-view-float {
  position: absolute;
  z-index: 6;
  right: 0.86rem;
  bottom: 0.82rem;
  display: flex;
  justify-content: flex-end;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.28rem;
  border: 1px solid rgba(226, 232, 240, 0.15);
  border-radius: 999px;
  background: rgba(7, 11, 16, 0.86);
  box-shadow: 0 0.7rem 1.8rem rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.marketplace-view-float .marketplace-view-switcher {
  justify-content: flex-end;
}

.marketplace-browser-grid {
  gap: 0.72rem;
}

.marketplace-new-card,
.marketplace-item-card {
  border-color: rgba(226, 232, 240, 0.13);
  background: linear-gradient(180deg, rgba(20, 29, 40, 0.82), rgba(8, 12, 17, 0.88));
}

.marketplace-new-card {
  min-height: 11rem;
  border-style: solid;
  background: radial-gradient(circle at 50% 30%, rgba(197, 164, 107, 0.12), transparent 8rem), var(--surface-0);
}

.marketplace-new-card strong {
  font-size: 1rem;
}

.marketplace-new-card span {
  max-width: 12rem;
  text-align: center;
}

.marketplace-item-card {
  gap: 0.52rem;
  padding: 0.58rem;
}

.marketplace-item-card:hover {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(197, 164, 107, 0.09), rgba(8, 12, 17, 0.88));
}

.marketplace-item-card img {
  height: clamp(6.2rem, 9vw, 8.2rem);
  border-color: rgba(226, 232, 240, 0.14);
}

.marketplace-item-card .marketplace-image-frame {
  height: clamp(6.2rem, 9vw, 8.2rem);
  border-color: rgba(226, 232, 240, 0.14);
}

.marketplace-item-card-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.22rem;
  align-content: start;
  min-height: 0;
}

.marketplace-item-card-copy strong {
  font-size: 0.96rem;
}

.marketplace-item-card-copy em {
  color: rgba(247, 217, 166, 0.88);
}

.marketplace-item-card-copy small {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: auto 0 0;
}

.marketplace-item-card-copy small span {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  padding: 0.2rem 0.34rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(226, 232, 240, 0.045);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.045rem;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.record-status.is-public {
  border-color: rgba(132, 204, 166, 0.32);
  color: #b7e4c8;
  background: rgba(132, 204, 166, 0.08);
}

.record-status.is-hidden {
  border-color: rgba(226, 232, 240, 0.14);
  color: var(--text-muted);
  background: rgba(226, 232, 240, 0.045);
}

.record-status.is-featured {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.record-status.is-archived {
  border-color: rgba(242, 154, 147, 0.28);
  color: var(--danger);
  background: var(--danger-soft);
}

.marketplace-browser-grid.is-list .marketplace-new-card {
  min-height: 4.4rem;
}

.marketplace-browser-grid.is-list .marketplace-item-card {
  grid-template-columns: 5.8rem minmax(0, 1fr) auto;
  gap: 0.78rem;
}

.marketplace-browser-grid.is-list .marketplace-item-card img {
  height: 4.4rem;
}

.marketplace-browser-grid.is-list .marketplace-item-card .marketplace-image-frame {
  height: 4.4rem;
}

.marketplace-browser-grid.is-list .marketplace-item-card-copy small {
  display: flex;
  margin-top: 0.02rem;
}

.marketplace-browser-grid.is-list .marketplace-item-card-copy {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: 0.72rem;
}

.marketplace-browser-grid.is-list .marketplace-item-card-copy strong,
.marketplace-browser-grid.is-list .marketplace-item-card-copy .marketplace-item-description,
.marketplace-browser-grid.is-list .marketplace-item-card-copy small {
  grid-column: 1;
}

.marketplace-browser-grid.is-list .marketplace-item-card-copy em {
  grid-column: 2;
  grid-row: 1 / span 3;
  justify-self: end;
  max-width: 13rem;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-editor-modal {
  width: min(74rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 1.12rem;
  background: linear-gradient(180deg, #101720, #080c11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 1.25rem 3.3rem rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.marketplace-editor-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100dvh - 1.5rem);
}

.marketplace-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.86rem 1rem;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 0;
  background: rgba(226, 232, 240, 0.025);
  box-shadow: none;
}

.marketplace-editor-title h2 {
  display: block;
  color: rgba(244, 238, 223, 0.9);
  letter-spacing: -0.015em;
}

.marketplace-editor-close {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.13);
  border-radius: 999px;
  color: rgba(244, 238, 223, 0.74);
  background: rgba(226, 232, 240, 0.045);
  font: inherit;
  font-size: 1.24rem;
  line-height: 1;
}

.marketplace-editor-close span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  transform: translateY(-0.04rem);
}

.marketplace-editor-close:hover:not(:disabled),
.marketplace-editor-close:focus-visible {
  border-color: rgba(240, 193, 116, 0.34);
  color: #f7d9a6;
  background: rgba(240, 193, 116, 0.1);
}

.marketplace-editor-close:disabled {
  cursor: wait;
  opacity: 0.56;
}

.marketplace-editor-body {
  padding: 0.72rem;
}

.marketplace-editor-modal .status {
  margin: 0.72rem 0.72rem 0;
}

.marketplace-editor-modal .marketplace-card-editor-layout .marketplace-product-main {
  width: min(100%, 68rem);
}

.marketplace-editor-modal .marketplace-card-editor-layout .marketplace-listing-editor-card {
  grid-template-columns: minmax(22rem, 0.48fr) minmax(0, 0.52fr);
  gap: clamp(0.72rem, 1.4vw, 1rem);
  border-color: rgba(226, 232, 240, 0.14);
  background: linear-gradient(180deg, rgba(20, 29, 40, 0.9), rgba(8, 12, 17, 0.92));
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-visual {
  height: clamp(18rem, 29vw, 26rem);
}

.marketplace-image-slot {
  width: 100%;
  height: 100%;
}

.marketplace-image-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: rgba(72, 126, 142, 0.08);
}

.marketplace-image-slot .marketplace-image-frame,
.marketplace-media-thumb .marketplace-image-frame {
  height: 100%;
  border-radius: inherit;
}

.marketplace-image-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-image-frame > img[hidden],
.marketplace-image-failed[hidden] {
  display: none !important;
}

.marketplace-image-failed {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.18rem;
  padding: 0.62rem;
  border: 1px dashed rgba(255, 178, 172, 0.34);
  color: #ffb2ac;
  background: linear-gradient(135deg, rgba(255, 107, 99, 0.13), rgba(72, 126, 142, 0.09));
  text-align: center;
}

.marketplace-image-failed strong {
  font-size: 0.68rem;
  font-weight: 930;
  letter-spacing: 0.08rem;
  line-height: 1;
  text-transform: uppercase;
}

.marketplace-image-failed span {
  color: rgba(244, 238, 223, 0.66);
  font-size: 0.6rem;
  font-weight: 760;
  line-height: 1.2;
}

.marketplace-image-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.32rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  color: rgba(244, 238, 223, 0.66);
  text-align: center;
}

.marketplace-image-empty strong {
  color: rgba(244, 238, 223, 0.86);
  font-size: 0.86rem;
  font-weight: 930;
  letter-spacing: 0.07rem;
  text-transform: uppercase;
}

.marketplace-image-empty span {
  font-size: 0.72rem;
  font-weight: 760;
}

.marketplace-listing-media-stack {
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
  min-width: 0;
}

.marketplace-media-carousel {
  min-width: 0;
}

.marketplace-media-carousel-track {
  display: flex;
  flex-direction: row;
  gap: 0.46rem;
  overflow-x: auto;
  padding: 0.04rem 0.02rem 0.24rem;
  scrollbar-gutter: stable;
}

.marketplace-media-thumb,
.marketplace-media-add-tile {
  position: relative;
  flex: 0 0 6.4rem;
  height: 4.9rem;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 0.72rem;
  background: rgba(8, 12, 17, 0.72);
}

.marketplace-media-thumb.is-selected {
  border-color: rgba(240, 193, 116, 0.66);
  box-shadow: 0 0 0 3px rgba(240, 193, 116, 0.12);
}

.marketplace-media-thumb.is-primary:not(.is-selected) {
  border-color: rgba(197, 164, 107, 0.34);
}

.marketplace-media-thumb-preview {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.marketplace-media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-media-primary-badge {
  position: absolute;
  top: 0.28rem;
  left: 0.28rem;
  padding: 0.2rem 0.3rem;
  border: 1px solid rgba(3, 10, 14, 0.72);
  border-radius: 999px;
  color: #f7d9a6;
  background: rgba(3, 10, 14, 0.78);
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: 0.05rem;
  line-height: 1;
  text-transform: uppercase;
}

.marketplace-media-thumb-actions {
  position: absolute;
  inset: auto 0.22rem 0.22rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  opacity: 0;
  transform: translateY(0.24rem);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.marketplace-media-thumb:hover .marketplace-media-thumb-actions,
.marketplace-media-thumb:focus-within .marketplace-media-thumb-actions {
  opacity: 1;
  transform: translateY(0);
}

.marketplace-media-thumb-actions button {
  width: fit-content;
  max-width: calc(100% - 0.2rem);
  padding: 0.18rem 0.3rem;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 999px;
  color: rgba(244, 238, 223, 0.88);
  background: rgba(8, 12, 17, 0.86);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.045rem;
  text-transform: uppercase;
}

.marketplace-media-add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  border-style: dashed;
  color: rgba(244, 238, 223, 0.74);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.055rem;
  text-transform: uppercase;
}

.marketplace-media-add-tile span {
  display: grid;
  place-items: center;
  width: 1.72rem;
  height: 1.72rem;
  border: 1px solid rgba(197, 164, 107, 0.3);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(197, 164, 107, 0.1);
  font-size: 1.28rem;
  line-height: 1;
}

.marketplace-card-image-action {
  border-color: rgba(226, 232, 240, 0.22);
  background: rgba(8, 12, 17, 0.84);
  backdrop-filter: blur(8px);
}

.marketplace-card-image-action.is-primary-selected,
.marketplace-card-image-action.is-primary-selected:disabled {
  border-color: rgba(240, 193, 116, 0.72);
  color: #f7d9a6;
  background: #11100c;
  backdrop-filter: none;
  cursor: pointer;
  opacity: 1;
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-inline-title {
  font-size: clamp(1.28rem, 2.4vw, 1.74rem);
  letter-spacing: -0.025em;
}

.marketplace-editor-modal .marketplace-listing-editor-card .preview-inline-description {
  min-height: 6.2rem;
  max-height: clamp(8rem, 24vh, 13rem);
}

.marketplace-public-link {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08rem;
  text-decoration: none;
  text-transform: uppercase;
}

.marketplace-public-link:hover {
  color: #f7d9a6;
}

.marketplace-card-editor-layout .marketplace-signals-card {
  grid-template-columns: minmax(9rem, 0.28fr) minmax(0, 1fr);
  gap: 0.72rem;
  padding: 0.82rem 0.9rem;
  background: rgba(7, 11, 16, 0.58);
}

.marketplace-signals-heading {
  display: grid;
  align-content: start;
  justify-content: start;
  gap: 0.22rem;
  padding: 0.08rem 0.12rem 0.08rem 0;
}

.marketplace-signals-heading p {
  max-width: 12.5rem;
}

.marketplace-card-editor-layout .marketplace-signals-grid {
  gap: 0.5rem;
}

.marketplace-card-editor-layout .marketplace-signal,
.marketplace-card-editor-layout .marketplace-sold-field {
  min-height: 3.08rem;
  padding: 0.58rem 0.56rem;
}

.marketplace-card-editor-layout .marketplace-signal strong {
  margin-top: 0.24rem;
}

.marketplace-card-editor-layout .marketplace-sold-field input {
  min-height: 1.82rem;
  margin-top: 0.18rem;
  padding-inline: 0.46rem;
}

@media (max-width: 1120px) {
  .marketplace-browser-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-browser-title .media-intro {
    max-width: 42rem;
  }

  .marketplace-header-metrics {
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  }
}

@media (max-width: 980px) {
  .marketplace-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-toolbar-actions {
    justify-content: flex-start;
  }

  .marketplace-compact-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .marketplace-view-float {
    right: 0.62rem;
    bottom: 0.62rem;
  }

  .marketplace-header-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .marketplace-editor-modal .marketplace-card-editor-layout .marketplace-listing-editor-card,
  .marketplace-card-editor-layout .marketplace-signals-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-editor-modal .marketplace-listing-editor-card .preview-visual {
    height: clamp(14rem, 58vw, 23rem);
  }
}

@media (max-width: 540px) {
  .marketplace-browser-header {
    align-items: stretch;
  }

  .marketplace-header-metrics {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .marketplace-header-metric {
    width: 100%;
  }

  .marketplace-toolbar {
    padding: 0.5rem;
  }

  .marketplace-result-summary {
    justify-content: flex-start;
  }

  .marketplace-pagination {
    align-items: stretch;
  }

  .marketplace-pagination button {
    flex: 1 1 7rem;
  }

  .marketplace-pagination span {
    flex: 1 0 100%;
    order: -1;
  }

  .marketplace-compact-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-card-footer,
  .marketplace-card-actions {
    align-items: stretch;
    width: 100%;
  }

  .marketplace-card-actions button,
  .marketplace-public-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.marketplace-item-card-copy .marketplace-item-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.marketplace-item-card-copy .marketplace-item-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  min-width: 0;
  margin-top: 0.08rem;
  overflow: visible;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  -webkit-line-clamp: initial;
}

.marketplace-item-card-copy .marketplace-item-card-tags span {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  padding: 0.2rem 0.34rem;
  border: 1px solid rgba(240, 193, 116, 0.2);
  border-radius: 999px;
  color: rgba(247, 217, 166, 0.84);
  background: rgba(240, 193, 116, 0.075);
  font-size: 0.58rem;
  font-weight: 920;
  letter-spacing: 0.045rem;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-line-clamp: initial;
}

.marketplace-item-card-copy .marketplace-item-card-tags.is-empty {
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem 0.34rem;
  border: 1px dashed rgba(226, 232, 240, 0.12);
  border-radius: 999px;
  color: rgba(244, 238, 223, 0.36);
  background: rgba(226, 232, 240, 0.025);
  font-size: 0.58rem;
  font-weight: 860;
  letter-spacing: 0.045rem;
  line-height: 1;
  text-transform: uppercase;
  -webkit-line-clamp: initial;
}

.marketplace-browser-grid.is-list .marketplace-item-card-copy .marketplace-item-card-tags {
  margin-top: 0.1rem;
}

.marketplace-card-tag-section {
  display: grid;
  gap: 0.34rem;
  padding: 0.5rem;
  border: 1px solid rgba(244, 238, 223, 0.1);
  border-radius: 0.84rem;
  background: rgba(3, 10, 14, 0.34);
}

.marketplace-card-tag-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.36rem;
}

.marketplace-card-tag-heading span {
  color: rgba(244, 238, 223, 0.68);
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.08rem;
  line-height: 1;
  text-transform: uppercase;
}

.marketplace-card-tag-heading small {
  color: rgba(244, 238, 223, 0.42);
  font-size: 0.66rem;
  font-weight: 720;
}

.marketplace-listing-editor-card .marketplace-card-tag-section .marketplace-tag-editor {
  align-items: flex-start;
  gap: 0.42rem;
}

.marketplace-tag-empty {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  color: rgba(244, 238, 223, 0.42);
  font-size: 0.72rem;
  font-weight: 760;
}

.marketplace-listing-editor-card .marketplace-tag-chip {
  color: rgba(244, 238, 223, 0.72);
}

@media (max-width: 540px) {
  .marketplace-card-tag-heading {
    display: grid;
    justify-content: start;
  }
}

.marketplace-browser-grid.is-list .marketplace-item-card-copy small {
  display: flex;
  margin-top: 0.1rem;
}

.marketplace-item-card-copy small .marketplace-item-category {
  border-color: rgba(240, 193, 116, 0.22);
  color: rgba(247, 217, 166, 0.9);
  background: rgba(240, 193, 116, 0.08);
}

#marketplace-image-modal {
  z-index: 35;
}

#marketplace-image-modal .image-picker-modal {
  width: min(54rem, 100%);
}

#marketplace-image-modal .image-choice-grid {
  grid-template-columns: repeat(auto-fill, minmax(8.6rem, 1fr));
  gap: 0.72rem;
  max-height: min(58vh, 32rem);
  padding-right: 0.18rem;
  scrollbar-gutter: stable;
}

#marketplace-image-modal .image-choice-grid button {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.28rem;
  min-height: 10.35rem;
  padding: 0.5rem;
  border-radius: 0.96rem;
  background: rgba(7, 11, 16, 0.64);
}

#marketplace-image-modal .image-choice-grid button:hover:not(:disabled) {
  border-color: rgba(197, 164, 107, 0.36);
  background: rgba(197, 164, 107, 0.08);
}

#marketplace-image-modal .image-choice-grid button.is-selected {
  border-color: rgba(240, 193, 116, 0.58);
  background: rgba(240, 193, 116, 0.13);
  box-shadow: 0 0 0 3px rgba(240, 193, 116, 0.08);
}

#marketplace-image-modal .image-choice-grid button.is-current:not(.is-selected) {
  border-color: rgba(244, 238, 223, 0.22);
}

#marketplace-image-modal .image-choice-thumb {
  display: block;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(244, 238, 223, 0.1);
  border-radius: 0.68rem;
  background: rgba(72, 126, 142, 0.08);
}

#marketplace-image-modal .image-choice-thumb .marketplace-image-frame {
  height: 6.2rem;
  border-radius: inherit;
}

#marketplace-image-modal .image-choice-thumb img {
  height: 6.2rem;
  border: 0;
  border-radius: 0;
}

#marketplace-image-modal .image-choice-current {
  position: absolute;
  top: 0.62rem;
  right: 0.62rem;
  padding: 0.22rem 0.34rem;
  border: 1px solid rgba(3, 10, 14, 0.72);
  border-radius: 999px;
  color: #f7d9a6;
  background: rgba(3, 10, 14, 0.82);
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.055rem;
  line-height: 1;
  text-transform: uppercase;
}

#marketplace-image-modal .image-choice-grid button.image-choice-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  border-style: dashed;
  text-align: center;
}

#marketplace-image-modal .image-choice-add-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.16rem;
  width: 100%;
}

#marketplace-image-modal .image-choice-add-mark {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid rgba(197, 164, 107, 0.3);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(197, 164, 107, 0.11);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

#marketplace-image-modal .image-choice-add em {
  color: rgba(244, 238, 223, 0.5);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 760;
}

#marketplace-image-modal .image-choice-empty {
  align-content: center;
  min-height: 10.35rem;
}

#marketplace-image-modal .image-picker-actions {
  margin-top: 0.68rem;
  padding-top: 0.64rem;
  border-top: 1px solid rgba(244, 238, 223, 0.08);
}

#marketplace-image-upload-modal {
  z-index: 45;
  background: rgba(0, 0, 0, 0.54);
}

#marketplace-image-upload-modal .image-picker-upload-modal {
  width: min(30rem, 100%);
}

#marketplace-image-upload-modal .image-picker-upload-form {
  margin-top: 0.74rem;
  padding: 0.78rem;
  border: 1px solid rgba(244, 238, 223, 0.1);
  border-radius: 0.9rem;
  background: rgba(3, 10, 14, 0.48);
}

#marketplace-image-upload-modal .image-picker-upload-form .status {
  margin: 0;
}

#marketplace-image-modal .image-picker-use-button {
  border-color: rgba(197, 164, 107, 0.36);
  color: #f7d9a6;
  background: rgba(197, 164, 107, 0.12);
}

#marketplace-image-modal .image-picker-use-button:disabled {
  cursor: not-allowed;
  border-color: rgba(244, 238, 223, 0.1);
  color: rgba(244, 238, 223, 0.42);
  background: rgba(244, 238, 223, 0.035);
  opacity: 1;
}

@media (max-width: 540px) {
  #marketplace-image-modal .image-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(60vh, 28rem);
  }
}

/* Compact Medium view so two rows fit in the browser window. */
.marketplace-browser-grid.is-medium {
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 0.48rem;
}

.marketplace-browser-grid.is-medium .marketplace-new-card,
.marketplace-browser-grid.is-medium .marketplace-item-card {
  min-height: 8rem;
  padding: 0.48rem;
  border-radius: 0.82rem;
}

.marketplace-browser-grid.is-medium .marketplace-item-card {
  gap: 0.34rem;
}

.marketplace-browser-grid.is-medium .marketplace-item-card .record-status {
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.22rem 0.34rem;
}

.marketplace-browser-grid.is-medium .marketplace-item-card img {
  height: clamp(4.25rem, 6.4vw, 5.15rem);
  border-radius: 0.6rem;
}

.marketplace-browser-grid.is-medium .marketplace-item-card-copy {
  gap: 0.12rem;
}

.marketplace-browser-grid.is-medium .marketplace-item-card-copy .marketplace-item-description {
  -webkit-line-clamp: 1;
}

.marketplace-browser-grid.is-medium .marketplace-item-card-copy .marketplace-item-card-tags {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow: hidden;
}

/* Marketplace browser standard text scale. */
.marketplace-browser-title h1 {
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
}

.marketplace-browser-title .media-intro,
.marketplace-search-field input,
.marketplace-filter-check,
.marketplace-view-float .marketplace-view-switcher button {
  font-size: 0.875rem;
}

.marketplace-browser-eyebrow,
.marketplace-search-field span,
.marketplace-filter-pill span {
  font-size: 0.75rem;
}

.marketplace-browser-grid .marketplace-item-card-copy strong {
  font-size: 1rem;
}

.marketplace-browser-grid .marketplace-item-card-copy em,
.marketplace-browser-grid .marketplace-item-card-copy .marketplace-item-description {
  font-size: 0.875rem;
}

.marketplace-browser-grid .marketplace-item-card .record-status,
.marketplace-browser-grid .marketplace-item-card-copy small span {
  font-size: 0.75rem;
}

.marketplace-browser-grid.is-medium .marketplace-item-card-copy .marketplace-item-card-tags span {
  flex: 0 1 auto;
}

.marketplace-item-card .marketplace-item-no-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(4.5rem, 7vw, 5.4rem);
  border: 1px dashed rgba(244, 238, 223, 0.14);
  border-radius: 0.64rem;
  color: rgba(244, 238, 223, 0.42);
  background: rgba(8, 12, 17, 0.42);
  font-size: 0.56rem;
  font-weight: 920;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.marketplace-browser-grid.is-medium .marketplace-item-card .marketplace-item-no-image {
  height: clamp(5.5rem, 9vw, 6.5rem);
  border-radius: 0.68rem;
}

.marketplace-browser-grid.is-large .marketplace-item-card .marketplace-item-no-image {
  height: clamp(6.8rem, 11vw, 8.2rem);
  border-radius: 0.72rem;
}

.marketplace-browser-grid.is-list .marketplace-item-card .marketplace-item-no-image {
  grid-column: 1;
  grid-row: 1;
  height: 4rem;
  border-radius: 0.58rem;
}
