/* Ciemny, oliwkowo-czarny panel z jednym akcentem: limonką. Karty mają cienką
   oliwkową ramkę, etykiety są pisane czcionką mono wersalikami, a liczby czcionką mono.
   Kafelek odjazdu zmienia akcent: limonka, gdy jest czas, bursztyn przy 15 min, koral przy 5 min. */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(/fonts/dm-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url(/fonts/dm-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: dark;
  --bg: #0d0f0b;
  --tile: #151812;
  --sunk: #1e221a;
  --lift: #282d22;
  --ink: #f2eee3;
  --soft: #969b8b;
  --hair: #2b3023;
  --edge: #333a24;
  --accent: #c6f24e;
  --accent-ink: #151b05;
  --amber: #ffb35c;
  --coral: #ff7f66;
  --up: var(--accent);
  --down: var(--coral);
  --up-bg: color-mix(in srgb, var(--accent) 13%, transparent);
  --glow: color-mix(in srgb, var(--accent) 8%, transparent);
  --glass: color-mix(in srgb, var(--tile) 84%, transparent);
  --down-bg: rgb(255 127 102 / .15);
  --link: var(--accent);
  --paper: var(--tile);
  --rule: var(--hair);
  --lecture: var(--ink);
  --exercise: var(--amber);
  --sans: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scrollbar-color: var(--hair) transparent; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(1100px 480px at 50% -180px, var(--glow), transparent 70%) no-repeat var(--bg); color: var(--ink); font: 16px/1.4 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: rgb(242 238 227 / .28); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Etykieta: mono, wersaliki, rozstrzelone litery. Tekst w HTML zostaje pisany normalnie. */
.module h2, .module h3, .stat span, .mini span, .fact span, .quote-name, .go-label, legend {
  font-family: var(--mono); font-weight: 500; text-transform: uppercase; color: var(--soft);
}

.page { max-width: 1240px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) clamp(12px, 3vw, 28px) 48px; }

/* Górny pasek: pływająca, zaokrąglona belka */
.bar { display: flex; align-items: center; gap: 10px 14px; margin-bottom: 16px; padding: 10px 10px 10px 20px; background: var(--glass); border: 1px solid var(--edge); border-radius: 22px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bar h1 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.bar-date { margin-left: auto; font: 500 13px/1 var(--mono); letter-spacing: .04em; color: var(--soft); white-space: nowrap; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.summary:empty { display: none; }
.summary > span:empty { display: none; }
.head-stat { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 12px; background: var(--sunk); font-size: 14px; white-space: nowrap; }
.head-stat strong { font-family: var(--mono); font-weight: 700; }
.head-stat.wx-head { padding-right: 12px; font-family: var(--mono); font-weight: 600; }
.bar nav { display: flex; gap: 8px; flex: none; }
.icon { width: 40px; height: 40px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon:hover { background: var(--lift); color: var(--accent); }
.icon.on { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.icon:disabled { opacity: .5; cursor: progress; }
.icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 761px) {
  .bar { position: sticky; top: 12px; z-index: 5; }
}
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; padding-left: 16px; }
  /* Podsumowania modułów są w menu ☰, więc pasek zostaje niski. */
  .summary { display: none; }
}
#status:empty { display: none; }
#status { margin: 0; }

#board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.module { background: var(--tile); border: 1px solid var(--edge); border-radius: 28px; padding: 24px 26px; min-width: 0; }
#m-trains { background: none; border: 0; padding: 0; }
.module h2 { font-size: 12px; letter-spacing: .22em; margin-bottom: 16px; }
.module h3 { font-size: 11px; letter-spacing: .18em; margin: 22px 0 8px; }

/* Nagłówek kafelka to przycisk (akordeon na telefonie); na komputerze wygląda jak zwykły tytuł. */
.mod-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; margin: 0; background: none; border: 0; border-radius: 8px; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; cursor: default; }
.mod-toggle:disabled { color: inherit; opacity: 1; }
@media (min-width: 761px) { .mod-sum, .mod-arrow { display: none; } }
@media (max-width: 900px) {
  #board { display: flex; flex-direction: column; align-items: stretch; }
  .col { display: contents; }
}
@media (max-width: 520px) {
  .module { border-radius: 24px; padding: 20px 18px; }
  .num { font-size: 12.5px; letter-spacing: -0.03em; }
  /* Komunikat z linkiem i datą: na telefonie data schodzi pod tytuł. */
  .row:has(> div > a) { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Wspólne klocki */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--sunk); border-radius: 14px; }
.row > :first-child { min-width: 0; }
/* Wiersz z kilkoma liczbami (np. zmiany na YouTube) łamie się na dwie linie, gdy brakuje miejsca. */
.row:has(> .num > span) { flex-wrap: wrap; row-gap: 4px; }
.num { font-family: var(--mono); font-size: 13px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--soft); }
.small { font-size: 13.5px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; padding: 14px 6px; min-width: 0; background: var(--sunk); border-radius: 18px; text-align: center; }
.stat strong { font-family: var(--mono); font-size: 17px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; white-space: nowrap; }
.stat span { font-size: 9.5px; letter-spacing: .1em; }
.note { color: var(--soft); font-size: 13px; margin-top: 12px; }
.note.bad, .note.warn { color: var(--down); }
.empty p { color: var(--soft); margin-bottom: 14px; max-width: 46ch; }
.btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--lift); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 700; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); }
.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
details summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 12px 0 6px; color: var(--accent); }
details[open] > summary { margin-bottom: 4px; }

