/* Układ Słoneczny — style (wydzielone z index.html). Zmieniasz → podbij ?v= w <link> w index.html. */
  /* Jeden, świadomie ciemny świat — kosmos nie ma motywu jasnego. */
  :root {
    color-scheme: dark;
    --void: #04060c;
    --panel: rgba(10, 14, 26, 0.93);
    --panel-solid: #0b1020;
    --line: #232d47;
    --ink: #e2e7f1;
    --mute: #8d96ab;
    --amber: #f2b64a;
    --cyan: #72c6e0;
    --warn: #ff8a5c;
    --btn: #141b2e;          /* tło przycisku */
    --btn-deep: #0e1424;     /* tło przycisku w grupie / chipa */
    --line-hover: #3a4868;   /* obrys przycisku po najechaniu */
    --on-amber: #1a1204;     /* tekst na bursztynowym tle */
    --ink-soft: #c4cbda;     /* tekst drugorzędny w kontrolkach */
    --field: #0a0f1c;        /* tło pól formularza */
    --light: #ffe9a8;        /* impuls światła i jego etykiety */
    --display: "Readex Pro", system-ui, sans-serif; /* tytuły, cytaty, zegar */
    --sans: "Inter", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    /* ruch UI: spokojny, bez odbić; jedna krzywa wejścia, jedna wyjścia, trzy czasy */
    --ease-out: cubic-bezier(.2, 0, 0, 1);    /* wejścia, odpowiedź na gest */
    --ease-in: cubic-bezier(.3, 0, 1, 1);     /* wyjścia */
    --ease-move: cubic-bezier(.4, 0, .2, 1);  /* przesunięcia na ekranie */
    --t1: 120ms; --t2: 240ms; --t3: 400ms;
    --rise: 8px;                              /* wejście paneli: o tyle z dołu */
  }
  html, body { height: 100%; }
  body { margin: 0; background: var(--void); color: var(--ink); font: 13px/1.45 var(--sans); overflow: hidden; }
  #stage { position: fixed; inset: 0; }
  #stage canvas { display: block; touch-action: none; }
  #labels { position: fixed; inset: 0; pointer-events: none; }

  .panel { position: fixed; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; z-index: 5; } /* bez backdrop-filter: rozmycie pod dużymi panelami kosztowało co klatkę */
  h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: .02em; margin: 0; text-wrap: balance; }
  .eyebrow { font: 500 10.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--mute); }
  .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  button, select, input { font: inherit; color: var(--ink); }
  button { background: var(--btn); border: 1px solid var(--line); border-radius: 4px; padding: 5px 9px; cursor: pointer; }
  button:hover { border-color: var(--line-hover); }
  button[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); border-color: var(--amber); }
  :focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
  button, select, summary, .checks label { min-height: 24px; box-sizing: border-box; }
  #btn-close { min-width: 24px; color: var(--amber); font-weight: 700; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

  /* układ: zakładki widoków u góry, panel sterowania po lewej, karta ciała na dole */
  :root { --side-w: 312px; --gap: 16px; } /* 312: najszersza data w kroju Readex Pro (cyfry o różnej szerokości) mieści się obok „Teraz” */
  .panel { transition: opacity var(--t2) var(--ease-out); }
  #topbar { position: fixed; top: var(--gap); left: max(50%, calc(var(--side-w) + 2 * var(--gap) + 372px)); transform: translateX(-50%); /* środek ekranu; na węższych ekranach odsunięty, żeby nie wejść na panel czasu */ display: flex; gap: 8px; z-index: 6; }
  #topbar > .panel { position: static; }
  #views { display: flex; gap: 2px; padding: 4px; border-radius: 8px; }
  #scale-box, #beauty-box { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 8px; white-space: nowrap; }
  body:not([data-view="3d"]):not([data-view="2d"]) #scale-box, body:not([data-view="3d"]) #sc-switch, body:not([data-view="2d"]) #v2-mode { display: none; }
  .tbtn { background: none; border: 0; border-radius: 5px; padding: 7px 14px; color: var(--mute); font-weight: 500; white-space: nowrap; }
  .tbtn:hover { color: var(--ink); background: var(--btn); }
  .tbtn[aria-pressed="true"] { color: var(--on-amber); background: var(--amber); }
  .tbtn.ico { display: inline-grid; place-items: center; padding: 6px 8px; }
  body.beauty #leftcol, body.beauty #views, body.beauty #mw-box, body.beauty .sizes-labels, body.beauty .sz-bar, body.beauty .sz-zoom, body.beauty #info, body.beauty #scale-box, body.beauty #sky-box, body.beauty #goto-box, body.beauty #reset-box, body[data-view="sky"] #goto-box { display: none !important; } /* niebo: patrzy się z miejsca, nie wybiera ciała */
  #views button { background: none; border: 0; border-radius: 5px; padding: 7px 14px; color: var(--mute); font-weight: 500; white-space: nowrap; }
  #views button:hover { color: var(--ink); background: var(--btn); }
  #views button[aria-selected="true"] { color: var(--on-amber); background: var(--amber); }
  @media (min-width: 761px) and (max-width: 1199px) { /* tablet: pasek nie mieści się w jednym rzędzie — między panelem czasu a „Tylko obiekty”, zakładki w pierwszym rzędzie */
    #topbar { left: calc(var(--side-w) + 2 * var(--gap)); right: calc(var(--gap) + 60px); transform: none; flex-wrap: wrap; justify-content: flex-end; }
    #views { order: -1; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    #views button { padding: 7px 11px; }
  }

  /* lewa kolumna: czas, pod nim pasek ikon; menu otwiera się obok paska */
  #leftcol { position: fixed; top: var(--gap); left: var(--gap); bottom: var(--gap); display: flex; flex-direction: column; gap: 8px; pointer-events: none; z-index: 5; }
  #leftcol .panel { position: static; pointer-events: auto; }
  #side { width: var(--side-w); box-sizing: border-box; padding: 10px 12px; display: grid; gap: 8px; }
  .t-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; } /* min-width: tekst zegara nie rozpycha rzędu (drgał co sekundę) */
  .t-acts { display: flex; gap: 4px; }
  button.icon { display: inline-grid; place-items: center; width: 32px; padding: 0; background: var(--btn); }
  #info .acts button.icon { background: none; border-color: transparent; color: var(--ink-soft); } /* ikony karty jak pasek ikon: bez tła i obramowania, tło dopiero po włączeniu */
  #info .acts button.icon:hover { background: var(--btn); color: var(--ink); }
  #info .acts #btn-peri { color: var(--amber); } #info .acts #btn-voice { color: var(--amber); } #info .acts #btn-voice[aria-pressed="true"] { background: var(--btn); border-color: var(--line); opacity: 1; } /* lektor: żółty głośnik */
  #btn-voice .vo-stop, #btn-voice[aria-pressed="true"] .vo-wave { display: none; }
  #btn-voice[aria-pressed="true"] .vo-stop { display: inline; }
  #toolrow { flex: 1; min-height: 0; display: flex; align-items: flex-start; gap: 8px; pointer-events: none; }
  #rail { display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 8px; }
  #rail button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: none; border: 0; border-radius: 6px; color: var(--ink-soft); }
  #rail button:hover { background: var(--btn); color: var(--ink); }
  #rail .mob-only { display: none; }
  #reset-box, #beauty-box { display: none !important; } /* ich przyciski są w pasku wycieczek i pomocy (index.html) */
  #rail #beauty[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); }
  html body.beauty #leftcol { display: flex !important; } /* „Tylko obiekty”: z paska zostaje sam przycisk powrotu */
  body.beauty #leftcol > :not(#toolrow), body.beauty #toolrow > :not(#rail), body.beauty #rail > :not(#beauty) { display: none !important; }
  #rail button[aria-expanded="true"] { background: var(--amber); color: var(--on-amber); }
  #pop { width: 340px; box-sizing: border-box; max-height: calc(100vh - var(--side-h, 150px) - 3 * var(--gap) - 8px); overflow-y: auto; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
  #pop header { display: flex; justify-content: space-between; align-items: center; }
  #pop h3 { margin: 0; font: 500 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
  #pop > div { display: grid; gap: 8px; }
  * { scrollbar-width: thin; scrollbar-color: var(--line) transparent; } /* wszędzie ten sam cienki pasek przewijania w barwach UI, bez strzałek */
  ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-button { display: none; }
  ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--mute); }
  #pop > div[hidden] { display: none; }
  #ev-box > summary, #tn-box > summary { display: none; } /* w menu nagłówek pełni tytuł; grupy warstw zostają rozwijane */
  #pop .evl { max-height: none; }
  .stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; flex: 1; min-width: 0; }
  .stepper button { border: 0; border-radius: 0; background: var(--btn-deep); width: 30px; padding: 5px 0; }
  .stepper #rate-lbl { flex: 1; text-align: center; }
  .blk { padding: 12px 16px; display: grid; gap: 8px; }
  .blk-head { display: flex; justify-content: space-between; align-items: center; }
  .lab { font: 500 11px/1 var(--sans); color: var(--mute); letter-spacing: .06em; }
  .ghost { background: none; border: 0; color: var(--mute); padding: 2px 4px; font-size: 12px; }
  .ghost:hover { color: var(--ink); }
  #clock { font-family: var(--display); font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; align-self: center; font-variant-numeric: tabular-nums; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .t-acts { flex: none; }
  #clock small { display: none; } /* JD i ΔT w podpowiedzi zegara */
  #goto-box, #reset-box { display: flex; align-items: center; padding: 4px; border-radius: 8px; }
  #reset-box .icon { height: 32px; background: none; border: 0; }
  #goto-btn { display: flex; align-items: center; gap: 8px; width: 200px; height: 32px; box-sizing: border-box; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 0 28px 0 6px; font-size: 12.5px; color: var(--ink); text-align: left; cursor: pointer; position: relative; }
  #goto-btn:hover { background: var(--btn); }
  #goto-btn { background: none; border-color: transparent; } /* jedna ramka: panel wokół */
  .t-acts button { background: none; border-color: transparent; } .t-acts button:hover { background: var(--btn); } .t-acts button[aria-expanded="true"] { background: var(--amber); color: var(--on-amber); } /* Teraz, data, link: jak pasek ikon */
  #goto-btn[aria-expanded="true"] { border-color: var(--amber); }
  #goto-btn::after { content: ""; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px; border: solid var(--mute); border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); }
  #goto-btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #goto-btn .ph { color: var(--ink-soft); padding-left: 4px; }
  #goto-btn .th { width: 22px; height: 22px; }
  #goto-pop { position: fixed; z-index: 30; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.6); overflow: hidden; }
  #goto-pop[hidden] { display: none; }
  #goto-q { margin: 10px 10px 4px; box-sizing: border-box; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px; color: var(--ink); }
  #goto-q:focus { outline: none; border-color: var(--amber); }
  #goto-ls { position: relative; overflow-y: auto; padding: 0 6px 8px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  #goto-ls .gh { position: sticky; top: 0; z-index: 1; background: var(--panel-solid); font: 600 10.5px var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--amber); padding: 12px 8px 6px; }
  #goto-ls .gs { color: var(--mute); font-size: 11px; padding: 6px 8px 2px; }
  #goto-ls .gi { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 6px; padding: 4px 8px; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; }
  #goto-ls .gi:hover, #goto-ls .gi:focus-visible { background: var(--btn); outline: none; }
  #goto-ls .gi[aria-selected="true"] { background: rgba(242,182,74,.13); color: var(--amber); }
  #goto-ls .gi span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #goto-ls .gi small { color: var(--mute); font-size: 11px; flex: none; }
  #goto-ls [hidden] { display: none; }
  /* miniaturki: kule z tekstur (arkusz z tools/thumbs.py), reszta z CSS w barwie ciała */
  .th { flex: none; width: 28px; height: 28px; position: relative; background: url(tex/thumbs.webp?v=9) calc(var(--k) * 100% / 50) 0 / 5100% 100% no-repeat; }
  .th.tho { background: url(tex/thumbs-obj.webp?v=1) calc(var(--k) * 100% / 9) 0 / 1000% 100% no-repeat; } /* małe ciała, ludzkie dzieła: tools/thumbs_obj.py */
  .th[class*="th-"] { background: none; }
  .th[class*="th-"]::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 32%, color-mix(in srgb, var(--c), white 30%), var(--c) 38%, color-mix(in srgb, var(--c), black 75%) 80%); }
  .th-star::before, .th-nearstar::before { inset: 3px !important; background: radial-gradient(circle, #fff 0 16%, color-mix(in srgb, var(--c), white 35%) 26%, var(--c) 40%, color-mix(in srgb, var(--c), transparent 70%) 56%, transparent 72%) !important; }
  .th-asteroid::before, .th-tno::before { inset: 8px 7px 7px 8px !important; border-radius: 44% 56% 52% 48% / 55% 42% 58% 45% !important; }
  .th-comet::before { inset: auto auto 6px 6px !important; width: 7px; height: 7px; background: radial-gradient(circle, #fff 0 25%, var(--c) 60%, transparent 75%) !important; }
  .th-comet::after { content: ""; position: absolute; left: 9px; bottom: 9px; width: 18px; height: 6px; border-radius: 0 50% 50% 0; transform-origin: 0 50%; transform: rotate(-40deg); background: linear-gradient(to right, color-mix(in srgb, var(--c), white 30%), transparent); opacity: .8; }
  .th-craft::before { inset: 4px !important; border-radius: 0 !important; background: var(--cyan) !important; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 8h4v4H8z'/%3E%3Cpath d='M1 7h5v6H1zM14 7h5v6h-5z' opacity='.7'/%3E%3Cpath d='M6 9.5h2v1H6zM12 9.5h2v1h-2zM9.5 4h1v4h-1z'/%3E%3Ccircle cx='10' cy='3.5' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 8h4v4H8z'/%3E%3Cpath d='M1 7h5v6H1zM14 7h5v6h-5z' opacity='.7'/%3E%3Cpath d='M6 9.5h2v1H6zM12 9.5h2v1h-2zM9.5 4h1v4h-1z'/%3E%3Ccircle cx='10' cy='3.5' r='1.5'/%3E%3C/svg%3E") center / contain no-repeat; }
  .rate { display: flex; align-items: center; gap: 8px; }
  #rate-lbl { font-family: var(--mono); font-size: 12px; color: var(--amber); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
  .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
  .seg button { border: 0; border-radius: 0; background: var(--btn-deep); padding: 6px 10px; }
  .seg button + button { border-left: 1px solid var(--line); }
  .seg button[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); }
  #dateset-box summary, .layers summary, .src summary { cursor: pointer; color: var(--ink-soft); font-size: 12.5px; padding: 3px 0; }
  #dateset-box:not([hidden]) { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
  .dateset { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 4px; margin-top: 6px; }
  .dateset label { display: grid; gap: 3px; font-size: 10px; color: var(--mute); }
  .dateset input, .skyloc input, .skyloc select, #goto { box-sizing: border-box; background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 5px 6px; font-size: 12.5px; }
  .dateset input, .skyloc input { width: 100%; font-family: var(--mono); }
  #goto { width: 100%; }
  #warn { color: var(--warn); font-size: 12px; }
  #cam-note { color: var(--cyan); font-size: 11px; }
  #opts > div { display: none; gap: 8px; }
  body[data-view="3d"] #opts > [data-for="3d"], body[data-view="2d"] #opts > [data-for="2d"], body[data-view="sky"] #opts > [data-for="sky"],
  body[data-view="sizes"] #opts > [data-for="sizes"], body[data-view="gal"] #opts > [data-for="gal"] { display: grid; }
  #opts > div > button, .act { justify-self: start; }
  button.small { padding: 4px 8px; font-size: 12px; margin: 2px 0 6px; }
  .hint { margin: 0; color: var(--mute); font-size: 12px; line-height: 1.45; }
  .skyloc { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 6px; } /* szer., dł. i „Ustaw” w jednym rzędzie */
  .skyloc select { grid-column: 1 / -1; }
  .skyloc label { display: grid; gap: 3px; font-size: 10px; color: var(--mute); }
  .skyloc button { grid-column: auto; justify-self: stretch; }
  #sky-read { color: var(--amber); font-size: 11.5px; line-height: 1.5; }
  .layers details { border-top: 1px solid rgba(35,45,71,.6); padding-top: 4px; }
  .layers details:first-of-type { border-top: 0; }
  /* przełączniki warstw jak chipy w karcie ciała (.ov-row): pole wyboru ukryte, ale dostępne z klawiatury i czytnika */
  .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 0 4px; }
  .checks label { position: relative; display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 11.5px; line-height: 1.2; padding: 3px 8px 3px 6px; min-height: 26px; border: 1px solid var(--line); border-radius: 4px; background: var(--btn-deep); color: var(--ink-soft); }
  .checks svg { width: 14px; height: 14px; flex: none; color: var(--amber); }
  .checks label:has(input:checked) svg { color: inherit; }
  .checks label:hover { border-color: var(--line-hover); }
  .checks label:has(input:checked) { background: var(--amber); color: var(--on-amber); border-color: var(--amber); }
  .checks label:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }
  .checks input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
  .act { background: #2a2210; border-color: #6b5520; color: #ffe2a0; }
  .act:hover { border-color: var(--amber); }
  #ev-box summary, #tn-box summary { cursor: pointer; color: var(--ink-soft); font-size: 12.5px; padding: 3px 0; }
  .evl { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow-y: auto; display: grid; }
  .evl button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 92px 1fr; gap: 1px 10px; padding: 5px 4px; border-top: 1px solid rgba(35,45,71,.6); cursor: pointer; }
  .evl button:hover, .evl button:focus-visible { background: #141c30; outline: none; }
  .evl button:focus-visible { box-shadow: inset 0 0 0 1px var(--amber); }
  .evl button:disabled { opacity: .55; cursor: default; background: none; }
  .evl time { grid-row: span 2; font: 400 11px/1.35 var(--mono); color: var(--mute); }
  .evl b { font-weight: 500; font-size: 12.5px; color: var(--ink); }
  .evl small { font-size: 11px; color: var(--mute); }
  .evl .ev-local { grid-column: 2; color: var(--ink-soft); }
  .evl .ev-eclipse b { color: #ffcf8a; } .evl .ev-opposition b, .evl .ev-conjunction b { color: #cfe0ff; } .evl .ev-comet b { color: #d9b3ff; } .evl .ev-neo b { color: #b8f0c8; } .evl .ev-impact b { color: #ff9f7a; }
  .tn-head { font-size: 11.5px; color: var(--mute); margin: 6px 0 2px; }
  .tn-head select { background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; font-size: 11.5px; }
  #tn-list button { grid-template-columns: 40px 1fr; }
  .src { padding: 8px 16px 12px; border-top: 1px solid var(--line); }
  #credits { margin: 6px 0 0; color: var(--mute); font-size: 11px; line-height: 1.5; }
  #credits a { color: inherit; }

  /* karta ciała: pozioma, na dole po prawej od panelu */
  #info { left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - var(--side-w) - 3 * var(--gap)); bottom: var(--gap); max-height: 46%; overflow-y: auto; padding: 12px 18px; box-sizing: border-box; }
  #info header { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
  #info .ttl { min-width: 150px; }
  #info h2 { font-size: 30px; line-height: 1; margin-top: 3px; }
  #info .keys { display: flex; gap: 12px 28px; flex-wrap: wrap; flex: 1; }
  #info .key { display: grid; gap: 3px; }
  #info .key span { font-size: 11px; color: var(--mute); }
  #info .key b { font: 500 14px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
  #info .acts { display: flex; gap: 6px; align-items: center; margin-left: auto; }
  #info .acts button { white-space: nowrap; }
  #info .ov-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; max-width: 520px; } /* 2–3 rzędy zamiast jednego szerokiego */
  #info .band-note { font-size: 12px; line-height: 1.45; margin: 6px 0 0; max-width: 520px; color: var(--ink-soft); } #info .band-note .dim { opacity: .75; }
  #info #btn-ov[aria-expanded="true"], #info #btn-band[aria-expanded="true"], #info #btn-more[aria-expanded="true"], #info .ov-row button[aria-pressed="true"], #info #btn-track[aria-pressed="true"], #info #btn-path[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); border-color: var(--amber); }
  #info .cols { display: flex; flex-wrap: wrap; gap: 4px 32px; margin-top: 12px; }
  #info .cols section { flex: 0 1 auto; min-width: 200px; }
  #info h3 { font: 500 11px/1 var(--sans); letter-spacing: .06em; color: var(--amber); margin: 8px 0 6px; padding-top: 8px; border-top: 1px solid var(--line); }
  #info dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
  #info dt { color: var(--mute); font-size: 12px; }
  #info dd { margin: 0; text-align: right; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; }
  #info .note { color: var(--mute); font-size: 11.5px; margin: 10px 0 0; max-width: 110ch; }
  /* karta obiektu: kafelki z liczbami → mini-wykresy → opis → siatka sekcji szczegółów (otwarta sekcja pod siatką, na całą szerokość) */
  #info .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px 14px; margin-top: 12px; }
  #info .tile { display: grid; grid-template-columns: 16px 1fr; gap: 2px 6px; align-items: center; align-content: start; min-width: 0; }
  #info .tile svg { color: var(--amber); }
  #info .tile span { font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #info .tile b, #info .tile small { grid-column: 1 / -1; }
  #info .tile b { font: 500 14px/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
  #info .tile small { font-size: 10.5px; color: var(--mute); white-space: nowrap; }
  #info sup { font-size: .7em; line-height: 0; }
  #info .viz { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
  #info .fig { margin: 0; flex: 1 1 88px; max-width: 130px; display: grid; gap: 4px; justify-items: center; }
  #info .fig svg { width: 100%; height: auto; overflow: visible; }
  #info .fig figcaption { display: grid; gap: 2px; text-align: center; }
  #info .fig figcaption span { font-size: 10.5px; color: var(--mute); }
  #info .fig figcaption b { font: 500 12px/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
  #info .cols { display: block; margin-top: 14px; }
  #info .sec-tabs { display: flex; flex-wrap: wrap; gap: 4px; } /* zakładki w stałej kolejności; treść wybranej pod nimi */
  #info .sec-tabs button, #info .ov-row button { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1.2; padding: 3px 8px 3px 6px; min-height: 26px; border-radius: 4px; background: var(--btn-deep); color: var(--ink-soft); }
  #info .sec-tabs svg, #info .ov-row svg { width: 14px; height: 14px; flex: none; color: var(--amber); }
  #info .sec-tabs button[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); border-color: var(--amber); }
  #info .sec-tabs button[aria-pressed="true"] svg, #info .ov-row button[aria-pressed="true"] svg { color: inherit; }
  #info .sec-body { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  #info .sec-t { font-size: 11px; color: var(--mute); margin-bottom: 6px; }
  #info .sec-body > .note { margin-top: 0; }
  #info .moon-n { margin: 0 0 8px; } #info .moon-rest { margin: 4px 0 0; color: var(--ink-soft); line-height: 1.5; }
  #info .moon-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; } #info .moon-chips button { padding: 4px 10px; }
  #info .desc { margin: 12px 0 0; max-width: 92ch; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
  #info.compact .cols, #info.compact .note, #info.compact .desc, #info.compact .keys, #info.compact .tiles, #info.compact .viz { display: none; }
  @media (min-width: 761px) { #info:not(.compact) { width: min(780px, calc(100% - var(--side-w) - 3 * var(--gap))); } } /* szeroka i niska: mniej zasłania scenę w pionie */
  #info .spectro { margin-top: 10px; max-width: 640px; }
  #info .spectro svg { width: 100%; height: auto; display: block; overflow: visible; }
  #info .spectro text { font: 9px var(--sans); fill: var(--mute); }
  #info .spectro:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 3px; }
  #info .spk { cursor: pointer; } #info .spk:hover path { stroke: var(--amber); }
  #info .spec-cap { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--mute); margin-top: 2px; }
  #info .spec-cap button { background: none; border: 0; padding: 2px 4px; min-height: 0; color: var(--amber); font: 500 11.5px/1.2 var(--sans); cursor: pointer; text-align: center; } #info .spec-cap button:hover { text-decoration: underline; }
  #info .spectro { width: min(640px, 100%); }
  #info #btn-pulse-sun svg { color: var(--amber); } /* impuls światła: żółta ikona */
  #info:not(.compact) header { position: sticky; top: -12px; z-index: 2; margin: -12px -18px 0; padding: 12px 18px 8px; background: rgb(10, 14, 26); border-bottom: 1px solid var(--line); } /* nazwa zostaje u góry przy przewijaniu */
  #info:not(.compact) .keys { order: 3; flex: 1 0 100%; flex-wrap: nowrap; gap: 24px; } /* liczby w jednym rzędzie pod nazwą */
  @media (min-width: 761px) { #info.region { max-width: min(760px, calc(100% - var(--side-w) - 3 * var(--gap))); } } #info.region dd { white-space: normal; } /* karta obszaru: długie wartości zawijają się */

  /* tryb filmowy: po chwili bezczynności panele przygasają, wracają przy ruchu myszy lub klawiszu */
  body.idle:not(.tourlock) .panel:not(:has(:focus-visible)):not(#tut):not(#hello):not(#tour):not(#pop) { opacity: 0; transition-duration: .8s; } /* wygaszenie po 30 s: panele znikają całkiem */
  @media (hover: hover) { body.idle:not(.tourlock) .panel:hover { opacity: 1; } } /* mysz nad panelem go pokazuje */
  @media (hover: none) { body.idle:not(.tourlock) .panel:not(#tut):not(#hello):not(#tour):not(#pop) { pointer-events: none; } } /* telefon: „zawieszony” :hover po dotknięciu nie trzyma paska; pierwsze dotknięcie tylko budzi */
  #legend { right: var(--gap); top: calc(var(--top-h, 64px) + 10px); max-width: 250px; padding: 8px 12px; display: grid; gap: 6px; font-size: 11.5px; color: var(--ink-soft); }
  #legend { border-color: var(--amber); }
  #legend details { display: block; } #legend details > * + * { margin-top: 6px; } /* grid w zwiniętym <details> zostawiał pustą przerwę pod nagłówkiem */
  #legend summary { cursor: pointer; font: 500 11px/1.2 var(--sans); color: var(--ink-soft); }
  #legend details[open] summary { margin-bottom: 4px; }
  #legend h4 { margin: 0; font: 500 10.5px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
  #legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
  #legend li { display: flex; align-items: center; gap: 8px; line-height: 1.25; }
  #legend i { flex: none; width: 14px; height: 3px; border-radius: 2px; }
  #legend i.dot { width: 7px; height: 7px; border-radius: 50%; margin: 0 3.5px; }
  @media (max-width: 760px) { #legend { right: var(--gap); left: auto; top: calc(var(--top-h, 104px) + 150px); max-width: 190px; font-size: 10.5px; padding: 6px 9px; } }
  body.touring #legend { display: none; }
  #sky-box { position: fixed; right: var(--gap); bottom: 44px; z-index: 4; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 8px; } /* niebo: tryb nocny, celowanie telefonem, okular, przybliżenie — prawa strona (z lewej nachodził na pasek narzędzi na tablecie) */
  @media (max-width: 760px) { #sky-box { right: auto; left: var(--gap); bottom: calc(var(--bot-h, 160px) + 10px); padding: 3px; } #sky-box button { min-height: 40px; height: 40px; } } /* telefon: z lewej nad paskiem; pod kartą obiektu (z-index 4 < 5), nie chowa się — celowanie telefonem działa przy wybranym obiekcie */
  #eyepiece { display: none; position: fixed; inset: 0; z-index: 2; pointer-events: none; --r: 300px; background: radial-gradient(circle at 50% 50%, transparent 0 calc(var(--r) - 1px), rgba(150, 160, 185, .5) var(--r), #000 calc(var(--r) + 2px)); } /* okular: koło pola widzenia */
  body.eyepiece[data-view="sky"] #eyepiece { display: block; }
  #eyepiece-lbl { position: absolute; left: calc(var(--gap) + 58px); bottom: 82px; font: 500 12px/1 var(--sans); letter-spacing: .04em; color: var(--ink-soft); white-space: nowrap; } /* obok przycisku okularu */
  @media (max-width: 760px) { #eyepiece-lbl { bottom: calc(var(--bot-h, 160px) + 22px); left: calc(var(--gap) + 56px); } }
  #sky-hud { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--top-h, 58px) + 4px); z-index: 4; pointer-events: none; font: 500 11px/1.3 var(--mono); color: var(--amber); text-shadow: 0 0 4px #000, 0 0 8px #000; white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; } /* niebo: kierunek, pole, Słońce, Kp — zawsze widoczne */
  body.idle:not(.tourlock) #sky-hud { opacity: 0; transition: opacity .8s; }
  @media (max-width: 760px) { #sky-hud { top: auto; bottom: calc(var(--bot-h, 160px) + 6px); left: calc(50% + 28px); font-size: 10px; max-width: calc(100vw - 80px); } } /* telefon: u góry zasłania go karta */
  #sky-read { display: none; } /* te same dane są w #sky-hud */
  #sky-zoom { display: grid; justify-items: center; gap: 2px; border-top: 1px solid var(--line); padding-top: 3px; }
  #sky-fov { font: 500 10px/1.25 var(--mono); color: var(--amber); text-align: center; white-space: pre; } /* pole i powiększenie, dwie linie */
  @media (pointer: coarse) { #zoom-in, #zoom-out { display: none !important; } } /* telefon: tylko odczyt (szczypanie) */
  #optic-menu { position: fixed; right: calc(var(--gap) + 58px); bottom: 44px; z-index: 7; width: 220px; padding: 6px; display: grid; gap: 4px; }
  #optic-menu[hidden] { display: none; }
  .om-row { display: flex; gap: 4px; } .om-row button[data-oi] { flex: 1; display: flex; align-items: center; gap: 8px; text-align: left; } .om-row button[data-oi] > svg { flex: none; } .om-row small { margin-left: auto; padding-left: 6px; opacity: .7; white-space: nowrap; } /* ikona, nazwa, pole widzenia z prawej */
  #om-add { display: grid; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; } #om-add label { display: flex; align-items: center; gap: 6px; } #om-add label input { width: 56px; } #om-add > input { min-width: 0; }
  @media (max-width: 760px) { #optic-menu { bottom: calc(var(--bot-h, 160px) + 10px); right: auto; left: calc(var(--gap) + 56px); width: min(220px, calc(100vw - 80px)); } }
  #reticle { display: none; position: fixed; left: 50%; top: 50%; z-index: 2; pointer-events: none; --f: 600px; } /* Telrad i okrąg 1° (skyStep) */
  body[data-view="sky"].telrad #reticle, body[data-view="sky"].circ1 #reticle { display: block; }
  #reticle i { position: absolute; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); border: 1.5px solid #ff6b5a; opacity: .8; display: none; }
  body.telrad #reticle .t { display: block; } body.circ1 #reticle i.c1 { display: block; }
  #reticle .t1 { width: calc(var(--f) * .008727); height: calc(var(--f) * .008727); } #reticle .t2 { width: calc(var(--f) * .03491); height: calc(var(--f) * .03491); } #reticle .t3 { width: calc(var(--f) * .06985); height: calc(var(--f) * .06985); }
  #reticle i.c1 { width: calc(var(--f) * .017454); height: calc(var(--f) * .017454); border-color: #e88a96; }
  #reticle b.c1 { display: none; position: absolute; left: calc(var(--f) * .0087 + 4px); top: calc(var(--f) * -.0087 - 14px); font: 500 11px/1 var(--sans); color: #e88a96; white-space: nowrap; }
  body.circ1 #reticle b.c1 { display: block; }
  #sky-city.here, #tn-city.here { padding-left: 24px; background: var(--btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2b64a' fill-rule='evenodd' d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 4a3 3 0 1 1 0 6 3 3 0 0 1 0-6z'/%3E%3C/svg%3E") no-repeat 6px 50% / 14px 14px; } /* „Moja pozycja”: znacznik mapy */
  #tn-list .tn-sun { display: flex; justify-content: space-around; padding: 6px 0 10px; } .tn-sun div { display: grid; justify-items: center; } .tn-sun small { color: var(--mute); font-size: 11px; } .tn-sun b { font: 500 26px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
  @media (min-width: 761px) { #pop[data-open="tonight"] { width: 470px; } } /* oś czasu z nazwami obiektów potrzebuje miejsca */
  #tn-list .tn-pass { display: grid; grid-template-columns: 48px 1fr; column-gap: 8px; width: 100%; padding: 6px 4px; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.05); border-radius: 0; text-align: left; } .tn-pass time { grid-row: span 2; font: 500 14px/1.6 var(--mono); color: var(--amber); } .tn-pass b { font-weight: 500; font-size: 12.5px; } .tn-pass small { color: var(--mute); font-size: 11px; } /* przeloty satelitów */
  #tn-list .tn-sec { margin: 6px 0 2px; } #tn-list .tn-sec button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 8px 6px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); text-align: left; }
  #tn-list .tn-sec button::before { content: '▸'; margin-right: 6px; } #tn-list .tn-sec button[aria-expanded="true"]::before { content: '▾'; } #tn-list .tn-sec small { margin-left: auto; color: var(--mute); letter-spacing: 0; } /* kategorie jak akordeon */
  #tn-list .tn-axis, #tn-list .tn-row { display: grid; grid-template-columns: 128px 1fr; align-items: center; gap: 8px; width: 100%; } /* „Co widać tej nocy”: oś czasu */
  .tn-axis .tn-t { position: relative; height: 14px; font: 500 10px/1 var(--mono); color: var(--mute); } .tn-axis .tn-t span { position: absolute; transform: translateX(-50%); }
  #tn-list .tn-row { padding: 0; min-height: 34px; border-radius: 0; background: none; text-align: left; } #tn-list .tn-row:disabled { opacity: .55; }
  .tn-row .tn-n { display: flex; align-items: center; gap: 7px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tn-row .tn-n i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
  .tn-row .tn-t { position: relative; height: 32px; border-top: 1px solid rgba(255,255,255,.06); }
  .tn-row .tn-t { overflow: hidden; } .tn-row .tn-t > i { position: absolute; top: 7px; height: 7px; border-radius: 4px; opacity: .9; } .tn-row .tn-t em { position: absolute; top: 10px; font: 500 9.5px/1 var(--mono); font-style: normal; color: var(--ink-soft); white-space: nowrap; text-shadow: 0 0 3px #000; } .tn-row .tn-t em.l { left: 0; } .tn-row .tn-t em.r { right: 0; } /* godziny pod początkiem i końcem paska */
  .tn-row .tn-t u { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--amber); }
  .lbl.sky-sel { pointer-events: none; padding: 0; width: 22px; height: 22px; border: 1.6px solid var(--amber); border-radius: 50%; box-shadow: 0 0 6px rgba(0,0,0,.6); } /* wybrana gwiazda */
  .lbl.sky-path { pointer-events: none; padding: 0; font: 500 11px/1 var(--sans); color: #4cd06a; text-shadow: 0 0 4px #000; transform: translate(6px, 4px); }
  body > #beauty-box { position: fixed; top: var(--gap); right: var(--gap); z-index: 7; } /* „Tylko obiekty”: prawy górny róg we wszystkich widokach */
  body.sizes:not(.pv) #info, body.sizes #side { display: none !important; } /* Obiekty: bez karty i zegara; karta tylko w podglądzie 3D (gwiazdy, czarne dziury) */
  #fps { position: fixed; bottom: 3px; left: 6px; z-index: 7; pointer-events: none; font: 500 10px/1 var(--mono); color: var(--mute); opacity: .7; }
  #credit { position: fixed; right: 14px; bottom: 8px; z-index: 5; font: 500 10.5px/1 var(--sans); letter-spacing: .05em; color: var(--mute); text-decoration: none; opacity: .75; transition: opacity var(--t2) var(--ease-out); }
  #credit:hover, #credit:focus-visible { color: var(--ink); opacity: 1; }
  body.idle:not(.tourlock) #credit:not(:hover) { opacity: 0; transition-duration: .8s; }
  @media (prefers-reduced-motion: reduce) { .panel { transition: none; } }
  .tag { display: inline-block; font: 500 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 3px 5px; border-radius: 3px; background: var(--warn); color: #1c0c04; margin-left: 6px; }

  /* etykiety 3D */
  .lbl { pointer-events: auto; cursor: pointer; padding-left: 9px; font: 500 12px/1 var(--sans); color: var(--ink); white-space: nowrap; text-shadow: 0 0 4px #000, 0 0 2px #000; }
  .lbl:hover, .lbl.sel { color: var(--amber); }
  /* hierarchia etykiet: Słońce i planety największe, potem planety karłowate, księżyce i małe ciała, sondy; gwiazdy sąsiednie białe, drobne */
  .lbl[data-key="sun"] { font: 600 14px/1 var(--sans); color: #fff4dc; }
  .lbl-planet { font: 600 13px/1 var(--sans); }
  .lbl-dwarf { font-size: 11.5px; color: #d6cbb0; }
  .lbl-moon { font-size: 10.5px; color: #aeb6c8; }
  .lbl-tno, .lbl-asteroid { font-size: 10.5px; color: #cdbf9f; }
  .lbl-comet { font-size: 10.5px; color: #a6d8d2; }
  .lbl-craft { font-size: 10px; color: var(--cyan); text-shadow: 0 0 3px #000, 0 1px 2px #000; } /* na jasnej tarczy (TMA-1 w Tycho) niebieski ginął */
  .lbl-nearstar { font: 400 10.5px/1 var(--sans); color: #e8ebf2; opacity: .85; }
  .lbl-region.click { pointer-events: auto; cursor: pointer; padding: 6px 8px; } /* większe pole trafienia — tekst ma tylko 10 px */ .lbl-region.click:hover { color: var(--amber) !important; }
  body.embed #topbar, body.embed #leftcol, body.embed #info, body.embed #legend, body.embed #pulse, body.embed #beauty-box, body.embed #tut, body.embed #tut-hole { display: none !important; } /* #ui=0 */
  #info button.ev { background: none; border: 0; padding: 0; color: var(--amber); font: inherit; text-align: left; cursor: pointer; } #info button.ev:hover { text-decoration: underline; }
  .lbl-region { pointer-events: none; font: 500 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(141,150,171,.75); padding: 0; }
  .lbl-region[data-key=pin] { font-weight: 700; color: #ffcf6b; text-shadow: 0 0 3px #000, 0 0 6px #000, 0 1px 2px #000; } /* pinezki wycieczek: na jasnej tarczy planety szary podpis ginął */
  .lbl-arrow { pointer-events: none; color: var(--cyan); font-size: 11.5px; }
  .lbl-ghost { pointer-events: none; font: 400 11px/1 var(--mono); color: #cfe0ff; text-shadow: 0 0 4px #000, 0 0 2px #000; }
  .lbl-lagr { pointer-events: none; font: 500 11px/1 var(--mono); color: var(--cyan); padding: 0; text-shadow: 0 0 4px #000; }
  .lbl-ship { pointer-events: none; font: 500 11px/1.3 var(--mono); color: #ffb3c7; padding: 0 0 0 6px; text-shadow: 0 0 4px #000; white-space: nowrap; }
  .lbl-hoh { position: relative; padding-left: 12px; color: var(--c); }
  .lbl-hoh::before { content: ''; position: absolute; left: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #000, 0 0 10px var(--c); } /* środek kropki = punkt startu/przylotu */
  .lbl-dist { pointer-events: none; display: grid; gap: 1px; padding: 3px 7px; font: 500 12px/1.15 var(--mono); color: var(--ink); background: rgba(8,11,20,.55); border-radius: 4px; white-space: nowrap; }
  .lbl-dist small { color: var(--c) !important; }
  #dist-btn .de, #dist-btn[data-from="earth"] .ds { display: none; } #dist-btn[data-from="earth"] .de { display: inline; }
  #dist-btn[data-from="earth"][aria-pressed="true"] { background: #72c6e0; color: #06121a; }
  #labels.only .lbl:not(.keep) { display: none !important; } /* wycieczka: tylko etykiety ważne dla kroku */
  .lbl-dist small { font: 500 10px/1.2 var(--sans); letter-spacing: .04em; color: var(--mute); }
  .lbl-dist span { font-size: 10.5px; color: var(--ink-soft); }

  [hidden] { display: none !important; }
  /* elementy menu tylko dla wybranych widoków */
  body[data-view="3d"] [data-views]:not([data-views~="3d"]), body[data-view="2d"] [data-views]:not([data-views~="2d"]), body[data-view="sky"] [data-views]:not([data-views~="sky"]),
  body[data-view="sizes"] [data-views]:not([data-views~="sizes"]), body[data-view="gal"] [data-views]:not([data-views~="gal"]) { display: none !important; }
  body[data-view="gal"] #goto-box { display: none; } /* Galaktyka: obiekty wybiera się z podpisów */
  #sizes, #galaxy { position: fixed; inset: 0; pointer-events: none; }
  #mw-box { display: flex; align-items: center; padding: 4px; border-radius: 8px; } #mw-box button { white-space: nowrap; }
  .gx-sun, .gx-bh { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 6px; margin-left: -15px; font-size: 12.5px; background: rgba(4,6,12,.6); border-radius: 12px; text-shadow: none; }
  .gx-sun span { display: grid; gap: 1px; line-height: 1.15; } .gx-sun small { font-size: 10px; color: rgba(242,182,74,.7); }
  .gx-sun i, .gx-bh i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .gx-sun i { border: 1.5px solid var(--amber); box-shadow: 0 0 0 0 rgba(242,173,74,.6); animation: gx-pulse 2s ease-out infinite; }
  .gx-bh i { border: 1.5px solid #ffd9a0; background: #000; }
  .gx-sun { color: var(--amber); }
  @keyframes gx-pulse { to { box-shadow: 0 0 0 12px rgba(242,173,74,0); } }
  @media (prefers-reduced-motion: reduce) { .gx-sun i { animation: none; } }
  #galaxy .lbl-region { padding: 3px 7px; background: rgba(4,6,12,.6); border-radius: 3px; color: #d4dae6; text-shadow: none; } /* ciemne tło bez ramki: na jasnym dysku sam tekst ginął */
  /* zasłona ładowania: czerń do startu modułu; napis dopiero po 0,8 s, żeby przy szybkim wejściu nie mignął */
  #boot { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: #000; }
  #boot span { font: 500 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); opacity: 0; animation: boot-in .6s ease-out .8s forwards, boot-pulse 1.6s ease-in-out 1.4s infinite alternate; }
  @keyframes boot-in { to { opacity: 1; } }
  @keyframes boot-pulse { from { opacity: 1; } to { opacity: .35; } }
  @media (prefers-reduced-motion: reduce) { #boot span { animation: boot-in .01s linear .8s forwards; } }
  /* intro: czarny ekran z cytatem, potem przelot; UI ukryte do końca */
  #flat-fade { position: fixed; inset: 0; z-index: 50; background: #000; opacity: 0; pointer-events: none; transition: opacity 3s ease-in-out; } /* ciemność po odlocie Halo */
  /* napisy pokazu spłaszczenia: jak cytat w intro, ale na dole */
  #flat-sub { position: fixed; left: 0; right: 0; bottom: calc(var(--gap) + 52px); z-index: 52; display: flex; justify-content: center; padding: 0 24px; pointer-events: none; }
  #flat-sub p { margin: 0; max-width: 980px; text-align: center; font: 600 clamp(18px, 2.4vw, 30px)/1.25 var(--display); letter-spacing: .01em; text-wrap: balance; text-shadow: 0 0 24px #000, 0 0 6px #000; opacity: 0; transform: translateY(8px); transition: opacity 1.2s ease-out, transform 1.8s ease-out; }
  #flat-sub.on p { opacity: 1; transform: none; }
  #flat-stop { position: fixed; right: var(--gap); bottom: var(--gap); z-index: 51; background: rgba(10,14,26,.6); color: var(--ink-soft); transition: opacity .6s ease-out; }
  /* pokaz spłaszczenia = film: całe UI i podpisy znikają, kamery nie da się ruszyć; przycisk przerwania tylko po ruchu myszą (Esc też przerywa) */
  body.flat > :not(#stage):not(#theatrejs-studio-root):not(#flat-fade):not(#flat-sub):not(#flat-stop):not(script) { opacity: 0 !important; pointer-events: none !important; transition: opacity .8s ease-out; }
  body.flat #stage { pointer-events: none; cursor: none; }
  body.flat:not(.flat-ui) #flat-stop { opacity: 0; pointer-events: none; }
  /* samouczek: podświetlenie (ramka z przyciemnieniem wokół) + dymek */
  #keys { position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 50; width: min(640px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; padding: 16px 18px; color: var(--ink); }
  #keys::backdrop { background: rgba(2,4,10,.6); }
  #keys h2 { margin: 0 0 10px; font: 600 15px var(--sans); }
  #keys dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 10px; align-items: center; }
  @media (min-width: 600px) { #keys dl { grid-template-columns: auto 1fr auto 1fr; } }
  #keys dt { text-align: right; } #keys dd { margin: 0; font-size: 13px; }
  #keys kbd { display: inline-block; min-width: 1.4em; padding: 2px 6px; font: 500 12px var(--mono); text-align: center; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--panel-solid); }
  #keys form { text-align: right; margin: 0; }
  #tut-hole { position: fixed; z-index: 40; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(2,4,10,.62); outline: 2px solid var(--amber); outline-offset: 2px; transition: left var(--t3) var(--ease-move), top var(--t3) var(--ease-move), width var(--t3) var(--ease-move), height var(--t3) var(--ease-move), outline-color var(--t2); }
  #tut-hole.center { outline-color: transparent; }
  #tut-hole.lite { box-shadow: 0 0 0 9999px rgba(2,4,10,.22); } /* zadanie przy elemencie: scena widoczna, bo w niej widać efekt */
  #tut-hole.pulse { animation: tut-pulse 1.2s ease-in-out infinite; } @keyframes tut-pulse { 50% { outline-offset: 8px; outline-color: #ffd27a; } }
  @media (prefers-reduced-motion: reduce) { #tut-hole.pulse { animation: none; outline-width: 3px; } }
  #tut-try { margin: 0; padding: 7px 10px; font-size: 13px; line-height: 1.5; color: var(--ink); border-left: 3px solid var(--amber); border-radius: 0 6px 6px 0; background: rgba(242,182,74,.08); transition: border-color var(--t2), background-color var(--t2); }
  #tut-try b { color: var(--amber); }
  #tut.ok #tut-try { border-left-color: #6fd08c; background: rgba(111,208,140,.16); } #tut.ok #tut-try b { color: #6fd08c; } #tut.ok #tut-try b::before { content: '✓ '; }
  /* zaliczenie kroku: zielona ramka z błyskiem, ✓ wskakuje, pasek odlicza do następnego kroku; nowy krok wjeżdża */
  #tut.ok { border-color: #6fd08c; animation: tut-ok .6s var(--ease-move, ease-out); }
  @keyframes tut-ok { 0% { box-shadow: 0 0 0 0 rgba(111,208,140,.75); } 100% { box-shadow: 0 0 0 18px rgba(111,208,140,0); } }
  #tut.ok #tut-try b::before { content: '✓'; margin-right: .3em; display: inline-block; animation: tut-check .45s cubic-bezier(.3,1.6,.5,1); }
  @keyframes tut-check { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }
  #tut.ok::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 2px; background: #6fd08c; transform-origin: left; animation: tut-bar 4s linear forwards; }
  @keyframes tut-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  #tut.enter { animation: tut-enter .35s var(--ease-move, ease-out); } @keyframes tut-enter { from { opacity: 0; transform: translateY(10px); } }
  [data-tut].done::after { content: '✓'; margin-left: 6px; color: #6fd08c; font-weight: 700; } /* Pomoc: poziom samouczka przejrzany do końca */
  .tut-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  #tut-dots { display: flex; gap: 5px; } #tut-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.18); transition: background-color var(--t2), transform var(--t2); }
  #tut-dots i.on { background: var(--amber); transform: scale(1.25); } #tut-dots i.ok { background: #6fd08c; }
  @media (prefers-reduced-motion: reduce) { #tut.ok, #tut.enter, #tut.ok #tut-try b::before { animation: none; } #tut.ok::after { animation-duration: .01s; } }
  #tut-find { font-size: 13px; line-height: 1.5; color: var(--ink-soft); } #tut-find b { color: var(--ink); } #tut-find ul { margin: 4px 0 0; padding-left: 18px; }
  #tut { position: fixed; z-index: 41; width: 340px; max-width: calc(100% - 2 * var(--gap)); box-sizing: border-box; padding: 14px 16px; display: grid; gap: 8px; transition: left var(--t3) var(--ease-move), top var(--t3) var(--ease-move); }
  #tut h3 { margin: 0; font: 700 22px/1.1 var(--display); letter-spacing: .02em; text-wrap: balance; }
  #tut p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
  #tut .tour-nav { align-items: center; }
  #tut-skip { margin-right: auto; }
  .tut-ico { display: inline-grid; place-items: center; width: 24px; height: 22px; margin: 0 2px; vertical-align: -6px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.04); color: var(--amber); }
  .tut-ico svg { width: 15px; height: 15px; }
  .tut-li { display: inline-grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; margin: 2px 0; } .tut-li > .tut-ico { margin: 0; }
  .tut-ico .de, .tut-ico.d-earth .ds { display: none; } .tut-ico.d-earth .de { display: inline; }
  .tut-ico.d-sun { background: var(--amber); color: var(--on-amber); border-color: var(--amber); } .tut-ico.d-earth { background: #72c6e0; color: #06121a; border-color: #72c6e0; }
  [data-pop="help"] > .help-row { display: flex; flex-wrap: wrap; gap: 8px; }
  [data-pop="help"] > .help-h { margin: 14px 0 10px; font: 600 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); } /* sekcja: wyraźnie nad opcjami (13,5 px) i opisami (12 px) */
  .help-set { display: grid; gap: 9px; } .help-set label { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); cursor: pointer; } .help-set input { width: 16px; height: 16px; margin: 0; accent-color: var(--amber); cursor: pointer; } /* ustawienia: zwykłe pola wyboru */
  [data-pop="help"] > .help-h:first-child { margin-top: 2px; }
  [data-pop="help"] > p { margin: 0; }
  [data-pop="help"] .help-sub { margin: 10px 0 6px; font: 500 11px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); } /* Samouczki: widok, pod nim jego poziomy */
  [data-pop="help"] .help-col { display: grid; justify-items: start; gap: 6px; margin: 0; }
  [data-pop="help"] .help-col > button { display: inline-flex; align-items: center; gap: 8px; min-width: 190px; }
  [data-pop="help"] > #changes { margin-top: 16px; }
  #tuts { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); } #tuts > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font: 600 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); } /* Samouczki: rozwijane, żółty trójkąt */
  #tuts > summary::-webkit-details-marker { display: none; }
  #tuts > summary::before { content: ''; border: 5px solid transparent; border-left: 7px solid var(--amber); border-right: 0; transition: transform .2s; } #tuts[open] > summary::before { transform: rotate(90deg); }
  #tuts[open] > summary { margin-bottom: 8px; }
  [data-pop="help"] > .help-lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13.5px; color: var(--ink); }
  .help-touch { display: none; margin: -5px 0 0 26px !important; font-size: 12px; } @media (hover: none) { .help-touch { display: block; } } /* telefon: jak wywołać podpowiedź */
  [data-pop="help"] > .help-gap { margin-top: 16px; }
  .coffee-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
  .coffee-row > span { font-size: 13.5px; color: var(--ink-soft); }
  .coffee-logo { display: block; flex: none; opacity: .85; } .coffee-logo:hover { opacity: 1; }
  .coffee-logo img { display: block; height: 22px; width: auto; }
  .help-coffee { flex-direction: column; align-items: flex-start; padding-top: 12px; }
  .help-coffee .coffee-logo img { height: 15px; } /* o 30% mniejsze niż na powitaniu */
  .help-coffee > span { font-size: inherit; }
  .chg { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 12px; line-height: 1.45; }
  .chg dt { color: var(--amber); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .chg dd { margin: 0; color: var(--ink-soft); }
  #changes summary, #sources summary { cursor: pointer; font-size: 12.5px; color: var(--ink); }
  @media (max-width: 760px) { #tut { width: auto; right: var(--gap); } }
  #fade { position: fixed; inset: 0; z-index: 4; background: #000; opacity: 0; pointer-events: none; transition: opacity .35s ease-in-out; }
  body.mw #side #clock { width: auto; } /* zegar galaktyczny: „−66,0 mln lat” */
  #galaxy .gx-gc { font-size: 9.5px; padding: 2px 6px; color: #e8d9b8; }
  #galaxy .gx-title { font: 600 16px/1 var(--display) !important; letter-spacing: .3em !important; color: var(--amber) !important; padding: 5px 10px; } /* najważniejszy podpis widoku */
  .sizes-labels { position: fixed; inset: 0; pointer-events: none; }
  .sz-lbl { pointer-events: auto; cursor: pointer; display: grid; justify-items: center; gap: 2px; padding-bottom: 4px; text-align: center; text-shadow: 0 0 4px #000, 0 0 2px #000; }
  .sz-lbl b { font: 700 15px/1 var(--display); letter-spacing: .02em; color: var(--ink); }
  .sz-lbl:hover b { color: var(--amber); } /* nazwa klikalna */
  .sz-3d { visibility: hidden; margin-left: 6px; padding: 1px 5px; min-height: 0; border: 1px solid var(--amber); border-radius: 4px; background: none; color: var(--amber); font: 600 10px/1.3 var(--mono); vertical-align: 2px; cursor: pointer; } /* podgląd 3D: miejsce zawsze zarezerwowane (podpisy nie skaczą) */
  .sz-lbl:hover .sz-3d, .sz-lbl.sz-focus .sz-3d { visibility: visible; } .sz-3d:hover { background: var(--amber); color: var(--on-amber); }
  .sz-lbl span { font: 400 10.5px/1.2 var(--mono); color: var(--mute); white-space: nowrap; }
  .sz-moon { justify-items: start; text-align: left; padding: 0 0 0 4px; }
  .sz-moon b { font-size: 12px; color: #c5ccdb; }
  .sz-moon.sz-up { justify-items: center; text-align: center; padding: 0 0 4px; } /* duży księżyc w kadrze: podpis nad tarczą */
  .sz-small span { display: none; }
  .sz-zoom { pointer-events: auto; right: var(--gap); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; padding: 8px 4px; color: var(--mute); font: 400 16px/1 var(--mono); }
  .sz-zoom input { writing-mode: vertical-lr; direction: rtl; height: 220px; width: 24px; margin: 0; accent-color: var(--amber); cursor: pointer; }
  .sz-zoom[hidden] { display: none; }
  @media (max-width: 760px) {
    .sz-zoom { position: static; transform: none; flex: 1 1 140px; flex-direction: row; padding: 0 10px; } /* w górnym pasku obok resetu i „Tylko obiekty” */
    .sz-zoom input { writing-mode: horizontal-tb; direction: ltr; flex: 1; height: 36px; width: auto; }
  }
  .sz-groups { pointer-events: auto; left: 50%; transform: translateX(-50%); bottom: 92px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px; } /* Obiekty: kategorie (dół), podkategorie nad nimi */
  .sz-cats, .sz-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
  .sz-groups { width: max-content; max-width: calc(100vw - 32px); } .sz-cats { flex-wrap: nowrap; } /* kategorie zawsze w jednym rzędzie (bez max-content panel przy left: 50% zwężał się do połowy ekranu) */
  .sz-catbox:not([hidden]) { display: flex; padding: 3px; border-radius: 8px; pointer-events: auto; } .sz-catbox[hidden] { display: none; }
  .sz-catbox .sz-cats { gap: 2px; } /* jak pasek wycieczek i pomocy: ikony bez tła i ramki, tło tylko wybranej */
  .sz-catbox .sz-cats button { display: grid; place-items: center; min-width: 0; width: 40px; height: 32px; min-height: 0; padding: 0; background: none; border: 0; border-radius: 6px; color: var(--ink-soft); }
  .sz-catbox .sz-cats button:hover { background: var(--btn); color: var(--ink); }
  .sz-catbox .sz-cats button[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); }
  .sz-catbox svg { width: 20px; height: 20px; }
  body.beauty .sz-catbox, body.touring .sz-catbox, body.pv .sz-catbox { display: none !important; }
  @media (min-width: 761px) { /* komputer i tablet: kategorie w górnym pasku, pod nim osobne panele podkategorii i kolejności — dół wolny na kartę */
    #topbar .sz-catbox { position: static; flex: none; } #views { order: -1; } /* kolejność w pasku (każdy widok): widoki, lista obiektów, reszta (Obiekty: kategorie) */
    .sz-groups { top: calc(var(--top-h, 56px) + 6px); bottom: auto; background: none; border: 0; padding: 0; gap: 6px; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; }
    .sz-groups .sz-sub, .sz-groups .sz-ord { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
    .sz-groups .sz-sub { order: -1; }
    .sz-groups:not(:has(.sz-sub:not([hidden]), .sz-ord:not([hidden]))) { display: none; }
  }
  @media (max-width: 760px) { /* telefon: kategorie w rzędzie z paskiem wycieczek i pomocy, przyciski tej samej wysokości */
    .sz-catbox:not([hidden]) { position: static; flex: none; order: 0; } /* Obiekty: kategorie w górnym pasku z lewej, lista obiektów obok */
    body.sizes #goto-box { order: 1; flex: 1 1 120px; }
    body.sizes .sz-zoom:not([hidden]) { position: fixed; z-index: 5; right: var(--gap); bottom: 22px; top: auto; transform: none; display: flex; flex-direction: row; width: calc(100vw - 2 * var(--gap) - var(--rail-w, 170px) - 8px); box-sizing: border-box; height: 44px; padding: 0 10px; } /* suwak skali na dole obok paska ikon */
    body.sizes .sz-zoom input { writing-mode: horizontal-tb; direction: ltr; flex: 1; height: 36px; width: auto; }
    body.sizes .sz-groups.sz-groups { top: calc(var(--top-h, 104px) + 6px); bottom: auto; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; background: none; border: 0; padding: 0; } /* podmenu u góry: podkategorie i ikony kolejności w jednym rzędzie */
    body.sizes .sz-groups .sz-sub { order: -1; }
    body.sizes .sz-groups .sz-sub, body.sizes .sz-groups .sz-ord { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px; display: flex; gap: 2px; }
    body.sizes .sz-groups .sz-sub button { padding: 4px 8px; }
    body.sizes .sz-groups .sz-ord button { width: 34px; min-height: 32px; padding: 0; display: grid; place-items: center; }
    body.sizes .sz-groups .sz-ord button span { display: none; }
    .sz-catbox .sz-cats button { width: 38px; height: 36px; }
    body.sizes #rail { align-self: flex-start; gap: 2px; } body.sizes .sz-groups { bottom: calc(var(--bot-h, 120px) + 10px); }
  }
  .sz-sub[hidden], .sz-ord[hidden], .sz-ord button[hidden] { display: none; }
  .sz-ord { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; } /* kolejność w rzędzie */
  .sz-groups .sz-ord button { min-height: 26px; padding: 2px 10px; font-size: .86em; border: 1px solid transparent; } /* kolejność: niższe, wybrana — żółta ramka i tekst (kategorie mają tło) */
  .sz-groups .sz-ord button[aria-pressed="true"] { background: none; border-color: var(--amber); color: var(--amber); }
  .sz-v { font: 500 11px/1.2 var(--mono); font-style: normal; color: var(--amber); white-space: nowrap; } .sz-v:empty { display: none; } /* wartość, wg której ułożono rząd */
  .pv-box { pointer-events: auto; left: 50%; transform: translateX(-50%); bottom: var(--gap); width: max-content; max-width: min(860px, calc(100% - var(--side-w, 0px) - 3 * var(--gap))); max-height: 46%; overflow-y: auto; padding: 12px 18px; box-sizing: border-box; } /* Obiekty: karta podglądu 3D — jak karta obiektu w 3D */
  .pv-box header { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
  .pv-box .ttl { min-width: 150px; } .pv-box h2 { margin: 3px 0 0; font: 700 30px/1 var(--display); color: var(--ink); } .pv-box .lab { font-size: 12px; color: var(--mute); } .pv-box .lab:empty { display: none; }
  .pv-box .keys { display: flex; gap: 12px 28px; flex-wrap: wrap; flex: 1; } .pv-box .key { display: grid; gap: 3px; } .pv-box .key span { font-size: 12px; color: var(--mute); }
  .pv-box .key b { font: 500 14px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
  .pv-box .desc { margin: 12px 0 0; max-width: 92ch; font-size: 13px; line-height: 1.5; color: var(--ink-soft); } .pv-box .desc:empty { display: none; }
  .pv-acts { display: flex; gap: 6px; align-items: center; margin-left: auto; } .pv-acts button.icon { display: grid; place-items: center; width: 36px; height: 34px; padding: 0; background: none; border: 0; border-radius: 6px; color: var(--ink-soft); }
  .pv-acts button.icon:hover { background: var(--btn); color: var(--ink); } .pv-acts .pv-more[aria-expanded="true"] { background: var(--amber); color: var(--on-amber); } .pv-acts .pv-voice { color: var(--amber); } .pv-acts .pv-voice[hidden] { display: none; }
  .pv-voice .vo-stop, .pv-voice[aria-pressed="true"] .vo-wave { display: none; } .pv-voice[aria-pressed="true"] .vo-stop { display: inline; } .pv-voice[aria-pressed="true"] { background: var(--btn); }
  .pv-box .keys { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); } .pv-box .desc[hidden] { display: none; } /* jak karta 3D: liczby pod nagłówkiem, opis po rozwinięciu */ .pv-acts button { background: var(--btn); border: 0; border-radius: 4px; padding: 7px 12px; color: var(--ink); font-weight: 500; white-space: nowrap; } .pv-acts button[hidden] { display: none; }
  .pv-backbox { display: flex; padding: 3px; border-radius: 8px; pointer-events: auto; } .pv-backbox[hidden], body.beauty .pv-backbox { display: none !important; } /* „Tylko obiekty”: bez przycisku powrotu */ #topbar .pv-backbox { position: static; flex: none; }
  .pv-backbox .pv-back { display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 6px; background: var(--amber); color: var(--on-amber); }
  @media (max-width: 760px) { .pv-backbox { position: fixed; right: var(--gap); bottom: 22px; z-index: 6; } .pv-backbox .pv-back { width: 40px; height: 36px; }
    .pv-box { bottom: calc(var(--bot-h, 120px) + 10px); left: var(--gap); right: var(--gap); transform: none; width: auto; max-width: none; max-height: 40%; padding: 8px 12px; }
    .pv-box h2 { font-size: 20px; } .pv-box header { gap: 6px 14px; } .pv-box .ttl { min-width: 0; } .pv-box .keys { gap: 8px 14px; } .pv-box .key b { font-size: 13px; } }
  body.pv .sz-catbox { display: none !important; }
  .pv-box[hidden], body.pv .sz-groups, body.pv .sz-bar, body.pv .sz-zoom, body.pv .sizes-labels { display: none !important; }
  .sz-groups .sz-sub button { padding: 4px 10px; font-size: .92em; }
  .sz-groups button { background: none; border: 0; border-radius: 4px; padding: 6px 12px; color: var(--mute); font-weight: 500; white-space: nowrap; }
  .sz-groups button:hover { color: var(--ink); background: var(--btn); }
  .sz-groups button[aria-pressed="true"] { color: var(--on-amber); background: var(--amber); }
  .sz-groups[hidden], body.beauty .sz-groups, body.touring .sz-groups { display: none; }
  .sz-cats button { display: grid; place-items: center; min-width: 44px; min-height: 40px; padding: 0 10px; } /* ikony kategorii */
  @media (max-width: 760px) { .sz-groups { bottom: calc(var(--bot-h, 120px) + 10px); } .sz-groups button { padding: 6px 9px; } .sz-cats button { min-height: 44px; } .sz-groups .sz-sub button { min-height: 32px; padding: 4px 10px; } } /* podkategorie niższe — nie dublują wysokości ikon */
  .sz-hint { justify-items: end; text-align: right; max-width: 170px; padding: 0 16px 0 0; }
  .sz-hint span { white-space: normal; }
  .sz-ring { pointer-events: auto; cursor: pointer; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--amber); background: rgba(255, 190, 110, .18); box-shadow: 0 0 10px rgba(255, 190, 110, .55); }
  .sz-bar { pointer-events: auto; cursor: ew-resize; touch-action: none; position: fixed; left: 50%; transform: translateX(-50%); bottom: 44px; height: 10px; border: 1px solid var(--amber); border-top: 0; color: var(--amber); font: 400 11px/1 var(--mono); white-space: nowrap; box-sizing: content-box; }
  .sz-bar::after { content: ''; position: absolute; inset: -12px -12px -28px; } /* większy obszar chwytu (z podpisem) */
  .sz-bar span { position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%); } /* podpis pod miarką, na środku */
  @media (max-width: 760px) { .sz-bar { bottom: calc(var(--bot-h, 120px) + var(--sz-chips, 56px) + 34px); } } /* telefon: miarka nad przyciskami kategorii i dolnymi panelami */
  #map2d { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; background: var(--void); }
  .lbl-const { pointer-events: none; font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(140,165,215,.8); padding: 0; }
  .lbl-skystar { pointer-events: none; font-size: 11px; color: #e8dcc0; }
  .lbl-skystar.des { font-size: 10px; color: #b5aa92; } /* oznaczenie Bayera/Flamsteeda, gdy gwiazda nie ma nazwy */
  .lbl-const.cur { color: #ffd27a; } /* gwiazdozbiór w środku ekranu (skyCur) */
  .lbl-const.hi { color: #ffd27a; font-size: 14px; font-weight: 700; } /* gwiazdozbiór wyróżniony w kroku wycieczki (skyConst) */
  /* kółko na gwieździe w kroku wycieczki (skyMark); .boom — rozchodzące się fale wybuchu */
  .sky-mark { pointer-events: none; position: relative; width: 0; height: 0; padding: 0; }
  .sky-mark i { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; box-sizing: border-box; border: 2px solid var(--c); border-radius: 50%; box-shadow: 0 0 10px var(--c); }
  .sky-mark i + i { display: none; }
  .sky-mark.boom i { animation: skyBoom 2.6s ease-out infinite; }
  .sky-mark.boom i + i { display: block; animation-delay: 1.3s; }
  @keyframes skyBoom { from { transform: scale(.35); opacity: 1; } to { transform: scale(3.4); opacity: 0; } }
  .sky-mark b { position: absolute; left: 0; top: 24px; transform: translateX(-50%); font: 600 13px/1.2 var(--sans); color: var(--c); white-space: nowrap; text-shadow: 0 0 4px #000, 0 0 8px #000; }
  @media (prefers-reduced-motion: reduce) { .sky-mark.boom i { animation: none; } .sky-mark.boom i + i { display: none; } }
  .lbl-card { pointer-events: none; font: 700 16px/1 var(--display); color: var(--amber); padding: 0; text-shadow: 0 0 6px #000; }
  #info .acts button.icon#btn-zoom[aria-pressed="true"] { color: var(--amber); } /* niebo: śledzenie włączone */
  .lbl-card.sub { font-size: 12px; opacity: .8; }
  .sky-bortle { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; margin-top: 6px; }
  .sky-bortle input { flex: 1; min-width: 0; min-height: 28px; accent-color: var(--amber); }
  .sky-bortle output { flex-basis: 100%; font-size: 11.5px; line-height: 1.35; color: var(--ink-soft); } .sky-bortle output b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; } /* opis klasy w osobnym wierszu — menu się nie rozpycha */
  @media (pointer: coarse) { .sky-bortle input { min-height: 44px; } }
  .msr { width: 0; height: 0; pointer-events: none; padding: 0; --d: 10px; --r: 1; --a: 0deg; } /* katalog Messiera (updateMessier): rozmiar, spłaszczenie i obrót z CSS */
  .msr i { position: absolute; left: 0; top: 0; width: var(--d); height: calc(var(--d) * var(--r)); transform: translate(-50%, -50%) rotate(var(--a)); border: 1.4px solid currentColor; border-radius: 50%; opacity: .85; pointer-events: none; } /* klik liczy msrAt na płótnie — przeciąganie od znacznika też obraca niebo */
  .msr b { position: absolute; left: calc(var(--d) * .35 + 4px); top: calc(var(--d) * .3); font: 500 10px/1 var(--sans); white-space: nowrap; text-shadow: 0 0 4px #000; }
  .msr.gal { color: #ff8f7a; } .msr.gcl { color: #f2d36b; } .msr.ocl { color: #f2d36b; } .msr.ocl i { border-style: dashed; } .msr.neb { color: #7fe0b0; } .msr.neb i { border-radius: 22%; } .msr.pn { color: #7fe0b0; } .msr.pn i { border-width: 2.4px; }
  .lbl-grid {pointer-events: none; font: 500 10px/1 var(--sans); padding: 0; text-shadow: 0 0 4px #000; }
  .lbl-grid.g-az { color: #e0956a; }
  .lbl-grid.g-eq { color: #8fb4f0; }
  #night { display: none; position: fixed; inset: 0; background: #d00; mix-blend-mode: multiply; pointer-events: none; z-index: 2147483647; } /* tryb nocny: biel → czerwień, niebieski → czerń */
  body.night[data-view="sky"] #night { display: block; }
  @media (pointer: fine) { #btn-gyro { display: none !important; } } /* tylko telefony i tablety */
  #tour { right: var(--gap); top: max(64px, calc(var(--top-h, 58px) + 6px)); width: 340px; padding: 14px 16px; display: grid; gap: 8px; z-index: 6; }
  #tour-fig { position: fixed; right: var(--gap); width: 340px; height: 200px; padding: 0; z-index: 6; pointer-events: none; } /* wykres kroku pod panelem wycieczki (top z JS) */
  @media (max-width: 760px) { #tour-fig { left: var(--gap); right: var(--gap); width: auto; height: 150px; } }
  #tour header { display: flex; justify-content: space-between; align-items: center; }
  #tour h3 { margin: 0; font: 700 22px/1.1 var(--display); letter-spacing: .02em; color: var(--ink); text-wrap: balance; }
  #tour p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
  .tour-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
  .tour-list { display: grid; gap: 4px; }
  #tour-prog { position: relative; height: 3px; background: var(--line); border-radius: 2px; cursor: pointer; touch-action: none; } #tour-prog::before { content: ''; position: absolute; inset: -9px 0; } /* większe pole chwytu */
  #tour-bar { position: relative; display: block; height: 100%; width: 0; background: var(--amber); border-radius: 2px; } #tour-bar::after { content: ''; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--amber); } /* uchwyt przewijania */
  #tour .tour-nav { align-items: center; } #tour-mute { margin-left: auto; min-width: 40px; } #tour-play { min-width: 40px; } #tour-next { min-width: 84px; }
  /* pokaz: widz tylko ogląda — panele schowane, scena i zegar bez sterowania */
  body.tourlock #topbar, body.tourlock #toolrow, body.tourlock #pop, body.tourlock #legend, body.tourlock #info, body.tourlock #cam-note { display: none !important; }
  body.tourlock #stage, body.tourlock #labels, body.tourlock #side, body.tourlock #galaxy { pointer-events: none; }
  body.tourlock #gx-epochs, body.tourlock #mw-box { display: none !important; }
  body.tourlock #side .rate, body.tourlock #side .t-acts, body.tourlock #side > :not(.t-top) { display: none; } /* w pokazie zostaje tylko data i godzina */
  body.tourlock #side { width: max-content !important; min-width: 0; padding-right: 16px; }
  .egg-list { list-style: none; margin: 0; padding: 0; display: grid; }
  .egg-list li { display: grid; gap: 1px 6px; padding: 6px 4px; border-top: 1px solid rgba(35,45,71,.6); }
  .egg-list { counter-reset: egg; } .egg-list li { grid-template-columns: 18px 1fr; font-size: 12.5px; color: var(--ink-soft); }
  .egg-list li::before { counter-increment: egg; content: counter(egg); font: 500 11px/1.6 var(--mono); color: var(--amber); }
  .tour-list button { text-align: left; background: var(--btn-deep); padding: 7px 10px; }
  .tour-list .vo { vertical-align: -2px; margin-left: 4px; color: var(--amber); }
  .tour-list button small { display: block; color: var(--mute); font-size: 11px; margin-top: 2px; }
  .tour-grp > summary { cursor: pointer; font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--amber); padding: 8px 2px; list-style: none; }
  .tour-grp > summary::-webkit-details-marker { display: none; }
  .tour-grp > summary::before { content: '▸ '; } .tour-grp[open] > summary::before { content: '▾ '; }
  .tour-grp > summary small { color: var(--mute); letter-spacing: 0; text-transform: none; }
  .tour-grp > button { display: block; width: 100%; margin-bottom: 4px; } .tour-grp[open] { padding-bottom: 6px; }
  .tour-list button:disabled { opacity: .5; cursor: default; }
  /* wycieczki: okno na środku ekranu (#pop.center), 4 karty kategorii ze zrzutami z modelu, potem lista wycieczek kategorii */
  #leftcol:has(#pop.center) { z-index: 30; } /* nad paskiem widoków i panelami */
  #pop.center { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1080px, calc(100vw - 2 * var(--gap))); max-height: min(88vh, 900px); padding: 16px 20px 20px; gap: 12px;
    box-shadow: 0 0 0 100vmax rgba(2, 4, 10, .6), 0 24px 70px rgba(0, 0, 0, .6); }
  #pop.center h3 { font-size: 12px; }
  .tour-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; } /* szeroko: 4 w rzędzie, węziej 2, telefon 1 */
  .tour-cats[hidden], .tour-cat-list[hidden] { display: none; }
  .tour-list .tour-cat { display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--btn-deep); transition: border-color var(--t1), transform var(--t2) var(--ease-out), scale var(--t2) var(--ease-out), opacity var(--t2) var(--ease-out), translate var(--t2) var(--ease-out); }
  .tour-cat img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: filter var(--t2) var(--ease-out); filter: brightness(.85); }
  .tour-list .tour-cat:hover, .tour-list .tour-cat:focus-visible { border-color: var(--amber); transform: translateY(-2px); }
  .tour-cat:hover img, .tour-cat:focus-visible img { filter: brightness(1.05); }
  .tc-lvl { padding: 12px 16px 0; font: 500 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
  .tour-cat b { padding: 6px 16px 0; font: 600 22px/1.15 var(--display); color: var(--ink); }
  .tc-desc { padding: 6px 16px 14px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
  .tc-n { margin-top: auto; padding: 10px 16px 14px; font-size: 12px; color: var(--mute); }
  .tour-cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; align-items: start; }
  .tc-bar { display: block; margin: auto 16px 0; /* przy dole karty — równo we wszystkich kartach */ height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
  .tc-bar i { display: block; height: 100%; width: 0; background: var(--amber); transition: width var(--t3) var(--ease-move); }
  .tc-n { margin-top: 0; }
  /* obejrzane: kółko przed tytułem wycieczki, po obejrzeniu bursztynowe z ptaszkiem */
  .tour-cat-list > button[data-tour] { position: relative; padding-left: 38px; }
  .tour-cat-list > button[data-tour]::before { content: ''; position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; margin-top: -9px; border: 1.5px solid var(--line); border-radius: 50%; box-sizing: border-box; }
  .tour-cat-list > button[data-tour].seen::before { content: '✓'; border-color: var(--amber); background: var(--amber); color: var(--on-amber); font: 700 11px/13px var(--sans); text-align: center; }
  .egg-list li.seen::before { content: '✓'; color: #5fd38a; }
  .egg-list li.seen { color: var(--ink); }
  .egg-count { margin: 0; font-size: 12px; color: #5fd38a; } .egg-count:empty { display: none; }
  .tc-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
  .tc-head h4 { margin: 0; font: 600 20px/1.2 var(--display); color: var(--ink); }
  .tc-head h4 small { font: 500 12px/1 var(--sans); color: var(--mute); }
  .tour-list .tc-back { background: none; padding: 6px 8px; white-space: nowrap; }
  .tour-cat-list > button[data-tour], .tour-cat-list > button:disabled { height: 100%; }
  @media (max-width: 760px) {
    #pop.center { width: min(calc(100vw - 2 * var(--gap)), 640px); max-height: 82vh; padding: 12px 14px 14px; }
    .tour-cat-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } /* szeroki telefon: dwie kolumny */
    .tour-cats { grid-template-columns: repeat(2, 1fr); gap: 8px; } /* szeroki telefon: 2 × 2, zrzut nad tekstem */
    .tour-cat img { aspect-ratio: 16 / 7; }
    .tc-lvl { padding: 8px 10px 0; font-size: 10px; } .tour-cat b { padding: 2px 10px 0; font-size: 16px; }
    .tc-desc { padding: 3px 10px 0; font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; } /* najwyżej 2 linie — 4 karty bez przewijania */
    .tc-n { padding: 4px 10px 8px; font-size: 11px; } .tc-bar { margin: 6px 10px 0; height: 3px; }
  }
  @media (max-width: 519px) {
    .tour-cat-list, .tour-cats { grid-template-columns: 1fr; } /* wąski telefon: karta w linii — tekst po lewej, zrzut po prawej */
    .tour-list .tour-cat { display: grid; grid-template-columns: 1fr 34%; grid-template-rows: auto auto 1fr auto auto; }
    .tour-cat img { grid-column: 2; grid-row: 1 / span 5; height: 100%; aspect-ratio: auto; } /* zrzut na całą wysokość karty */
  }
  @media (prefers-reduced-motion: reduce) { .tour-list .tour-cat { transition: none; } .tour-list .tour-cat:hover { transform: none; } }
  .tour-list .soon { font: 500 10px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; margin-left: 6px; vertical-align: 1px; }
  #pulse { right: var(--gap); top: calc(var(--top-h, 64px) + 6px); width: 230px; box-sizing: border-box; padding: 10px 12px; display: grid; gap: 8px; }
  .p-bar { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "lab lab x" "time time time" "dist dist dist" "rl rate rate"; align-items: center; gap: 4px 10px; white-space: nowrap; }
  .p-lab { grid-area: lab; } #pulse-time { grid-area: time; } #pulse-dist { grid-area: dist; } .p-rl { grid-area: rl; font-size: 11.5px; color: var(--mute); } #pulse .stepper { grid-area: rate; justify-self: start; } #pulse-close { grid-area: x; }
  .p-lab { font: 500 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--light); }
  #pulse-time { font: 500 26px/1.1 var(--display); color: var(--light); }
  #pulse-dist { color: var(--ink-soft); font-size: 12.5px; }
  #pulse .stepper { flex: none; }
  #pulse .stepper button { width: 26px; }
  #pulse-log summary { cursor: pointer; font-size: 11.5px; color: var(--mute); border-top: 1px solid var(--line); padding-top: 8px; }
  #pulse-list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 140px; overflow-y: auto; display: grid; gap: 2px; font-size: 12px; }
  #pulse-list li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 2px; }
  .hit { pointer-events: none; font: 500 11px/1 var(--mono); color: var(--on-amber); background: var(--light); padding: 3px 6px; border-radius: 3px; white-space: nowrap; box-shadow: 0 0 10px rgba(255,233,168,.5); }
  @media (max-width: 760px) {
    :root { --gap: 8px; }
    #topbar { left: var(--gap); right: var(--gap); transform: none; flex-wrap: wrap; }
    #views { overflow-x: auto; max-width: 100%; }
    #views button { padding: 7px 10px; }
    #leftcol { top: auto; right: var(--gap); width: auto; flex-direction: column-reverse; }
    #toolrow { flex-direction: column-reverse; align-items: stretch; flex: none; }
    #rail { flex-direction: row; align-self: center; gap: 8px; } /* pasek ikon na miarę ikon, na środku */
    #pop { width: min(100%, 440px); align-self: center; max-height: 55vh; } /* na środku, nie na całą szerokość */
    #pop:has(#pop-time:not([hidden])) { width: min(100%, 360px); } /* czas: tylko data i dwa przyciski */
    #side { width: auto; max-width: 100%; align-self: center; display: flex; align-items: center; gap: 8px; } /* na miarę zawartości, na środku — jak pasek ikon */
    #rail .mob-only { display: grid; }
    #side .t-top { flex: none; }
    #side .rate { flex: 1; min-width: 0; gap: 6px; }
    #clock { font-size: 15px; }
    #clock .c-y, #clock .c-s { display: none; }
    #pop-time .t-acts { justify-content: flex-start; }
    /* czas na telefonie: koła (rok · miesiąc · dzień · godzina · minuta) i → obok; tytuł „Czas” tylko dla czytników, ✕ obok „Teraz” */
    #pop-time #dateset-box:not([hidden]) { grid-template-columns: 1fr auto; align-items: end; gap: 8px; border-top: 0; padding-top: 0; }
    #pop-time .dateset { display: none; }
    #pop-time .wheels-wrap { display: grid; gap: 2px; }
    #pop:has(#pop-time:not([hidden])) { position: relative; }
    #pop:has(#pop-time:not([hidden])) > header { position: absolute; top: 6px; right: 6px; }
    #pop:has(#pop-time:not([hidden])) #pop-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    #pop-time #btn-set { font-size: 0; min-width: 48px; min-height: 36px; height: 36px; margin-bottom: 36px; padding: 0 10px; border-radius: 8px; /* na wysokości paska wybranej wartości */ background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
    #pop-time #btn-set::after { content: '→'; font: 600 18px/1 var(--sans); }
    #pulse { left: var(--gap); right: var(--gap); width: auto; }
    #info { top: 58px; bottom: auto; left: var(--gap); right: var(--gap); transform: none; width: auto; max-width: none; max-height: 38%; }
    #pulse, #tour { left: var(--gap); right: var(--gap); top: 58px; width: auto; }
    #leftcol { bottom: 22px; } /* pod panelami wąski pasek na podpis */
    #credit { right: 50%; transform: translateX(50%); bottom: 5px; font-size: 10px; white-space: nowrap; }
    #clock { font-size: 18px; }
    #info h2 { font-size: 24px; }
  }
  @media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
  /* ekrany dotykowe: cele ≥ 44 px (wytyczne Apple/Google), gęstość panelu kosztem przewijania */
  @media (pointer: coarse) {
    button, select, summary, .dateset input, .skyloc input { min-height: 44px; }
    #btn-close { min-width: 44px; }
    #info .ov-row button, #info .sec-tabs button { min-height: 32px; }
    button.icon, .stepper button { min-width: 44px; }
    #rail button { width: 44px; height: 44px; }
    .ghost { padding: 2px 10px; }
    .checks label { min-height: 32px; }
  }
  /* telefon: scena ma pierwszeństwo — górny pasek w dwóch cienkich rzędach, karta obiektu pod nim (bez nachodzenia),
     panel czasu zwinięty do zegara, kierunku i jednego przewijanego rzędu tempa */
  @media (max-width: 760px) {
    #topbar { top: var(--gap); gap: 6px; }
    #views { flex: 0 1 auto; padding: 3px; order: -1; margin-bottom: 6px; } /* na miarę zakładek, na środku */
    #topbar { justify-content: center; row-gap: 0; }
    #topbar::before { content: ''; flex-basis: 100%; height: 0; } /* zakładki w osobnym rzędzie nad przyciskami */
    #beauty-box, #scale-box { flex: none; }
    #views button { padding: 4px 10px; font-size: 13px; min-height: 36px; }
    #beauty-box, #scale-box { padding: 3px; }
    .tbtn { padding: 4px 10px; font-size: 13px; min-height: 36px; }
    .tbtn.ico { padding: 4px 8px; }
    #info, #pulse, #tour { top: calc(var(--top-h, 104px) + 6px); }
    #info { max-height: calc(100% - var(--top-h, 104px) - var(--bot-h, 120px) - 14px); padding: 8px 12px; } /* karta do dolnych paneli */
    #info .lab { font-size: 11px; } #info .viz { gap: 8px; } #info .fig { flex-basis: 64px; min-width: 0; } #info .fig figcaption b { font-size: 11px; white-space: normal; } #info .tiles { margin-top: 8px; } #info .viz { margin-top: 10px; padding-top: 8px; }
    #info .tiles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px 10px; }
    #info:not(.compact) header { top: -8px; margin: -8px -12px 0; padding: 8px 12px 6px; }
    #info header { gap: 6px 14px; }
    #info .ttl { min-width: 0; }
    #info h2 { font-size: 20px; }
    #info .keys { flex-wrap: nowrap; overflow-x: auto; gap: 14px; scrollbar-width: none; }
    #info .key { flex: none; }
    #info .key b { font-size: 13px; white-space: nowrap; }
    #info .acts button { min-height: 34px; }
    #info { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2 * var(--gap)); } /* na miarę zawartości, na środku — nie na całą szerokość */
    #info header, #info.compact header { flex-wrap: nowrap; gap: 8px; } /* nazwa i przyciski w jednym rzędzie */
    #info:not(.compact) header { flex-wrap: wrap; } #info:not(.compact) .ttl { flex-basis: 0; } /* rozwinięta: liczby (.keys, 100%) w drugim rzędzie — w jednym rzędzie wypychały nazwę (karty eggów) */
    #info .ttl { flex: 1 1 auto; min-width: 0; }
    #info .lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #info h2 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #info .acts { gap: 0; flex: none; }
    #info .acts button.icon { min-width: 36px; padding: 4px; }
    #info:not(.compact) { width: calc(100% - 2 * var(--gap)); }
    #rail { padding: 3px; } #rail button { width: 36px; height: 36px; min-height: 36px; } /* paski niskie jak zakładki widoków */
    #goto-box, #reset-box, #scale-box, #beauty-box { padding: 3px; }
    #reset-box .icon, #goto-btn, #scale-box button, #beauty-box button { min-height: 36px; height: 36px; }
    #side { padding: 8px 10px; gap: 6px; }
    #goto-box { flex: 0 1 150px; min-width: 110px; } /* przy braku miejsca przyciski przechodzą do kolejnego rzędu, lista obiektów się nie zgniata */
    #rail button { min-width: 0; }
    #goto-box { flex: 1 1 150px; } body.sizes .sz-zoom { flex: 1 1 140px; } /* lista obiektów z lewej, skala z prawej — jeden rząd */
    #goto-btn { width: 100%; height: 36px; }
    #goto-ls .gi { padding: 6px 8px; font-size: 14px; } /* dotyk: większe pola */
    #clock { font-size: 15px; }
    #side #clock { flex: none; width: auto; display: grid; gap: 3px; line-height: 1; } /* telefon: data i godzina w dwóch liniach — więcej miejsca na tempo */
    #side #clock .c-y { display: inline; } #side #clock .c-sep { display: none; } #side #clock .c-t { font-size: 13px; color: var(--ink-soft); } /* stała szerokość (Readex Pro jest szerszy od dawnego kroju): zegar nie przesuwa reszty paska */
    #clock small { display: none; }
    #side #clock { min-width: 5.4em; } /* miejsce na najszerszą datę (28.08.2026): zmiana dnia nie przesuwa przycisków */
    #side .rate { flex: none; margin-left: auto; } #side .stepper { flex: none; } #side #rate-lbl { flex: none; width: 7ch; padding: 0 3px; } /* tempo na miarę najdłuższej etykiety („100 R/s”), nie na całą szerokość */
    body.mw #side #rate-lbl { width: auto; } /* Galaktyka: „100 tys. R/s” */
    .seg button, #btn-now { min-height: 38px; }
    .lbl-dist { font-size: 11px; padding: 3px 6px; }
    /* wycieczka na telefonie: scena ma cały środek — panel czasu i karta obiektu schowane, karta wycieczki na dole */
    body.touring #leftcol, body.touring #info { display: none !important; }
    body:has(#pop:not([hidden])) #info, body:has(#pulse:not([hidden])) #info, body:has(#pop:not([hidden])) #legend { display: none !important; } /* jeden panel naraz */
    #tour { top: auto !important; bottom: var(--gap); max-height: 42%; overflow-y: auto; padding: 10px 12px; gap: 6px; }
    #tour h3 { font-size: 18px; }
    #tour p { font-size: 13px; line-height: 1.45; }
    #tour .tour-nav button { min-height: 40px; }
    /* telefon: tytuł z ikonami ‹ ❚❚ › w jednym rzędzie, pasek postępu pod nim, opis w dwóch liniach przewijanych w trakcie kroku */
    #tour { grid-template-columns: 1fr auto auto auto; grid-template-areas: "step step mute x" "title prev play next" "prog prog prog prog" "text text text text"; gap: 4px 4px; align-items: center; }
    #tour header, #tour .tour-nav { display: contents; }
    #tour-step { grid-area: step; } #tour-close { grid-area: x; } #tour-mute { grid-area: mute; margin: 0; } #tour h3 { grid-area: title; }
    #tour-prev { grid-area: prev; } #tour-play { grid-area: play; } #tour-next { grid-area: next; }
    #tour-prog { grid-area: prog; margin: 2px 0; } #tour-text { grid-area: text; }
    #tour .tour-nav button, #tour-mute, #tour-close { min-height: 36px; min-width: 40px; width: 40px; padding: 0; display: grid; place-items: center; }
    #tour-mute, #tour-close { background: none; border: 0; }
    #tour .tour-nav #tour-prev, #tour .tour-nav #tour-next { font-size: 0; display: flex; align-items: center; justify-content: center; } /* flex: ukryty tekst nie zajmuje drugiego rzędu siatki (strzałka szła w górę) */ /* tekst „Wstecz/Dalej” zostaje dla czytnika ekranu, widać strzałkę */
    #tour-prev::before, #tour-next::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; } /* rysunek, nie znak: znaki ‹ › siedziały wyżej niż pauza */
    #tour-prev { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E"); } #tour-next { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E"); } #tour-next.last { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
    #tour-text { max-height: calc(2 * 1.45em); overflow: hidden; }
  }

button[data-pop="tours"] svg { color: var(--amber); } /* wycieczki: wyróżniona ikona paska */
.lbl-axis { font: 700 24px/1 var(--display); color: #cfe6ff; text-shadow: 0 0 4px #000, 0 0 2px #000; transform: translate(-50%, -50%); } /* N i S przy osi obrotu (wycieczka o porach roku) */
button[data-pop="tours"][aria-expanded="true"] svg { color: var(--on-amber); } /* na bursztynowym tle (otwarte) ikona ciemna */
  /* flara obiektywu (updateFlare w index.html) */
  #flare { position: fixed; inset: 0; pointer-events: none; z-index: 1; mix-blend-mode: screen; opacity: 0; }
  #flare i { position: absolute; left: 0; top: 0; border-radius: 50%; }
  #flare .streak { border-radius: 0; background: radial-gradient(ellipse 50% 1.6% at center, rgba(255,248,236,1), rgba(255,210,165,.45) 40%, transparent 70%); }
  #flare .burst { background: radial-gradient(circle, rgba(255,250,235,.95), rgba(255,215,160,.45) 12%, rgba(255,170,90,.14) 35%, transparent 65%); }
  #flare .star { background: repeating-conic-gradient(rgba(255,190,120,.65) 0deg .5deg, transparent .9deg 11.25deg), repeating-conic-gradient(from 4deg, rgba(255,160,90,.35) 0deg .4deg, transparent .7deg 6.9deg); -webkit-mask: radial-gradient(circle, #000 0, rgba(0,0,0,.55) 10%, rgba(0,0,0,.15) 32%, transparent 62%); mask: radial-gradient(circle, #000 0, rgba(0,0,0,.55) 10%, rgba(0,0,0,.15) 32%, transparent 62%); filter: blur(.6px); }
  #flare .h1 { background: radial-gradient(circle, rgba(255,150,80,.55), rgba(255,120,60,.15) 55%, transparent 70%); }
  #flare .h2 { background: radial-gradient(circle, rgba(255,90,140,.16), rgba(255,90,140,.1) 60%, rgba(255,140,170,.18) 66%, transparent 70%); }
  #flare .h3 { background: radial-gradient(circle, rgba(200,255,120,.07), rgba(200,255,120,.05) 62%, rgba(220,255,150,.12) 67%, transparent 71%); }
  #flare .g1 { background: radial-gradient(circle, rgba(120,200,255,.32), rgba(120,200,255,.12) 60%, transparent 70%); }
  #flare .g2 { background: radial-gradient(circle, rgba(255,170,90,.55), transparent 70%); }
  #flare .g3 { background: radial-gradient(circle, transparent 45%, rgba(140,255,170,.09) 58%, rgba(255,120,200,.07) 66%, transparent 72%); }
  #flare .ring { background: radial-gradient(circle, transparent 60%, rgba(255,90,60,.06) 64%, rgba(255,220,80,.07) 67%, rgba(90,255,140,.06) 70%, rgba(80,140,255,.07) 73%, transparent 76%); }
.lbl.mag-pole { font: 700 15px/1 system-ui, sans-serif; text-shadow: 0 0 4px #000, 0 0 8px #000; pointer-events: auto; } /* bieguny magnetyczne + / − */

/* dotyk (telefon, tablet): drobne napisy ≥ 12 px — czytane z ręki, z większej odległości niż monitor */
@media (pointer: coarse) {
  .lbl-moon, .lbl-tno, .lbl-asteroid, .lbl-comet, .lbl-craft, .lbl-nearstar, .lbl-dwarf { font-size: 12px; }
  .lbl-region { font-size: 11px; }
  #info .lab, #info .key span, #info .tile span, #info h3, #info .sec-t, #info .fig figcaption b { font-size: 12px; }
  #info .tile small, #info .fig figcaption span, #info .spec-cap { font-size: 11.5px; }
  #info .note, #info .sec-tabs button, #info .ov-row button, #info .spec-cap button { font-size: 12.5px; }
  .sz-lbl span { font-size: 11.5px; }
}

  /* ── Ruch UI (motion-design, 10.10.2026) ── */
  /* przyciski: kolor po najechaniu płynnie, wciśnięcie — lekkie wgniecenie (też na dotyku) */
  button { transition: background-color var(--t1), color var(--t1), border-color var(--t1), scale var(--t2) var(--ease-out); }
  button:active:not(:disabled) { scale: .96; transition-duration: var(--t1), var(--t1), var(--t1), 80ms; }
  /* panele: wejście z dołu i rozjaśnienie (240 ms), wyjście krótsze (160 ms); display w przejściu, żeby [hidden] nie ucinał wyjścia */
  #info, #pop, #goto-pop, #tour, #pulse {
    transition: opacity var(--t2) var(--ease-out), translate var(--t2) var(--ease-out), display var(--t2) allow-discrete;
  }
  #info[hidden], #pop[hidden], #goto-pop[hidden], #tour[hidden], #pulse[hidden] {
    opacity: 0; translate: 0 calc(var(--rise) / 2); pointer-events: none; transition-duration: 160ms; transition-timing-function: var(--ease-in);
  }
  @starting-style { #info, #pop, #goto-pop, #tour, #pulse { opacity: 0; translate: 0 var(--rise); } }
  /* kafelki wycieczek: kaskada co 40 ms (razem ≤ 300 ms) */
  .tour-cats .tour-cat:nth-child(2) { transition-delay: 0s, 0s, 0s, 40ms, 40ms; } .tour-cats .tour-cat:nth-child(3) { transition-delay: 0s, 0s, 0s, 80ms, 80ms; }
  .tour-cats .tour-cat:nth-child(4) { transition-delay: 0s, 0s, 0s, 120ms, 120ms; } .tour-cats .tour-cat:nth-child(n+5) { transition-delay: 0s, 0s, 0s, 160ms, 160ms; }
  @starting-style { .tour-cats .tour-cat { opacity: 0; translate: 0 var(--rise); } }
  /* link skopiowany: ikona → ✓ */
  #btn-share { position: relative; }
  #btn-share svg { transition: opacity var(--t1); }
  #btn-share::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font: 600 18px/1 var(--sans); color: var(--amber); opacity: 0; scale: .6; pointer-events: none; transition: opacity var(--t1) var(--ease-in), scale var(--t1) var(--ease-in); }
  #btn-share.done svg { opacity: 0; }
  #btn-share.done::after { opacity: 1; scale: 1; transition: opacity var(--t2) var(--ease-out), scale var(--t2) cubic-bezier(.175, .885, .32, 1.275); }
  /* ograniczony ruch: tylko przenikanie — bez przesunięć, wgnieceń i podskoków */
  @media (prefers-reduced-motion: reduce) {
    :root { --rise: 0px; }
    button:active:not(:disabled) { scale: none; }
    .tour-list .tour-cat:hover, .tour-list .tour-cat:focus-visible { transform: none; }
    #btn-share.done::after { scale: 1; transition: opacity var(--t2); }
  }

  /* ── Koła daty (telefon) ── */
  .wheels-wrap { display: none; }
  .wheel-lab { display: grid; grid-template-columns: 1.7fr 1.15fr .9fr .9fr .9fr; gap: 2px; font: 500 10.5px/1 var(--sans); color: var(--mute); text-align: center; }
  .wheels { display: grid; position: relative; grid-template-columns: 1.7fr 1.15fr .9fr .9fr .9fr; gap: 2px; height: 108px;
    -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
  .wheels::before { content: ''; position: absolute; inset: 36px 0; border-radius: 8px; background: rgba(242, 182, 74, .1); box-shadow: inset 0 0 0 1px rgba(242, 182, 74, .35); pointer-events: none; } /* pasek wybranej wartości */
  .wheel { height: 108px; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; padding-block: 36px; box-sizing: border-box; outline: none; border-radius: 8px; }
  .wheel::-webkit-scrollbar { display: none; }
  .wheel:focus-visible { box-shadow: inset 0 0 0 2px var(--amber); }
  .wheel > div { height: 36px; display: flex; align-items: center; justify-content: center; gap: 3px; scroll-snap-align: center; font: 500 17px/1 var(--mono); color: var(--ink); white-space: nowrap; cursor: pointer; user-select: none; }
  .wheel > div small { font: 500 9.5px/1 var(--sans); color: var(--mute); }
  @supports (animation-timeline: view()) { /* koła jak bęben: wiersze nad i pod paskiem przechylone i przygaszone */
    .wheel > div { animation: wheel-tilt linear both; animation-timeline: view(); }
    @keyframes wheel-tilt { 0% { transform: perspective(240px) rotateX(58deg); opacity: .3; } 50% { transform: none; opacity: 1; } 100% { transform: perspective(240px) rotateX(-58deg); opacity: .3; } }
  }
  @media (prefers-reduced-motion: reduce) { .wheel > div { animation: none; } }

  @media (max-width: 760px) {
    /* otwarta karta obiektu: zakładki widoków i pasek ikon chowają się (wracają po zamknięciu karty) */
    body[data-view="3d"]:has(#info:not([hidden])) #views, body[data-view="3d"]:has(#info:not([hidden])) #rail { display: none; } /* tylko w 3D */
    @media (prefers-reduced-motion: no-preference) { #views, #rail { transition: opacity .5s var(--ease-out), translate .5s var(--ease-out); } @starting-style { #views, #rail { opacity: 0; translate: 0 -6px; } } } /* powrót menu po zamknięciu karty: łagodne wejście */
    /* legenda: na dole nad zegarem, nie na przyciskach karty; bez pustego miejsca pod nagłówkiem */
    #legend { top: auto; bottom: calc(var(--bot-h, 120px) + 6px); }
    #legend summary { min-height: 30px; line-height: 30px; } /* bez flex — zostaje strzałka rozwijania */
    #legend details[open] summary { margin-bottom: 0; }
    /* impuls: trzy niskie rzędy zamiast wysokiego panelu */
    #pulse { padding: 6px 10px; gap: 2px 10px; grid-template-columns: auto 1fr auto; grid-template-areas: "time dist x" "rate log log"; align-items: center; white-space: nowrap; }
    #pulse .p-bar { display: contents; } /* dzieci paska w siatce panelu: czas · odległość · ✕ / tempo · „Dotarł do” */
    #pulse-log { grid-area: log; justify-self: end; text-align: right; }
    #pulse .p-lab, #pulse .p-rl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    #pulse-time { font-size: 21px; }
    #pulse-dist { align-self: center; }
    #pulse-close { min-height: 36px; min-width: 36px; }
    #pulse .stepper button { min-height: 36px; width: 40px; }
    #pulse-log summary { min-height: 28px; line-height: 28px; padding-top: 0; border-top: 0; }
  }

  /* wybrane ciało z otwartą kartą: jego podpis w scenie gaśnie (nazwa jest w karcie) */
  .lbl { transition: opacity var(--t3) var(--ease-out); }
  body:not(.touring):has(#info:not([hidden])) .lbl.sel { opacity: 0; pointer-events: none; } /* w wycieczce karta schowana CSS-em — podpis wybranego obiektu kroku zostaje */

  /* pierścień zaznaczenia (selRingStep): widać z daleka, co jest wybrane */
  .sel-ring { box-sizing: border-box; border: 1.5px solid rgba(242, 182, 74, .75); border-radius: 50%; box-shadow: 0 0 6px rgba(242, 182, 74, .35); pointer-events: none; }
  .sel-ring { animation: sel-glow 1.5s ease-out infinite; } /* puls co 1,5 s: drugi okrąg rośnie i gaśnie, pierścień chwilę jaśniejszy */
  .sel-ring::after { content: ''; position: absolute; inset: -1.5px; border: 1.5px solid rgba(242, 182, 74, .8); border-radius: 50%; animation: sel-wave 1.5s ease-out infinite; }
  @keyframes sel-wave { 0% { scale: 1; opacity: .9; } 70%, 100% { scale: 1.8; opacity: 0; } }
  @keyframes sel-glow { 0% { border-color: rgba(255, 214, 130, 1); box-shadow: 0 0 10px rgba(242, 182, 74, .7); } 50%, 100% { border-color: rgba(242, 182, 74, .75); box-shadow: 0 0 6px rgba(242, 182, 74, .35); } }
  @media (prefers-reduced-motion: reduce) { .sel-ring { animation: none; } .sel-ring::after { display: none; } }

  .sz-ord button svg { display: none; } @media (max-width: 760px) { .sz-ord button svg { display: block; } } /* kolejność: na komputerze napisy, na telefonie ikony */

/* przełącznik języka PL | EN — na powitaniu w prawym górnym rogu, w Pomocy w rzędzie przycisków */
.lang-pick { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; vertical-align: middle; }
.lang-pick a { min-width: 44px; padding: 7px 10px; text-align: center; font: 600 13px/1.2 var(--display); letter-spacing: .06em; color: var(--mute); text-decoration: none; }
.lang-pick a + a { border-left: 1px solid var(--line); }
.lang-pick a:hover { color: var(--ink); }
.lang-pick a[aria-current] { background: var(--amber); color: var(--on-amber); }
/* nazwy formacji na powierzchni (warstwa „Nazwy formacji”) — jasne, z cieniem, żeby czytać je na tarczy */
.lbl-region.lbl-feat { font: 500 11px/1.15 var(--sans); letter-spacing: .12em; color: rgba(255,255,255,.88); text-align: center; max-width: 12em; white-space: normal; text-shadow: 0 0 3px #000, 0 0 7px #000, 0 1px 2px #000; }

/* telefon w poziomie (niski ekran dotykowy): interfejs schowany, zostaje widok i podpowiedź „Obróć telefon pionowo” w lewym górnym rogu */
#rotate-hint { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  body > :not(#stage, #labels, #map2d, #sizes, #galaxy, #boot, #fade, #flat-fade, #flat-sub, #rotate-hint, script) { display: none !important; }
  #rotate-hint { display: flex; align-items: center; gap: 10px; position: fixed; z-index: 60; left: calc(12px + env(safe-area-inset-left)); top: calc(12px + env(safe-area-inset-top)); padding: 10px 14px 10px 10px; border-radius: 12px; background: rgba(8, 11, 20, .82); color: var(--ink); font: 500 14px/1.2 var(--sans); box-shadow: 0 4px 18px rgba(0,0,0,.4); opacity: 1 !important; } /* także w intro i przed zamknięciem powitania (body.intro/.hello gaszą resztę) */
  #rotate-hint svg { color: #f2b84b; flex: none; }
  html:not([lang="en"]) #rotate-hint [lang="en"], html[lang="en"] #rotate-hint [lang="pl"] { display: none; }
}

  /* karta podpowiedzi przycisku (tips.js): komputer — najechanie, telefon — przytrzymanie */
  #tip { position: fixed; z-index: 70; width: max-content; max-width: 292px; box-sizing: border-box; padding: 12px 14px; background: rgba(11,16,32,.97); border: 1px solid var(--line-hover); border-radius: 10px; pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 0 1px rgba(242,182,74,.08); font: 400 13px/1.5 var(--sans); color: var(--ink); animation: tip-in var(--t1) var(--ease-out); }
  #tip[hidden] { display: none; }
  @keyframes tip-in { from { opacity: 0; } }
  #tip::before { content: ''; position: absolute; width: 12px; height: 12px; background: rgba(11,16,32,.97); border: 1px solid var(--line-hover); border-right: 0; border-bottom: 0; }
  #tip.arrow-top::before { top: -7px; left: var(--ax); transform: rotate(45deg); }
  #tip.arrow-bottom::before { bottom: -7px; left: var(--ax); transform: rotate(225deg); }
  #tip.arrow-left::before { left: -7px; top: var(--ax); transform: rotate(-45deg); }
  .tip-h { display: flex; align-items: center; gap: 9px; }
  .tip-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: rgba(242,182,74,.12); color: var(--amber); flex: none; }
  .tip-ico svg { width: 18px; height: 18px; }
  .tip-t { font: 600 16px/1.15 var(--display); letter-spacing: .01em; }
  #tip kbd { margin-left: auto; font: 500 11px/1 var(--mono); color: var(--ink-soft); padding: 4px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--btn-deep); }
  #tip p { margin: 6px 0 0; color: var(--ink-soft); }
  .tip-only { display: flex; align-items: flex-start; gap: 10px; } .tip-only kbd { margin: 1px 0 0 !important; } .tip-only p { margin: 0 !important; } #tip:has(.tip-only) { max-width: 260px; padding: 10px 12px; } /* zakładki widoków */
  .tip-states { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; font: 500 11px/1 var(--sans); }
  .tip-states span { padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
  .tip-states span.on { border-color: var(--amber); color: var(--amber); background: rgba(242,182,74,.1); }
  .tip-states i { color: var(--mute); font-style: normal; }
  .tip-now { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.4; color: var(--mute); } .tip-now b { color: var(--ink); font-weight: 600; }
  @media (prefers-reduced-motion: reduce) { #tip { animation: none; } }
  @media (pointer: coarse) { button, [data-tip] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } } /* przytrzymanie pokazuje podpowiedź, nie menu ani zaznaczenie */
  [data-pop="help"] > .help-tip { margin: 10px 0 0; }
  [data-pop="help"] > .help-tips { grid-template-columns: auto; justify-content: start; padding-bottom: 0; }

  /* ---------- powitanie SOLARIA (welcome.js; Figma „Powitanie” 1440×900 / 820×1180 / 390×844) ----------
     Wyrównania do Design System: tło przycisku #050b14 93%, tekst #e2e7f1, akcent #f2b64a, PL/EN tło #0f1421 i tekst #8d96ab — jak w ramkach.
     Odstępstwo od DS: etykieta przycisku Inter Bold 17 (ramki), nie Label 13 (DS). Elementy wchodzą przez opacity + translate (transform zostaje dla układu). */
  #welcome-black { position: fixed; inset: 0; z-index: 49; background: #000; opacity: 0; pointer-events: none; }
  #welcome { position: fixed; inset: 0; z-index: 50; pointer-events: none; font-family: Inter, var(--sans); color: #e2e7f1; }
  #welcome[hidden] { display: none; }
  #welcome.s5:not(.out) #wl-go, #welcome.s6:not(.out) #wl-lang a, #welcome.s8:not(.out) #wl-foot a { pointer-events: auto; } /* klikalne dopiero, gdy widoczne */
  body.welcome > :not(#stage):not(#galaxy):not(#welcome):not(#welcome-black):not(#rotate-hint):not(#kadr):not(script) { opacity: 0 !important; pointer-events: none !important; transition: opacity .6s ease-out; }
  #welcome > *, #wl-main > :not(#wl-logo) { opacity: 0; translate: 0 10px; transition: opacity .9s ease-out, translate 1.1s cubic-bezier(.2, .7, .2, 1); }
  #welcome.s4 #wl-sub, #welcome.s5 #wl-cta, #welcome.s6 #wl-lang, #welcome.s7 #wl-news, #welcome.s8 #wl-foot, #welcome.s1 #wl-main { opacity: 1; translate: none; }
  #welcome.out > * { opacity: 0 !important; transition: opacity .8s ease-in !important; }

  /* cytat na czerni: rośnie 1 → 1,15 przez cały czas widoczności (5 s) */
  #welcome > #wl-quote { position: absolute; inset: 0; margin: 0; display: grid; place-content: center; padding: 24px; text-align: center; translate: none; transition: opacity 1.2s ease-in-out; }
  #welcome.q > #wl-quote { opacity: 1; }
  #welcome.done > #wl-quote { opacity: 0; transition-duration: .4s; }
  #wl-quote > * { animation: wl-grow 5s linear forwards; }
  #wl-quote p { max-width: 980px; margin: 0; font: 600 clamp(30px, 5.2vw, 68px)/1.08 var(--display); letter-spacing: .01em; text-wrap: balance; text-shadow: 0 0 24px #000; }
  #wl-quote footer { margin-top: 22px; font: 500 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
  @keyframes wl-grow { from { scale: 1; } to { scale: 1.15; } }

  /* logo, podpis, przycisk — desktop: po prawej (środek bloku 72,9% × 54,5%); pion: na środku */
  #wl-main { position: absolute; left: 72.9%; top: 54.5%; width: 349px; max-width: calc(100vw - 40px); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
  #welcome.s1 #wl-main { translate: none; }
  #wl-logo { margin: 0; line-height: 0; width: 100%; }
  #wl-logo-svg { display: block; width: 100%; height: auto; overflow: visible; }
  .wl-ch { opacity: 0; transform: translateX(calc(var(--k) * 46px)); transition: opacity 1.2s ease-out, transform 3.5s cubic-bezier(.16, .84, .3, 1); }
  .wl-ch > path { fill: rgba(255, 255, 255, .93); }
  #welcome.s1 .wl-ch { opacity: 1; }
  #welcome.s2 .wl-ch { transform: none; }
  #welcome.done .wl-ch { transition-duration: .6s; }
  /* okrąg „O” — słońce w zaćmieniu: najpierw przygaszony, potem zapala się korona; rozbłysk (.flare) co ≥ 5 s */
  #wl-ring .wl-ring { fill: rgba(255, 255, 255, .93); transition: fill 2.2s ease-in-out; } /* najpierw biały jak litery, potem rozgrzewa się do bursztynu (półprzezroczysty bursztyn na czerni wychodził brązowy) */
  .wl-corona, .wl-streak { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity 1.4s ease-out; }
  #welcome.s3 #wl-ring .wl-ring { fill: #f2b64a; }
  #welcome.s3 .wl-corona { opacity: .55; animation: wl-ignite 2.6s ease-in-out both, wl-pulse 5s ease-in-out 2.6s infinite; } /* korona rozpala się płynnie, pulsowanie startuje od jej jasności końcowej */
  #wl-logo.flare .wl-corona { animation: wl-flare 1.2s ease-out; }
  #wl-logo.flare .wl-streak { animation: wl-streak 1.2s ease-out; }
  @keyframes wl-ignite { from { opacity: 0; } to { opacity: .55; } }
  @keyframes wl-pulse { 0%, 100% { opacity: .55; } 50% { opacity: .68; } } /* bez skalowania — jasny pas zostaje przy obręczy */
  @keyframes wl-flare { 0% { opacity: .58; } 30% { opacity: 1; } 100% { opacity: .58; } }
  @keyframes wl-streak { 0% { opacity: 0; transform: scaleX(.3); } 22% { opacity: .9; transform: scaleX(1.25); } 100% { opacity: 0; transform: scaleX(.6); } }
  #wl-sub { width: max-content; margin: 0; font: 400 11px/21.7px Inter, var(--sans); letter-spacing: 0; white-space: nowrap; text-transform: uppercase; text-align: center; color: rgba(255, 255, 255, .9); }
  #wl-cta { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
  #wl-go { height: 44px; padding: 5px 24px; border: 1px solid #f2b64a; border-radius: 24px; background: rgba(5, 11, 20, .93); color: #e2e7f1; font: 700 17px/18.85px Inter, var(--sans); white-space: nowrap; cursor: pointer; transition: box-shadow .3s, background-color .3s; }
  #wl-go:hover, #wl-go:focus-visible { background: rgba(26, 20, 6, .93); box-shadow: 0 0 22px rgba(242, 182, 74, .35); }
  #wl-go:focus-visible { outline: 2px solid #f2b64a; outline-offset: 3px; }
  #wl-src { margin: 0; font: italic 300 9px/21.7px Inter, var(--sans); text-align: center; color: rgba(255, 255, 255, .9); }

  /* PL/EN — prawy górny róg */
  #welcome > #wl-lang { position: absolute; top: 45px; right: 53px; display: flex; height: 24px; border: 0; border-radius: 12px; overflow: hidden; }
  #wl-lang a { min-width: 48px; padding: 0 10px; font: 600 13px/24px var(--display); letter-spacing: .78px; background: #0f1421; color: #8d96ab; }
  #wl-lang a + a { border-left: 1px solid rgba(35, 45, 71, .93); }
  #wl-lang a[aria-current] { background: #f2b64a; color: #1a1204; }

  /* „Nowe” — lewy dół; kawa i autor — prawy dół */
  #welcome > #wl-news { position: absolute; left: 32px; bottom: 37px; width: 323px; max-width: calc(100vw - 64px); margin: 0; padding: 8px 10px; box-sizing: border-box; border-left: 1px solid #f2b64a; background: rgba(255, 255, 255, .1); font: 400 13px/20.15px Inter, var(--sans); color: #c4cbda; }
  #wl-news b { color: #f2b64a; font-weight: 700; }
  #wl-foot { position: absolute; right: 53px; bottom: 32px; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
  .wl-coffee { flex-wrap: nowrap; justify-content: flex-end; gap: 6px; width: 327px; margin: 0; }
  .wl-coffee > span { order: -1; flex: 1; font: 400 12px/1.3 Inter, var(--sans); text-align: right; color: #c4cbda; }
  .wl-coffee .coffee-logo { padding: 8px 16px; border: 1px solid #f2b64a; border-radius: 18px; }
  .wl-coffee .coffee-logo img { height: 16px; }
  #wl-by { margin: 0; font: 400 12.5px/1.4 Inter, var(--sans); text-align: right; color: #8d96ab; }
  #wl-by b { color: #e2e7f1; font-weight: 700; }
  #wl-by a { color: #9e9eff; text-decoration: underline; }
  #wl-ver { font-size: 10px; }

  @media (max-aspect-ratio: 1/1) { /* tablet i telefon w pionie */
    #wl-main { left: 50%; top: 55%; }
    #welcome > #wl-lang { top: 32px; right: 32px; }
    #welcome > #wl-news { bottom: 33px; }
    #wl-foot { right: 32px; bottom: 33px; }
  }
  @media (max-width: 600px) { /* telefon: dół w jednej kolumnie, na środku */
    #wl-main { top: 53%; }
    #welcome > #wl-news { left: 50%; bottom: 123px; transform: translateX(-50%); }
    #wl-foot { left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); align-items: center; gap: 10px; }
    #wl-by { text-align: center; }
  }
  @media (prefers-reduced-motion: reduce) {
    #welcome > *, #wl-main > *, .wl-ch, #wl-quote > * { transition-duration: .01ms !important; animation: none !important; translate: none; }
    .wl-ch { transform: none; }
    #welcome.s3 .wl-corona { animation: none; opacity: .55; }
  }
