/* parent panel: layout on the "Podwórko" tokens (/assets/tp/tokens.css, light and dark theme by the system);
   denser than the child screens, no colour values of its own */
* { box-sizing: border-box; }
body { margin: 0; background: var(--tp-color-bg); color: var(--tp-color-text);
  font: var(--tp-font-size-md)/var(--tp-line-height-normal) var(--tp-font-body);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
h1, h2, h3, .big, .brand-name { font-family: var(--tp-font-display); line-height: var(--tp-line-height-snug); }
header { display: flex; align-items: center; justify-content: space-between; gap: var(--tp-space-3);
  max-width: 680px; margin: 0 auto; padding: var(--tp-space-4) var(--tp-space-4) 0; }
/* in the Android app its own bar is the header (panel-static-routes.ts isInApp) */
body.in-app > header { display: none; }
.brand { display: flex; flex-direction: column; }
.brand-name { font-size: var(--tp-font-size-xl); font-weight: var(--tp-font-weight-extrabold); color: var(--tp-color-primary); }
.brand-sub { font-size: var(--tp-font-size-sm); color: var(--tp-color-text-muted); font-weight: var(--tp-font-weight-semibold); }
main { max-width: 680px; margin: 0 auto; padding: var(--tp-space-2) var(--tp-space-4) var(--tp-space-7); }
.card { background: var(--tp-color-surface); border-radius: var(--tp-radius-lg); box-shadow: var(--tp-shadow-card);
  padding: var(--tp-space-4); margin: var(--tp-space-3) 0; }
.card > h3:first-child { margin-top: 0; }
.card h2 { margin: 0 0 var(--tp-space-1); font-size: var(--tp-font-size-2xl); font-weight: var(--tp-font-weight-extrabold); }
.card h3 { margin: var(--tp-space-5) 0 var(--tp-space-2); font-size: var(--tp-font-size-sm); color: var(--tp-color-text-muted);
  text-transform: uppercase; letter-spacing: .05em; font-weight: var(--tp-font-weight-bold); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tp-space-3); flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.big { font-family: var(--tp-font-numeric); font-size: var(--tp-font-size-4xl); font-weight: var(--tp-font-weight-extrabold);
  line-height: var(--tp-line-height-tight); font-variant-numeric: tabular-nums; }
.muted { color: var(--tp-color-text-muted); font-size: var(--tp-font-size-sm); }
.bar { height: var(--tp-size-progress-bar); background: var(--tp-color-track); border-radius: var(--tp-radius-pill);
  overflow: hidden; margin: var(--tp-space-3) 0 var(--tp-space-1); }
.bar > div { height: 100%; border-radius: var(--tp-radius-pill); background: var(--tp-color-ok); }
.bar.low > div { background: var(--tp-color-low); }
.bar.off > div { background: var(--tp-color-off); }
.row { display: flex; gap: var(--tp-space-2); flex-wrap: wrap; margin: var(--tp-space-2) 0; }
.row > * { flex: 1 1 0; min-width: 0; }
button, select, input { font: inherit; border-radius: var(--tp-radius-pill); min-height: var(--tp-size-touch-min); }
button { background: var(--tp-color-surface-variant); color: var(--tp-color-text); font-weight: var(--tp-font-weight-bold);
  padding: var(--tp-space-2) var(--tp-space-4); cursor: pointer; border: var(--tp-size-border-width) solid transparent; }
button.primary { background: var(--tp-color-primary); color: var(--tp-color-on-primary); }
button.quiet { background: transparent; border-color: var(--tp-color-border-strong); }
button.danger { background: var(--tp-color-error); color: var(--tp-color-on-error); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: var(--tp-size-focus-width) solid var(--tp-color-focus); outline-offset: var(--tp-size-focus-offset); }
select, input { background: var(--tp-color-surface); color: var(--tp-color-text); padding: var(--tp-space-2) var(--tp-space-4);
  width: 100%; border: var(--tp-size-border-width) solid var(--tp-color-border-strong); }
input { border-radius: var(--tp-radius-sm); }
.chips { display: flex; flex-wrap: wrap; gap: var(--tp-space-2); margin: var(--tp-space-2) 0 0; }
.chip { display: inline-block; padding: 2px var(--tp-space-3); border-radius: var(--tp-radius-pill); font-size: var(--tp-font-size-xs);
  font-weight: var(--tp-font-weight-extrabold); max-width: 100%; overflow-wrap: anywhere; background: var(--tp-color-surface-variant); color: var(--tp-color-text-muted); }
.chip { text-align: left; }
.cat-value .chip { border-radius: var(--tp-radius-md); }
.chip.ok { background: var(--tp-color-ok-bg); color: var(--tp-color-ok-fg); }
.chip.low { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); }
.chip.off { background: var(--tp-color-off-bg); color: var(--tp-color-off-fg); }
.chip.free { background: var(--tp-color-free-bg); color: var(--tp-color-free-fg); }
.chip.error { background: var(--tp-color-error-bg); color: var(--tp-color-error-fg); }
.list { background: var(--tp-color-surface-subtle); border-radius: var(--tp-radius-md); padding: var(--tp-space-1) var(--tp-space-3); }
.cat, .dev { display: flex; justify-content: space-between; align-items: center; gap: var(--tp-space-2);
  padding: var(--tp-space-2) 0; border-top: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }
.cat:first-child, .dev:first-child { border-top: 0; }
.cat { flex-wrap: wrap; }
.cat .sub { padding-left: var(--tp-space-4); }
.cat-right { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--tp-space-2);
  margin-left: auto; font-variant-numeric: tabular-nums; }
.dev { display: block; padding: var(--tp-space-3) 0; }
.dev-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--tp-space-2); }
.dev-name { font-weight: var(--tp-font-weight-bold); overflow-wrap: anywhere; }
.dot { display: inline-block; width: var(--tp-size-status-dot); height: var(--tp-size-status-dot); border-radius: 50%;
  background: var(--tp-color-border-strong); margin-right: var(--tp-space-1); vertical-align: baseline; }
.dot.on { background: var(--tp-color-ok); }
.cmds { font-size: var(--tp-font-size-sm); color: var(--tp-color-text-muted); margin-top: var(--tp-space-2); }
.invite { margin-top: var(--tp-space-3); }
.invite-code { font: var(--tp-font-weight-bold) var(--tp-font-size-xl)/var(--tp-line-height-snug) var(--tp-font-display);
  text-align: center; padding: var(--tp-space-3); border-radius: var(--tp-radius-md); background: var(--tp-color-surface-variant);
  user-select: all; overflow-wrap: anywhere; }
.qr { display: block; width: 220px; max-width: 100%; height: auto; margin: var(--tp-space-3) auto;
  border-radius: var(--tp-radius-md); background: var(--tp-color-surface); }
