/* ============================================================
   terminal.css — the "Terminal" design layer (v2.0.0 port)

   Ported from the owner-approved redesign (sandbox tag v2.0.0,
   site11/ build). Loads AFTER style.css and overrides it by
   cascade order — style.css stays underneath untouched, so the
   old design remains one file-delete away.

   What this layer does, site-wide:
   - JetBrains Mono everywhere (via the --ml-font token override)
   - near-square corners, blueprint grid backdrop
   - "> " prompt headings, left-aligned section titles
   - home: command bar + About/Support cards
   - projects/mods: readout cells with colored left edges
   ============================================================ */

/* ------------------------------------------------------------
   PART 1 — Terminal language (was style7.css in the sandbox)
   ------------------------------------------------------------ */

:root {
  --ml-font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ml-radius-sm: 2px;
  --ml-radius: 4px;
  --ml-radius-lg: 6px;
  --ml-blue-soft: rgba(0, 99, 247, 0.10);
  --ml-shadow-sm: none;
  --ml-shadow-md: none;
}

/* Blueprint grid backdrop */
body {
  background-color: #050608;
  background-image:
    linear-gradient(rgba(77, 150, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 150, 255, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  background-attachment: fixed;
  font-size: 0.93rem;
}

/* Nav: JetBrains Mono is wider than Nunito, so the links wrap onto two
   lines at desktop width. Tighten the injected 2rem gap and keep each
   link on one line — the rest of the design is untouched. */
@media (min-width: 992px) {
  .navbar .nav-item { padding-left: 1.1rem; }
  .navbar .nav-link { white-space: nowrap; font-size: 0.92rem; }
}

/* Headings become prompt lines */
.ml-h2-visual {
  font-size: 1.5rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.ml-h2-visual::before {
  content: "> ";
  color: var(--ml-blue-hi);
  font-weight: 600;
}

/* Status boxes become readouts with a hard left edge */
.status-box {
  border-left: 3px solid var(--ml-blue-hi);
  text-align: left;
}
.status-box h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.offline-badge { border-radius: 2px; font-size: 0.78rem; }

/* Section headers centered → left-aligned to match the prompt style */
h2.text-center.ml-h2-visual { text-align: left !important; }
h2.text-center.ml-h2-visual::before { content: "## "; }

/* Command bar (channel strip as a terminal prompt) */
.ml-channel-strip {
  background: var(--ml-surface);
  border: 1px solid var(--ml-border-hi);
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
  margin: 0 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.ml-channel-avatar {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  border: 1px solid var(--ml-border-hi);
  flex: 0 0 auto;
}
.ml-channel-info { display: flex; flex-direction: column; min-width: 0; }
.ml-channel-name { font-weight: 600; font-size: 1.05rem; }
.ml-channel-name::before { content: "mana@moddedmana:~$ "; color: var(--ml-blue-hi); font-weight: 600; }
.ml-channel-tag { color: var(--ml-text-dim); font-size: 0.88rem; }
.ml-channel-tag::before { content: "# "; }
.ml-channel-actions { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ml-channel-actions .btn { border-radius: 3px; font-weight: 600; font-size: 0.85rem; }
@media (max-width: 820px) {
  .ml-channel-actions { margin-left: 58px; }
}

/* Fix the screenshot-1 dead space: upcoming video fills the card */
.video-row .upcoming-video-container {
  max-width: none;
  flex: 1 1 auto;
}
.video-row {
  border: 1px solid var(--ml-border);
}

/* Hero row (upcoming livestream, or the Latest Video fallback): the
   single card fills the whole row */
.ml-hero-row .video-container {
  max-width: none;
  flex: 1 1 auto;
}

/* Patreon: red block, white mono label. Review item #4 (2026-11-12):
   - style.css' `a.btn` rule (specificity 0,1,1) beats a bare `.ml-btn-patreon`
     color declaration, which is why the label rendered #dee2e6 (2.62:1) —
     re-state white at matching specificity; this file loads last, so it wins.
   - The red itself was darkened from Patreon's #FF424D to #D93A44: even pure
     white on #FF424D is only ~3.4:1, below the 4.5:1 small-text threshold.
     #D93A44 with white text is 4.5:1. Hover goes darker, not lighter. */
.ml-btn-patreon {
  background: #D93A44;
  border: 1px solid #D93A44;
  color: #fff;
  font-weight: 600;
  border-radius: 3px;
}
a.ml-btn-patreon,
a.ml-btn-patreon:hover,
a.ml-btn-patreon:focus-visible {
  color: #fff;
}
.ml-btn-patreon:hover,
.ml-btn-patreon:focus-visible {
  background: #C93340;
  border-color: #C93340;
  color: #fff;
}

/* Thumbnails: blue frame on hover */
.iframe-wrapper { border-radius: 4px; }
.iframe-wrapper:hover { border-color: var(--ml-blue-hi); }

/* Muted paragraph helper (replaces the inline styles the sandbox used) */
.ml-muted { color: var(--ml-text-muted); }

/* ------------------------------------------------------------
   PART 2 — Home About/Support cards (was style11.css)
   ------------------------------------------------------------ */

.ml-soft-card {
  background: var(--ml-surface);
  border: 1px solid var(--ml-border);
  border-left: 3px solid var(--ml-blue-hi);
  border-radius: 4px;
  padding: 1.2rem 1.3rem;
}

/* Card headings: keep the "> " prompt, slightly smaller than sections */
.ml-soft-card .ml-h2-visual {
  font-size: 1.45rem !important;
  margin-bottom: 0.9rem;
}

/* Support card: subtle red edge to match the Patreon button
   (kept in sync with the darkened ml-btn-patreon red, review #4) */
.ml-support-card {
  border-left-color: #D93A44;
}

/* Standalone 404 page (spicy/404.php) — mono log lines above the prompt h1 */
.ml-404-code {
  font-family: var(--ml-font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

/* Patreon button gets a full-width rhythm inside the card */
.ml-soft-card .ml-btn-patreon {
  border-radius: 3px;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}

/* ------------------------------------------------------------
   PART 3 — shared additions (was site11.css)
   ------------------------------------------------------------ */

/* --- About card with the real YouTube channel avatar --- */
.ml-about2 { display: flex; gap: 1.2rem; align-items: flex-start; }
.ml-about2-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--ml-blue-hi);
  box-shadow: 0 0 26px rgba(0, 99, 247, 0.3);
  background: var(--ml-surface-2);
  flex: 0 0 auto;
}
.ml-about2-name { font-weight: 700; font-size: 1.05rem; }
.ml-about2-handle {
  font-family: var(--ml-font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ml-text-dim);
  margin-left: 0.4rem;
}
@media (max-width: 480px) {
  .ml-about2 { flex-direction: column; }
}

/* --- Subpage polish so every page reads Terminal, not just home --- */

/* Page headings get the prompt treatment with a little less size */
.page-heading .ml-h2-visual, main > h1, h1:not(.visually-hidden) {
  font-size: 1.5rem;
}

/* Data tables (trackers): mono headers, terminal row rules */
table {
  font-size: 0.9rem;
}
.table > :not(caption) > * > * {
  font-family: var(--ml-font);
}
thead th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

/* Square off any Bootstrap card remnants on subpages */
.card {
  border-radius: 4px;
  border-color: var(--ml-border);
  background: var(--ml-surface);
}

/* Home: keep long video titles aligned in rows */
.video-row .upcoming-video-container { max-width: none; flex: 1 1 auto; }

/* ------------------------------------------------------------
   PROJECTS + MODS — make the subpages speak the home language
   (both pages share the .projects-page wrapper, so everything
   here is scoped to it; mods.php keeps .player-count neutral
   for version strings, colors come from type/game classes)
   ------------------------------------------------------------ */

/* H1 becomes a prompt, left-aligned like home headings */
.projects-page h1 {
  text-align: left;
  font-size: 1.5rem;
  margin-bottom: 1.75rem;
}
.projects-page h1::before {
  content: "> ";
  color: var(--ml-blue-hi);
}

/* Card headings: mono, small, uppercase — like status boxes */
.projects-page h2 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ml-text-dim);
  margin-bottom: 0.9rem;
}
.projects-page h2::before {
  content: "> ";
  color: var(--ml-blue-hi);
}

/* List rows become readout cells: bordered, with a type-colored
   left edge. projects.php grids to two per line (ml-two-col);
   mods.php keeps one per line for the wider download rows. */
.projects-page .game-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}
.projects-page .game-item {
  border: 1px solid var(--ml-border);
  border-left: 3px solid var(--ml-border-hi);
  padding: 0.85rem 1rem;
  margin: 0 0 0.75rem;
  transition: background-color 0.12s ease;
}
.projects-page .game-item:last-child { margin-bottom: 0; }
.projects-page .game-item:hover { background: var(--ml-surface-2); }

/* Game-colored edges on mods.php — one color per game, picked
   by Mana. Purple/green reuse the projects palette; red matches
   the established Patreon red. */
.projects-page .ml-game-elderfield .game-item  { border-left-color: #A98BFF; }
.projects-page .ml-game-lookoutside .game-item { border-left-color: #FF424D; }
.projects-page .ml-game-wow .game-item         { border-left-color: #4ADE80; }

/* Type edges — vivid like the home blue, not the old chip tones */
.projects-page .ml-type-tool    { border-left-color: var(--ml-blue-hi); }
.projects-page .ml-type-tracker { border-left-color: #A98BFF; }
.projects-page .ml-type-mods    { border-left-color: #4ADE80; }

/* Two per line where marked */
.projects-page .ml-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.projects-page .ml-two-col .game-item { margin-bottom: 0; }
@media (max-width: 760px) {
  .projects-page .ml-two-col { grid-template-columns: 1fr; }
}

/* Chips: mono + squared. Neutral default — mods.php uses
   .player-count for version strings; projects.php dropped its
   labels in favor of the type-colored left edges above. */
.projects-page .player-count {
  font-family: var(--ml-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 0.22rem 0.55rem;
}

/* Buttons squared off like the rest of the terminal */
.projects-page .btn { border-radius: 4px; }
.projects-page .btn-sm { font-size: 0.85rem; }

/* mod-meta lines read like log output */
.projects-page .mod-meta {
  font-family: var(--ml-font-mono);
  font-size: 0.78rem;
  color: var(--ml-text-dim);
}

/* Auth + account pages (/users/...): their core views carry no top spacing,
   so content sat flush against the sticky nav (forgot_password etc.).
   Tagged once in header.php; the gap matches the tool pages' 2rem. */
body.ml-auth-page .ml-page-container {
  padding-top: 2rem;
}
/* Bootstrap 5 dropped the .form-group class the UserSpice core auth views
   still use, so stacked fields lost their bottom margin (the Reset button
   sat against the email input on forgot_password). */
body.ml-auth-page .form-group {
  margin-bottom: 1rem;
}

/* Readout-row sizing pass (2026-11-12 owner feedback, calibrated): the rows
   read too small and the game headings too dull — but the first bump read
   too big next to the command bar, so this is the half-step back. The three
   text lines each go up ~0.05-0.1rem, headings get size + brightness, and
   the action buttons get a modest bump so the 48px WoW emblem can hold
   25px without looking cramped.
   NOTE: the h2 bump applies to the Projects page section headings too —
   same heading role, kept consistent on purpose. */
.projects-page h2 {
  font-size: 1.05rem;
  color: var(--ml-text);
}
.projects-page .mod-title a { font-size: 1.15rem; }
.projects-page .mod-desc { font-size: 0.9rem; }
.projects-page .mod-meta { font-size: 0.85rem; }
.projects-page .mod-title .player-count { font-size: 0.8rem; }

/* Action column: the two stacked buttons share one width (the wider one
   wins — "Download · 12 KB" vs "View on Steam" no longer have mismatched
   left edges), content centered, both the same height sized to the icon. */
.projects-page .mod-actions { align-items: stretch; }
.projects-page .mod-actions .btn-mana-save,
.projects-page .mod-actions .mod-store {
  /* Bootstrap .btn is inline-block — make it a flex so the label centers
     vertically inside the min-height instead of hugging the top. */
  display: inline-flex;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  min-height: 38px;
  align-items: center;
  justify-content: center;
}
/* Store icons at 25px (steam.svg is vector; wow.png ships at 48px so it
   stays sharp). CSS wins over the 15px width/height attributes. */
.projects-page .project-card .mod-store img {
  width: 25px;
  height: 25px;
}

/* The command bar sits a little tighter on subpages */
.projects-page .ml-channel-strip { margin-bottom: 2.25rem; }

/* ------------------------------------------------------------
   TOOL PAGES (patcher.php, rpgmaker.php, youtube-tool.php, emoji.php)
   — Terminal chrome. Same prompt h1 as projects/mods, but deliberately
   WITHOUT the .projects-page h2/button restyle: these pages embed
   vendored third-party tools or app internals (#ml-rom-shell,
   #ml-rpg-shell, .emoji-panel h2s) that style their own internal h2s.
   Only the page-level chrome is Terminal here.
   ------------------------------------------------------------ */
.ml-tool-page {
  /* Same top gap below the sticky nav as .projects-page (style.css
     margin-top: 2rem). Without it the command bar sat flush against the
     nav on patcher/rpgmaker/youtube-tool/emoji (2026-11-12). */
  margin-top: 2rem;
}
.ml-tool-page h1 {
  text-align: left;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.ml-tool-page h1::before {
  content: "> ";
  color: var(--ml-blue-hi);
}
.ml-tool-page .ml-channel-strip { margin-bottom: 2.25rem; }

/* YouTube Tool (2026-11-12, owner feedback): only the page heading + intro
   line are left; the inner blocks (form, label, "gives" list, examples,
   accepted-formats) keep style.css' centered 560px cap — an earlier pass
   left-aligned them and the owner preferred the centered look back. */
.ml-tool-page .yt-tool {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Tool pages whose card is capped at 760px: the page heading + intro now sit
   OUTSIDE the card (2026-11-14 owner feedback — headings match projects/mods
   instead of living inside the tool box). .ml-tool-head caps the heading
   column to the card width so the left edges align; #ml-itch-shell gets the
   same cap so the itch tool keeps its old narrow centred column. */
.ml-tool-head {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.ml-tool-page #ml-itch-shell {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* RPG Maker decrypter polish (2026-11-12 owner feedback):
   - "File-List" is a column heading and must sit at the TOP of its column —
     the global #ml-rpg-shell h2 rule (margin-top: 1.5em, sized off the big
     heading font) pushed it ~45px down, leaving the dead gap above it.
   - The language bar had a filled pill background + padding, so it read as a
     full-width bar welded onto the tab row below. As a quiet right-aligned
     utility row it separates cleanly from the tabs. */
#ml-rpg-shell .fileList h2 {
  margin-top: 0;
}
#ml-rpg-shell .head-bar {
  background: transparent;
  padding: 0 4px 0 0;
  margin-bottom: 12px;
  color: var(--ml-text-muted);
}
#ml-rpg-shell .head-bar a {
  color: var(--ml-blue-hi);
}

/* Tab row moved OUTSIDE the content box (2026-11-14 owner trial): the tabs
   form the top edge of the card and the language select sits right-aligned
   on the same line. #ml-rpg-shell now wraps both the row and the card, so
   the shell-scoped tab/head-bar/dropdown rules keep applying. ID-bearing
   selectors below outrank the older shell-scoped rules they adjust. */
.ml-rpg-headrow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
#ml-rpg-shell .ml-rpg-headrow .head-bar {
  /* was a full-width bar inside the card; now a quiet right-aligned label
     bottom-aligned with the tab text (tabs carry 8px bottom padding) */
  margin-bottom: 0;
  padding: 0 2px 10px;
}
#ml-rpg-shell .ml-rpg-headrow #language-selection-list-container {
  /* the switcher shrank to its content width in the flex row; give the
     dropdown a fixed anchor width so the language list can't clip */
  left: auto;
  width: 280px;
}
#ml-rpg-shell > .ml-rpg-card {
  /* the headrow's border-bottom is now the box's top edge — the card drops
     its own top border + top corners so there is no double line under the
     tabs (owner feedback, 2026-11-14). Side borders + lower corners keep
     the card look. */
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* ------------------------------------------------------------
   EMOJI PAGE INTERNAL HEADING COLORS (2026-11-14 owner feedback):
   "RECENT" (.emoji-panel-head h2) and the category strips
   ("SMILEYS & EMOTION" etc., .category h2) were cyan/purple via
   style.css's --ml-mana-blue / --ml-mana-purple — inconsistent with
   the rest of the Terminal chrome. Quieted to the standard dim
   uppercase the projects-page h2s use. Page h1 accent unchanged.
   ------------------------------------------------------------ */
.emoji-panel-head h2 {
  color: var(--ml-text-dim);
}
.category h2 {
  color: var(--ml-text-dim);
}

/* ------------------------------------------------------------
   ROM PATCHER "Powered by Rom Patcher JS" badge (2026-11-14 owner
   feedback: barely visible). The vendored rom-patcher/style.css fades
   the link to opacity .25 / color #cce. Page-level override keyed off
   #ml-rom-shell (+1 id of specificity — vendored file untouched).
   ------------------------------------------------------------ */
#ml-rom-shell #rom-patcher-powered a {
  color: var(--ml-text-muted);
  opacity: 1;
}
#ml-rom-shell #rom-patcher-powered a:hover {
  color: var(--ml-blue-hi);
}

/* ------------------------------------------------------------
   RGSSAD ARCHIVE VIEWER (2026-11-14, §14.8): new hosted tool page
   (rgssad-viewer.php) for RPG Maker XP/VX archives. The vendored
   Svelte app is DOM-injected — its dist/index.html chrome is NOT
   used, because that chrome is site-global (:root palette vars,
   html/body 100% sizing, Roboto @font-face). This shell supplies
   the app's chrome scoped to #ml-rgssad-shell instead:
   - the app's --color-1..5 custom properties are defined HERE and
     remapped to the Terminal palette (they only cascade inside the
     shell, so the site is untouched and the tool is re-themed);
   - #app gets its mount layout (the app expects a bounded flex
     container, its index.html gave it the full viewport);
   - the drop zone's vendored white dashed border/text is recoloured
     to Terminal blue/dim (id-bearing selectors outrank the vendored
     .input-label.svelte rule; vendored files stay untouched).
   The app inherits the site's JetBrains Mono (it never sets its own
   font-family outside the unused html rule), so the Roboto .ttf is
   deliberately not shipped.
   ------------------------------------------------------------ */
#ml-rgssad-shell {
  --color-1: transparent;            /* app page bg      -> card body */
  --color-2: var(--ml-surface-2);    /* panels           */
  --color-3: var(--ml-surface-3);    /* hover state      */
  --color-4: var(--ml-text-faint);
  --color-5: var(--ml-offline);      /* error red        */
  display: flex;
  height: clamp(480px, 68vh, 720px);
  margin-top: 4px;
}
#ml-rgssad-shell #app {
  flex-grow: 1;
  display: flex;
  width: 100%;
  min-width: 0;
  color: var(--ml-text);
}
#ml-rgssad-shell .input-label {
  border-color: var(--ml-blue-hi);
  color: var(--ml-text-muted);
}
#ml-rgssad-shell .input-label:hover {
  color: var(--ml-text);
}
#ml-rgssad-shell #app h1 {
  /* the vendored app paints its own "RGSSAD Online Viewer" heading above the
     drop zone; it duplicates the page's h1, so it's simply removed (owner:
     "do we even need that heading?", 2026-11-14). No external copy is
     rendered — the page heading outside the card is the only title. */
  display: none;
}
.ml-rgssad-credits {
  margin-top: 10px;
  color: var(--ml-text-muted);
  font-size: 0.85rem;
}
.ml-rgssad-credits a {
  color: var(--ml-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ml-rgssad-credits a:hover {
  color: var(--ml-blue-hi);
}

/* ------------------------------------------------------------
   RPG MAKER SAVE EDITOR (2026-11-14, §14.9): new hosted tool page
   (save-editor.php) for MV .rpgsave / MZ .rmmzsave files. The app
   is custom vanilla JS (usersc/assets/save-editor/save-editor.js)
   that paints its own chrome into #ml-save-shell, so every rule
   here is scoped to that shell — nothing leaks site-wide.
   ------------------------------------------------------------ */
#ml-save-shell {
  color: var(--ml-text);
  font-size: 0.92rem;
}
#ml-save-shell .se-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 2px 0 8px;
}
#ml-save-shell .se-flex {
  flex: 1;
}
#ml-save-shell .se-file-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
#ml-save-shell .se-format {
  color: var(--ml-blue-hi);
  border: 1px solid var(--ml-blue-hi);
  border-radius: 3px;
  padding: 0 6px;
  font-size: 0.78rem;
  white-space: nowrap;
}
#ml-save-shell .se-size {
  color: var(--ml-text-faint);
  white-space: nowrap;
}
#ml-save-shell .se-dirty {
  color: var(--ml-mana-blue);
  font-size: 0.8rem;
}
#ml-save-shell .se-verify {
  font-size: 0.8rem;
}
#ml-save-shell .se-verify.se-ok {
  color: #59d499;
}
#ml-save-shell .se-verify.se-bad {
  color: var(--ml-offline);
}
#ml-save-shell .se-btn,
#ml-save-shell .se-chipbtn {
  background: var(--ml-surface-2);
  color: var(--ml-text);
  border: 1px solid var(--ml-surface-3);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}
