:root {
  --page: #f2f5f3;
  --surface: #fbfdfc;
  --surface-raised: #f7faf8;
  --surface-muted: #eaf0ed;
  --surface-accent: #e2f2ec;
  --text: #17211d;
  --text-muted: #536159;
  --text-faint: #647169;
  --line: #d4ddd8;
  --line-strong: #a9b7b0;
  --accent: #087657;
  --accent-strong: #055c43;
  --accent-contrast: #f5fbf8;
  --focus-ring: rgb(8 118 87 / 24%);
  --danger: #a33b35;
  --danger-soft: #fbecea;
  --warning: #76531a;
  --warning-soft: #fff5df;
  --success: #087657;
  --success-soft: #e2f2ec;
  --shadow: 0 16px 42px rgb(30 53 43 / 8%);
  --shadow-small: 0 4px 14px rgb(30 53 43 / 6%);
  --radius: 8px;
  --radius-control: 6px;
  color: var(--text);
  background: var(--page);
  color-scheme: light;
  font-family: "Segoe UI Variable", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-size: 15px;
  line-height: 1.55;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: .52;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.2;
}

::selection {
  color: var(--text);
  background: var(--surface-accent);
}

* {
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

[hidden] {
  display: none !important;
}

/* The static shell stays in the layout while the opaque loading overlay covers it:
   crawlers and no-JS visitors always get real content, and the overlay's own
   keyframe fallback reveals the page even when startup scripts never run. */

.initial-loading {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: var(--page);
}

.initial-loading strong {
  font-size: 18px;
  line-height: 1.25;
}

.initial-loading > span:last-child {
  color: var(--text-muted);
  font-size: 13px;
}

.initial-loading-spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* If JavaScript is unavailable, reveal the static shell after a short wait. */
@keyframes initial-loading-fallback {
  0%, 82% { opacity: 1; pointer-events: auto; }
  100% { opacity: 0; pointer-events: none; }
}

body:not(.app-ready) .initial-loading {
  animation: initial-loading-fallback 6.2s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  body:not(.app-ready) .initial-loading {
    animation-duration: .01ms;
    animation-delay: 5.2s;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  color: var(--accent-contrast);
  background: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.button,
.icon-button,
.text-button,
.quick-search-chip,
.mobile-share-button,
.open-share-link,
.selection-item-remove,
.browser-back {
  border: 0;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.button:active:not(:disabled),
.icon-button:active:not(:disabled),
.quick-search-chip:active:not(:disabled),
.browser-back:active:not(:disabled) {
  transform: translateY(1px);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary,
.mobile-share-button {
  color: var(--accent-contrast);
  background: var(--accent);
}

.button-primary:hover:not(:disabled),
.mobile-share-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--surface-accent);
}

.button-quiet {
  color: var(--text-muted);
  background: transparent;
}

.button-quiet:hover:not(:disabled) {
  color: var(--accent-strong);
  background: var(--surface-accent);
}

.button-wide {
  width: 100%;
}

.icon-button,
.selection-item-remove,
.browser-back {
  display: inline-grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--text-muted);
  background: transparent;
}

.icon-button:hover:not(:disabled),
.selection-item-remove:hover:not(:disabled),
.browser-back:hover:not(:disabled) {
  border-color: var(--line);
  color: var(--accent-strong);
  background: var(--surface-accent);
}

.text-button {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  padding: 0 4px;
  color: var(--accent-strong);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover:not(:disabled) {
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 64px;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-glass, rgb(242 245 243 / 92%));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  width: min(1320px, 100%);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: var(--radius-control);
}

.brand-copy,
.brand strong,
.brand small {
  display: block;
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-help-link {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: var(--radius-control);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.topbar-help-link:hover {
  color: var(--accent-strong);
  background: var(--surface-accent);
}

.service-status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--text-muted);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-faint);
}

.service-status.is-online {
  color: var(--success);
}

.service-status.is-online .status-dot {
  background: var(--success);
}

.service-status.is-offline {
  color: var(--danger);
}

.service-status.is-offline .status-dot {
  background: var(--danger);
}

.page-content {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, 560px);
  align-items: end;
  gap: 56px;
  padding: 0 4px 34px;
}

.page-heading-copy {
  min-width: 0;
  padding-bottom: 4px;
}

