.download-hero {
  padding-bottom: var(--space-7);
}

.download-hero-grid {
  align-items: start;
}

.download-tree-section {
  padding-top: 0;
}

.download-tree-section::before {
  display: none;
}

.tree-intro-panel {
  margin-bottom: 18px;
}

.tree-root {
  display: grid;
  gap: 14px;
}

.state {
  padding: 18px 20px;
  border: 1px solid rgba(214, 223, 240, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.015);
  color: var(--text-muted);
}

html[data-theme="light"] .state {
  border-color: rgba(96, 118, 148, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 245, 251, 0.8)),
    rgba(246, 250, 255, 0.76);
  color: rgba(48, 65, 88, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 18px 34px rgba(56, 74, 103, 0.08);
}

.folder-card,
.file-item {
  transform: none;
}

.folder-card:hover,
.file-item:hover {
  transform: translateY(-1px);
}

.folder-card {
  padding: 0;
}

.folder-card.depth-1 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.024)),
    linear-gradient(135deg, rgba(142, 166, 255, 0.05), rgba(194, 76, 112, 0.025) 58%, rgba(140, 231, 216, 0.03)),
    rgba(11, 18, 30, 0.84);
}

.folder-card.depth-2,
.folder-card.depth-3 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.01);
}

.folder-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.folder-icon,
.file-icon,
.folder-chevron {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(214, 223, 240, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] .folder-icon,
html[data-theme="light"] .file-icon,
html[data-theme="light"] .folder-chevron {
  border-color: rgba(96, 118, 148, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 245, 251, 0.76)),
    rgba(246, 250, 255, 0.68);
  color: rgba(43, 60, 81, 0.88);
}

.folder-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.folder-text,
.file-info {
  min-width: 0;
  flex: 1;
}

.folder-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.folder-title,
.file-name {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 700;
  word-break: break-word;
}

.folder-sub,
.file-meta {
  margin-top: 4px;
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

.folder-badge {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  width: auto;
}

.folder-chevron {
  font-size: 0.74rem;
  transition: transform var(--transition-base);
}

.folder-card.open > .folder-header .folder-chevron {
  transform: rotate(90deg);
}

.folder-body {
  display: none;
  padding: 0 18px 18px;
}

.folder-card.open > .folder-body {
  display: block;
}

.folder-inner,
.file-list {
  display: grid;
  gap: 10px;
}

html[data-theme-preset] .state {
  background: var(--theme-state-bg);
  border-color: var(--theme-state-border);
  color: var(--theme-state-color);
  box-shadow: var(--theme-state-shadow);
}

html[data-theme-preset] .folder-icon,
html[data-theme-preset] .file-icon,
html[data-theme-preset] .folder-chevron {
  background: var(--theme-mini-bg);
  border-color: var(--theme-mini-border);
  color: var(--theme-mini-color);
  box-shadow: var(--theme-mini-shadow);
}

html[data-theme-preset] .folder-card.depth-1 {
  background: var(--theme-panel-bg);
}

html[data-theme-preset] .folder-card.depth-2,
html[data-theme-preset] .folder-card.depth-3 {
  background: var(--theme-mini-bg);
}

.file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
}

.file-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

@media (max-width: 760px) {
  .folder-header,
  .folder-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .file-item {
    grid-template-columns: 1fr;
  }

  .download-btn {
    width: 100%;
  }
}