#offline { background: var(--tp-color-error-bg); color: var(--tp-color-error-fg); border-radius: var(--tp-radius-md);
  padding: var(--tp-space-3) var(--tp-space-4); margin: var(--tp-space-3) 0 0; font-weight: var(--tp-font-weight-semibold); }
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--tp-color-text); color: var(--tp-color-bg); padding: var(--tp-space-3) var(--tp-space-5); border-radius: var(--tp-radius-pill);
  font-weight: var(--tp-font-weight-bold); max-width: calc(100% - 32px); opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
#login { max-width: 420px; margin: 8vh auto 0; }
.tabs { display: flex; gap: var(--tp-space-1); background: var(--tp-color-surface-variant); border-radius: var(--tp-radius-pill);
  padding: var(--tp-space-1); margin: var(--tp-space-3) 0; }
.tabs button { flex: 1 1 0; min-height: 44px; background: transparent; color: var(--tp-color-text-muted); font-size: var(--tp-font-size-sm); }
.tabs button[aria-selected="true"] { background: var(--tp-color-surface); color: var(--tp-color-text); box-shadow: var(--tp-shadow-card); }
.choice { display: flex; gap: var(--tp-space-3); align-items: center; padding: var(--tp-space-3); margin: var(--tp-space-2) 0;
  border: var(--tp-size-border-width) solid var(--tp-color-border-strong); border-radius: var(--tp-radius-sm); cursor: pointer; }
.choice input { width: auto; min-height: 0; margin: 0; }
#login form > * + * { margin-top: var(--tp-space-2); }
#login-error { color: var(--tp-color-error); font-weight: var(--tp-font-weight-semibold); }
.donate p { margin: 0 0 var(--tp-space-1); }
.donate h2 { font-size: var(--tp-font-size-xl); }
a.button { display: flex; text-align: center; align-items: center; justify-content: center; min-height: var(--tp-size-touch-min); border-radius: var(--tp-radius-pill);
  font-weight: var(--tp-font-weight-bold); text-decoration: none; padding: var(--tp-space-2) var(--tp-space-4); }
a.button.primary { background: var(--tp-color-primary); color: var(--tp-color-on-primary); }
a.button.accent { background: var(--tp-color-accent); color: var(--tp-color-on-accent); }
a { color: var(--tp-color-primary); }
.source { text-align: center; }
.source a { color: inherit; }
.vault-warn { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); border-radius: var(--tp-radius-md);
  padding: var(--tp-space-3) var(--tp-space-4); font-weight: var(--tp-font-weight-semibold); }
.vault-file { overflow-wrap: anywhere; }
button.small { min-height: 36px; padding: var(--tp-space-1) var(--tp-space-3); font-size: var(--tp-font-size-sm); }
.vault-versions { margin-top: var(--tp-space-2); padding-left: var(--tp-space-3); border-left: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }
.vault-version { display: flex; justify-content: space-between; align-items: center; gap: var(--tp-space-2);
  font-size: var(--tp-font-size-sm); padding: var(--tp-space-1) 0; font-variant-numeric: tabular-nums; }
.vault-form > * + *, .vault-created > * + * { margin-top: var(--tp-space-2); }
.vault-form { margin-top: var(--tp-space-3); } .data-export > * + * { margin-top: var(--tp-space-2); }
.vault-created { background: var(--tp-color-surface-variant); border-radius: var(--tp-radius-md); padding: var(--tp-space-4); margin-top: var(--tp-space-3); }
.vault-created p { margin: 0; font-weight: var(--tp-font-weight-semibold); }
.vault-secret input { font-family: var(--tp-font-numeric); font-weight: var(--tp-font-weight-bold); font-size: var(--tp-font-size-sm); padding-left: var(--tp-space-3); padding-right: var(--tp-space-3); }
.vault-key-card { background: var(--tp-color-surface-variant); border-radius: var(--tp-radius-md); padding: var(--tp-space-4); margin-top: var(--tp-space-3); }
.vault-key-card h3 { margin-top: 0; }
.vault-key-password { font-family: var(--tp-font-numeric); font-weight: var(--tp-font-weight-bold); font-size: var(--tp-font-size-2xl);
  line-height: var(--tp-line-height-snug); display: flex; flex-wrap: wrap; gap: var(--tp-space-1) var(--tp-space-3); overflow-wrap: anywhere; }
.vault-key-word { white-space: nowrap; }
.vault-key-dash { color: var(--tp-color-text-muted); margin-left: var(--tp-space-3); }
.vault-key-note { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); border-radius: var(--tp-radius-md);
  padding: var(--tp-space-3) var(--tp-space-4); font-weight: var(--tp-font-weight-semibold); }
.vault-print { display: none; }
@media print { body.print-vault-key { background: none; } body.print-vault-key > :not(.vault-print) { display: none !important; }
  body.print-vault-key .vault-print { display: block; } body.print-vault-key .vault-key-card { background: none; }
  body.print-vault-key .vault-key-actions, body.print-vault-key .vault-print a { display: none; } }
.vault-check-words { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--tp-space-2) var(--tp-space-3); }
.vault-check-words input { font-family: var(--tp-font-numeric); font-weight: var(--tp-font-weight-bold); }
.vault-replace > * + * { margin-top: var(--tp-space-2); }
.vault-replace p { margin: 0; }
.vault-help { border-top: var(--tp-size-border-width) solid var(--tp-color-border-subtle); padding: var(--tp-space-2) 0; }
.vault-help summary { cursor: pointer; font-weight: var(--tp-font-weight-bold); padding: var(--tp-space-3) 0; }
.vault-steps { margin: var(--tp-space-1) 0 var(--tp-space-2); padding-left: var(--tp-space-5); }
.vault-steps li { margin: var(--tp-space-1) 0; overflow-wrap: anywhere; }
/* views (panel-views.js): bottom navigation on a phone, tabs under the header on a wide screen */
#nav { display: none; }
body.signed-in #nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; background: var(--tp-color-surface);
  box-shadow: var(--tp-shadow-card); padding: 0 0 env(safe-area-inset-bottom); justify-content: center; }
body.signed-in main { padding-bottom: calc(var(--tp-size-touch-min) + var(--tp-space-8)); }
body.signed-in #toast { bottom: calc(var(--tp-size-touch-min) + var(--tp-space-6) + env(safe-area-inset-bottom)); }
.nav-item { flex: 1 1 0; max-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--tp-space-2) var(--tp-space-1); min-height: var(--tp-size-touch-min); text-decoration: none;
  color: var(--tp-color-text-muted); font-size: var(--tp-font-size-xs); font-weight: var(--tp-font-weight-bold); }