.page-heading h1 {
  max-width: 680px;
  margin-bottom: 10px;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 760;
  line-height: 1.08;
}

.heading-note {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 16px;
}

.heading-context {
  min-width: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.provider-showcase {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.provider-showcase-item {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
}

.provider-showcase-item + .provider-showcase-item {
  border-left: 1px solid var(--line);
}

.provider-showcase-item img {
  width: 28px;
  height: 28px;
  padding: 2px;
  border-radius: var(--radius-control);
  background: #f7faf8;
  object-fit: contain;
}

.scope-summary {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}

.scope-summary-icon,
.account-toolbar-icon,
.share-title-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-control);
  color: var(--accent-strong);
  background: var(--surface-accent);
}

.scope-summary-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.scope-summary-label {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 12px;
}

.scope-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-bar {
  display: block;
  margin: 0 0 16px;
}

.announcement-items {
  display: grid;
  gap: 8px;
}

.announcement-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dac28d;
  border-radius: var(--radius);
  color: var(--warning);
  background: var(--warning-soft);
}

.announcement-bar-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--warning);
}

.announcement-bar-copy {
  min-width: 0;
}

.announcement-bar-title {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-bar-content {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 13px;
  white-space: normal;
}

.announcement-bar-content > :first-child {
  margin-top: 0;
}

.announcement-bar-content > :last-child {
  margin-bottom: 0;
}

.announcement-bar-content p,
.announcement-bar-content ul,
.announcement-bar-content ol,
.announcement-bar-content pre,
.announcement-bar-content blockquote {
  margin-bottom: 8px;
}

.announcement-bar-content a {
  color: inherit;
  font-weight: 700;
}

.announcement-bar-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px 0;
  border-radius: var(--radius-control);
}

.announcement-bar-content pre,
.announcement-bar-content code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.announcement-bar-content pre {
  max-width: 100%;
  padding: 8px 10px;
  overflow-x: auto;
  background: rgb(118 83 26 / 8%);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  align-items: start;
  gap: 18px;
}

.results-panel,
.share-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.results-panel {
  overflow: hidden;
}

.discovery-toolbar {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: end;
  gap: 12px 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}

.account-toolbar {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  gap: 10px;
}

.account-select {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 6px;
}

.account-select-label,
.quick-searches-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.account-select select,
.search-input-wrap input,
.filter-select select,
.sort-select select,
.password-row input,
.link-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
}

.share-qr {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px;
  margin: 0 0 12px;
  background: var(--surface-raised);
}

.share-qr-image,
.share-qr-image img {
  width: min(184px, 100%);
  aspect-ratio: 1;
  border-radius: 5px;
  background: #fff;
}

.share-qr-image {
  display: block;
}

.share-qr-image img {
  display: block;
  width: 100%;
}

.share-qr figcaption {
  color: var(--text-muted);
  font-size: 12px;
}

.account-select select:hover,
.search-input-wrap input:hover,
.filter-select select:hover,
.sort-select select:hover,
.password-row input:hover,
.link-field input:hover {
  border-color: var(--text-faint);
}

.account-select select:focus,
.search-input-wrap input:focus,
.filter-select select:focus,
.sort-select select:focus,
.password-row input:focus,
.link-field input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.search-toolbar,
.search-form {
  min-width: 0;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 98px 44px;
  gap: 8px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.search-input-wrap input {
  min-height: 46px;
  padding-right: 46px;
  padding-left: 42px;
  font-size: 15px;
}

.search-input-wrap input::placeholder,
.password-row input::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

.search-glyph {
  position: absolute;
  z-index: 1;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.clear-search {
  position: absolute;
  z-index: 1;
  right: 1px;
  width: 44px;
  height: 44px;
}

.filter-select select,
.sort-select select {
  padding-right: 30px;
}

.search-submit {
  min-height: 46px;
}

.toolbar-secondary .icon-button {
  border-color: var(--line-strong);
  background: var(--surface);
}

.quick-searches {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.quick-searches-label {
  margin-right: 4px;
}

.quick-search-chip {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--text-muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.quick-search-chip:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--surface-accent);
}

.scope-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-strong);
  background: var(--surface-accent);
  font-size: 13px;
}

