:root {
  --paper: #eef3ef;
  --window: rgba(250, 252, 250, 0.94);
  --sidebar: rgba(228, 237, 231, 0.9);
  --row-hover: rgba(13, 122, 104, 0.07);
  --ink: #16231f;
  --ink-soft: #53635d;
  --ink-faint: #7b8984;
  --line: rgba(22, 35, 31, 0.13);
  --line-strong: rgba(22, 35, 31, 0.22);
  --accent: #0b806b;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(11, 128, 107, 0.12);
  --warm: #a8682d;
  --danger: #c43d35;
  --shadow: rgba(24, 58, 49, 0.13);
  --radius-sm: 7px;
  --radius-md: 12px;
  --duration-fast: 160ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
  --paper: #0d1715;
  --window: rgba(18, 31, 27, 0.96);
  --sidebar: rgba(16, 29, 25, 0.94);
  --row-hover: rgba(99, 214, 189, 0.07);
  --ink: #edf8f4;
  --ink-soft: #b7cbc4;
  --ink-faint: #82968f;
  --line: rgba(226, 245, 238, 0.13);
  --line-strong: rgba(226, 245, 238, 0.23);
  --accent: #63d6bd;
  --accent-contrast: #06241d;
  --accent-soft: rgba(99, 214, 189, 0.12);
  --warm: #e5aa68;
  --danger: #ff8f87;
  --shadow: rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--paper);
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 11% 2%, var(--accent-soft), transparent 30rem),
    linear-gradient(180deg, var(--paper), color-mix(in srgb, var(--paper) 91%, var(--ink) 9%));
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.archive-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 38px));
  margin: 0 auto;
  padding: 18px 0;
}

.archive-brand,
.archive-nav-actions,
.home-link,
.language-toggle {
  display: inline-flex;
  align-items: center;
}

.archive-brand {
  gap: 9px;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.archive-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--window);
  box-shadow: 0 4px 0 var(--shadow);
  color: var(--accent);
}

.archive-brand-mark svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.archive-brand > i {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}

.archive-brand strong {
  color: var(--accent);
}

.archive-nav-actions {
  gap: 8px;
}

.language-toggle,
.home-link {
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--window);
  color: var(--ink-soft);
  text-decoration: none;
}

.language-toggle {
  min-width: 42px;
  padding: 0 10px;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}

.home-link {
  gap: 7px;
  padding: 0 14px;
  font-size: 12px;
}

.home-link svg {
  width: 14px;
  height: 14px;
}

.archive-main {
  width: min(1180px, calc(100% - 38px));
  margin: 0 auto;
  padding: 12px 0 30px;
}

.finder-window {
  display: grid;
  min-height: min(650px, calc(100svh - 150px));
  grid-template-columns: 250px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--window);
  box-shadow: 0 18px 50px var(--shadow), 0 7px 0 var(--shadow);
}

.finder-sidebar {
  min-width: 0;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px 12px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
}

.sidebar-title svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.resource-tree {
  display: grid;
  gap: 2px;
  padding-top: 2px;
}

.tree-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  border-radius: var(--radius-sm);
}

.tree-row:not(.disabled):hover {
  background: var(--row-hover);
}

.tree-row.active {
  background: var(--accent-soft);
}

.tree-row.disabled {
  opacity: 0.46;
}

.tree-branch {
  display: grid;
  justify-items: center;
}

.tree-disclosure,
.tree-select {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tree-disclosure:disabled,
.tree-select:disabled {
  cursor: not-allowed;
}

.tree-disclosure:hover:not(:disabled),
.tree-select:hover:not(:disabled) {
  color: var(--ink);
}

.tree-disclosure {
  display: grid;
  place-items: center;
  width: 22px;
  height: 28px;
  padding: 0;
  color: var(--ink-faint);
}

.tree-disclosure svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.tree-disclosure[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.tree-disclosure-spacer {
  width: 22px;
}

.tree-select {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: left;
}

.tree-select svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--warm);
  stroke-width: 1.8;
}

.tree-select span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-children {
  display: grid;
  gap: 2px;
  margin-left: 18px;
}

.finder-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.finder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--window) 94%, transparent);
}

.toolbar-actions {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.search-scope {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
}

.search-scope button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.search-scope button:hover {
  color: var(--ink);
}

.search-scope button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
}

.mobile-filter-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.mobile-filter-toggle svg {
  width: 14px;
  height: 14px;
}

.breadcrumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 11px;
}

.breadcrumbs span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs button {
  max-width: 15rem;
  overflow: hidden;
  padding: 3px 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs button:hover {
  background: var(--row-hover);
  color: var(--accent);
}

.breadcrumbs button:last-child {
  color: var(--ink);
  font-weight: 650;
}

.breadcrumbs i {
  width: 12px;
  height: 12px;
  color: var(--ink-faint);
}

.search-field {
  position: relative;
  width: min(250px, 36vw);
  min-width: 160px;
  flex: 0 1 250px;
}

.search-box {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
}

.search-box svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
}

