/* =============================================================================
   macOS 27 Finder — pixel-oriented match to dark Liquid Glass screenshot
   Differences fixed vs earlier sim:
   - Continuous purple-dark shell (not milky white)
   - Toolbar only over main pane; traffic lights over sidebar
   - Soft sidebar selection (not system blue)
   - Capsule nav + title pill + glass tool icons (SVG)
   - Path bar with folder glyphs
   - Sparse default system content (not personal files)
   ============================================================================= */

/* ---- Window shell ---- */
.window[data-app='finder'] {
  border-radius: 20px !important;
  overflow: hidden !important;
  /* Match screenshot: deep purple-gray glass */
  background: rgba(36, 32, 44, 0.92) !important;
  border: 0.5px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.3),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(50px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(50px) saturate(140%) !important;
}

html[data-theme='light'] .window[data-app='finder'] {
  background: rgba(242, 240, 246, 0.94) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.18),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.8) !important;
}

/*
 * Traffic lights live over the sidebar only (do not cover main toolbar).
 * Drag: sidebar titlebar strip + .finder-toolbar (wired in window-manager.js).
 */
.window[data-app='finder'] .window-titlebar {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 210px !important; /* sidebar width only — must not cover toolbar buttons */
  height: 52px !important;
  min-height: 52px !important;
  z-index: 30;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: auto !important;
  padding: 0 !important;
  cursor: grab;
}
.window[data-app='finder'] .window-titlebar:active {
  cursor: grabbing;
}
.window[data-app='finder'] .window-titlebar::before {
  display: none !important;
}
.window[data-app='finder'] .window-title {
  display: none !important;
}
.window[data-app='finder'] .traffic-lights {
  pointer-events: auto;
  position: absolute;
  left: 14px;
  top: 16px;
  gap: 8px !important;
  z-index: 31;
}
/* Primary drag strip for Finder (titlebar only covers sidebar) */
.window[data-app='finder'] .finder-toolbar {
  position: relative;
  z-index: 5;
  pointer-events: auto;
  cursor: grab;
}
.window[data-app='finder'] .finder-toolbar:active {
  cursor: grabbing;
}
.window[data-app='finder'] .finder-toolbar button,
.window[data-app='finder'] .tb-capsule,
.window[data-app='finder'] .tb-title-pill {
  cursor: default;
}
.window[data-app='finder'] .traffic-light {
  width: 12px !important;
  height: 12px !important;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2) !important;
}
.window[data-app='finder'] .window-body,
.window[data-app='finder'] .window-content {
  height: 100% !important;
  background: transparent !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

/* ---- Layout ---- */
.finder-app {
  display: flex;
  height: 100%;
  min-height: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  letter-spacing: -0.015em;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

html[data-theme='light'] .finder-app {
  color: rgba(0, 0, 0, 0.88);
}

/* Sidebar column — matches screenshot purple-dark continuous glass */
.finder-sidebar {
  width: 210px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0 8px 12px;
  /* Slightly lighter than main content in dark mode (screenshot) */
  background: rgba(48, 44, 58, 0.55);
  border-right: 0.5px solid rgba(255, 255, 255, 0.05);
  overflow-y: auto;
  overflow-x: hidden;
}

html[data-theme='light'] .finder-sidebar {
  background: rgba(255, 255, 255, 0.35);
  border-right-color: rgba(0, 0, 0, 0.06);
}

.finder-sb-traffic-space {
  height: 48px;
  flex-shrink: 0;
}

.finder-sb-heading {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  padding: 12px 10px 5px;
  letter-spacing: 0.01em;
}

.finder-sb-heading.favorites-head {
  /* Screenshot often has no Favorites label; keep subtle */
  padding-top: 2px;
  opacity: 0; /* hide label text but keep spacing optional */
  height: 0;
  padding: 0;
  overflow: hidden;
}

html[data-theme='light'] .finder-sb-heading {
  color: rgba(0, 0, 0, 0.4);
}

.finder-sb-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.finder-sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: default;
  color: rgba(255, 255, 255, 0.88);
  min-height: 28px;
  transition: background 0.1s ease;
}

html[data-theme='light'] .finder-sb-item {
  color: rgba(0, 0, 0, 0.82);
}

.finder-sb-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme='light'] .finder-sb-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Soft filled pill — CRITICAL match (not accent blue) */
.finder-sb-item.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

html[data-theme='light'] .finder-sb-item.active {
  background: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.9) !important;
}

.finder-sb-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #64d2ff; /* light blue SF symbols */
  flex-shrink: 0;
}

.finder-sb-icon svg {
  display: block;
}

