:root {
  --bg: #0d0d0f;
  --bg-elev: #16161a;
  --bg-elev-2: #1f1f24;
  --border: #26262c;
  --border-strong: #38383f;
  --text: #e6e6e8;
  --text-dim: #8a8a91;
  --text-faint: #56565c;
  --accent: #a8a8b0;
  --accent-hi: #c8c8cf;
  --accent-dim: #a8a8b018;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

.container { max-width: 820px; margin: 0 auto; padding: 48px 24px 96px; }

/* ---------- HEADER ---------- */
.header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.header h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #FFF 0%, #B0B0B5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle { color: var(--text-dim); margin-top: 6px; font-size: 14px; }

/* ---------- BACK LINK ---------- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 24px;
  transition: color 0.15s ease;
}
.back:hover { color: var(--accent); }

/* ---------- PROJECT TITLE ---------- */
.project-name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 8px 0 8px;
  line-height: 1.15;
}
.project-tag {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 8px;
}
.project-tag span {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 99px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
}

/* ---------- SECTION TITLE ---------- */
.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 40px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- CALLOUT ---------- */
.callout {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0;
}
.callout .section-title { margin-top: 0; }
.callout-success { border-color: #22c55e40; background: linear-gradient(180deg, #22c55e10, var(--bg-elev)); }
.callout-warn { border-color: #eab30840; background: linear-gradient(180deg, #eab30810, var(--bg-elev)); }

/* ---------- FORMS ---------- */
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.inline-btn { display: inline; }
.input {
  flex: 1;
  min-width: 180px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.textarea { resize: vertical; min-height: 80px; }
.select { cursor: pointer; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 16px 0 6px;
}
.form-wrap { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.form-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-block .section-title { margin: 0 0 12px 0; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.radio { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; color: var(--text); }
.radio input { accent-color: var(--accent); width: 16px; height: 16px; }
.hidden-row { display: none; gap: 8px; align-items: center; margin-top: 8px; }
.hidden-row .input { flex: 1; min-width: 80px; }
.unit { color: var(--text-dim); font-size: 13px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
}
.btn { background: #2a2a30; color: #f0f0f2; border: 1px solid #3d3d44; } .btn:hover { background: #3d3d44; color: #fff; } .btn-primary { background: #e6e6e8; color: #0d0d0f; border: 1px solid #e6e6e8; } .btn-primary:hover { background: #ffffff; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { padding: 13px 24px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-full-action {
  display: block;
  text-align: center;
  width: 100%;
  padding: 15px 24px;
  font-size: 15px;
  margin: 20px 0 32px;
}
.btn-approve { background: var(--green); color: #000; }
.btn-approve:hover { background: #34d56e; }
.btn-reject { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border-strong); }
.btn-reject:hover { background: var(--border-strong); }
.btn-delete {
  padding: 8px 14px;
  background: transparent;
  color: var(--red);
  border: 1px solid #7f1d1d;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-delete:hover { background: #7f1d1d; color: #fff; }

/* ---------- PROJECT LIST ---------- */
.project-list { display: flex; flex-direction: column; gap: 10px; }
.project-item {
  display: flex;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.1s;
}
.project-item:hover { border-color: var(--accent); transform: translateX(2px); }
.project-link { flex: 1; padding: 18px 20px; color: var(--text); display: block; }
.project-link:hover { color: var(--text); }
.project-title { font-weight: 600; font-size: 15px; }
.project-meta { color: var(--text-dim); font-size: 12px; margin-top: 4px; font-family: ui-monospace, monospace; }
.delete-form { padding: 16px; }

.empty { color: var(--text-dim); font-size: 14px; padding: 32px 0; text-align: center; }
.hint { color: var(--text-dim); font-size: 13px; margin: 8px 0; line-height: 1.6; }

/* ---------- PLAN REVIEW ---------- */
.plan-box { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 20px; }
.plan-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.plan-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.plan-body { font-size: 14px; line-height: 1.6; }
.plan-body-emph { font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.4; }
.plan-scene {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.plan-scene:last-child { border-bottom: none; padding-bottom: 0; }
.plan-scene:first-child { padding-top: 0; }
.plan-scene-index {
  flex: 0 0 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  border-radius: 50%;
  font-family: ui-monospace, monospace;
}
.plan-scene-info { min-width: 0; }
.plan-scene-role { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.plan-scene-summary { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.plan-scene-meta {
  color: var(--text-dim);
  font-size: 12px;
  font-family: ui-monospace, monospace;
  background: var(--bg-elev-2);
  padding: 3px 8px;
  border-radius: 6px;
  align-self: start;
}

/* ---------- SCENE BLOCKS (Step 3) ---------- */
.scene-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.scene-block-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 12px;
}
.scene-block-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.scene-block-title::before {
  content: "SCENE " attr(data-index);
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-right: 10px;
  vertical-align: middle;
  padding: 3px 8px;
  background: var(--accent-dim);
  border-radius: 6px;
}
.scene-block-duration {
  color: var(--text);
  font-size: 13px;
  font-family: ui-monospace, monospace;
  background: var(--bg-elev-2);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
}
.scene-block-desc {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ---------- PLACEHOLDER BLOCK ---------- */
.ph-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.ph-block:last-child { margin-bottom: 0; }
.ph-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: ui-monospace, monospace;
}
.ph-label strong {
  color: var(--text);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 10px;
  background: var(--bg-elev-2);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
}
.ph-desc { font-size: 13px; color: var(--text); margin-bottom: 14px; line-height: 1.5; }

/* ---------- UPLOAD FORM ---------- */
.upload-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.upload-form .input[type="file"] {
  padding: 10px 12px;
  cursor: pointer;
}
.upload-form .input[type="file"]::file-selector-button {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  margin-right: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.upload-form .input[type="file"]::file-selector-button:hover {
  background: var(--border-strong);
}

/* ---------- ASSET ROW ---------- */
.asset-row {
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 4px solid var(--border-strong);
  position: relative;
}
.asset-state-uploaded { border-left-color: var(--yellow); background: linear-gradient(90deg, #eab30808, var(--bg-elev)); }
.asset-state-approved { border-left-color: var(--green); background: linear-gradient(90deg, #22c55e08, var(--bg-elev)); }
.asset-state-rejected { border-left-color: var(--red); background: linear-gradient(90deg, #ef444408, var(--bg-elev)); }
.asset-file {
  font-size: 13px;
  font-family: ui-monospace, monospace;
  word-break: break-all;
  color: var(--text);
  font-weight: 500;
}
.asset-meta {
  font-size: 12px;
  color: var(--text-dim);
  display: block;
  margin-top: 6px;
  font-family: ui-monospace, monospace;
}
.asset-state-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-elev-2);
  margin-top: 8px;
  font-family: ui-monospace, monospace;
}
.asset-state-uploaded .asset-state-badge { background: #eab30820; color: var(--yellow); }
.asset-state-approved .asset-state-badge { background: #22c55e20; color: var(--green); }
.asset-state-rejected .asset-state-badge { background: #ef444420; color: var(--red); }
.asset-reject {
  font-size: 12px;
  color: #fca5a5;
  margin-top: 8px;
  padding: 8px 10px;
  background: #7f1d1d20;
  border-radius: 6px;
  border-left: 2px solid var(--red);
}
.asset-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- RENDER STATUS ---------- */
.render-status {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.progress-bar-track {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transition: width 400ms ease-out;
}
.progress-label {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 12px;
  font-family: ui-monospace, monospace;
}

/* ---------- VIDEO PLAYER ---------- */
.video-player {
  width: 100%;
  max-height: 640px;
  background: #000;
  border-radius: var(--radius);
  margin-top: 16px;
  aspect-ratio: 9/16;
  object-fit: contain;
  border: 1px solid var(--border);
}
.download-btn {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  padding: 11px 20px;
  background: var(--accent);
  color: #000;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
}
.download-btn:hover { background: var(--accent-hi); color: #000; }

/* ---------- ERROR ---------- */
.error-box {
  padding: 14px 18px;
  background: #7f1d1d20;
  border: 1px solid #7f1d1d;
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  color: #fca5a5;
  font-size: 13px;
  margin-top: 16px;
  line-height: 1.5;
}

/* ---------- SPINNER ---------- */
.spinner-track {
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0;
  position: relative;
}
.spinner-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi), var(--accent));
  border-radius: 4px;
  animation: spinner-slide 1.4s ease-in-out infinite;
}
@keyframes spinner-slide {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(100%); }
  100% { transform: translateX(300%); }
}
/* ---------- STEP 3 BLUEPRINT SUMMARY ---------- */
.bp-summary {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bp-summary-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: baseline;
}
.bp-summary-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: ui-monospace, monospace;
  padding-top: 2px;
}
.bp-summary-value { font-size: 14px; line-height: 1.55; color: var(--text); min-width: 0; }
.bp-summary-hook { font-style: italic; color: var(--text); font-weight: 500; }
.bp-summary-mono { font-family: ui-monospace, monospace; font-size: 13px; color: var(--accent); }
.bp-summary-notes { color: var(--text-dim); font-size: 13px; }
.bp-chip {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  padding: 3px 10px;
  border-radius: 99px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-right: 6px;
}

/* ---------- SCENE SUBSECTIONS (narration, graphics, transitions) ---------- */
.scene-subsection {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.scene-subsection-inline {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
}
.scene-subsection-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: ui-monospace, monospace;
  margin-bottom: 8px;
}
.scene-subsection-inline .scene-subsection-label { margin-bottom: 0; }

.scene-narration {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-style: italic;
}

.scene-graphics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scene-graphic {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
}
.scene-graphic-preset {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.scene-graphic-primary {
  color: var(--text);
  font-weight: 600;
}
.scene-graphic-secondary {
  color: var(--text-dim);
  font-size: 12px;
}

.scene-transition {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.plan-scene-narration {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.5;
}

/* ==========================================================================
   THEME: MONOCHROME GRAY (applied last, wins the cascade)
   ========================================================================== */
:root {
  --bg:            #0d0d0f;
  --bg-elev:       #16161a;
  --bg-elev-2:     #1f1f24;
  --border:        #26262c;
  --border-strong: #38383f;
  --text:          #e6e6e8;
  --text-dim:      #8a8a91;
  --text-faint:    #56565c;
  --accent:        #a8a8b0;
  --accent-hi:     #c8c8cf;
  --accent-dim:    #a8a8b018;
  --green:         #22c55e;
  --yellow:        #eab308;
  --red:           #ef4444;
}
body { background: #0d0d0f; color: #e6e6e8; }
a { color: #c8c8cf; }
a:hover { color: #ffffff; }
.header h1 {
  background: linear-gradient(135deg, #ffffff 0%, #8a8a91 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn { background: #2a2a30; color: #f0f0f2; border: 1px solid #3d3d44; }
.btn:hover { background: #3d3d44; color: #fff; }
.btn:focus-visible { outline-color: #8a8a91; }
.btn-primary { background: #e6e6e8; color: #0d0d0f; border: 1px solid #e6e6e8; }
.btn-primary:hover { background: #ffffff; color: #0d0d0f; }
.btn-full-action { background: #e6e6e8; color: #0d0d0f; border: 1px solid #e6e6e8; }
.btn-full-action:hover { background: #ffffff; }
.btn-approve { background: #22c55e; color: #0d0d0f; border-color: #22c55e; }
.btn-approve:hover { background: #34d56e; }
.btn-reject { background: #26262c; color: #e6e6e8; border-color: #38383f; }
.btn-reject:hover { background: #38383f; }
.btn-delete { color: #ef4444; border-color: #7f1d1d; }
.btn-delete:hover { background: #7f1d1d; color: #fff; }
.input:focus { border-color: #8a8a91; box-shadow: 0 0 0 3px #8a8a9122; }
.radio input { accent-color: #c8c8cf; }
.plan-scene-index { background: #26262c; color: #e6e6e8; }
.scene-block { border-left-color: #56565c; }
.scene-block-title::before { color: #c8c8cf; background: #26262c; }
.plan-scene-meta, .scene-block-duration { background: #1f1f24; }
.progress-bar-fill { background: linear-gradient(90deg, #56565c, #c8c8cf); }
.spinner-fill { background: linear-gradient(90deg, #56565c, #c8c8cf, #56565c); }
.download-btn { background: #e6e6e8; color: #0d0d0f; }
.download-btn:hover { background: #ffffff; }
.bp-summary { border-left-color: #56565c; }
.bp-summary-mono { color: #c8c8cf; }
.scene-graphic-preset { color: #e6e6e8; background: #26262c; }
.scene-narration { border-left-color: #56565c; }
.project-item:hover { border-color: #8a8a91; }
.callout-success { border-color: #22c55e40; }
.callout-warn { border-color: #eab30840; }
/* ==========================================================================
   TELEGRAM DOWNLOAD ACTIONS + UPGRADED TYPOGRAPHY
   ========================================================================== */
.download-btn,
a.btn[target="_blank"] {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: #e6e6e8;
  color: #0d0d0f;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid #e6e6e8;
}
.download-btn:hover,
a.btn[target="_blank"]:hover { background: #ffffff; }

/* Better on-screen text preview in the plan/scene blocks */
.scene-narration {
  font-size: 15px;
  line-height: 1.7;
  font-weight: 500;
}
.plan-scene-narration {
  font-size: 13px;
  line-height: 1.6;
  font-style: italic;
  color: #b8b8bf;
}
.scene-graphic-primary {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.scene-graphic-secondary {
  font-weight: 400;
  letter-spacing: 0.02em;
}
/* ==== RESPONSIVE + NAV ==== */

/* Nav row: New + DB Inspector side by side on desktop, stacked on mobile */
.nav-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 32px;
  align-items: stretch;
}
.nav-row .btn-full-action {
  margin: 0;
  flex: 1 1 220px;
  width: auto;
}
.btn-nav-db {
  flex: 0 0 auto;
  padding: 15px 24px;
  background: #26262c;
  color: #e6e6e8;
  border: 1px solid #38383f;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn-nav-db:hover { background: #38383f; color: #fff; }

.live-badge { color: #eab308; }

/* On small screens, stack the nav buttons full width */
@media (max-width: 520px) {
  .nav-row { flex-direction: column; }
  .nav-row .btn-full-action,
  .btn-nav-db { width: 100%; flex: 1 1 auto; }
}

/* Form grid: 2 columns on desktop, 1 column (stacked) on mobile.
   This is the fix for Format + Genre being squeezed into narrow columns. */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 560px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Prevent selects/inputs from overflowing their grid cell on narrow screens */
.form-grid-2 > div { min-width: 0; }
.form-grid-2 .input,
.form-grid-2 .select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Extra breathing room in mobile form blocks */
@media (max-width: 560px) {
  .form-block { padding: 20px 16px; }
  .container { padding: 32px 16px 80px; }
}