.nav-icon { font-size: var(--tp-font-size-lg); line-height: 1; }
.nav-item[aria-current="page"] { color: var(--tp-color-primary); }
@media (min-width: 720px) {
  body.signed-in #nav { position: static; max-width: 648px; margin: var(--tp-space-3) auto 0; padding: var(--tp-space-1);
    border-radius: var(--tp-radius-pill); background: var(--tp-color-surface-variant); box-shadow: none; gap: var(--tp-space-1); }
  body.signed-in main { padding-bottom: var(--tp-space-7); }
  body.signed-in #toast { bottom: calc(20px + env(safe-area-inset-bottom)); }
  .nav-item { flex-direction: row; justify-content: center; gap: var(--tp-space-2); max-width: none; border-radius: var(--tp-radius-pill);
    font-size: var(--tp-font-size-sm); min-height: 44px; }
  .nav-icon { font-size: var(--tp-font-size-md); }
  .nav-item[aria-current="page"] { background: var(--tp-color-surface); color: var(--tp-color-text); box-shadow: var(--tp-shadow-card); }
}
/* one child: name, state, czas ekranowy and quick actions (panel-child-card.js, panel-child-actions.js) */
.child-link { color: inherit; text-decoration: none; }
.pool { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: var(--tp-space-3); margin-top: var(--tp-space-2); }
.pool .big { font-size: var(--tp-font-size-4xl); }
.child .bar { margin: var(--tp-space-2) 0 var(--tp-space-3); }
.actions .row { margin: var(--tp-space-2) 0 0; }
.actions .row button { padding-left: var(--tp-space-2); padding-right: var(--tp-space-2); }
.row.cmd-icons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--tp-space-1); } .cmd-icon { padding: 0; min-width: 0; border-radius: var(--tp-radius-md); font-size: var(--tp-font-size-xl); line-height: 1; }
.cmd-icon.on { background: var(--tp-color-primary-container); box-shadow: inset 0 0 0 2px var(--tp-color-primary); }
.dev .row button, .actions .row.more-actions button { font-size: var(--tp-font-size-sm); line-height: var(--tp-line-height-snug); }
.sheet { background: var(--tp-color-surface-subtle); border-radius: var(--tp-radius-md); padding: var(--tp-space-3); margin-top: var(--tp-space-2); }
.sheet p { margin: 0 0 var(--tp-space-2); }
/* "Usuń z listy…" of a device that still works: a quiet "Więcej" under it (panel-devices.js) */
details.more.dev-more { margin-top: var(--tp-space-2); }
details.dev-more > summary { font-weight: var(--tp-font-weight-normal); font-size: var(--tp-font-size-sm); color: var(--tp-color-text-muted); }
details.dev-more p { margin: 0 0 var(--tp-space-2); }
.dev-remove { margin-top: var(--tp-space-2); }
.details-link, .back { display: inline-block; margin-top: var(--tp-space-3); font-size: var(--tp-font-size-sm); font-weight: var(--tp-font-weight-bold);
  text-decoration: none; padding: var(--tp-space-1) 0; }
.back { margin: var(--tp-space-3) 0 0; }
.stamp { text-align: center; }
details.more > summary { cursor: pointer; font-weight: var(--tp-font-weight-bold); padding: var(--tp-space-2) 0; min-height: 36px; }
details.more { border-top: var(--tp-size-border-width) solid var(--tp-color-border-subtle); margin-top: var(--tp-space-3); padding-top: var(--tp-space-1); }
.card > details.more:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: var(--tp-space-3); flex-wrap: wrap;
  border-top: var(--tp-size-border-width) solid var(--tp-color-border-subtle); margin-top: var(--tp-space-3); padding-top: var(--tp-space-3);
  font-weight: var(--tp-font-weight-bold); }
a.button.small { min-height: 36px; padding: var(--tp-space-1) var(--tp-space-4); font-size: var(--tp-font-size-sm); }
/* faza 2: requests, notes on the child's card, device state, category settings, modes (panel-requests.js,
   panel-child-notes.js, panel-device-health.js, panel-category-edit.js, panel-modes.js, panel-mode-editor.js) */
.note { display: block; border-radius: var(--tp-radius-md); padding: var(--tp-space-2) var(--tp-space-3); margin: var(--tp-space-2) 0 0;
  font-size: var(--tp-font-size-sm); background: var(--tp-color-surface-subtle); text-decoration: none; color: var(--tp-color-text); }
.note p, .note.request p { margin: 0; }
.note.request { background: var(--tp-color-primary-container); color: var(--tp-color-on-primary-container); margin: var(--tp-space-3) 0; }
.note.request .muted { color: inherit; } .note.request .request-note { margin-top: var(--tp-space-2); overflow-wrap: anywhere; }
.note.low, .note.warn { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); }
.note.attention { font-weight: var(--tp-font-weight-bold); }
.now { margin: var(--tp-space-1) 0 0; font-size: var(--tp-font-size-sm); font-weight: var(--tp-font-weight-semibold); }
.health-line { font-size: var(--tp-font-size-sm); }
.health-line .health-status { font-weight: var(--tp-font-weight-bold); }
.health-line.warn .health-status { color: var(--tp-color-low-fg); }
.problems { list-style: none; margin: var(--tp-space-2) 0 0; padding: var(--tp-space-2) var(--tp-space-3); border-radius: var(--tp-radius-md);
  background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); font-size: var(--tp-font-size-sm); }
