/* Timeline Explore — additive UI only. Every selector is namespaced .tlx-* except the
   narrowly scoped popup-card layout tweaks at the bottom (layout only, never content). */

.tlx-root {
  --tlx-bg: rgba(8, 15, 60, 0.96);
  --tlx-bg2: rgba(255, 255, 255, 0.05);
  --tlx-line: rgba(255, 255, 255, 0.13);
  --tlx-text: #f3f5fb;
  --tlx-muted: rgba(255, 255, 255, 0.62);
  --tlx-gold: #f0cb41;
  --tlx-blue: #3579f7;
  --tlx-focus: #ffd75e;
  font-family: var(--font, 'Noto Sans SC', system-ui, sans-serif);
  color: var(--tlx-text);
}
.tlx-root [hidden], .tlx-nodebar[hidden], .tlx-nodebar [hidden] { display: none !important; }
.tlx-root *, .tlx-nodebar * { box-sizing: border-box; }
.tlx-root button, .tlx-nodebar button, .tlx-root select, .tlx-nodebar select, .tlx-root input, .tlx-root textarea {
  font: inherit;
  color: inherit;
}
.tlx-root :focus-visible, .tlx-nodebar :focus-visible {
  outline: 2px solid var(--tlx-focus, #ffd75e);
  outline-offset: 2px;
}
.tlx-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ── Dock (bottom-left; existing zoom / scroll pads live bottom-right) ── */
.tlx-dock {
  position: fixed;
  left: 16px;
  bottom: 24px;
  z-index: 8550;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}
.tlx-dock > * { pointer-events: auto; }
.tlx-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
}
.tlx-stack:empty { display: none; }
.tlx-stack > * { pointer-events: auto; }
.tlx-toolbar {
  display: flex;
  gap: 6px;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}
.tlx-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(240, 203, 65, 0.35);
  background: rgba(10, 20, 70, 0.92);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.tlx-tool:hover { background: rgba(30, 50, 130, 0.95); border-color: rgba(240, 203, 65, 0.7); }
.tlx-tool[aria-expanded='true'] { border-color: var(--tlx-gold); color: var(--tlx-gold); }
.tlx-tool-ico { font-size: 15px; line-height: 1; }

/* ── Cards (route / node / banner) ── */
.tlx-card {
  width: 100%;
  background: var(--tlx-bg);
  border: 1px solid var(--tlx-line);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  line-height: 1.5;
  backdrop-filter: blur(10px);
  max-height: 46vh;
  overflow-y: auto;
  animation: tlxIn 0.18s ease-out both;
}
@keyframes tlxIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tlx-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tlx-card-title { font-weight: 800; font-size: 14px; color: #fff; }
.tlx-banner { border-color: rgba(240, 203, 65, 0.45); }
.tlx-tips { margin: 0 0 8px; padding-left: 18px; color: rgba(255, 255, 255, 0.85); }
.tlx-tips li { margin: 2px 0; }

/* ── Buttons ── */
.tlx-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--tlx-line, rgba(255,255,255,0.13));
  background: rgba(255, 255, 255, 0.06);
  color: #f3f5fb;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.tlx-btn:hover:not([disabled]) { background: rgba(255, 255, 255, 0.12); }