.notice-icon {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 1px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.cache-notice {
  color: var(--warning);
  background: var(--warning-soft);
}

.results-heading {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.results-heading h2,
.share-panel h2 {
  margin-bottom: 2px;
  font-size: 18px;
  font-weight: 760;
}

.browser-nav {
  display: flex;
  width: min(100%, 700px);
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.browser-back {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

.browser-back:disabled {
  opacity: .38;
}

.browser-path {
  min-width: 0;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-text {
  color: var(--text-muted);
  font-size: 13px;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-select select {
  min-width: 116px;
  min-height: 42px;
  background: var(--surface-raised);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.results-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.results-table th,
.results-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.results-table th {
  height: 42px;
  color: var(--text-faint);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 700;
}

.results-table td {
  height: 76px;
}

.results-table tbody tr {
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .14s ease, box-shadow .14s ease;
}

.results-table tbody tr:hover {
  background: var(--surface-raised);
}

.results-table tbody tr.is-selected {
  background: var(--surface-accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.results-table tbody tr.is-folder-row .file-name::after {
  margin-left: 8px;
  color: var(--accent-strong);
  content: "进入";
  font-size: 11px;
  font-weight: 700;
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

.checkbox-cell {
  width: 56px;
  padding-right: 2px !important;
  padding-left: 20px !important;
}

.type-col {
  width: 86px;
}

.size-col {
  width: 100px;
}

.updated-col {
  width: 136px;
}

.row-check {
  box-sizing: content-box;
  width: 19px;
  height: 19px;
  padding: 12px;
  margin: -12px;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
}

.file-name-cell,
.file-name-content {
  min-width: 0;
}

.file-name-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.file-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-control);
  color: var(--accent-strong);
  background: var(--surface-accent);
}

.file-icon.file-type {
  position: relative;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--file-icon-color, var(--text-muted)) 18%, transparent);
  color: var(--file-icon-color, var(--text-muted));
  background: var(--file-icon-bg, var(--surface-muted));
}

.file-icon.file-type::after {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 23px;
  padding: 2px 3px;
  border: 2px solid var(--surface);
  border-radius: 4px;
  color: #fff;
  background: var(--file-icon-color, var(--text-muted));
  content: attr(data-badge);
  font-size: 6px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.selection-list .mini-icon.file-type::after {
  right: -5px;
  bottom: -3px;
  min-width: 18px;
  padding: 1px 2px;
  border-width: 1px;
  font-size: 5px;
}

.file-icon-archive { --file-icon-color: #8a4f08; --file-icon-bg: #fff1d8; }
.file-icon-firmware { --file-icon-color: #42610c; --file-icon-bg: #edf5d8; }
.file-icon-application { --file-icon-color: #76531a; --file-icon-bg: #fff5df; }
.file-icon-pdf { --file-icon-color: #a33b35; --file-icon-bg: #fbecea; }
.file-icon-document { --file-icon-color: #235fa4; --file-icon-bg: #e6f0fb; }
.file-icon-spreadsheet { --file-icon-color: #087657; --file-icon-bg: #e2f2ec; }
.file-icon-presentation { --file-icon-color: #a34b22; --file-icon-bg: #fcebdd; }
.file-icon-image { --file-icon-color: #7a3da0; --file-icon-bg: #f3e9fa; }
.file-icon-video { --file-icon-color: #674ab0; --file-icon-bg: #eeeafb; }
.file-icon-audio { --file-icon-color: #a13366; --file-icon-bg: #fae8f0; }
.file-icon-code { --file-icon-color: #536159; --file-icon-bg: #eaf0ed; }
.file-icon-checksum { --file-icon-color: #087657; --file-icon-bg: #e2f2ec; }
.file-icon-generic { --file-icon-color: var(--text-muted); --file-icon-bg: var(--surface-muted); }

[data-theme="dark"] .file-icon-archive { --file-icon-color: #f0bf6e; --file-icon-bg: #3a2d1b; }
[data-theme="dark"] .file-icon-firmware { --file-icon-color: #b6d878; --file-icon-bg: #29341e; }
[data-theme="dark"] .file-icon-application { --file-icon-color: #e4c27c; --file-icon-bg: #332c1d; }
[data-theme="dark"] .file-icon-pdf { --file-icon-color: #f09a94; --file-icon-bg: #3b2423; }
[data-theme="dark"] .file-icon-document { --file-icon-color: #8fc1f5; --file-icon-bg: #1f3042; }
[data-theme="dark"] .file-icon-spreadsheet,
[data-theme="dark"] .file-icon-checksum { --file-icon-color: #68cda8; --file-icon-bg: #19382e; }
[data-theme="dark"] .file-icon-presentation { --file-icon-color: #f2aa7d; --file-icon-bg: #3b291f; }
[data-theme="dark"] .file-icon-image { --file-icon-color: #d3a2ef; --file-icon-bg: #34243d; }
[data-theme="dark"] .file-icon-video { --file-icon-color: #b9a7ef; --file-icon-bg: #2e2941; }
[data-theme="dark"] .file-icon-audio { --file-icon-color: #eda4c5; --file-icon-bg: #3b2430; }
[data-theme="dark"] .file-icon-code { --file-icon-color: #b4c1ba; --file-icon-bg: #222d28; }
}

.account-provider-icon {
  border: 1px solid var(--line);
  background: #f7faf8;
}

.account-provider-icon .provider-logo {
  display: block;
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.file-name,
.file-path {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
}

.file-detail-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.file-path-provider {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  padding: 1px;
  border-radius: 3px;
  background: #f7faf8;
  object-fit: contain;
}

.file-path {
  min-width: 0;
  color: var(--text-faint);
  font-size: 12px;
}

.file-source {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.provider-badge {
  display: inline-flex;
  min-height: 24px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text-muted);
  background: var(--surface-raised);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.provider-badge-icon,
.provider-logo {
  display: block;
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.provider-badge-icon {
  padding: 1px;
  border-radius: 3px;
  background: #f7faf8;
}

.file-account {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-label,
.size-label,
.updated-label {
  color: var(--text-muted);
  font-size: 13px;
}

.state-block {
  display: flex;
  min-height: 292px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 40px 20px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  background: var(--surface-raised);
  font-size: 14px;
  text-align: center;
}

.state-block strong {
  color: var(--text);
  font-size: 16px;
}

.state-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 4px;
  border-radius: var(--radius-control);
  color: var(--accent-strong);
  background: var(--surface-accent);
}

.state-error .state-icon,
.state-error strong {
  color: var(--danger);
}

.state-error .state-icon {
  background: var(--danger-soft);
}

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.share-panel {
  position: sticky;
  top: 82px;
  padding: 16px;
}

.share-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.share-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-share-close {
  display: none;
}

.share-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.count-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: var(--radius-control);
  color: var(--accent-strong);
  background: var(--surface-accent);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.share-account {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  gap: 7px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 12px;
}

.share-account strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-account > span:first-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

.selection-empty {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.selection-empty strong {
  color: var(--text);
  font-size: 16px;
}

.selection-preview {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}

.selection-preview-topline {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.selection-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.selection-list li {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 10px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  background: var(--surface-raised);
  font-size: 13px;
}

.selection-list li > span:nth-child(2) {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-list .mini-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  color: var(--file-icon-color, var(--accent-strong));
  background: var(--file-icon-bg, transparent);
}

.selection-list .mini-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.selection-item-remove {
  margin-left: auto;
}

.share-form {
  padding-top: 16px;
}

.share-form fieldset {
  padding: 0;
  margin: 0 0 18px;
  border: 0;
}

.share-form legend {
  padding: 0;
  margin-bottom: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-muted);
}

.segmented-control label {
  position: relative;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 13px;
  transition: color .16s ease, background-color .16s ease;
}

.segmented-control input:checked + span {
  color: var(--accent-contrast);
  background: var(--accent);
  font-weight: 700;
}

.segmented-control input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.toggle-row {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.toggle-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-muted);
  transition: background-color .16s ease, border-color .16s ease;
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  content: "";
  transition: transform .16s ease;
}

.toggle-row input:checked + .toggle {
  border-color: var(--accent);
  background: var(--accent);
}

.toggle-row input:checked + .toggle::after {
  transform: translateX(16px);
}

.toggle-row input:focus-visible + .toggle {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.password-row {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.field-hint {
  color: var(--text-faint);
  font-size: 12px;
}

.share-loading {
  display: flex;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--text-muted);
  font-size: 14px;
}

.share-elapsed {
  min-width: 42px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.inline-error {
  padding: 10px 12px;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, transparent);
  border-radius: var(--radius-control);
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
}

.share-result {
  padding-top: 16px;
}

.result-success-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  margin-bottom: 12px;
  color: var(--success);
  background: var(--success-soft);
}

.success-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-control);
  color: var(--accent-contrast);
  background: var(--success);
}

.result-success-heading strong,
.result-success-heading span:last-child {
  display: block;
}

.result-success-heading span:last-child {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.link-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-bottom: 10px;
}

.link-field input {
  min-width: 0;
  background: var(--surface-raised);
  font-size: 13px;
}

.password-output {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 11px;
  margin-bottom: 12px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 13px;
}

.password-output code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
}

.password-output .text-button {
  margin-left: auto;
}

.share-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.open-share-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  color: var(--accent-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.open-share-link:hover {
  border-color: var(--accent);
  background: var(--surface-accent);
}

.mobile-share-dock {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 40;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  overflow-wrap: anywhere;
  pointer-events: auto;
  animation: toast-in .2s ease-out;
}

.toast.is-error {
  border-color: var(--danger);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-footer {
  display: flex;
  width: min(1320px, calc(100% - 56px));
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px 30px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 12px;
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.donation-button {
  margin-left: auto;
}

.topbar .donation-button {
  min-height: 36px;
  margin: 0 10px 0 0;
  border-color: #b77015;
  color: #fff;
  background: #b77015;
  box-shadow: 0 5px 14px rgb(116 69 10 / 18%);
}

.topbar .donation-button:hover:not(:disabled) {
  border-color: #8d540d;
  background: #8d540d;
}

.donation-dialog {
  width: min(390px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 70px rgb(7 18 13 / 28%);
}

.donation-dialog::backdrop {
  background: rgb(8 19 14 / 62%);
}

.donation-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}

.donation-dialog-header strong,
.donation-dialog-header span {
  display: block;
}

.donation-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin: 16px 20px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.donation-method-tab {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.donation-method-tab:hover { color: var(--text); }
.donation-method-tab.is-active { color: var(--text); background: var(--surface); box-shadow: 0 3px 10px rgb(24 42 34 / 7%); }
.donation-method-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.donation-method-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 72%);
}

.donation-method-mark.is-wechat { background: #16a465; }
.donation-method-mark.is-alipay { background: #1677ff; }

.donation-dialog-header strong {
  font-size: 16px;
}

.donation-dialog-header span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.donation-qr-wrap {
  min-height: 326px;
  padding: 20px;
}

.donation-qr-panel {
  display: grid;
  min-height: 286px;
  align-content: center;
  justify-items: center;
  gap: 14px;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.donation-qr-wrap img {
  width: min(236px, 100%);
  aspect-ratio: 1;
  padding: 8px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(18 38 29 / 12%);
}

.donation-qr-missing {
  max-width: 20ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.donation-scan-note {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.notice-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(.96) translateY(8px);
  transition: opacity .2s ease, transform .25s cubic-bezier(.4,0,.2,1);
}

.notice-dialog[open] { opacity: 1; transform: none; }

.notice-dialog::backdrop {
  background: rgb(10 18 14 / 52%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.notice-dialog-panel {
  display: flex;
  max-height: calc(100dvh - 34px);
  flex-direction: column;
}

.notice-dialog-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.notice-dialog-header strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-dialog-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: var(--warning);
  background: var(--warning-soft);
}

.notice-dialog-icon .ui-icon { width: 18px; height: 18px; }

.notice-dialog-content {
  padding: 18px;
  overflow: auto;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: normal;
}

.notice-dialog-content > :first-child { margin-top: 0; }
.notice-dialog-content > :last-child { margin-bottom: 0; }
.notice-dialog-content p,
.notice-dialog-content ul,
.notice-dialog-content ol,
.notice-dialog-content pre,
.notice-dialog-content blockquote { margin-bottom: 12px; }
.notice-dialog-content img { display: block; max-width: 100%; height: auto; margin: 12px 0; border-radius: 6px; }
.notice-dialog-content pre { max-width: 100%; padding: 10px; overflow-x: auto; background: var(--surface-muted); }
.notice-dialog-content a { color: var(--accent); font-weight: 700; }

.notice-dialog-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

.live-stats {
  position: fixed;
  z-index: 35;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-muted);
  background: var(--surface);
  box-shadow: 0 10px 28px rgb(22 38 30 / 12%);
}

.live-stat {
  display: grid;
  grid-template-columns: 16px auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  min-width: 92px;
  padding: 8px 11px;
}

.live-stat + .live-stat { border-left: 1px solid var(--line); }
.live-stat .ui-icon { grid-row: 1 / 3; width: 16px; height: 16px; color: var(--accent); }
.live-stat strong { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.live-stat small { color: var(--text-faint); font-size: 9px; line-height: 1.2; }

@media (max-width: 700px) {
  .notice-dialog {
    width: 100%;
    max-width: none;
    max-height: min(82dvh, 720px);
    margin: 0;
    align-self: end;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(18px);
  }
  .notice-dialog[open] { transform: translateY(0); }
  .notice-dialog-footer { justify-content: stretch; }
  .notice-dialog-footer .button { flex: 1; }
}

.clipboard-fallback {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111715;
    --surface: #18201d;
    --surface-raised: #1c2521;
    --surface-muted: #222d28;
    --surface-accent: #19382e;
    --text: #edf3f0;
    --text-muted: #b4c1ba;
    --text-faint: #8f9d96;
    --line: #33413a;
    --line-strong: #596a62;
    --accent: #55bc97;
    --accent-strong: #7bd1b1;
    --accent-contrast: #0c1c16;
    --focus-ring: rgb(85 188 151 / 28%);
    --danger: #f09a94;
    --danger-soft: #3b2423;
    --warning: #e4c27c;
    --warning-soft: #332c1d;
    --success: #68cda8;
    --success-soft: #19382e;
    --shadow: 0 18px 46px rgb(3 9 7 / 26%);
    --shadow-small: 0 4px 14px rgb(3 9 7 / 24%);
    color-scheme: dark;
  }

  .topbar {
    background: rgb(17 23 21 / 92%);
  }

  .announcement-bar {
    border-color: #665633;
  }
}

@media (max-width: 1120px) {
  .page-heading {
    grid-template-columns: minmax(0, 1fr) 470px;
    gap: 34px;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 326px;
  }

  .discovery-toolbar {
    grid-template-columns: 1fr;
  }

  .account-toolbar {
    max-width: 360px;
  }
}

@media (max-width: 940px) {
  .live-stats { right: 10px; bottom: 82px; max-width: calc(100vw - 20px); }
  .live-stat { min-width: 0; padding-inline: 9px; }
  body:has(.mobile-share-dock:not([hidden])) .live-stats { display: none; }
  .page-content,
  .site-footer {
    width: min(760px, calc(100% - 36px));
  }

  .footer-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .donation-button {
    margin: 8px 0 0;
  }

  .page-heading {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .heading-context {
    width: 100%;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  body.mobile-share-open {
    overflow: hidden;
  }

  .share-panel-backdrop {
    position: fixed;
    z-index: 59;
    inset: 62px 0 74px;
    background: rgb(8 19 14 / 52%);
  }

  .mobile-share-close {
    display: inline-grid;
  }

  .mobile-share-dock {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 12px;
    padding: 10px max(18px, calc((100vw - 760px) / 2)) calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -10px 28px rgb(30 53 43 / 10%);
  }

  .mobile-share-summary {
    min-width: 0;
    flex: 1;
  }

  .mobile-share-summary span,
  .mobile-share-summary strong {
    display: block;
  }

  .mobile-share-summary span {
    color: var(--text-faint);
    font-size: 12px;
  }

  .mobile-share-summary strong {
    color: var(--text);
  font-size: 14px;
  white-space: normal;
}

  .mobile-share-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
  }

  .site-footer {
    padding-bottom: 96px;
  }

  .toast-region {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 700px) {
  .topbar .donation-button { width: 38px; min-width: 38px; padding: 0; justify-content: center; }
  .topbar .donation-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .topbar {
    min-height: 58px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand strong {
    max-width: 170px;
    font-size: 13px;
  }

  .brand small {
    display: none;
  }

  .service-status {
    width: auto;
    min-width: 66px;
    height: 44px;
    justify-content: center;
    padding: 0 8px;
    border-color: transparent;
    background: transparent;
    font-size: 0;
  }

  .service-status::after {
    content: attr(data-short-status);
    font-size: 12px;
    font-weight: 700;
  }

  .page-content {
    width: calc(100% - 24px);
    padding: 24px 0 112px;
  }

  .page-heading {
    gap: 20px;
    padding: 0 2px 24px;
  }

  .page-heading h1 {
    margin-bottom: 8px;
    font-size: 30px;
  }

  .heading-note {
    font-size: 14px;
  }

  .provider-showcase-item {
    min-height: 54px;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
  }

  .provider-showcase-item img {
    width: 25px;
    height: 25px;
  }

  .scope-summary-copy {
    display: block;
  }

  .scope-summary-label,
  .scope-summary strong {
    display: block;
  }

  .announcement-bar {
    margin-bottom: 14px;
  }

  .announcement-item {
    gap: 8px;
    padding: 10px 12px;
  }

  .results-panel,
  .share-panel {
    box-shadow: var(--shadow-small);
  }

  .discovery-toolbar {
    gap: 14px;
    padding: 14px 12px;
  }

  .account-toolbar {
    max-width: none;
    align-items: flex-end;
  }

  .search-form {
    grid-template-columns: minmax(0, 1fr) 90px 44px;
    gap: 8px;
  }

  .search-input-wrap {
    grid-column: 1 / -1;
  }

  .filter-select {
    grid-column: 1;
  }

  .search-submit {
    grid-column: 2;
    min-width: 90px;
  }

  .toolbar-secondary {
    grid-column: 3;
    grid-row: 2;
  }

  .filter-select select {
    padding-right: 30px;
  }

  .quick-searches {
    flex-wrap: nowrap;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .quick-searches::-webkit-scrollbar {
    display: none;
  }

  .quick-searches-label,
  .quick-search-chip {
    flex: 0 0 auto;
  }

  .results-heading {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px;
  }

  .results-actions {
    width: 100%;
  }

  .sort-select {
    min-width: 0;
    flex: 1;
  }

  .sort-select select {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
    padding: 0 12px;
    background: var(--surface-raised);
  }

  .results-table {
    display: block;
    min-width: 0;
  }

  .results-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .results-table tbody {
    display: block;
  }

  .results-table tbody tr {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    column-gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .results-table tbody tr:last-child {
    border-bottom: 0;
  }

  .results-table tbody tr.is-selected {
    margin: 0 -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .results-table tbody tr.is-account-root .checkbox-cell {
    display: none;
  }

  .results-table tbody tr.is-account-root .file-name-cell {
    grid-column: 1 / -1;
  }

  .results-table td {
    display: block;
    height: auto;
    padding: 0;
    border: 0;
  }

  .checkbox-cell {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 38px;
    align-self: center;
    padding: 0 !important;
    text-align: center;
  }

  .file-name-cell {
    grid-column: 2 / -1;
    grid-row: 1;
  }

  .type-label,
  .size-label {
    margin-top: 8px;
  }

  .type-label {
    grid-column: 2;
    grid-row: 2;
  }

  .size-label {
    grid-column: 3;
    grid-row: 2;
    text-align: right;
  }

  .updated-label {
    grid-column: 2 / -1;
    grid-row: 3;
    margin-top: 4px;
  }

  .type-label::before,
  .size-label::before,
  .updated-label::before {
    margin-right: 5px;
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 600;
  }

  .type-label::before { content: "类型"; }
  .size-label::before { content: "大小"; }
  .updated-label::before { content: "更新"; }

  .file-name-wrap {
    align-items: flex-start;
  }

  .file-detail-line {
    align-items: center;
    flex-direction: row;
    gap: 5px;
  }

  .file-path {
    width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .state-block {
    min-height: 230px;
  }

  .share-panel {
    padding: 15px;
    scroll-margin-top: 70px;
  }

  .share-result-actions {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: calc(100% - 24px);
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .toast-region {
    right: 12px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 420px) {
  .page-content {
    width: calc(100% - 20px);
  }

  .account-toolbar-icon {
    display: none;
  }

  .provider-showcase-item span {
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

}

@media (prefers-reduced-motion: no-preference) {
  .page-heading {
    animation: page-enter .42s cubic-bezier(.16, 1, .3, 1) both;
  }

  .workspace-grid {
    animation: page-enter .48s .08s cubic-bezier(.16, 1, .3, 1) both;
  }

  @keyframes page-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

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

  .spinner {
    animation-duration: 1.8s !important;
    animation-iteration-count: infinite !important;
  }

  .initial-loading-spinner {
    animation-duration: 1.8s !important;
    animation-iteration-count: infinite !important;
  }
}
