/* GhostNode – Gestaltungs-Grundlagen für alle Seiten (2026-11), angelehnt an Apples Human Interface Guidelines:
 * lesbare Schrift, genug Kontrast, ausreichend große Klickflächen, Glas/Unschärfe nur auf schwebenden Leisten,
 * Rücksicht auf Systemeinstellungen (weniger Bewegung, weniger Transparenz, mehr Kontrast).
 * Die eigene Optik (HUD, Cyan/Gold, Großbuchstaben-Überschriften) bleibt – sie lebt in Farbe, Überschriften und Akzenten.
 * Wird zentral über inc/core/sitenav.php nach den Seiten-Styles geladen. */

:root {
    --gn-font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
    --gn-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
    --text-muted: #8696ab;            /* 6,7:1 auf dem Hintergrund (vorher 4,3:1) */
    --gn-radius-s: 6px; --gn-radius-m: 10px; --gn-radius-l: 14px;
    --gn-hit: 28px;                   /* Mindestgröße Bedienelemente am Desktop */
    color-scheme: dark;               /* bewusst nur dunkel: Gaming-/VR-Umfeld, Inhalte stehen im Vordergrund */
}

/* ---------- Schrift: eine Systemschrift für Text und Bedienung, eine für Code ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: var(--gn-font); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
button, input, select, textarea, .btn { font-family: inherit; }
code, kbd, pre, samp, .mono, tt { font-family: var(--gn-mono); }
p, li, dd, td { line-height: 1.55; }
small, .muted, .desc, .tile-desc { line-height: 1.45; }
/* Eingabefelder: keine Sperrschrift im Text, damit Eingaben gut lesbar bleiben */
input:not([type=button]):not([type=submit]), textarea, select { letter-spacing: normal; font-size: max(.9rem, 14px); }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }

/* ---------- Links im Fließtext nicht nur über die Farbe erkennbar ---------- */
:is(p, dd, td, .desc, .muted, small, .ld-sub, :is(article, .md, .wiki-body, .content) li) > a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:is(p, dd, td, .desc, .muted, small, .ld-sub, :is(article, .md, .wiki-body, .content) li) > a:not([class]):hover { text-decoration-thickness: 2px; }

/* ---------- Klickflächen ---------- */
.btn, button, select, summary, input[type=submit], input[type=button] { min-height: var(--gn-hit); }
:where(.btn, button) { border-radius: var(--gn-radius-s); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-width: 18px; accent-color: var(--accent-cyan); }
.gn-nav a, .gn-nav button { min-height: var(--gn-hit); display: inline-flex; align-items: center; }
/* reine Symbol-Knöpfe */
:is(.tile-pin, .wg-min, .ql-x, .bd-iconbtn, .bd-collapse, .cat-toggle, .mini-switch, .wg-more) { min-width: 24px; min-height: 24px; display: inline-flex; align-items: center; justify-content: center; }
/* Touch: 44px wie empfohlen */
@media (pointer: coarse) {
    :root { --gn-hit: 44px; }
    :is(.tile-pin, .wg-min, .ql-x, .bd-iconbtn, .bd-collapse, .cat-toggle, .mini-switch, .wg-more) { min-width: 44px; min-height: 44px; }
    input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; }   /* verhindert Zoom beim Antippen */
}
/* deaktivierte Elemente klar als solche erkennbar */
:is(button, .btn, input, select, textarea):disabled, .btn.disabled, [aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* ---------- Ebenen: Glas/Unschärfe nur auf schwebenden Leisten und Dialog-Hintergründen, nicht im Inhalt ---------- */
:is(.panel, .wg, .fh-card, .card, .tile, .nc-card, .nw-card) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* ---------- Auswahl & Fokus ---------- */
::selection { background: rgba(56, 213, 230, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-gold) !important; outline-offset: 2px; border-radius: 4px; }

/* ---------- Systemeinstellungen respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
    :is(a, .tile, .wk-card, .ps-card, .ev-card, .dl-card, .nw-tile, .sh-card):hover { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
    * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
    :root { --panel-bg: #0b1119; --panel-hover: #131d2b; }
    .gn-nav, .ld-top { background: #05080c !important; }
}
@media (prefers-contrast: more) {
    :root { --text-muted: #b6c2d1; --text-main: #f8fafc; --border-color: rgba(56, 213, 230, .75); }
    :is(.panel, .wg, .tile, .nc-card, .nw-card) { border-color: rgba(56, 213, 230, .75) !important; }
    a:not([class]) { text-decoration: underline; }
}
@media (forced-colors: active) {
    .btn, button { border: 1px solid ButtonText; }
    :focus-visible { outline-color: Highlight !important; }
}

/* ---------- Mindestgröße 12px auch für relative Größen (small/code in kleinen Elternelementen) ---------- */
small { font-size: max(12px, .85em); }
code, kbd, samp { font-size: max(12px, .9em) !important; }
pre code { font-size: max(12px, 1em) !important; }

/* Links ohne eigene Farbe: Akzentfarbe statt Browser-Blau (Browser-Blau hat auf Dunkel nur ~2:1 Kontrast) */
:where(a:not([class])), :where(a:not([class])):visited { color: var(--accent-cyan); }
