/* Cyber Aurora Glass UI Theme v2 - 2026-10-16 */
:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --paper: #05070e;
  --line: rgba(148, 163, 184, 0.14);
  --accent: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-violet: #a855f7;
  --accent-emerald: #10b981;
  --mint: rgba(56, 189, 248, 0.16);
  --nav-secondary: #94a3b8;
  --nav-surface: rgba(15, 23, 42, 0.65);
  --nav-font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono-font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@keyframes auroraPulse {
  0%, 100% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 0 0;
  }
  50% {
    background-position: 15% 10%, 85% 15%, 45% 85%, 0 0;
  }
}

@keyframes statusBreath {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55), 0 0 8px rgba(16, 185, 129, 0.8);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0), 0 0 12px rgba(16, 185, 129, 1);
  }
}

@keyframes statusBreathCyan {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.55), 0 0 8px rgba(56, 189, 248, 0.8);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0), 0 0 12px rgba(56, 189, 248, 1);
  }
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  background-color: #05070e;
  background-image:
    radial-gradient(circle at 12% -8%, rgba(56, 189, 248, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 88% -5%, rgba(168, 85, 247, 0.20) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 110%, rgba(99, 102, 241, 0.16) 0%, transparent 55%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 120% 120%, 120% 120%, 120% 120%, 40px 40px, 40px 40px;
  background-position: 0% 0%, 100% 0%, 50% 100%, -1px -1px, -1px -1px;
  background-attachment: fixed;
  animation: auroraPulse 18s ease-in-out infinite;
  color: var(--ink);
  font-family: var(--nav-font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

::selection {
  background: rgba(56, 189, 248, 0.35);
  color: #fff;
}

button, input, select, textarea {
  font-family: var(--nav-font);
}

button {
  font-weight: 500;
}

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

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

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.site-shell {
  min-height: 100svh;
  position: relative;
}

.topbar, .hero, .directory, .file-shell, footer {
  width: min(1360px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

/* Floating Glassmorphic Topbar - Spacious Single-Row Layout */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 40;
  height: auto;
  min-height: 68px;
  margin-top: 14px;
  padding: 10px 20px;
  gap: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.80), rgba(10, 15, 30, 0.72));
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  box-shadow:
    0 20px 50px -15px rgba(0, 0, 0, 0.7),
    0 0 30px -10px rgba(56, 189, 248, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.topbar-identity {
  flex: 1 1 auto;
  min-width: 0;
  gap: 14px;
  display: flex;
  align-items: center;
}

/* Telemetry IP Badges - Never Clip or Shrink */
.brand-ip-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: max-content;
}

.brand-ip-list > span {
  flex: 0 0 auto;
  width: auto !important;
  max-width: none !important;
  min-width: max-content;
  height: 32px;
  padding: 0 12px;
  gap: 7px;
  justify-content: flex-start;
  align-items: center;
  overflow: visible;
  font: 600 11.5px/1 var(--mono-font);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-ip-list > span:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px -4px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.brand-ip-list > span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 6px;
  background: var(--accent-emerald);
  animation: statusBreath 2.6s infinite;
}

.brand-ip-list > span:nth-child(2)::before {
  background: var(--accent);
  animation: statusBreathCyan 2.6s infinite 0.6s;
}

/* Category Tabs Capsule - Single Horizontal Line */
.topbar-identity > .tabs {
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-identity > .tabs::-webkit-scrollbar {
  display: none;
}

.tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 4px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
  height: 32px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.tabs button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

.tabs button.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(99, 102, 241, 0.32));
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.65);
  box-shadow:
    0 4px 14px -2px rgba(56, 189, 248, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.tabs button.drag-target-tab {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

/* Topbar Navigation Actions */
.topbar nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.topbar-action,
.topbar nav .nav-link,
.topbar nav .speed-button {
  min-height: 32px;
  height: 32px;
  margin: 0;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font: 500 12.5px/1 var(--nav-font);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar-import-btn {
  border-style: dashed;
  border-color: rgba(56, 189, 248, 0.38);
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.07);
}

.topbar-import-btn.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.topbar-action:hover,
.topbar nav .nav-link:hover,
.topbar nav .nav-link.active,
.topbar nav .speed-button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.28));
  border-color: rgba(56, 189, 248, 0.55);
  border-style: solid;
  box-shadow: 0 4px 15px -3px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.topbar-action:disabled {
  color: #64748b;
  cursor: wait;
}

/* Directory & Groups */
.directory-head {
  display: none;
}

.directory-compact {
  padding-top: 28px;
  padding-bottom: 96px;
}

.link-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 26px 0 32px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  position: relative;
}

.link-group:last-child {
  border-bottom: 0;
}

.group-title {
  gap: 12px;
  align-items: center;
  min-height: 32px;
  display: flex;
}

.group-title h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 18px/1.35 var(--nav-font);
  letter-spacing: -0.01em;
  color: #f1f5f9;
  text-shadow: 0 2px 12px rgba(56, 189, 248, 0.25);
}