/* Kafelek odjazdu */
.poster, .calm { --go: var(--accent); }
.poster { color: var(--ink); background: radial-gradient(120% 150% at 0% 0%, color-mix(in srgb, var(--go) 15%, transparent), transparent 62%) var(--tile); border: 1px solid color-mix(in srgb, var(--go) 42%, var(--edge)); border-radius: 28px; padding: clamp(20px, 3vw, 30px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px clamp(20px, 3vw, 36px); align-items: center; }
.poster > div:first-child { container-type: inline-size; }
.go-soon { --go: var(--amber); }
.go-now { --go: var(--coral); background: radial-gradient(130% 170% at 0% 0%, color-mix(in srgb, var(--go) 30%, transparent), transparent 70%) var(--tile); }
.go-label { font-size: 12px; letter-spacing: .22em; }
.poster .go-label { color: var(--go); }
.poster .countdown { display: block; font-family: var(--mono); font-size: 84px; font-size: clamp(56px, 25cqi, 112px); font-weight: 700; line-height: 1; letter-spacing: -0.05em; color: var(--go); margin: 10px 0 12px -2px; }
.go-dir { font-size: 17px; font-weight: 600; }
.go-class { font-size: 14px; color: var(--soft); margin-top: 2px; }
.go-trip { background: rgb(0 0 0 / .24); border: 1px solid var(--hair); border-radius: 18px; padding: 16px 18px; min-width: 0; }
.journey { list-style: none; margin: 0; padding: 0; }
.journey li { display: grid; grid-template-columns: 50px 18px minmax(0, 1fr); align-items: center; min-height: 26px; font-size: 15px; }
.journey time { font-family: var(--mono); font-size: 13.5px; font-weight: 600; }
.journey .dot { justify-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--go); }
.journey .bar-v { justify-self: center; width: 2px; height: 100%; min-height: 26px; background: color-mix(in srgb, var(--go) 35%, var(--hair)); }
.journey li.ride { grid-template-areas: ". v ride"; }
.journey .ride-info { font-size: 13px; color: var(--soft); padding: 4px 0; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--go); color: var(--accent-ink); font: 700 11.5px/1.4 var(--mono); margin-right: 6px; }
.go-meta { font-size: 13px; color: var(--soft); margin-top: 10px; }
.go-alert { font-size: 14px; font-weight: 700; color: var(--down); margin-top: 8px; }
.chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: var(--soft); }
.chip { font-family: var(--mono); color: var(--ink); background: var(--sunk); border: 1px solid var(--hair); border-radius: 10px; padding: 6px 10px; }
.calm { background: var(--tile); border: 1px solid var(--edge); border-radius: 28px; padding: clamp(20px, 3vw, 30px); }
.calm .go-trip { background: var(--sunk); margin-top: 16px; max-width: 460px; }
.calm .big { font-size: clamp(28px, 4.6vw, 42px); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 8px; }
.route-note { padding: 0 14px; margin-top: 10px; }
.alarm-time { font-family: var(--mono); font-size: clamp(60px, 10vw, 104px); font-weight: 700; line-height: 1; letter-spacing: -0.05em; color: var(--accent); margin: 10px 0 14px -2px; }
#strip { margin-bottom: 16px; }
#m-market { background: none; border: 0; padding: 0; }
.strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
/* przycięty kafelek na prawym brzegu znika łagodnie zamiast być ucięty w pół rogu */
.strip.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.strip::-webkit-scrollbar { display: none; }
.quote { flex: 1 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--tile); border: 1px solid var(--edge); border-radius: 18px; padding: 10px 14px; white-space: nowrap; font-size: 12.5px; }
.quote-text { display: flex; flex-direction: column; gap: 1px; }
.quote-text > span:last-child { font-family: var(--mono); }
.spark { flex: none; width: 72px; height: 26px; overflow: visible; }
.spark-line { fill: none; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.spark-up { stroke: var(--up); }
.spark-down { stroke: var(--down); }
.spark-dot-up { fill: var(--up); }
.spark-dot-down { fill: var(--down); }
.spark-base { stroke: var(--soft); stroke-width: 1; stroke-dasharray: 2 3; opacity: .5; }
.quote strong { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.quote-name { font-size: 10.5px; letter-spacing: .14em; }
@media (max-width: 620px) { .poster { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) {
  .go-now { animation: urgent 1.6s ease-in-out infinite; }
  @keyframes urgent { 50% { filter: brightness(1.18); } }
}

/* Portfel */
.value { font-size: clamp(40px, 6.5vw, 58px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.value-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 18px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font: 600 12.5px/1.4 var(--mono); white-space: nowrap; }
.pill.up { background: var(--up-bg); }
.pill.down { background: var(--down-bg); }
.pill.flat { background: var(--sunk); color: var(--soft); }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.mini { background: var(--sunk); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; }
.mini strong { font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.mini span { font-size: 10px; letter-spacing: .12em; line-height: 1.35; }
.pos-id { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; }
.pos-id > span:last-child { min-width: 0; }
.pos { background: var(--sunk); border-radius: 16px; }
.pos .row { background: none; padding: 10px 14px 10px 10px; }
@media (max-width: 420px) { .pos-btn .spark { width: 48px; } }
.pos-btn { width: 100%; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 16px; }
.pos-btn:hover { background: rgb(255 255 255 / .03); }
.pos-sub, .pos-line { display: block; }
.pos-val { font-family: var(--mono); font-size: 14px; }
.pos-val .small { font-family: var(--sans); font-size: 12.5px; }
.pos-split { background: rgb(0 0 0 / .22); border-radius: 12px; padding: 4px 14px; margin: 0 8px 8px; }
.sorted-by { font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px 16px; padding: 12px 0 10px; border-bottom: 1px solid var(--hair); }
.facts:last-child { border-bottom: 0; }
.fact { display: flex; flex-direction: column; gap: 3px; }
.fact span { font-size: 10px; letter-spacing: .12em; }
.fact strong { font-family: var(--mono); font-size: 14px; }
.split-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; padding: 8px 0; font-size: 14px; }
.mono { position: relative; overflow: hidden; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--lift); display: grid; place-items: center; font: 700 12px var(--mono); }
.mono img { position: absolute; inset: 6px; width: 28px; height: 28px; object-fit: contain; }
.mono.has-logo { background: #fff; color: transparent; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.seg button { border: 0; border-radius: 8px; padding: 6px 10px; background: var(--sunk); color: var(--soft); font: 500 12px/1.3 var(--mono); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--bg); font-weight: 700; }
.btn.more { width: 100%; margin-top: 8px; text-align: center; }
.pos-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Portfel: sekcje zwijane (pozycje, rachunki) */
.pf-fold { margin-top: 14px; border-top: 1px solid var(--hair); }
.pf-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 0; color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }
.pf-fold[open] > summary { margin-bottom: 8px; }
.pf-count { font: 600 12px var(--mono); letter-spacing: 0; color: var(--soft); background: var(--sunk); border-radius: 99px; padding: 2px 10px; }
.pos-val { text-align: right; white-space: nowrap; }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.foot .note { margin: 0; }
.module svg text { font-family: var(--mono); font-size: 12px; }

/* Plan zajęć i kalendarz: godzina, kolorowa kreska, tytuł */
.slot { display: grid; grid-template-columns: 50px 4px minmax(0, 1fr); gap: 14px; padding: 8px 0; align-items: center; }
.slot::before { content: ''; align-self: stretch; min-height: 38px; border-radius: 4px; background: var(--hair); }
.slot-time { order: -1; font: 500 14px/1.3 var(--mono); color: var(--soft); }
.slot-time small { display: block; font-size: 11.5px; opacity: .7; }
.slot > div:last-child > div:not(.small) { font-weight: 600; }
.slot.kind-w::before { background: var(--lecture); }
.slot.kind-cw::before { background: var(--exercise); }
.slot.kind-cal::before { background: var(--accent); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--soft); margin: 0 0 8px; }
.legend i { display: inline-block; width: 4px; height: 12px; border-radius: 4px; margin-right: 8px; vertical-align: -1px; }
.legend .w { background: var(--lecture); }
.legend .cw { background: var(--exercise); }
.slot.now { background: var(--sunk); border-radius: 16px; padding: 12px 14px; margin: 4px -14px; }
.slot.now .slot-time { color: var(--ink); font-weight: 700; }
.list:has(> .slot) { gap: 0; }

dialog { border: 1px solid var(--edge); border-radius: 28px; background: var(--tile); color: var(--ink); padding: 26px; width: min(520px, calc(100vw - 28px)); max-height: 86vh; }
dialog::backdrop { background: rgb(6 8 5 / .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
fieldset { border: 0; border-top: 1px solid var(--hair); padding: 14px 0 16px; margin: 0; }
legend { font-size: 11.5px; letter-spacing: .2em; padding-right: 10px; }
.field { display: grid; grid-template-columns: 1fr 96px; gap: 4px 12px; align-items: center; padding: 6px 0; }
.field input[type=number], .field input[type=text] { width: 100%; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; background: var(--sunk); color: var(--ink); font: 500 14px var(--mono); }
.field.check input { justify-self: end; width: 22px; height: 22px; accent-color: var(--accent); }
.field small { grid-column: 1 / -1; color: var(--soft); }
.actions { display: flex; gap: 10px; }

/* Logowanie */
.login { display: grid; place-items: center; padding: 16px; }
.login form { width: min(380px, 100%); display: grid; gap: 10px; background: var(--tile); border: 1px solid var(--edge); color: var(--ink); border-radius: 28px; padding: 28px; }
.login h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; margin-bottom: 16px; }
.login label { font: 500 11.5px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
.login input { padding: 13px 14px; font: inherit; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); }
.login .btn { padding: 13px 16px; margin-top: 4px; }
.login .note { font-weight: 600; color: var(--down); margin: 0; }
.login .note:empty { display: none; }
.login .note.info { color: var(--soft); font-weight: 400; font-size: 12px; line-height: 1.45; }

/* Pogoda */
.wx-now { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.wx-icon { font-size: 46px; line-height: 1; }
.wx-temp { font-family: var(--mono); font-size: 42px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; margin-bottom: 4px; }
.wx-hours { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin: 0 0 10px; scrollbar-width: thin; }
.wx-hour { flex: 0 0 auto; min-width: 48px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 6px; border-radius: 12px; background: var(--sunk); font-family: var(--mono); }
.wx-hour .small { font-size: 11.5px; }
.wx-hour strong { font-size: 13.5px; }
.wx-rain { color: var(--accent); font-weight: 600; }

/* Zadania */
.todo-progress { display: flex; justify-content: flex-end; margin: -34px 0 12px; pointer-events: none; }
.task { justify-content: flex-start; gap: 12px; padding: 12px 14px; }
.task input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--soft); border-radius: 7px; background: none; display: grid; place-items: center; cursor: pointer; }
.task input[type=checkbox]:hover { border-color: var(--accent); }
.task input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
.task input[type=checkbox]:checked::after { content: ''; width: 10px; height: 5px; margin-top: -2px; border: solid var(--accent-ink); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.task-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task.done .task-text { color: var(--soft); text-decoration: line-through; }
.tag { flex: none; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.task-x { flex: none; border: 0; background: none; color: var(--soft); font: 400 20px/1 var(--sans); padding: 2px 6px; border-radius: 8px; cursor: pointer; opacity: .55; }
.task-x:hover, .task-x:focus-visible { opacity: 1; color: var(--down); }
.todo-form { display: flex; gap: 8px; margin-top: 14px; }
.todo-form input[type=text] { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: inherit; }
.todo-form select { flex: none; max-width: 36%; padding: 0 10px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--soft); font: 500 12px var(--mono); }
.todo-form input::placeholder { color: var(--soft); }
@media (max-width: 520px) {
  .todo-form { flex-wrap: wrap; }
  .todo-form input[type=text] { flex-basis: 100%; }
  .todo-form select { flex: 1; max-width: none; padding: 11px 10px; }
}

/* Wynik za okres */
.period { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 10px; }
.period-val { font: 700 22px/1.2 var(--mono); letter-spacing: -0.03em; }

/* Plan zajęć: połączenie z USOS */
.usos { margin-top: 14px; }
.usos .note { margin-top: 0; margin-bottom: 10px; }
.usos-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn:disabled { opacity: .55; cursor: wait; }
.usos-title { font-weight: 600; margin-bottom: 8px; }
.usos-search { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hair); background: var(--sunk); color: var(--ink); font: inherit; }
.usos-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin: 10px 0 12px; }
.usos-school { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; border: 0; border-radius: 14px; background: var(--sunk); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.usos-school small { flex: none; font: 600 12px/1 var(--mono); color: var(--accent); }
.usos-school.nokey { color: var(--soft); }
.usos-school.nokey small { color: var(--soft); font-weight: 500; }
.usos-school:hover, .usos-school:focus-visible { outline: 1px solid var(--edge); }
.usos.busy .usos-list { opacity: .5; pointer-events: none; }

/* Kreator pierwszego uruchomienia */
dialog.onb { width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 auto; padding: 0; border-radius: 0; border: 0; background: var(--bg); overflow: hidden; }
dialog.onb[open] { display: flex; flex-direction: column; }
@media (min-width: 600px) {
  dialog.onb { height: min(760px, calc(100dvh - 40px)); max-height: calc(100dvh - 40px); margin: auto; border: 1px solid var(--edge); border-radius: 28px; background: var(--tile); }
}
.onb-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 10px 22px; }
.onb-meta { display: flex; align-items: center; gap: 14px; }
.onb-count { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.onb-dots { display: flex; gap: 6px; }
.onb-dots i { width: 22px; height: 4px; border-radius: 4px; background: var(--lift); }
.onb-dots i.done { background: color-mix(in srgb, var(--accent) 45%, var(--lift)); }
.onb-dots i.cur { background: var(--accent); }
.onb-close { width: 44px; height: 44px; border: 1px solid var(--hair); border-radius: 14px; background: var(--sunk); color: var(--ink); font: 400 24px/1 var(--sans); cursor: pointer; }
.onb-close:hover { background: var(--lift); color: var(--accent); }
.onb-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
.onb-body h2 { margin: 0; }
.onb-lead { font-size: 17px; line-height: 1.4; margin: 0; }
.onb-hint { color: var(--soft); font-size: 14px; margin: 0; }
.onb-ok { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--up-bg); color: var(--accent); font-weight: 700; }
.onb-sub { margin: 4px 0 0; font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.onb-field { display: flex; flex-direction: column; gap: 6px; }
.onb-field label { font-size: 13px; font-weight: 600; color: var(--soft); }
.onb-field input, .onb-body .usos-search { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 16px; }
.onb-field input:focus, .onb-body .usos-search:focus { border-color: var(--accent); outline: none; }
.onb-field small { color: var(--soft); font-size: 12.5px; }
.onb-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.onb-list { max-height: none; flex: 1 1 200px; min-height: 160px; margin: 0; }
.onb-list .usos-school { min-height: 48px; }
.onb-sugg { display: flex; flex-direction: column; gap: 6px; }
.onb-sugg:empty { display: none; }
.onb-sugg .usos-school { min-height: 52px; }
.onb-sugg b { font-weight: 600; display: block; }
.onb-detail { display: block; margin-top: 2px; font: 400 12.5px/1.3 var(--sans); color: var(--soft); }
.onb-chosen { margin: 0; font: 500 12.5px/1.4 var(--mono); color: var(--accent); }
.onb-chosen:empty { display: none; }
.onb-geo, .onb-test { align-self: flex-start; min-height: 48px; }
.onb-results { display: flex; flex-direction: column; gap: 8px; }
.onb-results .note { margin: 0; }
.onb-opt { padding: 12px 14px; border-radius: 14px; background: var(--sunk); }
.onb-opt-main { font: 600 15px/1.3 var(--mono); }
.onb-lines { color: var(--accent); }
.onb-opt-legs { margin-top: 4px; font-size: 12.5px; color: var(--soft); }
.onb-sum { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; padding: 16px; border-radius: 16px; background: var(--sunk); }
.onb-sum dt { font: 500 12px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.onb-sum dd { margin: 0; overflow-wrap: anywhere; }
.onb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.onb-actions .btn { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.onb-back { margin-left: auto; min-height: 48px; padding: 0 6px; border: 0; background: none; color: var(--soft); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.onb-back:hover { color: var(--accent); }
.onb-live { min-height: 0; }
.onb-live .note { margin: 0; }
.onb-body .note { margin: 0; }
.onb-body button:disabled { opacity: .55; cursor: wait; }
.onb-rerun { font-size: 12.5px; }
.onb-sugg .usos-school small.onb-detail { display: block; margin-top: 2px; font: 400 12.5px/1.3 var(--sans); color: var(--soft); }

/* Kreator: wyszukiwanie dojazdu */
.onb-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--hair); }
.onb-seg-btn { min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--soft); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.onb-seg-btn.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.onb-placebox { display: flex; flex-direction: column; gap: 8px; }
.onb-placebox .note { margin: 0; }
.onb-field input[type=time] { color-scheme: dark; }
.onb-cards { display: flex; flex-direction: column; gap: 10px; }
.onb-card { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px; border: 1.5px solid var(--hair); border-radius: 18px; background: var(--sunk); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.onb-card:hover { background: var(--lift); }
.onb-card.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--sunk)); }
.onb-card-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.onb-card-time { font: 700 21px/1.1 var(--mono); letter-spacing: -0.03em; }
.onb-card-meta { font-size: 13px; color: var(--soft); }
.onb-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.onb-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px; background: var(--lift); font: 600 12.5px/1.3 var(--mono); }
.onb-chip small { font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.onb-chip.walk { color: var(--soft); background: none; border: 1px solid var(--hair); font-weight: 500; }
.onb-chip.ride { color: var(--accent-ink); background: var(--accent); }
.onb-chip.ride small { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.onb-chip.m-bus { background: var(--amber); }
.onb-chip.m-tram { background: var(--ink); }
.onb-chip.m-metro { background: var(--coral); }
.onb-arr { color: var(--soft); font-size: 14px; }
.onb-ico { flex: none; }
.onb-rides { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--soft); }
.onb-late { color: var(--amber); font-weight: 700; }
.onb-ontime { color: color-mix(in srgb, var(--accent) 70%, var(--soft)); }
.onb-summary { padding: 14px; border-radius: 16px; border: 1px solid var(--edge); background: var(--sunk); display: flex; flex-direction: column; gap: 8px; }
.onb-summary p { margin: 0; }
.onb-sum-main { font-size: 14.5px; line-height: 1.45; }
.onb-edit { margin-left: 0; align-self: flex-start; }
.onb-attr { margin: 0; font-size: 11.5px; color: var(--soft); }

/* Kreator: planer połączeń w stylu Jakdojade */
.onb-sb { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--edge); border-radius: 20px; background: var(--tile); }
.onb-sb-pair { position: relative; display: flex; flex-direction: column; border-radius: 14px; background: var(--sunk); border: 1px solid var(--hair); }
.onb-sb-row { display: flex; align-items: center; gap: 10px; padding: 0 56px 0 14px; }
.onb-sb-row input { flex: 1; min-width: 0; min-height: 50px; padding: 10px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; text-overflow: ellipsis; }
.onb-sb-row input:focus { outline: none; }
.onb-sb-pair:focus-within { border-color: var(--accent); }
.onb-sb-sep { height: 1px; margin: 0 14px 0 34px; background: var(--hair); }
.onb-mark { flex: none; width: 14px; height: 14px; display: grid; place-items: center; color: var(--coral); }
.onb-mark.dot { border-radius: 50%; border: 3px solid var(--accent); }
.onb-swap { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 1px solid var(--hair); border-radius: 50%; background: var(--tile); color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.onb-swap:hover { background: var(--lift); }
.onb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.onb-pills:empty { display: none; }
.onb-pill { min-height: 40px; padding: 8px 14px; border: 1px solid var(--hair); border-radius: 999px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.onb-pill:hover { background: var(--lift); }
.onb-pill.tog { color: var(--soft); }
.onb-pill.tog.on { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.onb-pstat:empty { display: none; }
.onb-sb .onb-sugg .usos-school { background: var(--lift); }
.onb-tbox { display: flex; flex-direction: column; gap: 10px; }
.onb-trow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.onb-sel, .onb-time { min-height: 44px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 15px; color-scheme: dark; }
.onb-sel:focus, .onb-time:focus { outline: none; border-color: var(--accent); }
.onb-opts { border: 1px solid var(--hair); border-radius: 14px; background: var(--sunk); padding: 0 14px; }
.onb-opts summary { padding: 12px 0; min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--ink); }
.onb-opts-body { display: flex; flex-direction: column; gap: 10px; padding: 0 0 14px; }
.onb-opts-body .onb-sub { margin: 4px 0 0; }
.onb-search { width: 100%; min-height: 52px; font-size: 16px; }
.onb-item { display: flex; flex-direction: column; gap: 0; }
.onb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onb-when { font: 700 24px/1.1 var(--mono); letter-spacing: -0.04em; color: var(--accent); }
.onb-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.onb-card-right b { font: 600 15px/1.2 var(--mono); }
.onb-card-right small { font-size: 12.5px; color: var(--soft); }
.onb-card { gap: 12px; }
.onb-card-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--soft); }
.onb-chain { gap: 6px 4px; }
.onb-bwrap { display: inline-flex; align-items: center; gap: 6px; }
.onb-bwrap .onb-late, .onb-bwrap .onb-ontime { font-size: 11.5px; }
.onb-badge { display: inline-block; min-width: 34px; padding: 4px 9px; border-radius: 8px; text-align: center; font: 700 13px/1.2 var(--mono); border: 1.5px solid var(--accent); color: var(--accent); background: none; }
.onb-badge.m-bus { background: var(--amber); border-color: var(--amber); color: #1d1405; }
.onb-badge.m-tram { background: var(--coral); border-color: var(--coral); color: #240b06; }
.onb-badge.m-metro { background: #5aa9ff; border-color: #5aa9ff; color: #06192e; }
.onb-walk { display: inline-flex; align-items: center; gap: 3px; font: 500 12px/1 var(--mono); color: var(--soft); }
.onb-tl { margin: -4px 0 4px; padding: 14px 14px 10px; border: 1.5px solid var(--accent); border-top: 0; border-radius: 0 0 18px 18px; background: color-mix(in srgb, var(--accent) 5%, var(--sunk)); }
.onb-card.on { border-radius: 18px 18px 0 0; }
.onb-tl-row { --c: var(--accent); display: grid; grid-template-columns: 44px 16px 1fr; gap: 0 10px; min-height: 30px; }
.onb-tl-row.m-bus { --c: var(--amber); }
.onb-tl-row.m-tram { --c: var(--coral); }
.onb-tl-row.m-metro { --c: #5aa9ff; }
.onb-tl-row.m-walk { --c: var(--soft); }
.onb-tl-time { font: 600 13px/1.5 var(--mono); text-align: right; }
.onb-tl-line { position: relative; }
.onb-tl-line::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 3px; background: var(--c); border-radius: 2px; }
.onb-tl-row.walk .onb-tl-line::before { width: 0; background: none; border-left: 3px dotted var(--c); }
.onb-tl-row.stop .onb-tl-line::after { content: ''; position: absolute; left: 2px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--tile); border: 3px solid var(--c); box-sizing: border-box; }
.onb-tl-text { display: flex; flex-direction: column; font-size: 14px; line-height: 1.45; padding-bottom: 6px; }
.onb-tl-text small { font-size: 12px; color: var(--soft); }
.onb-tl-row.walk .onb-tl-text { color: var(--soft); font-size: 13px; }
.onb-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.onb-more .btn { min-height: 48px; }
.onb-late { color: var(--amber); font-weight: 700; }
.onb-ontime { color: color-mix(in srgb, var(--accent) 70%, var(--soft)); }
.onb-trow { grid-template-columns: minmax(0, 1fr) 124px auto; }
.onb-time { min-width: 0; width: 100%; padding: 8px 8px; font-size: 14px; }
.onb-trow .onb-pill { padding: 8px 12px; }

/* Kreator: krok Poranek */
.onb-fc { margin: 0; color: var(--ink); font-size: 13.5px; }
.onb-switch { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--hair); cursor: pointer; font-size: 15px; }
.onb-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: var(--lift); border: 1px solid var(--hair); position: relative; cursor: pointer; transition: background .15s; }
.onb-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--soft); transition: transform .15s, background .15s; }
.onb-switch input:checked { background: var(--accent); border-color: transparent; }
.onb-switch input:checked::after { transform: translateX(18px); background: var(--accent-ink); }
.onb-prev { padding: 16px; border-radius: 16px; border: 1px solid var(--edge); background: var(--sunk); }
.onb-prev p { margin: 0; }
.onb-prev-main { font: 500 15px/1.5 var(--mono); }
.onb-prev-main b { color: var(--accent); font-weight: 700; }