.finder-sb-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

/* Tags */
.tag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: 4px;
}
.tag-dot.red { background: #ff453a; }
.tag-dot.orange { background: #ff9f0a; }
.tag-dot.yellow { background: #ffd60a; }
.tag-dot.green { background: #30d158; }
.tag-dot.blue { background: #0a84ff; }
.tag-dot.purple { background: #bf5af2; }
.tag-dot.gray {
  background: #8e8e93;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
}

/* ---- Main column ---- */
.finder-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  /* Slightly darker content well (screenshot) */
  background: rgba(0, 0, 0, 0.22);
}

html[data-theme='light'] .finder-main {
  background: rgba(255, 255, 255, 0.45);
}

/* Toolbar row — same vertical band as traffic lights */
.finder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  min-height: 52px;
  padding: 0 14px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.finder-tb-left,
.finder-tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Segmented back/forward capsule */
.tb-capsule.nav {
  display: inline-flex;
  align-items: stretch;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

html[data-theme='light'] .tb-capsule.nav {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

.tb-seg {
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  border: none;
  background: transparent;
  cursor: default;
  padding: 0;
}

.tb-seg + .tb-seg {
  border-left: 0.5px solid rgba(255, 255, 255, 0.1);
}

html[data-theme='light'] .tb-seg {
  color: rgba(0, 0, 0, 0.7);
}

/* Title pill — “Desktop” in screenshot */
.tb-title-pill {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

html[data-theme='light'] .tb-title-pill {
  color: rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Glass tool buttons (right side) */
.tb-glass-btn {
  width: 30px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  cursor: default;
  padding: 0;
  flex-shrink: 0;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.tb-glass-btn svg {
  display: block;
  opacity: 0.95;
}

/* Text pills for Duplicate / New Folder — single line, no wrap */
.tb-glass-btn.tb-text-btn {
  width: auto;
  min-width: 0;
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1;
}

html[data-theme='light'] .tb-glass-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.75);
}

html[data-theme='light'] .tb-glass-btn.tb-text-btn {
  color: rgba(0, 0, 0, 0.78);
}

.tb-glass-btn:hover,
.tb-seg:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Icon grid */
.finder-icon-grid {
  flex: 1;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 20px 8px;
  padding: 8px 16px 16px;
  align-content: start;
}

.finder-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
  outline: none;
  padding: 4px;
  border-radius: 8px;
}

.finder-thumb {
  width: 80px;
  height: 56px;
  border-radius: 6px;
  position: relative;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), transparent 55%),
    linear-gradient(145deg, hsl(var(--h, 220), 22%, 28%), hsl(var(--h, 220), 28%, 14%));
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.finder-thumb-inner {
  position: absolute;
  inset: 7px 9px 9px;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, transparent 45%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 5px,
      rgba(255, 255, 255, 0.025) 5px,
      rgba(255, 255, 255, 0.025) 6px
    );
  border: 0.5px solid rgba(255, 255, 255, 0.06);
}

/* System folder icon style */
.finder-thumb.kind-folder {
  width: 72px;
  height: 56px;
  border-radius: 4px 4px 3px 3px;
  background:
    linear-gradient(180deg, #7ec8ff 0%, #4aa3e8 40%, #2b7fd4 100%);
  box-shadow: 0 4px 12px rgba(42, 120, 200, 0.35);
}
.finder-thumb.kind-folder .finder-thumb-inner {
  display: none;
}
.finder-thumb.kind-folder::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 8px;
  right: 22px;
  height: 8px;
  border-radius: 2px 2px 0 0;
  background: rgba(255, 255, 255, 0.25);
}

.finder-thumb.kind-app {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  background: linear-gradient(145deg, hsl(var(--h, 210), 68%, 58%), hsl(var(--h, 210), 72%, 42%));
}
.finder-thumb.kind-app .finder-thumb-inner {
  inset: 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.28);
  border: none;
}

.finder-thumb.kind-pdf {
  background: linear-gradient(160deg, #ff6b6b, #c41e16);
}
.finder-thumb.kind-video .finder-thumb-inner::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.55);
}

.finder-label {
  max-width: 100px;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.88);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 2px 7px;
  border-radius: 5px;
}

html[data-theme='light'] .finder-label {
  color: rgba(0, 0, 0, 0.8);
}

/* Blue name selection pill — exact match to screenshot */
.finder-icon-item.is-selected .finder-label {
  background: #0a84ff;
  color: #fff !important;
}

.finder-icon-item.is-selected .finder-thumb {
  box-shadow:
    0 0 0 2px rgba(10, 132, 255, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.4);
}

.finder-empty {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  opacity: 0.55;
}

/* Path bar — thin, quiet, no janky animation */
.finder-pathbar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  padding: 0 12px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  font-size: 11px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.48);
  flex-shrink: 0;
  scrollbar-width: none;
  transition: none;
}

