/* ═══════════════════════════════════════════════════════════════════════════
   page-card.css — the card / item page (page-card.ts) and the copies editor
   (page-copies.ts). Measurements are the app's (docs/web-parity/audit/
   03-explore-set-card.md §5.5, CardEditor.tsx / CopyFields.tsx); tokens only.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Card page ─────────────────────────────────────────────────────────── */
.cd-page { padding-top: 12px; }
.cd-back {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; margin-bottom: 4px;
    border: 0; background: none; cursor: pointer;
    color: var(--tb-text2); font: inherit; font-size: 14px; font-weight: 500;
}
.cd-back:hover { color: var(--tb-text); }

.cd-layout { display: flex; flex-direction: column; }
.cd-art-col { display: flex; justify-content: center; padding-bottom: 16px; }
.cd-main { min-width: 0; }

.cd-art {
    display: block; width: 100%; max-width: 140px; aspect-ratio: 63 / 88; padding: 0; border: 0; cursor: zoom-in;
    background: linear-gradient(160deg, var(--tb-bg3), var(--tb-card2));
    border-radius: 4.75% / 3.4%; overflow: hidden; box-shadow: var(--tb-shadow-art);
}
.cd-art:disabled { cursor: default; }
.cd-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cd-art--sealed { border-radius: 8px; background: transparent; box-shadow: none; }
.cd-art--sealed img { object-fit: contain; }
.cd-art__fallback { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 36px; color: var(--tb-muted); }
.cd-skel-art { display: block; width: 140px; aspect-ratio: 63 / 88; border-radius: 8px; }
.cd-skel-pill { display: block; height: 52px; margin-top: 16px; border-radius: 8px; }

.cd-hero { padding-bottom: 16px; }
.cd-hero__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.cd-name { flex: 1; min-width: 0; margin: 0; font-size: 24px; line-height: 29px; font-weight: 700; color: var(--tb-text); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cd-price { flex-shrink: 0; font-size: 20px; font-weight: 700; color: var(--tb-success); font-variant-numeric: tabular-nums; }
.cd-variant { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--tb-primary-light); }

.cd-set {
    display: flex; align-items: center; gap: 8px; padding: 8px 16px; margin-bottom: 24px;
    border-radius: 8px; border: 1px solid var(--tb-surface); background: var(--tb-surface);
    color: var(--tb-muted); text-decoration: none; transition: border-color var(--tb-dur) var(--tb-ease);
}
.cd-set:hover { border-color: var(--tb-border-strong); }
.cd-set__symbol { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.cd-set__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd-set__name { font-size: 14px; font-weight: 600; color: var(--tb-text); }
.cd-set__meta { font-size: 12px; color: var(--tb-muted); }

.cd-section { margin-bottom: 24px; }
.cd-section[hidden] { display: none; }
.cd-section__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cd-section__title { margin: 0; white-space: nowrap; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--tb-primary-light); }
.cd-section__aside { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--tb-muted); }
.cd-sources { display: flex; gap: 12px; }
.cd-source { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--tb-text2); text-decoration: none; }
.cd-source:hover { color: var(--tb-text); }

/* Change chips: 11/600, 3×8, radius 4, green / red / flat tints. */
.cd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cd-chip {
    padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
    background: var(--tb-surface); color: var(--tb-muted);
}
.cd-chip--up { background: rgba(var(--tb-success-rgb), 0.1); color: var(--tb-success); }
.cd-chip--down { background: rgba(var(--tb-error-rgb), 0.1); color: var(--tb-error); }
.cd-chart { min-height: 220px; }

/* Grade ladder: the kit's, with the app's ramp passed per row. */
#cd-grades .tb-ladder__tabs { gap: 6px; margin: 2px 0 4px; }

