/* Mission Control — wygląd w duchu Apple HIG: klarowność, uległość wobec treści, głębia.
   Jeden akcent, kolory systemowe, szkło tylko na chrome (pasek boczny, górny, arkusze),
   ruch krótki i tłumiony, respektowanie reduced motion / transparency / contrast. */

:root {
  color-scheme: light;
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #f2f2f7; --surface-3: #e5e5ea;
  --fill: rgba(120,120,128,.12); --fill-2: rgba(120,120,128,.20);
  --sep: rgba(60,60,67,.13);
  --text: #1d1d1f; --text-2: #6e6e73; --muted: #8e8e93;
  --accent: #007aff; --accent-soft: rgba(0,122,255,.12); --on-accent: #fff;
  --good: #34c759; --warn: #ff9500; --crit: #ff3b30;
  --k-study: #007aff; --k-review: #ff9500; --k-gym: #34c759; --k-mob: #00c7be; --k-cardio: #ff2d55; --k-tennis: #a4c400;
  --k-project: #af52de; --k-weekly: #5856d6; --k-work: #8e8e93; --k-rest: #30b0c7; --k-cal: #8e8e93;
  --h0: #e9e9ee; --h1: #cde2fb; --h2: #86b6ef; --h3: #3987e5; --h4: #1c5cab;
  --chrome: rgba(246,246,248,.78); --chrome-solid: #f6f6f8;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.18);
  --card-border: transparent;
  --r: 14px; --r-s: 10px;
  --ease: cubic-bezier(.2,.8,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141416; --surface: #1e1e20; --surface-2: #28282b; --surface-3: #3a3a3c;
    --fill: rgba(118,118,128,.22); --fill-2: rgba(118,118,128,.34);
    --sep: rgba(255,255,255,.09);
    --text: #f5f5f7; --text-2: #aeaeb2; --muted: #8e8e93;
    --accent: #0a84ff; --accent-soft: rgba(10,132,255,.18);
    --good: #30d158; --warn: #ff9f0a; --crit: #ff453a;
    --k-study: #0a84ff; --k-review: #ff9f0a; --k-gym: #30d158; --k-mob: #63e6e2; --k-cardio: #ff375f; --k-tennis: #c5e000;
    --k-project: #bf5af2; --k-weekly: #5e5ce6; --k-work: #8e8e93; --k-rest: #40c8e0; --k-cal: #98989d;
    --h0: #2a2a2d; --h1: #184f95; --h2: #256abf; --h3: #3987e5; --h4: #86b6ef;
    --chrome: rgba(30,30,32,.72); --chrome-solid: #1e1e20;
    --shadow: none; --shadow-lg: 0 20px 60px rgba(0,0,0,.55);
    --card-border: rgba(255,255,255,.06);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141416; --surface: #1e1e20; --surface-2: #28282b; --surface-3: #3a3a3c;
  --fill: rgba(118,118,128,.22); --fill-2: rgba(118,118,128,.34);
  --sep: rgba(255,255,255,.09);
  --text: #f5f5f7; --text-2: #aeaeb2; --muted: #8e8e93;
  --accent: #0a84ff; --accent-soft: rgba(10,132,255,.18);
  --good: #30d158; --warn: #ff9f0a; --crit: #ff453a;
  --k-study: #0a84ff; --k-review: #ff9f0a; --k-gym: #30d158; --k-mob: #63e6e2; --k-cardio: #ff375f; --k-tennis: #c5e000;
  --k-project: #bf5af2; --k-weekly: #5e5ce6; --k-work: #8e8e93; --k-rest: #40c8e0; --k-cal: #98989d;
  --h0: #2a2a2d; --h1: #184f95; --h2: #256abf; --h3: #3987e5; --h4: #86b6ef;
  --chrome: rgba(30,30,32,.72); --chrome-solid: #1e1e20;
  --shadow: none; --shadow-lg: 0 20px 60px rgba(0,0,0,.55);
  --card-border: rgba(255,255,255,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; }
::selection { background: var(--accent-soft); }

/* ---------- układ ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
nav.side { position: sticky; top: 0; align-self: start; height: 100vh; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px;
  background: var(--chrome); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid var(--sep); z-index: 5; }
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 10px 16px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.brand .dot { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(160deg, var(--accent), #5e5ce6); display: grid; place-items: center; }
.brand .dot svg { width: 12px; height: 12px; }
.navbtn { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: none;
  text-align: left; cursor: pointer; color: var(--text); font-size: 13.5px; }
.navbtn svg { width: 17px; height: 17px; color: var(--accent); flex: 0 0 auto; }
.navbtn:hover { background: var(--fill); }
.navbtn.on { background: var(--fill-2); font-weight: 600; }
.navbtn kbd { margin-left: auto; font: 11px/1 -apple-system, system-ui; color: var(--muted); }
.navbtn .badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--crit); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.side .foot { margin-top: auto; font-size: 11.5px; color: var(--muted); padding: 8px 10px; line-height: 1.5; }
main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 28px 12px;
  background: var(--chrome); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); border-bottom: 1px solid var(--sep); }
.topbar h1 { font-size: 22px; line-height: 1.15; margin: 0 10px 0 0; font-weight: 700; letter-spacing: -.022em; }
#view { padding: 20px 28px 64px; max-width: 1360px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--fill); font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 600; }
.chip.good b { color: var(--good); } .chip.warn b { color: var(--warn); } .chip.crit b { color: var(--crit); }
.savestate { margin-left: auto; font-size: 12px; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mb { margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card h2 .sp { margin-left: auto; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.card h3 { font-size: 15px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.01em; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.muted { color: var(--muted); } .t2 { color: var(--text-2); } .small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 8px; }
hr { border: 0; border-top: 1px solid var(--sep); margin: 14px 0; }
.hidden { display: none !important; }

/* ---------- kontrolki ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; border: 0;
  background: var(--fill); cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; color: var(--text);
  transition: transform 100ms ease-out, background-color 150ms ease; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--accent); color: var(--on-accent); }
.btn.pri:hover { filter: brightness(1.06); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 15px; border-radius: 10px; font-weight: 600; }
.btn.ghost { background: none; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { color: var(--crit); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.on-done { background: var(--good); color: #fff; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=password], select, textarea {
  background: var(--surface-2); border: 1px solid var(--sep); border-radius: 8px; padding: 5px 9px; outline: none; min-width: 0; height: 30px; }
textarea { width: 100%; resize: vertical; min-height: 70px; height: auto; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.w-num { width: 72px; } input.w-s { width: 110px; } input.w-m { width: 190px; } input.w-l { width: 100%; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* segmented control */
.seg { display: inline-flex; background: var(--fill); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { height: 24px; min-width: 32px; padding: 0 9px; border: 0; border-radius: 6px; background: none; cursor: pointer; font-size: 12.5px; color: var(--text-2);
  transition: background-color 150ms ease, color 150ms ease, transform 100ms ease-out; }
.seg button:active { transform: scale(.95); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.seg button.on-done { background: var(--good); color: #fff; font-weight: 600; }
.seg button.on-min { background: var(--warn); color: #1d1d1f; font-weight: 600; }
.seg button.on-skip { background: var(--surface-3); color: var(--text-2); }

/* okrągły checkbox (jak w Przypomnieniach) */
.chk { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--muted); margin: 0; flex: 0 0 auto;
  cursor: pointer; display: grid; place-items: center; transition: background-color 150ms ease, border-color 150ms ease, transform 150ms var(--ease); background: transparent; }
.chk:hover { border-color: var(--accent); }
.chk:checked { background: var(--accent); border-color: var(--accent); }
.chk:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.chk:active { transform: scale(.9); }
.chk.sm { width: 18px; height: 18px; }
.chk.sm:checked::after { width: 5px; height: 9px; }
.chk.g:checked { background: var(--good); border-color: var(--good); }

/* ---------- misja dnia ---------- */
.mission { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mcard { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent;
  transition: background-color 200ms ease, opacity 200ms ease; }
.mcard .kind { font-size: 11.5px; font-weight: 600; color: var(--kc); margin-bottom: 2px; }
.mcard .ti { font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.mcard .de { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.mcard .acts2 { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.mcard.done { opacity: .6; } .mcard.done .ti { text-decoration: line-through; text-decoration-color: var(--muted); }
.mhead { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.mhead .big { font-size: 26px; font-weight: 700; letter-spacing: -.022em; line-height: 1.1; }
.ring { transform: rotate(-90deg); }
.ring .tr { stroke: var(--fill-2); } .ring .pr { stroke: var(--good); transition: stroke-dashoffset 400ms var(--ease); }
.success { background: color-mix(in srgb, var(--good) 14%, var(--surface)); border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-weight: 600; color: var(--text); }

/* teraz */
.now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.now .when { font-size: 12.5px; color: var(--text-2); }
.now .what { font-size: 18px; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.now .grow { flex: 1; min-width: 240px; }

/* alerty */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--sep); }
.alert:first-child { border-top: 0; padding-top: 0; }
.alert .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #fff; margin-top: 1px; }
.alert.crit .ic { background: var(--crit); } .alert.warn .ic { background: var(--warn); } .alert.info .ic { background: var(--accent); } .alert.good .ic { background: var(--good); }
.alert .tx { flex: 1; min-width: 0; } .alert .tx b { font-weight: 600; } .alert .tx div { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }

/* ---------- oś dnia ---------- */
.tl { display: flex; flex-direction: column; gap: 6px; }
.blkwrap { display: flex; flex-direction: column; }
.blk { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px 9px 12px; border-radius: 10px; background: var(--surface-2);
  position: relative; transition: opacity 200ms ease; }
.blk::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--kc, var(--muted)); }
.blk .tm { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 12.5px; }
.blk .tm s { color: var(--muted); font-size: 11px; display: block; }
.blk .lb { min-width: 0; }
.blk .lb .k { font-size: 11.5px; font-weight: 600; color: var(--kc); }
.blk .lb .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.now { box-shadow: inset 0 0 0 2px var(--accent); }
.blk.done { opacity: .55; } .blk.done .t { text-decoration: line-through; text-decoration-color: var(--muted); }
.blk.work, .blk.cal { background: transparent; border: 1px dashed var(--sep); }
.blk.conflict { box-shadow: inset 0 0 0 1.5px var(--warn); }
.linkbtn { border: 0; background: none; padding: 2px 0 0; color: var(--accent); font-size: 12px; cursor: pointer; text-align: left; }
.linkbtn:hover { text-decoration: underline; }
.howbox { margin: 4px 0 4px 16px; padding: 10px 14px; border-left: 2px solid var(--kc); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.steplist { list-style: none; margin: 6px 0 0; padding: 0; }
.steplist li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.steplist li.done span.tx { color: var(--muted); text-decoration: line-through; }
.steplist .tm2 { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; width: 78px; flex: 0 0 auto; margin-top: 1px; }
ol.steps { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
ul.plain { list-style: none; margin: 6px 0 0; padding: 0; line-height: 1.6; }
.warnline { margin-top: 6px; color: var(--warn); }
.windows { display: flex; gap: 6px; flex-wrap: wrap; }
.windows span { font-size: 12px; padding: 3px 9px; border-radius: 12px; background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--text); font-variant-numeric: tabular-nums; }

.k-study { --kc: var(--k-study); } .k-review { --kc: var(--k-review); } .k-gym { --kc: var(--k-gym); } .k-mobility { --kc: var(--k-mob); } .k-cardio { --kc: var(--k-cardio); } .k-tennis { --kc: var(--k-tennis); }
.k-project { --kc: var(--k-project); } .k-weekly { --kc: var(--k-weekly); } .k-work { --kc: var(--k-work); } .k-rest { --kc: var(--k-rest); } .k-cal { --kc: var(--k-cal); }
.k-move { --kc: var(--k-gym); } .k-custom { --kc: var(--k-rest); }
.kdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--kc); }

/* ---------- paski, liczby ---------- */
.bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width 400ms var(--ease); }
.bar i.good { background: var(--good); } .bar i.warn { background: var(--warn); } .bar i.crit { background: var(--crit); }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; }
.meter .v { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-2); }
.meter .bar { grid-column: 1 / -1; }
.stat .big { font-size: 28px; font-weight: 700; letter-spacing: -.022em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 2px; }
.stat .lbl { color: var(--text-2); font-size: 12.5px; }
.delta { font-size: 12px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); } .delta.down { color: var(--crit); } .delta.flat { color: var(--muted); }
.mtile { display: flex; flex-direction: column; gap: 3px; }
.mtile .v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* heatmapa */
.hm { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; }
.hm .c { width: 13px; height: 13px; border-radius: 3px; background: var(--h0); position: relative; }
.hm .c.l1 { background: var(--h1); } .hm .c.l2 { background: var(--h2); } .hm .c.l3 { background: var(--h3); } .hm .c.l4 { background: var(--h4); }
.hm .c.g::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--k-gym); box-shadow: 0 0 0 1px var(--surface); }
.hm .c.fut { background: transparent; border: 1px dashed var(--sep); }
.hm .c.today { outline: 1.5px solid var(--text-2); outline-offset: 1px; }
.hml { display: grid; grid-template-rows: repeat(7, 13px); gap: 3px; font-size: 10px; color: var(--muted); line-height: 13px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); align-items: center; }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* wykres liniowy */
.spark { display: block; width: 100%; height: 44px; overflow: visible; }
.spark path.l { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark path.a { fill: var(--accent-soft); stroke: none; }
.spark circle { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.spark line.x { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }

/* ---------- tydzień ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--shadow); border-radius: 12px; padding: 10px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.day.today { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.day.past { opacity: .7; }
.day .dh { display: flex; justify-content: space-between; align-items: baseline; }
.day .dh b { font-size: 15px; letter-spacing: -.01em; }
.day select { width: 100%; font-size: 12.5px; height: 28px; }
.wb { position: relative; background: var(--surface-2); padding: 5px 7px 5px 10px; border-radius: 7px; font-size: 12px; line-height: 1.35; }
.wb::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; border-radius: 2px; background: var(--kc); }
.wb .tm { color: var(--muted); font-variant-numeric: tabular-nums; }
.wb.done { opacity: .5; text-decoration: line-through; }
.wb.work, .wb.cal { background: transparent; border: 1px dashed var(--sep); }
.wb.conflict { box-shadow: inset 0 0 0 1.5px var(--warn); }

/* ---------- tabele ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px; border-bottom: 1px solid var(--sep); text-align: left; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tr.grp td { background: var(--surface-2); font-weight: 600; color: var(--text-2); font-size: 12.5px; }
tr.curwk td { background: var(--accent-soft); }
.st { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11.5px; background: var(--fill); cursor: pointer; white-space: nowrap; font-weight: 500; }
.st.s0 { color: var(--muted); } .st.s1 { color: var(--k-study); } .st.s2, .st.s3 { color: var(--k-review); } .st.s4 { color: var(--good); }
.due { color: var(--warn); font-weight: 600; }

/* ---------- projekty ---------- */
.proj { display: flex; flex-direction: column; gap: 10px; }
.proj.focus-on { box-shadow: inset 0 0 0 2px var(--k-project), var(--shadow); }
.proj.frozen { opacity: .6; }
.star { border: 0; background: none; cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); padding: 0 2px; }
.star.on { color: var(--k-project); }
.todo { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.todo.done > span { text-decoration: line-through; color: var(--muted); }
.todo .x { margin-left: auto; opacity: 0; border: 0; background: none; cursor: pointer; color: var(--muted); }
.todo:hover .x { opacity: 1; }
.substeps { margin: 2px 0 6px 32px; }
.pill { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: var(--fill); color: var(--text-2); }
.counter { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; }

/* ---------- różne ---------- */
.banner { padding: 11px 14px; border-radius: 12px; background: var(--surface-2); display: flex; gap: 10px; align-items: flex-start; }
.banner.warn { background: color-mix(in srgb, var(--warn) 13%, var(--surface)); }
.banner.crit { background: color-mix(in srgb, var(--crit) 12%, var(--surface)); }
.banner.good { background: color-mix(in srgb, var(--good) 13%, var(--surface)); }
.banner .ic { font-weight: 700; flex: 0 0 auto; }
.why { font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.greet { font-size: 26px; font-weight: 700; letter-spacing: -.022em; line-height: 1.15; }
.phasebar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; position: relative; background: var(--fill); }
.phasebar div { display: flex; align-items: center; padding: 0 8px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; border-right: 1px solid var(--surface); }
.phasebar div.cur { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.phasebar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); padding: 0; border: 0; }
.onb li { list-style: none; display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }
.onb ul { margin: 0; padding: 0; }
.onb li.done span { text-decoration: line-through; color: var(--muted); }
details summary { cursor: pointer; color: var(--text-2); }
.empty { color: var(--muted); font-size: 13px; padding: 6px 0; }
#tip { position: fixed; pointer-events: none; z-index: 70; background: var(--chrome-solid); border: 1px solid var(--sep); color: var(--text); padding: 6px 9px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow-lg); display: none; max-width: 300px; }
#toast { position: fixed; right: 20px; bottom: 76px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
#toast div { background: var(--chrome); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border: 1px solid var(--sep); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 380px; animation: tin 250ms var(--ease); }
#toast div.err { border-color: var(--crit); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* arkusze (modal) — szkło tylko na chrome */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fin 200ms ease; }
.modal { background: var(--surface); border-radius: 18px; max-width: 760px; width: 100%; max-height: 88vh; overflow: auto; padding: 22px; box-shadow: var(--shadow-lg); animation: sin 250ms var(--ease); }
.modal h3 { margin: 0 0 14px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
@keyframes fin { from { opacity: 0; } to { opacity: 1; } }
@keyframes sin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.sets { display: flex; gap: 6px; flex-wrap: wrap; }
.sets .set { display: flex; gap: 3px; align-items: center; background: var(--surface-2); border-radius: 8px; padding: 3px 5px; }
.sets .set input { width: 54px; height: 26px; padding: 2px 6px; font-size: 12.5px; }

/* tryb skupienia */
.focus-bg { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%); animation: fin 200ms ease; }
.focus-sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 26px 28px; text-align: center; animation: sin 250ms var(--ease); }
.focus-sheet .blk-title { font-size: 13px; color: var(--text-2); font-weight: 500; }
.focus-sheet .stepno { font-size: 12px; color: var(--muted); margin-top: 14px; }
.focus-sheet .steptext { font-size: 21px; font-weight: 650; letter-spacing: -.018em; line-height: 1.3; margin: 6px 0 4px; min-height: 54px; }
.focus-sheet .timer { position: relative; width: 210px; height: 210px; margin: 16px auto 10px; }
.focus-sheet .timer svg { width: 210px; height: 210px; transform: rotate(-90deg); }
.focus-sheet .timer .tr { stroke: var(--fill); } .focus-sheet .timer .pr { stroke: var(--accent); transition: stroke-dashoffset 900ms linear; }
.focus-sheet .timer.over .pr { stroke: var(--warn); }
.focus-sheet .timer .t { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.focus-sheet .timer .t small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: -6px; }
.focus-sheet .nextstep { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.focus-sheet .fbtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.dots { display: flex; gap: 5px; justify-content: center; margin-top: 10px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fill-2); }
.dots i.on { background: var(--accent); } .dots i.done { background: var(--good); }

