/* 英语学习工作台 - light theme */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --border: #e3e6eb;
  --text: #1f2733;
  --text-2: #5b6676;
  --text-3: #8a94a6;
  --accent: #3b6fd4;
  --accent-soft: #e8effc;
  --highlight: #ffe58a;
  --highlight-strong: #ffd233;
  --shadow: 0 1px 3px rgba(31, 39, 51, .08), 0 4px 14px rgba(31, 39, 51, .05);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* The hidden attribute must always win: the UA rule [hidden]{display:none} is
   overridden by any author `display` rule on the same element, which made the
   empty-state placeholder stay visible next to the reader (and both aside tab
   bodies show at once). Force it back. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- top bar ---------- */
.topbar {
  height: 60px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { font-size: 26px; }
.brand-text h1 { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: .8px; text-transform: uppercase; }

.level-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.level-tab {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.level-tab:hover { border-color: var(--accent); color: var(--accent); }
.level-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.level-tab.disabled { opacity: .45; cursor: not-allowed; }
.level-tab.disabled:hover { border-color: var(--border); color: var(--text-2); }
.level-tab .dot { font-size: 10px; }

/* ---------- top nav: series tabs (FLR / Oxford / ...) ---------- */
.series-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.series-tab {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.series-tab:hover { border-color: var(--accent); color: var(--accent); }
.series-tab.active {
  background: var(--text-1);
  border-color: var(--text-1);
  color: #fff;
}
@media (max-width: 720px) {
  .series-tab { padding: 6px 10px; font-size: 12px; }
}

/* ---------- top nav: word bank entry ---------- */
.topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-bank {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #f0d98a;
  background: #fff7db;
  color: #8a6d1a;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  flex-shrink: 0;
}
.nav-bank:hover { border-color: var(--highlight-strong); background: #fff2c4; }

/* ---------- layout ---------- */
.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

.sidebar {
  width: 264px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-head span { font-size: 12px; color: var(--text-3); }

.search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  background: var(--bg);
}
.search:focus { border-color: var(--accent); background: #fff; }

.book-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}

.book-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .12s;
}
.book-item:hover { background: var(--accent-soft); }
.book-item.active { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }

.book-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 34px;
  text-align: center;
  padding: 2px 5px;
  flex-shrink: 0;
}
.book-item.active .book-num { background: var(--accent); color: #fff; border-color: var(--accent); }
.book-name { font-size: 13.5px; color: var(--text); line-height: 1.3; }
.book-meta { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ---------- main ---------- */
.main { flex: 1; min-width: 0; overflow: hidden; display: flex; }

.reader {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px 22px 14px;
  gap: 12px;
  overflow-y: auto;
}

.reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.book-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.book-title h2 { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-id { font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; }

.page-badge {
  font-size: 13px;
  color: var(--text-2);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}
.page-badge #pageNow { font-weight: 700; color: var(--accent); }

/* ---------- page stage ---------- */
.page-stage {
  flex: 1;
  min-height: 240px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-wrap {
  position: relative;
  line-height: 0;
  flex-shrink: 0;
}
.page-wrap img {
  display: block;
  border-radius: 4px;
}

/* small hint shown only when no book is open (rare: first paint / load error) */
.stage-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 14px;
  pointer-events: none;
}
.stage-hint-icon { font-size: 46px; }

.hl-layer { position: absolute; inset: 0; pointer-events: none; }

.hl-box {
  position: absolute;
  background: var(--highlight);
  border-radius: 4px;
  opacity: 0;
  transform: scale(1);
  transition: opacity .12s ease;
  box-shadow: 0 0 0 1px rgba(255, 210, 51, .35);
}
.hl-box.on {
  opacity: .85;
  animation: hlPulse 1.2s ease-in-out infinite alternate;
}
@keyframes hlPulse {
  from { background: var(--highlight); }
  to { background: var(--highlight-strong); }
}

.page-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 64px;
  border: none;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 24px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}
.page-nav:hover { background: #fff; color: var(--accent); border-color: var(--accent); }
.page-nav.prev { left: 10px; }
.page-nav.next { right: 10px; }

/* ---------- sentence banner ---------- */
.sentence-banner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.sentence-idx {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.sentence-text {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.4;
}
.sentence-text.empty { color: var(--text-3); font-weight: 400; font-size: 15px; }

/* ---------- progress ---------- */
.progress-block { flex-shrink: 0; }
.time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.seekbar {
  flex: 1;
  height: 8px;
  background: #e8ebf0;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.seek-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 999px;
  width: 0;
}
.seek-marks { position: absolute; inset: 0; }
.seek-mark {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 12px;
  background: rgba(59, 111, 212, .35);
  border-radius: 1px;
}

/* ---------- controls ---------- */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.ctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.ctl:hover { border-color: var(--accent); color: var(--accent); }
.ctl.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 8px 22px;
}
.ctl.primary:hover { background: #2f5db8; }
.ctl.select { padding: 0 6px 0 12px; }
.ctl select {
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  padding: 8px 4px;
  outline: none;
  cursor: pointer;
}
.ctl.toggle { gap: 8px; }
.ctl.toggle input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.ctl.toggle.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- right aside: full text & word bank ---------- */
.text-aside {
  width: 336px;
  flex-shrink: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.aside-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.aside-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 13px 8px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s;
  font-family: inherit;
}
.aside-tab:hover { color: var(--accent); }
.aside-tab.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.bank-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
}
.aside-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.aside-hint {
  font-size: 11.5px;
  color: var(--text-3);
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* ---------- sentence list (full text with translations) ---------- */
.sentence-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sent-item {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s;
  line-height: 1.5;
}
.sent-item:hover { background: var(--accent-soft); }
.sent-item.current {
  background: #fff7db;
  box-shadow: inset 3px 0 0 var(--highlight-strong);
}
.sent-item.played { color: var(--text-3); }
.sent-en {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}
.sent-item.current .sent-en { font-weight: 600; }
.sent-num {
  font-size: 11px;
  color: var(--text-3);
  min-width: 18px;
  text-align: right;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  user-select: none;
}
.sent-item.current .sent-num { color: #b8860b; font-weight: 700; }
.sent-item.no-timing { opacity: .55; }
.sent-words { flex: 1; }
.sent-zh {
  font-size: 12.5px;
  color: var(--text-2);
  padding-left: 26px;
  margin-top: 1px;
}
.sent-item.current .sent-zh { color: #8a6d1a; }

/* clickable word */
.w {
  cursor: pointer;
  border-radius: 3px;
  padding: 0 1px;
  margin: 0 -1px;
  transition: background .1s;
  border-bottom: 1px dotted transparent;
}
.w:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.w.in-bank {
  background: #fff3c4;
  border-bottom-color: #d4a900;
}
.w.in-bank:hover { background: #ffe98a; }

/* ---------- word bank ---------- */
.bank-actions {
  display: flex;
  gap: 8px;
  padding: 9px 12px 3px;
  flex-shrink: 0;
}
.bank-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.bank-btn:hover { border-color: var(--accent); color: var(--accent); }
.bank-btn.danger:hover { border-color: #d64545; color: #d64545; }
.bank-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bank-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  transition: all .15s;
  background: #fdfdfb;
}
.bank-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.bank-word {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.bank-meaning {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 2px;
}
.bank-source {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
}
.bank-source .src-book { color: var(--accent); font-weight: 600; flex-shrink: 0; }
.bank-source .src-sent {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bank-del {
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.bank-del:hover { color: #d64545; background: #fdeaea; }
.bank-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 14px;
  padding: 30px 20px;
  text-align: center;
}
.bank-empty span { font-size: 12px; }

/* ---------- word popover ---------- */
.word-pop {
  position: fixed;
  z-index: 100;
  width: 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(31, 39, 51, .16);
  padding: 12px 14px;
  animation: wpIn .12s ease;
}
@keyframes wpIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.wp-word {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.wp-speak {
  border: none;
  background: var(--accent-soft);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
}
.wp-speak:hover { background: #d5e3fb; }
.wp-meaning {
  font-size: 13.5px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.5;
}
.wp-actions { margin-top: 10px; }
.wp-add {
  width: 100%;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
.wp-add:hover { background: #2f5db8; }
.wp-add.in-bank { background: #fff3c4; color: #8a6d1a; }
.wp-add.in-bank:hover { background: #ffe98a; }

/* ---------- full-screen word bank page ---------- */
.bank-page {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: bpIn .18s ease;
}
@keyframes bpIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.bp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.bp-title { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.bp-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
}
.bp-head-actions { display: flex; align-items: center; gap: 8px; }
.bp-close {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 15px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.bp-close:hover { border-color: #d64545; color: #d64545; }

.bp-filters {
  padding: 12px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.bp-filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bp-label { font-size: 12px; color: var(--text-3); margin-left: 8px; }
.bp-label:first-child { margin-left: 0; }
.bp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-chip {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.bp-chip:hover { border-color: var(--accent); color: var(--accent); }
.bp-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.bp-select, .bp-search {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.bp-select:focus, .bp-search:focus { border-color: var(--accent); background: #fff; }
.bp-search { width: 210px; }

.bp-body { flex: 1; overflow-y: auto; padding: 18px 24px 30px; }
.bp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.bp-section { margin-bottom: 24px; }
.bp-section:last-child { margin-bottom: 0; }
.bp-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  margin: 4px 2px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bp-section-count { font-size: 11px; font-weight: 600; color: var(--text-3); }

.bp-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow);
}
.bp-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.bp-card-head { display: flex; align-items: center; gap: 8px; }
.bp-word { font-size: 16px; font-weight: 700; color: var(--text); }
.bp-level {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
}
.bp-speak, .bp-del {
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all .15s;
  font-family: inherit;
}
.bp-speak { margin-left: auto; }
.bp-speak:hover { color: var(--accent); background: var(--accent-soft); }
.bp-del:hover { color: #d64545; background: #fdeaea; }
.bp-meaning { font-size: 13px; color: var(--text-2); margin-top: 5px; line-height: 1.5; }
.bp-source {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-source .src-book { color: var(--accent); font-weight: 600; }
.bp-empty {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 15px;
  text-align: center;
}
.bp-empty span { font-size: 12.5px; }

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3d8e0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #bcc3cf; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- banner translation ---------- */
.banner-texts { min-width: 0; flex: 1; }
.sentence-zh {
  font-size: 13.5px;
  color: var(--text-2);
  margin-top: 2px;
  line-height: 1.4;
}

/* ---------- mobile toggles (hidden on desktop) ---------- */
.mobile-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-2);
  flex-shrink: 0;
}
.mobile-toggle:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 1180px) {
  .text-aside { width: 280px; }
}
@media (max-width: 980px) {
  .text-aside { width: 240px; }
  .sent-zh { font-size: 12px; }
}
@media (max-width: 860px) {
  .mobile-toggle { display: block; }
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .topbar-right { flex: 1; justify-content: space-between; }
  .nav-bank-text { display: none; }
  .level-tab .dot { display: none; }
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  body.show-sidebar .sidebar { display: flex; }
  .text-aside {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 42vh;
    display: none;
  }
  body.show-aside .text-aside { display: flex; }
  .page-stage { min-height: 200px; }
  .brand-text h1 { font-size: 15px; }
  .brand-sub { display: none; }
  .level-tab { padding: 6px 10px; font-size: 12px; }
  /* full-screen bank page on small screens */
  .bp-head { padding: 12px 16px; }
  .bp-filters { padding: 10px 16px; }
  .bp-body { padding: 14px 16px 24px; }
  .bp-grid { grid-template-columns: 1fr; }
  .bp-search { width: 100%; }
  .bp-label { margin-left: 0; }
}