#ml-save-shell .se-btn:hover:not(:disabled),
#ml-save-shell .se-chipbtn:hover {
  border-color: var(--ml-blue-hi);
  color: var(--ml-blue-hi);
}
#ml-save-shell .se-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#ml-save-shell .se-status {
  min-height: 20px;
  margin-bottom: 8px;
  color: var(--ml-text-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
#ml-save-shell .se-status.se-ok {
  color: #59d499;
}
#ml-save-shell .se-status.se-err {
  color: var(--ml-offline);
}

/* drop zone / empty state */
#ml-save-shell .se-drop {
  border: 2px dashed var(--ml-surface-3);
  border-radius: 6px;
  padding: 30px 16px 22px;
  text-align: center;
  background: var(--ml-surface);
}
#ml-save-shell.se-drag .se-drop,
#ml-save-shell .se-drop:hover {
  border-color: var(--ml-blue-hi);
}
#ml-save-shell .se-drop-title {
  margin-bottom: 2px;
  color: var(--ml-text);
}
#ml-save-shell .se-drop-sub {
  color: var(--ml-text-faint);
  font-size: 0.82rem;
  margin-bottom: 14px;
}
#ml-save-shell .se-samples {
  color: var(--ml-text-muted);
  font-size: 0.85rem;
  margin: 25px 0 0;
}
#ml-save-shell .se-samples a,
#ml-save-shell a.se-sample {
  color: var(--ml-blue-hi);
}

