/*
 * LDT Windows UI refresh candidate — 2026-11-03
 * Integration: load AFTER app.css and player.css (and existing inline styles):
 *   <link rel="stylesheet" href="/ui_refresh.css?v=20261103-1">
 * CSS only. No generated labels, DOM replacement, event changes, or external fonts.
 * Respect [hidden], .hide-*, .dense, .tools-open, body.dark and manager gates.
 * Player/chat layout and the fixed download queue retain their original geometry.
 * Only the non-chat mobile brand header is restored; no manager entry is exposed.
 * One local !important restores the mobile header; the last rule protects hidden.
 * Static review only: a connected browser is still needed for visual acceptance.
 */

:root {
  --bg: #f6f5f1;
  --panel: #ffffff;
  --ink: #202940;
  --sub: #627087;
  --line: #dce1e9;
  --brand: #304b87;
  --brand2: #243c70;
  --soft: #edf1f8;
  --warn: #a94d27;
  --mark: #ffe9a3;
  --sel: #e5ecfa;
  --focus: #3b62ad;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(25, 40, 71, .04);
  --accent: var(--brand);
  --muted: var(--sub);
  --fg: var(--ink);
  --text: var(--ink);
  --card: var(--panel);
  --border: var(--line);
  --ui-elevated: #fafbfd;
  --ui-hover: #f1f4fa;
  --ui-header: #23365c;
  --ui-header-muted: #c4cfe4;
  --ui-ring: 0 0 0 3px rgba(59, 98, 173, .13);
}


body {
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0;
  color-scheme: light;
}