/* Kafelek pociągów: pozycja autobusu lub tramwaju */
.veh-row { margin: 12px 14px 0; font-size: 14px; color: var(--ink); }
.veh-row:empty { display: none; }
.veh-row .muted { color: var(--soft); }

.onb-liveveh { font-size: 12.5px; color: var(--ink); padding: 2px 0 4px; }
.onb-liveveh:empty { display: none; }
.onb-liveveh .muted { color: var(--soft); }

/* Kafelek pociągów: mapa na żywo */
.tmap { position: relative; margin-top: 12px; border: 1px solid var(--edge); border-radius: 20px; overflow: hidden; background: var(--sunk); }
.tmap[hidden] { display: none; }
.tmap:not([hidden]) ~ .veh-row { display: none; }
.tmap-canvas { height: 260px; background: var(--bg); }
.tmap-ctl { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; gap: 6px; }
.tmap-btn { min-height: 36px; padding: 6px 12px; border: 1px solid var(--hair); border-radius: 999px; background: color-mix(in srgb, var(--tile) 90%, transparent); color: var(--ink); font: 600 12.5px var(--sans); cursor: pointer; }
.tmap-btn.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.tmap-caption { margin: 0; padding: 10px 14px; font-size: 13.5px; color: var(--ink); }
.tmap-caption:empty { display: none; }
.tmap .leaflet-container { font-family: var(--sans); background: var(--bg); }
.tmap .leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--bg) 75%, transparent); color: var(--soft); font-size: 10px; }
.tmap .leaflet-container .leaflet-control-attribution a { color: var(--soft); }
.tmap-icon { background: none; border: 0; }
.tmap-veh { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 26px; border-radius: 13px; border: 2px solid var(--bg); font: 700 12px/1 var(--mono); color: #10130a; background: #c5f04f; box-shadow: 0 1px 6px rgb(0 0 0 / .5); }
.tmap-veh.m-bus { background: #f5a623; }
.tmap-veh.m-tram { background: #ff6b5a; }
.tmap-veh.m-metro { background: #4ea1ff; }
.tmap-arr { position: absolute; top: -9px; left: 50%; margin-left: -5px; width: 0; height: 0; border: 5px solid transparent; border-bottom: 8px solid #f2eee3; border-top: 0; transform-origin: 5px 22px; }

/* Kafelek pociągów: wybrane połączenie */
.chosen { position: relative; margin-bottom: 14px; padding: 16px 16px 12px; border: 1px solid var(--accent); border-radius: 28px; background-clip: padding-box; background: color-mix(in srgb, var(--accent) 6%, var(--tile)); }
.chosen[hidden] { display: none; }
.chosen-head { display: flex; align-items: baseline; gap: 10px; padding-right: 48px; margin-bottom: 8px; }
.chosen-head h3 { margin: 0; font: 500 12px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.chosen-day { font: 600 12px/1.3 var(--mono); color: var(--accent); }
.chosen-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: 400 22px/1 var(--sans); cursor: pointer; }
.chosen-x:hover { color: var(--accent); background: var(--lift); }
.chosen-main { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.chosen-when { font: 700 28px/1.1 var(--mono); letter-spacing: -0.04em; color: var(--accent); }
.chosen-times { font: 600 14px/1.3 var(--mono); color: var(--ink); }
.chosen .onb-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; }
.chosen .onb-tl { margin: 10px 0 0; border: 1px solid var(--hair); border-radius: 16px; background: var(--sunk); }
.chosen-live:empty { display: none; }
.veh-row2 { margin: 10px 0 0; font-size: 13.5px; color: var(--ink); }
.veh-row2:empty { display: none; }
.veh-row2 .muted { color: var(--soft); }

/* Ciemny podkład mapy z kafelków OpenStreetMap */
.leaflet-tile-pane .map-tiles-dark, .map-tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.6); }
.tmap-caption { white-space: pre-line; }

/* Motywy kolorystyczne (domyślny „lime” to :root) */
:root[data-theme="pink"] { --bg: #140b10; --tile: #1d1218; --sunk: #271a21; --lift: #33232c; --hair: #38262f; --edge: #432c37; --soft: #a3969d; --accent: #ff7ac6; --accent-ink: #2a0818; }
:root[data-theme="blue"] { --bg: #0a0f17; --tile: #111823; --sunk: #19212e; --lift: #232d3d; --hair: #232c3b; --edge: #2b3648; --soft: #8f9aab; --accent: #5aa9ff; --accent-ink: #04111f; }
:root[data-theme="violet"] { --bg: #100c18; --tile: #171222; --sunk: #201a2e; --lift: #2b2440; --hair: #2e2640; --edge: #3a3052; --soft: #9a93ab; --accent: #b48cff; --accent-ink: #12091f; }
:root[data-theme="mint"] { --bg: #0a1412; --tile: #101c19; --sunk: #172622; --lift: #20332e; --hair: #1f302b; --edge: #2a403a; --soft: #8fa39d; --accent: #5ef0c0; --accent-ink: #04201a; }
:root[data-theme="sunset"] { --bg: #150d0a; --tile: #1e1511; --sunk: #291c16; --lift: #36261e; --hair: #392820; --edge: #473226; --soft: #a39a92; --accent: #ffa45a; --accent-ink: #2a1203; }

/* Ustawienia: wybór koloru tła */
.field.theme { grid-template-columns: 1fr; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.swatch { position: relative; display: inline-flex; cursor: pointer; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch span { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--hair); box-shadow: inset 0 0 0 3px var(--bg); }
.swatch input:checked + span { border-color: var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field select { width: 100%; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; background: var(--sunk); color: var(--ink); font: 500 14px var(--mono); }

/* Strona logowania: gość */
.login:has(.landing) { display: block; padding: 0; }
.landing { width: min(440px, 100%); margin: 0 auto; padding: 36px 20px 40px; display: flex; flex-direction: column; gap: 16px; min-height: 100dvh; justify-content: center; }
.landing h1 { margin: 0; }
.landing .pitch { margin: 0 0 4px; font-size: 18px; line-height: 1.4; color: var(--ink); }
.landing .note { margin: 0; }
.landing .note.info { color: var(--accent); }
.landing [hidden] { display: none !important; }
.landing-actions { display: flex; flex-direction: column; gap: 12px; }
.btn.big { min-height: 54px; padding: 14px 18px; font-size: 16px; text-align: center; }
.landing-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--edge); border-radius: 20px; background: var(--tile); }
.landing-panel form { display: flex; flex-direction: column; gap: 10px; }
.landing-list { max-height: 280px; margin: 0; }
.landing-list.busy { opacity: .5; pointer-events: none; }
.linkish { align-self: flex-start; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.owner { border-top: 1px solid var(--hair); padding-top: 8px; }
.owner summary { padding: 12px 0; min-height: 44px; display: flex; align-items: center; color: var(--soft); font-size: 14px; cursor: pointer; }
.login .owner form { width: auto; padding: 0; border: 0; border-radius: 0; background: none; margin-bottom: 8px; }
.landing .privacy { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--soft); }

/* Ustawienia: konto */
.account { padding-bottom: 12px; }
.account p { margin: 4px 0 10px; }
.account .actions { flex-wrap: wrap; }
.btn.danger { color: var(--down); border-color: color-mix(in srgb, var(--down) 45%, var(--hair)); }
.btn.danger:hover { background: var(--down-bg); }
.login .landing-panel form { width: auto; padding: 0; border: 0; border-radius: 0; background: none; }


/* przycisk w nagłówku */
.focus-btn { position: relative; flex: none; width: 58px; height: 58px; padding: 2px; border: 1px solid var(--hair); border-radius: 50%; background: var(--sunk); cursor: pointer; display: grid; place-items: center; }
.focus-btn[hidden] { display: none; }
.focus-btn:hover { background: var(--lift); }
.focus-btn .lumek { width: 50px; height: 50px; }
.focus-ring { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); pointer-events: none; }
.focus-ring circle { fill: none; stroke-width: 3; }
.focus-ring .ring-bg { stroke: var(--hair); }
.focus-ring .ring-fg { stroke: var(--accent); stroke-linecap: round; }

/* arkusz skupienia */
.onb.focus .onb-body.fs { align-items: stretch; }
.fs-hero { position: relative; align-self: center; width: min(250px, 66vw); transition: transform 1s linear; }
.fs-hero.burst .lumek { animation: fs-pop .8s cubic-bezier(.2, 1.4, .4, 1); }
.fs-burst { position: absolute; left: 50%; top: 58%; width: 40%; aspect-ratio: 1; margin: -20% 0 0 -20%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 80%, white) 0%, var(--accent) 35%, transparent 70%); animation: fs-burst 1.1s ease-out forwards; pointer-events: none; }
@keyframes fs-burst { from { transform: scale(.3); opacity: 1; } to { transform: scale(5.5); opacity: 0; } }
@keyframes fs-pop { from { transform: scale(.55); } to { transform: scale(1); } }
.fs-name { display: flex; align-items: center; justify-content: center; gap: 8px; }
.fs-name h2 { margin: 0; font-size: 26px; }
.fs-nameinput { min-width: 0; flex: 1; max-width: 240px; min-height: 46px; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--sunk); color: var(--ink); font: 700 20px var(--sans); }
.fs-pencil { width: 40px; height: 40px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--soft); cursor: pointer; display: grid; place-items: center; }
.fs-pencil:hover { color: var(--accent); }
.fs-stage { margin: 0; text-align: center; font: 500 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.fs-prog { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.fs-prog small { color: var(--soft); font-size: 13px; }
.fs-bar { width: 100%; height: 10px; border-radius: 10px; background: var(--sunk); overflow: hidden; border: 1px solid var(--hair); }
.fs-fill { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #10200a), var(--accent)); }
.fs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fs-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; background: var(--sunk); }
.fs-stats b { font: 700 16px/1.2 var(--mono); letter-spacing: -0.02em; }
.fs-stats small { color: var(--soft); font-size: 12px; }
.fs-count { text-align: center; font: 700 64px/1 var(--mono); letter-spacing: -0.05em; color: var(--accent); }
.fs-warn { margin: 0; text-align: center; color: var(--soft); font-size: 15px; }
.fs-result { margin: 0; text-align: center; font-size: 18px; line-height: 1.4; min-height: 2.8em; }
.fs-result.pop { animation: fs-fade .6s ease-out; font-weight: 700; color: var(--accent); }
@keyframes fs-fade { from { opacity: 0; transform: translateY(8px); } }
.fs-strip { margin-top: 6px; }
.fs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fs-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px; border-radius: 14px; background: var(--sunk); text-align: center; min-width: 0; }
.fs-cell.now { outline: 1.5px solid var(--accent); }
.fs-cell.pick { cursor: pointer; }
.fs-cell.pick:hover, .fs-cell.pick:focus-visible { background: var(--lift); }
.fs-cellpet { position: relative; width: 56px; height: 56px; }
.fs-cell.off .lumek { filter: brightness(0) opacity(.28); }
.fs-q { position: absolute; inset: 0; display: grid; place-items: center; font: 700 20px var(--mono); color: var(--soft); }
.fs-cell b { font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }
.fs-cell small { font: 500 10.5px var(--mono); color: var(--soft); }
.fs-cell.off b { color: var(--soft); }

/* ===== Lumek 2.0: bot do nauki (animacje CSS na grupach SVG; JS tylko losowo przełącza klasy blink/look/walk/jump/squish/wink) ===== */
.lumek { display: block; width: 100%; height: auto; overflow: visible; }
.lumek.lm-small { overflow: hidden; }
.lumek.has-bg { overflow: hidden; border-radius: 26px; }
.lumek .lm-lw, .lumek .lm-bl, .lumek .lm-cl, .lumek .lm-claw, .lumek .lm-tail, .lumek .lm-core, .lumek .lm-ripple, .lumek .lm-pulse, .lumek .lm-flame, .lumek .lm-aura, .lumek .lm-steam, .lumek .lm-tear, .lumek .lm-grass, .lumek .lm-bko, .lumek .lm-bkc, .lumek .lm-fly { transform-box: fill-box; transform-origin: 50% 50%; }
.lumek .lm-lw { transform-origin: 50% 100%; animation: lm-lw 3.2s ease-in-out infinite alternate; }
.lumek .lm-ant.r .lm-lw, .lumek .lm-ant.c .lm-lw { animation-delay: -1.4s; }
.lumek .lm-ant.l { animation: lm-antl 4.6s ease-in-out infinite alternate; }
.lumek .lm-ant.r { animation: lm-antr 5.2s ease-in-out infinite alternate; }
.lumek .lm-ant.c { animation: lm-antr 3.8s ease-in-out infinite alternate; }
.lumek .lm-ant.big.l { animation: lm-antbl 7s ease-in-out infinite alternate; }
.lumek .lm-ant.big.r { animation: lm-antbr 7.6s ease-in-out infinite alternate; }
.lumek .lm-bl { animation: lm-bl 3.4s ease-in-out infinite alternate; }
.lumek .lm-eye { transition: transform .08s; }
/* Lumek 3.0: oczka małego Lumka (duży ma fizykę w JS i rysuje oczka sam) */
.lumek .lm-eyes { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .1s; }
.lumek.blink .lm-eyes { transform: scaleY(.15); }
.lumek.look-l .lm-eyes { transform: translateX(-4%); }
.lumek.look-r .lm-eyes { transform: translateX(4%); }
.lumek .lm-live { cursor: pointer; }
.lumek.blink .lm-eye { transform: scaleY(.12); }
.lumek.wink .lm-eye.r { transform: scaleY(.1); }
.lumek .lm-look { transition: transform .3s ease-out; }
.lumek.look-l .lm-look { transform: translateX(-3px); }
.lumek.look-r .lm-look { transform: translateX(3px); }
.lumek .lm-breathe { animation: lm-br 4.2s ease-in-out infinite; }
.lumek.m-focused .lm-breathe { animation: lm-brd 6.4s ease-in-out infinite; }
.lumek.m-sleepy .lm-breathe { animation: lm-br 6.8s ease-in-out infinite; }
.lumek.m-withered .lm-breathe { animation: lm-brw 6s ease-in-out infinite alternate; }
.lumek.lm-small .lm-breathe { animation-name: lm-brs; }
.lumek .lm-pulse { animation: lm-pulse 3.2s ease-in-out infinite alternate; }
.lumek .lm-flow { stroke-dasharray: 7 93; opacity: 0; animation: lm-flow 2.8s linear infinite; }
.lumek.m-focused .lm-flow { animation-duration: 1.6s; }
.lumek .lm-flow.d1 { animation-delay: -.5s; } .lumek .lm-flow.d2 { animation-delay: -1.1s; } .lumek .lm-flow.d3 { animation-delay: -1.7s; }
.lumek .lm-flow.d4 { animation-delay: -.3s; } .lumek .lm-flow.d5 { animation-delay: -2.1s; } .lumek .lm-flow.d6 { animation-delay: -1.4s; }
.lumek.m-withered .lm-flow { animation: none; opacity: 0; }
.lumek .lm-leg { animation: lm-step 7s ease-in-out infinite; }
.lumek .lm-leg.g1 { animation-delay: -2s; } .lumek .lm-leg.g2 { animation-delay: -4.1s; } .lumek .lm-leg.g3 { animation-delay: -5.6s; }
.lumek.walk-l .lm-leg, .lumek.walk-r .lm-leg { animation: lm-stepw .42s ease-in-out infinite alternate; }
.lumek.walk-r .lm-leg.g1, .lumek.walk-l .lm-leg.g1, .lumek.walk-r .lm-leg.g3, .lumek.walk-l .lm-leg.g3 { animation-direction: alternate-reverse; }
.lumek.walk-r .lm-walker { animation: lm-walkr 2.7s ease-in-out; }
.lumek.walk-l .lm-walker { animation: lm-walkl 2.7s ease-in-out; }
.lumek.jump .lm-jp { animation: lm-jump .8s cubic-bezier(.3, .7, .4, 1); }
.lumek .lm-ymouth { opacity: 0; }
.lumek.yawn .lm-ymouth { animation: lm-ym 1.8s ease-in-out; }
.lumek.yawn .lm-yawn { animation: lm-yw 1.8s ease-in-out; }
.lumek.yawn .lm-eyes { transform: scaleY(.3); }
@keyframes lm-yw { 0%, 100% { transform: none; } 35% { transform: scale(.94, 1.1); } 70% { transform: scale(1.06, .94); } }
@keyframes lm-ym { 0%, 100% { opacity: 0; } 25%, 70% { opacity: 1; } }
.fs-amb { margin: 0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .lumek.yawn .lm-ymouth, .lumek.yawn .lm-yawn { animation: none; } }
.lumek.squish .lm-sq { animation: lm-squish .65s ease-out; }
.lumek .lm-aura { animation: lm-aura 4.4s ease-in-out infinite alternate; }
.lumek .lm-arm.r { animation: lm-arm 4.4s ease-in-out infinite alternate; }
.lumek .lm-arm.l { animation: lm-arm 5.1s ease-in-out infinite alternate-reverse; }
.lumek .lm-claw { transform-origin: 50% 0; animation: lm-claw 6s ease-in-out infinite; }
.lumek .lm-bko { opacity: 0; transform-origin: 50% 100%; animation: lm-bko 11s ease-in-out infinite; }
.lumek .lm-bkc { animation: lm-bkc 11s ease-in-out infinite; }
.lumek .lm-drift { animation: lm-drift 6s ease-in-out infinite alternate; }
.lumek .lm-drift.d1 { animation-delay: -2s; animation-duration: 7s; } .lumek .lm-drift.d2 { animation-delay: -4s; animation-duration: 5.4s; }
.lumek .lm-flame { animation: lm-flick 1.3s ease-in-out infinite alternate; }
.lumek .lm-swing { animation: lm-swing 3.4s ease-in-out infinite alternate; }
.lumek .lm-cl { transform-origin: 50% 0; animation: lm-cape 3.2s ease-in-out infinite alternate; }
.lumek .lm-cl.c1 { animation-delay: -1s; } .lumek .lm-cl.c2 { animation-delay: -2s; }
.lumek .lm-lib { animation: lm-lib 2.6s ease-in-out infinite alternate; }
.lumek .lm-wing.l { animation: lm-wl 3.6s ease-in-out infinite alternate; }
.lumek .lm-wing.r { animation: lm-wr 3.6s ease-in-out infinite alternate; }
.lumek .lm-core { animation: lm-core 2.4s ease-in-out infinite alternate; }
.lumek .lm-ripple { animation: lm-rip 2.8s ease-out infinite; }
.lumek .lm-rise { animation: lm-rise 4.4s ease-in infinite; }
.lumek .lm-rise.r1 { animation-delay: -.8s; } .lumek .lm-rise.r2 { animation-delay: -1.6s; } .lumek .lm-rise.r3 { animation-delay: -2.4s; } .lumek .lm-rise.r4 { animation-delay: -3.2s; } .lumek .lm-rise.r5 { animation-delay: -3.9s; }
.lumek .lm-z { opacity: .85; animation: lm-z 3.4s ease-in-out infinite; }
.lumek .lm-z.z1 { animation-delay: 1.1s; } .lumek .lm-z.z2 { animation-delay: 2.2s; }
.lumek .lm-tear { animation: lm-tear 3s ease-in infinite; }
.lumek .lm-heart { fill: #ff6b8a; opacity: 0; animation: lm-heart 1.4s ease-out forwards; }
.lumek .lm-fly { animation: lm-fly 5s ease-in-out infinite alternate; }
.lumek .lm-fly.f1 { animation-duration: 6.3s; animation-delay: -1s; } .lumek .lm-fly.f2 { animation-duration: 4.2s; animation-delay: -2.5s; }
.lumek .lm-fly.f3 { animation-duration: 7.1s; animation-delay: -.4s; } .lumek .lm-fly.f4 { animation-duration: 5.6s; animation-delay: -3.3s; }
.lumek .lm-tw { animation: lm-tw 3s ease-in-out infinite alternate; }
.lumek .lm-tw.t1 { animation-delay: -.7s; } .lumek .lm-tw.t2 { animation-delay: -1.5s; animation-duration: 2.2s; } .lumek .lm-tw.t3 { animation-delay: -2.2s; animation-duration: 3.8s; }
.lumek .lm-grass { transform-origin: 50% 100%; animation: lm-gr 4s ease-in-out infinite alternate; }
.lumek .lm-steam { animation: lm-steam 2.6s ease-in-out infinite; }
.lumek .lm-code { animation: lm-code 2.2s steps(2) infinite; }
.lumek .lm-tail { transform-origin: 20% 0; animation: lm-tail 1.9s ease-in-out infinite alternate; }
.lumek .lm-hold { animation: lm-hold 4.4s ease-in-out infinite alternate; }
.lumek .lm-rs { display: none; }
.lumek .lm-rx { animation: lm-rx 9s ease-in-out infinite alternate; }
.lumek .lm-ry { animation: lm-ry 9s ease-in-out infinite alternate; }
.lumek .lm-ry.lm-rb { animation: lm-ry 9s ease-in-out infinite alternate, lm-rbo 18s linear infinite; }
.lumek .lm-ry.lm-rf { animation: lm-ry 9s ease-in-out infinite alternate, lm-rfo 18s linear infinite; }
.lumek .lm-rx.r0 { animation-delay: -4.50s; }
.lumek .lm-ry.r0 { animation-delay: -0.00s, -0.00s; }
.lumek .lm-rx.r1 { animation-delay: -6.75s; }
.lumek .lm-ry.r1 { animation-delay: -2.25s, -2.25s; }
.lumek .lm-rx.r2 { animation-delay: -9.00s; }
.lumek .lm-ry.r2 { animation-delay: -4.50s, -4.50s; }
.lumek .lm-rx.r3 { animation-delay: -11.25s; }
.lumek .lm-ry.r3 { animation-delay: -6.75s, -6.75s; }
.lumek .lm-rx.r4 { animation-delay: -13.50s; }
.lumek .lm-ry.r4 { animation-delay: -9.00s, -9.00s; }
.lumek .lm-rx.r5 { animation-delay: -15.75s; }
.lumek .lm-ry.r5 { animation-delay: -11.25s, -11.25s; }
.lumek .lm-rx.r6 { animation-delay: -18.00s; }
.lumek .lm-ry.r6 { animation-delay: -13.50s, -13.50s; }
.lumek .lm-rx.r7 { animation-delay: -20.25s; }
.lumek .lm-ry.r7 { animation-delay: -15.75s, -15.75s; }
.lumek.m-withered { filter: saturate(.35) brightness(.88); }
.lumek.m-withered .lm-ant.l { animation: none; transform: rotate(-34deg); }
.lumek.m-withered .lm-ant.r, .lumek.m-withered .lm-ant.c { animation: none; transform: rotate(34deg); }
.lumek.m-withered .lm-lw { animation: none; transform: rotate(24deg); }
.lumek.m-withered .lm-leg { animation-duration: 12s; }
.lumek.lm-still *, .lumek.lm-still { animation: none !important; }
@keyframes lm-lw { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes lm-antl { from { transform: rotate(-3.5deg); } to { transform: rotate(2.5deg); } }
@keyframes lm-antr { from { transform: rotate(-2.5deg); } to { transform: rotate(3.5deg); } }
@keyframes lm-antbl { from { transform: rotate(-1.4deg); } to { transform: rotate(1.2deg); } }
@keyframes lm-antbr { from { transform: rotate(-1.2deg); } to { transform: rotate(1.4deg); } }
@keyframes lm-bl { from { transform: rotate(-12deg) scale(.96); } to { transform: rotate(12deg) scale(1.08); } }
@keyframes lm-br { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, .97); } }
@keyframes lm-brd { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.035, .95); } }
@keyframes lm-brw { from { transform: scale(1, .98); } to { transform: scale(1.012, .955); } }
@keyframes lm-brs { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .98); } }
@keyframes lm-pulse { from { opacity: .45; } to { opacity: .95; } }
@keyframes lm-flow { 0% { stroke-dashoffset: 0; opacity: 0; } 12% { opacity: .95; } 88% { opacity: .95; } 100% { stroke-dashoffset: -100; opacity: 0; } }
@keyframes lm-step { 0%, 78%, 100% { transform: rotate(0); } 83% { transform: rotate(-11deg); } 88% { transform: rotate(6deg); } 93% { transform: rotate(-3deg); } }
@keyframes lm-stepw { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes lm-walkr { 0%, 100% { transform: translateX(0); } 40%, 60% { transform: translateX(15px); } }
@keyframes lm-walkl { 0%, 100% { transform: translateX(0); } 40%, 60% { transform: translateX(-15px); } }
@keyframes lm-jump { 0% { transform: translateY(0); } 35% { transform: translateY(-18px); } 55% { transform: translateY(0); } 70% { transform: translateY(-5px); } 85%, 100% { transform: translateY(0); } }
@keyframes lm-squish { 0% { transform: scale(1); } 25% { transform: scale(1.14, .8); } 55% { transform: scale(.94, 1.1); } 80% { transform: scale(1.03, .97); } 100% { transform: scale(1); } }
@keyframes lm-aura { from { transform: scale(.95); } to { transform: scale(1.06); } }
@keyframes lm-arm { from { transform: rotate(-2deg); } to { transform: rotate(2.2deg); } }
@keyframes lm-claw { 0%, 70%, 100% { transform: scaleX(1); } 80% { transform: scaleX(1.25); } 90% { transform: scaleX(.9); } }
@keyframes lm-bkc { 0%, 66%, 94%, 100% { opacity: 1; } 70%, 90% { opacity: 0; } }
@keyframes lm-bko { 0%, 66%, 94%, 100% { opacity: 0; transform: scale(.85); } 72%, 88% { opacity: 1; transform: scale(1); } }
@keyframes lm-drift { from { transform: translate(0, 2px) rotate(-5deg); } to { transform: translate(4px, -7px) rotate(6deg); } }
@keyframes lm-flick { 0% { transform: scale(.94); opacity: .72; } 40% { opacity: 1; } 100% { transform: scale(1.08); opacity: .88; } }
@keyframes lm-swing { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
@keyframes lm-cape { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes lm-lib { from { opacity: .15; } to { opacity: .45; } }
@keyframes lm-wl { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
@keyframes lm-wr { from { transform: rotate(4deg); } to { transform: rotate(-5deg); } }
@keyframes lm-core { from { transform: scale(.85); } to { transform: scale(1.18); } }
@keyframes lm-rip { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes lm-rise { 0% { opacity: 0; transform: translateY(8px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-28px); } }
@keyframes lm-z { 0% { opacity: 0; transform: translate(0, 6px); } 30%, 60% { opacity: .95; } 100% { opacity: 0; transform: translate(6px, -10px); } }
@keyframes lm-tear { 0% { opacity: 0; transform: translateY(-3px) scale(.6); } 20% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(10px) scale(.9); } }
@keyframes lm-heart { 0% { opacity: 0; transform: translateY(8px) scale(.4); } 25% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(-22px) scale(1); } }
@keyframes lm-fly { 0% { transform: translate(0, 0); opacity: .35; } 50% { opacity: 1; } 100% { transform: translate(9px, -12px); opacity: .5; } }
@keyframes lm-tw { from { opacity: .2; } to { opacity: 1; } }
@keyframes lm-gr { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
@keyframes lm-steam { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-5px); opacity: 1; } }
@keyframes lm-code { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes lm-tail { from { transform: rotate(-6deg); } to { transform: rotate(8deg); } }
@keyframes lm-hold { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes lm-rx { from { transform: translateX(-132px); } to { transform: translateX(132px); } }
@keyframes lm-ry { from { transform: translateY(-30px); } to { transform: translateY(30px); } }
@keyframes lm-rbo { 0%, 23% { opacity: 1; } 27%, 73% { opacity: 0; } 77%, 100% { opacity: 1; } }
@keyframes lm-rfo { 0%, 23% { opacity: 0; } 27%, 73% { opacity: 1; } 77%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .lumek *, .lumek { animation: none !important; }
  .lumek .lm-rs { display: inline; } .lumek .lm-rx { display: none; }
  .lumek .lm-look { transition: none; }
}

/* arkusz Lumka 2.0: iskry, cel dnia, zadania, sklep */
.fs-hero { width: min(400px, 92vw); }
.fs-hero .lumek.has-bg { box-shadow: 0 0 0 1px var(--hair); }
.fs-name { flex-wrap: wrap; }
.fs-sparks { display: flex; align-items: center; gap: 6px; }
.fs-spk, .fs-mult { font: 700 13px/1 var(--mono); padding: 7px 10px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--hair); white-space: nowrap; }
.fs-mult { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.fs-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sunk); align-self: center; }
.fs-tab { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--soft); font: 600 14px var(--sans); cursor: pointer; }
.fs-tab.on { background: var(--accent); color: var(--accent-ink); }
.fs-goalrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--sunk); }
.fs-goalring { flex: none; width: 56px; height: 56px; }
.fs-goalring circle { fill: none; stroke-width: 6; }
.fs-goalring .g-bg { stroke: var(--hair); }
.fs-goalring .g-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.fs-goalring .g-fg.done { stroke: #ffd45e; }
.fs-goaltxt { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.fs-goaltxt b { font: 700 16px var(--mono); letter-spacing: -.02em; }
.fs-goaltxt small { color: var(--soft); font-size: 13px; }
.fs-mhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; }
.fs-mhead b { font: 700 13px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.fs-mhead small { color: var(--soft); font-size: 12px; }
.fs-quests { display: flex; flex-direction: column; gap: 10px; }
.fs-quest { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--sunk); }
.fs-quest.done { outline: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.fs-qtop { display: flex; justify-content: space-between; gap: 10px; }
.fs-qtop b { font-size: 14px; line-height: 1.3; }
.fs-qrew { flex: none; font: 700 13px var(--mono); color: #ffd45e; }
.fs-quest small { color: var(--soft); font: 500 12px var(--mono); }
.fs-quest .fs-bar { height: 8px; background: var(--bg); }
.fs-reward { margin: 0; align-self: center; padding: 10px 16px; border-radius: 999px; background: color-mix(in srgb, #ffd45e 16%, var(--sunk)); border: 1px solid color-mix(in srgb, #ffd45e 45%, transparent); color: #ffe38a; font: 700 15px var(--mono); text-align: center; animation: fs-fade .6s ease-out; }
.fs-try { min-height: 1.4em; margin: 0; text-align: center; }
.fs-shop { display: flex; flex-direction: column; gap: 14px; }
.fs-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fs-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px 10px; border-radius: 16px; background: var(--sunk); border: 1px solid var(--hair); text-align: center; cursor: pointer; min-width: 0; }
.fs-card.try { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--sunk)); }
.fs-card.eq { outline: 1.5px solid var(--accent); }
.fs-card.leg { border-color: #ffd45e; box-shadow: 0 0 18px -6px #ffd45e; }
.fs-card.locked .fs-ci { opacity: .5; }
.fs-ci { position: relative; width: 72px; height: 72px; display: grid; place-items: center; }
.fs-ico { width: 100%; height: 100%; }
.fs-lock { position: absolute; right: -4px; bottom: -2px; font-size: 18px; }
.fs-card b { font-size: 14px; line-height: 1.25; }
.fs-card small { font: 500 11.5px var(--mono); color: var(--soft); }
.fs-card .fs-legend { color: #ffd45e; letter-spacing: .12em; text-transform: uppercase; }
.fs-card .fs-price { color: #ffe38a; }
.fs-card .btn { width: 100%; min-height: 40px; margin-top: 4px; font-size: 13px; justify-content: center; }
.fs-sp { position: absolute; width: 14px; height: 14px; background: #fff6c0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: fs-sp 1.1s ease-out forwards; pointer-events: none; }
@keyframes fs-sp { 0% { opacity: 0; transform: scale(.3) rotate(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.8) rotate(90deg) translateY(-16px); } }
.fs-cellpet { width: 72px; height: 72px; }
.fs-sticky { position: sticky; top: -8px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 22px 8px; margin: -8px -22px 4px; background: var(--bg); box-shadow: 0 10px 12px -10px #000; }
.fs-sticky .fs-hero { width: min(200px, 52vw); }
.fs-shopname { display: flex; align-items: center; gap: 8px; }
.fs-shopname b { font-size: 18px; }
.fs-sticky .fs-try { font-size: 12px; min-height: 2.6em; }

/* Ekran startowy (splash.js): cząsteczki zlatują się w logo, jak na początku spotu. Znika po wczytaniu kafelków. */
.splash { position: fixed; inset: 0; z-index: 1000; background: radial-gradient(70vmax 60vmax at 50% 44%, var(--glow), transparent 70%) no-repeat var(--bg); transition: opacity .45s ease, visibility .45s; cursor: pointer; }
.splash canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .45s ease; }
.splash-title { position: absolute; left: 0; right: 0; top: calc(44% + var(--splash-r, 60px) + 34px); margin: 0; text-align: center; font: 700 clamp(30px, 6vw, 46px)/1 var(--sans); letter-spacing: -0.035em; color: var(--ink); opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.splash.titled .splash-title { opacity: 1; transform: none; }
.splash.out { opacity: 0; visibility: hidden; }
.splash.out canvas { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) {
  .splash-title, .splash canvas { transition: none; transform: none; }
}

/* Znajomi i wyścig tygodnia w arkuszu Skupienia */
.fs-friends { position: relative; display: flex; flex-direction: column; gap: 14px; }
.fs-frbox { display: flex; flex-direction: column; gap: 8px; }
.fs-coderow { display: flex; align-items: center; gap: 10px; }
.fs-code { font: 700 24px/1 var(--mono); letter-spacing: .14em; padding: 10px 14px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--hair); user-select: all; }
.fs-addrow { display: flex; gap: 8px; }
.fs-codein { flex: 1; min-width: 0; font: 600 16px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--edge); background: var(--sunk); color: var(--ink); }
.fs-frlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fs-fr { display: grid; grid-template-columns: 30px 44px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: var(--sunk); border: 1px solid transparent; }
.fs-fr.me { border-color: var(--edge); }
.fs-fr.lead { border-color: var(--accent); }
.fs-frpos { font: 700 16px var(--mono); text-align: center; color: var(--soft); }
.fs-frpet .lumek { width: 44px; height: 44px; }
.fs-frname { display: flex; flex-direction: column; min-width: 0; }
.fs-frname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-frname small, .fs-frpts small { color: var(--soft); font-size: 12px; }
.fs-frpts { display: flex; flex-direction: column; align-items: flex-end; }
.fs-frpts b { font: 700 18px var(--mono); }
.fs-frdel { width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--hair); background: transparent; color: var(--soft); font-size: 18px; cursor: pointer; }
.fs-frdel:hover { color: var(--coral); border-color: var(--coral); }

/* Lumek: wspólna sesja, propozycja celu z Terminów, odznaki */
.fs-invite { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 12%, var(--sunk)); border: 1px solid var(--accent); }
.fs-invite p { margin: 0; line-height: 1.45; }
.fs-duonote { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--edge); }
.fs-duoline { margin: 0; text-align: center; color: var(--soft); }
.fs-duopick { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--sunk); border: 1px solid var(--edge); }
.fs-duopick p { margin: 0; }
.fs-fract { display: flex; gap: 6px; }
.fs-frinv { width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--hair); background: transparent; font-size: 15px; cursor: pointer; }
.fs-frinv:hover { border-color: var(--accent); }
.fs-fr { grid-template-columns: 30px 44px minmax(0, 1fr) auto auto; }
.fs-planbox:empty { display: none; }
.fs-plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--sunk); border: 1px dashed var(--accent); }
.fs-plan > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fs-plan small { color: var(--soft); }
.fs-plan-ok { color: var(--accent); font-weight: 600; white-space: nowrap; }
.fs-badges { display: flex; flex-direction: column; gap: 8px; }
.fs-badgegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.fs-badge { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--hair); text-align: center; opacity: .5; filter: grayscale(1); }
.fs-badge.on { opacity: 1; filter: none; border-color: var(--edge); }
.fs-bico { font-size: 22px; line-height: 1.2; }
.fs-badge b { font-size: 12px; line-height: 1.2; }
.fs-badge small { font-size: 11px; color: var(--soft); line-height: 1.2; }
/* Terminy: pola daty, godziny i godzin nauki w formularzu */
.todo-form { flex-wrap: wrap; }
.todo-form input[type=date], .todo-form input[type=time], .todo-form input[type=number] { flex: 1; min-width: 0; padding: 11px 10px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: inherit; }
/* Terminy: formularz dodawania zwinięty do jednego przycisku; po rozwinięciu dwa wiersze (tytuł + „Dodaj”, potem małe pola) */
.dl-addbtn { min-height: 44px; margin-top: 10px; padding: 0 16px; }
.dl-add:empty { display: none; }
.dl-form { flex-direction: column; flex-wrap: nowrap; gap: 6px; margin-top: 8px; }
.dl-form .dl-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.dl-form .dl-row > input[type=text] { flex: 1 1 160px; min-height: 44px; padding: 8px 12px; }
.dl-form .dl-send { flex: 0 0 auto; min-height: 44px; padding: 0 20px; }
.dl-form .dl-fields > select, .dl-form .dl-fields > input { flex: 1 1 84px; min-width: 0; max-width: none; min-height: 38px; padding: 6px 8px; font-size: 13px; }
.dl-form .dl-fields > input[type=date] { flex-basis: 128px; }
.dl-plan { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.dl-plan-t { flex: 1 1 0; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.25; }
.dl-goalbtn { flex: none; min-height: 40px; padding: 0 14px; font-size: 13px; }

/* Zaproszenie do wspólnej sesji: okienko na środku panelu, znika samo po 3 minutach */
.fs-invpop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .45); }
.fs-invpop-card { position: relative; width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 20px 18px; border-radius: 24px; background: var(--tile); border: 1px solid var(--accent); box-shadow: 0 20px 60px rgb(0 0 0 / .5); text-align: center; animation: fs-invpop .35s cubic-bezier(.2, 1.3, .4, 1); }
.fs-invpop-card h2 { margin: 0; font-size: 20px; }
.fs-invpop-card p { margin: 0; line-height: 1.45; }
.fs-invpop-ico { font-size: 34px; }
.fs-invpop-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--hair); background: transparent; color: var(--soft); font-size: 18px; cursor: pointer; }
.fs-invpop-msg { color: var(--coral); min-height: 1em; }
@keyframes fs-invpop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fs-invpop-card { animation: none; } }
.fs-common { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fs-common li { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--sunk); }
.fs-commonday { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.fs-commonday small { color: var(--soft); font: 600 12px var(--mono); min-width: 64px; text-transform: uppercase; }
/* Plan zajęć: wklejanie planu jako tekst */
.sched-paste textarea { font: inherit; resize: vertical; min-height: 120px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); }
.sched-paste-box { margin-top: 12px; }
.wat-form > * + * { margin-top: 8px; }
.wat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wat-chip { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--hair); background: var(--sunk); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.wat-chip.on { border-color: var(--accent); }
.wat-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); }
.wat-item { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--hair); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.wat-item.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.wat-item small { display: block; color: var(--muted, inherit); }
.wat-code { font-weight: 600; word-break: break-all; }
.wat-more { margin-top: 8px; }

