:root{
  --bg:#070b16;--panel:#101827;--panel2:#0b1220;--line:#243149;--text:#eef2ff;--muted:#aab4c8;
  --purple:#7c5cff;--green:#10b981;--gold:#a97810;--red:#ef476f;--blue:#38bdf8;
}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(circle at top left,#26134d 0,#070b16 34%,#050816 100%);color:var(--text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.tpv3-shell{max-width:1420px;margin:0 auto;padding:34px 22px 80px}
.tpv3-hero{display:flex;justify-content:space-between;gap:24px;align-items:center;background:linear-gradient(135deg,rgba(124,92,255,.18),rgba(15,23,42,.88));border:1px solid rgba(124,92,255,.35);border-radius:26px;padding:28px 32px;box-shadow:0 22px 80px rgba(0,0,0,.35)}
.eyebrow{color:#93c5fd;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin:0 0 8px;font-size:12px}
h1{font-size:clamp(28px,4vw,44px);line-height:1.05;margin:0 0 10px}
h2{font-size:20px;margin:0 0 16px}
.sub{margin:0;color:var(--muted);max-width:820px}
.hero-status{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.pill,.badge{display:inline-flex;align-items:center;border:1px solid rgba(148,163,184,.28);border-radius:999px;padding:7px 12px;background:rgba(15,23,42,.72);color:#dbeafe;font-size:12px;font-weight:800}
.badge.ok{background:rgba(16,185,129,.14);color:#a7f3d0;border-color:rgba(16,185,129,.38)}
.badge.warn{background:rgba(245,158,11,.15);color:#fde68a;border-color:rgba(245,158,11,.4)}
.badge.bad{background:rgba(239,68,68,.14);color:#fecaca;border-color:rgba(239,68,68,.4)}
.notice{margin:18px 0;padding:14px 18px;border:1px solid rgba(250,204,21,.28);background:rgba(250,204,21,.08);border-radius:16px;color:#fde68a}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.lower{margin-top:18px}
.card{background:linear-gradient(180deg,rgba(16,24,39,.95),rgba(9,14,27,.96));border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:0 16px 50px rgba(0,0,0,.28)}
label{display:block;margin:14px 0 7px;font-weight:750;color:#dbeafe}
input,textarea,select{width:100%;background:#060b17;color:var(--text);border:1px solid #26344f;border-radius:12px;padding:12px 13px;font:inherit;outline:none}
textarea{resize:vertical;line-height:1.45}
input:focus,textarea:focus,select:focus{border-color:rgba(124,92,255,.7);box-shadow:0 0 0 3px rgba(124,92,255,.15)}
.row{display:flex;gap:10px;align-items:center;margin-top:12px}
.row select{max-width:180px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.btn{appearance:none;border:1px solid #33415f;background:linear-gradient(180deg,#26344f,#18243a);color:#fff;border-radius:14px;padding:12px 16px;font-weight:850;cursor:pointer}
.btn:hover{filter:brightness(1.08)}
.btn.primary{background:linear-gradient(180deg,#7c5cff,#5b43d6);border-color:#8b78ff}
.btn.full{width:100%}
.btn.publish{background:linear-gradient(180deg,#10b981,#047857);border-color:#34d399}
.danger-btn{background:linear-gradient(180deg,#9f3156,#7f1d3a);border-color:#fb7185}
.status{margin-top:12px;color:#cbd5e1;background:rgba(2,6,23,.55);border:1px solid rgba(148,163,184,.18);border-radius:12px;padding:11px 12px}
.small{font-size:12px;color:var(--muted);margin-top:7px}
.danger{color:#fecaca}
.checklist{display:grid;gap:10px}
.check{display:flex;justify-content:space-between;gap:16px;border:1px solid rgba(148,163,184,.2);border-radius:14px;padding:12px;background:rgba(2,6,23,.42)}
.check.ok{border-color:rgba(16,185,129,.35);background:rgba(16,185,129,.08)}
.check.bad{border-color:rgba(239,68,68,.32);background:rgba(239,68,68,.08)}
.preview{color:#e5e7eb;line-height:1.55}
.preview h1{font-size:28px}
.preview h2{font-size:20px;margin-top:22px}
.publishbar{position:sticky;bottom:0;margin-top:22px;background:rgba(6,11,23,.88);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:20px;padding:16px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.publishbar .status{margin:0;flex:1;min-width:260px}
@media(max-width:960px){.grid,.two{grid-template-columns:1fr}.tpv3-hero{align-items:flex-start;flex-direction:column}.row{flex-direction:column;align-items:stretch}.row select{max-width:none}}


/* TPV3_EDITOR_UX_V1 */
.tpv3-shell{
  max-width:1560px;
}

.section-help{
  margin:-6px 0 14px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  border-left:3px solid rgba(124,92,255,.65);
  padding-left:10px;
}

.v3-main-editor{
  min-height:360px;
  font-size:15px;
  line-height:1.55;
}

#v3Excerpt{
  min-height:90px;
}

#v3Highlights{
  min-height:120px;
}

#v3Cta{
  min-height:90px;
}

.preview{
  min-height:360px;
  max-height:760px;
  overflow:auto;
  padding-right:8px;
}

.card h2{
  letter-spacing:-.01em;
}

@media(min-width:1200px){
  .grid{
    grid-template-columns:1fr 1.15fr;
  }
  .lower{
    grid-template-columns:.9fr 1.1fr;
  }
}


/* TPV3_DESKTOP_EDITOR_LAYOUT_V2 */
.tpv3-shell{
  max-width:1680px;
  padding-left:28px;
  padding-right:28px;
}

.tpv3-hero{
  max-width:none;
}

.section-help{
  margin:-6px 0 14px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  border-left:3px solid rgba(124,92,255,.7);
  padding-left:10px;
}

.v3-main-editor{
  min-height:430px;
  font-size:15px;
  line-height:1.58;
}

#v3Excerpt{
  min-height:96px;
}

#v3Highlights{
  min-height:130px;
}

#v3Cta{
  min-height:100px;
}

.preview{
  min-height:420px;
  max-height:820px;
  overflow:auto;
  padding-right:8px;
}

@media(min-width:1180px){
  .grid{
    grid-template-columns:minmax(430px,.85fr) minmax(620px,1.35fr);
    align-items:start;
  }

  .lower{
    grid-template-columns:minmax(430px,.85fr) minmax(620px,1.35fr);
  }

  .grid > .card:nth-child(2){
    grid-row:span 2;
  }
}

@media(min-width:1500px){
  .tpv3-shell{
    max-width:1780px;
  }

  .v3-main-editor{
    min-height:500px;
  }
}


/* TPV3_ARTWORK_ENFORCE_V1 */
#v3ArtworkStatus{
  border-color:rgba(245,158,11,.28);
}

.check.ok span::before{
  content:"✓ ";
  color:#86efac;
}

.check.bad span::before{
  content:"• ";
  color:#fecaca;
}


/* TPV3_SCHEDULE_PICKER_V1 */
.schedule-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}

.schedule-btn{
  white-space:nowrap;
  padding-left:18px;
  padding-right:18px;
}

#v3ScheduleDate{
  min-height:48px;
}

@media(max-width:700px){
  .schedule-row{
    grid-template-columns:1fr;
  }
}


/* TPV3_DRAFT_BAR_V1 */
.draftbar{
  margin:0 0 18px;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  background:rgba(6,11,23,.72);
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
}

.draftbar .status{
  margin:0;
  flex:1;
  min-width:260px;
}


/* TPV3_STICKY_FOOTER_CLEARANCE_V1 */
body{
  padding-bottom:120px;
}

.tpv3-shell{
  padding-bottom:170px;
}

.publishbar{
  z-index:50;
}

.card:last-child{
  margin-bottom:24px;
}

@media(max-width:700px){
  body{
    padding-bottom:160px;
  }

  .tpv3-shell{
    padding-bottom:210px;
  }
}


/* TPV3_MP3_VERIFY_V1 */
.mp3-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}

.mp3-btn{
  white-space:nowrap;
}

#v3Mp3Status{
  border-color:rgba(56,189,248,.25);
}

@media(max-width:700px){
  .mp3-row{
    grid-template-columns:1fr;
  }
}


/* TPV3_TRANSCRIBE_PROGRESS_V1 */
.v3-progress-wrap{
  margin-top:12px;
  border:1px solid rgba(124,92,255,.28);
  border-radius:14px;
  padding:12px;
  background:rgba(124,92,255,.08);
}

.v3-progress-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#dbeafe;
  font-size:13px;
  font-weight:800;
  margin-bottom:8px;
}

.v3-progress-bar{
  height:12px;
  border-radius:999px;
  background:rgba(15,23,42,.9);
  overflow:hidden;
  border:1px solid rgba(148,163,184,.22);
}

.v3-progress-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg,#7c5cff,#38bdf8,#10b981);
  transition:width .45s ease;
  position:relative;
}

.v3-progress-fill::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);
  animation:v3progressshine 1.2s linear infinite;
}

.v3-progress-fill.bad{
  background:linear-gradient(90deg,#ef4444,#fb7185);
}

@keyframes v3progressshine{
  0%{transform:translateX(-100%)}
  100%{transform:translateX(100%)}
}

button:disabled{
  opacity:.62;
  cursor:not-allowed;
}


/* TPV3_STT_MODE_UI_V1 */
.transcript-row{
  grid-template-columns:150px 170px auto;
}

#v3SttMode{
  min-height:48px;
}

@media(max-width:900px){
  .transcript-row{
    grid-template-columns:1fr;
  }
}


/* TPV3_DRY_RUN_V1 */
#v3DryRunBtn{
  background:linear-gradient(180deg,#334155,#1e293b);
  border-color:rgba(148,163,184,.45);
}


/* TPV3_ARTWORK_ALWAYS_REQUIRED_V1 */
#v3ArtworkRequiredNote{
  margin-top:8px;
  font-weight:800;
  color:#fecaca;
}


/* TPV3_ARTWORK_PRO_MESSAGE_V1 */
#v3ArtworkStatus{
  line-height:1.45;
}

#v3ArtworkRequiredNote{
  border-left:3px solid rgba(251,113,133,.7);
  padding-left:10px;
  line-height:1.45;
}

/* TPV3_PREVIEW_OUTPUT_UP_SAFE_V1
   Preview/output moved upward without changing JS IDs or backend logic.
*/
@media(min-width:1180px){
  .tpv3-preview-output-card{
    min-height:360px;
  }

  .tpv3-preview-output-card .preview{
    min-height:300px;
  }

  section.grid.lower{
    grid-template-columns:1fr !important;
  }
}

/* TPV3_COMPACT_HERO_TEXT_V1 */
.hero,
.tpv3-hero,
header.hero{
  padding-top:28px !important;
  padding-bottom:26px !important;
}

.hero h1,
.tpv3-hero h1,
header.hero h1{
  font-size:clamp(34px, 5vw, 62px) !important;
  line-height:1.05 !important;
  margin-bottom:14px !important;
}

.hero p,
.tpv3-hero p,
header.hero p{
  white-space:nowrap !important;
  max-width:100% !important;
  font-size:clamp(18px, 2.6vw, 32px) !important;
  line-height:1.15 !important;
  margin-bottom:18px !important;
}

.hero .pills,
.tpv3-hero .pills,
header.hero .pills,
.hero .status-pills,
.tpv3-hero .status-pills{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:12px !important;
  align-items:center !important;
}

@media(max-width:700px){
  .hero p,
  .tpv3-hero p,
  header.hero p{
    white-space:normal !important;
    font-size:20px !important;
  }
}

/* TPV3_FORCE_ONE_LINE_HERO_V1 */
.hero{
  padding:18px 22px !important;
}

.hero .eyebrow{
  font-size:14px !important;
  letter-spacing:.14em !important;
  margin-bottom:8px !important;
}

.hero h1{
  font-size:clamp(24px, 3vw, 42px) !important;
  line-height:1.05 !important;
  margin:0 0 8px !important;
  white-space:nowrap !important;
}

.hero p.sub{
  font-size:clamp(14px, 1.6vw, 22px) !important;
  line-height:1.1 !important;
  margin:0 !important;
  white-space:nowrap !important;
}

.hero .pills,
.hero .status-pills,
.hero .hero-pills{
  margin-top:10px !important;
  display:flex !important;
  flex-wrap:nowrap !important;
  gap:8px !important;
  align-items:center !important;
}

.hero .pill{
  font-size:12px !important;
  padding:7px 10px !important;
  white-space:nowrap !important;
}

@media(max-width:700px){
  .hero h1{
    font-size:26px !important;
    white-space:normal !important;
  }
  .hero p.sub{
    font-size:15px !important;
    white-space:normal !important;
  }
}

/* TPV3_TRUE_ONE_LINE_HERO_V1 */
.tpv3-hero{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:18px !important;
  padding:14px 18px !important;
  min-height:0 !important;
}

.tpv3-hero-line{
  display:flex !important;
  align-items:baseline !important;
  gap:16px !important;
  min-width:0 !important;
  flex:1 1 auto !important;
  overflow:hidden !important;
}

.tpv3-hero .eyebrow,
.tpv3-hero h1,
.tpv3-hero .sub{
  margin:0 !important;
  white-space:nowrap !important;
}

.tpv3-hero .eyebrow{
  font-size:12px !important;
  letter-spacing:.12em !important;
  flex:0 0 auto !important;
}

.tpv3-hero h1{
  font-size:24px !important;
  line-height:1.1 !important;
  flex:0 0 auto !important;
}

.tpv3-hero .sub{
  font-size:15px !important;
  line-height:1.2 !important;
  flex:1 1 auto !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.tpv3-hero .hero-status{
  display:flex !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  flex:0 0 auto !important;
}

.tpv3-hero .pill{
  font-size:12px !important;
  padding:7px 10px !important;
  white-space:nowrap !important;
}

@media(max-width:900px){
  .tpv3-hero{
    flex-direction:column !important;
    align-items:flex-start !important;
  }
  .tpv3-hero-line{
    flex-wrap:wrap !important;
  }
  .tpv3-hero .sub{
    white-space:normal !important;
  }
  .tpv3-hero .hero-status{
    flex-wrap:wrap !important;
  }
}
