/* Shared theme chrome. These hooks are inert in the original default theme. */
.files-sidebar__brand,
.files-sidebar__footer,
.files-theme-scene {
  display: none;
}

.files-sidebar__brand-copy,
.files-theme-control-icon {
  display: none;
}

@media (min-width: 961px) {
  .files-sidebar__footer--storage {
    position: absolute;
    z-index: 2;
    right: 20px;
    bottom: 24px;
    left: 20px;
    display: grid;
    gap: 8px;
    padding: 12px;
    color: var(--files-text-muted);
    background: color-mix(in srgb, var(--files-surface) 88%, transparent);
    border: 1px solid var(--files-border);
    border-radius: var(--files-radius-sm);
    font-size: 0.8rem;
  }

  .files-sidebar__footer--storage strong {
    color: var(--files-text);
    letter-spacing: 0.08em;
  }

  .files-sidebar__meter {
    display: block;
    height: 8px;
    overflow: hidden;
    background: color-mix(in srgb, var(--files-text-muted) 22%, transparent);
    border-radius: var(--files-radius-xs);
  }

  .files-sidebar__meter i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--files-accent);
    transition: width 180ms ease-out;
  }
}

html[data-theme]:not([data-theme="default"]) .files-theme-control-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

html[data-theme]:not([data-theme="default"]) .files-search {
  position: relative;
}

