/* ═══════════════════════════════════════════════════════════
   Giveaway dashboard + promo-card builder
   ═══════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }
.loading { text-align: center; color: var(--text-dim); padding: 5rem 1rem; }
.gw { max-width: 1220px; margin: 0 auto; padding: 1.4rem 1.25rem 4rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.back-link:hover { color: var(--text); }

/* ── Header ── */
.gw-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.gw-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.gw-ti { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent); display: grid; place-items: center; }
.gw-title h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.gw-sub { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); margin-top: 0.2rem; }
.gw-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.btn svg { flex: none; }
.live { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.2rem 0.25rem 0.2rem 0.75rem; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(70, 167, 88, 0.6); animation: livepulse 2.4s ease-out infinite; }
.live.stale .live-dot { background: var(--accent); animation: none; }
.live.err .live-dot { background: var(--danger); animation: none; }
.live.err { color: var(--danger); border-color: rgba(229, 72, 77, 0.4); }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(70, 167, 88, 0.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(70, 167, 88, 0); } }
.icon-btn { width: 30px; height: 30px; flex: none; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--text-muted); cursor: pointer; transition: color 0.15s, background 0.15s, border-color 0.15s; }
.icon-btn:hover { color: var(--text); background: var(--surface-hover); border-color: var(--border); }
.icon-btn:disabled { opacity: 0.35; cursor: default; background: none; border-color: transparent; }
.icon-btn.spin svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { border-radius: 12px; padding: 0.85rem 1rem; margin-bottom: 1rem; font-size: 0.86rem; line-height: 1.5; background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--text); }
.notice.err { background: var(--danger-soft); border-color: rgba(229, 72, 77, 0.45); }
.notice h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.notice ol { margin: 0.4rem 0 0 1.2rem; }
.notice code { font-family: var(--font-mono); font-size: 0.78rem; background: rgba(0, 0, 0, 0.3); padding: 0.05rem 0.35rem; border-radius: 4px; }

/* ── Segmented controls ── */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button { font: inherit; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); background: none; border: 0; border-radius: 7px; padding: 0.42rem 0.75rem; cursor: pointer; white-space: nowrap; transition: color 0.12s, background 0.12s; }
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.seg button.on { color: var(--accent-ink); background: var(--accent); font-weight: 600; }
.seg-sm button { padding: 0.3rem 0.6rem; font-size: 0.74rem; }
.seg-wrap { flex-wrap: wrap; }

