/* ============================================================
   Midnight — TwoLune's second look (2026-11-30).

   Loaded after paper.css and scoped to html[data-theme="midnight"].
   paper.css styles every screen through variables, so most of this
   file is a new palette; the rest re-colours the places paper
   hard-codes cream or a light ink (text on the seal colour, letter
   lines, the envelope, a few borders).

   Palette: night #141B34, dusk #1E2747, moon #F3E9D2, rose #E8A9A1.
   The accent ("seal") is rose, so anything sitting ON the accent
   uses --on-seal (night blue) instead of paper's cream.
   ============================================================ */

:root[data-theme="midnight"] {
  --paper: #141b34; --paper-2: #10162b; --card: #1e2747; --tan: #34406a; --tan-fill: #283258; --tan-2: #252f55;
  --ink: #f3e9d2; --ink-2: #cdc6da; --ink-3: #a7a1bc;
  --seal: #e8a9a1; --seal-dark: #b9776f; --seal-bright: #f2bdb5; --blush: #382c4c;
  --on-seal: #141b34;
  --good: #8fd1a3; --good-soft: #1d3a33; --warn: #e8c27a; --warn-soft: #3a3222;
  --bad: #f2a0a8; --bad-soft: #3d2232; --info: #a9b8e8; --info-soft: #252f55;
  --shadow: 0 3px 0 #0b1024;
  --shadow-lg: 0 6px 0 #0b1024, 0 18px 40px -22px rgba(0, 0, 0, .6);
  --ring: 0 0 0 2px rgba(232, 169, 161, .35);
  color-scheme: dark;
}

/* ---------- page ---------- */
html[data-theme="midnight"] body {
  background: radial-gradient(900px 620px at 12% -10%, #1f2950, transparent 60%),
              linear-gradient(180deg, #161d38, #10162b);
  background-attachment: fixed;
}
html[data-theme="midnight"] body::after { display: none; }
html[data-theme="midnight"] #topbar { background: rgba(20, 27, 52, .92); }

/* headlines are moonlight, the accent stays rose */
html[data-theme="midnight"] h1, html[data-theme="midnight"] h2,
html[data-theme="midnight"] .q-title, html[data-theme="midnight"] .persona-name,
html[data-theme="midnight"] .modal h3, html[data-theme="midnight"] .who-name,
html[data-theme="midnight"] .brand-name, html[data-theme="midnight"] .splash-name { color: var(--ink); }

/* each look shows its own mark */
html[data-theme="midnight"] .mark-paper,
html[data-theme="midnight"] .brand-mark .mark-paper,
html[data-theme="midnight"] .splash-mark .mark-paper { display: none; }
html[data-theme="midnight"] .mark-midnight,
html[data-theme="midnight"] .brand-mark .mark-midnight,
html[data-theme="midnight"] .splash-mark .mark-midnight { display: block; }
html[data-theme="midnight"] .splash-mark::after { border-color: rgba(232, 169, 161, .45); }
html[data-theme="midnight"] .splash-mark svg { box-shadow: none; }

/* ---------- text sitting on the rose accent ---------- */
html[data-theme="midnight"] .btn,
html[data-theme="midnight"] .btn-primary,
html[data-theme="midnight"] .btn-accent,
html[data-theme="midnight"] .chip.selected,
html[data-theme="midnight"] .pp-chip.on,
html[data-theme="midnight"] .urgent,
html[data-theme="midnight"] .urgent h1,
html[data-theme="midnight"] .tile.hot .tile-v,
html[data-theme="midnight"] .tile.hot .tile-k,
html[data-theme="midnight"] .profile-chip.hot,
html[data-theme="midnight"] .mc-anniv { color: var(--on-seal); }
html[data-theme="midnight"] .btn-secondary,
html[data-theme="midnight"] .btn-ghost { color: var(--seal); }
html[data-theme="midnight"] .btn-chunky { color: var(--on-seal) !important; }
html[data-theme="midnight"] .btn-chunky.alt { color: var(--seal) !important; }
@media (min-width: 960px) {
  html[data-theme="midnight"] #mainnav a.active { color: var(--on-seal); }
}
html[data-theme="midnight"] .btn-danger { border-color: #6b3a4a; box-shadow: 0 4px 0 #6b3a4a; }

/* ---------- lines, borders and fills paper hard-codes ---------- */
html[data-theme="midnight"] .list-row:hover,
html[data-theme="midnight"] .weekly-card:hover { background: #252f55; }
html[data-theme="midnight"] .hint-row { border-color: #2b3560; }
html[data-theme="midnight"] ::placeholder { color: #8f89a8; }
html[data-theme="midnight"] .modal-overlay { background: rgba(5, 8, 20, .65); }
html[data-theme="midnight"] .toast { background: var(--ink); color: #141b34; }
html[data-theme="midnight"] .reco-banner.rose { border-color: #5a3d55; }
html[data-theme="midnight"] .reco-banner.good { color: var(--good); border-color: #2f5a48; }
html[data-theme="midnight"] .partner-banner { border-color: #5a3d55; }
html[data-theme="midnight"] .paper-text .pt-row + .pt-row { border-top-color: #2b3560; }
html[data-theme="midnight"] .tile.add { border-color: #4a5684; }
html[data-theme="midnight"] .hint-stk .hs-art { background: #283258; }
html[data-theme="midnight"] .hint-stk .hs-cap,
html[data-theme="midnight"] .hand { color: var(--ink-2); }

/* the envelope, the lined letter and the seal (a moon here) */
html[data-theme="midnight"] .paper-env { box-shadow: 0 4px 0 #0b1024; }
html[data-theme="midnight"] .paper-env::before {
  background: linear-gradient(to bottom right, transparent 49.5%, #323d68 50%) left / 50% 100% no-repeat,
              linear-gradient(to bottom left, transparent 49.5%, #323d68 50%) right / 50% 100% no-repeat;
}
html[data-theme="midnight"] .paper-letter {
  background-image: repeating-linear-gradient(var(--card) 0 27px, #2b3560 27px 28px);
}
html[data-theme="midnight"] .paper-seal {
  background: radial-gradient(circle at 35% 35%, #fff8e8, #d8c9a6);
  color: #141b34; box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
}

/* the gift persona badge: a dusk card with a rose edge instead of
   cream text on a rose gradient (which would be unreadable) */
html[data-theme="midnight"] .persona-badge {
  background: linear-gradient(135deg, #2c2752, #3a2a4e);
  border: 1.5px solid var(--seal); box-shadow: 0 4px 0 #0b1024;
}
html[data-theme="midnight"] .persona-badge,
html[data-theme="midnight"] .persona-badge p,
html[data-theme="midnight"] .persona-badge .pb-name { color: var(--ink); }

/* the look picker's own swatches keep their real colours in either look */
html[data-theme="midnight"] .look-prev.midnight { box-shadow: inset 0 0 0 1px #34406a; }

/* segmented controls: the selected half is solid rose, like a selected chip
   (a dusk pill on a dusk track was too close to tell apart) */
html[data-theme="midnight"] .seg button.on,
html[data-theme="midnight"] .seg a.on,
html[data-theme="midnight"] .seg-toggle button.active { background: var(--seal); color: var(--on-seal); box-shadow: none; }