.problems li + li { margin-top: var(--tp-space-2); }
.problems li span { display: block; }
.problems .hint { color: inherit; opacity: .85; font-weight: var(--tp-font-weight-normal); }
.problems li.update:only-child { background: none; }
details.cat-more { margin-top: 0; padding-top: 0; }
details.cat-more:first-child { border-top: 0; }
details.cat-more > summary { list-style: none; cursor: pointer; padding: 0; min-height: 0; }
details.cat-more > summary::-webkit-details-marker { display: none; }
details.cat-more > summary .cat { border-top: 0; }
details.cat-more > summary .cat-right::after { content: '⌄'; color: var(--tp-color-text-muted); margin-left: var(--tp-space-1); }
details.cat-more[open] > summary .cat-right::after { content: '⌃'; }
.cat-edit { padding: 0 0 var(--tp-space-3); }
.edit-part { display: block; padding: var(--tp-space-2) 0; }
.edit-part + .edit-part { border-top: var(--tp-size-border-width) dashed var(--tp-color-border-subtle); }
.edit-title { font-weight: var(--tp-font-weight-bold); font-size: var(--tp-font-size-sm); margin: var(--tp-space-2) 0 var(--tp-space-1); }
.switch { display: flex; gap: var(--tp-space-3); align-items: flex-start; cursor: pointer; }
.switch > span > span { display: block; }
.switch .edit-title { margin-top: 0; }
.switch input, .check input, .day input { width: auto; min-height: 0; margin: 4px 0 0; accent-color: var(--tp-color-primary); }
.chip.domain { display: inline-flex; align-items: center; gap: var(--tp-space-1); font-weight: var(--tp-font-weight-bold); padding-right: 2px; }
.chip-x { min-height: 0; padding: 0 var(--tp-space-1); background: transparent; color: inherit; font-size: var(--tp-font-size-xs); line-height: 1.6; }
.add-row > input { flex: 1 1 auto; }
.add-row > button { flex: 0 0 auto; }
.program-row { flex-wrap: wrap; }
.program-row > select { flex: 0 0 auto; width: auto; max-width: 100%; }
.program-row > input { flex: 1 1 10rem; min-width: 0; }
.program-hint { margin: var(--tp-space-1) 0 0; }
.app-row, .kind-row { display: flex; align-items: center; justify-content: space-between; gap: var(--tp-space-2); padding: var(--tp-space-1) 0; }
.app-row .app-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.kind-row { flex-wrap: wrap; }
.kind-row > select { flex: 1 1 18rem; min-width: 0; max-width: 100%; }
.presets { align-items: center; }
.presets > * { flex: 0 0 auto; }
.field-label { display: block; font-size: var(--tp-font-size-sm); margin: var(--tp-space-2) 0 var(--tp-space-1); }
.off-row { align-items: center; justify-content: flex-end; margin-top: var(--tp-space-2); }
.off-row .counter { margin-right: auto; font-size: var(--tp-font-size-xs); }
.counter.over { color: var(--tp-color-text); font-weight: var(--tp-font-weight-bold); }
.off-preview { background: var(--tp-color-surface-variant); border-radius: var(--tp-radius-md); padding: var(--tp-space-3); margin-top: var(--tp-space-2); }
.off-heading { font-weight: var(--tp-font-weight-extrabold); margin: var(--tp-space-1) 0; overflow-wrap: anywhere; }
.mode-state { font-size: var(--tp-font-size-sm); font-weight: var(--tp-font-weight-bold); color: var(--tp-color-text-muted); }
.mode-state.on { color: var(--tp-color-off-fg); }
.mode-quick { font-weight: var(--tp-font-weight-bold); }
.note.request .row button { font-size: var(--tp-font-size-sm); padding-left: var(--tp-space-2); padding-right: var(--tp-space-2); } .note.request .row.unlock { flex-wrap: wrap; } .note.request .row.unlock button { flex: 1 1 12em; }
.mode-quick { flex-wrap: nowrap; }
.mode-quick button { flex: 0 0 auto; font-size: var(--tp-font-size-sm); min-height: 36px; padding: var(--tp-space-1) var(--tp-space-3); }
.mode-editor { padding: var(--tp-space-3) 0; }
.range { border-left: 3px solid var(--tp-color-border-subtle); padding-left: var(--tp-space-3); margin: var(--tp-space-2) 0; }
.range p { margin: 0; }
.days { display: flex; flex-wrap: wrap; gap: var(--tp-space-1); }
.day, .check { display: inline-flex; align-items: center; gap: var(--tp-space-1); font-size: var(--tp-font-size-sm); cursor: pointer; }
.day { padding: var(--tp-space-1) var(--tp-space-2); border-radius: var(--tp-radius-pill); background: var(--tp-color-surface-variant); }
.day input { margin: 0; }
.range-hours { align-items: center; }
.range-hours label { display: flex; align-items: center; gap: var(--tp-space-1); font-size: var(--tp-font-size-sm); }
.range-hours > button { flex: 0 0 auto; }
.range-hours input { flex: 1 1 auto; min-width: 0; padding-left: var(--tp-space-2); padding-right: var(--tp-space-2); }
.mode .row button, .mode-editor .row button { font-size: var(--tp-font-size-sm); padding-left: var(--tp-space-2); padding-right: var(--tp-space-2); }
.except { display: flex; flex-wrap: wrap; gap: var(--tp-space-1) var(--tp-space-3); }
.mode-editor > .check { margin: var(--tp-space-3) 0 0; font-weight: var(--tp-font-weight-bold); }
.form-error { color: var(--tp-color-error); font-weight: var(--tp-font-weight-semibold); }
.hidden { display: none !important; }
/* na-zywo */
.live-mark { display: inline-flex; align-items: center; gap: var(--tp-space-1); font-size: var(--tp-font-size-xs);
  font-weight: var(--tp-font-weight-bold); color: var(--tp-color-ok-fg); white-space: nowrap; }
.live-dot { width: var(--tp-size-status-dot); height: var(--tp-size-status-dot); border-radius: 50%; background: var(--tp-color-ok); }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: live-pulse 2s ease-in-out infinite; } }
@keyframes live-pulse { 50% { opacity: 0.35; } }
/* nowe-urzadzenie */
.chip.new-device-badge { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); font-weight: var(--tp-font-weight-bold); }
.new-device-actions p { margin: var(--tp-space-2) 0 0; }
.note.new-device .row button, .new-device-actions .row button { font-size: var(--tp-font-size-sm); padding-left: var(--tp-space-2); padding-right: var(--tp-space-2); }
.dev-name .chip { margin-left: var(--tp-space-2); vertical-align: middle; }
/* passkey */
.passkey-button { width: 100%; margin-top: var(--tp-space-3); }
.login-or { display: flex; align-items: center; gap: var(--tp-space-3); margin: var(--tp-space-3) 0 0; }
.login-or::before, .login-or::after { content: ''; flex: 1 1 0; border-top: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }
.passkey .dev-head { align-items: center; }
/* mcp */
.agent { display: flex; gap: var(--tp-space-3); align-items: flex-start; justify-content: space-between; padding: var(--tp-space-3) 0; border-top: var(--tp-size-border-width) dashed var(--tp-color-border-subtle); }
.agent-text { flex: 1 1 auto; min-width: 0; }
.agent-text .edit-title { margin: 0 0 var(--tp-space-1); font-size: var(--tp-font-size-md); }
.agent > button { flex: 0 0 auto; }
.agent-url { word-break: break-all; }
.agent-log { margin: 0; padding-left: var(--tp-space-4); font-size: var(--tp-font-size-sm); }
/* building the family in the browser (panel-family-setup.js) */
.field { display: flex; flex-direction: column; gap: var(--tp-space-1); }
.add-child > * + * { margin-top: var(--tp-space-2); }
.next-step { border: var(--tp-size-border-width) solid var(--tp-color-primary); }
.assign { align-items: center; }
#login.signing-up #passkey-login, #login.signing-up #login-tabs { display: none; }
.beta-consent { display: flex; gap: var(--tp-space-2); align-items: flex-start; font-size: var(--tp-font-size-sm); line-height: var(--tp-line-height-snug); cursor: pointer; }
.beta-consent input { width: auto; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--tp-color-primary); }
/* age and supervision (panel-child-privacy.js): the note for a child over 12, calm, never red */
.card.notice{background:var(--tp-color-low-bg);color:var(--tp-color-low-fg)}
.card.notice p{margin:0}

