/* AfterHourz Creator Studio: same dark purple theme as afterhourz.tv.
   No external assets, no inline styles in markup (the page's CSP is style-src 'self'). */
:root {
  color-scheme: dark;
  --bg: #09090d;
  --surface: #121217;
  --elevated: #19181f;
  --border: #27262f;
  --border-strong: #3a3444;
  --text: #f3f0f7;
  --muted: #97939f;
  --purple: #b28aff;
  --accent: #9764ef;
  --danger: #f06a8a;
  --danger-bg: #b23a5a24;
  --warn: #f0c060;
  --warn-bg: #c0902a22;
  --ok: #6fd69a;
  --ok-bg: #2f7a4a26;
  --info: #b28aff;
  --info-bg: #9764ef22;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Manrope, "DM Sans", system-ui, sans-serif; line-height: 1.25; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
a { color: var(--purple); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
::selection { background: #7650a8; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }
.full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.eyebrow { display: block; font-size: 11px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; color: #9993a5; margin-bottom: 4px; }
.note-danger { color: #f5a3b8; }
.loading { padding: 24px 0; text-align: center; }

/* ---- Header & tabs ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  background: #0c0b11ee; backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; font: 700 17px Manrope, system-ui, sans-serif; }
.brand img { display: block; height: 26px; width: auto; }
.brand-text span { color: var(--purple); }
.topbar-title { font: 600 15px Manrope, system-ui, sans-serif; color: #d6cfe2; }
.chip { font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--info-bg); border: 1px solid #4e385c; color: #cbb6ff; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--purple); font-size: 13px; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, #8b55e1, #5e3aa3); border: 1px solid #4e385c;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.tabbar {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg);
  position: sticky; top: 59px; z-index: 19;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar a {
  flex-shrink: 0; padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none; border: 1px solid transparent; white-space: nowrap;
}
.tabbar a:hover { color: var(--text); background: #ffffff08; }
.tabbar a.on { color: var(--text); background: #9764ef26; border-color: #4e385c; }
.content { max-width: 880px; margin: 0 auto; padding: 22px 16px 64px; display: grid; gap: 16px; }

/* ---- Panels ---- */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: grid; gap: 14px; min-width: 0;
}
.panel > h2 + .muted { margin-top: -8px; }
.empty { padding: 28px 16px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 12px; display: grid; gap: 6px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--elevated); color: var(--text); font-size: 14px; font-weight: 650;
  text-decoration: none; white-space: nowrap; transition: transform 0.15s, border-color 0.15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: #544a63; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn-primary { background: linear-gradient(105deg, #a370f6, #8b55e1); border-color: transparent; color: #fff; box-shadow: 0 3px 18px #8e50d922; }
.btn-danger { background: #c23b5f; border-color: transparent; color: #fff; }
.btn-outline-danger { color: var(--danger); border-color: #7a3448; background: transparent; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; }
.icon-btn:hover { background: #ffffff0c; color: var(--text); }

/* ---- Forms ---- */
.field { display: grid; gap: 7px; font-size: 13px; font-weight: 500; color: #c2b7ce; min-width: 0; }
.field small { font-weight: 400; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 9px;
  background: #0d0a12; border: 1px solid #342b3c; color: #e9e0f5;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #6f667d; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #c2b7ce; }
.check input { margin-top: 2px; flex-shrink: 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.switch-row span:first-child { display: grid; gap: 2px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: #2a2533; border: 1px solid #3a3444; position: relative; flex-shrink: 0; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #cfc7db; transition: transform 0.2s; }
.switch-row input:checked + .switch { background: linear-gradient(105deg, #a370f6, #8b55e1); border-color: transparent; }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: #fff; }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--purple); outline-offset: 2px; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 10px; min-height: 44px; border-radius: 9px; background: #0d0a12; border: 1px solid #342b3c; }
.tag-input:focus-within { border-color: var(--accent); }
.tag-input input { flex: 1; min-width: 120px; min-height: 28px !important; padding: 2px 4px !important; border: 0 !important; background: transparent !important; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--info-bg); border: 1px solid #4e385c; font-size: 12.5px; color: #cbb6ff; }
.tag button { border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; padding: 0 4px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; }

/* ---- Notices, badges ---- */
.notice { border-radius: 10px; padding: 10px 13px; font-size: 13.5px; }
.notice-error { border: 1px solid #7a3448; background: var(--danger-bg); color: #f5b3c4; }
.notice-ok { border: 1px solid #3f6b4e; background: var(--ok-bg); color: #a6e3bb; }
.notice-info { border: 1px solid #4e385c; background: var(--info-bg); color: #d9c9ff; }
.badge { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: #ffffff10; color: #cfc6dc; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--purple); }
.badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---- Content list ---- */
.video-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.video-card { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #0f0e14; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #1a1720; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.duration { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 5px; background: #000000b0; font-size: 11px; }
.video-info { display: grid; gap: 6px; align-content: start; min-width: 0; }
.video-title { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.video-title strong { overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.player { width: 100%; max-height: 60vh; border-radius: 10px; background: #000; }

/* ---- New post ---- */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; font-size: 13px; }
.steps li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); }
.steps li.on { color: var(--text); background: #9764ef26; border-color: #4e385c; }
.steps li.done { color: var(--ok); border-color: #3f6b4e; }
.dropzone {
  display: grid; gap: 4px; justify-items: center; text-align: center; padding: 30px 16px; min-height: 140px; width: 100%;
  border: 1.5px dashed #5a4a6c; border-radius: 12px; background: #0d0a12;
}
.dropzone.dragging { border-color: var(--purple); background: #9764ef1a; }
.dropzone:disabled { opacity: 0.6; cursor: not-allowed; }
.thumb-picker { display: flex; align-items: center; gap: 14px; }
.thumb-preview { width: 160px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #0d0a12; border: 1px solid #342b3c; display: grid; place-items: center; }
.thumb-preview img { width: 100%; height: 100%; object-fit: cover; }
.progress { height: 10px; border-radius: 999px; background: #1e1b26; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #a370f6, #8b55e1); transition: width 0.2s; }

/* ---- Display ---- */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.subtabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.subtabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.image-slot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.image-preview { border-radius: 12px; overflow: hidden; background: #0d0a12; border: 1px solid #342b3c; display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 1; }
.image-slot.avatar .image-preview { width: 112px; aspect-ratio: 1; }
.image-preview.round { border-radius: 50%; font: 700 38px Manrope, sans-serif; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.cropper { display: grid; gap: 12px; }
.crop-frame { position: relative; width: 100%; max-width: 560px; border-radius: 12px; overflow: hidden; background: #0d0a12; border: 1px solid #342b3c; touch-action: none; }
.crop-frame.round { max-width: 300px; border-radius: 50%; }
.crop-frame canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.crop-frame canvas:active { cursor: grabbing; }
.crop-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.crop-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zoom { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; }
.zoom input[type="range"] { flex: 1; accent-color: var(--accent); }

/* ---- Analytics, tables ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-card { display: grid; gap: 2px; padding: 16px; border-radius: 12px; background: #0f0e14; border: 1px solid var(--border); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font: 700 30px Manrope, sans-serif; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
th { font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: #ffffff05; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Verification ---- */
.verify-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: #0f0e14; border: 1px solid var(--border); }
.verify-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); font-size: 18px; flex-shrink: 0; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.history li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---- Sign-in / gate ---- */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, #301d434d, transparent 55%), var(--bg); }
.gate-card.gate-card-wide { width: min(560px, 100%); }
.gate-card { width: min(440px, 100%); padding: 30px 26px; border-radius: 20px; background: #131017; border: 1px solid #4e385c; box-shadow: 0 30px 120px #0009; }

/* ---- Modal ---- */
.modal { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #4e385c; border-radius: 18px; color: var(--text);
  background: radial-gradient(ellipse at top, #301d434d, transparent 55%), #131017; box-shadow: 0 30px 120px #000a; }
.modal-wide { width: min(680px, calc(100% - 24px)); }
.modal::backdrop { background: #050408d9; backdrop-filter: blur(8px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px; display: grid; gap: 14px; }

/* ---- Wider screens ---- */
@media (min-width: 640px) {
  .content { padding-top: 30px; }
  .panel { padding: 24px; }
}

/* ---- Phones: table rows become cards (cells are labelled by client/responsive-tables.ts) ---- */
@media (max-width: 720px) {
  .table-wrap { border: 0; overflow: visible; border-radius: 0; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap tr { margin: 0 0 12px; border: 1px solid var(--border); border-radius: 12px; background: #0f0e14; overflow: hidden; }
  .table-wrap td { display: grid; grid-template-columns: minmax(80px, 36%) minmax(0, 1fr); gap: 4px 12px; max-width: none; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: normal; overflow-wrap: anywhere; }
  .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
  .table-wrap td[data-label=""] { display: block; }
  .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap tbody tr:last-child td { border-bottom: 1px solid var(--border); }
  .table-wrap tbody tr:last-child td:last-child { border-bottom: 0; }
}

/* iPhones zoom the page when a field under 16px gets focus: keep fields at 16px on touch screens, and make small controls easy to hit. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]), select, textarea { font-size: 16px; }
  .btn-sm { min-height: 40px; padding-left: 14px; padding-right: 14px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
}

.account { position: relative; display: inline-flex; }
.avatar-btn { background: none; border: 0; padding: 0; border-radius: 50%; cursor: pointer; display: inline-flex; }
.avatar-btn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.account-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; min-width: 230px; max-width: calc(100vw - 24px); padding: 6px; display: grid; gap: 2px;
  border-radius: 14px; background: #15101f; border: 1px solid #3a2c4a; box-shadow: 0 18px 60px #000a; }
.account-menu .account-name { padding: 10px 12px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px; overflow-wrap: anywhere; }
.account-menu a, .account-menu button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 9px; font-size: 14px; color: var(--text); text-decoration: none; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; }
.account-menu a:hover, .account-menu button:hover, .account-menu a:focus-visible, .account-menu button:focus-visible { background: #261a38; outline: none; }
.subtabs { scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
@media (max-width: 560px) {
  h1 { font-size: 23px; }
  .topbar { flex-wrap: nowrap; gap: 8px; }
  .topbar .chip { display: none; }
  .brand img { height: 24px; }
  .video-card { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar-title { display: none; }
  .thumb-picker { flex-wrap: wrap; }
  .topbar-actions .link-btn { display: none; }
  .tabbar { top: 59px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Apply to be a creator ---- */
.divider { border: 0; border-top: 1px solid #2a2233; margin: 4px 0 0; width: 100%; }
.apply { display: flex; flex-direction: column; gap: 14px; }
.apply h2 { margin: 0; }
.apply .field select { width: 100%; }

/* ---- Channel preview (opened from the main site's top bar: studio.afterhourz.tv/#/preview) ---- */
.cp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cp-toolbar p { margin: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #0d0b12; border: 1px solid var(--border); }
.seg button { padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 650; color: #a99bb8; }
.seg button[aria-pressed="true"] { background: #2a1d42; color: #e6d9ff; }
.seg button:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.cp-stage { display: flex; justify-content: center; padding: 18px; border-radius: 14px; background: repeating-linear-gradient(45deg, #0c0a10, #0c0a10 12px, #0e0c13 12px, #0e0c13 24px); border: 1px solid var(--border); }
.cp-frame { container-type: inline-size; width: 100%; background: #09090d; border: 1px solid #2e2538; border-radius: 14px; overflow: hidden; padding-bottom: 22px; transition: width .2s; }
.cp-frame.phone { width: 390px; max-width: 100%; border-radius: 26px; border-width: 6px; border-color: #26202f; }
.cp-banner { position: relative; aspect-ratio: 3 / 1; background: linear-gradient(120deg, #2a1b3f, #15101d); overflow: hidden; }
.cp-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-banner i { position: absolute; inset: 0; background: linear-gradient(0deg, #09090d9e, transparent 90%), linear-gradient(90deg, #1e1028a1, transparent); }
.cp-banner-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: #8d7fa0; }
.cp-badge { position: absolute; right: 18px; bottom: 14px; padding: 6px 10px; border-radius: 999px; font-size: 9px; letter-spacing: .08em; font-weight: 700; color: #d5b6ea; background: #ffffff14; backdrop-filter: blur(8px); max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-summary { position: relative; display: flex; align-items: center; gap: 18px; margin-top: -30px; padding: 0 22px; }
.cp-avatar { flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font: 700 30px Manrope, system-ui, sans-serif; color: #fff; background: linear-gradient(135deg, #7d4bd6, #c06ab8); border: 4px solid #09090d; }
.cp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cp-details { padding-top: 34px; min-width: 0; }
.cp-details h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 22px; letter-spacing: -.6px; overflow-wrap: anywhere; }
.cp-check { color: var(--purple); flex: none; }
.cp-details p { margin: 3px 0 0; font-size: 13px; color: #9f8caf; }
.cp-details span { display: block; margin-top: 8px; font-size: 12px; color: #b5a3c3; }
.cp-actions { margin-left: auto; display: flex; gap: 8px; padding-top: 38px; }
.cp-btn { padding: 8px 14px; border-radius: 9px; font-size: 12px; font-weight: 650; color: #d9ccea; background: #1c1523; border: 1px solid #302438; cursor: default; white-space: nowrap; }
.cp-primary { color: #fff; background: linear-gradient(105deg, #a370f6, #8b55e1); border-color: transparent; }
.cp-bio { margin: 20px 22px 22px; max-width: 680px; font-size: 14px; line-height: 1.75; color: #b9a9c8; overflow-wrap: anywhere; }
.cp-placeholder { color: #756a85; font-style: italic; }
.cp-tabs { display: flex; padding: 0 22px; border-bottom: 1px solid #34283e; }
.cp-tabs span { padding: 12px 0; font-size: 13px; color: #c9a1ef; border-bottom: 2px solid #bb88ee; }
.cp-empty { margin: 28px 22px 8px; text-align: center; font-size: 13px; color: #8d7fa0; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; padding: 22px 22px 0; }
.cp-card h4 { margin: 10px 0 3px; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-card small { font-size: 11px; color: #9888a5; }
.cp-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #251a38, #15101d); }
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-dur { position: absolute; right: 7px; bottom: 7px; padding: 2px 6px; border-radius: 5px; font-size: 10px; font-weight: 700; background: #000000b3; color: #fff; }
.cp-lock { position: absolute; left: 7px; top: 7px; padding: 3px 7px; border-radius: 5px; font-size: 9px; letter-spacing: .06em; font-weight: 700; background: #1b1129e6; color: #d9b7f4; border: 1px solid #ad7dd466; }
.cp-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }
/* the frame lays itself out by its own width, so the Phone view is a true phone layout on any screen */
@container (max-width: 560px) {
  .cp-summary { flex-wrap: wrap; gap: 12px; }
  .cp-details { flex: 1; min-width: 0; }
  .cp-actions { width: 100%; padding-top: 0; }
  .cp-actions .cp-btn { flex: 1; text-align: center; }
  .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 16px 0; }
  .cp-banner { aspect-ratio: 5 / 2; }
  .cp-bio, .cp-summary, .cp-tabs { margin-left: 16px; margin-right: 16px; }
  .cp-bio { margin-top: 14px; }
  .cp-summary { margin-left: 0; margin-right: 0; padding: 0 16px; }
  .cp-tabs { padding: 0; }
}
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .cp-stage { padding: 8px; }
  .cp-frame.phone { border-width: 4px; }
}
.cp-foot { padding-top: 6px; }

/* ---- Subscription price editor ---- */
.money { display: flex; align-items: center; border-radius: 10px; border: 1px solid var(--border-strong, #3a3444); background: #0d0b12; }
.money b { padding: 0 0 0 14px; color: #a99bb8; font-weight: 600; }
.money input { border: 0 !important; background: transparent !important; box-shadow: none !important; flex: 1; min-width: 0; padding-left: 6px; } /* beats the global field style */
.money:focus-within { outline: 2px solid var(--purple); outline-offset: 1px; }
.money input:focus { outline: none; }
.money:has(input[aria-invalid="true"]) { border-color: #b23a5a; }
.pricing .grid-2 { align-items: start; }
.pricing .field { align-content: start; }

/* ---- Earnings ---- */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: #0f0e14; align-content: start; }
.stat > span { font-size: 12px; color: var(--muted); }
.stat > strong { font-size: 24px; letter-spacing: -.5px; }
.ok-text { color: var(--ok); }
.neg { color: #f5a3b8; }
.sub-h { margin: 6px 0 0; font-size: 15px; }
.grow-input { flex: 1; min-width: 180px; }
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr; } .stat > strong { font-size: 22px; } }

/* ---- Page access choice ---- */
.access-choice { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.access-choice legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: #c2b7ce; }
.access-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border-strong, #3a3444); background: #0f0e14; cursor: pointer; }
.access-option.on { border-color: var(--accent); background: #1a1327; }
.access-option input { margin-top: 2px; flex: none; }
.access-option span { display: grid; gap: 3px; min-width: 0; }
.access-option small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.access-option:has(input:focus-visible) { outline: 2px solid var(--purple); outline-offset: 2px; }
.cp-members { color: #d5b6ea !important; font-weight: 650; }

/* Share dialog: one-tap destinations */
.share-targets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-targets .btn { justify-content: center; text-align: center; text-decoration: none; }
@media (max-width: 420px) { .share-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