.finder-pathbar::-webkit-scrollbar {
  display: none;
}

html[data-theme='light'] .finder-pathbar {
  background: rgba(0, 0, 0, 0.03);
  border-top-color: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.48);
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.crumb.is-current {
  color: rgba(255, 255, 255, 0.78);
}

html[data-theme='light'] .crumb.is-current {
  color: rgba(0, 0, 0, 0.72);
}

.crumb-folder {
  width: 10px;
  height: 8px;
  border-radius: 1px;
  background: linear-gradient(180deg, #7ec8ff, #3a8fd4);
  display: inline-block;
  flex-shrink: 0;
  opacity: 0.85;
}

.crumb-sep {
  opacity: 0.32;
  margin: 0 4px;
  font-weight: 300;
  font-size: 12px;
}

/* Grid folder switch — soft fade only (not path bar) */
.finder-icon-grid {
  transition: opacity 0.12s ease;
}
.finder-icon-grid.is-switching {
  opacity: 0.35;
}
.finder-icon-grid.is-ready {
  opacity: 1;
}

/* Dark theme tokens used by other surfaces */
html[data-theme='dark'] {
  --surface-window: rgba(36, 32, 44, 0.9);
  --surface-window-active: rgba(42, 38, 52, 0.92);
}

/* =============================================================================
   Finder view modes — Icons · List · Columns · Gallery (real macOS toolbar)
   ============================================================================= */

.finder-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.finder-content.is-ready {
  animation: finderFade 0.14s ease;
}
@keyframes finderFade {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* View mode capsule (4 buttons) */
.tb-view-group {
  display: inline-flex;
  align-items: stretch;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
html[data-theme='light'] .tb-view-group {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}
.tb-view-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  padding: 0;
  cursor: default;
}
.tb-view-btn + .tb-view-btn {
  border-left: 0.5px solid rgba(255, 255, 255, 0.08);
}
html[data-theme='light'] .tb-view-btn {
  color: rgba(0, 0, 0, 0.55);
}
html[data-theme='light'] .tb-view-btn + .tb-view-btn {
  border-left-color: rgba(0, 0, 0, 0.06);
}
.tb-view-btn.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.95);
}
html[data-theme='light'] .tb-view-btn.is-active {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.88);
}
.tb-view-btn:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.08);
}

/* Keep icon grid inside content */
.finder-content .finder-icon-grid,
.finder-content .finder-list-view,
.finder-content .finder-columns,
.finder-content .finder-gallery,
.finder-content .finder-empty {
  flex: 1;
  min-height: 0;
}