/* the screen after login: declaration and terms (panel-standing.js) */
.standing h3 { margin-top: var(--tp-space-4); }
.standing .beta-consent { margin: var(--tp-space-2) 0; }
.standing-warning { margin: var(--tp-space-3) 0; padding: var(--tp-space-3); border-radius: var(--tp-radius-md); background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); line-height: var(--tp-line-height-snug); }
.kanal-key { display: flex; justify-content: space-between; align-items: center; gap: var(--tp-space-2); padding: var(--tp-space-2) 0; border-top: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }
#login.invited #signup-hint, #login.invited #mail-intro, #login.invited #passkey-login, #login.invited #login-tabs{display:none} /* "Zaproś rodzica": a welcome, not a login (panel-parent-join.js) */
.vault-code { margin: var(--tp-space-1) 0 0; }
.big-code { font-family: var(--tp-font-display); font-size: var(--tp-font-size-2xl); letter-spacing: 0.2em; color: var(--tp-color-primary); }

/* "Zgłoś problem / opinię" (panel-feedback.js) */
.feedback-text { display: block; width: 100%; box-sizing: border-box; font: inherit; color: var(--tp-color-text); background: var(--tp-color-surface);
  border: 1px solid var(--tp-color-border-strong); border-radius: var(--tp-radius-sm); padding: var(--tp-space-3); margin: var(--tp-space-2) 0; resize: vertical; }
.feedback-label { display: flex; flex-direction: column; gap: var(--tp-space-1); margin: var(--tp-space-3) 0 var(--tp-space-1); font-size: var(--tp-font-size-sm);
  font-weight: var(--tp-font-weight-semibold); }
.feedback-label select { width: 100%; }
.feedback-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
label.feedback-pick { position: relative; display: flex; align-items: center; justify-content: center; min-height: var(--tp-size-touch-min);
  border: 1px solid var(--tp-color-border-strong); border-radius: var(--tp-radius-pill); font-weight: var(--tp-font-weight-bold); cursor: pointer; }
label.feedback-pick:focus-within { outline: 2px solid var(--tp-color-primary); outline-offset: 2px; }
.feedback-shot { display: flex; align-items: center; gap: var(--tp-space-3); }
.feedback-shot img { max-width: 120px; max-height: 120px; border-radius: var(--tp-radius-sm); box-shadow: var(--tp-shadow-card); }
.feedback .beta-consent { margin: var(--tp-space-3) 0 var(--tp-space-1); }
.feedback-item { border-top: 1px solid var(--tp-color-border); padding: var(--tp-space-3) 0; }
.feedback-item:first-of-type { border-top: 0; }
.feedback-head, .feedback-msg p { margin: 0; }
.feedback-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: var(--tp-space-1) 0; }
.feedback-msg { margin: var(--tp-space-2) 0 0 var(--tp-space-4); padding-left: var(--tp-space-3); border-left: 3px solid var(--tp-color-border-strong); }
.feedback-msg.admin { border-left-color: var(--tp-color-primary); }
#toast.with-action { pointer-events: auto; }
#toast a { color: inherit; margin-left: var(--tp-space-2); text-decoration: underline; }

.ic { width: 1.25em; height: 1.25em; vertical-align: -0.2em; flex: none; }
.cmd-icon { font-size: 24px; }
.cmd-icon .ic { width: 24px; height: 24px; vertical-align: middle; }
.nav-icon .ic, .more-icon .ic { width: 24px; height: 24px; }
#toast { display: flex; align-items: center; gap: var(--tp-space-2); }
#toast .ic { width: 1.25em; height: 1.25em; }
.ic:not(:only-child):not(:last-child) { margin-inline-end: 0.35em; }

/* parent panel: the modal (panel-modal.js) and what is inside it: the box of a part (.mbox), the day (panel-today-modal.js), the category
   (panel-cat-modal.js, panel-cat-hours.js) and the app (panel-app-modal.js); served together with panel.css. A sheet from the bottom
   on a phone, in the middle from 720 px; no animation under prefers-reduced-motion */
body.modal-open { overflow: hidden; }
dialog.tp-modal { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: min(90vh, 90dvh); padding: 0; border: 0;
  border-radius: var(--tp-radius-lg) var(--tp-radius-lg) 0 0; background: var(--tp-color-surface); color: var(--tp-color-text); box-shadow: var(--tp-shadow-card); overflow: hidden; }
dialog.tp-modal[open] { display: flex; flex-direction: column; animation: modal-up .3s cubic-bezier(.2, .8, .2, 1); }
/* a neutral dark scrim in both themes (the backdrop does not take the tokens in older WebViews) */
dialog.tp-modal::backdrop { background: rgba(0, 0, 0, .5); }
dialog.tp-modal[open]::backdrop { animation: modal-fade .25s; }
dialog.tp-modal.closing { animation: modal-down .2s ease-in forwards; }
dialog.tp-modal.closing::backdrop { animation: modal-fade .2s reverse forwards; }
.tp-modal-box { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.tp-modal-grab { flex: 0 0 auto; width: 40px; height: 5px; border-radius: var(--tp-radius-pill); background: var(--tp-color-border-strong); margin: var(--tp-space-2) auto var(--tp-space-1); }
.tp-modal-head { display: flex; align-items: center; gap: var(--tp-space-3); padding: var(--tp-space-1) var(--tp-space-4) var(--tp-space-3); flex: 0 0 auto; }
.tp-modal-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--tp-font-size-2xl); overflow-wrap: anywhere; }
button.tp-modal-close { flex: 0 0 auto; width: var(--tp-size-touch-min); padding: 0; border-radius: 50%; font-size: var(--tp-font-size-2xl); line-height: 1; }
.tp-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--tp-space-4) calc(var(--tp-space-6) + env(safe-area-inset-bottom)); }
@media (min-width: 720px) {
  dialog.tp-modal { inset: 0; margin: auto; width: min(560px, calc(100% - 32px)); max-height: min(86vh, 86dvh); border-radius: var(--tp-radius-lg); }
  dialog.tp-modal[open] { animation: modal-pop .22s cubic-bezier(.2, .8, .2, 1); }
  dialog.tp-modal.closing { animation: modal-fade .18s reverse forwards; }
  .tp-modal-grab { display: none; }
  .tp-modal-head { padding-top: var(--tp-space-4); }
}
@keyframes modal-up { from { transform: translateY(100%); } }
@keyframes modal-down { to { transform: translateY(100%); } }
@keyframes modal-pop { from { transform: scale(.96); opacity: 0; } }
@keyframes modal-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  dialog.tp-modal[open], dialog.tp-modal.closing, dialog.tp-modal[open]::backdrop, dialog.tp-modal.closing::backdrop { animation: none; }
}
/* parts inside */
.mbox { background: var(--tp-color-surface-subtle); border-radius: var(--tp-radius-md); padding: var(--tp-space-3) var(--tp-space-4); margin-bottom: var(--tp-space-3); }
.mbox-title { font-weight: var(--tp-font-weight-extrabold); font-size: var(--tp-font-size-sm); margin-bottom: var(--tp-space-2); }
.mbox > .edit-part, .mbox > details.more:first-child { padding-top: 0; }
.mbox .row { margin-bottom: 0; }
.mbox .week-cat { padding: 0; }
.cat-summary { display: flex; align-items: center; gap: var(--tp-space-3); margin-bottom: var(--tp-space-3); }
.inherit .inherit-line { margin: 0 0 var(--tp-space-1); font-weight: var(--tp-font-weight-bold); overflow-wrap: anywhere; }
.inherit button.linklike { font-weight: var(--tp-font-weight-bold); }
.mini-apps { display: flex; flex-wrap: wrap; gap: var(--tp-space-2); margin-bottom: var(--tp-space-2); }
.mini-apps span { font-size: var(--tp-font-size-sm); font-weight: var(--tp-font-weight-semibold); background: var(--tp-color-surface); border: var(--tp-size-border-width) solid var(--tp-color-border-subtle);
  border-radius: var(--tp-radius-pill); padding: 2px var(--tp-space-3); }