/* ── Timeframe ── */
.tf-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
#tfTabs { overflow-x: auto; scrollbar-width: none; }
#tfTabs::-webkit-scrollbar { display: none; }
/* Phones: two rows instead of a sideways scroll that hides "All" and "Custom" */
@media (max-width: 480px) {
  #tfTabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; overflow: visible; }
  #tfTabs button { padding: 0.42rem 0.3rem; }
}
.tf-nav { display: inline-flex; align-items: center; gap: 0.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.tf-label { position: relative; font-weight: 600; font-size: 0.88rem; min-width: 11.5rem; text-align: center; padding: 0.32rem 0.6rem; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.tf-label:hover { background: rgba(255, 255, 255, 0.05); }
.tf-label input { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; }
.tf-custom { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-dim); }
.tf-custom input, .search-row select, #perPage { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; color: var(--text); font: inherit; font-size: 0.82rem; padding: 0.42rem 0.6rem; color-scheme: dark; }

/* ── Filters ── */
.filters { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.1rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chip-row .lbl { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); min-width: 3.6rem; }
.chip { --c: var(--accent); display: inline-flex; align-items: center; gap: 0.4rem; font: inherit; font-size: 0.8rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.32rem 0.75rem; cursor: pointer; transition: color 0.12s, border-color 0.12s, background 0.12s; user-select: none; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.chip small { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.08em; color: var(--text-dim); text-transform: uppercase; border: 1px solid var(--border); border-radius: 4px; padding: 0.02rem 0.28rem; }
.chip.on { color: var(--text); border-color: color-mix(in srgb, var(--c) 65%, transparent); background: color-mix(in srgb, var(--c) 15%, var(--surface)); }
.chip.inc { color: var(--text); border-color: color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.chip.inc::before { content: '✓'; font-size: 0.72rem; color: var(--c); font-weight: 700; }
.chip.exc { color: var(--danger); border-color: rgba(229, 72, 77, 0.45); background: var(--danger-soft); }
.chip.exc::before { content: '✕'; font-size: 0.68rem; font-weight: 700; }
.chip.exc .t { text-decoration: line-through; }
.chip-hint { font-size: 0.68rem; color: var(--text-dim); }
.search-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.search-row select { max-width: min(100%, 260px); min-width: 0; } /* long NOTE values would size it past the screen */
.search { display: flex; align-items: center; gap: 0.45rem; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 0 0.65rem; color: var(--text-dim); flex: 1 1 190px; max-width: 290px; transition: border-color 0.15s; }
.search:focus-within { border-color: var(--accent-border); }
.search input { background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 0.84rem; padding: 0.48rem 0; width: 100%; min-width: 0; }
.search input::placeholder { color: var(--text-dim); }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 0.8rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.link-btn:hover { color: var(--accent-hover); }

/* ── KPIs ── */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.kpi { position: relative; overflow: hidden; min-width: 0; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 0.9rem 0.75rem; }
.kpi-l { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-dim); }
.kpi-v { font-size: 1.32rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kpi-s { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1em; }
.kpi.pos .kpi-v { color: var(--success); }
.kpi.neg .kpi-v { color: var(--danger); }
.kpi.hero { border-color: var(--accent-border); background: radial-gradient(130% 100% at 100% 0%, rgba(244, 185, 66, 0.18), transparent 60%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.kpi.hero .kpi-v { color: var(--accent); }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-v { font-size: 1.12rem; } }

/* ── Panels ── */
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.05rem; margin-bottom: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 0.75rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.panel-head h2 { font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.panel-sub { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-dim); letter-spacing: 0.06em; }
.panel-tools { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 920px) { .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.count-pill { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.05rem 0.5rem; }

/* ── Tables ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.tbl th { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 0.5rem 0.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.045); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, 0.022); }
.tbl .r, .tbl-num td:not(:first-child), .tbl-num th:not(:first-child) { text-align: right; }
.tbl tfoot td { border-top: 1px solid var(--border-strong); border-bottom: 0; font-weight: 700; }
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl th.sort:hover { color: var(--text); }
.tbl th.sorted { color: var(--accent); }
.tbl th .arr { font-size: 0.6rem; margin-left: 0.2rem; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.dim { color: var(--text-dim); }
.muted { color: var(--text-muted); }
.rank { font-family: var(--font-mono); color: var(--text-dim); width: 2.2rem; }
.rank.r1 { color: #ffd66b; font-weight: 700; } .rank.r2 { color: #d4dbe6; font-weight: 700; } .rank.r3 { color: #e3a071; font-weight: 700; }
.who { font-weight: 600; }
/* Fallback names (no Kick name found → site username): dimmed + where they came from */
.fb { opacity: 0.62; font-weight: 500; }
.name-tag { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.32rem; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; vertical-align: 1px; }
/* Kick name matched through the site username (hover says so) */
.alias { text-decoration: underline dotted rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.panel-note { font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; margin: 0 0 0.75rem; }
.panel-note + .scroll-x { margin-top: 0.25rem; }
#nameConflicts { margin: 0.9rem 0 0; }
.clip { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.badge { --c: var(--text-dim); display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); border-radius: 5px; padding: 0.08rem 0.38rem; white-space: nowrap; }
.badge.note { --c: #9aa0a6; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.th-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 0.35rem; vertical-align: 1px; }
.empty-cell { text-align: center !important; color: var(--text-dim); padding: 1.8rem 0.6rem !important; white-space: normal !important; }
.tbl-data .slot { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.7rem; font-size: 0.78rem; color: var(--text-muted); flex-wrap: wrap; }
.pager .pg { display: flex; gap: 0.3rem; align-items: center; }
.more-btn { display: block; margin: 0.65rem auto 0; font: inherit; font-size: 0.78rem; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 1rem; cursor: pointer; }
.more-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* ── Leaderboard tabs ── */
.tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--border); margin-bottom: 0.35rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted); font: inherit; font-size: 0.82rem; padding: 0.5rem 0.75rem; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* ── Site panels ── */
.sites { display: grid; gap: 0.55rem; }
.site { --c: var(--accent); text-align: left; width: 100%; font: inherit; color: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 11%, transparent), transparent 60%), var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--c); border-radius: 11px; padding: 0.7rem 0.85rem; cursor: pointer; display: grid; gap: 0.4rem; transition: border-color 0.15s, opacity 0.15s, box-shadow 0.15s; }
.site:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); border-left-color: var(--c); }
.site.on { box-shadow: inset 0 0 0 1px var(--c); }
.site.off { opacity: 0.45; }
.site-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.site-name { font-weight: 700; letter-spacing: 0.02em; display: flex; align-items: center; gap: 0.45rem; }
.site-name small { font-family: var(--font-mono); font-size: 0.55rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--border); border-radius: 4px; padding: 0.02rem 0.3rem; }
.site-paid { font-weight: 700; color: var(--c); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.site-paid small { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.1em; color: var(--text-dim); font-weight: 500; margin-left: 0.3rem; text-transform: uppercase; }
.site-stats { display: flex; gap: 0.35rem 1rem; font-size: 0.74rem; color: var(--text-muted); flex-wrap: wrap; }
.site-stats b { color: var(--text); font-weight: 600; }
.site-hit { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-hit b { color: var(--text); }
.site-empty { font-size: 0.74rem; color: var(--text-dim); }

/* ── Chart ── */
.chart { position: relative; height: 290px; width: 100%; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart .grid { stroke: rgba(255, 255, 255, 0.06); }
.chart .ax { fill: var(--text-dim); font-family: var(--font-mono); font-size: 10px; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover { fill: rgba(255, 255, 255, 0.035); }
.chart .hl { fill: rgba(244, 185, 66, 0.09); }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--text-dim); font-size: 0.86rem; }
.legend { display: flex; gap: 0.4rem 1rem; flex-wrap: wrap; margin-top: 0.55rem; font-size: 0.74rem; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tip { position: fixed; pointer-events: none; z-index: 95; background: #0d0f13; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0.55rem 0.7rem; font-size: 0.75rem; box-shadow: var(--shadow-lg); min-width: 170px; }
.tip h4 { font-size: 0.7rem; font-family: var(--font-mono); color: var(--text-dim); font-weight: 500; margin-bottom: 0.35rem; }
.tip .r { display: flex; justify-content: space-between; gap: 1rem; line-height: 1.55; }
.tip .r b { font-variant-numeric: tabular-nums; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 0.35rem; }

/* ── Footer / data check ── */
.gw-foot { margin-top: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.integrity { font: inherit; font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.85rem; cursor: pointer; }
.integrity b { color: var(--success); }
.integrity.bad { border-color: rgba(229, 72, 77, 0.45); color: var(--text); }
.integrity.bad b { color: var(--danger); }
.data-notes { font-size: 0.76rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 0.95rem; max-width: 100%; line-height: 1.5; }
.data-notes ul { margin: 0.3rem 0 0 1.1rem; }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.7rem 1.1rem; font-size: 0.85rem; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 120; max-width: calc(100vw - 2rem); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(229, 72, 77, 0.5); color: var(--danger); }

/* ═══ Promo builder ═══ */
body.pb-open { overflow: hidden; }
.pb-back { position: fixed; inset: 0; z-index: 80; background: rgba(4, 5, 8, 0.74); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.pb { width: min(1340px, 100%); height: min(880px, 100%); background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); }
.pb-head { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.pb-head h2 { font-size: 1rem; font-weight: 600; }
.pb-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr); }
.pb-preview { display: flex; flex-direction: column; min-height: 0; padding: 1rem; gap: 0.75rem; background: repeating-conic-gradient(rgba(255, 255, 255, 0.022) 0% 25%, transparent 0% 50%) 50% / 24px 24px; }
.pb-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.pb-scaler { position: absolute; top: 0; left: 0; transform-origin: 0 0; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.pb-actions { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.pb-actions .btn:disabled { opacity: 0.6; cursor: progress; }
/* Every variant, live, with the current data — click (or ←/→) to pick */
.pb-thumbs { display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.15rem 0.1rem 0.35rem; scrollbar-width: thin; flex: none; }
.pb-thumb { flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; font: inherit; color: var(--text-muted); background: none; border: 0; padding: 0; cursor: pointer; }
.pb-thumb-frame { display: block; position: relative; overflow: hidden; border-radius: 8px; outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.8); transition: outline-color 0.12s, transform 0.12s; }
.pb-thumb-scale { position: absolute; top: 0; left: 0; transform-origin: 0 0; pointer-events: none; }
.pb-thumb:hover .pb-thumb-frame { outline-color: var(--border-strong); }
.pb-thumb.on .pb-thumb-frame { outline-color: var(--accent); }
.pb-thumb-name { font-size: 0.7rem; white-space: nowrap; }
.pb-thumb.on .pb-thumb-name { color: var(--text); font-weight: 600; }
.pb-status { text-align: center; font-size: 0.74rem; color: var(--text-muted); min-height: 1.1em; }
.pb-controls { overflow-y: auto; padding: 1rem 1.1rem 1.5rem; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 1rem; }
.ctl-label { display: block; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.4rem; }
.ctl-label-row { display: flex; justify-content: space-between; align-items: center; }
.ctl-label-row span { display: flex; gap: 0.8rem; text-transform: none; letter-spacing: 0; }
.ctl-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.ctl-2 .seg { width: 100%; }
.ctl-2 .seg button { flex: 1; }
.ctl-3 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.ctl-3 label:last-child { grid-column: 1 / -1; }
.ctl input:not([type=checkbox]), .ctl textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit; font-size: 0.85rem; padding: 0.5rem 0.6rem; }
.ctl input:focus, .ctl textarea:focus { outline: none; border-color: var(--accent-border); }
.ctl textarea { resize: vertical; line-height: 1.45; min-height: 92px; }
.ctl-hint { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.4rem; line-height: 1.4; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 0.8rem; }
.checks label { display: flex; gap: 0.45rem; align-items: center; font-size: 0.82rem; color: var(--text-muted); cursor: pointer; }
.checks label.na, .seg.na { opacity: 0.4; }
.checks-1 { grid-template-columns: 1fr; }
.ctl-sub { font-size: 0.7rem; color: var(--text-dim); margin: 0.65rem 0 0.35rem; }
.ctl-for { text-transform: none; letter-spacing: 0; color: var(--text-muted); }
.ctl .seg + .checks { margin-top: 0.6rem; }
#pbVariantOpts[hidden] { display: none; }
.cap-meta { display: flex; justify-content: space-between; gap: 0.8rem; align-items: baseline; }
.cap-count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.cap-count.over { color: var(--danger); font-weight: 700; }
/* Accent: presets + a custom hex */
.swatches { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.swatch { display: inline-flex; align-items: center; gap: 0.45rem; font: inherit; font-size: 0.78rem; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.7rem 0.3rem 0.35rem; cursor: pointer; }
.swatch i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.swatch.on { color: var(--text); border-color: var(--accent-border); background: var(--surface); }
.swatch input[type=color] { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } .swatch input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.swatch input:not([type=color]) { width: 5.6em; background: none; border: 0; color: var(--text); font-family: var(--font-mono); font-size: 0.76rem; padding: 0; }
.swatch input:not([type=color]):focus { outline: none; }
.checks input { accent-color: var(--accent); width: 15px; height: 15px; }
@media (max-width: 920px) {
  .pb-back { padding: 0; }
  .pb { height: 100%; border-radius: 0; border: 0; }
  .pb-body { display: block; overflow-y: auto; }
  .pb-preview { padding: 0.8rem; }
  .pb-stage { flex: none; }
  .pb-actions { position: sticky; bottom: 0; z-index: 2; padding: 0.6rem; margin: 0 -0.8rem -0.8rem; background: rgba(17, 19, 22, 0.94); border-top: 1px solid var(--border); backdrop-filter: blur(6px); }
  .pb-controls { border-left: 0; border-top: 1px solid var(--border); overflow: visible; }
}
