/* Seitengerüst „Inlay“: Kopfzeile mit Wortmarke, Hauptnavigation (mobil als Leiste unten),
   Bereiche, Hinweise (Toasts). */

.skiplink {
    position: absolute; left: var(--s4); top: -60px; z-index: 300;
    padding: var(--s2) var(--s4); border-radius: var(--r-input);
    background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.skiplink:focus { top: var(--s4); }

/* ---------- Kopfzeile ---------- */
.topbar { position: relative; z-index: 50; background: var(--bg); }
.topbar__in {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s4);
    max-width: calc(var(--page-max) + 2 * var(--pad-page)); margin: 0 auto;
    padding: 28px var(--pad-page) 0; min-height: 72px;
}
.wordmark {
    justify-self: start; display: inline-flex; align-items: center; gap: 10px;
    padding: 0; border: 0; background: none; color: var(--text); cursor: pointer;
    font-size: 15px; font-weight: 400; letter-spacing: 4px; white-space: nowrap;
}
.wordmark b { font-weight: 600; }
.wordmark__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.topbar__actions { justify-self: end; display: flex; align-items: center; gap: var(--s3); }
.metrobtn { position: relative; gap: var(--s2); }
.metrobtn__run { display: none; position: absolute; top: 6px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.metrobtn.running .metrobtn__run { display: block; animation: metroPulse 1s ease-in-out infinite; }
@keyframes metroPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.avatar { font-size: 14px; font-weight: 600; }
.avatar--lg {
    display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: none;
    border-radius: 50%; border: 1px solid var(--line-ctl); font-size: 18px; font-weight: 600;
}

/* ---------- Hauptnavigation ---------- */
.mainnav { display: flex; align-items: center; gap: var(--s5); }
.mainnav__item {
    position: relative; display: inline-flex; align-items: center; gap: var(--s2);
    min-height: var(--tap); padding: 0 var(--s4); border: 0; background: none;
    color: var(--text-muted); font-size: var(--fs-text); font-weight: 500; cursor: pointer;
}
.mainnav__item:hover { color: var(--text); }
.mainnav__item.active { color: var(--text); }
.mainnav__item.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: var(--text);
}
.mainnav__ico { display: none; }

/* ---------- Bereiche ---------- */
.views { display: block; min-height: 60vh; padding-bottom: var(--s8); }
.mode-panel { display: none; }
.mode-panel.active { display: block; }
.bottomnav-space { display: none; }

/* ---------- Hinweise (Toasts) ---------- */
.gam-toasts {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400;
    display: flex; flex-direction: column; align-items: center; gap: var(--s2); pointer-events: none;
    width: min(440px, calc(100vw - 32px));
}
.gam-toast {
    width: 100%; padding: var(--s3) var(--s4); border-radius: var(--r-card);
    background: var(--surface); color: var(--text); border: 1px solid var(--line-ctl);
    box-shadow: var(--shadow); font-size: 14px; line-height: 1.45; text-align: center;
    animation: toastIn .25s ease-out;
}
.gam-toast b { display: block; color: var(--accent); font-size: var(--fs-text); }
.gam-toast.big { border-color: var(--accent); font-size: var(--fs-text); font-weight: 600; }
.gam-toast.out { opacity: 0; transition: opacity .4s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Tablet: etwas engere Kopfzeile ---------- */
@media (min-width: 701px) and (max-width: 1000px) {
    :root { --pad-page: 32px; }
    .topbar__in { grid-template-columns: auto 1fr auto; gap: var(--s3); }
    .mainnav { justify-content: center; gap: 0; }
    .mainnav__item { padding: 0 var(--s3); }
    .wordmark { letter-spacing: 3px; font-size: 14px; }
}

/* ---------- Smartphone ---------- */
@media (max-width: 700px) {
    .topbar__in { grid-template-columns: 1fr auto; padding-top: 14px; min-height: 64px; gap: var(--s2); }
    .wordmark { font-size: 14px; letter-spacing: 3.5px; gap: 8px; }
    .topbar__actions { gap: var(--s2); }
    .metrobtn { padding: 0 14px; }
    /* Navigation als Leiste unten */
    .mainnav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
        background: var(--bg); border-top: 1px solid var(--line-fine);
    }
    .mainnav__item { flex-direction: column; gap: 4px; padding: 6px 4px; font-size: 13px; min-height: 56px; }
    .mainnav__item.active { font-weight: 600; }
    .mainnav__item.active::after { display: none; }
    .mainnav__ico { display: inline-flex; }
    .bottomnav-space { display: block; height: calc(76px + env(safe-area-inset-bottom)); }
    .gam-toasts { bottom: calc(88px + env(safe-area-inset-bottom)); }
    body.fullscreen .bottomnav-space { display: none; }
}
@media (max-width: 380px) {
    .wordmark { letter-spacing: 2.5px; font-size: 13px; }
    .metrobtn span:not(.ico):not([data-icon]) { display: none; }
}
/* Vollbild (Herausforderung, Übungsfenster): ohne Hauptnavigation */
body.fullscreen .topbar, body.fullscreen .mainnav { display: none; }

/* ---------- Fußzeile (alle regulären Seiten, nicht in Vollbildern) ---------- */
.sitefoot { margin-top: var(--s8); border-top: 1px solid var(--line-fine); }
.sitefoot__in {
    display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap;
    max-width: calc(var(--page-max) + 2 * var(--pad-page)); margin: 0 auto; padding: var(--s5) var(--pad-page) var(--s6);
}
.sitefoot__in .spacer { flex: 1 1 auto; }
.sitefoot__support { text-decoration: none; }
body.fullscreen .sitefoot, body.ses-lock .sitefoot { display: none; }
@media (max-width: 700px) {
    .sitefoot { margin-top: var(--s7); }
    .sitefoot__in { gap: var(--s3) var(--s5); padding-bottom: var(--s4); }
    .sitefoot__in .spacer { flex-basis: 100%; height: 0; }
}
