/* Frame of every public page (26.11.2026, mockup C:/Conan/VAM_WACHSTUM_2026-11-25/mockup): header row 1 stays at the top (brand ·
   search · language · account · Workshop); from 768 px row 2 shows the shelves and row 3 the ways of the page's shelf; below 768 px a bar
   at the bottom (Guide · Servers · Search · Updates · Menu with a sheet of every way). Then the footer and the search dialog
   (js/suche.js). Markup: werkzeug/i18n.py kopf_html, fuss_html, regalkarten_html. Same tokens as site.css, one button radius
   (--r-knopf), targets >= 44 px, the focus ring of site.css, Cardo SC only on the brand. */

.ik { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Row 1 (sticky, 61 px like before: saga.css --sg-kopf) ---------- */
.kopf__innen { gap: 6px; }
.kopf__innen > .marke-link { flex: none; margin-right: auto; }
.kopf__innen > .sprachwahl > summary, .kopf__innen > .konto-link { border-radius: var(--r-knopf); }
/* the account button keeps its 44 px; the search field gives way (review 26.11.: 27-41 px wide at 768-920 px) */
.kopf__innen > .konto-link { flex: none; }
.suchknopf, .kopf__workshop { display: none; }
.konto-link__wort { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 768px) {
  .kopf__innen { gap: 10px; }
  .kopf__innen > .marke-link { margin-right: 0; }
  .suchknopf {
    flex: 0 1 400px; min-width: 120px; margin-inline: auto; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
    border: 1px solid var(--linie-feld); border-radius: var(--r-knopf); background: var(--slot); color: var(--text-2); text-decoration: none;
    font: 400 .9375rem/1.2 var(--f-ui);
  }
  .suchknopf:hover { border-color: var(--akzent); color: var(--text-1); }
  .suchknopf > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .suchknopf > kbd { padding: 1px 7px; border: 1px solid var(--linie-stark); border-radius: 5px; background: var(--karte-2); color: var(--text-2); font: 600 .875rem/1.3 var(--f-mono); }
  .kopf__workshop.s2-knopf { display: inline-flex; min-height: 44px; padding: 0 16px; font-size: .9375rem; white-space: nowrap; }
  /* on the start page its own "Subscribe on Steam" leads; the header's Workshop stays outlined there (mockup css/start.css) */
  .kopf__workshop.s2-knopf:not(.s2-knopf--primaer) { background: none; border-color: var(--linie-feld); }
  .kopf__workshop.s2-knopf:not(.s2-knopf--primaer):hover { background: var(--karte-2); border-color: var(--akzent); }
}
@media (min-width: 1024px) {
  .kopf__innen > .konto-link { width: auto; gap: 8px; padding: 0 12px 0 10px; font: 600 .9375rem/1 var(--f-ui); text-decoration: none; }
  .konto-link__wort { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
:root:lang(ja) .kopf :is(.suchknopf, .konto-link) { font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif; }

/* ---------- Rows 2 and 3 (scroll away with the page) ---------- */
.regale, .ortnav { display: none; }
@media (min-width: 768px) {
  .regale, .ortnav { display: block; border-bottom: 1px solid var(--linie); }
  .ortnav { background: color-mix(in srgb, var(--karte) 55%, transparent); }
  :is(.regale, .ortnav) ul { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; margin: 0 -10px; padding: 0; }
  :is(.regale, .ortnav) a {
    position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-knopf);
    color: var(--text-2); text-decoration: none; font: 700 1rem/1.2 var(--f-ui); letter-spacing: 0;
  }
  .ortnav a { font-weight: 500; font-size: .9375rem; }
  :is(.regale, .ortnav) a:hover { color: var(--text-1); background: var(--karte-2); }
  :is(.regale, .ortnav) a[aria-current] { color: var(--text-1); }
  :is(.regale a[aria-current], .ortnav a[aria-current="page"])::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--akzent); box-shadow: 0 0 10px var(--glanz);
  }
}

