/* =============================================================================
   overnight.css — Overnight Mode styles
   Includes: overnight form card · script count picker · script slots
             global settings · submit row · claim cards · results
             overnight subtitle editor (on-sub-*) · Turnstile note
   Imported on: overnight.html only
   ============================================================================= */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
  
/* ═══════════════════════════════════════════════════════════════════════════════
   OVERNIGHT FORM WRAPPER
   ═══════════════════════════════════════════════════════════════════════════════ */
.overnight-form-wrap {
  display: none;
  max-width: 1400px;        /* increased from 1200px */
  margin: 2rem auto 4rem;
  padding: 0 2rem;
}
.overnight-form-wrap.active { display: block; }

.overnight-card {
  background: #0d1017;
  border: 1px solid #2a3548;  /* slightly lighter border */
  border-radius: 48px;
  padding: 2rem 2.5rem;        /* more horizontal padding, less vertical */
  box-shadow: 0 20px 30px -10px #04060c;
}

/* ── Overnight Mode Warning Popup ── */
.overnight-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.overnight-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}
.overnight-popup-content {
    position: relative;
    background: linear-gradient(135deg, #0b1120 0%, #0f1a2a 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 32px;
    max-width: 750px;  /* Changed from 600px to 750px */
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}
.overnight-popup-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    position: sticky;
    top: 0;
    background: inherit;
    border-radius: 32px 32px 0 0;
}
.overnight-popup-header i {
    font-size: 1.5rem;
}
.overnight-popup-header h3 {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0;
}
.overnight-popup-close {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.overnight-popup-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}
.overnight-popup-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.overnight-popup-section {
    display: flex;
    gap: 1.25rem;  /* Increased from 1rem */
    padding: 1.25rem;  /* Increased from 1rem */
    background: rgba(7, 12, 22, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}
.overnight-popup-section > i {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}
.overnight-popup-section strong {
    display: block;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.overnight-popup-section p {
    color: #8897b3;
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}
.overnight-popup-section ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.2rem;
    color: #6b7fa0;
    font-size: 0.8rem;
}
.overnight-popup-section li {
    margin: 0.25rem 0;
}
.overnight-popup-section code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: monospace;
    color: #f59e0b;
}
.overnight-popup-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}
.overnight-popup-dontshow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #809ab3;
    font-size: 0.85rem;
}
.overnight-popup-dontshow input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
}
.overnight-popup-gotit {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 60px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.overnight-popup-gotit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

/* ── Header ── */
.overnight-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #1a2035;
}
.overnight-header-icon {
  width: 52px; height: 52px;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.overnight-header-text h2 { color: #f1f5f9; font-size: 1.4rem; font-weight: 700; margin: 0 0 0.3rem; }
.overnight-header-text p  { color: #546180; font-size: 0.85rem; margin: 0; }

/* ═══════════════════════════════════════════════════════════════════════════════
   SCRIPT COUNT PICKER
   ═══════════════════════════════════════════════════════════════════════════════ */
.script-count-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.script-count-label { color: #c7d2e8; font-size: 0.9rem; font-weight: 600; }
.script-count-btns  { display: flex; gap: 0.5rem; }
.script-count-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid #1e2d45; background: #070c16;
  color: #c7d2e8; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.script-count-btn:hover { border-color: #f59e0b; color: #f59e0b; }
.script-count-btn.active {
  background: rgba(245,158,11,0.15); border-color: #f59e0b;
  color: #f59e0b; box-shadow: 0 0 12px rgba(245,158,11,0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SCRIPT SLOTS
   ═══════════════════════════════════════════════════════════════════════════════ */
.script-slots { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }

.script-slot {
  background: #070c16; border: 1px solid #1a2035;
  border-radius: 24px; padding: 1.5rem; transition: border-color 0.2s;
}
.script-slot:focus-within { border-color: rgba(245,158,11,0.4); }

.slot-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.slot-number {
  width: 28px; height: 28px;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: #f59e0b; flex-shrink: 0;
}
.slot-label { font-size: 0.85rem; font-weight: 600; color: #8897b3; }

.slot-textarea {
  width: 100%; background: #0a1020; border: 1px solid #1e2d45;
  border-radius: 16px; padding: 1rem 1.2rem; color: #e8edf5;
  font-family: 'Inter', sans-serif; font-size: 0.9rem;
  resize: vertical; min-height: 120px; box-sizing: border-box;
  margin-bottom: 0.8rem; transition: border-color 0.15s;
}
.slot-textarea:focus { outline: none; border-color: rgba(245,158,11,0.4); }

.slot-char-counter { text-align: right; font-size: 0.78rem; color: #3f5070; margin-bottom: 0.8rem; margin-top: -0.4rem; }
.slot-char-counter.warn { color: #f59e0b; }
.slot-char-counter.over { color: #ef4444; }

.slot-settings { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.slot-field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 130px; }
.slot-field label { font-size: 0.7rem; font-weight: 600; color: #3f5070; text-transform: uppercase; letter-spacing: 0.05em; }
.slot-field select {
  background: #0d1017; border: 1px solid #1e2d45; color: #c7d2e8;
  padding: 0.5rem 0.9rem; border-radius: 30px; font-size: 0.82rem; width: 100%;
}
.slot-field select:focus { outline: none; border-color: rgba(245,158,11,0.4); }

/* ═══════════════════════════════════════════════════════════════════════════════
   GLOBAL SETTINGS
   ═══════════════════════════════════════════════════════════════════════════════ */
.overnight-global-settings {
  background: rgba(245,158,11,0.04); border: 1px solid rgba(245,158,11,0.12);
  border-radius: 20px; padding: 1.2rem 1.5rem; margin-bottom: 2rem;
}
.global-settings-label {
  font-size: 0.72rem; font-weight: 700; color: #f59e0b;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.global-settings-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.global-field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 150px; }
.global-field label { font-size: 0.72rem; font-weight: 600; color: #546180; text-transform: uppercase; letter-spacing: 0.05em; }
.global-field select {
  background: #0d1017; border: 1px solid #1e2d45; color: #c7d2e8;
  padding: 0.55rem 1rem; border-radius: 30px; font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SUBMIT ROW
   ═══════════════════════════════════════════════════════════════════════════════ */
.overnight-submit-row { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.overnight-submit-info { flex: 1; min-width: 200px; }
.overnight-submit-info p { font-size: 0.82rem; color: #546180; line-height: 1.6; margin: 0; }
.overnight-submit-info strong { color: #8897b3; }
.overnight-submit-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }

.btn-overnight-submit {
  background: linear-gradient(135deg,#d97706,#f59e0b);
  color: #0a0800; border: none; padding: 0.9rem 2.5rem; border-radius: 60px;
  font-size: 1rem; font-weight: 800; cursor: pointer; transition: all 0.2s;
  white-space: nowrap; box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}
.btn-overnight-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(245,158,11,0.4); }
.btn-overnight-submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Turnstile note ── */
.on-turnstile-note { font-size: 0.72rem; color: #3f5070; display: none; }
.on-turnstile-note.visible { display: flex; align-items: center; gap: 0.35rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; display: inline-block; }

/* ═══════════════════════════════════════════════════════════════════════════════
   RESULTS & CLAIM CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */
.overnight-results { display: none; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #1a2035; }
.overnight-results.visible { display: block; }
.results-title { font-size: 1rem; font-weight: 700; color: #f1f5f9; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }

.claim-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.claim-card {
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.2);
  border-radius: 16px; padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.claim-card.failed { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); }

.claim-slot-badge {
  width: 32px; height: 32px; background: rgba(16,185,129,0.15);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: #34d399; flex-shrink: 0;
}
.claim-card.failed .claim-slot-badge { background: rgba(239,68,68,0.15); color: #f87171; }
.claim-code-display { font-family: monospace; font-size: 1rem; font-weight: 700; color: #34d399; letter-spacing: 0.1em; flex: 1; }
.claim-card.failed .claim-code-display { color: #f87171; }

.claim-copy-btn {
  background: transparent; border: 1px solid rgba(52,211,153,0.3); color: #34d399;
  padding: 0.35rem 0.9rem; border-radius: 30px; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.claim-copy-btn:hover { background: rgba(52,211,153,0.1); }
.claim-wait { font-size: 0.72rem; color: #546180; width: 100%; margin-top: 0.2rem; }

.overnight-check-link {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.2rem;
  padding: 0.7rem 1.5rem; background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.3);
  border-radius: 30px; color: #818cf8; font-size: 0.85rem; font-weight: 600;
  text-decoration: none; transition: all 0.15s;
}
.overnight-check-link:hover { background: rgba(99,102,241,0.2); color: #a5b4fc; }

/* ═══════════════════════════════════════════════════════════════════════════════
   OVERNIGHT SUBTITLE EDITOR — NEW LAYOUT
   Uses: on-sub-editor-section · on-sub-grid · on-sub-panel · on-sub-phone-shell
         on-sub-controls-col · on-sub-phone-col · on-sub-pill-toggle · etc.
   ═══════════════════════════════════════════════════════════════════════════════ */

.on-sub-editor-section {
  display: none;
  margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #1a2035;
}
.on-sub-editor-section.visible { display: block; }

/* ── Section header ── */
.on-sub-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;
}
.on-sub-editor-title {
  font-size: 1rem; font-weight: 700; color: #f1f5f9;
  display: flex; align-items: center; gap: 0.5rem;
}
.on-sub-editor-title i { color: #f59e0b; }
.on-sub-editor-hint {
  font-size: 0.75rem; color: #546180;
}

/* ── Two-column grid ── */
.on-sub-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 820px) {
  .on-sub-grid { grid-template-columns: 1fr; }
  .on-sub-phone-col { order: -1; align-items: center; }
}

/* ── Left controls column ── */
.on-sub-controls-col {
  display: flex; flex-direction: column; gap: 1rem;
}

/* ── Panel card ── */
.on-sub-panel {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.65rem;
}

/* ── Section label inside panels ── */
.on-sub-section-label {
  font-size: 0.68rem; font-weight: 700; color: #f59e0b;
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ── Mode tabs ── */
.on-sub-mode-tabs {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
}
.on-sub-mode-tab {
  flex: 1; min-width: 70px;
  padding: 0.45rem 0.7rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #8897b3; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  text-align: center;
}
.on-sub-mode-tab:hover  { background: rgba(255,255,255,0.08); color: #e8edf5; }
.on-sub-mode-tab.active {
  background: rgba(245,158,11,0.15);
  border-color: #f59e0b; color: #f59e0b;
}

/* ── Pill toggle (bold/case/glow/position) ── */
.on-sub-pill-toggle { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.on-sub-pill-btn {
  flex: 1; min-width: 50px;
  padding: 0.35rem 0.6rem; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #8897b3; font-size: 0.78rem; cursor: pointer; transition: all 0.15s;
  text-align: center;
}
.on-sub-pill-btn:hover  { background: rgba(255,255,255,0.08); color: #e8edf5; }
.on-sub-pill-btn.active {
  background: rgba(245,158,11,0.15);
  border-color: #f59e0b; color: #f59e0b;
}

/* ── Slider row ── */
.on-sub-slider-row {
  display: flex; align-items: center; gap: 0.75rem;
}
.on-sub-slider-row input[type="range"] {
  flex: 1; accent-color: #f59e0b;
  background: transparent; border: none; padding: 0;
}
.on-sub-slider-val {
  font-family: monospace; font-size: 0.82rem;
  color: #f59e0b; font-weight: 700; min-width: 28px; text-align: right;
}

/* ── Colour row ── */
.on-sub-colour-row {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.on-sub-colour-field {
  flex: 1; min-width: 110px;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.on-sub-colour-label {
  font-size: 0.68rem; font-weight: 600; color: #546180;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.on-sub-colour-trigger {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 0.4rem 0.7rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.on-sub-colour-trigger:hover { border-color: #f59e0b; background: rgba(245,158,11,0.07); }
.on-sub-colour-swatch {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0;
}
.on-sub-colour-hex {
  font-family: monospace; font-size: 0.78rem; color: #e8edf5;
  flex: 1; letter-spacing: 0.05em;
}

/* ── Colour pool list ── */
.on-sub-pool-list {
  display: flex; flex-direction: column; gap: 0.35rem;
  max-height: 160px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #f59e0b #0b1120;
}
.on-sub-pool-list::-webkit-scrollbar { width: 4px; }
.on-sub-pool-list::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 4px; }

.on-sub-pool-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; cursor: pointer;
}
.on-sub-pool-item:hover { background: rgba(245,158,11,0.07); border-color: rgba(245,158,11,0.2); }
.on-sub-pool-swatch {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0;
}
.on-sub-pool-hex {
  font-family: monospace; font-size: 0.75rem; color: #c7d2e8; flex: 1;
}
.on-sub-pool-remove {
  background: transparent; border: none; color: #546180;
  cursor: pointer; font-size: 0.75rem; padding: 0.1rem 0.3rem;
  border-radius: 4px; transition: color 0.12s;
}
.on-sub-pool-remove:hover { color: #ef4444; }

/* ── Preset swatches ── */
.on-sub-presets {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
}
.on-sub-preset-btn {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.65rem; border-radius: 30px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  cursor: pointer; transition: all 0.13s;
  font-size: 0.73rem; font-weight: 600; color: #8897b3;
}
.on-sub-preset-btn:hover {
  border-color: currentColor; background: rgba(255,255,255,0.09);
  transform: translateY(-1px);
}
.on-sub-preset-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25); flex-shrink: 0;
}

/* ── Mix pattern row ── */
.on-sub-mix-row {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.on-sub-mix-label {
  font-size: 0.75rem; color: #8897b3;
}
.on-sub-mix-num {
  width: 54px; background: #0d1017; border: 1px solid #1e2d45;
  color: #e8edf5; padding: 0.28rem 0.5rem; border-radius: 30px; font-size: 0.8rem;
  text-align: center;
}
.on-sub-mix-num:focus { outline: none; border-color: rgba(245,158,11,0.4); }

/* ── Pattern preview strip ── */
.on-sub-pattern-preview {
  font-size: 0.7rem; color: #8897b3;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 0.45rem 0.7rem;
  line-height: 1.6; word-break: break-all;
}

/* ── Font dropdown (overnight subtitle editor) ── */
.on-sub-font-dd { position: relative; width: 100%; }
.on-sub-font-dd-trigger {
  width: 100%; display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 0.4rem 0.6rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s; text-align: left; min-height: 34px;
}
.on-sub-font-dd-trigger:hover { border-color: #f59e0b; background: rgba(245,158,11,0.06); }
.on-sub-font-dd.open .on-sub-font-dd-trigger { border-color: #f59e0b; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.on-sub-font-dd-preview {
  flex: 1; font-size: 0.88rem; font-weight: 700; color: #e8edf5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.on-sub-font-dd-chevron {
  width: 10px; height: 6px; color: #546180; flex-shrink: 0; transition: transform 0.2s;
}
.on-sub-font-dd.open .on-sub-font-dd-chevron { transform: rotate(180deg); color: #f59e0b; }
.on-sub-font-dd-panel {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 9000;
  background: #0d1117; border: 1px solid #f59e0b; border-top: none;
  border-bottom-left-radius: 8px; border-bottom-right-radius: 8px;
  max-height: 220px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #f59e0b #0b1120;
  box-shadow: 0 12px 32px rgba(0,0,0,0.85);
}
.on-sub-font-dd.open .on-sub-font-dd-panel { display: flex; flex-direction: column; }
.on-sub-font-dd-item {
  padding: 0.5rem 0.75rem; background: #0d1117; border: none; color: #c7d2e8;
  font-size: 0.88rem; font-weight: 700; text-align: left; cursor: pointer;
  transition: background 0.12s, color 0.12s; border-left: 2px solid transparent;
}
.on-sub-font-dd-item:hover  { background: #1a2035; color: #f1f5f9; border-left-color: #f59e0b; }
.on-sub-font-dd-item.active { background: #1a180a; color: #fbbf24; border-left-color: #f59e0b; }

/* ═══════════════════════════════════════════════════════════════════════════════
   PHONE PREVIEW (right column)
   ═══════════════════════════════════════════════════════════════════════════════ */
.on-sub-phone-col {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}

.on-sub-phone-shell {
  width: 175px;
  background: #0d1017; border-radius: 36px; border: 2px solid #1e2740;
  box-shadow:
    0 0 0 1px #0d1017,
    0 0 0 5px #0d1017,
    0 24px 48px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 10px 7px 9px;
  display: flex; flex-direction: column; gap: 5px; position: relative;
}

.on-sub-phone-screen {
  background: #0d1017; border-radius: 24px; overflow: hidden;
  position: relative; aspect-ratio: 9/16; width: 100%;
}

.on-sub-phone-bg {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    #0a1a08 0%,
    #152b10 25%,
    #1a3d18 50%,
    #0f2210 75%,
    #060d05 100%
  );
}
/* Pixel-art-style Minecraft bars */
.on-sub-phone-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(26,107,58,0.3) 0px,
    rgba(26,107,58,0.3) 14px,
    rgba(45,125,26,0.2) 14px,
    rgba(45,125,26,0.2) 28px
  );
}
.on-sub-phone-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.5) 0%,
    rgba(0,0,0,0.05) 40%,
    rgba(0,0,0,0.05) 60%,
    rgba(0,0,0,0.55) 100%
  );
}

.on-sub-phone-speed-badge {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  font-size: 0.45rem; font-weight: 800; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4); z-index: 10;
  background: rgba(0,0,0,0.3); padding: 0.1rem 0.4rem; border-radius: 4px;
}

.on-sub-phone-sub {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; padding: 0 8px;
  text-align: center;
}

.on-sub-phone-play-dot {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 3px; z-index: 6;
}
.on-sub-phone-play-dot::before,
.on-sub-phone-play-dot::after {
  content: '';
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

/* ── Word counter ── */
.on-sub-word-counter {
  font-family: monospace; font-size: 0.72rem; color: #546180; text-align: center;
}

/* ── Preview controls ── */
.on-sub-preview-controls {
  display: flex; gap: 0.5rem; align-items: center; justify-content: center;
}
.on-sub-prev-ctrl-btn {
  background: transparent; border: 1px solid #1e2d45; color: #c7d2e8;
  padding: 0.4rem 0.9rem; border-radius: 30px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.13s;
  display: flex; align-items: center; gap: 0.35rem;
}
.on-sub-prev-ctrl-btn:hover { border-color: #f59e0b; color: #f59e0b; }

/* ── Speed note ── */
.on-sub-speed-note {
  font-size: 0.65rem; color: #3f5070; text-align: center;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LEGACY on-sub-* kept for backwards compat with overnight-subtitleediter.js
   ═══════════════════════════════════════════════════════════════════════════════ */
.on-sub-editor-cols {
  display: grid; grid-template-columns: 1fr 220px; gap: 1.5rem; align-items: start; margin-bottom: 1.2rem;
}
@media (max-width: 820px) {
  .on-sub-editor-cols { grid-template-columns: 1fr; }
  .on-sub-editor-right { order: -1; }
}
.on-sub-editor-left  { display: flex; flex-direction: column; gap: 0.75rem; }
.on-sub-editor-right { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }

.on-sub-mode-toggle { display: flex; gap: 0.5rem; }
.on-sub-mode-btn {
  flex: 1; padding: 0.5rem 0.75rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: #8897b3; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: all 0.18s; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.on-sub-mode-btn:hover  { background: rgba(255,255,255,0.08); color: #e8edf5; }
.on-sub-mode-btn.active { background: rgba(245,158,11,0.15); border-color: #f59e0b; color: #f59e0b; }

.on-sub-style-panel {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.75rem;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.on-sub-style-row   { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.on-sub-style-field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 100px; }
.on-sub-style-field label { font-size: 0.72rem; font-weight: 600; color: #546180; text-transform: uppercase; letter-spacing: 0.05em; }
.on-sub-style-field select,
.on-sub-style-field input[type="range"] {
  width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; color: #e8edf5; padding: 0.3rem 0.5rem; font-size: 0.8rem;
}
.on-colour-picker-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 0.45rem 0.75rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s; width: 100%; box-sizing: border-box;
}
.on-colour-picker-btn:hover { border-color: #f59e0b; background: rgba(245,158,11,0.08); }
.on-colour-picker-btn input[type="color"] { width: 0; height: 0; padding: 0; border: none; opacity: 0; position: absolute; }
.on-colour-picker-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0; display: inline-block; }
.on-colour-picker-label  { font-family: monospace; font-size: 0.8rem; color: #e8edf5; flex: 1; letter-spacing: 0.05em; }

.on-pos-toggle { display: flex; gap: 0.3rem; }
.on-pos-btn {
  flex: 1; padding: 0.35rem 0.5rem; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: #8897b3; font-size: 0.8rem; cursor: pointer; transition: all 0.15s;
}
.on-pos-btn:hover  { background: rgba(255,255,255,0.08); color: #e8edf5; }
.on-pos-btn.active { background: rgba(245,158,11,0.15); border-color: #f59e0b; color: #f59e0b; }

.on-rand-colour-panel {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(245,158,11,0.25);
  border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.75rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.on-rand-colour-panel-label {
  font-size: 0.72rem; font-weight: 600; color: #f59e0b;
  text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 0.4rem;
}
.on-rand-swatch-btn {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem 0.35rem 0.45rem; border-radius: 30px;
  border: 2px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  cursor: pointer; transition: all 0.15s; font-size: 0.78rem; color: #8897b3; font-weight: 600;
}
.on-rand-swatch-btn:hover { border-color: rgba(255,255,255,0.3); color: #e8edf5; transform: translateY(-1px); }
.on-rand-swatch-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); flex-shrink: 0; }
.on-pattern-controls { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 0.3rem; }
.on-pattern-controls label { display: flex; align-items: center; gap: 0.3rem; color: #8897b3; font-size: 0.8rem; }
.on-pattern-controls input[type=number] {
  width: 70px; background: #0d1017; border: 1px solid #1e2d45;
  color: #e8edf5; padding: 0.3rem 0.5rem; border-radius: 30px; font-size: 0.8rem;
}
.on-rand-hint { font-size: 0.72rem; color: #546180; line-height: 1.5; }

.on-phone-shell {
  width: 200px; background: #0d1017; border-radius: 40px; border: 2px solid #1e2740;
  box-shadow: 0 0 0 1px #0d1017, 0 0 0 6px #0d1017, 0 30px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 12px 8px 10px; display: flex; flex-direction: column; gap: 6px; position: relative;
}
.on-phone-notch {
  width: 70px; height: 24px; background: #0d1017; border-radius: 0 0 16px 16px;
  margin: 0 auto -6px; position: relative; z-index: 10; border: 2px solid #1e2740; border-top: none;
}
.on-phone-screen {
  background: #0d1017; border-radius: 28px; overflow: hidden;
  position: relative; aspect-ratio: 9 / 16; width: 100%;
}
.on-phone-bg-sim  { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.on-phone-bg-bars { display: flex; width: 100%; height: 65%; align-items: flex-end; gap: 1px; }
.on-pb-bar        { flex: 1; height: var(--h); background: var(--c); image-rendering: pixelated; position: relative; }
.on-pb-bar::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.12); }
.on-phone-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,rgba(0,0,0,0.55) 0%,rgba(0,0,0,0.1) 40%,rgba(0,0,0,0.1) 60%,rgba(0,0,0,0.55) 100%);
}
.on-phone-sub-area { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.on-phone-screen-fade { position: absolute; bottom: 0; left: 0; right: 0; height: 40px; background: linear-gradient(to top,rgba(0,0,0,0.6),transparent); z-index: 6; pointer-events: none; }
.on-phone-home-bar { width: 80px; height: 4px; background: rgba(255,255,255,0.25); border-radius: 4px; margin: 2px auto 0; }

/* ── Font dropdown (legacy on-font-dd) ── */
.on-font-dd { position: relative; width: 100%; }
.on-font-dd-trigger {
  width: 100%; display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 0.4rem 0.6rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s; text-align: left; min-height: 34px;
}
.on-font-dd-trigger:hover { border-color: #f59e0b; background: rgba(245,158,11,0.06); }
.on-font-dd.open .on-font-dd-trigger { border-color: #f59e0b; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.on-font-dd-preview { flex: 1; font-size: 0.88rem; font-weight: 700; color: #e8edf5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.02em; }
.on-font-dd-chevron { width: 10px; height: 6px; color: #546180; flex-shrink: 0; transition: transform 0.2s; }
.on-font-dd.open .on-font-dd-chevron { transform: rotate(180deg); color: #f59e0b; }
.on-font-dd-panel {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 9000;
  background: #0d1117; border: 1px solid #f59e0b; border-top: none;
  border-bottom-left-radius: 8px; border-bottom-right-radius: 8px;
  max-height: 260px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #f59e0b #0b1120;
  box-shadow: 0 12px 32px rgba(0,0,0,0.85); isolation: isolate;
}
.on-font-dd.open .on-font-dd-panel { display: flex; flex-direction: column; }
.on-font-dd-panel::-webkit-scrollbar       { width: 6px; }
.on-font-dd-panel::-webkit-scrollbar-track { background: #0b1120; }
.on-font-dd-panel::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 6px; }
.on-font-dd-item {
  padding: 0.5rem 0.75rem; background: #0d1117; border: none; color: #c7d2e8;
  font-size: 0.92rem; font-weight: 700; text-align: left; cursor: pointer;
  transition: background 0.12s, color 0.12s; letter-spacing: 0.02em; border-left: 2px solid transparent;
}
.on-font-dd-item:hover  { background: #1a2035; color: #f1f5f9; border-left-color: #f59e0b; }
.on-font-dd-item.active { background: #1a180a; color: #fbbf24; border-left-color: #f59e0b; }


.overnight-form-wrap {
  display: none;
  max-width: 1400px;        /* increased from 1200px */
  margin: 2rem auto 4rem;
  padding: 0 2rem;
}
.overnight-form-wrap.active { display: block; }

.overnight-card {
  background: #0d1017;
  border: 1px solid #2a3548;  /* slightly lighter border */
  border-radius: 48px;
  padding: 2rem 2.5rem;        /* more horizontal padding, less vertical */
  box-shadow: 0 20px 30px -10px #04060c;
}