/* WHU Master Timetable viewer. No framework, no webfont, no network: the page
 * must look right when opened straight from disk over file://. */

:root {
  color-scheme: light;
  accent-color: #1f5fbf;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f0f2f5;
  --line: #dfe3e8;
  --line-soft: #eceff3;
  --text: #1c2430;
  --text-dim: #64707e;
  --accent: #1f5fbf;
  --accent-soft: #e8f0fc;
  --warn: #a15c00;
  --warn-soft: #fdf3e2;
  --ok: #1c7a4a;
  --ok-soft: #e7f5ed;
  --chip: #eef1f5;
  --mark: #ffe9a8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --heat-rgb: 47, 107, 209;
  --heat-fg: #ffffff;
  --head-h: 106px;
}

/* Dark palette: explicit choice wins, otherwise follow the OS. */
:root[data-theme="dark"] {
  color-scheme: dark;
  accent-color: #6aa6ff;
  --bg: #14171c;
  --panel: #1b1f26;
  --panel-2: #22272f;
  --line: #2e3540;
  --line-soft: #262c35;
  --text: #e6e9ee;
  --text-dim: #99a3b0;
  --accent: #6aa6ff;
  --accent-soft: #1d2a3d;
  --warn: #e0a458;
  --warn-soft: #2e2618;
  --ok: #5ec287;
  --ok-soft: #16281e;
  --chip: #262c35;
  --mark: #6b590f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --heat-rgb: 106, 166, 255;
  --heat-fg: #10151c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    accent-color: #6aa6ff;
    --bg: #14171c;
    --panel: #1b1f26;
    --panel-2: #22272f;
    --line: #2e3540;
    --line-soft: #262c35;
    --text: #e6e9ee;
    --text-dim: #99a3b0;
    --accent: #6aa6ff;
    --accent-soft: #1d2a3d;
    --warn: #e0a458;
    --warn-soft: #2e2618;
    --ok: #5ec287;
    --ok-soft: #16281e;
    --chip: #262c35;
    --mark: #6b590f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --heat-rgb: 106, 166, 255;
    --heat-fg: #10151c;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

body.drawer-open { overflow: hidden; }

a { color: var(--accent); }
code, pre, .mono { font-family: var(--mono); font-size: .92em; }
.dim { color: var(--text-dim); }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ header */

#top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 10px 16px;
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

#top .title { min-width: 0; display: flex; align-items: center; gap: 9px; }
#top .title img { flex: 0 0 auto; }
#top h1 { margin: 0; font-size: 17px; letter-spacing: .2px; }
#subtitle { margin: 1px 0 0; font-size: 12px; color: var(--text-dim); }
#subtitle a { color: inherit; }

.controls { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.ctl { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }

select, input[type="search"], input[type="number"], input[type="text"], input[type="date"] {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  max-width: 100%;
}
select:focus, input:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.pill {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--chip);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.pill.err { color: var(--warn); background: var(--warn-soft); }
.pill.ok { color: var(--ok); }

.iconbtn { padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
#btn-filters { display: none; }

.tabs { display: flex; gap: 4px; flex-basis: 100%; }
.tab {
  font: inherit;
  color: var(--text-dim);
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
}
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.on { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }

/* Narrow screens: let the tab strip scroll sideways instead of wrapping into
 * two cramped rows. */
@media (max-width: 620px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
}

/* -------------------------------------------------------------------- main */

#main {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
}

#main.wide { grid-template-columns: minmax(0, 1fr); }

#sidebar {
  position: sticky;
  top: calc(var(--head-h) + 12px);
  max-height: calc(100vh - var(--head-h) - 30px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

/* Slim, theme-aware scrollbars for the two big scroll areas. */
#sidebar, .tablewrap { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#sidebar::-webkit-scrollbar, .tablewrap::-webkit-scrollbar { width: 8px; height: 8px; }
#sidebar::-webkit-scrollbar-thumb, .tablewrap::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
#sidebar::-webkit-scrollbar-track, .tablewrap::-webkit-scrollbar-track { background: transparent; }

#filters-close { display: none; width: 100%; margin-bottom: 8px; }
.filters-backdrop { display: none; }

.filters .field { margin-bottom: 10px; }
.filters label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 3px; }
.filters select, .filters input { width: 100%; }
.filters .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.filters .row .field { margin-bottom: 0; }
.filters .row + .row, .filters .row { margin-bottom: 10px; }
.hint { margin: 4px 0 0; font-size: 11.5px; color: var(--text-dim); }
kbd {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 4px;
  background: var(--panel-2);
}

.group { border-top: 1px solid var(--line-soft); padding: 8px 0; margin-bottom: 4px; }
.group summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 2px 0 8px;
  user-select: none;
}
.group[open] summary { color: var(--text); }

.checks { display: grid; gap: 5px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.checks label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); margin: 0; }
.checks input { width: auto; }