/* Header and primary navigation. Chat keeps its compact full-height shell. */
body .topbar {
  position: relative;
  gap: 20px;
  padding: 17px max(24px, calc((100vw - 1480px) / 2));
  background: var(--ui-header);
  border: 0;
  color: #f8faff;
  box-shadow: none;
}
body .topbar .brand { gap: 12px; color: #fff; min-width: 0; }
body .topbar .brand strong { font-size: 21px; font-weight: 650; letter-spacing: .04em; }
body .topbar .brand small { margin-top: 3px; color: var(--ui-header-muted); font-size: 12px; }
body .topbar .brand img { width: 38px; height: 38px; flex-shrink: 0; }
body .topbar .lite-tag { color: #e3ebfc; background: #ffffff1c; padding: 2px 6px; }
body .topbar .contact-mail { margin-left: 0; color: var(--ui-header-muted); line-height: 1.6; }
body .topbar .contact-label { color: #e7edfa; font-weight: 500; }
body .topbar .header-actions { gap: 7px; justify-content: flex-end; }
body .topbar :is(.icon-button, .quiet, .secondary) {
  background: #ffffff0d;
  color: #f3f6ff;
  border: 1px solid #ffffff30;
  border-radius: 8px;
  box-shadow: none;
  min-height: 36px;
}
body .topbar :is(.icon-button, .quiet, .secondary):hover { background: #ffffff1c; border-color: #ffffff80; }
body .topbar .connection { color: #ffd2b2; }
body .topbar .connection.online { color: #c3e5d8; }

body .tabs {
  gap: 6px;
  padding: 10px max(24px, calc((100vw - 1480px) / 2));
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  align-items: center;
}
body .tabs .tab {
  min-height: 42px;
  padding: 9px 22px;
  border-radius: 8px;
  color: var(--sub);
  border: 1px solid transparent;
  font-size: 14px;
}
body .tabs .tab:hover { background: var(--ui-hover); color: var(--brand); }
body .tabs .tab.active { background: var(--soft); color: var(--brand); border-color: var(--line); font-weight: 650; }
body main#main { max-width: 1528px; padding: 24px; }
body #dl-banner { position: static; padding: 7px 24px; background: var(--soft); color: var(--brand); border-color: var(--line); }
body #dl-banner .dl-banner-main { background: none; border: 0; color: var(--brand); padding: 2px 4px; font-weight: 500; }
body #dl-banner :is(.dl-banner-mirrors a, .dl-banner-close) { color: var(--brand); }

/* Known library controls only; player and chat controls are not resized. */
:is(#search-view, #drive-view, #latest-view) :is(.primary, .secondary, .quiet, .chip, .mini, .icon-button, select) {
  border-radius: 8px;
  box-shadow: none;
}
:is(#search-view, #drive-view, #latest-view) :is(.primary, .secondary, .quiet, .icon-button, select) { min-height: 36px; }
:is(#search-view, #drive-view, #latest-view) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select) {
  background: var(--panel);
  border-color: var(--line);
  padding: 8px 10px;
}
:is(#search-view, #drive-view, #latest-view) :is(button, input, select, a, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
:is(#search-view, #drive-view, #latest-view) .chk { gap: 6px; min-height: 30px; font-size: 13px; }
:is(#search-view, #drive-view, #latest-view) input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; }
:is(#search-view, #drive-view, #latest-view) .quiet:hover { background: var(--ui-hover); }
:is(#search-view, #drive-view, #latest-view) .quiet.on { background: var(--brand); color: var(--panel); }
body.dark :is(#search-view, #drive-view, #latest-view) :is(.primary, .chip.on, .quiet.on) { color: #14223c; }

/* Query is the primary action; the auxiliary tools retain their existing order. */
#search-view #search-form {
  gap: 9px;
  padding: 17px 18px;
  margin: 0 0 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
#search-view #query {
  flex: 1 1 calc(100% - 260px);
  min-width: 180px;
  min-height: 50px;
  padding: 12px 15px;
  font-size: 17px;
  border-radius: 9px;
  border-color: #a8b6cf;
  background: var(--ui-elevated);
  box-shadow: none;
}
#search-view #query:focus { border-color: var(--focus); box-shadow: var(--ui-ring); }
#search-view #search-button { min-width: 96px; min-height: 50px; font-size: 16px; padding: 10px 22px; }
#search-view :is(#s-back, #s-fwd) { width: 36px; min-width: 36px; height: 38px; }
#search-view #search-form .quiet { color: var(--sub); font-size: 13px; padding: 7px 12px; }
#search-view #s-core { gap: 10px 18px; margin: 0 0 10px; }
#search-view .corefield { gap: 8px; }
#search-view .corelab { font-size: 13px; }
#search-view #s-chrome-box { border: 1px solid var(--line); border-radius: 10px; background: var(--ui-elevated); padding: 10px 14px; margin: 10px 0 16px; }
#search-view #s-opts { gap: 8px 16px; margin: 0 0 8px; }
#search-view .filters { background: var(--panel); margin: 10px 0; padding: 10px 12px; border-radius: 8px; }
#search-view .filters > summary { color: var(--ink); font-size: 13px; padding: 2px 0; }
#search-view .fgrid { gap: 12px; margin: 14px 0; }
#search-view .fgrid label { gap: 6px; font-size: 13px; }
#search-view .strip { margin: 7px 0; gap: 6px; }
#search-view .strip-label { min-width: 2em; }
#search-view #recent-clear { color: var(--sub); background: var(--panel); border-color: var(--line); }
#search-view #recent-clear:hover { color: var(--brand); background: var(--soft); }
:is(#search-view, #drive-view, #latest-view) .chips { gap: 6px; margin: 10px 0; }
:is(#search-view, #drive-view, #latest-view) .chip { min-height: 32px; padding: 6px 12px; border-color: var(--line); color: var(--sub); font-weight: 400; }
:is(#search-view, #drive-view, #latest-view) .chip.on { background: var(--brand); border-color: var(--brand); color: var(--panel); font-weight: 600; }
#search-view .scope { padding: 10px 14px; margin: 12px 0; }
#search-view #search-home { padding: 36px 24px 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
#search-view #search-home h1 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; line-height: 1.4; margin: 0 0 14px; }
#search-view #search-home .intro { max-width: 680px; margin: 0 auto 20px; line-height: 1.9; }
#search-view #search-home .quick { gap: 8px; }
#search-view #search-home .quick button { border-radius: 8px; padding: 9px 14px; background: var(--ui-elevated); }
#search-view #search-home .extlinks { gap: 10px 18px; margin-top: 22px; }

/* Result heading, tools and file rows. No display rules on data columns. */
#search-results .resbar { margin: 22px 0 12px; padding: 0 2px; }
#search-results #search-summary { color: var(--ink); font-size: 18px; font-weight: 650; }
:is(#search-view, #drive-view) :is(.toolrow, .filterbar) { gap: 8px; padding: 10px 12px; margin: 0; border: 1px solid var(--line); background: var(--panel); }
:is(#search-view, #drive-view) .toolrow { border-radius: 10px 10px 0 0; }
:is(#search-view, #drive-view) .toolrow + .filterbar { border-top: 0; border-radius: 0 0 10px 10px; margin-bottom: 12px; background: var(--ui-elevated); }
:is(#search-view, #drive-view) .filterbar input:not([type=checkbox]) { flex: 1 1 160px; }
:is(#search-view, #drive-view) .selbar { position: static; padding: 9px 12px; margin: 12px 0; gap: 7px; border-color: var(--line); }
:is(#search-view, #drive-view, #latest-view) .list { border-radius: 10px; box-shadow: none; }
:is(#search-view, #drive-view, #latest-view) .list.table .row { min-height: 62px; padding: 12px 14px; gap: 12px; border-top: 0; border-bottom: 1px solid var(--line); }
:is(#search-view, #drive-view, #latest-view) .list.table .row:last-child { border-bottom: 0; }
:is(#search-view, #drive-view, #latest-view) .list.table .row.head { min-height: 40px; padding: 10px 14px; background: var(--ui-elevated); font-size: 12px; font-weight: 600; }
:is(#search-view, #drive-view, #latest-view) .list.table .c-name { flex: 2.8 1 270px; min-width: 0; }
:is(#search-view, #drive-view, #latest-view) .list.table .c-path { flex: 1.4 1 170px; }
:is(#search-view, #drive-view, #latest-view) .list.table .c-size { flex-basis: 72px; }
:is(#search-view, #drive-view, #latest-view) .list.table .c-date { flex-basis: 118px; }
:is(#search-view, #drive-view, #latest-view) .list.table .c-type { flex-basis: 74px; }
:is(#search-view, #drive-view, #latest-view) .list.table .c-act { gap: 6px; max-width: 232px; }
:is(#search-view, #drive-view, #latest-view) .list .fname { gap: 10px; font-size: 14px; font-weight: 500; line-height: 1.65; }
:is(#search-view, #drive-view, #latest-view) .list .c-path { line-height: 1.75; font-size: 12px; }
:is(#search-view, #drive-view, #latest-view) .list .mini { min-height: 30px; padding: 4px 9px; font-size: 12px; background: var(--panel); }
:is(#search-view, #drive-view, #latest-view) .list .row:hover { background: var(--ui-hover); }
:is(#search-view, #drive-view, #latest-view) .list .row.sel { background: var(--sel); }
:is(#search-view, #drive-view, #latest-view) .list .row.focus { box-shadow: inset 3px 0 0 var(--focus); }
:is(#search-view, #drive-view, #latest-view) .list.dense .row { min-height: 38px; padding-top: 5px; padding-bottom: 5px; }
:is(#search-view, #drive-view, #latest-view) .list.dense .fname { font-size: 13px; line-height: 1.5; }
:is(#search-view, #drive-view, #latest-view) .list.cards { padding: 0; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); background: transparent; }
:is(#search-view, #drive-view, #latest-view) .list.cards .row { padding: 16px; gap: 10px; border: 1px solid var(--line); border-radius: 10px; }
:is(#search-view, #drive-view, #latest-view) .list.cards .card-body { gap: 8px; padding-right: 18px; }
:is(#search-view, #drive-view, #latest-view) .list.cards .c-act { margin-top: auto; padding-top: 6px; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
:is(#search-view, #drive-view, #latest-view) .list.cards.dense .row { padding: 10px; gap: 5px; }
:is(#search-view, #drive-view, #latest-view) .group-head { padding: 10px 14px; background: var(--soft); color: var(--brand); }
:is(#search-view, #drive-view, #latest-view) .pager { gap: 9px; margin: 18px 0; }
:is(#search-view, #drive-view, #latest-view) :is(.empty, .loading) { color: var(--sub); line-height: 1.8; }

/* Browsing and category navigation, including the existing website directory. */
#drive-view .drive-bar { gap: 8px; margin: 0 0 12px; padding: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
#drive-view .crumbs { padding: 8px 2px 12px; }
#drive-view .crumbs button:not(.mini) { padding: 5px 7px; border-radius: 6px; }
#drive-view .v9bar { gap: 7px; }
.v9hub { background: var(--panel); border-color: var(--line); border-radius: 12px; padding: 18px; margin: 10px 0 18px; }
.v9hub .v9top { gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.v9hub .v9tabs { gap: 5px; }
.v9hub .v9tab { padding: 8px 13px; border-radius: 7px; min-height: 38px; color: var(--sub); }
.v9hub .v9tab.on { color: var(--brand); background: var(--soft); }
.v9hub .v9body { margin-top: 16px; }
.v9hub .v9grid { gap: 12px; }
.v9hub .v9c { gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--ui-elevated); color: var(--ink); box-shadow: none; }
.v9hub .v9c:hover { background: var(--ui-hover); border-color: var(--brand); transform: none; box-shadow: none; }
.v9hub .v9cover { min-height: 116px; border-top: 3px solid var(--brand); }
.v9hub .v9cover .v9i { font-size: 25px; }
.v9hub .v9cover b { font-size: 15px; word-break: normal; overflow-wrap: anywhere; }
.v9hub .v9c small { color: var(--sub); opacity: 1; line-height: 1.7; }
.v9hub .v9box { padding: 16px; border-color: var(--line); border-radius: 9px; background: var(--panel); }
.v9hub .v9box h4 { font-size: 15px; margin-bottom: 10px; color: var(--ink); }
.v9hub .v9li { padding: 9px 8px; border-radius: 6px; min-height: 38px; gap: 12px; }
.v9hub .v9li:hover { background: var(--ui-hover); color: var(--brand); }
.v9hub .v9li span { white-space: normal; overflow-wrap: anywhere; }
.v9hub .v9filter { max-width: 560px; margin: 0 0 16px; min-height: 42px; }
.v9hub .v9adj button { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
/* Website names and hosts share full row width: a nowrap host must never squeeze
 * an English title into a narrow flex column. Other navigation lists stay intact. */
.v9hub .v9urls {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: start;
  gap: 16px;
  min-width: 0;
}
.v9hub .v9urls > .v9box {
  --nav-accent: #355b9b; --nav-soft: #edf3ff; --nav-line: #cddbf3;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--nav-line);
  border-top: 3px solid var(--nav-accent);
  border-radius: 10px;
  background: var(--panel);
}
.v9hub .v9urls > .v9box:nth-child(6n + 2) { --nav-accent: #277163; --nav-soft: #eaf6f1; --nav-line: #c6e3d8; }
.v9hub .v9urls > .v9box:nth-child(6n + 3) { --nav-accent: #71509a; --nav-soft: #f3eef9; --nav-line: #ded0ee; }
.v9hub .v9urls > .v9box:nth-child(6n + 4) { --nav-accent: #8c6127; --nav-soft: #fbf3e6; --nav-line: #ebd8b6; }
.v9hub .v9urls > .v9box:nth-child(6n + 5) { --nav-accent: #9a5166; --nav-soft: #fbeef2; --nav-line: #edcfda; }
.v9hub .v9urls > .v9box:nth-child(6n + 6) { --nav-accent: #2d7188; --nav-soft: #eaf5f9; --nav-line: #c5e1ec; }
body.dark .v9hub .v9urls > .v9box { --nav-accent: #acc6ff; --nav-soft: #253451; --nav-line: #425b86; }
body.dark .v9hub .v9urls > .v9box:nth-child(6n + 2) { --nav-accent: #93d4bc; --nav-soft: #203a35; --nav-line: #3d6359; }
body.dark .v9hub .v9urls > .v9box:nth-child(6n + 3) { --nav-accent: #c7b2eb; --nav-soft: #342b47; --nav-line: #5d4c78; }
body.dark .v9hub .v9urls > .v9box:nth-child(6n + 4) { --nav-accent: #e9c58c; --nav-soft: #3b3327; --nav-line: #6c5940; }
body.dark .v9hub .v9urls > .v9box:nth-child(6n + 5) { --nav-accent: #e9afc1; --nav-soft: #3d2b37; --nav-line: #704e60; }
body.dark .v9hub .v9urls > .v9box:nth-child(6n + 6) { --nav-accent: #9ed0e2; --nav-soft: #253944; --nav-line: #426474; }
.v9hub .v9urls > .v9ug > summary {
  padding: 13px 16px;
  color: var(--nav-accent);
  background: var(--nav-soft);
  border-radius: 7px 7px 0 0;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: normal;
}
.v9hub .v9urls > .v9ug[open] > summary { border-bottom: 1px solid var(--nav-line); }
.v9hub .v9urls > .v9ug > summary small { color: var(--nav-accent); opacity: .85; white-space: nowrap; font-size: 12px; margin-left: 5px; }
.v9hub .v9urls .v9list { min-width: 0; gap: 3px; padding: 8px; }
.v9hub .v9urls .v9li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
}
.v9hub .v9urls .v9li > span {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  overflow: visible;
  text-overflow: clip;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}
.v9hub .v9urls .v9li > small {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  color: var(--sub);
  opacity: 1;
  font-size: 12px;
  line-height: 1.5;
}
.v9hub .v9urls .v9description {
  margin: 0;
  min-width: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  color: var(--sub);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
}
.v9hub .v9urls .v9li:hover { background: var(--nav-soft); color: var(--nav-accent); }
.v9b.on, .v9-keybtn.on { background: var(--soft); color: var(--brand); border-color: var(--line); }
#latest-view :is(.lt-modes, .lt-row) { gap: 8px; margin: 12px 0; }
#latest-view .lt-mode { border-radius: 8px; padding: 8px 16px; min-height: 38px; background: var(--panel); }
#latest-view .lt-mode.on { background: var(--brand); color: var(--panel); }
#latest-view .lt-navgrid { gap: 12px; }
#latest-view .lt-card { background: var(--panel); border-color: var(--line); padding: 16px; }
#latest-view .lt-link { padding: 8px 11px; border-radius: 7px; }

/* Additive external result contract. No visibility or request-state assumptions. */
.external-results { margin: 28px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.external-results :is(h2, h3) { color: var(--ink); font-size: 18px; line-height: 1.5; margin: 0 0 8px; font-weight: 650; }
.external-results > p { color: var(--sub); font-size: 13px; margin: 0 0 14px; line-height: 1.8; }
.external-results :is(.external-grid, .external-list) { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }
.external-results .external-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 10px; overflow-wrap: anywhere; min-width: 0; }
.external-results .external-card > :first-child { margin-top: 0; }
.external-results .external-card > :last-child { margin-bottom: 0; }
.external-results .external-card :is(h3, h4) { font-size: 15px; margin: 0 0 7px; }
.external-results .external-card a { color: var(--brand); text-underline-offset: 3px; }
.external-results .external-card :is(p, small, .external-meta) { color: var(--sub); font-size: 13px; line-height: 1.8; }
.external-results .external-card :is(button, .secondary) { min-height: 36px; }

/* Dialog surfaces: no display, open-state, media size or positioning overrides. */
dialog { border-color: var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: 0 20px 64px rgba(12, 24, 44, .24); }
dialog::backdrop { background: rgba(12, 24, 44, .55); }
dialog .dialog-top { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
dialog .eyebrow { color: var(--sub); letter-spacing: .03em; }
dialog h2 { font-size: 21px; line-height: 1.5; margin-top: 12px; }
dialog .stack { gap: 7px; margin: 12px 0; }
dialog :is(.file-actions, .dialog-actions, .v9row) { gap: 9px; }
dialog :is(.quiet, .primary, .secondary) { border-radius: 8px; }
dialog .file-path { padding: 10px 12px; background: var(--ui-elevated); border-radius: 8px; line-height: 1.8; }

@media (max-width: 1180px) and (min-width: 821px) {
  body .topbar { gap: 12px; padding: 14px 20px; flex-wrap: wrap; }
  body .topbar .header-actions { margin-left: auto; }
  body main#main { padding: 20px; }
  :is(#search-view, #drive-view, #latest-view) .list.table .row { flex-wrap: wrap; }
  :is(#search-view, #drive-view, #latest-view) .list.table .c-name { flex: 2 1 280px; }
  :is(#search-view, #drive-view, #latest-view) .list.table .c-path { flex: 1 1 190px; }
  :is(#search-view, #drive-view, #latest-view) .list.table .c-act { flex: 1 1 100%; max-width: none; padding-left: 32px; justify-content: flex-start; }
}

@media (max-width: 820px), (pointer: coarse) and (max-width: 1024px) {
  body .topbar:not([hidden]) {
    display: flex !important; /* Override legacy topbar hiding; preserve brand gesture. */
    flex-wrap: wrap;
    gap: 8px;
    padding: calc(13px + env(safe-area-inset-top, 0px)) 12px 12px max(12px, env(safe-area-inset-left, 0px));
  }
  body .topbar .brand { gap: 8px; }
  body .topbar .brand img { width: 30px; height: 30px; }
  body .topbar .brand strong { font-size: 18px; }
  body .topbar .brand small { font-size: 11px; }
  body .topbar .header-actions { justify-content: flex-start; gap: 6px; margin-left: 0; }
  /* The header is visible on phones; avoid duplicate floating theme/settings. */
  body #mobile-chrome-fab { display: none !important; }
  body .topbar .header-actions :is(.quiet, .secondary) { font-size: 12px; }
  body .tabs { position: relative; padding: 8px 10px; gap: 4px; flex-wrap: wrap; }
  body .tabs .tab { min-height: 44px; padding: 9px 10px; font-size: 14px; flex: 1 0 auto; white-space: nowrap; }
  body main#main { padding: 12px max(10px, env(safe-area-inset-right, 0px)) 16px max(10px, env(safe-area-inset-left, 0px)); overflow-x: visible; }
  body #dl-banner { padding: 7px 12px; font-size: 12px; }
  #search-view #search-form { padding: 12px; margin: 10px 0 14px; border-radius: 10px; gap: 8px; position: static; }
  #search-view #query { min-height: 48px; font-size: 16px; padding: 11px 12px; }
  #search-view #search-button { min-height: 44px; min-width: 96px; font-size: 15px; }
  #search-view #search-form .quiet { padding: 9px 11px; min-height: 44px; }
  #search-view #s-core { gap: 8px 12px; }
  #search-view .corefield { flex: 1 1 calc(50% - 12px); min-width: 0; }
  #search-view #s-chrome-box { padding: 10px; }
  #search-view #s-opts { gap: 6px 12px; }
  #search-view #search-home { padding: 26px 16px; }
  #search-view #search-home .intro { font-size: 14px; line-height: 1.85; }
  #search-results .resbar { margin: 18px 0 10px; }
  #search-results #search-summary { font-size: 17px; }
  :is(#search-view, #drive-view) :is(.toolrow, .filterbar) { gap: 7px; padding: 10px; }
  :is(#search-view, #drive-view, #latest-view) :is(.quiet, .primary, .secondary, select, .chip) { min-height: 40px; }
  :is(#search-view, #drive-view, #latest-view) .list.table .row { padding: 14px 12px; gap: 7px; flex-wrap: wrap; align-items: flex-start; }
  :is(#search-view, #drive-view, #latest-view) .list.table .c-name { flex: 1 1 calc(100% - 36px); }
  :is(#search-view, #drive-view, #latest-view) .list.table .c-path { flex: 1 1 100%; padding-left: 27px; order: 5; }
  :is(#search-view, #drive-view, #latest-view) .list.table .c-act { flex: 1 1 100%; max-width: none; padding-left: 27px; justify-content: flex-start; gap: 7px; }
  :is(#search-view, #drive-view, #latest-view) .list .fname { font-size: 15px; }
  :is(#search-view, #drive-view, #latest-view) .list .mini { min-height: 40px; font-size: 13px; padding: 7px 12px; }
  :is(#search-view, #drive-view, #latest-view) .list.dense .row { min-height: 38px; padding: 8px 10px; }
  :is(#search-view, #drive-view, #latest-view) .list.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
  .v9hub { padding: 12px; }
  .v9hub .v9tabs { flex-wrap: wrap; overflow: visible; }
  .v9hub .v9tab { min-height: 40px; }
  .v9hub .v9covers.v9grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v9hub .v9c { padding: 12px; }
  .v9hub .v9urls { grid-template-columns: 1fr; }
  .v9hub .v9li { min-height: 44px; }
  .external-results { margin-top: 22px; padding-top: 18px; }
  .external-results .external-card { padding: 14px; }
  .external-results .external-card :is(button, .secondary) { min-height: 44px; }
  dialog { border-radius: 16px 16px 0 0; }
}

@media (max-width: 480px) {
  body .topbar .brand strong { font-size: 16px; }
  body .topbar .brand img { width: 28px; height: 28px; }
  body .tabs .tab { padding: 8px; font-size: 13px; }
  #search-view .corefield { flex-basis: 100%; }
  #search-view .fgrid { grid-template-columns: 1fr; }
  #search-view #search-home .quick button { flex: 1 1 auto; }
  :is(#search-view, #drive-view, #latest-view) .list.cards { grid-template-columns: 1fr; }
  .v9hub .v9covers.v9grid { gap: 8px; }
}

/* Legacy display declarations must never make a hidden section/control visible. */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :is(#search-view, #drive-view, #latest-view) :is(.primary, .secondary, .quiet, .chip, .mini, .icon-button) { transition: none; }
}

/* Common inclusion/exclusion controls remain readable at desktop and phone widths. */
.quick-search-filters { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin:14px 0; padding:16px; border:1px solid #dfe4ed; border-radius:14px; background:#fff; }
.quick-search-filters > label:not(.chk) { display:grid; gap:6px; flex:1 1 260px; min-width:0; font-size:14px; font-weight:600; }
.quick-search-filters > label:not(.chk) input { width:100%; min-width:0; font-weight:400; }
.quick-search-filters > .chk { align-self:center; font-size:13px; }
.quick-search-filters > .subtle { flex-basis:100%; font-size:12px; line-height:1.6; }
body.dark .quick-search-filters { background:#172237; border-color:#35435e; }
@media(max-width:640px) { .quick-search-filters > label:not(.chk) { flex-basis:100%; } .quick-search-filters > .chk { flex-basis:100%; } }

#smart-results { margin-top:22px; }
#smart-results .smart-candidate { padding:14px 16px; margin:10px 0; border:1px solid #dfe4ed; border-radius:12px; background:#fff; overflow-wrap:anywhere; }
#smart-results .smart-candidate > .quiet { max-width:100%; white-space:normal; text-align:left; font-weight:600; font-size:14px; }
#smart-results .smart-candidate > .subtle { overflow-wrap:anywhere; margin:7px 0; line-height:1.55; }
body.dark #smart-results .smart-candidate { background:#172237; border-color:#35435e; }

/* compact-results:css */
/* 细条结果视图：独立于旧表格/卡片，桌面与手机都保持一行。 */
#search-list.ldt-strips, #multi-groups .list.ldt-strips {
  display:block; padding:0; width:100%; min-width:0; max-width:100%;
  overflow:visible; border-radius:8px;
}
.ldt-strips > .row.head { display:none !important; }
#search-list.ldt-strips > .row[data-i], #multi-groups .ldt-strips > .row[data-i] {
  display:grid; grid-template-columns:24px minmax(0,1fr) auto 44px;
  align-items:center; gap:8px; min-height:44px; padding:0 8px;
  margin:0; border:0; border-bottom:1px solid var(--line,#dfe4ed);
  border-radius:0; position:relative; background:var(--panel,#fff);
}
.ldt-strips > .row[data-i]:last-child { border-bottom:0 !important; }
.ldt-strips > .row[data-i]:hover { background:var(--soft,#f5f7fa) !important; }
.ldt-strips > .row[data-i].sel { background:var(--sel,#e7f0ff) !important; }
.ldt-strips > .row[data-i] > .cb { width:18px; height:18px; margin:0; justify-self:center; grid-column:1; grid-row:1; }
.ldt-strips > .row[data-i] > .fname {
  display:flex; width:100%; min-width:0; max-width:100%; min-height:44px;
  padding:0; gap:6px; font-size:14px; line-height:1.4; white-space:nowrap;
  overflow:hidden !important; white-space:nowrap !important; text-overflow:ellipsis !important; text-align:left; background:none; border:0; grid-column:2; grid-row:1;
}
.ldt-strips .strip-name-text { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ldt-strips .fname .ficon.fi-svg { width:22px; height:22px; min-width:22px; padding:2px; border-radius:4px; }
.ldt-strips .fname .ficon.fi-svg svg { width:16px; height:16px; }
#search-list.ldt-strips > .row[data-i] > .c-size, #multi-groups .ldt-strips > .row[data-i] > .c-size { display:block !important; grid-column:3; grid-row:1; order:0; font-size:12px; white-space:nowrap; color:var(--sub,#64748b); padding:0; margin:0; background:none; border:0; border-radius:0; width:auto; max-width:none; }
#search-list.ldt-strips.hide-size > .row[data-i] > .c-size, #multi-groups .ldt-strips.hide-size > .row[data-i] > .c-size { display:none !important; }
.ldt-strips > .row[data-i] > .c-date, .ldt-strips > .row[data-i] > .c-type { display:none !important; }
.ldt-strips .strip-menu { position:static; min-width:0; grid-column:4; grid-row:1; }
.ldt-strips .strip-menu > summary {
  display:flex; align-items:center; justify-content:center; width:44px; min-height:44px;
  padding:0; list-style:none; cursor:pointer; color:var(--ink,#172237);
  font-size:20px; line-height:1; border-radius:6px; touch-action:manipulation;
}
.ldt-strips .strip-menu > summary::-webkit-details-marker { display:none; }
.ldt-strips .strip-menu > summary:hover, .ldt-strips .strip-menu[open] > summary { background:var(--sel,#e7f0ff); }
.ldt-strips .strip-panel {
  position:fixed; z-index:10000; width:min(360px,calc(100vw - 16px));
  box-sizing:border-box; padding:12px; margin:0; border:1px solid var(--line,#dfe4ed);
  border-radius:10px; background:var(--panel,#fff); color:var(--ink,#172237);
  box-shadow:0 8px 30px #0003; max-height:calc(100dvh - 16px); overflow:auto;
}
.ldt-strips .strip-panel .strip-fullname { font-size:14px; font-weight:600; overflow-wrap:anywhere; margin:0 0 6px; }
.ldt-strips .strip-panel .strip-meta { color:var(--sub,#64748b); font-size:12px; overflow-wrap:anywhere; margin:4px 0 8px; }
.ldt-strips .strip-panel .c-path { display:flex; flex-wrap:wrap; gap:2px; white-space:normal; overflow:visible; margin:6px 0 10px; }
.ldt-strips .strip-panel .seg { min-height:32px; max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:left; }
.ldt-strips.hide-path .strip-panel .c-path { display:none; }
#search-list.ldt-strips .strip-panel .c-act, #multi-groups .ldt-strips .strip-panel .c-act { display:flex; flex-wrap:wrap; gap:6px; min-width:0; max-width:none; padding:0; margin:0; }
#search-list.ldt-strips .strip-panel .mini, #multi-groups .ldt-strips .strip-panel .mini { display:inline-flex; justify-content:center; align-items:center; min-height:40px; padding:8px 12px; font-size:13px; flex:1 0 auto; }
.ldt-strips :is(.fname,.cb,summary,.mini,.seg):focus-visible { outline:2px solid var(--brand,#245b4c); outline-offset:-2px; }
.ldt-strips .group-head { overflow-wrap:anywhere; }
@media(max-width:600px) {
  #search-list.ldt-strips > .row[data-i], #multi-groups .ldt-strips > .row[data-i] { min-height:48px; gap:4px; padding:0 4px; }
  .ldt-strips > .row[data-i] > .fname { min-height:48px; font-size:13px; }
  .ldt-strips > .row[data-i] > .c-size { font-size:11px; }
  .ldt-strips .strip-menu > summary { min-height:48px; }
}
@media(max-width:320px) {
  #search-list.ldt-strips > .row[data-i] > .c-size, #multi-groups .ldt-strips > .row[data-i] > .c-size { display:none !important; }
}
@media(forced-colors:active) { .ldt-strips .strip-panel { border:1px solid CanvasText; } }
#smart-results.ldt-smart-strips .smart-candidate { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:6px; align-items:center; min-height:48px; padding:0 8px; margin:0; border-radius:0; border-bottom:1px solid var(--line,#dfe4ed); }
#smart-results.ldt-smart-strips .smart-candidate > .quiet { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:0; min-width:0; min-height:44px; font-size:14px; }
#smart-results.ldt-smart-strips .strip-menu { grid-column:2; }
#smart-results.ldt-smart-strips .strip-candidate-content > .subtle { overflow-wrap:anywhere; margin:6px 0; }
#smart-results.ldt-smart-strips .strip-candidate-content > button { min-height:40px; margin:3px; }
.ldt-compact-active .external-items > li { display:flex; align-items:center; gap:8px; min-height:44px; border-bottom:1px solid var(--line,#dfe4ed); }
.ldt-compact-active .external-items > li > a { flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.ldt-compact-active .external-items .external-author { max-width:30%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }


/* Compact drive/search layout — 2026-11-15. Geometry only; IDs, events and stored open states stay intact. */
body .topbar { gap:12px; padding:5px max(16px,calc((100vw - 1480px)/2)); }
body .topbar .brand { gap:8px; }
body .topbar .brand strong { font-size:18px; line-height:1.25; letter-spacing:.02em; }
body .topbar .brand small { margin-top:1px; font-size:11px; line-height:1.3; }
body .topbar .brand img { width:32px; height:32px; }
body .topbar .header-actions { gap:5px; }
body .topbar :is(.icon-button,.quiet,.secondary) { min-height:30px; padding:4px 8px; font-size:12px; }
body .topbar .icon-button { height:30px; min-width:30px; padding:0 5px; }
body .tabs { gap:4px; padding:3px max(16px,calc((100vw - 1480px)/2)); }
body .tabs .tab { min-height:32px; padding:5px 13px; font-size:13px; }
body main#main { padding:8px 16px 16px; }
body #dl-banner { padding:4px 16px; }
#reading-console-status { min-height:0; margin:4px 16px; padding:0; font-size:12px; }
#reading-console-status:empty,#search-view #s-core:empty,#search-view #folder-chips:empty,#drive-view #d-extchips:empty,#drive-view #drive-summary:empty,#drive-view #breadcrumbs:empty { display:none; }
:is(#search-view,#drive-view) :is(.primary,.secondary,.quiet,.icon-button,select) { min-height:30px; padding:4px 9px; font-size:13px; line-height:1.35; }
:is(#search-view,#drive-view) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select) { min-height:30px; padding:4px 8px; font-size:13px; }
:is(#search-view,#drive-view) .chk { min-height:26px; gap:4px; font-size:13px; }
#search-view #search-form { gap:6px; padding:3px 7px; margin:0 0 5px; border-radius:9px; }
#search-view #query { flex:1 1 300px; min-width:180px; min-height:42px; padding:8px 12px; font-size:17px; line-height:1.4; }
#search-view #search-button { min-width:78px; min-height:42px; padding:7px 16px; font-size:15px; }
#search-view :is(#s-back,#s-fwd) { width:30px; min-width:30px; height:30px; }
#search-view #search-form .quiet { padding:4px 8px; min-height:30px; font-size:13px; }
#search-view .quick-search-filters { gap:4px 8px; margin:6px 0; padding:6px 9px; border-radius:8px; border-color:var(--line); background:var(--panel); }
#search-view .quick-search-filters > label:not(.chk) { flex:1 1 230px; gap:2px; font-size:12px; line-height:1.3; }
#search-view .quick-search-filters > .subtle { line-height:1.4; font-size:11px; }
#search-view #s-core { gap:5px 12px; margin:6px 0; }
#search-view .corefield { gap:5px; }
#search-view .corelab { font-size:12px; }
#search-view #s-chrome-box { padding:6px 9px; margin:6px 0 8px; border-radius:8px; }
#search-view #s-opts { gap:4px 10px; margin:0 0 5px; }
#search-view .filters { padding:5px 8px; margin:5px 0; border-radius:6px; }
#search-view .filters > summary { padding:0; font-size:12px; }
#search-view .fgrid { gap:7px; margin:8px 0; }
#search-view .strip { margin:4px 0; gap:4px; }
:is(#search-view,#drive-view) .chips { gap:4px; margin:5px 0; }
:is(#search-view,#drive-view) .chip { min-height:28px; padding:4px 9px; font-size:12px; }
#search-view .scope { padding:5px 9px; margin:6px 0; }
#search-view #search-home { padding:18px 16px; border-radius:9px; }
#search-view #search-home h1 { font-size:22px; margin-bottom:7px; }
#search-view #search-home .intro { margin-bottom:10px; line-height:1.6; }
#search-view #search-home .extlinks { margin-top:10px; }
#search-results .resbar { margin:5px 0 3px; padding:0; }
#search-results #search-summary { font-size:16px; }
:is(#search-view,#drive-view) :is(.toolrow,.filterbar) { gap:4px 6px; padding:3px 8px; }
:is(#search-view,#drive-view) .toolrow + .filterbar { margin-bottom:6px; }
:is(#search-view,#drive-view) .selbar { gap:4px 6px; padding:3px 8px; margin:6px 0; }
:is(#search-view,#drive-view) .list.table .row { min-height:44px; padding:6px 9px; gap:8px; }
:is(#search-view,#drive-view) .list.table .row.head { min-height:30px; padding:5px 9px; }
:is(#search-view,#drive-view) .list .fname { min-width:0; max-width:100%; gap:7px; line-height:1.45; overflow-wrap:anywhere; white-space:normal; }
:is(#search-view,#drive-view) .list .fname > span:not(.ficon) { min-width:0; overflow-wrap:anywhere; }
:is(#search-view,#drive-view) .list .mini { min-height:28px; padding:3px 7px; font-size:12px; }
:is(#search-view,#drive-view) .list.table .c-act { flex-wrap:wrap; min-width:0; max-width:232px; }
:is(#search-view,#drive-view) .list.dense .row { min-height:34px; padding-top:4px; padding-bottom:4px; }
:is(#search-view,#drive-view) .pager { gap:5px; margin:10px 0; }
#drive-view .drive-bar { gap:5px; padding:7px 9px; margin:0 0 5px; border-radius:8px; }
#drive-view #d-jump { min-width:0; flex:1 1 250px; }
#drive-view .crumbs { padding:3px 0 5px; min-width:0; max-width:100%; overflow-wrap:anywhere; }
#drive-view .crumbs button:not(.mini) { max-width:100%; padding:3px 5px; overflow-wrap:anywhere; white-space:normal; }
#drive-view .strip,#drive-view .drive-search { gap:5px; margin:4px 0; }
#drive-view #d-q { flex:1 1 220px; min-width:0; }
#drive-view #drive-summary { margin:6px 0; }
#file-dialog :is(#file-title,#file-path) { max-width:100%; overflow-wrap:anywhere; }
#file-dialog #file-title { font-size:19px; margin:8px 0; }
#file-dialog .file-path { padding:6px 8px; line-height:1.5; }
#file-dialog .file-actions { gap:6px; }
#file-dialog .file-actions :is(button,a) { min-height:30px; padding:5px 10px; font-size:13px; }
.mtdl-panel { padding:8px 10px; border-color:var(--line); box-shadow:0 5px 22px #17264126; }
.mtdl-panel .mtdl-head { margin-bottom:5px; }
.mtdl-panel .mtdl-row { padding:6px 0; border-color:var(--line); }
.mtdl-panel .mtdl-name { min-width:0; max-width:100%; }
@media(max-width:1180px) and (min-width:821px) {
 body .topbar { padding:8px 16px; gap:8px; }
 body main#main { padding:8px 16px 16px; }
}
@media(max-width:820px),(pointer:coarse) and (max-width:1024px) {
 body .topbar:not([hidden]) { gap:6px; padding:calc(7px + env(safe-area-inset-top,0px)) 10px 7px max(10px,env(safe-area-inset-left,0px)); }
 body .topbar .brand strong { font-size:17px; }
 body .topbar .header-actions { gap:4px; }
 body .tabs { padding:4px 8px; gap:3px; }
 body .tabs .tab { min-height:32px; padding:5px 8px; font-size:13px; }
 body main#main { padding:8px max(8px,env(safe-area-inset-right,0px)) 12px max(8px,env(safe-area-inset-left,0px)); }
 #search-view #search-form { padding:6px 8px; margin:0 0 6px; gap:5px; }
 #search-view #search-form .quiet { min-height:32px; }
 #search-view #query { min-height:42px; font-size:17px; }
 #search-view #search-button { min-height:42px; }
 #search-view .quick-search-filters { padding:6px 8px; gap:5px 7px; }
 #search-view #s-core { gap:5px 8px; }
 #search-view .corefield { flex:1 1 calc(50% - 8px); min-width:0; }
 #search-view #s-chrome-box { padding:6px 8px; }
 :is(#search-view,#drive-view) :is(.quiet,.primary,.secondary,select,.chip) { min-height:32px; }
 :is(#search-view,#drive-view) :is(.toolrow,.filterbar) { padding:5px 7px; }
 :is(#search-view,#drive-view) .list.table .row { padding:8px; gap:5px 6px; }
 :is(#search-view,#drive-view) .list.table .c-act { max-width:none; gap:5px; }
 :is(#search-view,#drive-view) .list .mini { min-height:32px; padding:5px 9px; }
 #drive-view #d-jump { flex-basis:100%; }
 #drive-view .drive-bar .icon-button { min-height:30px; height:30px; }
 #drive-view .filterbar { min-width:0; }
 #drive-view .filterbar > input:not([type=checkbox]) { min-width:0; max-width:100%; }
 #file-dialog .file-actions :is(button,a) { min-height:32px; }
}
@media(max-width:480px) {
 body .topbar .brand strong { font-size:16px; }
 #search-view .quick-search-filters > label:not(.chk) { flex-basis:100%; }
 #search-view .quick-search-filters > .chk { flex-basis:100%; }
 #search-view .corefield { flex-basis:calc(50% - 8px); }
 #search-view .corefield > select { max-width:100%; }
 #drive-view .drive-search #d-q { flex-basis:100%; }
}
/* Preserve all existing hidden/open/column states, including optional controls. */
[hidden] { display:none !important; }

/* Keep result controls on one short row; batch actions need an actual selection. */
:is(#search-view,#drive-view) .selbar:not(.has) [data-batch] { display:none; }
#search-results .resbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:3px 12px; }
#search-results .resbar .meta { min-width:0; flex:1 1 auto; gap:4px 8px; align-items:baseline; }
#search-results .resbar :is(#suggest,#whylow) { margin:0; font-size:12px; gap:4px; }
#search-results .resbar .chip { min-height:26px; padding:3px 7px; }
#search-results .resbar :is(#search-time,#search-note):empty { display:none; }
#search-view .quick-search-filters > label:not(.chk) { display:flex; flex-direction:row; align-items:center; gap:6px; }
#search-view .quick-search-filters > label:not(.chk) input { flex:1 1 100px; width:auto; }
#search-view #type-chips { gap:3px; padding:0; margin:3px 0; min-height:0; }
#search-view #type-chips .chip { min-height:26px; padding:3px 7px; }
#search-view #type-chips .sep { margin:0 1px; }
#search-view #folder-chips { padding:0; min-height:0; margin:3px 0; }
#search-view #search-results .toolrow { align-items:center; }
#search-copy-tools { position:relative; margin-left:auto; }
#search-copy-tools > summary { list-style:none; cursor:pointer; white-space:nowrap; }
#search-copy-tools > summary::-webkit-details-marker { display:none; }
#search-copy-tools > summary::after { content:' ▾'; }
#search-copy-tools[open] > summary::after { content:' ▴'; }
#search-copy-tools > .copy-export-pop { position:absolute; top:calc(100% + 5px); right:0; z-index:12; width:230px; max-width:calc(100vw - 30px); padding:8px; background:var(--panel); border:1px solid var(--line); border-radius:8px; box-shadow:0 5px 22px #17264126; }
#search-copy-tools .copy-export-pop > :is(button,select) { display:block; width:100%; margin:0 0 5px; text-align:left; }
#search-copy-tools .copy-export-pop > :last-child { margin-bottom:0; }
@media(max-width:640px) {
 #search-view .quick-search-filters > label:not(.chk) { flex-basis:100%; }
 #search-copy-tools { margin-left:0; }
 #search-copy-tools > .copy-export-pop { position:fixed; left:8px; right:8px; bottom:8px; top:auto; width:auto; max-width:none; max-height:70vh; overflow:auto; }
}
[hidden] { display:none !important; }

/* The repeated filter explanation is available as the group's hover title. */
#search-view .quick-search-filters > .subtle { display:none; }

/* Color aliases are supplied by main-tools.css; never layer a filter over a theme. */
html[data-theme] body{filter:none;}
html[data-theme] .ldt-download-feedback[hidden]{display:none!important;}

/* Clear size cues and a viewport-bound preview; all transfers stay client-side. */
:is(#search-list,#multi-groups,#drive-list) .file-size { display:inline-flex; align-items:center; justify-content:center; width:max-content; max-width:100%; min-width:4.8em; box-sizing:border-box; border:1px solid var(--line); border-radius:5px; padding:2px 5px; color:var(--ink); background:var(--soft); font-weight:700; font-variant-numeric:tabular-nums; font-size:12px; white-space:nowrap; }
:is(#search-list,#multi-groups,#drive-list) .file-size[data-size-tier=small] { border-left:3px solid var(--brand); }
:is(#search-list,#multi-groups,#drive-list) .file-size[data-size-tier=medium] { border-left:3px solid var(--sub); }
:is(#search-list,#multi-groups,#drive-list) .file-size[data-size-tier=large] { border-left:3px double var(--sub); }
:is(#search-list,#multi-groups).ldt-strips > .row[data-i] > .c-size.file-size { display:inline-flex!important; padding:2px 5px; margin:0; color:var(--ink); background:var(--soft); border:1px solid var(--line); border-left-width:3px; border-radius:5px; font-weight:700; }
.cardmeta .file-size { vertical-align:middle; }
@media(max-width:720px) {
 #file-dialog[open] { display:flex; flex-direction:column; box-sizing:border-box; position:fixed; inset:0; margin:0; width:100%; max-width:100%; height:100vh; height:100dvh; max-height:100vh; max-height:100dvh; padding:calc(6px + env(safe-area-inset-top,0px)) 8px calc(6px + env(safe-area-inset-bottom,0px) + var(--ldt-inline-tts-space,0px)); border-radius:0; overflow:hidden; }
 #file-dialog .dialog-top { flex:none; padding:0 0 4px; margin:0; min-height:32px; }
 #file-dialog .dialog-top .icon-button { min-height:34px; min-width:34px; }
 #file-dialog #file-title { flex:none; font-size:16px; line-height:1.35; margin:4px 0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
 #file-dialog #file-meta { flex:none; margin:2px 0; font-size:11px; }
 #file-dialog #file-path { flex:none; margin:2px 0; padding:3px 6px; font-size:10px; line-height:1.35; max-height:2.7em; overflow:auto; }
 #file-dialog #file-quota:empty,#file-dialog #preview-note:empty { display:none; }
 #file-dialog .file-actions { display:flex; flex-wrap:wrap; flex:none; gap:3px; margin:4px 0; }
 #file-dialog .file-actions :is(button,a) { min-height:30px; padding:4px 7px; font-size:11px; }
 #file-dialog #preview { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; margin-top:3px; overflow:auto; }
 #file-dialog #preview > .lv { flex:1 1 auto; height:auto; min-height:0; border-radius:5px; }
 #file-dialog .lv-bar { flex:none; min-width:0; gap:3px; padding:4px; }
 #file-dialog .lv-bar > :is(input,select) { max-width:100%; min-width:0; }
 #file-dialog .lv-bar .lv-q { flex:1 1 100px; width:100px; }
 #file-dialog .lv-bar .lv-toc { flex:1 1 150px; width:150px; }
 #file-dialog .lv-b { min-width:32px; height:32px; padding:0 5px; font-size:12px; }
 #file-dialog .lv-body { overscroll-behavior:contain; }
 #file-dialog .lv-text { font-family:system-ui,"Microsoft YaHei",sans-serif; font-size:16px; line-height:1.75; padding:10px; }
 #file-dialog .lp { flex:none; min-height:0; }
 #file-dialog .lp-row { flex-wrap:wrap; min-width:0; gap:2px; }
 #file-dialog .lp-row > :is(button,select) { flex-shrink:0; min-height:32px; }
 #file-dialog .lp-video .lp-stage { max-height:46vh; }
 #file-dialog .lp-audio .lp-stage { min-height:120px; }
 #file-dialog .lp-cover { padding:12px; gap:5px; }
 #file-dialog .lp-disc { width:58px; height:58px; font-size:28px; box-shadow:0 4px 18px #0008,inset 0 0 0 18px #0b0d10aa; }
 #file-dialog #preview-note { flex:none; margin:3px 0 0; font-size:10px; line-height:1.3; max-height:2.6em; overflow:auto; }
 :is(#search-list,#multi-groups).ldt-strips > .row[data-i] > .c-size.file-size { display:inline-flex!important; font-size:11px; min-width:4.5em; }
}


/* Document content owns the viewport; related results expand on demand. */
#file-dialog details.v6rel { flex:0 0 auto; min-height:0; max-height:min(30vh,260px); overflow:auto; margin-top:6px; padding-top:4px; color:var(--ink); }
#file-dialog details.v6rel > summary { cursor:pointer; min-height:32px; line-height:32px; padding:0 6px; font-weight:600; border-radius:5px; background:var(--soft); color:var(--ink); }
#file-dialog details.v6rel > .v6rel-body { padding:0 4px 4px; }
@media(max-width:720px) {
 #file-dialog #preview { flex:1 1 0; min-height:160px; }
 #file-dialog #preview > .lv { flex:1 1 0; min-height:160px; }
 #file-dialog details.v6rel { max-height:28vh; }
}