details.own-hours > summary { font-weight: var(--tp-font-weight-bold); }
/* the day */
.today-plus { display: flex; flex-direction: column; align-items: center; line-height: var(--tp-line-height-snug); }
.today-after { font-size: var(--tp-font-size-xs); font-weight: var(--tp-font-weight-regular); opacity: .9; }
.row.extra button { padding-left: var(--tp-space-2); padding-right: var(--tp-space-2); }
.today-chooser { margin-top: var(--tp-space-3); }
.today-chooser p { margin: 0 0 var(--tp-space-2); }
.today-permanent { width: 100%; border-style: dashed; }
.cat-adj { display: flex; align-items: center; gap: var(--tp-space-2); padding: var(--tp-space-2) 0; border-bottom: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }
.cat-adj:last-child { border-bottom: 0; }
.cat-adj > span { flex: 1 1 auto; min-width: 0; font-weight: var(--tp-font-weight-bold); overflow-wrap: anywhere; }
.cat-adj > button { flex: 0 0 auto; width: 52px; padding: 0; background: var(--tp-color-surface); }
.cat-adj > b { flex: 0 0 auto; width: 48px; text-align: right; font-family: var(--tp-font-numeric); font-variant-numeric: tabular-nums; }
/* the app: the categories as radio buttons */
.pick-list { display: flex; flex-direction: column; }
button.pick { display: flex; align-items: center; gap: var(--tp-space-3); width: 100%; text-align: left; background: transparent; border: 0; border-radius: 0;
  border-bottom: var(--tp-size-border-width) solid var(--tp-color-border-subtle); padding: var(--tp-space-2) var(--tp-space-1); font-weight: var(--tp-font-weight-semibold); }
button.pick.sub { padding-left: var(--tp-space-6); }
.pick .radio { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--tp-color-border-strong); }
.pick.on .radio { border: 6px solid var(--tp-color-primary); }
.pick-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pick small { color: var(--tp-color-text-muted); font-weight: var(--tp-font-weight-semibold); }
.tp-modal textarea { width: 100%; font: inherit; padding: var(--tp-space-2); border-radius: var(--tp-radius-md); }

/* parent panel: navigation of the view of a child (panel-child-view.js, panel-view-anim.js, panel-cat-tab.js, panel-child-apps.js,
   panel-more-tab.js); served together with panel.css (scripts/build-panel-assets.mjs). Animations are off under prefers-reduced-motion */