.search-box input {
  min-width: 0;
  flex: 1;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.search-box input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.search-box input::placeholder {
  color: var(--ink-faint);
}

.search-clear {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
}

.search-clear:hover {
  background: var(--row-hover);
  color: var(--ink);
}

.search-clear svg {
  width: 13px;
  height: 13px;
}

.recent-searches {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  right: 0;
  width: min(360px, calc(100vw - 52px));
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--window);
  box-shadow: 0 16px 38px var(--shadow);
}

.recent-searches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 3px 8px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
}

.recent-searches-header button {
  padding: 3px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 9px;
}

.recent-searches-header button:hover {
  background: var(--accent-soft);
}

.recent-search-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recent-search-item {
  max-width: 100%;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-search-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.selection-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.selection-heading h1 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 22px;
  font-weight: 650;
}

.selection-stats-button {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
  color: var(--ink-faint);
  text-decoration: none;
  place-items: center;
}

.selection-qq-button {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
  color: var(--ink-faint);
  cursor: help;
  place-items: center;
}

.selection-qq-button:hover,
.selection-qq-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.selection-qq-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.selection-qq-tooltip {
  position: absolute;
  z-index: 60;
  top: calc(100% + 7px);
  left: 50%;
  width: max-content;
  padding: 6px 8px;
  transform: translate(-50%, -4px);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--window);
  box-shadow: 0 9px 24px var(--shadow);
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out-expo),
    visibility 0s linear var(--duration-fast);
  visibility: hidden;
}

.selection-qq-button:hover .selection-qq-tooltip,
.selection-qq-button:focus-visible .selection-qq-tooltip {
  transform: translate(-50%, 0);
  opacity: 1;
  transition-delay: 0s;
  visibility: visible;
}

.selection-stats-button:hover,
.selection-stats-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.selection-stats-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.selection-stats-tooltip {
  position: absolute;
  z-index: 60;
  top: calc(100% + 7px);
  left: 50%;
  width: max-content;
  padding: 6px 8px;
  transform: translate(-50%, -4px);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--window);
  box-shadow: 0 9px 24px var(--shadow);
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out-expo),
    visibility 0s linear var(--duration-fast);
  visibility: hidden;
}

.selection-stats-button:hover .selection-stats-tooltip,
.selection-stats-button:focus-visible .selection-stats-tooltip {
  transform: translate(-50%, 0);
  opacity: 1;
  transition-delay: 0s;
  visibility: visible;
}

.selection-heading p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.selection-heading > span {
  flex: none;
  color: var(--ink-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.usage-notice {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 24px;
  gap: 9px;
  align-items: center;
  margin: 10px 20px 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--warm) 38%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--warm) 8%, transparent);
  color: var(--ink-soft);
  cursor: help;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.usage-notice > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-notice.warning {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: color-mix(in srgb, var(--danger) 78%, var(--ink));
  cursor: default;
}

.usage-notice.warning > svg {
  color: var(--danger);
}

.usage-notice svg {
  width: 17px;
  height: 17px;
  margin: 0;
  color: var(--warm);
  stroke-width: 1.8;
}

.usage-notice-more {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--warm) 35%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--warm) 8%, transparent);
  color: var(--warm);
  cursor: help;
}

.usage-notice-more:hover,
.usage-notice-more[aria-expanded="true"] {
  border-color: var(--warm);
  background: color-mix(in srgb, var(--warm) 16%, transparent);
}

.usage-notice-more svg {
  width: 13px;
  height: 13px;
}

.usage-notice-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: min(620px, calc(100vw - 64px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--window);
  box-shadow: 0 14px 36px var(--shadow);
  color: var(--ink-soft);
  cursor: default;
  text-align: left;
  white-space: normal;
}

.usage-notice-popover strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.usage-notice-popover p {
  margin: 6px 0 0;
  font-size: 10.5px;
  line-height: 1.65;
}

.file-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 12px;
  scrollbar-width: thin;
}

.resource-skeleton {
  display: grid;
  gap: 0;
  padding: 0 12px;
}

.skeleton-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 120px 190px;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
}

.skeleton-row span,
.skeleton-row i {
  display: block;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--ink) 7%, transparent),
    color-mix(in srgb, var(--ink) 13%, transparent),
    color-mix(in srgb, var(--ink) 7%, transparent)
  );
  background-size: 240% 100%;
  animation: resource-skeleton-shimmer 1.25s linear infinite;
}

.skeleton-row span {
  width: min(280px, 76%);
  height: 34px;
  border-radius: 9px;
}

.skeleton-row i:nth-child(3) {
  width: 78%;
}