/* ---------- dostępność i preferencje systemu ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  nav.side, .topbar, #toast div, .focus-bg, .modal-bg { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  nav.side, .topbar, #toast div { background: var(--chrome-solid); }
  .focus-bg { background: var(--bg); }
}
@media (prefers-contrast: more) {
  .card, .day, .blk, .mcard { border: 1px solid var(--text-2); }
  :root { --sep: rgba(127,127,127,.6); }
}
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } .mission { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  nav.side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--sep); }
  .navbtn kbd, .side .foot { display: none; }
  .g2, .g3, .g-21, .g-12 { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view { padding: 16px; } .topbar { padding: 12px 16px; }
  .blk { grid-template-columns: 70px 1fr; } .blk .seg { grid-column: 1 / -1; }
  .mhead { flex-wrap: wrap; } .mhead > .small { display: none; } .mhead .big { white-space: nowrap; }
  .now .btn.lg { height: 36px; padding: 0 14px; font-size: 14px; }
}
@media print { nav.side, .topbar, #toast, .btn { display: none !important; } .app { display: block; } .card { box-shadow: none; break-inside: avoid; } }

/* ---------- logowanie (tryb VPS) ---------- */
.login-page { min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; box-sizing: border-box; }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; padding: 28px 24px; text-align: center; }
.login-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 0; }
.login-card .muted { margin: 0 0 6px; }
.login-logo { width: 56px; height: 56px; margin: 0 auto; border-radius: 14px; background: linear-gradient(135deg, #007aff, #5e5ce6);
  position: relative; box-shadow: 0 6px 20px rgba(0,122,255,.25); }
.login-logo::before { content: ""; position: absolute; inset: 15px; border: 3.5px solid #fff; border-radius: 50%; }
.login-logo::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: #fff; border-radius: 50%; }
.login-field { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 13px; color: var(--text-2); }
.login-field input { height: 40px; font-size: 16px; padding: 0 12px; border-radius: 10px; }
.login-err { min-height: 18px; margin: 0; color: var(--crit); font-size: 13px; }
.login-card .btn.lg { width: 100%; }

/* ---------- v4: tablica, projekt, notatki, Jarvis ---------- */
.mt { margin-top: 16px; }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.sech { font-size: 15px; font-weight: 600; margin: 22px 0 10px; color: var(--text-2); }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seg.wrap { flex-wrap: wrap; max-width: 100%; }
.pchip { --h: 210; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: hsl(var(--h) 70% 50% / .14); color: hsl(var(--h) 55% 38%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pchip { color: hsl(var(--h) 75% 72%); background: hsl(var(--h) 60% 50% / .22); } }
:root[data-theme="dark"] .pchip { color: hsl(var(--h) 75% 72%); background: hsl(var(--h) 60% 50% / .22); }
.pill.good { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--text); }

/* tablica */
.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.bcol { background: var(--surface-2); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; border: 1.5px dashed transparent; transition: border-color .15s, background .15s; }
.bcol header { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.bcol header .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bcol header .n.over { color: var(--crit); font-weight: 700; }
.bcol.teraz { background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.bcol.inbox { background: color-mix(in srgb, var(--warn) 7%, var(--surface-2)); }
.bcol.dropon { border-color: var(--accent); background: var(--accent-soft); }
.bcol .hint { padding: 0 4px; }
.bcards { display: flex; flex-direction: column; gap: 8px; }
.bcard { background: var(--surface); border: 1px solid var(--card-border); border-radius: 10px; padding: 9px 10px; box-shadow: var(--shadow); cursor: grab; display: flex; flex-direction: column; gap: 6px; }
.bcard:active { cursor: grabbing; }
.bcard.dragging { opacity: .45; }
.bcard .bt { font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.bcard.done .bt { text-decoration: line-through; color: var(--muted); }
.bcard .more { font-size: 13px; padding: 0 2px; }
.bdetail { border-top: 1px solid var(--sep); padding-top: 6px; }
.bempty { font-size: 12px; color: var(--muted); text-align: center; padding: 18px 6px; border: 1px dashed var(--sep); border-radius: 10px; }
.badd { display: flex; gap: 6px; flex-wrap: wrap; }
.badd input { flex: 1 1 120px; } .badd select { flex: 1 1 90px; height: 30px; }
.bdone { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; }

/* projekty */
.pcard { cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: transform .12s var(--ease), box-shadow .12s; }
.pcard:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg, var(--shadow)); }
.pcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard.frozen { opacity: .6; }
.nextstep { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.nextstep .eyebrow { font-size: 10.5px; }
.standing .bignext { display: flex; gap: 12px; align-items: flex-start; background: color-mix(in srgb, var(--good) 9%, var(--surface-2)); border-radius: 12px; padding: 12px; }
.bignext .nx { font-size: 16px; font-weight: 600; line-height: 1.3; margin-top: 2px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; color: var(--text-2); }
.kv b { color: var(--text); text-align: right; }
.tgroup { margin-bottom: 10px; } .tgroup .eyebrow { margin: 6px 0 2px; }
.colsel { height: 24px; font-size: 12px; padding: 0 4px; max-width: 110px; }
.tl { display: flex; flex-direction: column; gap: 2px; max-height: 460px; overflow: auto; }
.tld { font-size: 12px; font-weight: 600; color: var(--muted); margin: 8px 0 2px; }
.tle { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0 4px 12px; border-left: 2px solid var(--sep); font-size: 13px; }
.tle.tk-done { border-color: var(--good); } .tle.tk-note { border-color: var(--accent); } .tle.tk-report { border-color: var(--warn); }
.report { white-space: normal; font-size: 13.5px; line-height: 1.55; background: var(--surface-2); border-radius: 10px; padding: 12px; }

/* notatki */
.nlist { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.nitem { padding: 9px 10px; border-radius: 10px; cursor: pointer; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; }
.nitem:hover { background: var(--fill); }
.nitem.on { background: var(--accent-soft); }
.ntitle { font-size: 17px; font-weight: 600; height: 36px !important; }
.ntext { min-height: 46vh; font-size: 14.5px; line-height: 1.55; resize: vertical; }

/* propozycje */
.prop { border: 1px solid var(--sep); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.prop.pending { border-color: color-mix(in srgb, var(--accent) 45%, var(--sep)); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.prop.applied, .prop.rejected, .prop.superseded { opacity: .7; }
.prop .pt { display: flex; align-items: center; gap: 6px; } .prop .pt svg, .props-card h2 svg, .btn svg { width: 16px; height: 16px; }
.prop .ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.prop .ops li { display: flex; gap: 8px; align-items: flex-start; }
.prop .dotop { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: 0 0 auto; }

/* Jarvis */
.jvfab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; border-radius: 22px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #007aff, #5e5ce6); color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0,122,255,.35); }
.jvfab svg { width: 20px; height: 20px; }
.jvfab .badge { position: static; font-style: normal; background: #fff; color: #007aff; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; padding: 0 5px; }
.jvfab:active { transform: scale(.97); }
.jvdrawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 45; background: var(--surface); border-left: 1px solid var(--sep); box-shadow: var(--shadow-lg, 0 0 40px rgba(0,0,0,.2));
  display: none; flex-direction: column; }
.jvdrawer.open { display: flex; animation: jvin 220ms var(--ease); }
@keyframes jvin { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.jvdrawer header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--sep); }
.jvdrawer header svg { width: 20px; height: 20px; color: var(--accent); }
.jvbody { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg .bubble { padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.45; background: var(--surface-2); overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.assistant .bubble { border-bottom-left-radius: 6px; }
.msg .via { font-size: 11px; color: var(--muted); }
.msg .acts { display: flex; flex-wrap: wrap; gap: 4px; }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; } .typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.jvquick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px 0; }
.jvquick .chip { cursor: pointer; border: 0; flex: 0 0 auto; }
.jvquick .chip:disabled { opacity: .5; cursor: default; }
.jvin { display: flex; gap: 8px; padding: 10px 16px 16px; align-items: flex-end; }
.jvin textarea { flex: 1; min-height: 44px; max-height: 160px; resize: vertical; font-size: 14px; }
.tggrid { display: grid; grid-template-columns: auto minmax(96px, 124px) auto minmax(96px, 124px) auto minmax(96px, 124px); gap: 6px 10px; align-items: center; }
@media (max-width: 820px) {
  .board { grid-template-columns: repeat(5, minmax(78vw, 1fr)); scroll-snap-type: x mandatory; } .bcol { scroll-snap-align: start; }
  .tggrid { grid-template-columns: auto 1fr; }
  .jvfab { right: 14px; bottom: 14px; }
  .ntext { min-height: 40vh; }
}
@media (prefers-reduced-motion: reduce) { .jvdrawer.open, .pcard { animation: none; transition: none; } .typing i { animation: none; opacity: .6; } }
/* poczta */
.mrow { border: 1px solid var(--sep); border-left: 3px solid var(--accent); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 4px; }
.mrow.warn { border-left-color: var(--warn); } .mrow.crit { border-left-color: var(--crit); }
.mrow .mmeta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mrow .msubj { font-size: 14px; } .mrow .msubj a { color: var(--text); text-decoration: none; } .mrow .msubj a:hover { text-decoration: underline; }
.macc { border: 1px solid var(--sep); border-radius: 10px; padding: 8px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
/* testy */
.qgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.qstat { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.qstat .lbl { font-size: 12px; color: var(--muted); font-weight: 600; } .qstat .big { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.qact { margin-bottom: 8px; } .qact .sep { width: 1px; height: 22px; background: var(--sep); margin: 0 4px; } .qact select { max-width: 260px; }
.goals .goal h3 { margin: 0; } .goals .goal .big { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.goals .goal.primary { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.goals .goal.off { opacity: .6; }
.goals .facts { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 3px; }
#quiz .qbg { position: fixed; inset: 0; z-index: 64; background: rgba(0,0,0,.32); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; }
#quiz .qsheet { width: 100%; max-width: 760px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px 22px 20px; animation: sin 220ms var(--ease); }
#quiz header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.qprog { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; margin-bottom: 12px; } .qprog i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.qmeta { margin-bottom: 6px; } .qstem { font-size: 16px; line-height: 1.55; margin-bottom: 14px; overflow-wrap: anywhere; }
.qopts { display: flex; flex-direction: column; gap: 8px; }
.qopt { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 1.5px solid var(--sep); background: var(--surface); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; line-height: 1.45; cursor: pointer; }
.qopt b { flex: 0 0 26px; height: 26px; border-radius: 13px; background: var(--fill); display: grid; place-items: center; font-size: 13px; }
.qopt:hover:not(:disabled) { border-color: var(--accent); }
.qopt.chosen { border-color: var(--accent); background: var(--accent-soft); }
.qopt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface)); } .qopt.right b { background: var(--good); color: #fff; }
.qopt.wrong { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 11%, var(--surface)); } .qopt.wrong b { background: var(--crit); color: #fff; }
.qopt.dim { opacity: .55; } .qopt:disabled { cursor: default; }
.qfb { margin-top: 12px; border-radius: 12px; padding: 12px; background: var(--surface-2); } .qfb.ok { background: color-mix(in srgb, var(--good) 10%, var(--surface-2)); } .qfb.bad { background: color-mix(in srgb, var(--crit) 8%, var(--surface-2)); }
.qhint { margin-top: 10px; }
.qscore { border-radius: 14px; padding: 16px; text-align: center; background: var(--surface-2); } .qscore .big { font-size: 42px; font-weight: 800; letter-spacing: -.03em; }
.qscore.good { background: color-mix(in srgb, var(--good) 14%, var(--surface-2)); } .qscore.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface-2)); } .qscore.crit { background: color-mix(in srgb, var(--crit) 12%, var(--surface-2)); }
.qwrong { border-top: 1px solid var(--sep); padding: 8px 0; display: flex; flex-direction: column; gap: 4px; } .qwrong .bad { color: var(--crit); }
@media (max-width: 820px) { .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } #quiz .qsheet { padding: 14px; border-radius: 16px; } .qstem { font-size: 15px; } }
/* wytyczne — active recall (v4.3) */
#rcx .qbg { position: fixed; inset: 0; z-index: 66; background: rgba(0,0,0,.32); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; }
#rcx .qsheet { width: 100%; max-width: 680px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px 22px 20px; animation: sin 220ms var(--ease); }
#rcx .qsheet.wide { max-width: 820px; }
#rcx header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
#rcx textarea { font: inherit; font-size: 14.5px; line-height: 1.5; border-radius: 12px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--sep); color: var(--text); resize: vertical; min-height: 120px; }
.kfront { font-size: 19px; line-height: 1.5; font-weight: 600; letter-spacing: -.01em; padding: 18px 4px 8px; overflow-wrap: anywhere; }
.kback { font-size: 16px; line-height: 1.55; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin-top: 6px; overflow-wrap: anywhere; }
.kgrades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.kgrades .btn { height: 44px; justify-content: center; font-size: 14px; }
.kgrades .btn b { opacity: .55; margin-right: 4px; }
.kgrades .btn.crit { background: color-mix(in srgb, var(--crit) 14%, var(--surface-2)); } .kgrades .btn.warn { background: color-mix(in srgb, var(--warn) 16%, var(--surface-2)); }
.kgrades .btn.good { background: color-mix(in srgb, var(--good) 14%, var(--surface-2)); }
.rsec { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.rsec ol, .rsec ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.qfb.mid { background: color-mix(in srgb, var(--warn) 10%, var(--surface-2)); }
.bad { color: var(--crit); } #rcxClock.good { color: var(--good); }
.pcardk { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--sep); cursor: pointer; }
.stact { display: inline-flex; margin-left: 8px; vertical-align: middle; } .stact .btn { height: 24px; font-size: 12px; padding: 0 8px; }
.factrow { display: flex; justify-content: center; margin: 4px 0 12px; }
.filebtn { cursor: pointer; display: inline-flex; align-items: center; }
.stoday .stblk { padding: 10px 0; border-top: 1px solid var(--sep); } .stoday .stblk:first-of-type { border-top: 0; padding-top: 2px; }
.stoday .stline { padding: 6px 0; font-size: 13.5px; } .stoday .stline.done { color: var(--muted); }
.gtopic { border-top: 1px solid var(--sep); padding: 8px 0; } .gtopic:first-of-type { border-top: 0; }
.gtrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .gtrow .sp2 { flex: 1; }
.gtname { font-weight: 600; font-size: 14px; color: var(--text); text-align: left; }
.gbar { width: 90px; height: 5px; border-radius: 3px; background: var(--fill); overflow: hidden; } .gbar i { display: block; height: 100%; background: var(--good); }
.gbody { padding: 8px 0 4px 18px; }
.gbox { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.chunks { margin-top: 8px; display: flex; flex-direction: column; }
.chunk { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid var(--sep); font-size: 13.5px; }
.chunk .ctitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chunk .cdot { width: 9px; height: 9px; border-radius: 50%; background: var(--fill); border: 1.5px solid var(--muted); }
.chunk.st-read .cdot { background: color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.chunk.st-blurted .cdot, .chunk.st-done .cdot { background: var(--good); border-color: var(--good); }
.chunk .cact { gap: 4px; flex-wrap: nowrap; }
.btn.xs { height: 24px; min-width: 28px; padding: 0 6px; font-size: 13px; border-radius: 7px; justify-content: center; }
select.xs { height: 24px; font-size: 12px; padding: 0 4px; }
@media (max-width: 820px) {
  #rcx .qsheet { padding: 14px; border-radius: 16px; } .kfront { font-size: 17px; } .kgrades .btn { height: 48px; }
  .chunk { grid-template-columns: 10px 1fr; } .chunk .num, .chunk .cact { grid-column: 2; }
  .gbody { padding-left: 4px; }
}