/* the slide between levels: the old view is a "ghost" copy (position: fixed) that goes away while the new one comes in */
body.view-moving { overflow-x: hidden; }
#app.view-in-forward { position: relative; z-index: 2; background: var(--tp-color-bg); animation: view-in-right .26s cubic-bezier(.2, .8, .2, 1); }
#app.view-in-back { animation: view-in-left .26s cubic-bezier(.2, .8, .2, 1); }
.view-ghost { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.view-ghost.ghost-back { z-index: 3; }
.view-ghost-copy { position: absolute; background: var(--tp-color-bg); }
.ghost-forward .view-ghost-copy { animation: ghost-left .26s cubic-bezier(.2, .8, .2, 1) forwards; }
.ghost-back .view-ghost-copy { animation: ghost-right .26s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes view-in-right { from { transform: translateX(100%); } }
@keyframes view-in-left { from { transform: translateX(-28%); opacity: .6; } }
@keyframes ghost-left { to { transform: translateX(-28%); opacity: .6; } }
@keyframes ghost-right { to { transform: translateX(100%); } }
/* the drill-down link on the card of a child */
a.drill { display: flex; align-items: center; gap: var(--tp-space-3); margin-top: var(--tp-space-3); padding: var(--tp-space-3) var(--tp-space-4);
  border-radius: var(--tp-radius-md); background: var(--tp-color-surface-subtle); border: var(--tp-size-border-width) solid var(--tp-color-border-subtle);
  color: var(--tp-color-text); text-decoration: none; font-weight: var(--tp-font-weight-extrabold); }
.drill > span:first-child { flex: 1 1 auto; }
.drill-sub { display: block; font-weight: var(--tp-font-weight-semibold); color: var(--tp-color-text-muted); font-size: var(--tp-font-size-sm); }
.chev { color: var(--tp-color-text-muted); font-size: var(--tp-font-size-xl); flex: 0 0 auto; }
/* header of the view of a child and the pill with the time */
.child-top { display: flex; align-items: center; gap: var(--tp-space-2); padding: var(--tp-space-3) 0 var(--tp-space-2); }
.child-top h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--tp-font-size-2xl); overflow-wrap: anywhere; }
button.nav-back { flex: 0 0 auto; width: var(--tp-size-touch-min); padding: 0; border-radius: 50%; background: var(--tp-color-surface); font-size: var(--tp-font-size-xl); }
button.pill-time { flex: 0 0 auto; min-height: 36px; padding: 0 var(--tp-space-3); font-family: var(--tp-font-numeric); font-weight: var(--tp-font-weight-extrabold); }
.pill-ok { background: var(--tp-color-ok-bg); color: var(--tp-color-ok-fg); }
.pill-low { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); }
.pill-off { background: var(--tp-color-off-bg); color: var(--tp-color-off-fg); }
.pill-free { background: var(--tp-color-free-bg); color: var(--tp-color-free-fg); }
/* the tabs and the panes that slide */
.child-tabs-wrap { position: sticky; top: 0; z-index: 3; background: var(--tp-color-bg); padding: var(--tp-space-1) 0 var(--tp-space-2); }
.child-tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--tp-color-surface-variant); border-radius: var(--tp-radius-pill); padding: var(--tp-space-1); }
.child-tabs button { position: relative; z-index: 1; background: transparent; color: var(--tp-color-text-muted); min-height: 40px; padding: 0; font-size: var(--tp-font-size-sm); }
.child-tabs button[aria-selected="true"] { color: var(--tp-color-text); }
.child-thumb { position: absolute; top: var(--tp-space-1); bottom: var(--tp-space-1); left: var(--tp-space-1); width: calc((100% - 2 * var(--tp-space-1)) / 3);
  border-radius: var(--tp-radius-pill); background: var(--tp-color-surface); box-shadow: var(--tp-shadow-card); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.child-panes { overflow-x: clip; }
.child-track { display: flex; align-items: flex-start; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.child-pane { flex: 0 0 100%; min-width: 0; }
.child-track.settled > .child-pane:not(.on) { height: 0; overflow: hidden; visibility: hidden; }
.section-label { font-size: var(--tp-font-size-xs); font-weight: var(--tp-font-weight-extrabold); letter-spacing: .06em; text-transform: uppercase;
  color: var(--tp-color-text-muted); margin: var(--tp-space-4) var(--tp-space-1) var(--tp-space-2); }
/* the tree of categories */
button.cat-row { display: grid; grid-template-columns: 10px minmax(8em, 1fr) minmax(0, max-content); gap: 4px var(--tp-space-3); align-items: center; width: 100%; text-align: left;
  background: var(--tp-color-surface); border-radius: var(--tp-radius-md); padding: var(--tp-space-3) var(--tp-space-4); margin-bottom: var(--tp-space-2); font-weight: var(--tp-font-weight-regular); }
button.cat-row.depth-1 { margin-left: var(--tp-space-5); width: calc(100% - var(--tp-space-5)); }
.cat-dot { grid-row: span 2; width: 10px; height: 10px; border-radius: 50%; background: var(--tp-color-primary); }
.cat-dot.dot-1 { background: var(--tp-color-free); } .cat-dot.dot-2 { background: var(--tp-color-off); } .cat-dot.dot-3 { background: var(--tp-color-low); }
.cat-dot.dot-4 { background: var(--tp-color-ok); } .cat-dot.dot-5 { background: var(--tp-color-accent); }
.cat-name { font-weight: var(--tp-font-weight-extrabold); overflow-wrap: anywhere; }
.cat-value { grid-row: span 2; text-align: right; font-family: var(--tp-font-numeric); font-weight: var(--tp-font-weight-bold); font-variant-numeric: tabular-nums; }
.cat-meta { grid-column: 2; font-size: var(--tp-font-size-sm); color: var(--tp-color-text-muted); }
.cat-bar { grid-column: 2 / 4; height: var(--tp-size-progress-bar); background: var(--tp-color-track); border-radius: var(--tp-radius-pill); overflow: hidden; }
.cat-bar i { display: block; height: 100%; border-radius: var(--tp-radius-pill); background: var(--tp-color-ok); }
.cat-bar.low i { background: var(--tp-color-low); } .cat-bar.off i { background: var(--tp-color-off); } .cat-bar.free i { background: var(--tp-color-free); }
.pool-note { margin: calc(-1 * var(--tp-space-1)) var(--tp-space-1) var(--tp-space-2) var(--tp-space-5); font-size: var(--tp-font-size-xs); color: var(--tp-color-text-muted); }
/* the tab Aplikacje */
.apps-bar { position: sticky; top: 3.75rem; z-index: 2; background: var(--tp-color-bg); padding: 2px 0 var(--tp-space-2); }
.apps-bar .apps-search { margin: 0; border-radius: var(--tp-radius-pill); }
.app-chips { display: flex; gap: var(--tp-space-2); overflow-x: auto; padding: var(--tp-space-2) 0 2px; scrollbar-width: none; }
button.app-chip { flex: 0 0 auto; min-height: 32px; padding: 0 var(--tp-space-3); font-size: var(--tp-font-size-sm); background: var(--tp-color-surface); border-color: var(--tp-color-border); }
button.app-chip[aria-pressed="true"] { background: var(--tp-color-primary); color: var(--tp-color-on-primary); border-color: var(--tp-color-primary); }
.group-head { display: flex; justify-content: space-between; font-size: var(--tp-font-size-sm); font-weight: var(--tp-font-weight-extrabold); color: var(--tp-color-text-muted);
  margin: var(--tp-space-4) var(--tp-space-1) var(--tp-space-2); }
.app-list { background: var(--tp-color-surface); border-radius: var(--tp-radius-md); overflow: hidden; }
.app-item:not([hidden]) { border-bottom: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }
.app-list > .app-item:last-child { border-bottom: 0; }
button.app-line { border-radius: 0; padding: var(--tp-space-2) var(--tp-space-3); min-height: 52px; }
.app-text { flex: 1 1 auto; min-width: 0; }
.app-text b { display: block; font-weight: var(--tp-font-weight-bold); overflow-wrap: anywhere; }
.app-text small { color: var(--tp-color-text-muted); font-size: var(--tp-font-size-xs); }
.app-group.unassigned .app-list { box-shadow: inset 4px 0 0 var(--tp-color-low); }
.apps-unassigned-note { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); border-radius: var(--tp-radius-md); padding: var(--tp-space-2) var(--tp-space-3);
  font-size: var(--tp-font-size-sm); font-weight: var(--tp-font-weight-bold); margin: var(--tp-space-3) 0 0; }
/* the tab Pozostałe */
.more-list { background: var(--tp-color-surface); border-radius: var(--tp-radius-md); overflow: hidden; }
a.more-row { display: flex; align-items: center; gap: var(--tp-space-3); padding: var(--tp-space-3) var(--tp-space-4); color: var(--tp-color-text); text-decoration: none;
  border-bottom: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }
a.more-row:last-child { border-bottom: 0; }
.more-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: var(--tp-radius-sm); background: var(--tp-color-primary-container); display: grid; place-items: center; }
.more-text { flex: 1 1 auto; min-width: 0; }
.more-text b { display: block; }
.more-text small { color: var(--tp-color-text-muted); font-size: var(--tp-font-size-sm); }
@media (prefers-reduced-motion: reduce) {
  #app.view-in-forward, #app.view-in-back, .view-ghost-copy { animation: none; }
  .child-thumb, .child-track { transition: none; }
}

/* parent panel: "Czas i godziny" (panel-schedule.js, panel-schedule-editor.js) and "Aplikacje" (panel-child-apps.js);
   served together with panel.css (scripts/build-panel-assets.mjs) */
.week-cat { padding: var(--tp-space-2) 0; }
.week-cat + .week-cat { border-top: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }
.week-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tp-space-2); }
.week-head > button { flex: 0 0 auto; }
.week-lines { margin: var(--tp-space-1) 0 0; padding-left: var(--tp-space-4); font-size: var(--tp-font-size-sm); }
.week-lines li { margin: 2px 0; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; gap: var(--tp-space-3); margin: var(--tp-space-1) 0; }
.stepper > button { flex: 0 0 auto; width: var(--tp-size-touch-min); font-size: var(--tp-font-size-xl); padding: 0; }
.stepper-value { font-family: var(--tp-font-numeric); font-size: var(--tp-font-size-2xl); font-weight: var(--tp-font-weight-extrabold);
  min-width: 3.5em; text-align: center; font-variant-numeric: tabular-nums; }
