/* ============================================================
   MuADMINS - css/skin-dark.css (owner 2026-11-14, P14)
   The dark skin: a night version of the same site. Chosen in the weather menu (js/season.js, "Dark skin"), kept in
   this browser (localStorage muaSkin = 'dark') and set before the first paint by the early script in
   includes/head.php as html[data-skin="dark"]. Light stays the default for everyone; nothing follows
   prefers-color-scheme. Every rule here is scoped under that attribute, so without it this file does nothing.
   Loaded after the page CSS and the admin theme (<style id="mu-theme">). The text was already light on the blue
   sky, so the work is: the sea and the sky at night, the glass a deeper navy, the solid azure boxes (menus,
   dialogs, the phone menu, sticky cells) a dark navy. The sea, the ring and the page-change wave keep their shape and
   motion; only the light changes. Contrast (WCAG 2): body text #d6e2f5 on the solid #0f2552 about 12:1, secondary
   #b4c6e4 about 9:1, links #9fe6ff about 11:1; on the dark glass over the night sea all text tiers stay above 7:1.
   Roll back = remove the link in includes/head.php (the attribute alone then changes nothing).
   ============================================================ */

/* ── 1. Tokens: the same names as css/mugps-pro.css 1 and 15 and css/main.css, night values ── */
html:root[data-skin="dark"] {
  --mx-ink: #ffffff; --mx-head: #ffffff;
  --mx-text: #d6e2f5; --mx-dim: #b4c6e4; --mx-label: #a9c8f5; --mx-label-sky: #bcd6fb;
  --mx-accent: #8fdcff; --mx-accent-h: #ffffff; --mx-accent-fill: #d6ebff;
  --mx-link: #9fe6ff; --mx-icon: #9fd6ff; --mx-on: #0b3f9c;
  --mx-accent-soft: rgba(143, 220, 255, .08);
  --mx-panel: rgba(9, 24, 60, .62); --mx-panel-h: rgba(13, 32, 76, .72);
  --mx-frost: rgba(255, 255, 255, .05);
  --mx-solid: #0f2552;
  --mx-field: rgba(3, 12, 34, .62);
  --mx-line: rgba(150, 185, 240, .18); --mx-line-2: rgba(160, 195, 245, .3);
  --mx-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 34px -24px rgba(0, 0, 0, .75);
  --mx-shadow-h: inset 0 1px 0 rgba(255, 255, 255, .1), 0 20px 40px -24px rgba(0, 0, 0, .8);
  --mx-code-bg: rgba(0, 6, 24, .55); --mx-ok-bg: rgba(0, 14, 34, .6); --mx-good-bg: rgba(0, 14, 34, .5);
  --mx-gold-bg: rgba(60, 36, 0, .3); --mx-bad-bg: rgba(70, 10, 0, .3);
  --mx-lead: #e4ecfa;
  --mx-head-glow: 0 0 24px rgba(90, 150, 255, .3);
  --mx-band-bg: radial-gradient(55% 140% at 100% 0%, rgba(120, 180, 255, .08), rgba(120, 180, 255, 0) 70%),
    radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0) 62%), var(--mx-panel);
  --mx-band-line: rgba(150, 185, 240, .22);
  --mx-band-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 26px 50px -34px rgba(0, 0, 0, .8);
  --mx-tile-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), var(--mx-shadow);
  --mx-rule: rgba(143, 220, 255, .3); --mx-divide: rgba(150, 185, 240, .14); --mx-quote-bg: rgba(134, 239, 172, .05);
  /* the older names (css/main.css, the admin theme, css/content.css pages) */
  --text: #ffffff; --text-dim: #c9d8f0; --text-muted: #a9bddc;
  --blue: #8fdcff; --blue-bright: #ffffff; --accent: #8fdcff; --cyan: #8fdcff;
  --border: rgba(160, 195, 245, .18); --border-hover: rgba(170, 205, 250, .34); --border-blue: rgba(160, 195, 245, .28); --border-cyan: rgba(143, 220, 255, .3);
  --bg: #071a3e; --bg-mid: #0a2048; --bg-deep: #061633; --bg-panel: #0f2552; --bg-glass: rgba(9, 24, 60, .62);
  --bg-item: rgba(255, 255, 255, .05); --bg-item-h: rgba(255, 255, 255, .08);
  --atmo-2: rgba(10, 30, 76, .55); --atmo-deep: #040f28; --atmo-mid: #0a2150;
  color-scheme: dark;
}