.skeleton-row i:nth-child(4) {
  width: 62%;
}

@keyframes resource-skeleton-shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 120px 190px;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
}

.file-row:hover {
  background: var(--row-hover);
}

.file-name {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.file-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.file-title {
  min-width: 0;
}

.file-title strong,
.file-title small {
  display: block;
}

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

.file-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--window) 72%, transparent);
  font-size: 8.5px;
  font-weight: 750;
  white-space: nowrap;
}

.file-badge.danger {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
  background: color-mix(in srgb, var(--danger) 11%, transparent);
  color: var(--danger);
}

.file-title strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-help {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
}

.file-help-trigger {
  display: grid;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--window) 76%, transparent);
  color: var(--ink-faint);
  cursor: help;
  place-items: center;
}

.file-help-trigger:hover,
.file-help-trigger:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.file-help-trigger svg {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

.file-help-tooltip {
  position: absolute;
  z-index: 70;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(310px, calc(100vw - 52px));
  padding: 7px 9px;
  transform: translateY(-4px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--window);
  box-shadow: 0 10px 28px var(--shadow);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out-expo),
    visibility 0s linear var(--duration-fast);
  visibility: hidden;
  white-space: normal;
}

.file-help-warning {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-weight: 750;
}

.selection-description-warning {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-weight: 750;
}

.file-help:hover .file-help-tooltip,
.file-help:focus-within .file-help-tooltip {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0s;
  visibility: visible;
}

.file-title .file-path {
  margin-top: 3px;
  color: var(--warm);
  font-size: 8.5px;
}

.file-title small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-title .file-download-count {
  margin-top: 3px;
  color: var(--accent);
  font-size: 8.5px;
  font-weight: 700;
}

.file-meta {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.file-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.project-open {
  width: 100%;
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-end;
}

.file-actions.two-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.file-actions.two-actions .file-download {
  min-width: 0;
  padding-right: 8px;
  padding-left: 8px;
}

.file-actions.single-action {
  width: 100%;
}

.file-actions.single-action .file-download {
  width: 100%;
}

.plugin-center {
  display: grid;
  min-height: 100%;
  grid-template-columns: 220px minmax(0, 1fr);
}

.plugin-center-shell {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.plugin-update-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 12px 0;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  line-height: 1.5;
}

.plugin-update-tip svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.plugin-center {
  flex: 1;
}

.plugin-center-sidebar {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--sidebar) 42%, transparent);
}

.plugin-list-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: left;
}

.plugin-list-item:hover {
  border-color: var(--line);
  background: var(--row-hover);
  color: var(--ink);
}

.plugin-list-item.active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.plugin-list-item strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-list-item small {
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.plugin-detail {
  min-width: 0;
  padding: 22px;
}

.plugin-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.plugin-detail-kicker {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 750;
}

.plugin-detail h2 {
  margin: 5px 0 0;
  font-size: 24px;
}

.plugin-detail-header p {
  max-width: 48rem;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.plugin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 9px;
  margin: 20px 0 0;
}

.plugin-stats div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
}

.plugin-stats dt {
  color: var(--ink-faint);
  font-size: 9px;
}

.plugin-stats dd {
  margin: 5px 0 0;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.plugin-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.plugin-action-button:hover {
  background: color-mix(in srgb, var(--accent) 84%, #000000);
}

.plugin-action-button.preview {
  border-color: color-mix(in srgb, var(--warm) 35%, var(--line));
  background: color-mix(in srgb, var(--warm) 9%, transparent);
  color: var(--warm);
}

.plugin-action-button.preview:hover {
  border-color: var(--warm);
  background: color-mix(in srgb, var(--warm) 16%, transparent);
}

.plugin-action-button.history {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.plugin-action-button.history:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.plugin-action-button svg {
  width: 14px;
  height: 14px;
}

.plugin-version-history {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--window) 70%, transparent);
}

.plugin-version-history {
  display: grid;
  gap: 8px;
}

.plugin-version-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.55fr) minmax(0, 1.45fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
}

.plugin-version-row > div:first-child strong,
.plugin-version-row > div:first-child small {
  display: block;
}

.plugin-version-row > div:first-child strong {
  font-size: 11px;
}

.plugin-version-row > div:first-child small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.plugin-version-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.plugin-mini-action {
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 9px;
}

.plugin-mini-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.plugin-version-actions .plugin-action-button {
  min-height: 27px;
  padding: 0 8px;
  font-size: 9px;
}

.plugin-version-actions .plugin-action-button svg {
  width: 12px;
  height: 12px;
}

.plugin-version-actions .platform-action {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
  font-weight: 800;
}

.plugin-version-unavailable {
  color: var(--ink-faint);
  font-size: 9px;
}

.plugin-version-changelog {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 0 0 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
}

body.plugin-center-mode .finder-sidebar {
  display: none;
}