.tlx-btn[disabled] { opacity: 0.4; cursor: default; }
.tlx-btn small { font-weight: 500; opacity: 0.75; margin-left: 2px; }
.tlx-btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.tlx-btn-primary { background: #2a62d9; border-color: #4d86ff; color: #fff; }
.tlx-btn-primary:hover:not([disabled]) { background: #3572ee; }
.tlx-btn-danger { border-color: rgba(255, 110, 110, 0.5); color: #ffb3b3; }
.tlx-block { width: 100%; justify-content: center; margin-bottom: 8px; }
.tlx-x {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.tlx-x:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tlx-linkbtn {
  border: 0;
  background: none;
  padding: 2px 0;
  color: #8fc1ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-size: 13px;
}
.tlx-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tlx-muted { color: var(--tlx-muted, rgba(255,255,255,0.62)); font-size: 13px; }
.tlx-p { margin: 4px 0 8px; color: rgba(255, 255, 255, 0.85); font-size: 13px; line-height: 1.55; }

/* ── Source tags ── */
.tlx-src {
  display: inline-block;
  vertical-align: 1px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.02em;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.tlx-src-canonical { color: #9fe6a0; }
.tlx-src-computed { color: #8fc1ff; }
.tlx-src-editorial { color: #f0cb41; }
.tlx-src-glossary { color: #d7a8ff; }
.tlx-src-private { color: #ffb38a; }
.tlx-year { color: rgba(255, 255, 255, 0.75); font-weight: 500; font-size: 13px; white-space: nowrap; }

/* ── Node action bar (inside the popup card, or the floating node card) ── */
.tlx-nodebar {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 12, 50, 0.96);
  padding: 8px 12px 10px;
  font-family: var(--font, 'Noto Sans SC', system-ui, sans-serif);
  color: #f3f5fb;
  font-size: 13px;
}
.tlx-nodebar-card { border-top: 0; background: transparent; padding: 4px 0 0; }
.tlx-actrow { display: flex; flex-wrap: wrap; gap: 6px; }
.tlx-act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.tlx-act:hover { background: rgba(255, 255, 255, 0.12); }
.tlx-act[aria-pressed='true'] { border-color: rgba(240, 203, 65, 0.7); color: #f0cb41; background: rgba(240, 203, 65, 0.1); }
.tlx-act-ico { font-size: 13px; line-height: 1; }
.tlx-act-disc { margin-left: auto; }
.tlx-route-mini {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(42, 98, 217, 0.18);
  font-size: 13px;
}
.tlx-disc { margin-top: 8px; max-height: 34vh; overflow-y: auto; padding-right: 2px; }
.tlx-disc-year { margin-bottom: 6px; }
.tlx-disc-sec { margin: 8px 0; }
.tlx-disc-title { font-size: 13px; font-weight: 800; color: rgba(255, 255, 255, 0.6); margin-bottom: 4px; letter-spacing: 0.04em; }
.tlx-disc-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.tlx-disc-nav .tlx-btn { flex-direction: column; align-items: flex-start; gap: 0; }
.tlx-disc-foot { margin-top: 8px; }
.tlx-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tlx-chip {
  border: 1px solid rgba(143, 193, 255, 0.35);
  background: rgba(53, 121, 247, 0.12);
  color: #d6e6ff;
  border-radius: 999px;
  padding: 3px 10px;
  min-height: 28px;
  font-size: 13px;
  cursor: pointer;
}
.tlx-chip small { margin-left: 4px; opacity: 0.7; }
.tlx-chip:hover { background: rgba(53, 121, 247, 0.28); }
.tlx-gap-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tlx-select, .tlx-input, .tlx-textarea {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  padding: 6px 8px;
  font-size: 13px;
  max-width: 100%;
}
.tlx-select option { background: #0a1446; color: #fff; }
.tlx-input { flex: 1 1 160px; min-width: 0; min-height: 34px; }
.tlx-gap b { color: #f0cb41; font-size: 15px; }
.tlx-links { margin: 0; padding-left: 18px; }
.tlx-a { color: #8fc1ff; }

/* ── Route card ── */
.tlx-routecard { border-color: rgba(77, 134, 255, 0.55); }
.tlx-progress { display: flex; gap: 4px; list-style: none; margin: 4px 0 8px; padding: 0; flex-wrap: wrap; }
.tlx-progress-dot { flex: 1 1 14px; max-width: 48px; }
.tlx-progress-dot button {
  display: block;
  width: 100%;
  height: 8px;
  min-height: 0;
  padding: 0;
  border-radius: 4px;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}
.tlx-progress-dot.is-done button { background: rgba(66, 200, 120, 0.8); }
.tlx-progress-dot.is-current button { background: #f0cb41; box-shadow: 0 0 0 2px rgba(240, 203, 65, 0.3); }
.tlx-route-node { font-weight: 800; font-size: 15px; margin: 2px 0; }
.tlx-route-span { font-size: 13px; color: rgba(255, 255, 255, 0.85); margin: 2px 0; }
.tlx-route-span b { color: #f0cb41; }
.tlx-route-q { margin: 6px 0; padding: 6px 8px; border-left: 3px solid #f0cb41; background: rgba(240, 203, 65, 0.08); border-radius: 0 6px 6px 0; }
.tlx-q-mark { color: #f0cb41; font-weight: 800; margin-right: 4px; }
.tlx-route-nav { margin-top: 6px; }
.tlx-route-done { font-weight: 700; color: #9fe6a0; margin: 6px 0; }

/* ── Drawer ── */
.tlx-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(380px, 100vw);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  background: rgba(6, 11, 48, 0.985);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.55);
  animation: tlxDrawerIn 0.2s ease-out both;
}
@keyframes tlxDrawerIn { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.tlx-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.tlx-drawer-title { margin: 0; font-size: 17px; font-weight: 900; color: #f0cb41; }
.tlx-drawer-body { flex: 1; overflow-y: auto; padding: 8px 14px 24px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.tlx-sync { font-size: 13px; color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 6px 8px; margin: 4px 0 10px; }
.tlx-sync-ok { color: #9fe6a0; }
.tlx-sec { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.tlx-sec-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; font-weight: 800; color: #fff; }
.tlx-sec-title:focus { outline: none; }
.tlx-sec-title:focus-visible { outline: 2px solid #ffd75e; }
.tlx-count { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.08); border-radius: 999px; padding: 0 7px; }
.tlx-list { list-style: none; margin: 0; padding: 0; }
.tlx-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.tlx-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 6px 6px;
  border-radius: 8px;
  cursor: pointer;
}
button.tlx-row-main:hover { background: rgba(255, 255, 255, 0.07); }
.tlx-row-static { cursor: default; }
.tlx-row-label { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tlx-row-main small { color: rgba(255, 255, 255, 0.55); font-size: 13px; }
.tlx-bar { display: block; width: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); margin-top: 4px; overflow: hidden; }
.tlx-bar > span { display: block; height: 100%; background: rgba(66, 200, 120, 0.85); }
.tlx-today { background: rgba(240, 203, 65, 0.07); border: 1px solid rgba(240, 203, 65, 0.3); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.tlx-today-title { font-weight: 800; font-size: 14px; margin: 2px 0; }
.tlx-listbox { border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 6px 8px; margin-top: 8px; }
.tlx-listbox summary { cursor: pointer; padding: 2px 0; }
.tlx-sublist { margin: 4px 0; }
.tlx-drawer-foot { padding-top: 12px; font-size: 13px; }

/* ── Dialogs ── */
.tlx-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  background: rgba(0, 0, 20, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tlx-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, rgba(14, 22, 72, 0.99) 0%, rgba(10, 17, 58, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.6);
  animation: tlxIn 0.16s ease-out both;
}
.tlx-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; }
.tlx-dialog-title { margin: 0; font-size: 16px; font-weight: 800; color: #fff; }
.tlx-dialog-body { padding: 0 14px 8px; overflow-y: auto; }
.tlx-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 14px 14px; }
.tlx-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.tlx-textarea { width: 100%; min-height: 180px; resize: vertical; line-height: 1.6; font-size: 14px; }
.tlx-note-meta { font-size: 13px; color: rgba(255, 255, 255, 0.7); margin-bottom: 6px; }
.tlx-note-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.tlx-note-status { font-size: 13px; color: #ffd98a; }
.tlx-checklist { list-style: none; padding: 0; margin: 0 0 10px; }
.tlx-checklist li { padding: 4px 0; }
.tlx-checklist label { cursor: pointer; }
.tlx-checklist small { color: rgba(255, 255, 255, 0.55); }
.tlx-conflict { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tlx-conflict-box { border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; padding: 8px; min-width: 0; }
.tlx-conflict-text { white-space: pre-wrap; word-break: break-word; font-size: 13px; max-height: 32vh; overflow-y: auto; }

/* ── Toasts ── */
.tlx-toasts {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 1000003;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}
.tlx-toast {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 10px;
  background: rgba(10, 20, 70, 0.97);
  border: 1px solid rgba(240, 203, 65, 0.4);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  animation: tlxIn 0.16s ease-out both;
}
.tlx-toast-text { flex: 1 1 180px; }

/* ── Rings on bars the user has viewed / read (outline only; bar content untouched) ── */
.bar.tlx-viewed { outline: 1px dashed rgba(240, 203, 65, 0.55); outline-offset: 3px; }
.bar.tlx-read { outline: 2px solid rgba(110, 220, 140, 0.7); outline-offset: 3px; }

/* ── Popup card layout when our action bar is present (layout only) ── */
@media (min-width: 1101px) {
  #patriarchModal .modal-card.tlx-has-bar .modal-body { max-height: calc(100vh - 260px); }
  #patriarchModal .modal-card.tlx-has-bar.tlx-disc-open .modal-body { max-height: calc(100vh - 260px - 34vh); min-height: 120px; }
}
@media (max-width: 1100px) {
  .tlx-disc { max-height: 30vh; }
}

/* ── Phones ── */
@media (max-width: 700px) {
  .tlx-dock { left: 12px; bottom: 24px; width: calc(100vw - 24px); }
  .tlx-stack { width: 100%; }
  .tlx-card { max-height: 40vh; }
  /* keep the stacked cards above the (enlarged) mobile zoom buttons on the right */
  .tlx-stack { margin-bottom: 40px; }
  .tlx-tool { height: 44px; padding: 0 10px; }
  .tlx-tool-txt { font-size: 13px; }
  .tlx-drawer { width: 100vw; border-right: 0; }
  .tlx-conflict { grid-template-columns: 1fr; }
  .tlx-toasts { bottom: 150px; }
  .tlx-act { padding: 4px 8px; }
}
@media (max-width: 700px) {
  .tlx-tool:not(.tlx-tool-main) .tlx-tool-txt { display: none; }
  .tlx-tool:not(.tlx-tool-main) { width: 44px; justify-content: center; padding: 0; }
}

/* ── Reduced motion: everything instant ── */
@media (prefers-reduced-motion: reduce) {
  .tlx-root *, .tlx-nodebar *, .tlx-card, .tlx-drawer, .tlx-dialog, .tlx-toast {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── 年表内搜索（search.js） ── */
.tlx-dialog-search { width: min(620px, 100%); }
.tlx-search { display: flex; flex-direction: column; gap: 8px; }
.tlx-search .tlx-search-input { flex: none; width: 100%; min-height: 42px; font-size: 16px; }
.tlx-search-status { font-size: 13px; color: rgba(255, 255, 255, 0.55); min-height: 16px; }
.tlx-search-list { display: flex; flex-direction: column; gap: 4px; max-height: min(52vh, 460px); overflow-y: auto; overscroll-behavior: contain; }
.tlx-search-row {
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.03);
}
.tlx-search-row[aria-selected="true"] { background: rgba(96, 165, 250, 0.14); border-color: rgba(96, 165, 250, 0.45); }
.tlx-search-title { font-weight: 700; font-size: 15px; color: #fff; }
.tlx-search-snip {
  margin-top: 4px; font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, 0.68);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tlx-search-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.tlx-search-chip {
  font-size: 13px; line-height: 1; padding: 4px 8px; border-radius: 999px;
  color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
}
.tlx-search-chip.k-person { color: #fcd34d; background: rgba(252, 211, 77, 0.12); border-color: transparent; font-weight: 700; }
.tlx-search-chip.k-event { color: #fca5a5; background: rgba(252, 165, 165, 0.12); border-color: transparent; font-weight: 700; }
.tlx-search-chip.k-route { color: #86efac; background: rgba(134, 239, 172, 0.12); border-color: transparent; font-weight: 700; }
.tlx-search-chip.k-king { color: #c4b5fd; background: rgba(196, 181, 253, 0.12); border-color: transparent; font-weight: 700; }
.tlx-search-chip.k-guide { color: #93c5fd; background: rgba(147, 197, 253, 0.12); border-color: transparent; font-weight: 700; }
.tlx-mark { background: rgba(250, 204, 21, 0.32); color: inherit; border-radius: 3px; padding: 0 1px; }
.tlx-search-more { align-self: flex-end; font-size: 13px; color: #93c5fd; text-decoration: none; }
.tlx-search-more:hover { text-decoration: underline; }

/* 欢迎层打开期间（main.js 给 body 加 tl-welcome-open）收起 dock，免得叠在欢迎层底部按钮上 */
body.tl-welcome-open .tlx-dock { visibility: hidden; }

/* ══════════════════════════════════════════════════════════════════════════
   P3 · theme-night 对齐（设计稿 pages/timeline.html；P1-07）：探索层的面、按钮与全站一致
   —— 面用 --night-surface（不用渐变），按钮用全站的胶囊形（次按钮 = 透明底 + 浅描边，主按钮 = --primary），
   关闭按钮是圆形图标按钮。只改外观，不改结构和交互。
   ══════════════════════════════════════════════════════════════════════════ */
.tlx-root {
  --tlx-bg: var(--night-surface, rgba(8, 15, 60, 0.96));
  --tlx-text: var(--night-text, #f3f5fb);
  --tlx-muted: var(--night-text-2, rgba(255, 255, 255, 0.62));
  --tlx-gold: var(--night-accent, #f0cb41);
  --tlx-focus: var(--night-accent, #ffd75e);
}
.tlx-dialog, .tlx-drawer { background: var(--night-surface, rgba(10, 17, 58, 0.99)); }
.tlx-nodebar { background: var(--night-surface, rgba(6, 12, 50, 0.96)); }
/* 卡片栈浮在工具条上方（绝对定位）：「欢迎回来」等卡片出现、收起时 dock 盒子不变，工具条不跳（CLS） */
.tlx-stack { position: absolute; left: 0; bottom: calc(100% + 8px); }
/* 左下工具条：次按钮（夜空） */
.tlx-tool { border-radius: var(--r-pill, 999px); border-color: rgba(255, 255, 255, 0.24); background: var(--night-surface, rgba(10, 20, 70, 0.92)); color: var(--night-text, #fff); font-weight: 600; }
.tlx-tool:hover { background: var(--night-surface, rgba(30, 50, 130, 0.95)); border-color: rgba(255, 255, 255, 0.4); }
.tlx-tool[aria-expanded='true'] { border-color: var(--night-accent, #f0cb41); color: var(--night-accent, #f0cb41); }
/* 卡片、抽屉、对话框里的按钮 */
.tlx-btn { border-radius: var(--r-pill, 999px); border-color: rgba(255, 255, 255, 0.24); background: transparent; font-weight: 600; }
.tlx-btn:hover:not([disabled]) { background: rgba(255, 255, 255, 0.06); }
.tlx-btn-primary { background: var(--primary, #2a62d9); border-color: var(--primary, #4d86ff); color: var(--on-primary, #fff); }
.tlx-btn-primary:hover:not([disabled]) { background: var(--primary-hover, #3572ee); }
.tlx-btn-danger { border-color: rgba(255, 138, 128, 0.5); color: var(--danger, #ffb3b3); }
.tlx-disc-nav .tlx-btn { border-radius: var(--r-md, 14px); }   /* 两行文字的跳转按钮用圆角矩形 */
.tlx-act { border-radius: var(--r-pill, 999px); border-color: rgba(255, 255, 255, 0.2); background: transparent; font-weight: 600; padding: 4px 12px; }
.tlx-act:hover { background: rgba(255, 255, 255, 0.06); }
.tlx-act[aria-pressed='true'] { border-color: var(--night-accent, #f0cb41); color: var(--night-accent, #f0cb41); background: rgba(242, 199, 92, 0.1); }
.tlx-x { width: 36px; height: 36px; border-radius: var(--r-pill, 999px); }
.tlx-drawer-title { color: var(--night-accent, #f0cb41); font-weight: 700; }
.tlx-dialog-title, .tlx-card-title { font-weight: 700; }

/* 手机：站内底部标签栏（NavBar.js，tabbar:true）在最底，探索工具条抬到它上面；关闭按钮点按区 44px */
@media (max-width: 720px) {
  body.wnx-has-tabbar .tlx-dock { bottom: calc(24px + 86px + env(safe-area-inset-bottom)); }
  body.wnx-has-tabbar .tlx-toasts { bottom: calc(150px + 86px); }
  .tlx-x { width: 44px; height: 44px; }
  /* 卡片栈再抬高，让出右侧缩放按钮（timeline.css 把缩放按钮放在工具条上方） */
  .tlx-stack { margin-bottom: 64px; }
  .tlx-act { min-height: 40px; }
}