/* ── 2. The sea and the sky at night ── */
/* the living sea (js/ocean.js) keeps its waves, rays and sand: one fixed moonlight layer multiplies it darker and bluer
   (the warm sun rays turn a cool moonlight, the sand a dusk grey); the canvas steps one layer down for it */
html[data-skin="dark"].ocean-on #oceanBg { z-index: -2; }
html[data-skin="dark"].ocean-on::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(180deg, #34487e 0%, #3a5088 55%, #48577e 100%);
}
html[data-skin="dark"].ocean-on { background: #061434; }
/* the sunny weather (js/season.js) is a warm soft light over the page: at night only a hint of it */
html[data-skin="dark"] .mua-wx-sun.on { opacity: .35; }
html[data-skin="dark"] body { background: #061636 !important; }
html[data-skin="dark"].ocean-on body, html[data-skin="dark"].mw-wave body { background: transparent !important; }
/* the old sky (no graphics card): the same gradient, at night */
html[data-skin="dark"] .bg-atmo { background: linear-gradient(180deg, #030b1f 0%, #051333 30%, #081c48 62%, #0a2252 100%) !important; }
html[data-skin="dark"] .bg-horizon::before { box-shadow: 0 0 0 1px rgba(160, 195, 245, .1), 0 -18px 60px 0 rgba(90, 140, 220, .05); }
/* until the sea is drawn after a page change: the same sea picture, at night (never a flat colour) */
html[data-skin="dark"].mw-wave { background: linear-gradient(180deg, #0b2a52 0, #08204a 28%, #061a40 55%, #051536 78%, #3a3020 84%, #4a3d28 100%) fixed; }
html[data-skin="dark"] ::selection { background: rgba(143, 220, 255, .3); color: #fff; }

/* ── 3. Top bar, menus, phone menu ── */
html[data-skin="dark"] .mx-nav.mx-solid, html[data-skin="dark"] .mx-nav.menu-open { background: rgba(8, 22, 54, .97); border-bottom-color: rgba(160, 195, 245, .16); box-shadow: 0 12px 30px -24px rgba(0, 0, 0, .8); }
html[data-skin="dark"] .mx-nav.menu-open, html[data-skin="dark"] .mx-menu { background: #0b1f48; }
@media (min-width: 961px) { html[data-skin="dark"] .mx-menu { background: none; } }
/* the top-bar dropdowns and the search suggestions (light azure #2a69d2 in the light skin); their near-white text tiers stay */
html[data-skin="dark"] .mx-drop, html[data-skin="dark"] .ring-suggestions { background: #0f2552; border-color: rgba(160, 195, 245, .26); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 26px 56px -28px rgba(0, 0, 0, .85); }

/* ── 4. The search box of the main page (the ring itself stays) ── */
html[data-skin="dark"] .ring-search-box { background: linear-gradient(180deg, rgba(14, 38, 92, .72), rgba(10, 30, 76, .7)); border-color: rgba(170, 205, 250, .36); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 40px -26px rgba(0, 0, 0, .8); }
html[data-skin="dark"] .ring-search-box:focus-within { background: linear-gradient(180deg, rgba(18, 46, 106, .8), rgba(12, 36, 88, .78)); border-color: rgba(190, 220, 255, .6); }
@media (max-width: 760px) { html[data-skin="dark"] .ring-search-box { background: rgba(10, 30, 76, .94); } }
html[data-skin="dark"] #homeResults .hs-rail .hs-panel { background: #0f2552; }

/* ── 5. Boxes with their own solid azure ── */
html[data-skin="dark"] .asi-body { background: #081a40; }
html[data-skin="dark"] .mw-r-btn { background: rgba(14, 36, 88, .86); border-color: rgba(170, 205, 250, .4); }
html[data-skin="dark"] .mw-r-btn:hover, html[data-skin="dark"] .mw-r-btn:focus-visible { background: #fff; color: #0b3f9c; }
html[data-skin="dark"] .mw-eq i { background: #8fdcff; }
html[data-skin="dark"] .mw-r-btn:hover .mw-eq i, html[data-skin="dark"] .mw-r-btn:focus-visible .mw-eq i { background: #1d56c4; }
html[data-skin="dark"] .mw-r-panel { background: #0f2552; border-color: rgba(160, 195, 245, .26); }
html[data-skin="dark"] .mw-r-l select { background: rgba(3, 12, 34, .6); }
html[data-skin="dark"] .mx-tpl { background: linear-gradient(165deg, rgba(10, 30, 80, .6), rgba(9, 24, 60, .5)); }
html[data-skin="dark"] .mu-auth-modal, html[data-skin="dark"] .ent-overlay, html[data-skin="dark"] .sh-overlay { background: rgba(0, 6, 20, .6); }