/* Portfel w widoku kompaktowym (Ustawienia → Widok portfela: Kompaktowy) */
#m-portfolio .big { font: 700 30px/1.1 var(--mono); letter-spacing: -0.03em; }
.compact-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.compact-spark { margin-top: 4px; }
.compact-spark .spark { width: 100%; height: 48px; }
.compact-spark .spark-line { vector-effect: non-scaling-stroke; }
.compact-spark .spark-dot-up, .compact-spark .spark-dot-down { display: none; }

/* Tryb skupienia (trwa sesja): cały ekran przygaszony, na środku tylko Lumek i licznik */
dialog.onb.fs-zen { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; background: #050604; }
dialog.onb.fs-zen::backdrop { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
dialog.onb.fs-zen .onb-head { opacity: .25; transition: opacity .3s; }
dialog.onb.fs-zen .onb-head:hover, dialog.onb.fs-zen .onb-head:focus-within { opacity: 1; }
dialog.onb.focus.fs-zen .onb-body.fs { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
dialog.onb.fs-zen .fs-hero { width: min(300px, 72vw); }
dialog.onb.fs-zen .fs-count { font-size: clamp(56px, 16vw, 96px); color: color-mix(in srgb, var(--accent) 80%, #fff); }
dialog.onb.fs-zen .fs-bar { width: min(320px, 70vw); height: 4px; border: 0; background: rgb(255 255 255 / .08); }
dialog.onb.fs-zen .fs-warn, dialog.onb.fs-zen .fs-duoline { font-size: 13px; opacity: .45; }
dialog.onb.fs-zen .fs-zen-actions { margin-top: 8px; }
dialog.onb.fs-zen .fs-zen-stop { background: transparent; border-color: rgb(255 255 255 / .12); color: var(--soft); opacity: .6; }
dialog.onb.fs-zen .fs-zen-stop:hover, dialog.onb.fs-zen .fs-zen-stop:focus-visible { opacity: 1; }
/* Terminy na telefonie: tytuł w pełnej szerokości, znaczniki i przyciski pod nim */
@media (max-width: 760px) {
  #m-deadlines .row.task { flex-wrap: wrap; row-gap: 6px; }
  #m-deadlines .row.task .task-text { flex: 1 1 100%; min-width: 0; }
  #m-deadlines .row.task .tag { margin-left: 0; }
  #m-deadlines .row.task .task-x:first-of-type { margin-left: auto; }
}

/* ---------- menu modułów (☰) i przypinanie ---------- */
.module[hidden], .empty-board[hidden] { display: none !important; }
.mod-head { display: flex; align-items: center; gap: 10px; outline: none; }
.mod-name { flex: 1; min-width: 0; }
.mod-peek-actions { display: none; gap: 8px; align-items: center; letter-spacing: 0; text-transform: none; }
.module.peek .mod-peek-actions { display: inline-flex; }
.module.peek { order: -1 !important; border-color: color-mix(in srgb, var(--accent) 45%, var(--edge)); }
.mod-pin { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px; }
.mod-pin svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mod-close { width: 34px; height: 34px; font-size: 20px; line-height: 1; }
.empty-board { display: grid; gap: 14px; justify-items: start; }
#menu-btn { flex: none; }
#menu-close { font-size: 22px; line-height: 1; }
dialog.side-menu { position: fixed; inset: 0 auto 0 0; margin: 0; width: min(360px, 88vw); height: 100dvh; max-height: 100dvh; border-radius: 0 26px 26px 0; border-left: 0; padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); }
dialog.side-menu[open] { display: flex; flex-direction: column; gap: 12px; animation: menu-in .22s ease-out; }
@keyframes menu-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.side-menu[open] { animation: none; } }
.menu-head { display: flex; align-items: center; justify-content: space-between; }
.menu-head h2 { margin: 0; }
.menu-help { margin: 0; font-size: 13px; color: var(--soft); }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; overflow-y: auto; flex: 1; align-content: start; }
.menu-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; border: 1px solid var(--hair); border-radius: 16px; background: var(--sunk); }
.menu-row.on { border-color: color-mix(in srgb, var(--accent) 35%, var(--hair)); }
.menu-open { flex: 1; min-width: 0; min-height: 48px; display: grid; gap: 2px; padding: 6px 10px; text-align: left; background: none; border: 0; border-radius: 12px; color: var(--ink); font: inherit; cursor: pointer; }
.menu-open:hover, .menu-open:focus-visible { background: var(--lift); }
.menu-open b { font-size: 15px; }
.menu-open small { font: 500 12px/1.3 var(--mono); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-pin { flex: none; width: 44px; height: 44px; }
.menu-pin:not(.on) svg { opacity: .55; }
.menu-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.menu-foot small { color: var(--soft); }

/* Skupienie: stoper, słoiczek iskier, zegar w rogu, wędrówka w scenie */
.fs-clock { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 18px; font: 500 12px/1 var(--mono); letter-spacing: .06em; color: var(--soft); opacity: .32; font-variant-numeric: tabular-nums; pointer-events: none; }
.fs-jarbox { position: absolute; right: -6px; bottom: 4px; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.fs-hero.fs-walk .fs-jarbox { right: 8px; bottom: 10px; }
.fs-jar { width: 46px; height: auto; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .45)); }
.fs-jarfill, .fs-jarwave { transition: y 1.2s ease-out, transform 1.2s ease-out; }
.fs-jarwave { animation: fs-wave 3s linear infinite; }
@keyframes fs-wave { to { translate: -30px 0; } }
.fs-jarnum { font: 700 12px/1.2 var(--mono); color: #ffe38a; white-space: nowrap; text-shadow: 0 1px 4px rgb(0 0 0 / .6); }
.fs-jarnum.bump { animation: fs-bump .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes fs-bump { 40% { transform: scale(1.35); } }
.fs-jarfull { font: 500 10px/1 var(--mono); color: var(--soft); opacity: .7; }
/* rozbryzg, gdy splunięta kropla wpada do słoiczka */
.fs-splash { position: absolute; top: 14px; left: 50%; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; border: 2px solid #ffe38a; animation: fs-splash .7s ease-out forwards; }
@keyframes fs-splash { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.fs-swpill { font-weight: 700; }
.fs-walkbox { display: flex; flex-direction: column; gap: 8px; }
.fs-walkbox .onb-sub { margin: 0; }
dialog.onb.fs-zen .fs-hero.fs-walk { width: min(440px, 92vw); transform: none; }
dialog.onb.fs-zen .fs-hero.fs-walk .lumek { border-radius: 18px; }
dialog.onb.fs-zen .fs-swnote { margin: 0; font-size: 13px; color: var(--soft); opacity: .45; text-align: center; }
dialog.onb.fs-zen .fs-zen-done { opacity: .9; }
dialog.onb.fs-zen .fs-zen-actions { gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .fs-jarwave, .fs-jarnum.bump { animation: none; } }
/* wędrówka 3D */
.w3d { position: relative; width: 100%; aspect-ratio: 4 / 3.4; border-radius: 18px; overflow: hidden; background: #140c07; box-shadow: 0 0 0 1px var(--hair); }
.w3d-library { background: linear-gradient(to bottom, #2a1a10, #140c07); }
.w3d-forest { background: linear-gradient(to bottom, #0d1b2e, #0a1a12 70%, #07100a); }
.w3d-space { background: radial-gradient(ellipse at 50% 100%, #2a2350, #0a0820 60%, #04030f); }
.w3d-canvas { display: block; width: 100%; height: 100%; animation: w3d-in .5s ease-out; }
@keyframes w3d-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .w3d-canvas { animation: none; } }
dialog.onb.fs-zen .fs-hero.fs-walk { width: min(560px, 94vw); }

/* wędrówka 3D na cały ekran: świat pod spodem, licznik i przyciski na wierzchu */
dialog.onb.fs-zen.fs-full .fs-hero.fs-walk { position: absolute; inset: 0; width: 100%; height: 100%; align-self: stretch; z-index: 0; }
dialog.onb.fs-zen.fs-full .fs-hero.fs-walk::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgb(0 0 0 / .7), transparent 42%), linear-gradient(to bottom, rgb(0 0 0 / .45), transparent 16%); }
dialog.onb.fs-zen.fs-full .w3d { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
dialog.onb.fs-zen.fs-full .fs-hero.fs-walk > .lumek { width: 100%; height: 100%; border-radius: 0; }
dialog.onb.fs-zen.fs-full .onb-head { position: relative; z-index: 2; }
dialog.onb.focus.fs-zen.fs-full .onb-body.fs { justify-content: flex-end; gap: 10px; overflow: hidden; }
dialog.onb.fs-zen.fs-full .onb-body.fs > :not(.fs-hero) { position: relative; z-index: 1; }
dialog.onb.fs-zen.fs-full .onb-body.fs > .fs-clock { position: absolute; z-index: 1; }
dialog.onb.fs-zen.fs-full .fs-hero.fs-walk .fs-jarbox { z-index: 1; top: max(64px, calc(env(safe-area-inset-top) + 56px)); right: 16px; bottom: auto; }
dialog.onb.fs-zen.fs-full .fs-count { font-size: clamp(44px, 11vw, 72px); text-shadow: 0 2px 18px rgb(0 0 0 / .6); }
dialog.onb.fs-zen.fs-full .fs-warn, dialog.onb.fs-zen.fs-full .fs-swnote, dialog.onb.fs-zen.fs-full .fs-duoline { opacity: .7; text-shadow: 0 1px 6px rgb(0 0 0 / .8); }
dialog.onb.fs-zen.fs-full .fs-zen-stop { background: rgb(0 0 0 / .35); }

/* telefon: strona nie przesuwa się w bok */
html, body { overflow-x: hidden; overflow-x: clip; }
dialog.onb { overscroll-behavior: contain; }

/* Lumek: pauza, przerwy, przedmiot, grupa, dźwięk, sezonowe rzeczy w sklepie */
dialog.focus [hidden] { display: none !important; }
@media (max-width: 420px) { .fs-tabs { gap: 2px; max-width: 100%; } .fs-tab { padding: 0 10px; font-size: 13px; } }
.fs-subjbox { display: flex; flex-direction: column; gap: 6px; }
.fs-subjbox .onb-sub { margin: 0; }
.fs-subjin { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--edge); border-radius: 12px; background: var(--sunk); color: var(--ink); font: 500 15px var(--sans); }
.fs-subjin:focus { outline: none; border-color: var(--accent); }
.fs-subj { margin: 0; max-width: 90%; text-align: center; font: 500 13px var(--mono); color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-pause { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 44px; }
.fs-pausehint { font: 500 10.5px/1.2 var(--mono); color: var(--soft); }
dialog.onb.fs-zen .fs-pause { background: transparent; border-color: rgb(255 255 255 / .18); }
.fs-pausebox { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 22px; border-radius: 22px; background: rgb(255 255 255 / .05); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); text-align: center; max-width: min(92vw, 360px); }
.fs-pauselbl { font: 600 13px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.fs-pauseleft { font: 700 clamp(44px, 14vw, 72px)/1 var(--mono); letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.fs-pausebox small { color: var(--soft); font-size: 13px; }
.fs-pausenote { margin: 0; color: #ffe38a; font-size: 13px; }
.fs-pausenote:empty { display: none; }
.fs-resume { min-height: 48px; padding: 0 28px; margin-top: 4px; }
.fs-count.dim { opacity: .4; }
.fs-paused .fs-hero { opacity: .7; }
.fs-paused .fs-jarwave { animation-play-state: paused; }
dialog.onb.fs-zen.fs-full .fs-pausebox { background: rgb(0 0 0 / .62); border-color: rgb(255 255 255 / .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-shadow: 0 1px 8px rgb(0 0 0 / .9); }
dialog.onb.fs-zen.fs-full .fs-pausebox small, dialog.onb.fs-zen.fs-full .fs-pausehint { color: #e8e8e8; }
dialog.onb.fs-zen.fs-full .fs-pause { background: rgb(0 0 0 / .4); border-color: rgb(255 255 255 / .28); }
dialog.onb.fs-zen.fs-full .fs-subj, dialog.onb.fs-zen.fs-full .fs-mem { color: #f1f1f1; text-shadow: 0 1px 6px rgb(0 0 0 / .85); }
dialog.onb.fs-zen.fs-full .fs-mem { background: rgb(0 0 0 / .45); }
.fs-group { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fs-members { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: min(94vw, 420px); }
.fs-mem { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--hair); font-size: 13px; min-width: 0; }
.fs-mem span { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-mem.done b { color: #7dff9a; }
.fs-mem.fail { border-color: var(--coral); }
.fs-mem.fail b { color: var(--coral); }
.fs-strict { align-self: center; padding: 3px 10px; border-radius: 999px; font: 600 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: color-mix(in srgb, var(--coral) 18%, var(--sunk)); border: 1px solid var(--coral); color: var(--ink); }
.fs-invite .fs-subjin { min-height: 40px; }
.fs-pickList { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.fs-pickrow { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 10px; border-radius: 12px; background: var(--bg); cursor: pointer; }
.fs-pickrow input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.fs-pickrow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-grpbtn { align-self: flex-start; }
.fs-sndbox { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.fs-sndctl { display: inline-flex; align-items: center; gap: 8px; }
.fs-sndtog { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid var(--hair); background: transparent; font-size: 18px; line-height: 1; text-align: center; cursor: pointer; opacity: .55; }
.fs-sndtog.on { opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.fs-sndtog.wait { animation: fs-sndpulse 1.6s ease-in-out infinite; }
@keyframes fs-sndpulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); } }
.fs-sndsel { min-height: 40px; padding: 0 8px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: 500 13px var(--sans); }
.fs-sndvol { width: 96px; accent-color: var(--accent); }
dialog.onb.fs-zen.fs-full .fs-sndsel { background: rgb(0 0 0 / .5); }
dialog.onb.fs-zen.fs-full .fs-sndtog { background: rgb(0 0 0 / .4); }
.fs-card .fs-season { color: var(--soft); }
.fs-card .fs-season.on { color: var(--accent); }
.fs-card.cons { cursor: default; }
.fs-statsbox { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .fs-sndtog.wait { animation: none; } }

/* Wydajność: tiles poza ekranem nie liczą layoutu/paintu; rozmycia tła wyłączone na telefonach (przewijanie) */
.module { content-visibility: auto; contain-intrinsic-size: auto 320px; }
/* Moduły bez nagłówka (pociągi, notowania) są tylko pojemnikiem na własne karty. content-visibility przycina je do
   zaokrąglonych rogów pojemnika, a Safari obcina wtedy zewnętrzny piksel obramowania kart w rogach (wyglądały na przerwane). */
.module:has(> .module-body) { content-visibility: visible; contain: none; border-radius: 0; overflow: visible; }
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  .bar { -webkit-backdrop-filter: none; backdrop-filter: none; }
  dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(6 8 5 / .8); }
}

/* Zgłoszenia */
dialog.fb .fb-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; max-width: 100%; }
.fb-in { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 16px; }
.fb-in:focus { border-color: var(--accent); outline: none; }
.fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fb-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--hair); border-radius: 14px; overflow-wrap: anywhere; }
.fb-top, .fb-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fb-filters .fb-in { width: auto; flex: 1; min-width: 120px; }
.fb-text { margin: 0; white-space: pre-wrap; }
.fb-admin { display: grid; gap: 8px; }

/* Librus */
.lib-h { margin: 14px 0 6px; font: 500 11.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.lib-form input[type=password] { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); font: inherit; }
.slot.done { opacity: .5; }
@media (max-width: 640px) { .lib-form input[type=password] { flex-basis: 100%; } }
/* Pogoda: wskazówki (parasol, śnieg, wiatr, mróz, upał, mgła) */
.wx-advice { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wx-tip { padding: 10px 12px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--hair); font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.wx-tip-rain, .wx-tip-snow { border-color: var(--accent); }
.wx-hour.wx-wet { background: var(--lift); }
.wx-mark { font-size: 13px; line-height: 1; }

/* Plan zajęć: tydzień dalej w czasie i ręczne dodawanie zajęć */
.sched-week { margin-top: 12px; }
.sched-week-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.sched-week-nav .btn { padding: 8px 12px; font-size: 13px; }
.sched-week-title { margin: 6px 0 4px; }
.sched-week-jump { font: inherit; padding: 4px 8px; border: 1px solid var(--hair); border-radius: 8px; background: var(--sunk); color: var(--ink); }
.sched-week-day { margin: 14px 0 4px; }
.sched-week-day.today { color: var(--accent); }
.sched-week-empty { margin: 0 0 4px 4px; }
.sched-del { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.sched-manual { display: flex; flex-direction: column; gap: 10px; }
.sched-manual-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sched-manual-row > .sched-manual-field { flex: 1 1 140px; }
.sched-manual-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sched-manual input, .sched-manual select { font: inherit; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); min-width: 0; width: 100%; box-sizing: border-box; }
/* Terminy: edycja terminu */
.dl-editbtn { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; font-size: 18px; }
.dl-edit-row { display: block; }
.dl-edit { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.dl-edit > input[type=text] { flex: 1 1 100%; }
.dl-edit > select { flex: 1 1 120px; }
.dl-edit > input[type=date], .dl-edit > input[type=time] { flex: 1 1 120px; }
.dl-edit > input[type=number] { flex: 1 1 110px; }
.dl-edit > .dl-edit-actions, .dl-edit > [role=status] { flex: 1 1 100%; }

/* Ustawienia → Konto: blok „Ogłoszenie do użytkowników” (tylko właściciel). Każde pole w osobnym wierszu, etykieta nad polem. */
.announce { margin-top: 14px; }
.ann-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; min-width: 0; }
.ann-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ann-label { font-size: 13px; color: var(--soft); }
.ann-input { display: block; width: 100%; box-sizing: border-box; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 12px; background: var(--sunk); color: var(--ink); }
.ann-input:focus { border-color: var(--accent); outline: none; }
.ann-body { min-height: 110px; resize: vertical; line-height: 1.4; }
.ann-id .ann-input { max-width: 14em; }
.ann-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ann-send { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, var(--hair)); }
.ann-send:hover { background: color-mix(in srgb, var(--amber) 14%, var(--sunk)); }

/* Pasek „Dostępna nowa wersja” (public/update-banner.js) */
.upd-bar { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 24px); padding: 8px 8px 8px 16px; border: 1px solid var(--accent); border-radius: 16px; background: var(--lift); color: var(--ink); box-shadow: 0 8px 24px rgb(0 0 0 / 40%); font-size: 14px; }
.upd-text { min-width: 0; }
.upd-btn { padding: 8px 14px; flex: none; }
.upd-x { flex: none; width: 32px; height: 32px; border: 1px solid var(--hair); border-radius: 10px; background: transparent; color: var(--soft); font-size: 18px; line-height: 1; cursor: pointer; }
.upd-x:hover { color: var(--ink); background: var(--sunk); }
body.upd-pad { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