.group-title h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8, #818cf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.75);
}

/* Link Grid & Holographic Glass Cards */
.link-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.link-card, .add-card {
  position: relative;
  min-height: 92px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.62) 0%, rgba(15, 23, 42, 0.78) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 18px 20px;
  gap: 12px;
  box-shadow:
    0 8px 24px -6px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.link-card:hover {
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.92) 100%);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow:
    0 20px 38px -10px rgba(0, 0, 0, 0.7),
    0 0 26px -4px rgba(56, 189, 248, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(-4px) scale(1.012);
}

.link-card:hover::before {
  opacity: 1;
}

.link-card:active {
  transform: translateY(-1px) scale(0.996);
}

.link-card-link {
  gap: 14px;
  position: relative;
  z-index: 1;
}

/* Icons */
.favicon-shell, .letter-icon {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.link-card:hover .favicon-shell,
.link-card:hover .letter-icon {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.32);
}

.favicon-shell img {
  width: 28px;
  height: 28px;
}

.letter-icon {
  color: #ffffff;
  font: 700 18px/1 var(--nav-font);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tone-0 { background: linear-gradient(135deg, #f43f5e, #fb923c); }
.tone-1 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.tone-2 { background: linear-gradient(135deg, #f59e0b, #eab308); }
.tone-3 { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.tone-4 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }

.link-copy {
  gap: 5px;
}

.link-copy strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f8fafc;
  transition: color 0.2s ease;
}

.link-card:hover .link-copy strong {
  color: #7dd3fc;
}

.link-copy small {
  color: #94a3b8;
  font: 400 11.5px/1.3 var(--mono-font);
}

.arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.link-card:hover .arrow {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translate(2px, -2px);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.mobile-badge {
  color: #38bdf8;
  font-size: 15px;
  flex-basis: 18px;
  width: 18px;
  opacity: 0.85;
}

.add-card {
  border: 1px dashed rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.35);
  color: #94a3b8;
  font-size: 13.5px;
}

.add-card:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  color: #f8fafc;
  box-shadow: 0 0 24px -6px rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.drag-handle, .group-drag-handle, .group-delete-button {
  color: #64748b;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease;
}

.drag-handle:hover, .group-drag-handle:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
}

.group-delete-button:hover, .context-menu button.danger, .delete-button, .file-actions .danger {
  color: #fb7185;
}

.link-group.drag-target {
  background: rgba(56, 189, 248, 0.08);
  border-radius: 20px;
  outline: 1px dashed rgba(56, 189, 248, 0.45);
}

/* Buttons & Forms */
.account-button, .bookmark-import-button, .upload-button, .unlock-form button,
.save-button, .cancel-button, .delete-button, .gate-button, .empty-state button {
  border-radius: 12px;
  border: 1px solid var(--line);
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-button, .save-button, .upload-button, .unlock-form button, .empty-state button {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  border-color: rgba(125, 211, 252, 0.4);
  box-shadow:
    0 8px 20px -6px rgba(14, 165, 233, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-button:hover, .save-button:hover, .upload-button:hover, .unlock-form button:hover {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  border-color: rgba(186, 230, 253, 0.65);
  box-shadow:
    0 12px 26px -6px rgba(56, 189, 248, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

/* Modals & Context Menus */
.modal-backdrop {
  background: rgba(3, 6, 14, 0.75);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.modal, .context-menu {
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.94), rgba(9, 13, 26, 0.96));
  color: var(--ink);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 26px;
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.85),
    0 0 40px -10px rgba(56, 189, 248, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.modal {
  padding: 32px;
}

.modal-heading h2, .empty-state h2, .mobile-empty h2, .file-heading h1, .locked-view h1,
.server-speed-heading h3 {
  font-family: var(--nav-font);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.modal-heading h2 {
  font-size: 26px;
  line-height: 1.3;
}

.modal-heading p {
  color: #38bdf8;
  font: 700 10.5px/1.4 var(--mono-font);
  letter-spacing: 0.16em;
}

.modal-heading > button {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  transition: all 0.18s ease;
}

.modal-heading > button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.modal input:not([type=checkbox]):not([type=file]), .modal select, .modal textarea,
.auth-form input, .icon-form > label input, .unlock-form input {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  color: #f8fafc;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal input:focus, .modal select:focus, .modal textarea:focus, .auth-form input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.modal label {
  color: #e2e8f0;
  font-weight: 500;
}

.modal input::placeholder, .modal textarea::placeholder {
  color: #64748b;
}

.modal label small, .auth-help, .locked-copy, .recovery-panel > p, .auth-form details,
.icon-tip, .speed-help, .server-speed-heading p, .server-speed-location,
.empty-state p, .mobile-empty p {
  color: #94a3b8;
}

.cancel-button {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.cancel-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.secret-code, .recovery-grid code, .icon-preview {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  color: #bae6fd;
}

.icon-upload-button {
  border-color: rgba(56, 189, 248, 0.35);
  border-radius: 12px;
}

.totp-qr {
  background: #ffffff;
  border-radius: 14px;
  padding: 6px;
}

/* Speedtest & File Center */
.speed-options button {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.speed-options button.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.28));
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
}

.speed-result {
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  box-shadow: inset 0 0 30px rgba(56, 189, 248, 0.07);
}

.speed-result strong {
  font-family: var(--mono-font);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.speed-result span {
  color: #38bdf8;
}

.speed-result small, .server-speed-results span {
  color: #94a3b8;
}

.server-speed-results > div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
}

.speed-track, .storage-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.speed-track span, .storage-track span {
  background: linear-gradient(90deg, #06b6d4, #6366f1, #a855f7);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.storage-card, .upload-zone {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.78));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
}

.storage-copy p, .file-name small, .file-size, .no-files {
  color: var(--nav-secondary);
}

.upload-mark, .file-type {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
}

.file-list-head {
  border-color: var(--line);
}

.file-row {
  border-color: rgba(148, 163, 184, 0.1);
  border-radius: 14px;
  transition: background 0.18s ease;
}

.file-row:hover {
  background: rgba(56, 189, 248, 0.06);
}

.file-actions a, .file-actions button {
  border-radius: 10px;
}

::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #05070e;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border: 2px solid #05070e;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .topbar {
    flex-wrap: wrap;
    align-content: center;
    padding: 12px 18px;
    gap: 12px;
  }
  .topbar-identity {
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .topbar nav {
    margin-left: auto;
  }
  .link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar, .hero, .directory, .file-shell, footer {
    width: calc(100% - 28px);
  }
  .topbar {
    top: 10px;
    margin-top: 10px;
    padding: 14px 16px;
    gap: 12px;
    border-radius: 18px;
  }
  .topbar-identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .brand-ip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .brand-ip-list > span {
    height: 28px;
    padding: 0 11px;
    font-size: 10.5px;
  }
  .topbar-identity > .tabs {
    width: 100%;
    max-width: none;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .tabs button {
    flex: 0 0 auto;
    padding: 0 14px;
  }
  .topbar nav {
    flex: 1 1 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
  }
  .topbar-action,
  .topbar nav .nav-link,
  .topbar nav .speed-button {
    font-size: 12px;
    height: 30px;
    min-height: 30px;
    padding: 0 11px;
  }
  .directory-compact {
    padding-top: 20px;
  }
  .link-group {
    padding: 20px 0 24px;
    gap: 14px;
  }
  .group-title h2 {
    font-size: 16.5px;
  }
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .link-card, .add-card {
    padding: 14px;
    min-height: 82px;
    border-radius: 16px;
  }
  .link-card-link {
    gap: 10px;
  }
  .favicon-shell, .letter-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 11px;
  }
  .favicon-shell img {
    width: 24px;
    height: 24px;
  }
  .arrow {
    display: none;
  }
  .link-copy strong {
    font-size: 13px;
  }
  .link-copy small {
    font-size: 10.5px;
  }
  .modal {
    padding: 24px;
    border-radius: 22px;
  }
}

@media (max-width: 430px) {
  .topbar, .directory, .hero, .file-shell, footer {
    width: calc(100% - 22px);
  }
  .link-grid {
    grid-template-columns: 1fr;
  }
  .link-card, .add-card {
    min-height: 76px;
  }
  .link-copy strong {
    font-size: 14px;
  }
  .link-copy small {
    font-size: 11px;
  }
  .topbar nav {
    justify-content: flex-start;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