.actions { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
button.ghost {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.actions button.ghost { flex: 1; }
button.ghost:hover { border-color: var(--accent); color: var(--accent); }
button.ghost:disabled { opacity: .45; cursor: default; }

/* ------------------------------------------------------------------- views */

.view { min-width: 0; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 12px;
}
.toolbar .count { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.toolbar .spacer { margin-left: auto; }
.toolbar label { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 9px;
}
.chip button {
  all: unset;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  opacity: .7;
}
.chip button:hover { opacity: 1; }
/* all:unset also unsets the global focus ring — restore it explicitly. */
.chip button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
button.chip.sib { font: inherit; font-size: 12px; border: 1px solid transparent; cursor: pointer; }
button.chip.sib:hover { border-color: var(--accent); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 10px; font-size: 13.5px; }
.card.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); }
.card.warn h3 { color: var(--warn); }
.card.ok h3 { color: var(--ok); }
.conflicts { margin: 0; padding-left: 20px; font-size: 13px; display: grid; gap: 5px; }

/* table */
table.grid { width: 100%; border-collapse: collapse; background: var(--panel); }
.tablewrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  max-height: calc(100vh - var(--head-h) - 130px);
}
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.list thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-2);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.list tbody tr { cursor: pointer; -webkit-tap-highlight-color: transparent; }
table.list tbody tr:hover { background: var(--accent-soft); }
table.list tbody tr:focus-visible { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
table.list td.name { font-weight: 600; }
table.list td.slots { color: var(--text-dim); font-size: 12.5px; white-space: nowrap; }
table.list td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.list th.pincol, table.list td.pincol { width: 30px; padding-right: 0; text-align: center; }
.fill { display: inline-block; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.fill.full { color: var(--warn); }
.fill.free { color: var(--ok); }
.tag { font-size: 11px; color: var(--text-dim); background: var(--chip); border-radius: 5px; padding: 1px 5px; margin-left: 6px; }
.none { color: var(--text-dim); }

button.pin {
  all: unset;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: var(--text-dim);
  padding: 2px;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
button.pin:hover { color: var(--accent); background: var(--accent-soft); }
button.pin:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button.pin.on { color: #d9950a; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px; flex-wrap: wrap; }
.pager button { font: inherit; }

/* weekly grid */
.timetable { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.timetable th {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  padding: 4px;
  text-align: center;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}
.timetable th.sec { width: 52px; }
.timetable td {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--panel);
  padding: 3px;
  vertical-align: top;
  height: 54px;
}
.timetable td.seccell {
  background: none;
  border: none;
  text-align: center;
  color: var(--text-dim);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.timetable td.seccell b { display: block; font-size: 12.5px; }
.timetable td.seccell .sectime { display: block; font-size: 10px; opacity: .75; }
.cellitem {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text);
  background: var(--accent-soft);
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  padding: 2px 5px;
  margin-bottom: 3px;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.cellitem:hover { filter: brightness(.97); }
.cellitem b { display: block; font-weight: 600; }
.cellitem span { display: block; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cellitem.more {
  background: var(--chip);
  border-left-color: var(--line);
  color: var(--text-dim);
  cursor: pointer;
  text-align: center;
}
.cellitem.more:hover { color: var(--accent); }

/* per-course colors in the grid, so one course is traceable across cells */
.cellitem.k0 { border-left-color: #3b82f6; }
.cellitem.k1 { border-left-color: #10b981; }
.cellitem.k2 { border-left-color: #f59e0b; }
.cellitem.k3 { border-left-color: #ef4444; }
.cellitem.k4 { border-left-color: #8b5cf6; }
.cellitem.k5 { border-left-color: #ec4899; }
.cellitem.k6 { border-left-color: #14b8a6; }
.cellitem.k7 { border-left-color: #84cc16; }
.clash { color: var(--warn); font-weight: 600; font-size: 11px; }

/* lookup */
.lookupbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.lookupbar .field { flex: 1 1 260px; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  font: inherit;
  background: var(--panel);
  border: 0;
  padding: 6px 14px;
  cursor: pointer;
  color: var(--text-dim);
}
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.histprog {
  position: relative;
  overflow: hidden;
  margin: 4px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background:
    linear-gradient(to right, var(--accent-soft) var(--prog, 0%), transparent var(--prog, 0%)),
    var(--panel-2);
}
table.list.hist tbody tr:hover { background: var(--accent-soft); }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: 13px; }
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; word-break: break-word; }

button.mini {
  font: inherit;
  font-size: 11.5px;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  cursor: pointer;
  vertical-align: middle;
}
button.mini:hover { color: var(--accent); border-color: var(--accent); }
button.mini:disabled { opacity: .45; cursor: default; }

.bars { display: grid; gap: 5px; }
.bar {
  display: grid;
  grid-template-columns: minmax(96px, 30%) 1fr max-content;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
}
button.bar.clickable {
  font: inherit;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
  cursor: pointer;
  color: var(--text);
}
button.bar.clickable:hover { background: var(--accent-soft); }
.bar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { background: var(--panel-2); border-radius: 4px; height: 12px; overflow: hidden; }
.bar .fillbar { background: var(--accent); height: 100%; border-radius: 4px; }
.bar .val { color: var(--text-dim); font-variant-numeric: tabular-nums; }

.heat { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.heat th { font-size: 11px; color: var(--text-dim); font-weight: 500; padding: 2px; text-align: center; }
.heat td {
  height: 26px;
  border-radius: 4px;
  background: var(--panel-2);
  text-align: center;
  font-size: 10.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.heat td[data-day] { cursor: pointer; }
.heat td[data-day]:hover { outline: 2px solid var(--accent); outline-offset: -1px; }
.heat td[data-day]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; }
.stat { background: var(--panel-2); border-radius: 8px; padding: 9px 11px; }
.stat .n { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 11.5px; color: var(--text-dim); }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }

.icsrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.icsrow label { font-size: 12.5px; color: var(--text-dim); }

/* ------------------------------------------------------------------ drawer */

.drawer-wrap {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 14, 20, .34);
  display: flex;
  justify-content: flex-end;
  animation: drawer-fade .16s ease-out;
}
.drawer {
  width: min(560px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px 18px 40px;
  animation: drawer-slide .2s cubic-bezier(.2, .8, .3, 1);
}
@keyframes drawer-fade { from { opacity: 0; } }
@keyframes drawer-slide { from { transform: translateX(28px); opacity: .5; } }
.drawer header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.drawer h2 { margin: 0; font-size: 17px; line-height: 1.35; }
.drawerbtns { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
.drawer .close {
  font: inherit;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 9px;
  cursor: pointer;
  color: var(--text-dim);
  white-space: nowrap;
}
.drawer .close:hover { color: var(--accent); border-color: var(--accent); }
.drawer .close.pinned { color: #d9950a; border-color: #d9950a; }
.drawnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.drawer table.slots { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.drawer table.slots th, .drawer table.slots td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.drawer table.slots th { color: var(--text-dim); font-weight: 500; }
.drawer section { margin-top: 16px; }
.drawer h3 { margin: 0 0 8px; font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
.note { font-size: 12px; color: var(--text-dim); background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; }

/* -------------------------------------------------------------------- misc */

#toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  animation: toast-in .18s ease-out;
}
@keyframes toast-in { from { transform: translate(-50%, 8px); opacity: 0; } }

#foot {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 10px 18px 22px;
  font-size: 12px;
  color: var(--text-dim);
}

.fatal {
  max-width: 640px;
  margin: 40px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.fatal h2 { margin: 0 0 8px; font-size: 17px; }
.fatal pre {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  overflow: auto;
}

.empty {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  color: var(--text-dim);
}
.empty b { color: var(--text); }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 940px) {
  #btn-filters { display: inline-block; }
  #main { grid-template-columns: minmax(0, 1fr); }
  #sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(320px, 88vw);
    max-height: none;
    z-index: 45;
    border-radius: 0;
    border-left: 0; border-top: 0; border-bottom: 0;
    transform: translateX(-105%);
    transition: transform .18s ease;
    box-shadow: none;
  }
  body.filters-open #sidebar {
    transform: none;
    box-shadow: var(--shadow);
  }
  #filters-close { display: block; }
  .filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 44;
    background: rgba(10, 14, 20, .34);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }
  body.filters-open .filters-backdrop { opacity: 1; pointer-events: auto; }
  #subtitle { display: none; }
  .controls { gap: 6px; }
}

@media (max-width: 720px) {
  /* Drop the two least critical columns; let slot text wrap. */
  table.list thead th:nth-child(3),
  table.list tbody td:nth-child(3),
  table.list thead th:nth-child(6),
  table.list tbody td:nth-child(6) { display: none; }
  table.list td.slots { white-space: normal; }
  table.list th, table.list td { padding: 6px 6px; }
  .tablewrap { max-height: none; }
  .toolbar { gap: 6px; }
  .timetable { border-spacing: 2px; }
  .timetable td { height: 44px; padding: 2px; }
  .cellitem { font-size: 10.5px; padding: 1px 3px; }
  .drawer { width: 100%; }
}

/* ------------------------------------------------------------------- print */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  #top, #sidebar, .filters-backdrop, .toolbar .spacer, .pager, #toast, #foot,
  .actions, button.pin, .cellitem.more, #filters-close, #btn-theme, #btn-filters { display: none !important; }
  body, html { background: #fff; color: #000; }
  #main { display: block; padding: 0; }
  .tablewrap { max-height: none; overflow: visible; border: 0; }
  .card, .view { break-inside: avoid; }
  table.list tbody tr:hover { background: none; }
}