html[data-theme]:not([data-theme="default"]) .files-search__theme-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  color: var(--files-text-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

html[data-theme]:not([data-theme="default"]) .files-search input {
  padding-left: 44px;
}

.files-matrix-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.files-neon-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.files-settings__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.files-settings__heading h2 {
  margin: 5px 0 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.files-settings__heading p {
  max-width: 560px;
  margin: 0;
  color: var(--files-text-muted);
  line-height: 1.6;
}

.files-theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  min-width: 0;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}

.files-theme-card {
  position: relative;
  display: grid;
  grid-template-rows: 132px auto;
  min-width: 0;
  overflow: hidden;
  color: var(--files-text);
  background: var(--files-card);
  border: 1px solid var(--files-border);
  border-radius: var(--files-radius-md);
  cursor: pointer;
  box-shadow: var(--files-shadow-card);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.files-theme-card:hover {
  border-color: color-mix(in srgb, var(--files-accent) 68%, var(--files-border));
  transform: translateY(-2px);
}

.files-theme-card:has(input:focus-visible) {
  box-shadow: var(--files-focus), var(--files-shadow-card);
}

.files-theme-card:has(input:checked) {
  border-color: var(--files-accent);
  box-shadow: 0 0 0 1px var(--files-accent), var(--files-shadow-card);
}

.files-theme-card__preview {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0b1020;
  border-bottom: 1px solid var(--files-border);
  isolation: isolate;
}

.files-theme-card__preview::before,
.files-theme-card__preview::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.files-theme-card__copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px 44px 16px 16px;
}

.files-theme-card__copy strong {
  font-size: 1rem;
}

.files-theme-card__id {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 4;
  padding: 2px 5px;
  color: currentColor;
  background: rgba(4, 10, 16, 0.72);
  border: 1px solid color-mix(in srgb, currentColor 42%, transparent);
  border-radius: 4px;
  font-family: var(--files-font-mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: nowrap;
}

.files-theme-card__preview--light .files-theme-card__id {
  color: #ffffff;
  background: rgba(49, 95, 159, 0.82);
  border-color: rgba(49, 95, 159, 0.9);
}

.files-theme-card__preview--gameboy .files-theme-card__id {
  color: #9bbc0f;
  background: #0f380f;
  border-color: #306230;
  border-radius: 0;
}

.files-theme-card__copy small {
  color: var(--files-text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.files-theme-card__check {
  position: absolute;
  right: 15px;
  bottom: 20px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--files-border);
  border-radius: 50%;
}

.files-theme-card:has(input:checked) .files-theme-card__check {
  background: var(--files-accent);
  border-color: var(--files-accent);
  box-shadow: inset 0 0 0 4px var(--files-card);
}

.files-theme-status {
  margin: 2px 0 0;
  color: var(--files-text-muted);
  font-size: 0.88rem;
}

/* Theme chooser illustrations */
.files-theme-card__preview--default {
  background: #0b1020;
}

.files-theme-card__preview--light {
  background: linear-gradient(145deg, #ffffff, #e8edf5);
}

.files-theme-card__preview--dark {
  background: radial-gradient(circle at 60% 25%, #171d27, #06080b 62%);
}

.files-theme-card__preview--sky {
  background: linear-gradient(rgba(26, 57, 78, 0.34), rgba(22, 46, 66, 0.48)), url("/themes/sky-wallpaper.png") center / cover;
}

.files-theme-card__preview--neon {
  background:
    radial-gradient(circle at 80% 20%, rgba(0, 190, 255, 0.18), transparent 2%),
    radial-gradient(circle at 62% 72%, rgba(255, 27, 194, 0.2), transparent 28%),
    linear-gradient(135deg, #10002f, #020628);
}

.files-theme-card__preview--matrix {
  background:
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(31, 255, 61, 0.08) 12px 13px),
    repeating-linear-gradient(0deg, rgba(14, 255, 44, 0.05) 0 1px, transparent 1px 4px),
    #000500;
}

.files-theme-card__preview--knight {
  background: radial-gradient(circle at 18% 100%, rgba(255, 85, 0, 0.25), transparent 30%), #090909;
}

.files-theme-card__preview--gameboy {
  background:
    radial-gradient(circle, rgba(15, 56, 15, 0.18) 0 1px, transparent 1px) 0 0 / 4px 4px,
    #9bbc0f;
  box-shadow: inset 0 0 0 5px #0f380f;
}

.files-theme-card__preview--forest {
  background: linear-gradient(rgba(7, 48, 42, 0.34), rgba(4, 32, 28, 0.58)), url("/themes/forest-wallpaper.webp") center 43% / cover;
}

.files-theme-card__preview--aau {
  background: linear-gradient(145deg, #211a52 0 60%, #594fbf);
}

.files-theme-card__preview--trifork {
  background: linear-gradient(145deg, #2c3a42 0 72%, #ff6600 72%);
}

.files-theme-card__preview--conexio {
  background: linear-gradient(145deg, #151515 0 72%, #a7cf4a 72%);
}

.files-theme-card__preview--rd {
  background: linear-gradient(145deg, #063650 0 58%, #166b66 58% 78%, #c3cb54 78%);
}

/* Obsidian: the supplied dark reference, kept separate from the original theme. */
html[data-theme="dark"] {
  --files-bg: #07090d;
  --files-sidebar: #0d1219;
  --files-sidebar-active: #1b212b;
  --files-surface: #10151d;
  --files-card: #111720;
  --files-card-hover: #1a222d;
  --files-folder: #3a414d;
  --files-folder-selected: #586274;
  --files-border: #242c37;
  --files-text: #f2f3f6;
  --files-text-muted: #969da9;
  --files-accent: #6388ff;
  --files-focus: 0 0 0 3px rgba(84, 124, 255, 0.28);
  --files-shadow-card: 0 16px 36px rgba(0, 0, 0, 0.34);
  --files-shadow-popover: 0 24px 70px rgba(0, 0, 0, 0.62);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 44% 7%, rgba(45, 55, 70, 0.12), transparent 35%),
    radial-gradient(circle at 86% 68%, rgba(21, 28, 39, 0.2), transparent 34%),
    #07090d;
}

html[data-theme="dark"] .files-sidebar {
  background: linear-gradient(160deg, rgba(23, 29, 38, 0.97), rgba(9, 13, 18, 0.98));
  border-right: 1px solid rgba(255, 255, 255, 0.025);
}

html[data-theme="dark"] .files-nav__item--active {
  border: 1px solid #242c38;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 10px 22px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .files-search input,
html[data-theme="dark"] .files-button {
  border: 1px solid #29313c;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 8px 20px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .files-button--primary {
  background: linear-gradient(135deg, #3959c7, #557bed);
  border-color: #5f7fee;
  box-shadow: 0 8px 24px rgba(58, 91, 210, 0.28), inset 0 1px rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .file-card__name,
html[data-theme="sky"] .file-card__name {
  color: var(--files-text);
}

html[data-theme="dark"] .file-card__open {
  background: linear-gradient(145deg, rgba(24, 30, 39, 0.94), rgba(13, 18, 25, 0.97));
  border: 1px solid #202833;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.018), 0 18px 36px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .file-card:hover .file-card__open,
html[data-theme="dark"] .file-card:focus-visible .file-card__open,
html[data-theme="dark"] .file-card.is-selected .file-card__open {
  background: linear-gradient(145deg, #202733, #151b24);
  border-color: #3d4c62;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(99, 136, 255, 0.16);
}

html[data-theme="dark"] .folder-shape {
  background: linear-gradient(145deg, #414854, #303641 68%, #292f39);
  border: 1px solid #4a5260;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 13px 22px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .folder-shape::before {
  left: -1px;
  background: linear-gradient(145deg, #3d444f, #303640);
  border: 1px solid #4a5260;
  border-bottom: 0;
}

html[data-theme="dark"] .folder-shape::after {
  content: "";
  position: absolute;
  inset: 5px 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 70%);
}

/* Alpine Sky */
html[data-theme="sky"] {
  --files-bg: #213c52;
  --files-sidebar: rgba(77, 112, 142, 0.38);
  --files-sidebar-active: rgba(151, 190, 226, 0.2);
  --files-surface: rgba(28, 56, 81, 0.55);
  --files-card: rgba(111, 148, 177, 0.2);
  --files-card-hover: rgba(142, 181, 214, 0.28);
  --files-folder: #9ebcd5;
  --files-folder-selected: #c7e6ff;
  --files-border: rgba(200, 226, 244, 0.3);
  --files-text: #f5f9ff;
  --files-text-muted: #b6c8d8;
  --files-accent: #6d9fff;
  --files-focus: 0 0 0 3px rgba(123, 173, 255, 0.34);
  --files-radius-xs: 8px;
  --files-radius-sm: 11px;
  --files-radius-md: 14px;
  --files-shadow-card: 0 18px 38px rgba(2, 22, 38, 0.24), inset 0 1px rgba(255, 255, 255, 0.08);
  --files-shadow-popover: 0 28px 80px rgba(2, 17, 30, 0.52);
}

html[data-theme="sky"] body {
  background:
    linear-gradient(180deg, rgba(27, 56, 78, 0.22), rgba(18, 39, 58, 0.36)),
    url("/themes/sky-wallpaper.png") center / cover fixed;
}

html[data-theme="sky"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 13%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.7px),
    radial-gradient(circle at 78% 28%, rgba(220, 240, 255, 0.36) 0 1px, transparent 1.8px);
  background-size: 137px 149px, 193px 211px;
  opacity: 0.34;
}

html[data-theme="sky"] .files-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: var(--files-sidebar-width) minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
  padding: 16px;
}

html[data-theme="sky"] .files-sidebar {
  top: 16px;
  height: calc(100vh - 32px);
  overflow: hidden;
  background: linear-gradient(155deg, rgba(128, 164, 196, 0.42), rgba(27, 57, 84, 0.58));
  border: 1px solid rgba(210, 232, 249, 0.32);
  border-radius: 17px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16), 0 22px 60px rgba(6, 29, 47, 0.24);
  backdrop-filter: blur(18px) saturate(1.15);
}

html[data-theme="sky"] .files-workspace {
  min-height: calc(100vh - 32px);
  padding: 50px clamp(30px, 3vw, 58px) 44px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme="sky"] .files-sidebar__brand {
  display: none;
}

html[data-theme="sky"] .files-sidebar__brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  background: rgba(225, 241, 255, 0.12);
  border: 1px solid rgba(231, 245, 255, 0.18);
  border-radius: 11px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

html[data-theme="sky"] .files-sidebar__brand-mark svg {
  display: none;
}

html[data-theme="sky"] .files-sidebar__brand-mark::after {
  content: "\2744";
  color: #f1f8ff;
  font-size: 2rem;
  line-height: 1;
}

html[data-theme="sky"] .files-nav {
  gap: 16px;
  margin-top: min(280px, 31vh);
}

html[data-theme="sky"] .files-nav__item {
  border: 1px solid transparent;
}

html[data-theme="sky"] .files-nav__item--active {
  position: relative;
  background: linear-gradient(90deg, rgba(151, 192, 228, 0.22), rgba(105, 147, 187, 0.14));
  border-color: rgba(213, 235, 251, 0.22);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 10px 24px rgba(8, 34, 55, 0.2);
}

html[data-theme="sky"] .files-nav__item--active::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px -1px;
  width: 4px;
  border-radius: 0 5px 5px 0;
  background: #6b9dff;
  box-shadow: 0 0 12px #6b9dff;
}

html[data-theme="sky"] .files-sidebar__footer--profile {
  display: none;
}

html[data-theme="sky"] .files-sidebar__footer--profile span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #bdd8ff;
  background: rgba(88, 128, 170, 0.32);
  border: 1px solid rgba(211, 234, 251, 0.22);
  border-radius: 50%;
}

html[data-theme="sky"] .files-sidebar__footer--profile i {
  width: 8px;
  height: 8px;
  border-right: 1px solid #d8eafa;
  border-bottom: 1px solid #d8eafa;
  transform: rotate(45deg) translateY(-3px);
}

html[data-theme="sky"] .files-toolbar h1 {
  font-size: clamp(2rem, 3vw, 2.65rem);
}

html[data-theme="sky"] .files-search input,
html[data-theme="sky"] .files-button {
  border: 1px solid rgba(202, 226, 245, 0.25);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
}

html[data-theme="sky"] .files-button--primary {
  background: linear-gradient(145deg, #668ff2, #3f68d9);
  border-color: #7ca7ff;
  box-shadow: 0 10px 25px rgba(55, 91, 210, 0.38), inset 0 1px rgba(255, 255, 255, 0.2);
}

html[data-theme="sky"] .file-card__open {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme="sky"] .file-card:hover .file-card__open,
html[data-theme="sky"] .file-card.is-selected .file-card__open {
  background: radial-gradient(circle, rgba(178, 218, 250, 0.12), transparent 68%);
  box-shadow: none;
}

html[data-theme="sky"] .file-card.is-selected .file-card__open {
  background: linear-gradient(145deg, rgba(151, 202, 242, 0.18), rgba(58, 105, 146, 0.16));
  border-color: rgba(214, 239, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(225, 244, 255, 0.08), 0 0 20px rgba(144, 207, 255, 0.2);
}

html[data-theme="sky"] .file-card.is-selected .folder-shape {
  background: linear-gradient(145deg, #eff9ff 0%, #bad8ec 40%, #88adcb 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.22), 0 8px 18px rgba(9, 39, 63, 0.18);
  filter: drop-shadow(0 0 1px rgba(239, 249, 255, 0.7)) drop-shadow(0 0 4px rgba(190, 230, 255, 0.28));
}

html[data-theme="sky"] .file-card.is-selected .folder-shape::before {
  background: linear-gradient(145deg, #f4fbff, #c1ddef);
}

html[data-theme="sky"] .file-card.is-selected .file-card__name {
  color: #fff;
  text-shadow: 0 0 9px rgba(177, 221, 255, 0.6);
}

html[data-theme="sky"] .folder-shape {
  background: linear-gradient(145deg, #d3e9f8 0%, #9bbbd3 38%, #718faf 100%);
  border: 1px solid rgba(235, 248, 255, 0.72);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.32), 0 0 17px rgba(196, 229, 255, 0.48), 0 15px 22px rgba(9, 39, 63, 0.3);
}

html[data-theme="sky"] .file-thumb--folder {
  overflow: visible;
}

html[data-theme="sky"] .folder-shape::before {
  left: -1px;
  background: linear-gradient(145deg, #e0f2fe, #a6c5dc);
  border: 1px solid rgba(239, 249, 255, 0.75);
  border-bottom: 0;
}

html[data-theme="sky"] .folder-shape::after {
  content: "";
  position: absolute;
  inset: 8px 4px auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 10px rgba(213, 240, 255, 0.34);
}

/* Neon Horizon */
html[data-theme="neon"] {
  --files-bg: #05051e;
  --files-sidebar: rgba(14, 10, 61, 0.78);
  --files-sidebar-active: rgba(33, 12, 87, 0.68);
  --files-surface: rgba(12, 10, 54, 0.78);
  --files-card: rgba(25, 17, 77, 0.72);
  --files-card-hover: rgba(40, 25, 108, 0.72);
  --files-folder: rgba(50, 80, 205, 0.58);
  --files-folder-selected: rgba(105, 76, 232, 0.68);
  --files-border: rgba(109, 80, 205, 0.48);
  --files-text: #f3edff;
  --files-text-muted: #a7a0cb;
  --files-accent: #40ddff;
  --files-danger: #ff4dc8;
  --files-focus: 0 0 0 2px #42dcff, 0 0 20px rgba(34, 202, 255, 0.45);
  --files-shadow-card: 0 0 24px rgba(52, 67, 255, 0.25);
  --files-shadow-popover: 0 0 54px rgba(121, 42, 255, 0.35), 0 24px 70px rgba(0, 0, 18, 0.75);
}

html[data-theme="neon"] body {
  background:
    radial-gradient(circle at 81% 61%, rgba(111, 41, 255, 0.27), transparent 21%),
    radial-gradient(circle at 24% 76%, rgba(255, 18, 180, 0.2), transparent 25%),
    linear-gradient(135deg, #130028 0%, #050629 46%, #020421 100%);
}

html[data-theme="neon"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(112, 72, 255, 0.035) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

html[data-theme="neon"] .files-shell {
  position: relative;
  z-index: 1;
}

html[data-theme="neon"] .files-sidebar {
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 22%, rgba(111, 28, 226, 0.25), transparent 28%),
    linear-gradient(180deg, rgba(18, 9, 72, 0.94), rgba(5, 9, 42, 0.94));
  border: 1px solid #7248ff;
  border-radius: 0 24px 24px 0;
  box-shadow: inset 0 0 42px rgba(119, 26, 255, 0.17), 0 0 18px rgba(29, 141, 255, 0.65), 0 0 3px #ff28cc;
}

html[data-theme="neon"] .files-sidebar__brand {
  position: absolute;
  top: 78px;
  left: 50%;
  display: block;
  transform: translateX(-50%);
}

html[data-theme="neon"] .files-sidebar__brand-mark {
  display: grid;
  width: 64px;
  height: 52px;
  place-items: center;
  color: #ff56d9;
  filter: drop-shadow(0 0 8px #ed29c7) drop-shadow(0 0 16px #8f23ff);
}

html[data-theme="neon"] .files-sidebar__brand-mark svg {
  width: 54px;
  height: 54px;
  stroke-width: 1.5;
}

html[data-theme="neon"] .files-nav {
  position: relative;
  z-index: 2;
  gap: 17px;
  margin-top: min(264px, 29vh);
}

html[data-theme="neon"] .files-nav__item {
  border: 1px solid transparent;
}

html[data-theme="neon"] .files-nav__item--active {
  background: linear-gradient(90deg, rgba(255, 34, 199, 0.13), rgba(27, 43, 152, 0.18));
  border-color: #ff41d3;
  box-shadow: inset -1px 0 #31dcff, 0 0 13px rgba(255, 29, 195, 0.45), 0 0 18px rgba(29, 173, 255, 0.24);
}

html[data-theme="neon"] .files-theme-scene {
  position: absolute;
  inset: auto 0 0;
  display: block;
  height: 230px;
  overflow: hidden;
  background:
    linear-gradient(160deg, transparent 49%, #080828 50% 62%, transparent 63%) -80px 10px / 220px 130px,
    linear-gradient(205deg, transparent 49%, #0a082d 50% 63%, transparent 64%) 70px 10px / 240px 140px,
    linear-gradient(180deg, rgba(255, 22, 190, 0.12), rgba(17, 4, 59, 0.92));
  opacity: 0.88;
}

html[data-theme="neon"] .files-theme-scene::before {
  content: "";
  position: absolute;
  bottom: 96px;
  left: 50%;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: repeating-linear-gradient(0deg, #ff38b9 0 7px, transparent 7px 12px), linear-gradient(#ff61ce, #ff347d);
  box-shadow: 0 0 34px #ff2cbd;
  transform: translateX(-50%);
}

html[data-theme="neon"] .files-theme-scene::after {
  content: "";
  position: absolute;
  inset: 112px -70px -50px;
  background:
    repeating-linear-gradient(90deg, rgba(14, 206, 255, 0.5) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(0deg, rgba(255, 28, 202, 0.62) 0 1px, transparent 1px 24px);
  box-shadow: 0 -2px 10px #f527ca;
  transform: perspective(120px) rotateX(58deg);
  transform-origin: center top;
}

html[data-theme="neon"] .files-toolbar__eyebrow {
  color: #ff4bd4;
  text-shadow: 0 0 10px rgba(255, 46, 202, 0.8);
}

html[data-theme="neon"] .files-toolbar h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  text-shadow: 0 0 10px rgba(153, 99, 255, 0.72), 0 0 28px rgba(103, 43, 255, 0.34);
}

html[data-theme="neon"] .files-search input,
html[data-theme="neon"] .files-button {
  border: 1px solid rgba(120, 91, 217, 0.6);
  box-shadow: inset 0 0 17px rgba(68, 32, 151, 0.15), 0 7px 18px rgba(0, 0, 20, 0.36);
}

html[data-theme="neon"] .files-button[aria-pressed="true"] {
  color: #70eaff;
  border-color: #2adfff;
  box-shadow: inset 0 0 16px rgba(20, 185, 255, 0.18), 0 0 12px rgba(25, 201, 255, 0.55);
}

html[data-theme="neon"] .files-button--primary {
  color: #fff2fd;
  background: linear-gradient(135deg, rgba(116, 18, 137, 0.7), rgba(216, 32, 168, 0.62));
  border-color: #ff51d9;
  box-shadow: inset 0 0 18px rgba(255, 145, 235, 0.18), 0 0 12px #df28ba, 0 0 28px rgba(227, 34, 188, 0.44);
}

html[data-theme="neon"] .files-breadcrumbs {
  color: #4edbff;
}

html[data-theme="neon"] .file-card__open {
  background: transparent;
}

html[data-theme="neon"] .file-card:hover .file-card__open,
html[data-theme="neon"] .file-card:focus-visible .file-card__open,
html[data-theme="neon"] .file-card.is-selected .file-card__open {
  background: rgba(37, 24, 100, 0.16);
  box-shadow: 0 0 34px rgba(68, 65, 255, 0.2);
}

html[data-theme="neon"] .file-card__name {
  color: #9dd8ff;
  text-shadow: 0 0 10px rgba(39, 152, 255, 0.38);
}

html[data-theme="neon"] .folder-shape {
  background: linear-gradient(155deg, #9848e8, #405bd9 52%, #1d68ca);
  border: 1px solid #54dcff;
  box-shadow: inset 0 0 14px rgba(39, 54, 168, 0.44);
}

html[data-theme="neon"] .folder-shape::before {
  left: -1px;
  background: linear-gradient(145deg, #df4ce8, #6352dc);
  border: 1px solid #fc5ee5;
  border-bottom: 0;
  box-shadow: 0 -3px 9px rgba(243, 54, 222, 0.62);
}

html[data-theme="neon"] .folder-shape::after {
  content: "";
  position: absolute;
  inset: 10px 4px auto;
  height: 1px;
  background: rgba(132, 225, 255, 0.75);
  box-shadow: 0 19px rgba(77, 139, 255, 0.22), 0 38px rgba(77, 139, 255, 0.16);
}

html[data-theme="neon"] .file-card[data-is-password-protected="true"] .folder-shape {
  border-top-color: #ff55e1;
  box-shadow: inset 0 0 15px rgba(82, 72, 255, 0.48);
}

html[data-theme="neon"] .file-card:hover .folder-shape,
html[data-theme="neon"] .file-card:focus-visible .folder-shape,
html[data-theme="neon"] .file-card.is-selected .folder-shape {
  background: linear-gradient(155deg, #b052ee, #5264e3 52%, #247bd7);
}

html[data-theme="neon"] .file-card:hover .folder-shape::before,
html[data-theme="neon"] .file-card:focus-visible .folder-shape::before,
html[data-theme="neon"] .file-card.is-selected .folder-shape::before {
  background: linear-gradient(145deg, #f255e8, #775ee5);
}

html[data-theme="neon"] .file-card__lock {
  color: #ff78e2;
  background: rgba(53, 5, 67, 0.86);
  border-color: #ff31cb;
  box-shadow: 0 0 14px rgba(255, 33, 198, 0.66);
}

html[data-theme="neon"] .file-thumb--image img,
html[data-theme="neon"] .file-thumb--video video {
  border: 1px solid #39d9ff;
  border-radius: inherit;
  box-shadow: 0 0 14px rgba(28, 187, 255, 0.5);
  filter: saturate(1.2) contrast(1.06) hue-rotate(8deg);
}

/* Matrix */
html[data-theme="matrix"] {
  --files-bg: #000400;
  --files-sidebar: rgba(2, 18, 5, 0.78);
  --files-sidebar-active: rgba(3, 43, 10, 0.52);
  --files-surface: rgba(0, 12, 2, 0.8);
  --files-card: rgba(4, 30, 8, 0.7);
  --files-card-hover: rgba(8, 55, 13, 0.64);
  --files-folder: rgba(6, 50, 12, 0.58);
  --files-folder-selected: rgba(10, 88, 20, 0.66);
  --files-border: #169829;
  --files-text: #4eff60;
  --files-text-muted: #74c86f;
  --files-accent: #39ff4d;
  --files-danger: #a1ff9d;
  --files-warning: #b9ff61;
  --files-success: #3fff54;
  --files-focus: 0 0 0 2px #33ff48, 0 0 16px rgba(51, 255, 72, 0.5);
  --files-radius-xs: 8px;
  --files-radius-sm: 10px;
  --files-radius-md: 12px;
  --files-shadow-card: 0 0 18px rgba(32, 255, 56, 0.14);
  --files-shadow-popover: 0 0 42px rgba(33, 255, 57, 0.25), 0 28px 70px #000;
}

html[data-theme="matrix"] body {
  background: #000400;
}

html[data-theme="matrix"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(51, 255, 65, 0.035) 0 1px, transparent 1px 4px);
}

html[data-theme="matrix"] .files-shell {
  position: relative;
  z-index: 1;
  background: rgba(0, 3, 0, 0.48);
}

html[data-theme="matrix"] .files-sidebar {
  background:
    repeating-linear-gradient(0deg, rgba(33, 255, 49, 0.028) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, rgba(1, 24, 5, 0.76), rgba(0, 10, 2, 0.86));
  border: 0;
  box-shadow: inset 0 0 42px rgba(20, 142, 33, 0.08);
}

html[data-theme="matrix"] .files-nav__item {
  border: 1px solid transparent;
}

html[data-theme="matrix"] .files-nav__item--active {
  background: rgba(4, 42, 9, 0.48);
  border-color: #24d73a;
  box-shadow: inset 0 0 20px rgba(33, 245, 54, 0.08), 0 0 8px rgba(34, 231, 51, 0.14);
}

html[data-theme="matrix"] .files-toolbar h1 {
  color: #55ff65;
  font-size: clamp(2rem, 3vw, 2.55rem);
  text-shadow: 0 0 8px rgba(62, 255, 80, 0.36);
}

html[data-theme="matrix"] .files-toolbar__eyebrow {
  color: #45ff58;
  font-weight: 700;
}

html[data-theme="matrix"] .files-search input,
html[data-theme="matrix"] .files-button,
html[data-theme="matrix"] .files-dialog {
  border: 1px solid #159a27;
  box-shadow: inset 0 0 18px rgba(31, 255, 52, 0.035);
}

html[data-theme="matrix"] .files-button--primary {
  color: #e1ffe2;
  background: linear-gradient(135deg, #168a21, #35c743);
  border-color: #4aff5b;
  box-shadow: inset 0 1px rgba(224, 255, 224, 0.25), 0 0 11px #2bd93d, 0 0 24px rgba(37, 255, 57, 0.36);
}

html[data-theme="matrix"] .file-card__open {
  background: transparent;
}

html[data-theme="matrix"] .file-card:hover .file-card__open,
html[data-theme="matrix"] .file-card.is-selected .file-card__open {
  background: rgba(6, 48, 11, 0.16);
  box-shadow: 0 0 27px rgba(22, 245, 42, 0.13);
}

html[data-theme="matrix"] .file-card__name {
  color: #48ff59;
  text-shadow: 0 0 7px rgba(45, 255, 61, 0.28);
}

html[data-theme="matrix"] .folder-shape {
  background:
    repeating-linear-gradient(0deg, rgba(51, 255, 63, 0.045) 0 1px, transparent 1px 4px),
    #052a0a;
  border: 1px solid #31ed45;
  box-shadow: inset 0 0 17px rgba(42, 255, 62, 0.06), 0 0 8px rgba(47, 255, 67, 0.18);
}

html[data-theme="matrix"] .folder-shape::before {
  left: -1px;
  background: #052a0a;
  border: 1px solid #31ed45;
  border-bottom: 0;
}

html[data-theme="matrix"] .folder-shape::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(39, 255, 55, 0.045) 3px 4px);
}

html[data-theme="matrix"] .file-card:hover .folder-shape,
html[data-theme="matrix"] .file-card:focus-visible .folder-shape,
html[data-theme="matrix"] .file-card.is-selected .folder-shape {
  background:
    repeating-linear-gradient(0deg, rgba(51, 255, 63, 0.055) 0 1px, transparent 1px 4px),
    #07380d;
}

html[data-theme="matrix"] .file-card:hover .folder-shape::before,
html[data-theme="matrix"] .file-card:focus-visible .folder-shape::before,
html[data-theme="matrix"] .file-card.is-selected .folder-shape::before {
  background: #07380d;
}

html[data-theme="matrix"] .file-card__lock {
  color: #54ff62;
  background: rgba(0, 16, 2, 0.94);
  border-color: #1c9e2c;
  box-shadow: 0 0 9px rgba(39, 255, 56, 0.24);
}

html[data-theme="matrix"] .file-thumb--image img,
html[data-theme="matrix"] .file-thumb--video video {
  border: 0;
  border-radius: 0;
  filter: grayscale(1) sepia(1) hue-rotate(73deg) saturate(4.2) brightness(0.78) contrast(1.25);
}

html[data-theme="matrix"] .file-thumb--image,
html[data-theme="matrix"] .file-thumb--video {
  border: 1px solid #2ed843;
  border-radius: 0;
  box-shadow: 0 0 12px rgba(41, 255, 61, 0.16);
}

/* Ember Knight */
html[data-theme="knight"] {
  --files-bg: #090909;
  --files-sidebar: #15120f;
  --files-sidebar-active: #221a13;
  --files-surface: #11100f;
  --files-card: #181512;
  --files-card-hover: #211a14;
  --files-folder: #2d2925;
  --files-folder-selected: #51402f;
  --files-border: #3b2819;
  --files-text: #f4eee6;
  --files-text-muted: #927d67;
  --files-accent: #f39a39;
  --files-danger: #ff6f3d;
  --files-warning: #ffb24f;
  --files-focus: 0 0 0 2px #dc7d25, 0 0 18px rgba(230, 108, 21, 0.35);
  --files-shadow-card: 0 18px 30px rgba(0, 0, 0, 0.62);
  --files-shadow-popover: 0 30px 80px rgba(0, 0, 0, 0.82), 0 0 35px rgba(175, 68, 8, 0.12);
}

html[data-theme="knight"] body {
  background:
    radial-gradient(circle at 40% 12%, rgba(71, 48, 28, 0.09), transparent 30%),
    radial-gradient(circle at 91% 76%, rgba(79, 34, 9, 0.05), transparent 25%),
    #090909;
}

html[data-theme="knight"] .files-sidebar {
  overflow: hidden;
  background: linear-gradient(155deg, #181511, #0b0a09 64%, #160e08);
  border-right: 1px solid #7c4219;
  box-shadow: inset -14px 0 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="knight"] .files-sidebar::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  left: -30px;
  height: 250px;
  background:
    radial-gradient(circle at 20% 44%, #ff8a1c 0 1px, transparent 2px),
    radial-gradient(circle at 72% 21%, #ff5c09 0 1px, transparent 2px),
    radial-gradient(circle at 48% 61%, #ffc14e 0 1px, transparent 2px),
    radial-gradient(ellipse at 50% 105%, rgba(255, 100, 6, 0.85), rgba(122, 36, 3, 0.35) 20%, transparent 56%);
  background-size: 43px 67px, 61px 83px, 47px 71px, auto;
  filter: blur(0.2px);
  opacity: 0.9;
  mask-image: linear-gradient(transparent, #000 35%);
  pointer-events: none;
}

html[data-theme="knight"] .files-sidebar__brand {
  display: none;
}

html[data-theme="knight"] .files-sidebar__brand-mark {
  position: relative;
  display: block;
  width: 50px;
  height: 50px;
  border: 2px solid #e98229;
  box-shadow: 0 0 10px #ca5410, inset 0 0 12px rgba(255, 127, 21, 0.42);
  transform: rotate(45deg) scaleY(0.72);
}

html[data-theme="knight"] .files-sidebar__brand-mark::before,
html[data-theme="knight"] .files-sidebar__brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid #ffad4d;
  box-shadow: 0 0 9px rgba(255, 132, 34, 0.8);
}

html[data-theme="knight"] .files-sidebar__brand-mark::after {
  inset: -2px 23px;
  background: #ee842b;
  border: 0;
  transform: scaleY(1.5);
}

html[data-theme="knight"] .files-sidebar__brand-mark svg {
  display: none;
}

html[data-theme="knight"] .files-nav {
  position: relative;
  z-index: 2;
  gap: 18px;
  margin-top: min(305px, 33vh);
}

html[data-theme="knight"] .files-nav__item {
  color: #cbb9a7;
  border: 1px solid transparent;
}

html[data-theme="knight"] .files-nav__item--active {
  color: #fff2e4;
  background: rgba(43, 29, 19, 0.62);
  border-color: #6e3816;
  box-shadow: inset 0 0 18px rgba(187, 73, 11, 0.06);
}

html[data-theme="knight"] .files-nav__icon,
html[data-theme="knight"] .files-toolbar__eyebrow {
  color: #ee942f;
}

html[data-theme="knight"] .files-toolbar h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 3vw, 3.15rem);
  font-weight: 500;
}

html[data-theme="knight"] .files-search input,
html[data-theme="knight"] .files-button {
  border: 1px solid #35271c;
  box-shadow: inset 0 1px rgba(255, 211, 167, 0.025), 0 10px 22px rgba(0, 0, 0, 0.36);
}

html[data-theme="knight"] .files-button[aria-pressed="true"] {
  color: #ffd3a1;
  border-color: #7c3d13;
  box-shadow: inset 0 0 16px rgba(213, 91, 16, 0.08), 0 0 15px rgba(191, 65, 7, 0.14);
}

html[data-theme="knight"] .files-button--primary {
  color: #ffe6c9;
  background: linear-gradient(135deg, #713006, #a84408 54%, #6e2605);
  border-color: #b85b19;
  box-shadow: inset 0 1px rgba(255, 196, 118, 0.17), 0 0 14px rgba(206, 75, 7, 0.44), 0 12px 28px rgba(0, 0, 0, 0.48);
}

html[data-theme="knight"] .file-card__open {
  background: transparent;
  border: 1px solid transparent;
}

html[data-theme="knight"] .file-card:hover .file-card__open,
html[data-theme="knight"] .file-card.is-selected .file-card__open {
  background: radial-gradient(circle at 50% 45%, rgba(132, 66, 22, 0.1), transparent 57%);
  box-shadow: none;
}

html[data-theme="knight"] .file-card.is-selected .file-card__open {
  background:
    radial-gradient(circle at 50% 38%, rgba(240, 146, 55, 0.16), transparent 48%),
    linear-gradient(145deg, rgba(85, 44, 19, 0.22), rgba(27, 19, 13, 0.34));
  border: 1px solid #a9551c;
  box-shadow: inset 0 0 0 1px rgba(255, 177, 92, 0.08), 0 0 22px rgba(226, 99, 20, 0.2);
}

html[data-theme="knight"] .file-card.is-selected .folder-shape {
  background: linear-gradient(145deg, #715841 0%, #3a2e24 26%, #201a16 72%, #17130f);
  filter: drop-shadow(0 0 1px #f2a85f) drop-shadow(0 0 5px rgba(229, 110, 31, 0.4));
}

html[data-theme="knight"] .file-card.is-selected .folder-shape::before {
  background: linear-gradient(145deg, #8a6849, #3e3127 72%);
}

html[data-theme="knight"] .file-card.is-selected .file-card__name {
  color: #ffd08a;
  text-shadow: 0 0 9px rgba(255, 149, 53, 0.52);
}

html[data-theme="knight"] .file-thumb--folder {
  overflow: visible;
}

html[data-theme="knight"] .file-card__name {
  color: #e9a04b;
}

html[data-theme="knight"] .folder-shape {
  background: linear-gradient(145deg, #51483f 0%, #282522 24%, #171615 72%, #121211);
  border: 1px solid #302820;
  border-top-color: #e79b50;
  box-shadow: inset 0 2px 4px rgba(255, 178, 97, 0.13), 0 -2px 5px rgba(255, 128, 31, 0.2), 0 6px 9px rgba(0, 0, 0, 0.48);
}

html[data-theme="knight"] .folder-shape::before {
  left: -1px;
  background: linear-gradient(145deg, #645444, #2b2825 72%);
  border: 1px solid #de8a3d;
  border-bottom: 0;
  box-shadow: 0 -2px 7px rgba(255, 123, 28, 0.28);
}

html[data-theme="knight"] .folder-shape::after {
  content: "";
  position: absolute;
  inset: 5px 2px auto;
  height: 1px;
  background: linear-gradient(90deg, #ffc174, rgba(255, 151, 62, 0.28), transparent);
}

html[data-theme="knight"] .file-card__lock {
  color: #f2a140;
  background: rgba(17, 15, 13, 0.95);
  border-color: #4b3627;
  box-shadow: 0 8px 13px rgba(0, 0, 0, 0.55);
}

/* PixelDrive / Game Boy */
html[data-theme="gameboy"] {
  --files-bg: #9bbc0f;
  --files-sidebar: #8bac0f;
  --files-sidebar-active: #6d8d12;
  --files-surface: #9bbc0f;
  --files-card: #9bbc0f;
  --files-card-hover: #8bac0f;
  --files-folder: #8bac0f;
  --files-folder-selected: #9bbc0f;
  --files-border: #0f380f;
  --files-text: #0f380f;
  --files-text-muted: #306230;
  --files-accent: #0f380f;
  --files-danger: #0f380f;
  --files-warning: #306230;
  --files-success: #0f380f;
  --files-focus: 0 0 0 3px #0f380f;
  --files-radius-xs: 0;
  --files-radius-sm: 0;
  --files-radius-md: 0;
  --files-radius-lg: 0;
  --files-shadow-card: 4px 4px 0 #306230;
  --files-shadow-popover: 8px 8px 0 #0f380f;
  --files-font-sans: "Courier New", ui-monospace, monospace;
  --files-font-mono: "Courier New", ui-monospace, monospace;
  --files-sidebar-width: 286px;
}

html[data-theme="gameboy"] {
  background: #153b1b;
  height: 100%;
  overflow: hidden;
}

html[data-theme="gameboy"] body {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: 20px;
  background:
    radial-gradient(circle, rgba(15, 56, 15, 0.2) 0 1px, transparent 1px) 0 0 / 5px 5px,
    linear-gradient(145deg, #234e22, #123416);
  font-weight: 600;
  image-rendering: pixelated;
}

html[data-theme="gameboy"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(15, 56, 15, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(circle, rgba(15, 56, 15, 0.08) 0 1px, transparent 1px) 0 0 / 4px 4px;
  mix-blend-mode: multiply;
}

html[data-theme="gameboy"] .files-shell {
  position: relative;
  z-index: 1;
  height: calc(100dvh - 40px);
  min-height: calc(100vh - 40px);
  overflow: clip;
  background: #9bbc0f;
  border: 6px solid #0f380f;
  outline: 4px solid #8bac0f;
  border-radius: 30px;
  box-shadow: inset 0 0 0 4px #306230, 0 0 0 4px #0f380f, 0 18px 45px rgba(0, 0, 0, 0.4);
}

html[data-theme="gameboy"] .files-sidebar {
  position: relative;
  top: 0;
  align-self: start;
  height: 100%;
  padding: 0 16px 24px;
  background:
    radial-gradient(circle, rgba(48, 98, 48, 0.32) 0 1px, transparent 1px) 0 55% / 5px 5px,
    #9bbc0f;
  border-right: 5px double #0f380f;
}

html[data-theme="gameboy"] .files-sidebar__brand {
  display: none;
}

html[data-theme="gameboy"] .files-sidebar__brand-mark {
  position: relative;
  display: block;
  width: 38px;
  height: 33px;
  background: #8bac0f;
  border: 5px solid #0f380f;
  box-shadow: 4px 4px 0 #306230;
}

html[data-theme="gameboy"] .files-sidebar__brand-mark::before {
  content: "";
  position: absolute;
  inset: 3px 6px 13px;
  background: #9bbc0f;
  border: 3px solid #0f380f;
}

html[data-theme="gameboy"] .files-sidebar__brand-mark::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 4px;
  left: 5px;
  height: 6px;
  background: #306230;
}

html[data-theme="gameboy"] .files-sidebar__brand-mark svg {
  display: none;
}

html[data-theme="gameboy"] .files-sidebar__brand-copy {
  display: grid;
  justify-items: center;
  gap: 2px;
}

html[data-theme="gameboy"] .files-sidebar__brand-copy strong {
  font-size: 1.25rem;
  letter-spacing: 0.03em;
}

html[data-theme="gameboy"] .files-nav {
  gap: 14px;
  margin-top: min(132px, 14vh);
}

html[data-theme="gameboy"] .files-nav__item {
  position: relative;
  padding: 14px 19px;
  border: 4px solid transparent;
  font-size: 1rem;
  text-transform: none;
}

html[data-theme="gameboy"] .files-nav__item::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid #306230;
}

html[data-theme="gameboy"] .files-nav__item--active {
  color: #9bbc0f;
  background: #306230;
  border-color: #0f380f;
  box-shadow: inset 0 0 0 3px #8bac0f, 4px 4px 0 rgba(48, 98, 48, 0.6);
}

html[data-theme="gameboy"] .files-nav__item--active::after {
  border-left-color: #9bbc0f;
}

html[data-theme="gameboy"] .files-nav__icon {
  color: currentColor;
}

html[data-theme="gameboy"] .files-sidebar__footer--storage {
  position: absolute;
  right: 20px;
  bottom: 25px;
  left: 20px;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #9bbc0f;
  border: 4px solid #0f380f;
  box-shadow: inset 0 0 0 3px #8bac0f, 4px 4px 0 #306230;
  font-size: 0.9rem;
}

html[data-theme="gameboy"] .files-sidebar__meter {
  display: block;
  height: 14px;
  padding: 2px;
  border: 3px solid #306230;
}

html[data-theme="gameboy"] .files-sidebar__meter i {
  display: block;
  width: 0;
  height: 100%;
  background: #0f380f;
}

html[data-theme="gameboy"] .files-workspace {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 34px clamp(22px, 3vw, 42px) 36px;
  scrollbar-color: #306230 #9bbc0f;
}

html[data-theme="gameboy"] .files-workspace::-webkit-scrollbar-track {
  background: #9bbc0f;
  border-left: 3px solid #0f380f;
}

html[data-theme="gameboy"] .files-workspace::-webkit-scrollbar-thumb {
  background: #306230;
  border: 3px solid #9bbc0f;
  border-radius: 0;
}

html[data-theme="gameboy"] .files-toolbar {
  padding-bottom: 20px;
  border-bottom: 4px dotted #306230;
}

html[data-theme="gameboy"] .files-toolbar__title {
  display: block;
}

html[data-theme="gameboy"] .files-toolbar__title::before {
  content: none;
}

html[data-theme="gameboy"] .files-toolbar__eyebrow {
  color: #306230;
  letter-spacing: 0.03em;
}

html[data-theme="gameboy"] .files-toolbar__eyebrow::before {
  content: ".. ";
}

html[data-theme="gameboy"] .files-toolbar__eyebrow::after {
  content: " ......";
}

html[data-theme="gameboy"] .files-toolbar h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 0.95;
}

html[data-theme="gameboy"] .files-search input,
html[data-theme="gameboy"] .files-button,
html[data-theme="gameboy"] .files-dialog,
html[data-theme="gameboy"] .files-list,
html[data-theme="gameboy"] .files-theme-card {
  border: 4px solid #0f380f;
  box-shadow: inset 0 0 0 2px #8bac0f, 4px 4px 0 #306230;
}

html[data-theme="gameboy"] .files-button {
  min-height: 45px;
  padding: 9px 17px;
}

html[data-theme="gameboy"] .files-button[aria-pressed="true"],
html[data-theme="gameboy"] .files-button--primary {
  color: #9bbc0f;
  background: #0f380f;
  box-shadow: inset 0 0 0 3px #306230, 4px 4px 0 #306230;
}

html[data-theme="gameboy"] .files-breadcrumbs {
  display: none;
}

html[data-theme="gameboy"] .files-grid {
  --files-grid-row-gap: 28px;
  --files-grid-column-gap: 28px;
}

html[data-theme="gameboy"] .file-card__open {
  background: rgba(155, 188, 15, 0.68);
  border: 4px solid #0f380f;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px #8bac0f, 3px 3px 0 #306230;
  clip-path: none;
}

html[data-theme="gameboy"] .file-card:hover .file-card__open,
html[data-theme="gameboy"] .file-card.is-selected .file-card__open {
  color: #9bbc0f;
  background: #8bac0f;
  box-shadow: inset 0 0 0 3px #306230, 5px 5px 0 #0f380f;
}

html[data-theme="gameboy"] .file-card__name {
  color: #0f380f;
  font-size: 1rem;
}

html[data-theme="gameboy"] .file-card__meta {
  color: #306230;
  font-weight: 700;
  text-transform: uppercase;
}

html[data-theme="gameboy"] .file-card__meta::before {
  content: "\25A0 ";
  font-size: 0.6em;
}

html[data-theme="gameboy"] .folder-shape {
  width: min(116px, calc(100% - 18px));
  background: #7f9e18;
  border: 5px solid #0f380f;
  border-radius: 0;
  box-shadow: inset 5px 5px 0 rgba(155, 188, 15, 0.9), 7px 7px 0 #306230;
}

html[data-theme="gameboy"] .folder-shape::before {
  top: -17%;
  bottom: auto;
  left: -5px;
  width: 48%;
  height: 33%;
  background: #8bac0f;
  border: 5px solid #0f380f;
  border-bottom: 0;
  border-radius: 0;
}

html[data-theme="gameboy"] .folder-shape::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  width: auto;
  height: auto;
  background:
    radial-gradient(circle at 100% 100%, #306230 0 2px, transparent 3px) right 4px bottom 4px / 22px 22px no-repeat,
    #7f9e18;
  box-shadow: inset 5px 5px 0 rgba(155, 188, 15, 0.9);
  pointer-events: none;
}

html[data-theme="gameboy"] .file-card__lock {
  top: 17px;
  right: 17px;
  width: 28px;
  height: 32px;
  color: #9bbc0f;
  background: #0f380f;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Deep Forest */
html[data-theme="forest"] {
  --files-bg: #0b332e;
  --files-sidebar: rgba(26, 75, 66, 0.76);
  --files-sidebar-active: rgba(30, 91, 67, 0.68);
  --files-surface: rgba(13, 53, 47, 0.78);
  --files-card: rgba(33, 79, 68, 0.58);
  --files-card-hover: rgba(46, 100, 82, 0.67);
  --files-folder: #9cb675;
  --files-folder-selected: #bed895;
  --files-border: rgba(157, 187, 143, 0.34);
  --files-text: #eef3e9;
  --files-text-muted: #abbbae;
  --files-accent: #9bc678;
  --files-danger: #e98d74;
  --files-warning: #d9bd6e;
  --files-success: #91ca85;
  --files-focus: 0 0 0 3px rgba(161, 204, 124, 0.3);
  --files-radius-xs: 9px;
  --files-radius-sm: 12px;
  --files-radius-md: 20px;
  --files-shadow-card: 0 18px 34px rgba(0, 24, 18, 0.36), inset 0 1px rgba(220, 243, 207, 0.06);
  --files-shadow-popover: 0 28px 78px rgba(0, 18, 14, 0.68);
}

html[data-theme="forest"] body {
  background:
    linear-gradient(90deg, rgba(7, 48, 42, 0.2), rgba(7, 39, 34, 0.42)),
    url("/themes/forest-wallpaper.webp") center / cover fixed;
}

html[data-theme="forest"] .files-shell {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, rgba(7, 43, 38, 0.06), rgba(4, 29, 26, 0.2));
}

html[data-theme="forest"] .files-sidebar {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(27, 80, 72, 0.62), rgba(15, 59, 51, 0.76)),
    url("/themes/forest-sidebar.webp") center / cover;
  border-right: 1px solid rgba(197, 218, 181, 0.28);
  box-shadow: inset -18px 0 35px rgba(3, 37, 31, 0.2);
  backdrop-filter: blur(7px);
}

html[data-theme="forest"] .files-sidebar__brand {
  display: none;
}

html[data-theme="forest"] .files-sidebar__brand-mark {
  position: relative;
  display: block;
  width: 66px;
  height: 66px;
  overflow: hidden;
  background:
    linear-gradient(155deg, transparent 48%, #52725f 49% 55%, transparent 56%),
    linear-gradient(35deg, transparent 46%, #294f48 47% 54%, transparent 55%),
    linear-gradient(180deg, #d8e4ce, #6f927c);
  border: 2px solid rgba(224, 234, 211, 0.7);
  border-radius: 50%;
  box-shadow: 0 8px 15px rgba(0, 24, 18, 0.45), inset 0 0 9px rgba(255, 255, 255, 0.28);
}

html[data-theme="forest"] .files-sidebar__brand-mark::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  height: 15px;
  border-top: 3px solid #e2e8da;
  border-radius: 50%;
  transform: rotate(-16deg);
}

html[data-theme="forest"] .files-sidebar__brand-mark svg {
  display: none;
}

html[data-theme="forest"] .files-nav {
  gap: 18px;
  margin-top: min(320px, 34vh);
}

html[data-theme="forest"] .files-nav__item {
  border: 1px solid transparent;
}

html[data-theme="forest"] .files-nav__item--active {
  background: linear-gradient(135deg, rgba(31, 100, 75, 0.7), rgba(21, 74, 59, 0.68));
  border-color: rgba(150, 190, 126, 0.3);
  box-shadow: inset 0 1px rgba(225, 241, 214, 0.06), 0 8px 20px rgba(0, 29, 22, 0.38);
}

html[data-theme="forest"] .files-nav__icon {
  color: #a9c887;
}

html[data-theme="forest"] .files-sidebar::after {
  content: "";
  position: absolute;
  inset: auto -55px -90px -30px;
  height: 410px;
  background: url("/themes/forest-leaf-3.webp") left bottom / contain no-repeat;
  opacity: 0.66;
  pointer-events: none;
}

html[data-theme="forest"] .files-toolbar h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 3vw, 3.15rem);
  font-weight: 500;
}

html[data-theme="forest"] .files-toolbar__eyebrow {
  color: #b8cbb9;
}

html[data-theme="forest"] .files-search input,
html[data-theme="forest"] .files-button {
  border: 1px solid rgba(175, 203, 160, 0.3);
  box-shadow: inset 0 1px rgba(235, 247, 225, 0.04), 0 9px 18px rgba(0, 29, 23, 0.24);
  backdrop-filter: blur(10px);
}

html[data-theme="forest"] .files-button[aria-pressed="true"] {
  border-color: #759b67;
  box-shadow: inset 0 0 15px rgba(128, 185, 104, 0.18), 0 0 12px rgba(112, 168, 90, 0.18);
}

html[data-theme="forest"] .files-button--primary {
  color: #173d2f;
  background: linear-gradient(145deg, #d4eab5, #a6cb82);
  border-color: #d9edbc;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.45), 0 10px 25px rgba(2, 44, 31, 0.35);
}

html[data-theme="forest"] .files-breadcrumbs::before {
  content: "";
  width: 17px;
  height: 12px;
  background: linear-gradient(145deg, #b0d086, #618b59);
  border-radius: 100% 0 100% 0;
  transform: rotate(-28deg);
  box-shadow: 0 0 8px rgba(143, 190, 111, 0.28);
}

html[data-theme="forest"] .file-card__open {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(53, 101, 87, 0.54), rgba(17, 64, 55, 0.64));
  border: 1px solid rgba(169, 198, 151, 0.36);
  box-shadow: inset 0 1px rgba(225, 240, 214, 0.06), 0 17px 34px rgba(1, 32, 24, 0.26);
}

html[data-theme="forest"] .file-card__open > :not(.file-card__lock) {
  position: relative;
  z-index: 2;
}

html[data-theme="forest"] .file-card__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("/themes/forest-leaf-1.webp");
  background-position: right bottom;
  background-repeat: no-repeat;
  background-size: 58% auto;
  opacity: 0.34;
  pointer-events: none;
}

html[data-theme="forest"] .file-card:nth-child(7n + 2) .file-card__open::after {
  background-image: url("/themes/forest-leaf-2.webp");
  background-position: left bottom;
}

html[data-theme="forest"] .file-card:nth-child(7n + 3) .file-card__open::after {
  background-image: url("/themes/forest-leaf-3.webp");
  background-position: left bottom;
}

html[data-theme="forest"] .file-card:nth-child(7n + 4) .file-card__open::after {
  background-image: url("/themes/forest-leaf-4.webp");
  background-position: right bottom;
}

html[data-theme="forest"] .file-card:nth-child(7n + 5) .file-card__open::after {
  background-image: url("/themes/forest-leaf-5.webp");
  background-position: left top;
}

html[data-theme="forest"] .file-card:nth-child(7n + 6) .file-card__open::after {
  background-image: url("/themes/forest-leaf-6.webp");
  background-position: right center;
}

html[data-theme="forest"] .file-card:nth-child(7n) .file-card__open::after {
  background-image: url("/themes/forest-leaf-7.webp");
  background-position: right bottom;
}

html[data-theme="forest"] .file-card:hover .file-card__open,
html[data-theme="forest"] .file-card.is-selected .file-card__open {
  background: linear-gradient(145deg, rgba(71, 124, 103, 0.64), rgba(25, 76, 64, 0.74));
  border-color: rgba(196, 220, 177, 0.56);
  box-shadow: 0 20px 42px rgba(0, 27, 20, 0.38), 0 0 20px rgba(129, 181, 107, 0.09);
}

html[data-theme="forest"] .file-card__name {
  color: #eff3e9;
}

html[data-theme="forest"] .folder-shape {
  background: linear-gradient(145deg, #c1d79b 0%, #9fb87b 52%, #77945f);
  border: 1px solid rgba(220, 235, 195, 0.66);
  box-shadow: inset 0 2px rgba(250, 255, 239, 0.24), 0 12px 17px rgba(0, 30, 17, 0.42);
}

html[data-theme="forest"] .folder-shape::before {
  left: -1px;
  background: linear-gradient(145deg, #cadca8, #99b375);
  border: 1px solid rgba(225, 238, 202, 0.7);
  border-bottom: 0;
}

html[data-theme="forest"] .folder-shape::after {
  content: "";
  position: absolute;
  inset: 7px 4px auto;
  height: 1px;
  background: rgba(239, 248, 221, 0.4);
}

html[data-theme="forest"] .file-card__lock {
  color: #eef7de;
  background: linear-gradient(145deg, #78995e, #4e764b);
  border-color: rgba(201, 224, 172, 0.48);
  box-shadow: 0 7px 13px rgba(1, 35, 22, 0.45), inset 0 1px rgba(255, 255, 255, 0.15);
}

/* Daylight */
html[data-theme="light"] {
  --files-bg: #f4f6fa;
  --files-sidebar: #e9edf4;
  --files-sidebar-active: #d9e2f2;
  --files-surface: #ffffff;
  --files-card: #ffffff;
  --files-card-hover: #f7f9fc;
  --files-folder: #7fa7e2;
  --files-folder-selected: #5f8fd5;
  --files-border: #d8dee8;
  --files-text: #1c2738;
  --files-text-muted: #697588;
  --files-accent: #315f9f;
  --files-focus: 0 0 0 3px rgba(49, 95, 159, 0.22);
  --files-shadow-card: 0 14px 32px rgba(41, 57, 82, 0.1);
  --files-shadow-popover: 0 24px 64px rgba(34, 47, 68, 0.2);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 78% 8%, rgba(91, 139, 207, 0.1), transparent 28%),
    linear-gradient(135deg, #f8fafc, #eef2f7);
}

html[data-theme="light"] .files-sidebar {
  background: linear-gradient(180deg, #f2f5f9, #e5eaf2);
  border-right: 1px solid #d8dee8;
}

html[data-theme="light"] .files-nav__icon {
  color: #486787;
}

html[data-theme="light"] .files-nav__item--active {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(44, 64, 91, 0.09);
}

html[data-theme="light"] .files-search input,
html[data-theme="light"] .files-button,
html[data-theme="light"] .file-card__open {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dce2eb;
  box-shadow: 0 10px 24px rgba(45, 62, 85, 0.07);
}

html[data-theme="light"] .files-button--primary {
  color: #ffffff;
  background: linear-gradient(135deg, #4777ba, #315f9f);
  border-color: #315f9f;
}

html[data-theme="light"] .folder-shape {
  background: linear-gradient(145deg, #9bbbea, #6f9bd9);
  filter: drop-shadow(0 10px 10px rgba(54, 86, 130, 0.18));
}

html[data-theme="light"] .folder-shape::before {
  background: linear-gradient(145deg, #acc8ef, #82a9df);
}

/* Official organization themes share a structured light workspace and branded rail. */
html[data-theme="aau"] .files-sidebar__brand,
html[data-theme="trifork"] .files-sidebar__brand,
html[data-theme="conexio"] .files-sidebar__brand,
html[data-theme="rd"] .files-sidebar__brand {
  position: absolute;
  z-index: 2;
  top: 42px;
  right: 28px;
  left: 28px;
  display: block;
  height: 58px;
}

html[data-theme="aau"] .files-sidebar__brand-mark,
html[data-theme="trifork"] .files-sidebar__brand-mark,
html[data-theme="conexio"] .files-sidebar__brand-mark,
html[data-theme="rd"] .files-sidebar__brand-mark {
  display: block;
  width: 100%;
  height: 100%;
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
}

html[data-theme="aau"] .files-sidebar__brand-mark svg,
html[data-theme="trifork"] .files-sidebar__brand-mark svg,
html[data-theme="conexio"] .files-sidebar__brand-mark svg,
html[data-theme="rd"] .files-sidebar__brand-mark svg {
  display: none;
}

html[data-theme="aau"] .files-nav,
html[data-theme="trifork"] .files-nav,
html[data-theme="conexio"] .files-nav,
html[data-theme="rd"] .files-nav {
  margin-top: min(190px, 22vh);
}

html[data-theme="aau"] .files-sidebar__footer--storage,
html[data-theme="trifork"] .files-sidebar__footer--storage,
html[data-theme="conexio"] .files-sidebar__footer--storage,
html[data-theme="rd"] .files-sidebar__footer--storage {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

html[data-theme="aau"] .files-sidebar__footer--storage strong,
html[data-theme="trifork"] .files-sidebar__footer--storage strong,
html[data-theme="conexio"] .files-sidebar__footer--storage strong,
html[data-theme="rd"] .files-sidebar__footer--storage strong {
  color: #ffffff;
}

html[data-theme="aau"] .files-sidebar__meter,
html[data-theme="trifork"] .files-sidebar__meter,
html[data-theme="conexio"] .files-sidebar__meter,
html[data-theme="rd"] .files-sidebar__meter {
  background: rgba(255, 255, 255, 0.18);
}

/* Aalborg University */
html[data-theme="aau"] {
  --files-bg: #f5f4f9;
  --files-sidebar: #211a52;
  --files-sidebar-active: #594fbf;
  --files-surface: #ffffff;
  --files-card: #ffffff;
  --files-card-hover: #f0eef9;
  --files-folder: #594fbf;
  --files-folder-selected: #211a52;
  --files-border: #ddd9ea;
  --files-text: #211a52;
  --files-text-muted: #6b6879;
  --files-accent: #594fbf;
  --files-focus: 0 0 0 3px rgba(89, 79, 191, 0.24);
  --files-shadow-card: 0 15px 32px rgba(33, 26, 82, 0.12);
  --files-shadow-popover: 0 28px 70px rgba(33, 26, 82, 0.24);
}

html[data-theme="aau"] body {
  background: linear-gradient(135deg, #fbfafc, #efedf6);
}

html[data-theme="aau"] .files-sidebar {
  color: #ffffff;
  background: linear-gradient(165deg, #29205f, #211a52 65%, #18133d);
  border-right: 4px solid #31a9c1;
}

html[data-theme="aau"] .files-sidebar__brand-mark {
  background-image: url("/themes/aau-logo-white.png");
}

html[data-theme="aau"] .files-nav__item,
html[data-theme="aau"] .files-nav__icon {
  color: #ffffff;
}

html[data-theme="aau"] .files-nav__item--active {
  background: #594fbf;
  box-shadow: inset 4px 0 #31a9c1;
}

html[data-theme="aau"] .files-toolbar__eyebrow {
  color: #007fa3;
}

html[data-theme="aau"] .files-search input,
html[data-theme="aau"] .files-button,
html[data-theme="aau"] .file-card__open {
  background: #ffffff;
  border: 1px solid #ddd9ea;
  box-shadow: 0 10px 24px rgba(33, 26, 82, 0.08);
}

html[data-theme="aau"] .files-button--primary {
  color: #ffffff;
  background: #594fbf;
  border-color: #594fbf;
}

html[data-theme="aau"] .folder-shape {
  background: linear-gradient(145deg, #6e64cf, #403798);
  filter: drop-shadow(0 10px 10px rgba(33, 26, 82, 0.22));
}

html[data-theme="aau"] .folder-shape::before {
  background: linear-gradient(145deg, #8077db, #594fbf);
}

/* Trifork */
html[data-theme="trifork"] {
  --files-bg: #edf4f7;
  --files-sidebar: #2c3a42;
  --files-sidebar-active: #3c4c54;
  --files-surface: #ffffff;
  --files-card: #ffffff;
  --files-card-hover: #f4f8fa;
  --files-folder: #3c4c54;
  --files-folder-selected: #2c3a42;
  --files-border: #ccdce3;
  --files-text: #2c3a42;
  --files-text-muted: #65777f;
  --files-accent: #d95700;
  --files-focus: 0 0 0 3px rgba(255, 102, 0, 0.24);
  --files-radius-xs: 4px;
  --files-radius-sm: 6px;
  --files-radius-md: 8px;
  --files-shadow-card: 0 14px 30px rgba(44, 58, 66, 0.12);
  --files-shadow-popover: 0 26px 64px rgba(44, 58, 66, 0.24);
}

html[data-theme="trifork"] body {
  background:
    linear-gradient(120deg, transparent 0 70%, rgba(213, 229, 237, 0.78) 70%),
    #edf4f7;
}

html[data-theme="trifork"] .files-sidebar {
  color: #ffffff;
  background: linear-gradient(180deg, #34454e, #263239);
  border-right: 5px solid #ff6600;
}

html[data-theme="trifork"] .files-sidebar__brand-mark {
  background-image: url("/themes/trifork-logo-white.svg");
}

html[data-theme="trifork"] .files-nav__item,
html[data-theme="trifork"] .files-nav__icon {
  color: #ffffff;
}

html[data-theme="trifork"] .files-nav__item--active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 5px 0 #ff6600;
}

html[data-theme="trifork"] .files-toolbar__eyebrow {
  color: #d95700;
}

html[data-theme="trifork"] .files-search input,
html[data-theme="trifork"] .files-button,
html[data-theme="trifork"] .file-card__open {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #ccdce3;
  box-shadow: 0 10px 24px rgba(44, 58, 66, 0.08);
}

html[data-theme="trifork"] .files-button--primary {
  color: #ffffff;
  background: #d95700;
  border-color: #d95700;
}

html[data-theme="trifork"] .folder-shape {
  background: linear-gradient(145deg, #536771, #2c3a42);
  filter: drop-shadow(0 10px 10px rgba(44, 58, 66, 0.2));
}

html[data-theme="trifork"] .folder-shape::before {
  background: linear-gradient(145deg, #ff7a21, #e85d00);
}

/* Conexio */
html[data-theme="conexio"] {
  --files-bg: #f6f6f6;
  --files-sidebar: #151515;
  --files-sidebar-active: #2b2b2b;
  --files-surface: #ffffff;
  --files-card: #ebebeb;
  --files-card-hover: #e2e8d3;
  --files-folder: #2b2b2b;
  --files-folder-selected: #151515;
  --files-border: #d8d8d8;
  --files-text: #151515;
  --files-text-muted: #666666;
  --files-accent: #64851f;
  --files-focus: 0 0 0 3px rgba(167, 207, 74, 0.42);
  --files-radius-xs: 4px;
  --files-radius-sm: 6px;
  --files-radius-md: 8px;
  --files-shadow-card: 0 12px 26px rgba(21, 21, 21, 0.1);
  --files-shadow-popover: 0 24px 58px rgba(21, 21, 21, 0.24);
}

html[data-theme="conexio"] body {
  background:
    linear-gradient(90deg, transparent 0 76%, rgba(167, 207, 74, 0.08) 76% 77%, transparent 77%),
    #f6f6f6;
}

html[data-theme="conexio"] .files-sidebar {
  color: #f6f6f6;
  background: #151515;
  border-right: 5px solid #a7cf4a;
}

html[data-theme="conexio"] .files-sidebar__brand-mark {
  background-image: url("/themes/conexio-logo-light.svg");
}

html[data-theme="conexio"] .files-nav__item,
html[data-theme="conexio"] .files-nav__icon {
  color: #f6f6f6;
}

html[data-theme="conexio"] .files-nav__item--active {
  background: #2b2b2b;
  box-shadow: inset 5px 0 #a7cf4a;
}

html[data-theme="conexio"] .files-toolbar h1 {
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-stretch: condensed;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

html[data-theme="conexio"] .files-toolbar__eyebrow {
  color: #64851f;
}

html[data-theme="conexio"] .files-search input,
html[data-theme="conexio"] .files-button,
html[data-theme="conexio"] .file-card__open {
  background: #ffffff;
  border: 1px solid #d8d8d8;
  box-shadow: none;
}

html[data-theme="conexio"] .files-button--primary {
  color: #151515;
  background: #a7cf4a;
  border-color: #9dca36;
}

html[data-theme="conexio"] .folder-shape {
  background: #2b2b2b;
  filter: drop-shadow(0 9px 8px rgba(21, 21, 21, 0.18));
}

html[data-theme="conexio"] .folder-shape::before,
html[data-theme="conexio"] .file-card.is-selected .folder-shape::before {
  background: #a7cf4a;
}

/* R&D Test Systems */
html[data-theme="rd"] {
  --files-bg: #eef5f7;
  --files-sidebar: #063650;
  --files-sidebar-active: #166b66;
  --files-surface: #ffffff;
  --files-card: #ffffff;
  --files-card-hover: #e9f4f3;
  --files-folder: #327e7a;
  --files-folder-selected: #166b66;
  --files-border: #c9dfe5;
  --files-text: #063650;
  --files-text-muted: #5e747c;
  --files-accent: #166b66;
  --files-focus: 0 0 0 3px rgba(195, 203, 84, 0.42);
  --files-radius-xs: 3px;
  --files-radius-sm: 5px;
  --files-radius-md: 7px;
  --files-shadow-card: 0 14px 30px rgba(6, 54, 80, 0.12);
  --files-shadow-popover: 0 26px 64px rgba(6, 54, 80, 0.24);
}

html[data-theme="rd"] body {
  background:
    linear-gradient(135deg, rgba(163, 209, 226, 0.34), transparent 45%),
    #eef5f7;
}

html[data-theme="rd"] .files-sidebar {
  color: #ffffff;
  background: linear-gradient(165deg, #0a4561, #063650 62%, #001a30);
  border-right: 5px solid #c3cb54;
}

html[data-theme="rd"] .files-sidebar__brand {
  height: 82px;
}

html[data-theme="rd"] .files-sidebar__brand-mark {
  background-image: url("/themes/rd-test-systems-logo-white.svg");
}

html[data-theme="rd"] .files-nav__item,
html[data-theme="rd"] .files-nav__icon {
  color: #ffffff;
}

html[data-theme="rd"] .files-nav__item--active {
  background: #166b66;
  box-shadow: inset 5px 0 #c3cb54;
}

html[data-theme="rd"] .files-toolbar__eyebrow {
  color: #166b66;
}

html[data-theme="rd"] .files-search input,
html[data-theme="rd"] .files-button,
html[data-theme="rd"] .file-card__open {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #c9dfe5;
  box-shadow: 0 10px 24px rgba(6, 54, 80, 0.08);
}

html[data-theme="rd"] .files-button--primary {
  color: #063650;
  background: #c3cb54;
  border-color: #afb743;
}

html[data-theme="rd"] .folder-shape {
  background: linear-gradient(145deg, #46938e, #166b66);
  filter: drop-shadow(0 10px 10px rgba(6, 54, 80, 0.2));
}

html[data-theme="rd"] .folder-shape::before {
  background: linear-gradient(145deg, #d2d978, #afb743);
}

/* Keep selection unmistakable against the organization themes' light surfaces. */
html[data-theme="light"] .file-card.is-selected .file-card__open,
html[data-theme="aau"] .file-card.is-selected .file-card__open,
html[data-theme="trifork"] .file-card.is-selected .file-card__open,
html[data-theme="conexio"] .file-card.is-selected .file-card__open,
html[data-theme="rd"] .file-card.is-selected .file-card__open {
  background: color-mix(in srgb, var(--files-accent) 12%, var(--files-surface));
  border-color: var(--files-accent);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--files-accent) 24%, transparent),
    0 18px 38px color-mix(in srgb, var(--files-accent) 18%, transparent);
}

html[data-theme="light"] .file-card.is-selected .file-card__name,
html[data-theme="aau"] .file-card.is-selected .file-card__name,
html[data-theme="trifork"] .file-card.is-selected .file-card__name,
html[data-theme="conexio"] .file-card.is-selected .file-card__name,
html[data-theme="rd"] .file-card.is-selected .file-card__name {
  color: var(--files-accent);
}

html[data-theme="light"] .files-list tr.is-selected td,
html[data-theme="aau"] .files-list tr.is-selected td,
html[data-theme="trifork"] .files-list tr.is-selected td,
html[data-theme="conexio"] .files-list tr.is-selected td,
html[data-theme="rd"] .files-list tr.is-selected td {
  background: color-mix(in srgb, var(--files-accent) 12%, var(--files-surface));
}

html[data-theme="light"] .files-list tr.is-selected td:first-child,
html[data-theme="aau"] .files-list tr.is-selected td:first-child,
html[data-theme="trifork"] .files-list tr.is-selected td:first-child,
html[data-theme="conexio"] .files-list tr.is-selected td:first-child,
html[data-theme="rd"] .files-list tr.is-selected td:first-child {
  box-shadow: inset 4px 0 var(--files-accent);
}

/* Preserve the clean default folder geometry while retaining each theme's fill and glow. */
html[data-theme="dark"] .folder-shape,
html[data-theme="light"] .folder-shape,
html[data-theme="sky"] .folder-shape,
html[data-theme="neon"] .folder-shape,
html[data-theme="matrix"] .folder-shape,
html[data-theme="knight"] .folder-shape,
html[data-theme="forest"] .folder-shape,
html[data-theme="aau"] .folder-shape,
html[data-theme="trifork"] .folder-shape,
html[data-theme="conexio"] .folder-shape,
html[data-theme="rd"] .folder-shape {
  border: 0;
}

html[data-theme="dark"] .folder-shape {
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.28));
}

html[data-theme="sky"] .folder-shape {
  filter: drop-shadow(0 0 1px rgba(235, 248, 255, 0.85)) drop-shadow(0 10px 12px rgba(9, 39, 63, 0.28));
}

html[data-theme="neon"] .folder-shape {
  filter: drop-shadow(0 0 1px #58e1ff) drop-shadow(0 0 4px rgba(31, 191, 255, 0.58)) drop-shadow(-1px -1px 4px rgba(228, 39, 255, 0.32));
}

html[data-theme="matrix"] .folder-shape {
  filter: drop-shadow(0 0 1px #31ed45) drop-shadow(0 0 5px rgba(47, 255, 67, 0.2));
}

html[data-theme="knight"] .folder-shape {
  filter: drop-shadow(0 -1px 1px rgba(231, 155, 80, 0.76)) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.34));
}

html[data-theme="forest"] .folder-shape {
  filter: drop-shadow(0 0 1px rgba(225, 238, 202, 0.8)) drop-shadow(0 10px 10px rgba(0, 30, 17, 0.35));
}

html[data-theme="dark"] .folder-shape::before,
html[data-theme="light"] .folder-shape::before,
html[data-theme="sky"] .folder-shape::before,
html[data-theme="neon"] .folder-shape::before,
html[data-theme="matrix"] .folder-shape::before,
html[data-theme="knight"] .folder-shape::before,
html[data-theme="forest"] .folder-shape::before,
html[data-theme="aau"] .folder-shape::before,
html[data-theme="trifork"] .folder-shape::before,
html[data-theme="conexio"] .folder-shape::before,
html[data-theme="rd"] .folder-shape::before {
  left: 0;
  border: 0;
  box-shadow: none;
}

html[data-theme="dark"] .folder-shape::after,
html[data-theme="light"] .folder-shape::after,
html[data-theme="sky"] .folder-shape::after,
html[data-theme="neon"] .folder-shape::after,
html[data-theme="matrix"] .folder-shape::after,
html[data-theme="knight"] .folder-shape::after,
html[data-theme="forest"] .folder-shape::after,
html[data-theme="aau"] .folder-shape::after,
html[data-theme="trifork"] .folder-shape::after,
html[data-theme="conexio"] .folder-shape::after,
html[data-theme="rd"] .folder-shape::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  width: auto;
  height: auto;
  background: inherit;
  border-radius: inherit;
  box-shadow: none;
  pointer-events: none;
}

/* Advanced-theme surfaces used outside the folder grid. */
html[data-theme]:not([data-theme="default"]) .files-list,
html[data-theme]:not([data-theme="default"]) .files-dialog,
html[data-theme]:not([data-theme="default"]) .files-context-menu,
html[data-theme]:not([data-theme="default"]) .locked-folder__card,
html[data-theme]:not([data-theme="default"]) .administrator-panel,
html[data-theme]:not([data-theme="default"]) .administrator-alert,
html[data-theme]:not([data-theme="default"]) .unsupported-card {
  border: 1px solid var(--files-border);
  box-shadow: var(--files-shadow-popover);
}

html[data-theme="sky"] .files-list,
html[data-theme="sky"] .files-dialog,
html[data-theme="sky"] .files-context-menu,
html[data-theme="sky"] .administrator-panel,
html[data-theme="forest"] .files-list,
html[data-theme="forest"] .files-dialog,
html[data-theme="forest"] .files-context-menu,
html[data-theme="forest"] .administrator-panel {
  backdrop-filter: blur(18px);
}

html[data-theme="matrix"] .file-icon-frame .fiv-sqo {
  filter: grayscale(1) sepia(1) hue-rotate(73deg) saturate(5) brightness(1.15) contrast(1.1) drop-shadow(0 0 8px rgba(48, 255, 66, 0.4));
}

html[data-theme="neon"] .file-icon-frame .fiv-sqo {
  filter: grayscale(0.3) saturate(1.5) hue-rotate(205deg) brightness(1.25) contrast(1.08) drop-shadow(0 0 10px rgba(56, 210, 255, 0.55));
}

html[data-theme="gameboy"] .file-icon-frame .fiv-sqo {
  filter: grayscale(1) sepia(1) hue-rotate(48deg) saturate(3.2) brightness(0.45) contrast(1.4);
}

/* Theme picker thumbnails use the production folder geometry, not a miniature app clone. */
.files-theme-card__preview::before {
  inset: 24% 26%;
  z-index: 0;
  background: currentColor;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.2;
}

.files-theme-card__preview::after {
  top: 14px;
  left: 16px;
  z-index: 3;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 9px 0 currentColor, 18px 0 currentColor;
  opacity: 0.68;
}

[data-theme-picker] .files-theme-card__preview .files-theme-card__folder {
  position: absolute;
  top: 45px;
  left: 50%;
  z-index: 2;
  display: block;
  width: 98px;
  height: auto;
  aspect-ratio: 132 / 86;
  background: #65749f;
  border: 0;
  border-radius: 9px 10px 12px 12px;
  box-shadow: 0 11px 18px rgba(0, 0, 0, 0.28);
  filter: none;
  transform: translateX(-50%);
}

[data-theme-picker] .files-theme-card__preview .files-theme-card__folder::before {
  content: "";
  position: absolute;
  top: -17%;
  bottom: auto;
  left: 0;
  z-index: 0;
  width: 47%;
  height: 33%;
  background: #65749f;
  border: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

[data-theme-picker] .files-theme-card__preview .files-theme-card__folder::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  width: auto;
  height: auto;
  background: inherit;
  border-radius: inherit;
  box-shadow: none;
  pointer-events: none;
}

.files-theme-card__preview--default {
  color: #8f9dff;
  background:
    radial-gradient(circle at 50% 55%, rgba(83, 94, 137, 0.36), transparent 48%),
    #0b1020;
}

.files-theme-card__preview--light {
  color: #315f9f;
}

[data-theme-picker] .files-theme-card__preview--light .files-theme-card__folder {
  background: linear-gradient(145deg, #9bbbea, #6f9bd9);
  box-shadow: 0 11px 18px rgba(54, 86, 130, 0.2);
}

[data-theme-picker] .files-theme-card__preview--light .files-theme-card__folder::before {
  background: linear-gradient(145deg, #acc8ef, #82a9df);
}

.files-theme-card__preview--dark {
  color: #6388ff;
}

[data-theme-picker] .files-theme-card__preview--dark .files-theme-card__folder {
  background: linear-gradient(145deg, #414854, #303641 68%, #292f39);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.48);
}

[data-theme-picker] .files-theme-card__preview--dark .files-theme-card__folder::before {
  background: linear-gradient(145deg, #3d444f, #303640);
}

.files-theme-card__preview--sky {
  color: #d9efff;
}

[data-theme-picker] .files-theme-card__preview--sky .files-theme-card__folder {
  background: linear-gradient(145deg, #d3e9f8 0%, #9bbbd3 38%, #718faf 100%);
  filter: drop-shadow(0 0 1px rgba(235, 248, 255, 0.85)) drop-shadow(0 8px 9px rgba(9, 39, 63, 0.34));
}

[data-theme-picker] .files-theme-card__preview--sky .files-theme-card__folder::before {
  background: linear-gradient(145deg, #e0f2fe, #a6c5dc);
}

.files-theme-card__preview--neon {
  color: #45ddff;
}

[data-theme-picker] .files-theme-card__preview--neon .files-theme-card__folder {
  background: linear-gradient(155deg, #9848e8, #405bd9 52%, #1d68ca);
  box-shadow: inset 0 0 10px rgba(39, 54, 168, 0.44);
  filter: drop-shadow(0 0 1px #58e1ff) drop-shadow(0 0 5px rgba(31, 191, 255, 0.58)) drop-shadow(-1px -1px 4px rgba(228, 39, 255, 0.32));
}

[data-theme-picker] .files-theme-card__preview--neon .files-theme-card__folder::before {
  background: linear-gradient(145deg, #df4ce8, #6352dc);
}

.files-theme-card__preview--matrix {
  color: #39ff4d;
}

[data-theme-picker] .files-theme-card__preview--matrix .files-theme-card__folder {
  background:
    repeating-linear-gradient(0deg, rgba(51, 255, 63, 0.05) 0 1px, transparent 1px 4px),
    #052a0a;
  filter: drop-shadow(0 0 1px #31ed45) drop-shadow(0 0 4px rgba(47, 255, 67, 0.24));
}

[data-theme-picker] .files-theme-card__preview--matrix .files-theme-card__folder::before {
  background: #052a0a;
}

.files-theme-card__preview--knight {
  color: #f39a39;
}

[data-theme-picker] .files-theme-card__preview--knight .files-theme-card__folder {
  background: linear-gradient(145deg, #51483f 0%, #282522 24%, #171615 72%, #121211);
  filter: drop-shadow(0 -1px 1px rgba(231, 155, 80, 0.9)) drop-shadow(0 10px 9px rgba(0, 0, 0, 0.65));
}

[data-theme-picker] .files-theme-card__preview--knight .files-theme-card__folder::before {
  background: linear-gradient(145deg, #645444, #2b2825 72%);
}

.files-theme-card__preview--gameboy {
  color: #0f380f;
}

.files-theme-card__preview--gameboy::before {
  display: none;
}

[data-theme-picker] .files-theme-card__preview--gameboy .files-theme-card__folder {
  width: 92px;
  background: #7f9e18;
  border: 3px solid #0f380f;
  border-radius: 0;
  box-shadow: 5px 5px 0 #306230;
}

[data-theme-picker] .files-theme-card__preview--gameboy .files-theme-card__folder::before {
  left: -3px;
  width: 48%;
  background: #8bac0f;
  border: 3px solid #0f380f;
  border-bottom: 0;
  border-radius: 0;
}

[data-theme-picker] .files-theme-card__preview--gameboy .files-theme-card__folder::after {
  background: #7f9e18;
  box-shadow: inset 3px 3px 0 #9bbc0f;
}

.files-theme-card__preview--forest {
  color: #c5dc9f;
}

.files-theme-card__preview--forest::before {
  inset: auto -7% -46% 46%;
  width: 72%;
  height: 150%;
  background: url("/themes/forest-leaf-4.webp") right bottom / contain no-repeat;
  border-radius: 0;
  filter: none;
  opacity: 0.2;
}

[data-theme-picker] .files-theme-card__preview--forest .files-theme-card__folder {
  background: linear-gradient(145deg, #c1d79b 0%, #9fb87b 52%, #77945f);
  filter: drop-shadow(0 0 1px rgba(225, 238, 202, 0.8)) drop-shadow(0 8px 8px rgba(0, 30, 17, 0.38));
}

[data-theme-picker] .files-theme-card__preview--forest .files-theme-card__folder::before {
  background: linear-gradient(145deg, #cadca8, #99b375);
}

.files-theme-card__preview--aau {
  color: #31a9c1;
}

[data-theme-picker] .files-theme-card__preview--aau .files-theme-card__folder {
  background: linear-gradient(145deg, #6e64cf, #403798);
  box-shadow: 0 11px 18px rgba(18, 13, 54, 0.42);
}

[data-theme-picker] .files-theme-card__preview--aau .files-theme-card__folder::before {
  background: linear-gradient(145deg, #8077db, #594fbf);
}

.files-theme-card__preview--trifork {
  color: #ff6600;
}

[data-theme-picker] .files-theme-card__preview--trifork .files-theme-card__folder {
  background: linear-gradient(145deg, #536771, #2c3a42);
  border-radius: 5px;
  box-shadow: 0 11px 18px rgba(20, 29, 33, 0.42);
}

[data-theme-picker] .files-theme-card__preview--trifork .files-theme-card__folder::before {
  background: linear-gradient(145deg, #ff7a21, #e85d00);
  border-radius: 4px 4px 0 0;
}

.files-theme-card__preview--conexio {
  color: #a7cf4a;
}

[data-theme-picker] .files-theme-card__preview--conexio .files-theme-card__folder {
  background: #2b2b2b;
  border-radius: 5px;
  box-shadow: 0 11px 18px rgba(0, 0, 0, 0.42);
}

[data-theme-picker] .files-theme-card__preview--conexio .files-theme-card__folder::before {
  background: #a7cf4a;
  border-radius: 4px 4px 0 0;
}

.files-theme-card__preview--rd {
  color: #c3cb54;
}

[data-theme-picker] .files-theme-card__preview--rd .files-theme-card__folder {
  background: linear-gradient(145deg, #46938e, #166b66);
  border-radius: 5px;
  box-shadow: 0 11px 18px rgba(0, 26, 48, 0.42);
}

[data-theme-picker] .files-theme-card__preview--rd .files-theme-card__folder::before {
  background: linear-gradient(145deg, #d2d978, #afb743);
  border-radius: 4px 4px 0 0;
}

@media (max-width: 960px) {
  .files-settings__heading {
    display: grid;
    gap: 12px;
  }

  .files-theme-picker {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  }

  html[data-theme]:not([data-theme="default"]) .files-grid {
    --files-grid-row-gap: 24px;
  }

  html[data-theme] .files-sidebar {
    position: relative;
    top: 0;
    height: auto;
  }

  html[data-theme="sky"] body,
  html[data-theme="forest"] body {
    background: var(--files-bg);
  }

  html[data-theme="sky"] body::before,
  html[data-theme="forest"] body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  html[data-theme="sky"] body::before {
    background:
      radial-gradient(circle at 24% 13%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.7px) 0 0 / 137px 149px,
      radial-gradient(circle at 78% 28%, rgba(220, 240, 255, 0.14) 0 1px, transparent 1.8px) 0 0 / 193px 211px,
      linear-gradient(180deg, rgba(27, 56, 78, 0.22), rgba(18, 39, 58, 0.36)),
      url("/themes/sky-wallpaper.png") center / cover no-repeat;
    opacity: 1;
  }

  html[data-theme="forest"] body::before {
    background:
      linear-gradient(90deg, rgba(7, 48, 42, 0.2), rgba(7, 39, 34, 0.42)),
      url("/themes/forest-wallpaper.webp") center / cover no-repeat;
  }

  html[data-theme="sky"] .files-shell {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  html[data-theme="sky"] .files-sidebar {
    top: 0;
    height: auto;
  }

  html[data-theme="sky"] .files-workspace {
    min-height: 0;
    padding: 28px 16px 32px;
  }

  html[data-theme] .files-sidebar__brand,
  html[data-theme] .files-sidebar__footer,
  html[data-theme="neon"] .files-theme-scene,
  html[data-theme="forest"] .files-sidebar::after,
  html[data-theme="knight"] .files-sidebar::after {
    display: none;
  }

  html[data-theme="sky"] .files-nav,
  html[data-theme="light"] .files-nav,
  html[data-theme="neon"] .files-nav,
  html[data-theme="knight"] .files-nav,
  html[data-theme="forest"] .files-nav,
  html[data-theme="aau"] .files-nav,
  html[data-theme="trifork"] .files-nav,
  html[data-theme="conexio"] .files-nav,
  html[data-theme="rd"] .files-nav {
    margin-top: 0;
  }

  html[data-theme="neon"] .files-sidebar {
    border-radius: 0 0 18px 18px;
  }

  html[data-theme="matrix"] .files-sidebar {
    border: 0;
  }

  html[data-theme="knight"] .files-sidebar {
    border-width: 0 0 1px;
  }

  html[data-theme="knight"] .files-sidebar::after {
    display: none;
  }

  html[data-theme="gameboy"] body {
    padding: 8px;
  }

  html[data-theme="gameboy"] .files-shell {
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100dvh - 16px);
    min-height: calc(100vh - 16px);
    border-width: 4px;
    border-radius: 18px;
  }

  html[data-theme="gameboy"] .files-sidebar {
    position: relative;
    top: 0;
    z-index: 12;
    height: auto;
    border-right: 0;
    border-bottom: 4px double #0f380f;
  }

  html[data-theme="gameboy"] .files-nav {
    margin-top: 0;
  }

  html[data-theme="gameboy"] .files-nav__item::after {
    display: none;
  }

  html[data-theme="gameboy"] .files-workspace {
    padding: 24px 14px 28px;
  }

  html[data-theme="gameboy"] .files-toolbar__title::before {
    display: none;
  }

  html[data-theme="gameboy"] .files-toolbar__title {
    display: block;
  }
}

@media (max-width: 520px) {
  .files-theme-card {
    grid-template-rows: 116px auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .files-theme-card {
    transition: none;
  }

  .files-theme-card:hover {
    transform: none;
  }
}