.session-row label { display: flex; align-items: center; gap: var(--tp-space-1); font-size: var(--tp-font-size-sm); }
.session-row select { flex: 1 1 auto; min-width: 0; }
.notice { background: var(--tp-color-off-bg); color: var(--tp-color-off-fg); border-radius: var(--tp-radius-md); padding: var(--tp-space-2) var(--tp-space-3);
  font-size: var(--tp-font-size-sm); }
.week-editor .form-error { margin: var(--tp-space-2) 0; }
button.big-button { background: transparent; border: 0; padding: 0; min-height: 0; color: inherit; cursor: pointer;
  border-bottom: 3px dotted var(--tp-color-border-strong); border-radius: 0; line-height: 1.1; }
/* "Aplikacje" (panel-child-apps.js): a circle with the first letter in the colour of the kind; an <img> may replace the letter */
.apps-search { width: 100%; margin: var(--tp-space-1) 0; }
.app-group { margin-top: var(--tp-space-2); }
button.app-line, .kanal-app .app-line { display: flex; align-items: center; gap: var(--tp-space-2); width: 100%; text-align: left; background: transparent; color: inherit;
  border: 0; border-radius: var(--tp-radius-md); padding: var(--tp-space-1) var(--tp-space-1); min-height: var(--tp-size-touch-min);
  font-weight: var(--tp-font-weight-regular); }
.app-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem;
  border-radius: 50%; overflow: hidden; font-weight: var(--tp-font-weight-bold); background: var(--tp-color-surface-variant); color: var(--tp-color-text); }
.app-icon > img { width: 100%; height: 100%; object-fit: cover; }
.app-icon.kind-game, .app-icon.kind-launcher { background: var(--tp-color-free-bg); color: var(--tp-color-free-fg); }
.app-icon.kind-video { background: var(--tp-color-off-bg); color: var(--tp-color-off-fg); }
.app-icon.kind-social, .app-icon.kind-communication { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); }
.app-icon.kind-learning { background: var(--tp-color-ok-bg); color: var(--tp-color-ok-fg); }
.app-icon.kind-browser { background: var(--tp-color-primary-container); color: var(--tp-color-on-primary-container); }
.chip.app-platform { flex: 0 0 auto; font-size: var(--tp-font-size-xs); }
.small-note { font-size: var(--tp-font-size-xs); margin-top: var(--tp-space-3); }
/* folded groups of "Aplikacje" (panel-app-groups.js): quieter than a category, the count in the summary */
details.app-fold { margin-top: var(--tp-space-2); }
details.app-fold > summary { font-weight: var(--tp-font-weight-semibold); color: var(--tp-color-text-muted); }
details.app-fold .small-note { margin-top: 0; }
.chip.app-missing { flex: 0 0 auto; font-size: var(--tp-font-size-xs); background: var(--tp-color-surface-variant); color: var(--tp-color-text-muted); }
.kanal-list-note { display: inline; }
/* rules of the schedule editor (panel-schedule-editor.js) and the day chips (panel-day-chips.js) */
.rules { display: flex; flex-direction: column; gap: var(--tp-space-3); margin: var(--tp-space-2) 0; }
.rule-box { border: var(--tp-size-border-width) solid var(--tp-color-border-subtle); border-radius: var(--tp-radius-md); padding: var(--tp-space-3); }
.rule-title { font-weight: var(--tp-font-weight-bold); margin-bottom: var(--tp-space-2); }
.rule-body { margin-top: var(--tp-space-2); }
.day-chips { display: flex; gap: var(--tp-space-1); }
button.day-chip { flex: 1 1 0; min-width: 0; max-width: var(--tp-size-touch-min); aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 50%;
  background: var(--tp-color-surface-variant); border-color: transparent; font-size: var(--tp-font-size-sm); font-weight: var(--tp-font-weight-semibold); }
button.day-chip[aria-pressed="true"] { background: var(--tp-color-primary); color: var(--tp-color-on-primary); }
.quick-days { flex-wrap: wrap; gap: var(--tp-space-1); margin-top: var(--tp-space-2); }
.quick-days button[aria-pressed="true"] { background: var(--tp-color-primary-container); color: var(--tp-color-on-primary-container); }
button.linklike { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--tp-color-primary); text-decoration: underline; font: inherit; cursor: pointer; }
.rule-body .check { display: flex; margin: var(--tp-space-1) 0; }
.week-editor > .edit-title { margin-top: var(--tp-space-3); }
.mode-editor .range { padding: var(--tp-space-2) 0; }
.mode-editor .range + .range { border-top: var(--tp-size-border-width) solid var(--tp-color-border-subtle); }

/* parent panel: services and sites (panel-service-rows.js, panel-service-modal.js, panel-site-modal.js, panel-site-add.js); served together with panel.css */
.apps-search-row { display: flex; align-items: center; gap: var(--tp-space-2); }
.apps-search-row .apps-search { flex: 1 1 auto; min-width: 0; }
button.add-site-btn { flex: 0 0 auto; min-height: var(--tp-size-touch-min); background: var(--tp-color-surface); border-color: var(--tp-color-border); white-space: nowrap; }
button.apps-add-site { margin-top: var(--tp-space-2); }
.app-icon.kind-service { background: var(--tp-color-primary-container); color: var(--tp-color-on-primary-container); }
.app-icon.kind-site { background: var(--tp-color-surface-variant); color: var(--tp-color-text); }
.svc-part { display: block; padding: var(--tp-space-1) 0; }
.svc-part > span { display: block; font-weight: var(--tp-font-weight-bold); margin-bottom: var(--tp-space-1); }
.svc-part > select { width: 100%; max-width: 100%; }
.tp-modal-body > .pick-list { margin-bottom: var(--tp-space-3); }
.svc-warn { background: var(--tp-color-low-bg); color: var(--tp-color-low-fg); margin-bottom: var(--tp-space-3); font-weight: var(--tp-font-weight-semibold); }
.site-hint { margin-top: var(--tp-space-2); font-size: var(--tp-font-size-sm); color: var(--tp-color-text-muted); overflow-wrap: anywhere; }
.site-hint b { color: var(--tp-color-text); }
.mbox > select, .mbox > input { width: 100%; max-width: 100%; }
.mbox .app-chips.wrap { flex-wrap: wrap; overflow: visible; padding-bottom: var(--tp-space-2); }
.mbox .row.add-row { margin-top: 0; flex-wrap: nowrap; }
.mbox .row.add-row > input { flex: 1 1 8rem; }
.mbox .row.add-row > button { flex: 0 0 auto; }
button.primary.wide { width: 100%; }
.tp-modal-body > .notice { margin-top: var(--tp-space-3); }
.app-icon.has-icon { background: var(--tp-color-surface-variant); }
.app-icon.has-icon > img { width: 1.5rem; height: 1.5rem; object-fit: contain; }
