/* Style dla Startu i kalendarza. Kalendarz: po lewej filtry i najbliższe terminy, po prawej miesiąc i plan dnia. */
:root {
  --bg: #F1F5F5;
  --surface: #FFFFFF;
  --surface-2: #E7EEEE;
  --ink: #0E1A1C;
  --muted: #5A6B6E;
  --line: #D3DEDE;
  --accent: #0E7C74;
  --accent-ink: #FFFFFF;
  --accent-soft: #D3EEEA;
  --hatch: rgba(14, 124, 116, .08);
  --t-kol: #C76A00; --t-egz: #D02B2B; --t-wej: #B03A86; --t-spr: #2F8A3E; --t-proj: #2257D6; --t-inne: #5F6E80;
  --k-W: #4F7FD4; --k-C: #D4507E; --k-L: #8A63D2;
  --shadow: 0 1px 2px rgba(14, 26, 28, .05), 0 8px 24px -12px rgba(14, 26, 28, .18);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 10px;
  --blob-a: rgba(14, 124, 116, .22); --blob-b: rgba(116, 176, 52, .16); --blob-c: rgba(232, 156, 48, .13);
  --glass: rgba(255, 255, 255, .74); --pattern: rgba(14, 70, 66, .075);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1213; --surface: #121B1D; --surface-2: #1A2628; --ink: #E4EDED; --muted: #8DA1A3;
    --line: #243437; --accent: #3CC2B4; --accent-ink: #032220; --accent-soft: #123430; --hatch: rgba(60, 194, 180, .08);
    --t-kol: #F2A23A; --t-egz: #F47575; --t-wej: #E77BC0; --t-spr: #5BC46C; --t-proj: #6E9BFF; --t-inne: #9AA8B8;
    --k-W: #7FA6F0; --k-C: #F07FA6; --k-L: #B293F2;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.7);
    --blob-a: rgba(60, 194, 180, .17); --blob-b: rgba(120, 200, 80, .08); --blob-c: rgba(242, 162, 58, .07);
    --glass: rgba(18, 27, 29, .74); --pattern: rgba(160, 225, 215, .05);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1213; --surface: #121B1D; --surface-2: #1A2628; --ink: #E4EDED; --muted: #8DA1A3;
  --line: #243437; --accent: #3CC2B4; --accent-ink: #032220; --accent-soft: #123430; --hatch: rgba(60, 194, 180, .08);
  --t-kol: #F2A23A; --t-egz: #F47575; --t-wej: #E77BC0; --t-spr: #5BC46C; --t-proj: #6E9BFF; --t-inne: #9AA8B8;
  --k-W: #7FA6F0; --k-C: #F07FA6; --k-L: #B293F2;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.7);
  --blob-a: rgba(60, 194, 180, .17); --blob-b: rgba(120, 200, 80, .08); --blob-c: rgba(242, 162, 58, .07);
  --glass: rgba(18, 27, 29, .74); --pattern: rgba(160, 225, 215, .05);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 40px;
}
.app { max-width: 1240px; margin: 0 auto; display: grid; gap: 20px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; }
.label { font: 600 13px/1.2 var(--f-body); color: var(--muted); margin: 0; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.card { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; text-decoration: none; }
.seglink { padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; transition: background .2s, color .2s; }
.seglink:hover { color: var(--ink); }
.seglink[aria-current="page"] { background: var(--surface); color: var(--ink); }
.logo { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.brand h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.sub { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); }

.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
.side { display: grid; gap: 20px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }

.filters { display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-radio span { display: inline-block; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.chip-radio input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-radio:active span { transform: scale(.95); }
.chips.small .chip-radio span { padding: 4px 10px; font-size: 12.5px; font-family: var(--f-mono); }
.chips.small .chip-radio input:checked + span { background: var(--k-L); border-color: var(--k-L); color: #fff; }
.hint { font-size: 12.5px; color: var(--muted); margin: -4px 0 0; }
.checks { display: grid; gap: 2px; }
.check { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: background .15s; }
.check:hover { background: var(--surface-2); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; transition: background .18s, border-color .18s; }
.box svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; fill: none; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .25s ease; }
.check input:checked + .box { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); }
.check input:checked + .box svg { stroke-dashoffset: 0; }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check .count { margin-left: auto; color: var(--muted); font-size: 12px; }

.upcoming ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.up { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 10px; border: 0; background: none; text-align: left; width: calc(100% + 16px); transition: background .15s; animation: rise .35s ease backwards; }
.up:hover { background: var(--surface-2); }
.up .d { text-align: center; border-radius: 10px; padding: 5px 0; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); }
.up .d b { display: block; font: 700 18px/1.1 var(--f-display); }
.up .d small { font: 500 10.5px/1 var(--f-mono); text-transform: uppercase; }
.up .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.up .m { color: var(--muted); font-size: 12.5px; display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.soon { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink); }
.soon.hot { background: var(--t-egz); color: #fff; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; margin: 0; }

.cal { padding: 18px 18px 14px; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-title { flex: 1; min-width: 160px; }
.cal-title h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; text-transform: capitalize; }
.cal-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 14px; transition: background .15s, transform .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { color: var(--t-egz); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays div { font: 600 12px/1 var(--f-body); color: var(--muted); padding: 0 8px 8px; }
.grid-wrap { overflow: hidden; }
.grid.go-next { animation: slideNext .38s cubic-bezier(.2,.7,.2,1); }
.grid.go-prev { animation: slidePrev .38s cubic-bezier(.2,.7,.2,1); }
@keyframes slideNext { from { transform: translateX(28px); opacity: .25; } }
@keyframes slidePrev { from { transform: translateX(-28px); opacity: .25; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
.day { min-height: 108px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 6px; text-align: left; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: border-color .15s, background .15s; position: relative; }
.day:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.day.out { background: transparent; border-style: dashed; opacity: .55; }
.day.off { background: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px), var(--surface); }
.day.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.day .num { display: flex; align-items: center; justify-content: space-between; gap: 4px; font: 600 13px/1 var(--f-mono); padding: 3px 3px 4px; }
.day .tag { font: 500 10.5px/1 var(--f-body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day .tag.swap { color: var(--accent); }
.day.today .num span:first-child { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 4px 7px; margin: -4px -3px; }
.ev { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.25; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--ink); box-shadow: inset 2px 0 0 var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: pop .3s ease backwards; }
.more { font-size: 11px; color: var(--muted); padding-left: 6px; font-weight: 600; }
.bars { margin-top: auto; display: flex; gap: 2px; padding: 0 2px 1px; }
.bars i { height: 4px; flex: 1; max-width: 14px; border-radius: 2px; background: var(--c); opacity: .55; transform-origin: left; animation: grow .4s ease backwards; }
.dots { display: none; gap: 3px; flex-wrap: wrap; padding: 0 3px; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--c); animation: pop .3s ease backwards; }
@media (max-width: 640px) {
  .day { min-height: 58px; padding: 4px; }
  .day .ev, .day .more, .day .tag { display: none; }
  .dots { display: flex; }
  .bars i { max-width: 6px; }
  .weekdays div { padding: 0 2px 6px; text-align: center; }
  .weekdays, .grid { gap: 4px; }
  .cal-title h2 { font-size: 24px; }
  .cal { padding: 14px 12px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend i.bar { height: 4px; width: 14px; opacity: .6; }
.legend .hatch { background: repeating-linear-gradient(135deg, var(--accent) 0 2px, transparent 2px 4px); opacity: .6; }

.daypanel { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); animation: rise .3s ease; display: grid; gap: 14px; }
.daypanel h3 { font-size: 19px; font-weight: 700; }
.daypanel h3::first-letter { text-transform: uppercase; }
.daypanel .note-off { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.evlist { display: grid; gap: 10px; }
.evcard { display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 12px; padding: 12px 14px 12px 0; border-radius: 12px; background: var(--surface-2); animation: rise .3s ease backwards; overflow: hidden; }
.evcard::before { content: ""; background: var(--c); border-radius: 0 4px 4px 0; }
.evcard h4 { margin: 0; font-size: 15px; }
.evcard .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; margin-top: 3px; }
.evcard p { margin: 6px 0 0; font-size: 13.5px; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--surface)); color: var(--c, var(--accent)); }
.grp { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.ex { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; border: 1px dashed var(--muted); color: var(--muted); }
.timeline { display: grid; gap: 0; }
.cls { display: grid; grid-template-columns: 92px 3px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); animation: rise .3s ease backwards; }
.cls:last-child { border-bottom: 0; }
.cls .tm { font: 500 12.5px/1.4 var(--f-mono); color: var(--muted); padding-top: 1px; }
.cls .tm b { color: var(--ink); font-weight: 500; }
.cls .rail { border-radius: 3px; background: var(--c); opacity: .7; }
.cls .nm { font-weight: 600; font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cls .mt { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.cls .nt { font-size: 12.5px; margin-top: 4px; font-style: italic; color: var(--muted); }
.cls .sw { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-style: normal; }
@media (max-width: 520px) { .cls { grid-template-columns: 70px 3px minmax(0, 1fr); gap: 10px; } }

.panel { display: grid; gap: 20px; }
.intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } }
.intro h2 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.intro p { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
code { font-family: var(--f-mono); font-size: .88em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.who { display: grid; gap: 6px; }
.who label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.who label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.who input { accent-color: var(--accent); margin: 0; }
.who .lbl { font-weight: 600; font-size: 14px; }
.who .g { color: var(--muted); font-size: 12.5px; margin-left: auto; text-align: right; }
.cols { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.card h3 { font-size: 18px; font-weight: 700; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
form { display: grid; gap: 12px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s; min-width: 0; }
/* Rozwinięta lista bierze kolor tekstu ze strony, a tło systemowe; bez tego w ciemnym motywie opcje wyglądały na wyszarzone */
.field select option { background-color: var(--surface); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 64px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.typepick { display: flex; flex-wrap: wrap; gap: 6px; }
.typepick .chip-radio input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.err { color: var(--t-egz); font-size: 13px; margin: 0; }
.rows { display: grid; gap: 6px; }
.erow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); animation: rise .3s ease backwards; }
.erow.past { opacity: .55; }
.erow.editing { border-color: var(--accent); background: var(--accent-soft); }
.erow .d { font: 600 12px/1.25 var(--f-mono); color: var(--c); text-align: center; }
.erow .d b { display: block; font: 700 18px/1.1 var(--f-display); }
.erow .t { font-weight: 600; font-size: 14px; }
.erow .m { color: var(--muted); font-size: 12.5px; display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .erow { grid-template-columns: 46px minmax(0, 1fr); } .acts { grid-column: 1 / -1; justify-content: flex-start; } }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.status { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.status.on { background: var(--accent-soft); color: var(--accent); }
.status.off { background: color-mix(in srgb, var(--t-egz) 14%, var(--surface)); color: var(--t-egz); }
.newlink { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 130px) auto; gap: 8px; margin-top: 12px; align-items: end; }
@media (max-width: 520px) { .newlink { grid-template-columns: 1fr 1fr; } .newlink .btn { grid-column: 1 / -1; } }
.log { list-style: none; margin: 0; padding: 0; display: grid; max-height: 360px; overflow-y: auto; }
.log li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log li:last-child { border-bottom: 0; }
.log time { font-family: var(--f-mono); font-size: 12px; color: var(--muted); padding-top: 1px; }
.log b { font-weight: 600; }
.locked { text-align: center; padding: 40px 18px; }
.locked .ic { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--t-egz) 14%, var(--surface)); color: var(--t-egz); }
.locked p { color: var(--muted); max-width: 46ch; margin: 6px auto 0; }

footer { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
footer p { margin: 0; max-width: 75ch; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: transform .25s ease, opacity .25s ease; z-index: 20; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.t-kol { --c: var(--t-kol); } .t-egz { --c: var(--t-egz); } .t-wej { --c: var(--t-wej); } .t-spr { --c: var(--t-spr); } .t-proj { --c: var(--t-proj); } .t-inne { --c: var(--t-inne); }
.k-W { --c: var(--k-W); } .k-C { --c: var(--k-C); } .k-L { --c: var(--k-L); }
/* Dzwonek z powiadomieniami */
.top { position: relative; z-index: 20; }
.top-r { display: flex; align-items: center; gap: 10px; }
.bell-wrap { position: relative; }
.bell { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color .2s, transform .15s; }
.bell:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.bell:active { transform: scale(.94); }
.bell[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.bell svg { overflow: visible; }
.bell .bell-body, .bell .bell-clap { transform-origin: 12px 3px; transform-box: view-box; }
.bell.has .bell-body { animation: bellRing 4.5s ease-in-out infinite; }
.bell.has .bell-clap { animation: bellClap 4.5s ease-in-out infinite; }
.bell.jolt .bell-body { animation: bellRing 1.1s ease-in-out 2; }
.bell.jolt .bell-clap { animation: bellClap 1.1s ease-in-out 2; }
@keyframes bellRing { 0%, 22%, 100% { transform: rotate(0); } 3% { transform: rotate(16deg); } 7% { transform: rotate(-14deg); } 11% { transform: rotate(10deg); } 15% { transform: rotate(-6deg); } 19% { transform: rotate(3deg); } }
@keyframes bellClap { 0%, 24%, 100% { transform: translateX(0); } 5% { transform: translateX(-2.5px); } 9% { transform: translateX(2.5px); } 13% { transform: translateX(-1.5px); } 17% { transform: translateX(1px); } }
.bell .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 2px var(--surface); transform: scale(0); transition: transform .3s cubic-bezier(.3,1.7,.5,1); }
.bell.has .dot { transform: scale(1); }
.bell.has .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #E5484D; animation: dotPing 2.2s ease-out infinite; }
@keyframes dotPing { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bell-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(370px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow: auto; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px 8px; box-shadow: 0 18px 50px -18px rgba(0,0,0,.45); transform-origin: calc(100% - 22px) -8px; opacity: 0; transform: translateY(-6px) scale(.96); transition: opacity .18s ease, transform .22s cubic-bezier(.2,1.3,.4,1); }
.bell-pop.show { opacity: 1; transform: none; }
.bp-head { display: flex; align-items: baseline; gap: 8px; padding: 0 8px 10px; }
.bp-head h3 { font-size: 15px; }
.bp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bp-list li { animation: bpIn .3s ease backwards; }
@keyframes bpIn { from { opacity: 0; transform: translateY(6px); } }
.bp-item { position: relative; display: flex; gap: 11px; padding: 10px 10px 10px 8px; border-radius: 10px; color: inherit; text-decoration: none; transition: background .15s; }
.bp-item:hover { background: var(--surface-2); }
.bp-item.new { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.bp-item.new::after { content: ""; position: absolute; right: 10px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: #E5484D; }
.bp-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.bp-item.new .bp-ic { background: var(--accent-soft); color: var(--accent); }
.bp-ic.rem { background: color-mix(in srgb, var(--c, #E89C30) 18%, var(--surface)); color: var(--c, #E89C30); }
.bp-txt { display: grid; gap: 1px; min-width: 0; padding-right: 12px; font-size: 13.5px; line-height: 1.35; }
.bp-txt b { font-weight: 600; }
.bp-txt span { color: var(--ink); opacity: .85; }
.bp-txt small { color: var(--muted); font-size: 12px; }
.bp-item.gone .bp-txt span { text-decoration: line-through; opacity: .6; }
.bp-empty { color: var(--muted); padding: 6px 8px 10px; margin: 0; }
@media (max-width: 560px) { .bell-wrap { position: static; } .top-r { position: relative; } .bell-pop { right: 0; } }
/* Serwer Minecraft na stronie startowej */
.mc { display: flex; gap: 22px; align-items: center; margin-top: 18px; scroll-margin-top: 20px; overflow: hidden; position: relative; }
.mc::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, color-mix(in srgb, #5FA83A 12%, transparent), transparent 55%); }
.mc > * { position: relative; }
.mc-cube { flex: none; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, #5FA83A 14%, var(--surface-2)); }
.mc-cube svg { animation: mcBob 3.6s ease-in-out infinite; }
.mc:hover .mc-cube svg { animation-duration: 1.4s; }
.mc-cube .f-top { fill: #7CC24A; } .mc-cube .f-l { fill: #8A5A36; } .mc-cube .f-r { fill: #6E4527; } .mc-cube .f-grass { fill: #5FA83A; } .mc-cube .f-grass2 { fill: #4E8E2F; }
@keyframes mcBob { 50% { transform: translateY(-5px) rotate(-3deg); } }
.mc-body { min-width: 0; flex: 1; }
.mc-body h2 { font-size: 22px; }
.mc-ip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 8px; }
.mc-ip code { font: 600 20px/1 var(--f-mono, "JetBrains Mono", monospace); letter-spacing: .02em; padding: 11px 14px; border-radius: 10px; background: var(--surface-2); border: 1px dashed color-mix(in srgb, #5FA83A 60%, var(--line)); user-select: all; -webkit-user-select: all; }
.mc-copy { min-height: 44px; }
.mc-alt { margin: 0; font-size: 13.5px; color: var(--muted); }
.mc-alt code { font: 600 13.5px/1 var(--f-mono); color: var(--ink); user-select: all; -webkit-user-select: all; }
.mc-copy.done { background: #5FA83A; border-color: #5FA83A; color: #fff; animation: bounce .35s cubic-bezier(.3,1.6,.5,1); }
@media (max-width: 560px) { .mc { flex-direction: column; align-items: flex-start; } .mc-ip code { font-size: 18px; } }
/* Zegar przy powitaniu */
.clock { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 2px 10px 2px 8px; border-radius: 99px; background: var(--lg-bg, var(--surface-2)); border: 1px solid var(--lg-edge, var(--line)); box-shadow: inset 0 1px 0 var(--lg-hi, transparent); color: var(--ink); font: 500 13px/1.6 var(--f-mono); vertical-align: 1px; white-space: nowrap; }
.clock svg { color: var(--accent); }
.clock svg path { transform-origin: 12px 12px; transform-box: view-box; transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.clock .digits { display: inline-flex; }
.clock .slot { position: relative; display: inline-block; width: 1ch; height: 1.6em; overflow: hidden; }
.clock .slot i { position: absolute; inset: 0; font-style: normal; text-align: center; }
.clock .slot i.in { animation: digIn .38s cubic-bezier(.2,.9,.3,1.15) both; }
.clock .slot i.out { animation: digOut .38s cubic-bezier(.5,0,.8,.4) both; }
.clock .s { color: var(--muted); }
@keyframes digIn { from { transform: translateY(-100%); opacity: 0; } }
@keyframes digOut { to { transform: translateY(100%); opacity: 0; } }
.mc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mc-ver { font: 600 12.5px/1 var(--f-mono); padding: 5px 9px; border-radius: 99px; background: color-mix(in srgb, #5FA83A 18%, var(--surface)); color: #5FA83A; border: 1px solid color-mix(in srgb, #5FA83A 40%, transparent); }
/* Menu i dzwonek: lekkie szkło */
:root { --lg-bg: rgba(255,255,255,.5); --lg-pill: rgba(255,255,255,.75); --lg-hi: rgba(255,255,255,.95); --lg-edge: rgba(255,255,255,.7); --lg-shade: rgba(14,40,40,.14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lg-bg: rgba(255,255,255,.055); --lg-pill: rgba(255,255,255,.12); --lg-hi: rgba(255,255,255,.22); --lg-edge: rgba(255,255,255,.12); --lg-shade: rgba(0,0,0,.45); } }
:root[data-theme="dark"] { --lg-bg: rgba(255,255,255,.055); --lg-pill: rgba(255,255,255,.12); --lg-hi: rgba(255,255,255,.22); --lg-edge: rgba(255,255,255,.12); --lg-shade: rgba(0,0,0,.45); }
.seg, .bell { background: var(--lg-bg); border: 1px solid var(--lg-edge); backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 -1px 1px rgba(0,0,0,.08), 0 10px 30px -14px var(--lg-shade); }
.seg { border-radius: 14px; }
.seg .seglink, .seg button { border-radius: 10px; transition: background .25s, color .2s, box-shadow .25s, transform .15s; }
.seg .seglink:active, .seg button:active { transform: scale(.96); }
.seglink[aria-current="page"], .seg button[aria-selected="true"] { background: var(--lg-pill); color: var(--ink);
  box-shadow: inset 0 1px 0 var(--lg-hi), 0 2px 8px -3px var(--lg-shade); }
.bell { border-radius: 14px; }
/* Pigułka w menu, która podąża za kursorem */
.seg.has-glide { position: relative; }
.seg.has-glide > .seglink, .seg.has-glide > button { position: relative; z-index: 1; background: transparent !important; box-shadow: none !important; }
.seg.has-glide > .glide-on { color: var(--ink); }
.seg-glide { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 10px; pointer-events: none; background: var(--lg-pill); box-shadow: inset 0 1px 0 var(--lg-hi), 0 2px 10px -3px var(--lg-shade);
  transition: transform .5s cubic-bezier(.3,1.3,.45,1), width .5s cubic-bezier(.3,1.3,.45,1), height .3s ease, opacity .2s; }
.seg-glide.instant { transition: none; }
.seg-glide.squish { animation: squish .5s ease; }
@keyframes squish { 35% { border-radius: 14px; scale: 1.06 .9; } 70% { scale: .98 1.03; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Strona startowa */
.hub { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .hub { grid-template-columns: 1fr; } }
.today { display: grid; gap: 16px; animation: rise .35s ease backwards; }
.today-head { display: flex; flex-wrap: wrap; gap: 14px 20px; justify-content: space-between; align-items: flex-start; }
.today-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pickers { display: grid; gap: 8px; justify-items: end; }
@media (max-width: 640px) { .pickers { justify-items: start; } }
.plan-h { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
ol.timeline { list-style: none; margin: 0; padding: 0; }
.cls.done { opacity: .45; }
.cls.now .rail { opacity: 1; }
.upcoming { animation: rise .35s .08s ease backwards; }
a.up { color: inherit; text-decoration: none; }
.more-link { font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.empty a { color: var(--accent); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 12px; }
.section-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.section-head .sub { margin: 0; }
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.subj { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 8px; align-content: start; animation: rise .35s ease backwards; transition: border-color .15s, transform .15s; }
.subj:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.subj h3 { font-size: 16px; font-weight: 700; line-height: 1.25; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.subj .nx { margin: 0; font-size: 13.5px; }
.subj .left { margin: 0; font-size: 12.5px; color: var(--muted); }
.links h3 { margin-bottom: 8px; }
.links ul { list-style: none; margin: 0; padding: 0; display: grid; }
.links li { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.links li:last-child { border-bottom: 0; }
.links a { font-weight: 600; color: var(--ink); text-decoration: none; }
.links a:hover { color: var(--accent); }
.links span { color: var(--muted); font-size: 13.5px; }

/* Tło: pod spodem stały gradient, na nim bąbelki z bg.js */
body { position: relative; isolation: isolate; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(70% 60% at 0% 0%, var(--blob-a), transparent 70%), radial-gradient(60% 50% at 100% 100%, var(--blob-c), transparent 70%); opacity: .7; }
.bg-bubbles { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.day { background: var(--glass); }
.chip-radio input:checked + span { animation: bounce .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes bounce { 40% { transform: scale(1.08); } }

/* Kolokwia i egzaminy w kalendarzu */
.day.exam { background: color-mix(in srgb, var(--c) 17%, var(--surface)); border-color: color-mix(in srgb, var(--c) 65%, var(--line)); }
.ev.big { white-space: normal; font-size: 12px; line-height: 1.2; padding: 5px 7px; background: var(--c); color: #fff; box-shadow: none; }
.ev.big small { display: block; font-size: 10px; font-weight: 600; opacity: .9; }
.day.exam.soon::after { content: ""; position: absolute; inset: -3px; border-radius: 12px; border: 2px solid var(--c); pointer-events: none; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { opacity: .9; transform: scale(1); } 75%, 100% { opacity: 0; transform: scale(1.07); } }
.evcard.t-kol, .evcard.t-egz { background: color-mix(in srgb, var(--c) 14%, var(--surface)); }

/* Powitanie */
.hello { display: grid; gap: 4px; padding-top: 6px; }
.hello h2 { font-size: clamp(34px, 6vw, 56px); font-weight: 800; letter-spacing: -.035em; line-height: 1; animation: helloIn .8s cubic-bezier(.2,.8,.2,1) backwards; }
.hello p { margin: 0; font-size: 16px; color: var(--muted); animation: helloIn .8s .12s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes helloIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }

/* Najbliższe kolokwium */
.spot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 26px; align-items: center; padding: 22px 26px; border-radius: 18px; position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--c) 15%, var(--glass)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: spotIn .7s .15s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes spotIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.spot .count { display: grid; place-items: center; align-content: center; width: 116px; aspect-ratio: 1; border-radius: 50%; background: var(--c); color: #fff; }
.spot .n { font: 800 44px/1 var(--f-display); letter-spacing: -.03em; }
.spot .u { font-size: 13px; font-weight: 600; opacity: .9; }
.spot.hot .count { animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.05); box-shadow: 0 0 0 12px color-mix(in srgb, var(--c) 22%, transparent); } }
.spot .kind { margin: 0; color: var(--c); font-weight: 700; font-size: 14px; }
.spot h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 2px 0 6px; }
.spot .when { margin: 0; font-size: 15px; font-weight: 500; }
.spot .note { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); max-width: 60ch; }
.spot .next p { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.spot .next ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.spot .next b { font-family: var(--f-mono); font-weight: 500; color: var(--c); margin-right: 6px; }
@media (max-width: 720px) { .spot { grid-template-columns: auto minmax(0, 1fr); padding: 18px; } .spot .count { width: 84px; } .spot .n { font-size: 32px; } .spot .next { grid-column: 1 / -1; } }

/* Liquid glass: jeden szklany pasek u góry (menu + dzwonek) i szklane powierzchnie */
:root { --lg-card: rgba(255,255,255,.52); --lg-solid: rgba(250,253,253,.86); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lg-card: rgba(22,32,34,.42); --lg-solid: rgba(20,29,31,.86); } }
:root[data-theme="dark"] { --lg-card: rgba(22,32,34,.42); --lg-solid: rgba(20,29,31,.86); }

.top-r { position: relative; gap: 2px; padding: 4px; border-radius: 16px; background: var(--lg-bg); border: 1px solid var(--lg-edge);
  backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 -1px 1px rgba(0,0,0,.08), 0 12px 32px -16px var(--lg-shade); }
.top-r .seg { padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.top-r .seg.has-glide, .seg.has-glide { position: static; }
.top-r .bell-wrap { position: relative; z-index: 1; display: flex; align-self: stretch; }
.top-r .bell { width: 42px; height: auto; min-height: 36px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 10px; color: var(--muted); transition: color .2s, transform .15s; }
.top-r .bell.glide-on, .top-r .bell[aria-expanded="true"] { color: var(--ink); }
.top-r .bell .dot { box-shadow: 0 0 0 2px var(--lg-solid); }
.seg-glide { border-radius: 11px; }

.card, .subj { background: var(--lg-card); border: 1px solid var(--lg-edge); border-radius: 18px;
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--lg-hi), 0 20px 44px -28px var(--lg-shade); }
.spot { backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); box-shadow: inset 0 1px 0 var(--lg-hi), 0 20px 44px -28px var(--lg-shade); border-radius: 20px; }
.day { background: color-mix(in srgb, var(--lg-card) 85%, transparent); border-color: var(--lg-edge); border-radius: 12px; box-shadow: inset 0 1px 0 var(--lg-hi); }
.chip-radio span { background: var(--lg-bg); border-color: var(--lg-edge); box-shadow: inset 0 1px 0 var(--lg-hi); }
.chip-radio input:checked + span { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px -6px var(--lg-shade); }
.btn { background: var(--lg-bg); border-color: var(--lg-edge); box-shadow: inset 0 1px 0 var(--lg-hi); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn:active { transform: scale(.97); }
.btn.primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px -8px var(--lg-shade); }
.evcard, .who label, .field input, .field select, .field textarea { background: var(--lg-bg); border-color: var(--lg-edge); box-shadow: inset 0 1px 0 var(--lg-hi); }
.bell-pop { background: var(--lg-solid); border: 1px solid var(--lg-edge); border-radius: 18px;
  backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--lg-hi), 0 24px 60px -20px var(--lg-shade); }
.bp-item:hover { background: var(--lg-bg); }
.toast { background: var(--lg-solid); color: var(--ink); border: 1px solid var(--lg-edge); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); box-shadow: inset 0 1px 0 var(--lg-hi), 0 14px 34px -14px var(--lg-shade); border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .seg-glide { transition: none !important; } }
[hidden] { display: none !important; }
/* Pasek ma jedną pigułkę: aktywna zakładka nie dostaje już własnego tła */
.has-glide .seg > .seglink, .has-glide .seg > button { position: relative; z-index: 1; background: transparent !important; box-shadow: none !important; }
.has-glide .glide-on, .has-glide .seg > [aria-current="page"], .has-glide .seg > [aria-selected="true"] { color: var(--ink); }

/* Lew w nagłówku: trzyma się krawędzi, co jakiś czas mruga i przechyla głowę */
.logo { width: 64px; height: 64px; border-radius: 16.5px; background: none; overflow: hidden; }
.logo .lion { display: block; width: 64px; height: 64px; }
.lion-head { transform-box: view-box; transform-origin: 32px 50px; animation: lionTilt 7s ease-in-out infinite; }
.lion-eye { transform-box: fill-box; transform-origin: center; animation: lionBlink 5s ease-in-out infinite; }
.brand:hover .lion-head { animation: lionPeek .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes lionTilt { 0%, 72%, 100% { transform: none; } 80% { transform: translateY(-1px) rotate(-5deg); } 88% { transform: translateY(-1px) rotate(4deg); } 94% { transform: none; } }
@keyframes lionBlink { 0%, 92%, 100% { transform: none; } 95% { transform: scaleY(.12); } }
@keyframes lionPeek { 40% { transform: translateY(-3px) scale(1.04); } }

/* Lew z kalendarzem: zaznacza kolejne dni i stuka łapką w kartkę */
.lion-cal .cal-today { transform-box: view-box; animation: calHop 6s cubic-bezier(.4,1.6,.5,1) infinite; }
.lion-cal .paw-tap { transform-box: view-box; animation: pawTap 6s ease-in-out infinite; }
@keyframes calHop { 0%, 30% { transform: none; } 36%, 62% { transform: translateX(7.5px); } 68%, 92% { transform: translate(-15px, 4.5px); } 98%, 100% { transform: none; } }
@keyframes pawTap { 0%, 28%, 40%, 100% { transform: none; } 32% { transform: translateY(-2.2px); } 35% { transform: translateY(.4px); } 37% { transform: translateY(-1.2px); } }
.brand:hover .lion-cal .cal-today { animation-duration: 1.5s; }

/* Panel: kto jest zalogowany, nowy link edytora */
.who-me { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--lg-edge); background: var(--lg-bg); box-shadow: inset 0 1px 0 var(--lg-hi); }
.who-me .lbl { display: block; font-weight: 600; }
.who-me .g { color: var(--muted); font-size: 13px; }
.newlink-box { margin: 0 0 14px; padding: 12px; border-radius: 12px; border: 1px dashed var(--accent); background: var(--accent-soft); }
.newlink-box p { margin: 0 0 8px; font-size: 13.5px; }
.nl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-row input { flex: 1 1 220px; min-width: 0; font: 500 12.5px/1.4 var(--f-mono); padding: 8px 10px; border-radius: 9px; border: 1px solid var(--lg-edge); background: var(--lg-bg); color: var(--ink); }

:root { transition: background-color .3s ease; }

/* Lew z probówką: stuknięcie w logo na Starcie */
.logo-swap { padding: 0; border: 0; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.logo-swap:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lion-tube { transform-box: view-box; transform-origin: 50px 62px; transform: translateY(40px) rotate(12deg); opacity: 0;
  transition: transform .5s cubic-bezier(.2,1.35,.4,1), opacity .2s ease; }
.has-tube .lion-tube { transform: none; opacity: 1; }
.paw-r { transition: transform .3s ease; }
.has-tube .paw-r { transform: translateY(16px); }
.lion-look { transform-box: view-box; transform-origin: 32px 50px; transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.has-tube .lion-look { transform: rotate(6deg); }
.lion-eye { transition: cx .4s ease, cy .4s ease; }
.has-tube .lion-eye[cx="27"] { cx: 28.3px; cy: 25.9px; }
.has-tube .lion-eye[cx="37"] { cx: 38.3px; cy: 25.9px; }
.tube-bub { transform-box: fill-box; transform-origin: center; animation: tubeBub 2.6s ease-in infinite; }
.tube-bub.b2 { animation-delay: 1.3s; }
@keyframes tubeBub { 0% { transform: translateY(5px); opacity: 0; } 25% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-4px); opacity: 0; } }
.logo-swap.hop .lion { animation: logoHop .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes logoHop { 0% { transform: scale(1); } 40% { transform: scale(.9); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .lion-tube, .paw-r, .lion-look, .lion-eye, .tube-bub, .logo-swap.hop .lion { transition: none; animation: none; } }

/* Lew z probówką czasem robi :O, a z probówki leci para */
.lion-o { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .15s ease, transform .25s cubic-bezier(.3,1.8,.5,1); }
.lion-mouth { transition: opacity .15s ease; }
.tube-steam path { opacity: 0; transform-box: fill-box; transform-origin: bottom center; }
.woah .lion-o { opacity: 1; transform: none; }
.woah .lion-mouth { opacity: 0; }
.woah .lion-eye { r: 2.4px; }
.woah .tube-steam path { animation: steam 1.1s ease-out infinite; }
.woah .tube-steam .s2 { animation-delay: .45s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(3px) scaleY(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-3px) scaleY(1.1); } }
@media (prefers-reduced-motion: reduce) { .woah .tube-steam path { animation: none; opacity: .8; } }
.tube-hand { transform-box: view-box; transform-origin: 50px 42px; }
.woah .tube-hand { animation: tubeShake .32s ease-in-out infinite; }
@keyframes tubeShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg) translateX(-.3px); } 75% { transform: rotate(4deg) translateX(.3px); } }
@media (prefers-reduced-motion: reduce) { .woah .tube-hand { animation: none; } }

/* Lew w kalendarzu czasem drapie się po głowie: zmartwiona mina, przechylona głowa i znikający „?” */
.cal-logo { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.scratch-arm { transform-box: view-box; transform-origin: 13px 64px; transform: translateY(26px) rotate(-14deg); opacity: 0;
  transition: transform .42s cubic-bezier(.3,1.35,.5,1), opacity .15s ease; }
.huh .scratch-arm { transform: none; opacity: 1; }
.scratch-hand { transform-box: fill-box; transform-origin: 50% 100%; }
.huh .scratch-hand { animation: scratchy .2s ease-in-out .4s 9 alternate; }
@keyframes scratchy { from { transform: rotate(-9deg) translateY(.4px); } to { transform: rotate(9deg) translateY(-.4px); } }
.paw-l { transition: transform .3s ease, opacity .2s ease; }
.huh .paw-l { transform: translateY(6px); opacity: 0; }
.cal-look { transform-box: fill-box; transform-origin: 50% 85%; transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
.huh .cal-look { transform: rotate(-8deg); }
.cal-huh { opacity: 0; transition: opacity .15s ease; }
.huh .cal-huh { opacity: 1; }
.cal-mouth { transition: opacity .15s ease; }
.huh .cal-mouth { opacity: 0; }
.huh-q { opacity: 0; }
.huh .huh-q { opacity: 1; }
.huh-mark, .huh-poof circle { transform-box: fill-box; transform-origin: center; }
.huh-mark { transform: scale(0); opacity: 0; }
.huh .huh-mark { animation: huhMark 2.6s ease forwards; }
@keyframes huhMark { 0%, 10% { transform: scale(0) rotate(-20deg); opacity: 0; } 20% { transform: scale(1.2) rotate(6deg); opacity: 1; } 27%, 70% { transform: scale(1) rotate(0); opacity: 1; } 78%, 100% { transform: scale(1.5); opacity: 0; } }
.huh-poof circle { opacity: 0; }
.huh .huh-poof circle { animation: huhPoof 2.6s ease-out forwards; }
@keyframes huhPoof { 0%, 72% { transform: scale(.2); opacity: 0; } 78% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.8) translateY(-1px); opacity: 0; } }
.huh .cal-today, .huh .paw-tap { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .scratch-arm, .paw-l, .cal-look { transition: none; } .huh .scratch-hand, .huh .huh-mark, .huh .huh-poof circle { animation: none; } .huh .huh-mark { transform: none; opacity: 1; } }
.theme-btn svg { transition: transform .3s ease; }
.theme-btn.spin svg { animation: themeSpin .45s cubic-bezier(.3,1.5,.5,1); }
@keyframes themeSpin { from { transform: rotate(-90deg) scale(.6); opacity: .3; } to { transform: none; opacity: 1; } }

/* Panel edycji: lew-admin w ciemnych okularach przy monitorze */
.cal-logo .lion-admin { display: none; }
.view-panel .cal-logo .lion-cal { display: none; }
.view-panel .cal-logo .lion-admin { display: block; animation: adminIn .4s cubic-bezier(.3,1.5,.5,1); }
@keyframes adminIn { from { transform: scale(.85) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.lion-admin .think circle { transform-box: fill-box; transform-origin: center; animation: think 1.8s ease-in-out infinite; }
.lion-admin .think circle:nth-child(2) { animation-delay: .25s; }
.lion-admin .think circle:nth-child(3) { animation-delay: .5s; }
@keyframes think { 0%, 60%, 100% { transform: none; opacity: .35; } 30% { transform: translateY(-1.6px); opacity: 1; } }
.lion-admin .caret { animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.lion-admin .scr path { transform-box: fill-box; transform-origin: left center; animation: typeLine 6s ease-in-out infinite; }
.lion-admin .scr .l2 { animation-delay: .6s; }
.lion-admin .scr .l3 { animation-delay: 1.2s; }
@keyframes typeLine { 0%, 8% { transform: scaleX(.15); } 30%, 85% { transform: none; } 100% { transform: scaleX(.15); } }
.lion-admin .lion-head { transform-origin: 32px 50px; }
@media (prefers-reduced-motion: reduce) { .lion-admin .think circle, .lion-admin .caret, .lion-admin .scr path, .view-panel .cal-logo .lion-admin { animation: none; } }

/* Śpiący lew (0:00–4:59): szlafmyca, zamknięte oczy, lecące „z” */
.sleep-bits, .lion-zz { display: none; }
/* Czapeczka urodzinowa, włączana przez app.js w wybrane dni. Do spania lew zakłada szlafmycę. */
.party-hat { display: none; }
.party .party-hat { display: inline; }
.party .logo-swap.sleepy .party-hat { display: none; }
/* Trąbka imprezowa: zwinięta w pysku, przy dmuchaniu się rozwija i wylatuje konfetti */
.blower { display: none; }
.party .blower { display: inline; }
.party .logo-swap.sleepy .blower, .party .act-yawn .blower, .party .woah .blower, .party .huh .blower { display: none; }
.bl-horn { transform-box: view-box; transform-origin: 31px 38px; transform: scaleX(0); }
.blow .bl-horn, .act-blow .bl-horn { animation: blowHorn 1.7s ease forwards; }
.blow .bl-coil circle, .act-blow .bl-coil circle { animation: blowCoil 1.7s step-end forwards; }
.cf { opacity: 0; transform-box: fill-box; transform-origin: center; }
.blow .cf, .act-blow .cf { animation: confetti 1.2s cubic-bezier(.2,.7,.4,1) calc(.35s + var(--d)) forwards; }
@keyframes blowHorn { 0% { transform: scaleX(0); } 18%, 72% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes blowCoil { 0% { opacity: 1; } 8% { opacity: 0; } 92% { opacity: 1; } }
/* 18 listopada zamiast probówki: po kliknięciu bierze szklankę i pije */
.lion-glass { transform-box: view-box; transform-origin: 50px 68px; transform: translateY(40px) rotate(12deg); opacity: 0; }
.drink .lion-glass { animation: drinkArm 2.6s cubic-bezier(.3,1.2,.5,1) both; }
.drink .paw-r { transform: translateY(16px); }
.drink .lion-look { transform: rotate(-7deg); }
.drink .lion-eye, .drink .blower { display: none; }
.drink .yawn-bits { display: inline; }
.drink .yawn-o { display: none; }
.glass-drink { transform-box: fill-box; transform-origin: center bottom; }
.drink .glass-drink { animation: drinkLevel 2.6s ease both; }
.glass-cup { transform-box: view-box; transform-origin: 50px 30px; transform: scale(.75); }
.drink .glass-cup { animation: drinkCup 2.6s ease both; }
.glass-bub { transform-box: fill-box; transform-origin: center; animation: tubeBub 1.8s ease-in infinite; }
.glass-bub.b2 { animation-delay: .9s; }
@keyframes drinkArm {
  0% { opacity: 0; transform: translateY(40px) rotate(12deg); }
  8% { opacity: 1; }
  22% { opacity: 1; transform: none; }
  36%, 74% { opacity: 1; transform: rotate(-8deg); }
  86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(40px) rotate(12deg); }
}
@keyframes drinkCup { 0%, 24%, 86%, 100% { transform: scale(.75); } 38%, 72% { transform: rotate(-55deg) scale(.75); } }
@keyframes drinkLevel { 0%, 38% { transform: none; } 72%, 100% { transform: scaleY(.25); } }
@keyframes confetti {
  0% { opacity: 1; transform: scale(.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}
.logo-swap.sleepy .sleep-bits, .logo-swap.sleepy .lion-zz { display: inline; }
.logo-swap.sleepy .lion-eye { display: none; }
.logo-swap.sleepy .lion-tube { transform: translateY(40px) rotate(12deg); opacity: 0; }
.logo-swap.sleepy .paw-r { transform: none; }
.logo-swap.sleepy .lion-look { transform: rotate(-5deg); animation: lionBreath 4s ease-in-out infinite; }
@keyframes lionBreath { 50% { transform: rotate(-5deg) translateY(.8px) scale(1.015); } }
.lion-zz .zz { transform-box: fill-box; transform-origin: center; opacity: 0; animation: zzFloat 3.6s ease-out infinite; }
.lion-zz .z2 { animation-delay: 1.2s; }
.lion-zz .z3 { animation-delay: 2.4s; }
@keyframes zzFloat { 0% { opacity: 0; transform: translate(-3px, 4px) scale(.6); } 20% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(2px, -3px) scale(1.05); } }
/* Kliknięcie budzi go na chwilę */
.logo-swap.sleepy.awake .lion-eye { display: inline; }
.logo-swap.sleepy.awake .sleep-bits > path { display: none; }
.logo-swap.sleepy.awake .lion-zz { display: none; }
.logo-swap.sleepy.awake .lion-look { animation: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .logo-swap.sleepy .lion-look { animation: none; } .lion-zz .zz { animation: none; opacity: 1; } }
/* Łóżko: poduszka, kołdra, łapki na kołdrze */
.bed-back, .bed { display: none; }
.logo-swap.sleepy .bed-back, .logo-swap.sleepy .bed { display: inline; }
.logo-swap.sleepy .ledge, .logo-swap.sleepy .paw-r { display: none; }
.logo-swap.sleepy .bed { transform-box: view-box; transform-origin: 32px 64px; animation: bedBreath 4s ease-in-out infinite; }
@keyframes bedBreath { 50% { transform: translateY(-.6px); } }
@media (prefers-reduced-motion: reduce) { .logo-swap.sleepy .bed { animation: none; } }

/* Lew na Starcie co jakiś czas ziewa, rozgląda się albo rusza uszami (hub.js) */
.yawn-bits { display: none; }
.yawn-o { transform-box: fill-box; transform-origin: center top; }
.act-yawn .yawn-bits { display: inline; }
.act-yawn .lion-eye, .act-yawn .lion-mouth { display: none; }
.act-yawn .yawn-o { animation: yawnO 2.2s ease-in-out both; }
.act-yawn .lion-head { animation: yawnStretch 2.2s ease-in-out both; }
@keyframes yawnO { 0% { transform: scale(.3); } 25%, 70% { transform: scale(1.15, 1.25); } 100% { transform: scale(.3); } }
@keyframes yawnStretch { 0%, 100% { transform: none; } 30%, 65% { transform: rotate(-5deg) scaleY(1.03); } }
.act-look .lion-eye { animation: none; }
.act-look .lion-eye[cx="27"] { animation: lookL 2.6s ease-in-out both; }
.act-look .lion-eye[cx="37"] { animation: lookR 2.6s ease-in-out both; }
@keyframes lookL { 0%, 100% { cx: 27px; } 20%, 42% { cx: 25.4px; } 58%, 82% { cx: 28.6px; } }
@keyframes lookR { 0%, 100% { cx: 37px; } 20%, 42% { cx: 35.4px; } 58%, 82% { cx: 38.6px; } }
.ear { transform-box: fill-box; }
.ear-l { transform-origin: 80% 90%; }
.ear-r { transform-origin: 20% 90%; }
.act-ears .ear-l { animation: earL .9s ease-in-out; }
.act-ears .ear-r { animation: earR .9s ease-in-out .08s; }
@keyframes earL { 0%, 100% { transform: none; } 20%, 60% { transform: rotate(-22deg); } 40%, 80% { transform: rotate(8deg); } }
@keyframes earR { 0%, 100% { transform: none; } 20%, 60% { transform: rotate(22deg); } 40%, 80% { transform: rotate(-8deg); } }

/* Data i godzina obok siebie. Safari na iPadzie daje polom daty własną minimalną szerokość
   i wychodziły poza kolumnę, stąd min-width: 0 na każdym poziomie. */
.row2 > .field { min-width: 0; }
.field input[type="date"], .field input[type="time"] {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100% !important; min-width: 0 !important; max-width: 100%; min-height: 40px; line-height: 1.3; overflow: hidden;
}
.field input::-webkit-date-and-time-value { text-align: left; margin: 0; min-width: 0; width: 100%; }

/* Na telefonie „Panel edycji” się nie mieści, zostaje samo „Panel” */
.seg .seglink, .seg button { white-space: nowrap; }
@media (max-width: 480px) {
  .nav-long { display: none; }
  .seg .seglink, .seg button { padding-left: 11px; padding-right: 11px; }
  .top-r .bell { width: 38px; }
}

/* Odliczanie przy zajęciach na hubie */
.cls .sw { font-variant-numeric: tabular-nums; }
.cls .sw.soon { background: var(--surface-2, rgba(255,255,255,.06)); color: var(--muted); }
.cls.now .rail { background: linear-gradient(to bottom, var(--c) var(--p, 0%), color-mix(in srgb, var(--c) 30%, transparent) var(--p, 0%)); transition: background .6s; }

/* Krótka wiadomość w nagłówku huba */
.news { flex: 1 1 0; min-width: 0; margin: 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink); }
@media (max-width: 860px) { .news { order: 3; flex-basis: 100%; text-align: left; padding: 9px 14px; border-radius: 12px; background: var(--lg-bg); border: 1px solid var(--lg-edge); } }