/* tabs */
#ml-save-shell .se-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}
#ml-save-shell .se-tab {
  background: transparent;
  border: 1px solid var(--ml-surface-3);
  color: var(--ml-text-muted);
  border-radius: 4px;
  padding: 3px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}
#ml-save-shell .se-tab:hover {
  color: var(--ml-text);
  border-color: var(--ml-text-faint);
}
#ml-save-shell .se-tab.se-active {
  color: var(--ml-blue-hi);
  border-color: var(--ml-blue-hi);
}

/* tree */
#ml-save-shell .se-tree-holder {
  max-height: 62vh;
  overflow: auto;
  background: var(--ml-surface);
  border: 1px solid var(--ml-surface-3);
  border-radius: 4px;
  padding: 8px 10px;
}
#ml-save-shell .se-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 1px 2px;
  min-height: 22px;
}
#ml-save-shell .se-node {
  padding-left: 16px;
}
#ml-save-shell .se-tree > .se-node {
  padding-left: 0;
}
#ml-save-shell .se-tog {
  background: none;
  border: none;
  color: var(--ml-text-faint);
  cursor: pointer;
  padding: 0 2px;
  width: 16px;
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1;
}
#ml-save-shell .se-tog:hover {
  color: var(--ml-blue-hi);
}
#ml-save-shell .se-dot {
  width: 16px;
  text-align: center;
  color: var(--ml-text-faint);
}
#ml-save-shell .se-key {
  color: var(--ml-text);
}
#ml-save-shell .se-colon {
  color: var(--ml-text-faint);
}
#ml-save-shell .se-class {
  color: var(--ml-mana-blue);
  border: 1px solid transparent;
  border-radius: 3px;
  background: rgba(51, 194, 255, 0.08);
  padding: 0 5px;
  font-size: 0.75rem;
}
#ml-save-shell .se-type {
  color: var(--ml-text-faint);
  font-size: 0.75rem;
}
#ml-save-shell .se-val {
  color: var(--ml-blue-hi);
  cursor: text;
  overflow-wrap: anywhere;
}
#ml-save-shell .se-val.se-t-string {
  color: var(--ml-mana-blue);
}
#ml-save-shell .se-val.se-t-null {
  color: var(--ml-text-faint);
  font-style: italic;
}
#ml-save-shell .se-val.se-ref {
  color: var(--ml-text-faint);
  cursor: default;
}
#ml-save-shell .se-val.se-editing {
  cursor: default;
}
#ml-save-shell .se-input {
  background: var(--ml-surface-2);
  border: 1px solid var(--ml-blue-hi);
  color: var(--ml-text);
  border-radius: 3px;
  padding: 1px 6px;
  font-family: inherit;
  font-size: 0.85rem;
  min-width: 90px;
}
#ml-save-shell .se-input:focus {
  outline: none;
  border-color: var(--ml-blue-hi);
}
#ml-save-shell .se-input-key {
  min-width: 140px;
}
#ml-save-shell .se-input-sm {
  min-width: 60px;
  width: 90px;
}
#ml-save-shell .se-input-check {
  min-width: 0;
  width: auto;
  accent-color: var(--ml-blue);
}
#ml-save-shell .se-act {
  background: none;
  border: none;
  color: var(--ml-text-faint);
  cursor: pointer;
  padding: 0 4px;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1;
}
#ml-save-shell .se-act:hover {
  color: var(--ml-blue-hi);
}
#ml-save-shell .se-del:hover {
  color: var(--ml-offline);
}
#ml-save-shell .se-addkey,
#ml-save-shell .se-picker {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
#ml-save-shell .se-pick {
  background: var(--ml-surface-2);
  border: 1px solid var(--ml-surface-3);
  color: var(--ml-text-muted);
  border-radius: 3px;
  padding: 1px 7px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}