body.plugin-center-mode .finder-window {
  grid-template-columns: minmax(0, 1fr);
}

.file-download:hover {
  background: color-mix(in srgb, var(--accent) 84%, #000000);
}

.file-download.external {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
}

.file-download.external:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.file-download.preview {
  border: 1px solid color-mix(in srgb, var(--warm) 35%, var(--line));
  background: color-mix(in srgb, var(--warm) 9%, transparent);
  color: var(--warm);
}

.file-download.preview:hover {
  border-color: var(--warm);
  background: color-mix(in srgb, var(--warm) 16%, transparent);
}

.file-download svg {
  width: 13px;
  height: 13px;
}

.archive-empty {
  flex: 1;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 330px;
  padding: 50px 18px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-mark svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.7;
}

.archive-empty h2 {
  margin: 16px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.archive-empty p {
  max-width: 28rem;
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.65;
}

.empty-search-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin-top: 14px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.empty-search-all:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.empty-search-all svg {
  width: 13px;
  height: 13px;
}

.filter-sheet-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px 14px 0;
  background: rgba(5, 14, 12, 0.42);
  backdrop-filter: blur(5px);
}

.filter-sheet {
  width: min(620px, 100%);
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--window);
  box-shadow: 0 -18px 50px var(--shadow);
  animation: filter-sheet-in 220ms var(--ease-out-expo);
}

.filter-sheet-grip {
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--line-strong);
}

.filter-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.filter-sheet-header h2 {
  margin: 0;
  font-size: 16px;
}

.filter-sheet-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.filter-sheet-close:hover {
  background: var(--row-hover);
  color: var(--ink);
}

.filter-sheet-close svg {
  width: 15px;
  height: 15px;
}

.filter-sheet-help {
  margin: 8px 0 16px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.filter-sheet-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filter-sheet-options button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--window) 72%, transparent);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.filter-sheet-options button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

body.filter-sheet-open {
  overflow: hidden;
}

@keyframes filter-sheet-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.archive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 38px));
  margin: 0 auto;
  padding: 8px 0 24px;
  color: var(--ink-faint);
  font-size: 10px;
}

.archive-footer a {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none;
}

.noscript {
  width: min(1180px, calc(100% - 38px));
  margin: 0 auto 24px;
  color: var(--ink-soft);
  font-size: 12px;
}

@media (max-width: 900px) {
  .finder-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .toolbar-actions {
    width: 100%;
  }

  .search-field {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 760px) {
  .archive-nav,
  .archive-main,
  .archive-footer {
    width: min(100% - 26px, 1180px);
  }

  .archive-brand > span:nth-child(2),
  .archive-brand > i,
  .home-link span {
    display: none;
  }

  .finder-window {
    grid-template-columns: 1fr;
    min-height: 0;
    overflow: visible;
  }

  .finder-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .finder-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    position: sticky;
    z-index: 24;
    top: 0;
    background: color-mix(in srgb, var(--window) 94%, transparent);
    backdrop-filter: blur(14px);
  }

  .search-scope {
    display: none;
  }

  .mobile-filter-toggle {
    display: inline-flex;
  }

  .search-field {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .selection-heading {
    align-items: flex-start;
  }

  .usage-notice {
    align-items: start;
    white-space: normal;
  }

  .usage-notice > span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .usage-notice-popover {
    width: min(620px, calc(100vw - 52px));
  }

  .file-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 72px;
  }

  .file-meta {
    display: none;
  }

  .file-download {
    grid-column: 2;
    grid-row: 1;
  }

  .file-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start;
  }

  .plugin-center {
    grid-template-columns: 1fr;
  }

  .plugin-center-sidebar {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: thin;
  }

  .plugin-list-item {
    min-width: 155px;
    flex: 0 0 auto;
  }

  .plugin-detail {
    padding: 17px;
  }

  .plugin-version-row {
    grid-template-columns: 1fr;
  }

  .plugin-version-actions {
    justify-content: flex-start;
  }

  .file-help-tooltip {
    transform: translateY(-4px);
  }

  .file-help:hover .file-help-tooltip,
  .file-help:focus-within .file-help-tooltip {
    transform: translateY(0);
  }

  .skeleton-row {
    grid-template-columns: minmax(0, 1fr) 70px;
  }

  .skeleton-row i:nth-child(2),
  .skeleton-row i:nth-child(4) {
    display: none;
  }

  .skeleton-row i:nth-child(3) {
    width: 60px;
  }

  .archive-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .toolbar-actions {
    align-items: center;
    flex-direction: row;
  }

  .mobile-filter-toggle {
    flex: none;
  }

  .search-field {
    min-width: 0;
    flex: 1 1 auto;
  }

  .usage-notice-popover {
    top: auto;
    bottom: calc(100% + 8px);
  }
}

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