/* wiki-parts.css — Bausteine einzelner Wiki-Seiten: Warenkette, Forschungsbaum, Rechner, Kopf der Website,
   Patchnotes-Kennzeichen, Sterne, Planetenwahl (aus wiki.css herausgelöst 14.11.2026, projekt-standards 13).
   Lädt als letztes Stylesheet (app/Wiki/Page.php). */

/* ── Warenkette (Stufe 2, 10.11.2026): Zutaten bzw. Vorkommen → Ware → wird zu. Felder im Rahmen wie im Spiel
   (Erz Stahl, Barren Gold, Bauteil Grün, Planet blauer Knopf), dazwischen goldene Pfeile. Handy: untereinander. ── */
.w-chain { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: nowrap; overflow-x: auto; padding: 8px 2px 14px; }
.w-chain__col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.w-chain__label { font: 600 0.8rem 'Fredoka', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.w-node {
    display: flex; flex-direction: column; align-items: center; gap: 2px; width: 112px; padding: 14px 6px 12px; text-align: center; color: #fff;
    background: url('/assets/ui/frame-research-open.png') center / 100% 100% no-repeat; filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.45));
    transition: transform 0.12s, filter 0.12s;
}
.w-node--t1 { background-image: url('/assets/ui/frame-research-ready.png'); }
.w-node--t2 { background-image: url('/assets/ui/frame-research-done.png'); }
.w-node--planet { background-image: url('/assets/ui/frame-button.png'); }
.w-node img, .w-node svg { width: 48px; height: 48px; object-fit: contain; }
.w-node b { font: 600 0.82rem/1.15 'Fredoka', sans-serif; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55); }
.w-node small { color: #dbe8ff; font-weight: 600; font-size: 0.78rem; }
a.w-node:hover { transform: translateY(-3px) scale(1.04); filter: brightness(1.15) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5)); text-decoration: none; color: #fff; }
.w-node--self { width: 150px; padding: 20px 8px 16px; filter: drop-shadow(0 0 16px rgba(127, 220, 255, 0.55)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.w-node--self img, .w-node--self svg { width: 72px; height: 72px; }
.w-node--self b { font-size: 1rem; }
.w-node__more { font-size: 0.82rem; color: #c6d7ef; }
.w-chain__arrow { flex: none; width: 0; height: 0; border-top: 14px solid transparent; border-bottom: 14px solid transparent; border-left: 20px solid var(--gold);
    filter: drop-shadow(0 2px 0 #6b3f00); }
@media (max-width: 640px) {
    .w-chain { flex-direction: column; overflow: visible; }
    .w-chain__col { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .w-chain__label { flex-basis: 100%; text-align: center; }
    .w-chain__arrow { border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 20px solid var(--gold); border-bottom: 0; }
    .w-node { width: 96px; }
}

/* ── Spaltenköpfe mit Bild aus dem Spiel (Förderrate = Bohrer, Schiffstempo = Triebwerk, Laderaum = Frachtraum …) ── */
.w-th-ico { width: 22px; height: 22px; object-fit: contain; margin-right: 5px; vertical-align: -6px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); }
/* Mehr als zwei Felder in einer Spalte (viele Vorkommen oder Verwendungen): zwei nebeneinander statt einer langen Säule */
.w-chain__col:has(> .w-node:nth-of-type(3)) { display: grid; grid-template-columns: repeat(2, auto); justify-items: center; }
.w-chain__col:has(> .w-node:nth-of-type(3)) > .w-chain__label, .w-chain__col:has(> .w-node:nth-of-type(3)) > .w-node__more { grid-column: 1 / -1; }
.w-node--self { padding: 20px 12px 24px; }
@media (max-width: 640px) { .w-chain__col:has(> .w-node:nth-of-type(3)) { display: flex; } }

/* ── Forschungsbaum (Stufe 2, 10.11.2026): wie im Spiel, mit eigenem Bildlauf ── */
.w-tree { max-height: 70vh; overflow: auto; margin: 0 0 18px; padding: 8px; border-radius: 12px; border: 1px solid var(--row-line);
    background: linear-gradient(180deg, #08215f, #05164a); scrollbar-color: rgba(127, 220, 255, 0.5) transparent; }
.w-tree svg { display: block; margin: 0 auto; }
.w-tree__lines path { fill: none; stroke: rgba(127, 220, 255, 0.55); stroke-width: 3; stroke-linejoin: round; }
.w-tree__node text { fill: #fff; font: 600 10px 'Fredoka', sans-serif; text-anchor: middle; paint-order: stroke; stroke: rgba(0, 0, 0, 0.55); stroke-width: 2px; }
.w-tree__node:hover image, .w-tree__node:focus image { filter: brightness(1.2) drop-shadow(0 0 6px rgba(127, 220, 255, 0.9)); }
.w-rcard { scroll-margin-top: 160px; }

/* ── Rechner, Fragen, Werkzeug-Knöpfe (Stufe 2, 10.11.2026) ── */
.w-sec-calc, .w-card--calc { --accent: #7fdcff; }
.w-sec-faq, .w-card--faq { --accent: #9fe6a0; }
.w-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 22px 0 0; }
.w-tool {
    display: inline-flex; align-items: center; gap: 10px; padding: 4px 16px 4px 8px; color: #fff; font: 600 1rem 'Fredoka', sans-serif; text-shadow: 0 2px 0 #021038;
    border-style: solid; border-color: transparent; border-width: 11px; border-radius: 14px;
    border-image: url('/assets/ui/frame-button.png') 50 fill / 11px stretch;
    background: linear-gradient(var(--btn), var(--btn)) padding-box, url('/assets/ui/frame-button.png') center / 100% 100% no-repeat border-box;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.45)); transition: transform 0.12s, filter 0.12s;
}
.w-tool img { width: 36px; height: 36px; object-fit: contain; }
.w-tool:hover { color: #fff; text-decoration: none; transform: translateY(-2px); filter: brightness(1.15) drop-shadow(0 5px 10px rgba(0, 0, 0, 0.45)); }
.w-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 0 0 14px; padding: 14px 16px; background: var(--row); border: 1px solid var(--row-line); border-radius: 12px; }
.w-form label { display: flex; flex-direction: column; gap: 4px; font: 600 0.85rem 'Fredoka', sans-serif; color: #c6d7ef; letter-spacing: 0.03em; }
.w-form select, .w-form input {
    min-height: 44px; min-width: 120px; padding: 8px 12px; font: 600 1rem 'Exo 2', sans-serif; color: #fff;
    background: var(--navy-deep); border: 2px solid rgba(127, 220, 255, 0.45); border-radius: 10px;
}
.w-form input[type=number] { width: 110px; min-width: 0; }
.w-form select:focus, .w-form input:focus { outline: none; border-color: var(--holo); box-shadow: 0 0 0 3px rgba(57, 215, 255, 0.25); }
.w-form .w-play__btn { padding: 10px 22px; font-size: 1rem; }
.w-result { margin: 0 0 14px; padding: 14px 18px; text-align: center; background: linear-gradient(180deg, var(--navy-deep), var(--navy)); border: 1px solid var(--row-line); border-radius: 12px; }
.w-result p { margin: 4px 0; }
.w-result__big { font-size: 1.8rem; }
.w-result__big .w-cur img { width: 30px; height: 30px; }
.w-faq { display: grid; gap: 10px; }
.w-faq__item { background: var(--row); border: 1px solid var(--row-line); border-radius: 12px; }
.w-faq__item summary { cursor: pointer; padding: 14px 18px; font: 600 1.05rem 'Fredoka', sans-serif; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.w-faq__item summary::-webkit-details-marker { display: none; }
.w-faq__item summary::after { content: '+'; color: var(--gold); font-size: 1.4rem; line-height: 1; }
.w-faq__item[open] summary::after { content: '−'; }
.w-faq__item p { margin: 0; padding: 0 18px 16px; color: #dbe8ff; }
@media (max-width: 640px) { .w-form label, .w-form select { width: 100%; } .w-form input[type=number] { width: 100%; } }
/* 10 Bereiche: Knöpfe etwas schmaler, damit die Leiste am PC ohne Wischen passt */
@media (min-width: 641px) { .w-nav { gap: 6px; } .w-nav a { min-width: 96px; padding: 2px 6px; font-size: 0.78rem; } }

/* Patchnotes-Kennzeichen mit Comic-Icon, verirrte Drohne bei 404 und leerer Suche (11.11.2026) */
.w-tag { display: inline-flex; align-items: center; gap: 6px; }
.w-tag img { width: 28px; height: 28px; margin: -6px 0 -6px -6px; }
.w-lost { text-align: center; margin: 4px 0 8px; }
.w-lost img { width: 120px; height: 120px; }

/* Impressum und Datenschutz (public/impressum.html, datenschutz.html, 12.11.2026): gleicher Rahmen wie Wiki und
   Patchnotes, Fließtext in angenehmer Zeilenlänge. */
.w-legal p { max-width: 75ch; }
.w-legal code { padding: 1px 6px; font-size: 0.92em; color: var(--gold); background: var(--navy-deep); border: 1px solid var(--row-line); border-radius: 6px; }

/* ── Kopf der ganzen Website (12.11.2026): Logo → Spiel, Wiki · Neuigkeiten, Suche, Sprache, „Spielen“ ── */
.w-site { display: flex; gap: 4px; }
.w-site a { padding: 6px 12px; font: 600 1.02rem 'Fredoka', sans-serif; color: #dbe8ff; border-radius: 10px; text-shadow: 0 2px 0 #021038; white-space: nowrap; }
.w-site a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.w-site a.on { color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 10px 10px 0 0; }
.w-top__play { padding: 7px 18px; font-size: 1rem; white-space: nowrap; }
@media (max-width: 640px) {
    .w-top { position: static; }   /* drei Zeilen: am Handy nicht mitscrollen, sonst bleibt zu wenig Platz für den Inhalt */
    .w-brand { order: 1; }
    .w-lang { order: 2; margin-left: auto; }
    .w-top__play { order: 3; padding: 5px 12px; }
    .w-site { order: 4; }
    .w-site a { padding: 4px 8px; font-size: 0.95rem; }
    .w-search { order: 5; flex: 1 1 170px; flex-basis: 170px; }
}
/* Sterne als Comic-Bild (Expeditionen, 14.11.2026), Text nur für Vorleseprogramme */
.w-star { vertical-align: -3px; margin-right: 1px; }
.w-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Planetenwahl im Rechner (14.11.2026): statt der Browser-Liste mit Windows-Scrollbalken eine aufklappbare
   Kachelfläche, 20 Planeten je Seite, Seiten über Reiter (nur CSS, das Wiki läuft ohne JavaScript). */
.w-pick { flex: 1 1 100%; }
.w-pick__btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 6px 12px 6px 8px;
    border-radius: 12px; border: 2px solid var(--holo); background: #0a1a52; color: #fff; font: 600 1rem 'Fredoka', sans-serif; }
.w-pick__btn::-webkit-details-marker { display: none; }
.w-pick__label { font-size: 0.85rem; color: #c6d7ef; margin-right: 4px; }
.w-pick__arrow { color: var(--holo); transition: rotate 0.15s; }
.w-pick[open] .w-pick__arrow { rotate: 180deg; }
.w-pick__panel { margin-top: 10px; padding: 10px; border-radius: 14px; background: rgba(4, 12, 46, 0.7); border: 1px solid var(--row-line); }
.w-pick__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.w-pick__pg { position: absolute; opacity: 0; pointer-events: none; }
.w-form .w-pick__tabs label { flex-direction: row; padding: 6px 12px; border-radius: 999px; cursor: pointer; background: #0a1a52; border: 1px solid var(--row-line); color: #c6d7ef; }
.w-pick__pg:checked + label { background: var(--holo); border-color: var(--holo); color: #021038; }
.w-pick__pg:focus-visible + label { outline: 2px solid #fff; outline-offset: 2px; }
.w-pick__page { display: none; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.w-form .w-pick__tile { flex-direction: row; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 12px; cursor: pointer;
    background: #0a1a52; border: 2px solid transparent; color: #fff; font: 600 0.82rem 'Fredoka', sans-serif; letter-spacing: 0; }
.w-pick__tile:hover { border-color: rgba(57, 215, 255, 0.5); }
.w-pick__tile input { position: absolute; opacity: 0; pointer-events: none; }
.w-pick__tile:has(input:checked) { border-color: var(--holo); background: #12307e; box-shadow: 0 0 10px rgba(57, 215, 255, 0.45); }
.w-pick__tile:has(input:focus-visible) { outline: 2px solid #fff; }
.w-pick__tile img { width: 36px; height: 36px; flex: none; }
.w-pick__tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-pick:has(#w-pg0:checked) .w-pick__page--0, .w-pick:has(#w-pg1:checked) .w-pick__page--1,
.w-pick:has(#w-pg2:checked) .w-pick__page--2, .w-pick:has(#w-pg3:checked) .w-pick__page--3,
.w-pick:has(#w-pg4:checked) .w-pick__page--4 { display: grid; }
.w-form .w-pick__tabs label { width: auto; flex: 0 0 auto; }
.w-form .w-pick__tile { width: auto; }