#ml-save-shell .se-pick:hover {
  color: var(--ml-blue-hi);
  border-color: var(--ml-blue-hi);
}
#ml-save-shell .se-empty-kids {
  color: var(--ml-text-faint);
  font-size: 0.8rem;
  font-style: italic;
  padding: 1px 0 1px 20px;
}

/* tables (variables / switches / inventory / party) */
#ml-save-shell .se-tablebar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
#ml-save-shell .se-tablebar-note {
  color: var(--ml-text-faint);
  font-size: 0.8rem;
  margin-right: auto;
}
#ml-save-shell .se-tablebox {
  max-height: 62vh;
  overflow: auto;
}
#ml-save-shell .se-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
#ml-save-shell .se-table th {
  text-align: left;
  color: var(--ml-text-faint);
  font-weight: 600;
  border-bottom: 1px solid var(--ml-surface-3);
  padding: 4px 8px;
  white-space: nowrap;
}
#ml-save-shell .se-table td {
  border-bottom: 1px solid var(--ml-surface);
  padding: 2px 8px;
}
#ml-save-shell .se-table tbody tr:hover td {
  background: var(--ml-surface);
}
#ml-save-shell .se-idx {
  color: var(--ml-text-faint);
  white-space: nowrap;
}
#ml-save-shell .se-cellval {
  cursor: text;
}
#ml-save-shell .se-cell-act {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
#ml-save-shell .se-sub {
  color: var(--ml-blue-hi);
  font-size: 0.9rem;
  margin: 14px 0 6px;
}
#ml-save-shell .se-invblock:first-child .se-sub {
  margin-top: 0;
}
#ml-save-shell .se-addrow {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
#ml-save-shell .se-missing {
  color: var(--ml-text-faint);
  font-style: italic;
  padding: 6px 0;
}