/* In my collection */
.cd-quick { display: flex; align-items: center; gap: 6px; }
.cd-quick__btn {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--tb-surface-strong); background: none;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--tb-primary-light);
}
.cd-quick__btn:hover:not(:disabled) { background: var(--tb-surface); }
.cd-quick__btn:disabled { opacity: 0.5; cursor: progress; }
.cd-add-graded {
    padding: 6px 14px; border-radius: 6px; border: 1px solid var(--tb-surface-strong); background: var(--tb-surface);
    color: var(--tb-text2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.cd-add-graded.is-on, .cd-add-graded:hover { color: var(--tb-text); border-color: var(--tb-border-strong); }
.cd-none { margin: 8px 0 0; font-size: 13px; color: var(--tb-muted); }
.cd-groups { display: flex; flex-direction: column; gap: 4px; }
.cd-skel-group { display: block; height: 40px; border-radius: 8px; }
.cd-group { border-radius: 8px; overflow: hidden; background: var(--tb-surface); }
.cd-group__head {
    width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; background: none; cursor: pointer;
    color: var(--tb-muted); font: inherit; text-align: left;
}
.cd-group__label { font-size: 14px; font-weight: 500; color: var(--tb-text); }
.cd-group__qty { padding: 1px 6px; border-radius: 10px; background: var(--tb-primary); color: var(--tb-on-primary); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cd-group__cost { margin-left: auto; font-size: 13px; color: var(--tb-text2); font-variant-numeric: tabular-nums; }
.cd-group__rows { border-top: 1px solid var(--tb-surface); padding-left: 28px; }
.cd-copy {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--tb-muted); text-decoration: none;
    border-bottom: 1px solid var(--tb-surface);
}
.cd-copy:last-child { border-bottom: 0; }
.cd-copy:hover { background: var(--tb-surface); }
.cd-copy__main { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.cd-copy__cost { color: var(--tb-text2); }
.cd-copy__cost span { color: var(--tb-muted); font-size: 11px; }
.cd-copy__pl { font-weight: 600; }
.cd-copy__meta { color: var(--tb-muted); font-size: 11px; }
.cd-manage {
    display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; margin-top: 10px;
    border-radius: 10px; border: 1px solid rgba(var(--tb-primary-rgb), 0.4); background: rgba(var(--tb-primary-rgb), 0.08);
    color: var(--tb-primary-light); font-size: 13.5px; font-weight: 700; text-decoration: none;
    transition: background var(--tb-dur) var(--tb-ease);
}
.cd-manage:hover { background: rgba(var(--tb-primary-rgb), 0.16); }

.cd-addform { margin-top: 14px; padding: 16px; border-radius: 10px; border: 1px solid var(--tb-surface); background: var(--tb-surface); }
.cd-addform__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cd-addform .tb-input, .cd-addform .tb-select { min-height: 42px; font-size: 14px; }
.cd-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--tb-muted); font-weight: 600; }
.cd-paid-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cd-mode { display: inline-flex; gap: 1.5px; padding: 1.5px; border-radius: 7px; border: 1px solid var(--tb-border); background: var(--tb-primary-tint-weak); }
.cd-mode button { padding: 3px 9px; border-radius: 5.5px; border: 0; background: none; color: var(--tb-text2); font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.cd-mode button.is-on { background: var(--tb-primary); color: var(--tb-on-primary); }
.cd-auto-box {
    display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 12px; border-radius: 10px;
    border: 2px solid rgba(var(--tb-primary-rgb), 0.33); background: var(--tb-primary-tint-weak);
    color: var(--tb-text); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.cd-auto-box .tb-icon { color: var(--tb-primary-light); }
.cd-caption { margin: 2px 0 0; font-size: 10.5px; line-height: 14px; color: var(--tb-muted); }
.cd-addform__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* On the marketplace: the app's ListingTile. */
.cd-listings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cd-listing {
    display: flex; flex-direction: column; gap: 1px; padding: 7px; border-radius: 12px;
    border: 1px solid var(--tb-border); background: var(--tb-bg2); color: inherit; text-decoration: none; min-width: 0;
    transition: transform var(--tb-dur) var(--tb-ease), border-color var(--tb-dur) var(--tb-ease);
}
.cd-listing:hover { transform: translateY(-2px); border-color: var(--tb-border-strong); }
.cd-listing__img {
    position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 245 / 342;
    border-radius: 6px; overflow: hidden; margin-bottom: 6px; color: var(--tb-muted);
    background: linear-gradient(160deg, var(--tb-bg3), var(--tb-card2));
}
.cd-listing__img img { width: 100%; height: 100%; object-fit: cover; }
.cd-listing__grade {
    position: absolute; top: 5px; left: 5px; padding: 2px 5px; border-radius: 4px;
    border: 1px solid rgba(var(--tb-primary-rgb), 0.67); background: var(--tb-on-image); color: var(--tb-on-image-text);
    font-size: 8.5px; font-weight: 800; letter-spacing: 0.4px;
}
.cd-listing__name { font-size: 11px; font-weight: 800; color: var(--tb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-listing__meta { font-size: 9px; color: var(--tb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-listing__price { margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--tb-success); font-variant-numeric: tabular-nums; }
.cd-listing__seller {
    display: flex; align-items: center; gap: 4px; margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--tb-border);
    font-size: 10px; font-weight: 600; color: var(--tb-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cd-listing__avatar {
    width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    background: var(--tb-primary); color: var(--tb-on-primary); font-size: 8px; font-weight: 800;
}
.cd-market-empty {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px; border-radius: 10px;
    border: 1px dashed var(--tb-border); color: var(--tb-muted); font-size: 13px;
}
.cd-market-empty a { margin-left: auto; color: var(--tb-primary-light); font-weight: 700; text-decoration: none; }

.cd-zoom { display: flex; justify-content: center; }
.cd-zoom img { max-width: 100%; max-height: 78vh; border-radius: 12px; object-fit: contain; }

/* Wide: art on the left (sticky), details on the right. */
@media (min-width: 900px) {
    .cd-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 40px; align-items: start; }
    .cd-art-col { position: sticky; top: 24px; padding-bottom: 0; }
    .cd-art { max-width: 340px; }
    .cd-skel-art { width: 100%; max-width: 340px; }
    .cd-name { font-size: 28px; line-height: 34px; }
    .cd-price { font-size: 24px; }
    .cd-listings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .cd-listings { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
    .cd-addform__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Copies editor ─────────────────────────────────────────────────────── */
.cp-page { position: relative; padding-top: 12px; }
.cp-page::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 480px; pointer-events: none; z-index: -1;
    background: radial-gradient(ellipse 75% 100% at 50% 0%, rgba(var(--tb-primary-rgb), 0.25), rgba(var(--tb-primary-rgb), 0.08) 45%, transparent 75%);
}
.cp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0 8px; }
.cp-top__back { width: 36px; height: 36px; }
.cp-top__title { font-size: 13px; font-weight: 700; letter-spacing: 0.3px; color: var(--tb-text2); }
.cp-top__state { min-width: 62px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: 11px; font-weight: 700; color: var(--tb-muted); }
.cp-top__state--saved { color: var(--tb-success); }
.cp-top__state--error { color: var(--tb-error); }

.cp-layout { display: flex; flex-direction: column; }
.cp-hero { display: flex; flex-direction: column; align-items: center; padding: 8px 0 20px; text-align: center; }
.cp-hero__art {
    display: block; width: 132px; aspect-ratio: 245 / 342; margin-bottom: 14px; overflow: hidden;
    border-radius: 4.75% / 3.4%; box-shadow: var(--tb-shadow-art); background: linear-gradient(160deg, var(--tb-bg3), var(--tb-card2));
}
.cp-hero__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-hero__art.is-sealed { border-radius: 8px; background: transparent; box-shadow: none; }
.cp-hero__art.is-sealed img { object-fit: contain; }
.cp-hero__fallback { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--tb-muted); font-size: 32px; }
.cp-skel-art { display: block; width: 132px; aspect-ratio: 245 / 342; border-radius: 8px; margin-bottom: 14px; }
.cp-hero__name { margin: 0; padding: 0 20px; font-size: 21px; font-weight: 800; letter-spacing: -0.3px; color: var(--tb-text); }
.cp-hero__meta { margin: 3px 0 0; font-size: 13px; color: var(--tb-muted); }
.cp-explore {
    display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 4px; border-radius: 12px;
    border: 1px solid rgba(var(--tb-primary-rgb), 0.4); background: rgba(var(--tb-primary-rgb), 0.08);
    color: var(--tb-primary-light); text-decoration: none;
}
.cp-explore__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-explore__eyebrow { font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.cp-explore__card { margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--tb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-explore__go { font-size: 12px; font-weight: 800; }

.cp-body { padding-top: 14px; min-width: 0; }
.cp-portfolio {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--tb-border); font-size: 13px; font-weight: 600; color: var(--tb-muted);
}
.cp-portfolio select {
    appearance: none; -webkit-appearance: none; max-width: 60%; padding: 4px 22px 4px 6px; border: 0; border-radius: 6px; cursor: pointer;
    background: transparent; color: var(--tb-text); font: inherit; font-size: 14px; font-weight: 700; text-align: right;
    background-image: linear-gradient(45deg, transparent 50%, var(--tb-muted) 50%), linear-gradient(135deg, var(--tb-muted) 50%, transparent 50%);
    background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.cp-portfolio select option { background: var(--tb-card); color: var(--tb-text); }
.cp-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.cp-head__label { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--tb-muted); }
.cp-head__add { display: inline-flex; align-items: center; gap: 3px; padding: 4px; border: 0; background: none; cursor: pointer; color: var(--tb-primary-light); font: inherit; font-size: 12.5px; font-weight: 800; }

.cp-empty {
    width: 100%; display: flex; flex-direction: column; align-items: center; padding: 26px 22px; border-radius: 14px;
    border: 1px dashed var(--tb-border); background: var(--tb-bg2); color: var(--tb-muted); font: inherit; cursor: pointer; text-align: center;
}
.cp-empty__title { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--tb-text); }
.cp-empty__body { margin-top: 4px; font-size: 12px; line-height: 17px; max-width: 34ch; }
.cp-empty__btn {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; margin-top: 14px; padding: 0 14px; border-radius: 10px;
    border: 1px solid rgba(var(--tb-primary-rgb), 0.4); color: var(--tb-primary-light); font-size: 13px; font-weight: 800;
}

.cp-rows { display: flex; flex-direction: column; gap: 9px; }
.cp-row {
    position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 42px 9px 8px;
    border-radius: 14px; border: 1px solid var(--tb-border); background: var(--tb-bg2);
}
.cp-row__thumb { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.cp-row__index { margin-top: 4px; font-size: 9px; font-weight: 800; letter-spacing: 0.4px; color: var(--tb-muted); }
.cp-row__fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cp-row__wait { margin: -2px 0 0; font-size: 10.5px; font-weight: 600; color: var(--tb-muted); }
.cp-row__remove {
    position: absolute; top: 0; right: 0; bottom: 0; width: 34px; display: flex; align-items: center; justify-content: center;
    border: 0; border-left: 1px solid var(--tb-border); border-radius: 0 13px 13px 0; background: none; cursor: pointer; color: var(--tb-muted);
}
.cp-row__remove:hover { background: rgba(var(--tb-error-rgb), 0.12); color: var(--tb-error); }
.cp-line { display: flex; align-items: center; gap: 6px; margin: 0; }
.cp-line > span:first-child { width: 50px; flex-shrink: 0; font-size: 10px; font-weight: 700; color: var(--tb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-ctl {
    flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; gap: 5px; padding: 0 9px;
    border: 1px solid var(--tb-border); border-radius: 9px; background: var(--tb-card); color: var(--tb-text);
    font: inherit; font-size: 12.5px; font-weight: 600;
}
.cp-ctl--btn { cursor: pointer; text-align: left; }
.cp-ctl--btn span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-ctl--btn .tb-icon { color: var(--tb-muted); }
.cp-ctl:focus-within, .cp-ctl:focus { outline: none; border-color: var(--tb-primary); }
.cp-paid { padding-right: 3px; }
.cp-paid.is-auto { border-color: rgba(var(--tb-primary-rgb), 0.33); background: var(--tb-primary-tint-weak); }
.cp-paid__amount {
    flex: 1; min-width: 0; padding: 0; border: 0; background: none; cursor: text; text-align: left;
    color: var(--tb-text); font: inherit; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-paid__sym { font-size: 12.5px; font-weight: 700; color: var(--tb-muted); }
.cp-paid__input {
    flex: 1; min-width: 0; padding: 0; border: 0; background: none; outline: none;
    color: var(--tb-text); font: inherit; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.cp-paid__input:disabled { color: var(--tb-muted); }
.cp-auto {
    display: inline-flex; align-items: center; gap: 2.5px; height: 22px; padding: 0 5px; border-radius: 6px; flex-shrink: 0;
    border: 1px solid var(--tb-border); background: transparent; cursor: pointer;
    color: var(--tb-muted); font: inherit; font-size: 8.5px; font-weight: 800;
}
.cp-auto.is-on { border-color: rgba(var(--tb-primary-rgb), 0.53); background: rgba(var(--tb-primary-rgb), 0.13); color: var(--tb-primary-light); }

/* A copy's thumbnail (the app's CopyThumb): an 82 × 114 box. Raw: the card,
   card-corner masked, with its wear badge. Graded: the slab — the app's frame
   artwork over the card in its window, the grader and grade on the label strip,
   ringed in the grader's colour (SLAB_BORDER @0.3 outer, SLAB_COLORS @0.7 label). */
.cp-thumb { position: relative; display: flex; align-items: center; justify-content: center; width: 82px; height: 114px; flex-shrink: 0; }
.cp-thumb__card { display: block; height: 100%; aspect-ratio: 245 / 342; overflow: hidden; border-radius: 4px; background: linear-gradient(160deg, var(--tb-bg3), var(--tb-card2)); }
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-thumb.is-sealed .cp-thumb__card { border-radius: 0; background: transparent; }
.cp-thumb.is-sealed img { object-fit: contain; }
.cp-thumb__none { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--tb-muted); }
.cp-thumb__cond {
    position: absolute; bottom: 2px; left: 2px; padding: 1px 3px; border-radius: 3px; border: 1px solid currentColor;
    background: var(--tb-on-image); font-size: 6.5px; line-height: 1.2; font-weight: 900; letter-spacing: 0.3px;
}
.cp-thumb__cond--lp { color: var(--tb-cond-lp); }
.cp-thumb__cond--mp { color: var(--tb-cond-mp); }
.cp-thumb__cond--hp { color: var(--tb-cond-hp); }
.cp-thumb__cond--dmg { color: var(--tb-cond-dmg); }
.cp-thumb--slab {
    --slab: var(--tb-muted-rgb);
    display: block; overflow: hidden; border: 1.5px solid rgba(var(--slab), 0.3); border-radius: 5.8px;
    background: linear-gradient(180deg, var(--tb-bg3), var(--tb-card2));
}
.cp-thumb--slab[data-co="psa"] { --slab: var(--tb-slab-psa-rgb); }
.cp-thumb--slab[data-co="bgs"] { --slab: var(--tb-slab-bgs-rgb); }
.cp-thumb--slab[data-co="cgc"] { --slab: var(--tb-slab-cgc-rgb); }
.cp-thumb--slab[data-co="sgc"] { --slab: var(--tb-slab-sgc-rgb); }
.cp-thumb--slab[data-co="tag"] { --slab: var(--tb-slab-tag-rgb); }
.cp-thumb--slab[data-co="ace"] { --slab: var(--tb-slab-ace-rgb); }
.cp-thumb__window { position: absolute; top: 17.8%; left: 13.1%; width: 74.7%; height: 74.8%; z-index: 1; overflow: hidden; }
.cp-thumb__frame { position: absolute; inset: 0; z-index: 2; background: url('/assets/images/slab-frame.png') center / 100% 100% no-repeat; pointer-events: none; }
html[data-theme="arctic"] .cp-thumb__frame,
html[data-theme="blossom"] .cp-thumb__frame,
html[data-theme="porcelain"] .cp-thumb__frame,
html[data-theme="gilded"] .cp-thumb__frame { background-image: url('/assets/images/slab-frame-light.png'); }
.cp-thumb__label {
    position: absolute; top: 4.3%; left: 5.8%; right: 5.4%; height: 6.8%; z-index: 3;
    display: flex; align-items: center; justify-content: space-between; padding: 0 6%;
    border: 1px solid rgba(var(--slab), 0.7); border-radius: 2px; background: var(--tb-on-image);
}
.cp-thumb__label b { font-size: 6px; line-height: 7px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--tb-muted); white-space: nowrap; }
.cp-thumb__label i { font-style: normal; font-size: 6.5px; line-height: 7px; font-weight: 900; color: var(--tb-on-image-text); white-space: nowrap; overflow: hidden; }

/* The app's Dropdown + OptionSheet: short text closed, every option spelled out in the sheet. */
.cp-ctl--pick span { font-weight: 600; }
.cp-ctl--pick .tb-icon { color: var(--tb-muted); }
.cp-sheet { display: flex; flex-direction: column; margin: -4px -4px 0; max-height: 340px; overflow: auto; }
.cp-sheet__opt {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px;
    border: 0; border-bottom: 1px solid var(--tb-border); background: none; cursor: pointer; text-align: left;
    color: var(--tb-text); font: inherit; font-size: 15px; font-weight: 400; border-radius: 0;
}
.cp-sheet__opt:last-child { border-bottom: 0; }
.cp-sheet__opt:hover { background: var(--tb-surface); }
.cp-sheet__opt.is-on { background: rgba(var(--tb-primary-rgb), 0.13); color: var(--tb-primary-light); font-weight: 700; }

.cp-add-another {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; height: 46px; margin-top: 4px;
    border-radius: 12px; border: 1px dashed rgba(var(--tb-primary-rgb), 0.4); background: none; cursor: pointer;
    color: var(--tb-primary-light); font: inherit; font-size: 14px; font-weight: 700;
}
.cp-add-another:hover, .cp-empty:hover { background: rgba(var(--tb-primary-rgb), 0.06); }
.cp-autonote {
    width: 100%; display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 11px 12px; border-radius: 10px;
    border: 1px solid var(--tb-border); background: var(--tb-surface); cursor: pointer; text-align: left;
    color: var(--tb-text2); font: inherit; font-size: 12px; line-height: 18px;
}
.cp-autonote > span { flex: 1; }
.cp-autonote b { color: var(--tb-primary-light); font-weight: 800; }
.cp-autonote em { font-style: normal; color: var(--tb-primary-light); font-weight: 700; }
.cp-autonote > .tb-icon { color: var(--tb-muted); }
.cp-savenote { margin: 14px 0 0; padding: 0 10px; text-align: center; font-size: 11px; line-height: 16px; color: var(--tb-muted); }

.cp-datesheet { display: flex; flex-direction: column; gap: 12px; }
.cp-datesheet__price {
    display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px;
    border: 1px solid rgba(var(--tb-primary-rgb), 0.33); background: var(--tb-primary-tint-weak);
}
.cp-datesheet__amount { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--tb-text); font-variant-numeric: tabular-nums; }
.cp-datesheet__amount .tb-icon { color: var(--tb-primary-light); }
.cp-datesheet__cap { font-size: 11px; color: var(--tb-muted); }
.cp-explain { display: flex; flex-direction: column; gap: 14px; }
.cp-explain__sec h3 { margin: 0 0 5px; font-size: 14px; font-weight: 700; color: var(--tb-text); }
.cp-explain__sec p { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--tb-text2); }

@media (min-width: 900px) {
    .cp-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; max-width: 1040px; margin: 0 auto; }
    .cp-side { position: sticky; top: 24px; }
    .cp-hero__art { width: 200px; }
    .cp-body { padding-top: 0; }
}
@media (min-width: 900px) {
    .cp-row__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
    .cp-row__wait { grid-column: 1 / -1; }
}