/* ---------- Phone bar and its sheet (below 768 px) ---------- */
.leiste { display: none; }
@media (max-width: 767.98px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  /* a control reached with Tab or a jump to an anchor stops above the bar, not under it (WCAG 2.4.11) */
  html { scroll-padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .leiste {
    position: fixed; inset: auto 0 0 0; z-index: 35; display: flex; padding: 0 4px env(safe-area-inset-bottom);
    background: var(--karte); border-top: 1px solid var(--linie-stark); box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
  }
  .leiste > a, .leiste__menue > summary {
    flex: 1 1 auto; min-width: 44px; min-height: 59px; display: grid; place-content: center; justify-items: center; gap: 3px; padding: 4px 2px;
    border-radius: var(--r-knopf); color: var(--text-2); text-decoration: none; text-align: center; font: 600 .875rem/1.1 var(--f-ui); letter-spacing: 0;
  }
  /* long words (ru "Руководство", es "Servidores") take more room than short ones, never broken inside a word */
  .leiste > a > span, .leiste__menue > summary > span { white-space: nowrap; }
  .leiste > a[aria-current] { color: var(--akzent-hell); }
  .leiste__suche > .ik { width: 42px; height: 26px; padding: 3px 11px; border-radius: 13px; background: var(--akzent-dunkel); color: var(--akzent-hell); }
  .leiste__menue { flex: 1 1 auto; display: flex; min-width: 44px; }
  .leiste__menue > summary { list-style: none; cursor: pointer; width: 100%; }
  .leiste__menue > summary::-webkit-details-marker { display: none; }
  .leiste__menue[open] > summary { color: var(--text-1); background: var(--karte-2); }
  /* the page behind the open sheet dims; a tap on it lands on the summary and closes the sheet */
  .leiste__menue[open] > summary::after { content: ""; position: fixed; inset: 0 0 calc(60px + env(safe-area-inset-bottom)); z-index: -1; background: rgba(3, 8, 12, .6); }
  .blatt {
    position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 140px); overflow: auto;
    overscroll-behavior: contain; display: grid; gap: 14px; padding: 16px var(--rand) 20px; background: var(--karte);
    border-top: 1px solid var(--linie-stark); border-radius: 20px 20px 0 0; box-shadow: 0 -18px 40px rgba(0, 0, 0, .55);
  }
  .blatt ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .blatt a { display: flex; align-items: center; min-height: 44px; color: var(--text-2); text-decoration: none; line-height: 1.25; }
  .blatt a:hover, .blatt a[aria-current] { color: var(--akzent-hell); }
  .blatt__regal { margin: 0; color: var(--text-3); font: 700 var(--fs-meta)/1.3 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
  .blatt__regal > a { color: var(--text-1); font: 700 1rem/1.2 var(--f-ui); letter-spacing: 0; text-transform: none; }
  /* what else sits at the bottom moves above the bar: "To my list" of /modlist floats over it, a tick stops above both (review 26.11.) */
  .s2-nach-oben { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .ml-bau .ml-zu { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .ml-bau .ml-wahl :is(input, summary) { scroll-margin-bottom: calc(136px + env(safe-area-inset-bottom)); }
}
@media print { .regale, .ortnav, .leiste { display: none !important; } }

/* ---------- Footer: Learn · Play · Run a server · Take part, then Privacy · Imprint · Support VAM ---------- */
body:not(.cp) .fuss:has(.rf) { margin-top: 0; padding-block: 28px calc(28px + env(safe-area-inset-bottom)); }
.rf { display: grid; gap: 14px; }
.fuss nav.rf__spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; justify-content: stretch; }
@media (min-width: 768px) { .fuss nav.rf__spalten { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rf__spalten > div { min-width: 0; }
.rf__spalten ul { list-style: none; margin: 0; padding: 0; }
.fuss .rf__titel { margin: 0 0 2px; color: var(--text-3); font: 700 var(--fs-min)/1.3 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.fuss .rf__spalten a { display: flex; align-items: center; min-height: 44px; padding: 0; color: var(--text-2); text-decoration: none; line-height: 1.25; }
.fuss .rf__spalten a:hover { color: var(--text-1); text-decoration: underline; }
/* with a mouse the rows need no finger height (seite2.css gives links in a list 12 px above and below) */
@media (min-width: 768px) and (pointer: fine) {
  body:not(.cp) .fuss .rf__spalten li > a { min-height: 36px; padding-block: 4px; }
  body:not(.cp) .fuss .rf__spalten li > a:focus-visible { outline-offset: 2px; }
}
.fuss .rf__zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; padding-top: 10px; border-top: 1px solid var(--linie); }
.fuss .rf__zeile a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--text-2); }
.fuss .rf__fan { color: var(--text-3); font-size: var(--fs-meta); line-height: 1.45; }

/* ---------- Search dialog (js/suche.js) and the search on 404 ---------- */
.suche-blatt {
  width: min(680px, calc(100vw - 24px)); max-height: min(84dvh, 760px); margin: 12px auto auto; padding: 0; overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--linie-stark); border-radius: var(--r-karte); background: var(--karte); color: var(--text-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
@media (min-width: 768px) { .suche-blatt { margin-top: 72px; } }
.suche-blatt::backdrop { background: rgba(3, 8, 12, .72); }
.suche-blatt__kopf { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; background: var(--karte); border-bottom: 1px solid var(--linie); }
.suche-blatt__kopf h2 { flex: 1; margin: 0; font: 700 1.125rem/1.2 var(--f-ui); letter-spacing: 0; }
.suche-blatt__zu { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid transparent; border-radius: var(--r-knopf); background: none; color: var(--text-2); cursor: pointer; }
.suche-blatt__zu:hover { color: var(--text-1); background: var(--karte-2); }
.suche-blatt__koerper { display: grid; gap: 12px; padding: 14px 16px 18px; }
.such-feld { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--linie-feld); border-radius: var(--r-knopf); background: var(--slot); color: var(--text-1); font: 400 1.125rem/1.2 var(--f-ui); }
.such-feld::placeholder { color: var(--text-3); }
.such-stand { margin: 0; color: var(--text-3); font-size: var(--fs-meta); }
.such-treffer { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.such-treffer a { display: grid; gap: 2px; min-height: 44px; padding: 7px 12px; border-radius: var(--r-knopf); color: var(--text-1); text-decoration: none; line-height: 1.3; }
.such-treffer a:hover, .such-treffer a:focus-visible { background: var(--karte-hover); }
.such-treffer b { font-weight: 600; }
.such-treffer small { color: var(--text-3); font-size: var(--fs-meta); }
.such-mehr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding-top: 10px; border-top: 1px solid var(--linie); }
.such-mehr a { display: inline-flex; align-items: center; min-height: 44px; }
.such-taste { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text-2); cursor: pointer; }
.such-taste input { width: 20px; height: 20px; margin: 0; accent-color: var(--akzent); }
.such-404 { display: grid; gap: 10px; max-width: 680px; }
.such-404 label { color: var(--text-1); font: 700 1.0625rem/1.3 var(--f-ui); }
.such-404__zeile { display: flex; gap: 10px; }
.such-404__zeile > .such-feld { flex: 1; min-width: 0; }

/* ---------- Shelf cards (404) ---------- */
.regal-titel { margin-top: 32px; font-size: 1.375rem; }
.regalkarten { display: grid; gap: 14px; margin-top: 12px; }
.regalkarten ul { list-style: none; margin: 0; padding: 0; }
.regalkarten__liste { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.regalkarte { display: grid; gap: 4px; min-height: 44px; height: 100%; padding: 14px 16px; border: 1px solid var(--linie-stark); border-radius: var(--r-karte); background: var(--karte); color: var(--text-2); text-decoration: none; }
.regalkarte:hover { border-color: var(--akzent); background: var(--karte-hover); color: var(--text-2); }
.regalkarte > b { color: var(--text-1); font: 700 1.0625rem/1.25 var(--f-ui); }
.regalkarte > span { font-size: var(--fs-meta); line-height: 1.4; }
.regalkarten__mehr { display: flex; flex-wrap: wrap; gap: 0 18px; }
.regalkarten__mehr a { display: inline-flex; align-items: center; min-height: 44px; }