/* ---- List view ---- */
.finder-list-view {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 12px;
}
.finder-list-head {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) 140px 72px 110px;
  gap: 8px;
  padding: 4px 14px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  user-select: none;
}
html[data-theme='light'] .finder-list-head {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.4);
}
.finder-list-body {
  flex: 1;
  overflow: auto;
}
.finder-list-row {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) 140px 72px 110px;
  gap: 8px;
  align-items: center;
  padding: 3px 14px;
  min-height: 28px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.04);
  cursor: default;
  color: rgba(255, 255, 255, 0.9);
}
html[data-theme='light'] .finder-list-row {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.88);
}
.finder-list-row:hover {
  background: rgba(255, 255, 255, 0.05);
}
.finder-list-row.is-selected {
  background: rgba(10, 132, 255, 0.35);
  color: #fff;
}
html[data-theme='light'] .finder-list-row.is-selected {
  background: rgba(0, 122, 255, 0.22);
  color: inherit;
}
.fl-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fl-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.fl-date, .fl-size, .fl-kind {
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fl-ico {
  width: 16px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
  background: linear-gradient(145deg, hsl(var(--h, 210), 50%, 55%), hsl(var(--h, 210), 55%, 40%));
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
}
.fl-ico.kind-folder {
  background: linear-gradient(180deg, #7ec8ff, #3a8fd4);
  border-radius: 2px 2px 1px 1px;
}
.fl-ico.kind-app {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* ---- Columns view ---- */
.finder-columns {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  height: 100%;
}
.finder-col {
  width: 200px;
  min-width: 160px;
  max-width: 280px;
  border-right: 0.5px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
html[data-theme='light'] .finder-col {
  border-right-color: rgba(0, 0, 0, 0.08);
}
.finder-col-detail {
  width: 220px;
}
.finder-col-empty {
  flex: 1;
  min-width: 80px;
  border-right: none;
  background: rgba(0, 0, 0, 0.08);
}
html[data-theme='light'] .finder-col-empty {
  background: rgba(0, 0, 0, 0.02);
}
.finder-col-scroll {
  flex: 1;
  overflow: auto;
  padding: 4px 0;
}
.finder-col-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 12px;
  min-height: 26px;
  cursor: default;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}
html[data-theme='light'] .finder-col-item {
  color: rgba(0, 0, 0, 0.88);
}
.finder-col-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.finder-col-item.is-selected {
  background: rgba(10, 132, 255, 0.4);
  color: #fff;
}
html[data-theme='light'] .finder-col-item.is-selected {
  background: #0a84ff;
  color: #fff;
}
.fc-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-chev {
  opacity: 0.45;
  font-size: 14px;
  flex-shrink: 0;
}
.finder-col-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  text-align: center;
}
.finder-col-preview .finder-thumb {
  width: 96px;
  height: 72px;
}
.fc-preview-name {
  font-size: 13px;
  font-weight: 600;
}
.fc-preview-sub {
  font-size: 11px;
  opacity: 0.55;
}

/* ---- Gallery view ---- */
.finder-gallery {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.finder-gal-preview {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
}
.finder-gal-hero {
  width: min(420px, 70%);
  aspect-ratio: 4/3;
  max-height: 58%;
  border-radius: 8px;
  position: relative;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(145deg, hsl(var(--h, 220), 28%, 32%), hsl(var(--h, 220), 32%, 16%));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.finder-gal-hero.kind-folder {
  background: linear-gradient(180deg, #7ec8ff 0%, #2b7fd4 100%);
}
.finder-gal-hero.kind-app {
  width: min(200px, 40%);
  aspect-ratio: 1;
  border-radius: 28px;
  background: linear-gradient(145deg, hsl(var(--h, 210), 68%, 58%), hsl(var(--h, 210), 72%, 42%));
}
.finder-gal-meta {
  text-align: center;
}
.finder-gal-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.finder-gal-sub {
  font-size: 12px;
  margin-top: 4px;
  opacity: 0.55;
}
.finder-gal-strip {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  padding: 10px 14px 12px;
  overflow-x: auto;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}
html[data-theme='light'] .finder-gal-strip {
  border-top-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
}
.finder-gal-thumb {
  flex: 0 0 auto;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 6px;
  cursor: default;
}
.finder-gal-thumb .finder-thumb {
  width: 56px;
  height: 40px;
}
.finder-gal-thumb.is-selected {
  background: rgba(10, 132, 255, 0.35);
}
.finder-gal-label {
  font-size: 10px;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  opacity: 0.85;
}

/* Status bar */
.finder-statusbar {
  flex-shrink: 0;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  opacity: 0.5;
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}
html[data-theme='light'] .finder-statusbar {
  border-top-color: rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.03);
  opacity: 0.65;
}

/* Layout: main column flex */
.finder-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  min-height: 0;
}

/* Path bar crumbs as buttons */
.finder-pathbar .crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: default;
}
.finder-pathbar .crumb:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.1);
}
.finder-pathbar .crumb:disabled {
  opacity: 0.9;
  font-weight: 600;
}
.finder-pathbar .crumb-sep {
  opacity: 0.4;
  margin: 0 2px;
}

/* Finder search field */
.finder-search-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  min-width: 120px;
}
html[data-theme='light'] .finder-search-wrap {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}
.finder-search-ico {
  display: grid;
  place-items: center;
  opacity: 0.55;
  line-height: 0;
}
.finder-search-ico svg {
  width: 12px;
  height: 12px;
}
.finder-search {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  width: 100px;
  outline: none;
  min-width: 0;
}
.finder-search::placeholder {
  opacity: 0.45;
}

/* Get Info panel */
.finder-get-info {
  position: absolute;
  right: 24px;
  top: 72px;
  z-index: 30;
  width: min(280px, 90%);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(40, 36, 48, 0.96);
  color: #fff;
}
html[data-theme='light'] .finder-get-info {
  background: rgba(255, 255, 255, 0.98);
  color: #1d1d1f;
  border-color: rgba(0, 0, 0, 0.08);
}
.finder-gi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 0.5px solid rgba(128, 128, 128, 0.25);
}
.finder-gi-close {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
}
.finder-gi-body {
  padding: 12px 14px 16px;
  font-size: 13px;
}
.finder-gi-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}
.window[data-app='finder'] .window-content {
  position: relative;
}