/* overview */
#ml-save-shell .se-overview {
  max-width: 560px;
}
#ml-save-shell .se-stat {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--ml-surface-3);
  padding: 5px 2px;
}
#ml-save-shell .se-stat-k {
  color: var(--ml-text-muted);
}
#ml-save-shell .se-stat-v {
  color: var(--ml-text);
  text-align: right;
  overflow-wrap: anywhere;
}

/* credits */
.ml-save-credits {
  margin-top: 10px;
  color: var(--ml-text-muted);
  font-size: 0.85rem;
}
.ml-save-credits a {
  color: var(--ml-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ml-save-credits a:hover {
  color: var(--ml-blue-hi);
}

/* ------------------------------------------------------------
   WHISPER DRIVE — whisper-drive.php (2026-11-16)
   In-house Windows app info/download page. Static content plus a
   tiny screenshot switcher; site palette vars only, scoped to
   #ml-whisper. Synced to the ReDes sandbox css/terminal.css.
   ------------------------------------------------------------ */
#ml-whisper .wd-shotbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
#ml-whisper .wd-shotbtn {
  font-family: var(--ml-font);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ml-text-muted);
  background: var(--ml-surface-2);
  border: 1px solid var(--ml-border);
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
}
#ml-whisper .wd-shotbtn:hover {
  color: var(--ml-text);
  border-color: var(--ml-blue);
}
#ml-whisper .wd-shotbtn.active {
  color: var(--ml-text);
  background: var(--ml-surface-3);
  border-color: var(--ml-blue);
}
#ml-whisper .wd-shot {
  margin: 0;
}
#ml-whisper .wd-shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--ml-border);
  border-radius: 4px;
  background: var(--ml-surface-2);
}
#ml-whisper .wd-shot figcaption {
  color: var(--ml-text-muted);
  font-size: 0.85rem;
  margin-top: 10px;
}
#ml-whisper .wd-dl {
  border: 1px solid var(--ml-border);
  border-radius: 4px;
  background: var(--ml-surface-2);
  padding: 16px;
  margin-bottom: 14px;
}
#ml-whisper .wd-dl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
#ml-whisper .wd-dl-name {
  font-family: var(--ml-font);
  color: var(--ml-text);
}
#ml-whisper .wd-dl-size {
  color: var(--ml-text-faint);
  font-size: 0.85rem;
}
#ml-whisper .wd-dl-sum {
  font-family: var(--ml-font);
  font-size: 0.78rem;
  color: var(--ml-text-muted);
  word-break: break-all;
  overflow-wrap: anywhere;
  background: var(--ml-bg);
  border: 1px solid var(--ml-border);
  border-radius: 4px;
  padding: 8px 10px;
  margin: 8px 0 0;
}
#ml-whisper .wd-note {
  color: var(--ml-text-muted);
  font-size: 0.87rem;
}
#ml-whisper .wd-note code {
  font-family: var(--ml-font);
  color: var(--ml-text);
  background: var(--ml-bg);
  border: 1px solid var(--ml-border);
  border-radius: 3px;
  padding: 1px 5px;
}
#ml-whisper .wd-lead {
  color: var(--ml-text);
  font-size: 1.02rem;
}
#ml-whisper .wd-group p {
  margin: 0;
  color: var(--ml-text-muted);
  font-size: 0.9rem;
}
#ml-whisper .wd-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}
@media (max-width: 767.98px) {
  #ml-whisper .wd-groups {
    grid-template-columns: 1fr;
  }
}
#ml-whisper .wd-group h3 {
  font-family: var(--ml-font);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ml-mana-blue);
  margin-bottom: 8px;
}
#ml-whisper .wd-group ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ml-text-muted);
  font-size: 0.9rem;
}
#ml-whisper .wd-group li {
  margin-bottom: 4px;
}
#ml-whisper .wd-group li b,
#ml-whisper .wd-group li strong {
  color: var(--ml-text);
  font-weight: 600;
}
#ml-whisper .wd-quote {
  border-left: 3px solid var(--ml-blue);
  background: var(--ml-surface-2);
  border-radius: 0 4px 4px 0;
  padding: 12px 16px;
  margin: 0;
  color: var(--ml-text-muted);
  font-size: 0.92rem;
}
#ml-whisper .wd-faq details {
  border-bottom: 1px solid var(--ml-border);
  padding: 10px 2px;
}
#ml-whisper .wd-faq details:last-child {
  border-bottom: 0;
}
#ml-whisper .wd-faq summary {
  cursor: pointer;
  font-family: var(--ml-font);
  color: var(--ml-text);
  font-size: 0.92rem;
}
#ml-whisper .wd-faq summary:hover {
  color: var(--ml-blue-hi);
}
#ml-whisper .wd-faq details p {
  color: var(--ml-text-muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}
#ml-whisper .wd-credits {
  color: var(--ml-text-faint);
  font-size: 0.82rem;
  text-align: center;
  margin-top: 18px;
}
#ml-whisper .wd-credits a {
  color: var(--ml-text-muted);
}
/* Requirements table: keep the Minimum column on one line so values like
   "Windows 10 x64 (19045+) / Windows 11" never wrap mid-thought (owner
   feedback 2026-11-16). table-responsive handles narrow screens with a
   horizontal scroll, same as the tracker tables. */
#ml-whisper .table th:first-child,
#ml-whisper .table td:first-child {
  width: 12%;
  white-space: nowrap;
}
#ml-whisper .table th:nth-child(2),
#ml-whisper .table td:nth-child(2) {
  white-space: nowrap;
}
#ml-whisper .table tbody td {
  padding: 10px 10px;
  vertical-align: top;
}