:root {
  --ground: #eef3f6;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --raised: #f3f7f9;
  --subtle: #f8fbfc;
  --active: rgba(14, 116, 144, 0.09);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --control: rgba(15, 23, 42, 0.14);
  --input-border: rgba(15, 23, 42, 0.11);
  --text: #0f1c24;
  --muted: #5c6e7a;
  --nav-text: #4a5c68;
  --accent: #0e7490;
  --accent-2: #0284c7;
  --accent-soft: rgba(14, 116, 144, 0.09);
  --accent-glow: rgba(14, 116, 144, 0.24);
  --positive: #15803d;
  --positive-soft: rgba(21, 128, 61, 0.11);
  --warning: #b45309;
  --negative: #be123c;
  --negative-soft: rgba(190, 18, 60, 0.09);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.09), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 60px -15px rgba(15, 23, 42, 0.22), 0 4px 14px -2px rgba(15, 23, 42, 0.08);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --gap: 24px;
}

[data-theme="dark"] {
  --ground: #080c10;
  --surface: rgba(16, 23, 30, 0.86);
  --surface-solid: #10171e;
  --raised: #16202a;
  --subtle: #121b24;
  --active: rgba(56, 189, 248, 0.13);
  --border: rgba(226, 238, 248, 0.08);
  --border-strong: rgba(226, 238, 248, 0.15);
  --control: rgba(226, 238, 248, 0.15);
  --input-border: rgba(226, 238, 248, 0.11);
  --text: #f0f6fa;
  --muted: #8a9eac;
  --nav-text: #9bb0be;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.28);
  --positive: #34d399;
  --positive-soft: rgba(52, 211, 153, 0.13);
  --warning: #fbbf24;
  --negative: #fb7185;
  --negative-soft: rgba(251, 113, 133, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 36px -12px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 28px 70px -16px rgba(0, 0, 0, 0.78), 0 6px 18px rgba(0, 0, 0, 0.4);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 14px/1.55 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(62% 48% at 18% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(50% 45% at 92% 8%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 68%),
    radial-gradient(45% 40% at 50% 100%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 72%);
}

button, input, textarea, select { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; user-select: none; -webkit-user-select: none; transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease, box-shadow 0.18s ease; }
button:disabled { opacity: 0.48; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:active:not(:disabled) { transform: scale(0.985); }
[hidden] { display: none !important; }

.ic { width: 17px; height: 17px; flex-shrink: 0; }
.ic-sm { width: 15px; height: 15px; flex-shrink: 0; }
.ic-xs { width: 13px; height: 13px; flex-shrink: 0; }

/* Sidebar */
aside {
  width: 244px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px;
}
.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px -4px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
.brand-badge svg { width: 18px; height: 18px; }
.brand-word { font-size: 22px; font-weight: 700; letter-spacing: -0.7px; }
.brand-dot { color: var(--accent); }

.workspace {
  font-size: 12px;
  color: var(--muted);
  margin: 18px 8px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.version-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 2px 7px;
  border-radius: 999px;
}

.nav-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  opacity: 0.8;
  padding: 0 12px 10px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid transparent;
  background: none;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 13px;
  color: var(--nav-text);
}
.nav .ic { opacity: 0.75; }
.nav.active {
  color: var(--text);
  background: var(--surface-solid);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.nav.active .ic { color: var(--accent); opacity: 1; }

.aside-bottom { margin-top: auto; padding-top: 24px; }
.aside-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm), var(--inner-light);
}
.aside-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.private-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.aside-card strong { font-size: 12.5px; font-weight: 600; }
.aside-card p { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.aside-links { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 8px; }
.aside-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--nav-text);
  text-align: left;
}
.aside-action em { font-style: normal; color: var(--accent); font-weight: 600; }
.text-button { padding: 0; border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 500; text-align: left; }
.danger-link { color: var(--negative) !important; }

.local-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 0 10px;
  font-size: 11.5px;
  color: var(--muted);
}

i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--positive); flex-shrink: 0; box-shadow: 0 0 0 3px var(--positive-soft); }
i.warn { background: var(--warning); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16); }
i.err { background: var(--negative); box-shadow: 0 0 0 3px var(--negative-soft); }

/* Shell & Header */
.shell { margin-left: 244px; padding: 0 14px 14px 4px; }
header {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.breadcrumb { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.breadcrumb span { opacity: 0.45; }
.breadcrumb strong { font-weight: 600; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 10px; }
.icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.server-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* Main Sheet */
main {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md), var(--inner-light);
  min-height: calc(100dvh - 76px);
  padding: 34px 36px;
  max-width: 1580px;
  margin: auto;
}

.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { font-size: 32px; letter-spacing: -1.1px; margin: 0; font-weight: 700; line-height: 1.18; }
h1 > span { color: var(--accent); }
.heading p { color: var(--muted); font-size: 13.5px; margin: 7px 0 0; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  min-height: 40px;
  box-shadow: var(--shadow-sm);
}
.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px -5px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.button.small { padding: 6px 12px; min-height: 34px; font-size: 12px; border-radius: 8px; }
.button.danger { color: var(--negative); border-color: color-mix(in srgb, var(--negative) 32%, var(--border)); background: var(--negative-soft); }

/* Panels */
.panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm), var(--inner-light);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: 15.5px; font-weight: 650; margin: 0; letter-spacing: -0.3px; }
.quiet-label { color: var(--muted); font-size: 11.5px; }
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--positive);
  background: var(--positive-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.live-chip i { width: 6px; height: 6px; box-shadow: none; }
.mini-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--raised);
  border: 1px solid var(--border);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.transfer-grid, .bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) 324px; gap: var(--gap); }

/* Send Panel & Animated Device Route */
.send-panel { padding: 24px 26px 0; }
.device-route {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px 24px;
  gap: 24px;
}
.route-device { display: flex; flex-direction: column; align-items: center; min-width: 128px; }
.route-device strong { font-size: 12.5px; font-weight: 600; margin-top: 12px; }
.route-device > span { font-size: 11px; color: var(--muted); margin-top: 2px; }

.laptop {
  width: 98px;
  height: 64px;
  border: 2px solid color-mix(in srgb, var(--text) 35%, var(--border));
  border-radius: 8px;
  position: relative;
  background: linear-gradient(160deg, var(--raised), var(--subtle));
  padding: 4px;
  margin-bottom: 6px;
  box-shadow: var(--shadow-sm);
}
.laptop-screen {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  display: grid;
  place-items: center;
}
.laptop:after {
  content: '';
  position: absolute;
  height: 5px;
  width: 116px;
  left: -11px;
  bottom: -7px;
  background: linear-gradient(90deg, var(--control), var(--muted), var(--control));
  opacity: 0.65;
  border-radius: 2px 2px 6px 6px;
}
.phone {
  height: 70px;
  width: 38px;
  background: linear-gradient(160deg, var(--raised), var(--accent-soft));
  border: 2px solid color-mix(in srgb, var(--text) 35%, var(--border));
  border-radius: 10px;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.phone-notch {
  height: 3px;
  width: 13px;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.65;
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}
.screen-ic { width: 18px; height: 18px; color: var(--accent); }

.route-line {
  width: 126px;
  position: relative;
  margin-top: -26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.route-track {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}
.pulse-dot {
  position: absolute;
  top: -1px;
  left: -24px;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2));
  opacity: 0;
}
.device-route.connected .pulse-dot,
.device-route.transferring .pulse-dot {
  opacity: 1;
  animation: routeFlow 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.device-route.transferring .pulse-dot { animation-duration: 0.85s; }
@keyframes routeFlow {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(150px); opacity: 0; }
}
.route-hub {
  position: absolute;
  top: -14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}
.device-route.connected .route-hub {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.route-line small {
  position: absolute;
  top: 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--muted) 16%, transparent) 1px, transparent 0),
    var(--subtle);
  background-size: 18px 18px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 16px 22px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.2s ease, transform 0.18s ease;
}
.dropzone.dragging {
  border: 1.5px solid var(--accent);
  background-color: var(--accent-soft);
  box-shadow: 0 0 0 5px var(--accent-soft);
  transform: scale(1.006);
}
.upload-orb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 14%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.upload-orb svg { width: 22px; height: 22px; }
.dropzone > strong { font-size: 15.5px; font-weight: 650; letter-spacing: -0.2px; }
.dropzone p { font-size: 12.5px; color: var(--muted); margin: 5px 0 16px; }
.dropzone-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dropzone small { font-size: 11px; color: var(--muted); margin-top: 14px; opacity: 0.9; }

.upload-progress {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--border);
}
.progress-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; margin-bottom: 8px; }
.progress-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: 11.5px; color: var(--muted); }
progress { width: 100%; height: 6px; border-radius: 999px; overflow: hidden; appearance: none; border: 0; background: var(--border); }
progress::-webkit-progress-bar { background: var(--border); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width 0.12s linear; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }

.panel-foot { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; padding: 15px 0; }

/* Connection & QR Panel */
.connection-panel {
  padding: 24px 22px;
  background: linear-gradient(180deg, var(--subtle), var(--surface-solid));
}
.connection-copy { color: var(--muted); font-size: 12.5px; margin: 10px 0 18px; }
.qr-frame {
  position: relative;
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.qr-frame img { width: 100%; height: 100%; border-radius: 4px; }
#qr-fallback { font-size: 12px; text-align: center; color: #5c6e7a; padding: 10px; }
.qr-corner { position: absolute; height: 16px; width: 16px; border-color: var(--accent); border-style: solid; border-radius: 2px; }
.tl { top: -3px; left: -3px; border-width: 2.5px 0 0 2.5px; border-top-left-radius: 6px; }
.tr { top: -3px; right: -3px; border-width: 2.5px 2.5px 0 0; border-top-right-radius: 6px; }
.bl { bottom: -3px; left: -3px; border-width: 0 0 2.5px 2.5px; border-bottom-left-radius: 6px; }
.br { bottom: -3px; right: -3px; border-width: 0 2.5px 2.5px 0; border-bottom-right-radius: 6px; }

.scan-caption { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 13px; font-weight: 500; }
.or { text-align: center; border-top: 1px solid var(--border); margin: 20px 0 14px; line-height: 0; }
.or span { background: var(--surface-solid); padding: 0 10px; color: var(--muted); font-size: 11px; }
label { font-size: 11px; font-weight: 500; color: var(--muted); }
.select-input {
  width: 100%;
  margin: 5px 0 11px;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--surface-solid);
  font-size: 12px;
  color: var(--text);
}
.address-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--input-border);
  background: var(--surface-solid);
  border-radius: 9px;
  margin-top: 5px;
  overflow: hidden;
}
.address-wrap input { width: 100%; min-width: 0; border: 0; padding: 8px 10px; color: var(--text); background: none; font: 500 11.5px Consolas, ui-monospace, monospace; }
.address-wrap button { background: transparent; border: 0; width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); }

.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
}
.code-actions { display: flex; align-items: center; gap: 8px; }
.code-line strong { font: 700 17px Consolas, ui-monospace, monospace; letter-spacing: 3.5px; color: var(--text); }
.icon-mini {
  border: 1px solid var(--border);
  background: var(--surface-solid);
  border-radius: 7px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.wifi-note { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); margin-top: 16px; }
.p2p-join-form { margin-top: 12px; }
.p2p-join-btn { width: auto !important; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--accent) !important; }

/* History & Clipboard */
.bottom-grid { margin-top: var(--gap); align-items: start; }
.history-panel { padding: 22px 24px 0; }
.history-panel h2 { display: flex; align-items: center; gap: 8px; }
.history-panel h2 span {
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
}
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 5px 10px;
}
.search .ic-sm { color: var(--muted); }
.search input { width: 145px; border: 0; background: none; font-size: 12px; outline: none; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-top: 16px; overflow: auto; }
.tabs button {
  border: 0;
  background: none;
  padding: 9px 0 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tabs button.selected { border-bottom-color: var(--accent); color: var(--text); font-weight: 650; }

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-top: 12px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 10px;
  font-size: 12px;
}
.bulk-check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); font-size: 12.5px; font-weight: 600; }
.bulk-actions { display: flex; gap: 8px; }

.empty { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 40px 14px; color: var(--muted); }
.empty-orb { width: 42px; height: 42px; border-radius: 12px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent); }
.empty strong { font-size: 13px; font-weight: 600; color: var(--text); }
.empty p { margin: 3px 0 0; font-size: 12px; }

.history-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 14px 0; font-size: 11.5px; color: var(--muted); }
.foot-actions { display: flex; align-items: center; gap: 16px; }

/* File Rows */
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  margin: 4px -10px;
  border-radius: 11px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.14s ease;
}
.file-row:last-child { border-bottom: 0; }
.row-check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.file-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.file-symbol.clickable { cursor: pointer; }
.file-symbol img { width: 100%; height: 100%; object-fit: cover; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: flex; align-items: center; gap: 6px; }
.folder-tag { font-size: 10.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 5px; flex-shrink: 0; }
.file-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.file-meta a { color: var(--accent); font-weight: 500; text-decoration: underline; }

.row-actions { display: flex; align-items: center; gap: 4px; }
.row-actions a, .icon-button {
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 17px;
  border-radius: 8px;
  color: var(--muted);
}
.row-actions button {
  border: 0;
  background: transparent;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
}
.row-actions button[data-delete] { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; }
.row-actions .gallery-btn { color: var(--accent); background: var(--accent-soft); font-weight: 600; padding: 5px 10px; white-space: nowrap; }

/* Clipboard Panel */
.clipboard-panel { padding: 22px; }
.clipboard-panel > p { font-size: 12px; color: var(--muted); margin: 8px 0 14px; }
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background: var(--subtle);
  padding: 11px 12px;
  font-size: 13px;
  color: var(--text);
  min-height: 90px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea::placeholder { color: var(--muted); opacity: 0.8; }
.clipboard-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.clipboard-actions > span { font-size: 11px; color: var(--muted); }
kbd { font: 600 10px inherit; border: 1px solid var(--border-strong); background: var(--raised); border-radius: 4px; padding: 1px 5px; }

.text-snippet { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 13px; display: flex; align-items: center; gap: 10px; }
.text-snippet-body { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-snippet-body a, .clip-card-body a, .text-links a { color: var(--accent); text-decoration: underline; word-break: break-all; }

.clip-history { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.clip-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  background: var(--subtle);
  box-shadow: var(--shadow-sm);
}
.clip-card-body { font-size: 13px; white-space: pre-wrap; word-break: break-word; max-height: 150px; overflow: hidden; }
.clip-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.clip-card-actions { display: flex; align-items: center; gap: 12px; }

footer { display: flex; justify-content: space-between; gap: 15px; padding-top: 26px; font-size: 11.5px; color: var(--muted); }
.footer-mark { font-size: 15px; color: var(--accent); margin-right: 5px; font-weight: 700; }

/* Toast & Dialogs */
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--surface-solid);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 40;
  max-width: 90vw;
  font-size: 13px;
  font-weight: 500;
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

dialog {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg), var(--inner-light);
}
dialog[open] { animation: modalIn 0.18s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
dialog::backdrop { background: rgba(7, 13, 19, 0.56); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog textarea { margin-top: 14px; font-size: 14.5px; }
dialog p, dialog li { font-size: 13px; color: var(--muted); }
dialog li { padding-bottom: 8px; }
dialog code { background: var(--raised); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; font-size: 12px; color: var(--text); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dialog-actions.between { justify-content: space-between; }

.text-links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.text-links a { font-size: 12px; font-weight: 500; background: var(--accent-soft); padding: 5px 11px; border-radius: 8px; text-decoration: none; }

.media-dialog { max-width: 880px; padding: 20px; }
.media-header-actions { display: flex; align-items: center; gap: 8px; }
.media-stage {
  margin: 16px 0;
  background: var(--ground);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 280px;
  max-height: 68vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 10px;
}
.media-stage img, .media-stage video { max-width: 100%; max-height: 64vh; border-radius: 8px; box-shadow: var(--shadow-md); }
.media-stage audio { width: 100%; max-width: 460px; }
.media-hint { margin: -6px 0 12px; font-size: 12px; color: var(--accent); text-align: center; background: var(--accent-soft); padding: 7px 12px; border-radius: 8px; }
.media-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.sessions-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--subtle);
}
.session-row strong { font-size: 13px; display: block; }
.session-row small { font-size: 11.5px; color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.pair-gate { max-width: 480px; margin: 36px auto; padding: 32px; }
.pair-gate h2 { font-size: 22px; margin-top: 8px; }
.pair-gate p { color: var(--muted); font-size: 13px; }
.section-tag { color: var(--accent); font-size: 12px; font-weight: 600; }
.inline { display: flex; gap: 10px; margin-top: 10px; }
.inline input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  background: var(--subtle);
  font: 700 24px Consolas, ui-monospace, monospace;
  letter-spacing: 7px;
  border-radius: 10px;
}

body.focus-list .transfer-grid, body.focus-list .clipboard-panel { display: none; }
body.focus-list .bottom-grid { grid-template-columns: 1fr; margin-top: 0; }
body.focus-list .history-panel { min-height: 320px; }
.highlight { box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-md); border-color: var(--accent); }

/* Welcome Modal */
.welcome-close { position: absolute; right: 14px; top: 14px; }
#welcome-dialog { text-align: center; padding: 32px 28px; max-width: 430px; }
.welcome-orb {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -6px var(--accent-glow);
}
.welcome-orb svg { width: 26px; height: 26px; }
#welcome-dialog h2 { font-size: 24px; font-weight: 700; margin: 6px 0 10px; letter-spacing: -0.5px; }
#welcome-dialog > p { line-height: 1.65; }
.welcome-qr {
  width: 236px;
  height: 236px;
  display: grid;
  place-items: center;
  background: #ffffff;
  margin: 18px auto;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 14px 32px -12px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.welcome-qr img { width: 100%; height: 100%; }
#welcome-address { font: 500 12.5px Consolas, ui-monospace, monospace; color: var(--muted); overflow-wrap: anywhere; }
.welcome-code { font-size: 12px; color: var(--muted); margin-top: 10px; }
.welcome-code strong { font: 700 18px Consolas, ui-monospace, monospace; letter-spacing: 4px; color: var(--text); margin-left: 10px; }
#welcome-status { color: var(--accent); font-size: 13px; font-weight: 600; margin: 18px 0; }
#welcome-dialog > .button { width: 100%; min-height: 44px; }

@media (hover: hover) and (pointer: fine) {
  .nav:hover:not(.active) { background: var(--active); color: var(--text); }
  .aside-action:hover { background: var(--raised); color: var(--text); }
  .button:hover:not(.primary):not(:disabled), .icon-pill:hover, .icon-mini:hover { background: var(--raised); border-color: var(--border-strong); }
  .button.primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 10px 24px -6px var(--accent-glow); transform: translateY(-1px); }
  .file-row:hover { background: var(--raised); }
  .row-actions button:hover, .row-actions a:hover, .icon-button:hover { color: var(--text); background: var(--active); }
  .text-button:hover { opacity: 0.8; }
  .dropzone:hover { border-color: var(--accent); box-shadow: 0 8px 24px -10px var(--accent-glow); }
}

@media (min-width: 1500px) {
  main { padding: 40px 44px; }
  .transfer-grid, .bottom-grid { grid-template-columns: minmax(0, 1fr) 356px; }
  .qr-frame { width: 180px; height: 180px; }
}

@media (max-width: 1150px) {
  aside { width: 210px; padding-left: 12px; padding-right: 12px; }
  .shell { margin-left: 210px; }
  main { padding: 26px; }
  .transfer-grid, .bottom-grid { grid-template-columns: minmax(0, 1fr) 292px; gap: 18px; }
  .send-panel { padding: 20px 18px 0; }
  .device-route { gap: 14px; padding-left: 0; padding-right: 0; }
  .route-device { min-width: 105px; }
  .route-line { width: 82px; }
  .live-chip, .panel-foot > span:last-child, .clipboard-actions > span { display: none; }
  .history-panel { padding: 20px 18px 0; }
  .tabs { gap: 16px; }
  .search input { width: 105px; }
}

@media (max-width: 950px) {
  aside { position: static; width: auto; padding: 14px 20px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; overflow: visible; }
  .workspace, .nav-label, .aside-bottom { display: none; }
  nav { display: flex; gap: 4px; }
  .nav { width: auto; margin: 0; padding: 8px 11px; font-size: 12px; }
  .nav .ic { display: none; }
  .shell { margin-left: 0; padding: 0 10px 10px; }
  header { height: 48px; padding: 0 10px; position: static; }
  main { min-height: calc(100dvh - 120px); border-radius: 16px; }
  .heading .eyebrow { display: none; }
  h1 { font-size: 27px; }
  .heading p { font-size: 12.5px; }
  .transfer-grid, .bottom-grid { grid-template-columns: minmax(0, 1fr) 278px; gap: 18px; }
  .connection-panel { padding: 20px 18px; }
  .history-panel .panel-heading { flex-wrap: wrap; }
}

@media (max-width: 680px) {
  aside { flex-direction: column; align-items: stretch; padding: 14px 16px 8px; gap: 12px; }
  nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
  .nav { width: 100%; font-size: 12.5px; padding: 10px 12px; min-height: 42px; justify-content: flex-start; gap: 8px; border-radius: 10px; white-space: nowrap; }
  .nav .ic { display: block; width: 15px; height: 15px; }
  .nav.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px -4px var(--accent-glow); }
  .nav.active .ic { color: #fff; }
  .shell { padding: 0; }
  header { padding: 0 18px; height: 44px; }
  .breadcrumb { font-size: 11.5px; }
  .server-status { font-size: 10.5px; padding: 4px 10px; }
  main { border-radius: 18px 18px 0 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 22px 16px; padding-bottom: max(26px, env(safe-area-inset-bottom)); }
  .heading { margin-bottom: 20px; align-items: flex-start; }
  .heading h1 { font-size: 26px; }
  .heading p { max-width: 240px; font-size: 12px; }
  #connect span { display: none; }
  #connect { padding: 0; width: 42px; height: 42px; flex-shrink: 0; }
  .transfer-grid, .bottom-grid { grid-template-columns: 1fr; gap: 18px; }
  .send-panel { padding: 20px 16px 0; }
  .device-route { gap: 16px; padding: 22px 0; }
  .route-device { min-width: 100px; }
  .route-line { width: 72px; }
  .dropzone { padding: 22px 12px; }
  .dropzone .button { font-size: 13px; min-height: 44px; }
  .connection-panel { padding: 20px; display: none; }
  .connection-panel.show { display: block; }
  .qr-frame { width: 184px; height: 184px; }
  .clipboard-panel { grid-row: 1; }
  .clipboard-panel textarea { font-size: 16px; }
  .clipboard-actions > span { display: block; }
  .search input { font-size: 16px; width: 120px; }
  .tabs { gap: 18px; }
  .tabs button { font-size: 11.5px; min-height: 42px; }
  footer > span:last-child { display: none; }
  .file-row { flex-wrap: wrap; gap: 10px; padding: 13px 12px; margin: 8px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--subtle); }
  .file-row:last-child { border-bottom: 1px solid var(--border); }
  .file-symbol { width: 44px; height: 44px; }
  .file-info { flex: 1 1 calc(100% - 86px); min-width: 0; }
  .file-name { font-size: 13.5px; }
  .file-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .file-meta { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .row-actions { width: 100%; justify-content: flex-end; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
  .row-actions a, .row-actions button { min-width: 38px; min-height: 36px; height: 36px; }
  .row-actions .gallery-btn { margin-right: auto; padding: 0 14px; font-size: 12.5px; border-radius: 8px; }
  input, select, textarea { font-size: 16px; }
  .icon-button { min-width: 40px; min-height: 40px; }
}

/* Live Workspace Stats Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: var(--gap);
}
.stat-pill {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 3px;
  box-shadow: var(--shadow-sm), var(--inner-light);
}
.stat-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-pill strong { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; color: var(--text); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-pill small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#stat-security.secure { color: var(--positive); }

/* History Controls & View Toggle */
.history-controls { display: flex; align-items: center; gap: 10px; }
.view-toggle {
  display: inline-flex;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}
.view-toggle button {
  border: 0;
  background: transparent;
  width: 30px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.view-toggle button.active {
  background: var(--surface-solid);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Apple Photos-Style Gallery Grid */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  padding: 14px 0;
}
.media-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--subtle);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.16s ease;
}
.media-card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--raised);
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  color: var(--accent);
}
.media-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.media-card-thumb .play-badge {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  color: #fff;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.media-card-top {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.media-card-top > * { pointer-events: auto; }
.media-card-check {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
}
.media-card-pin {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  display: grid;
  place-items: center;
}
.media-card-pin.pinned { background: rgba(245, 158, 11, 0.92); color: #fff; }
.media-card-body { padding: 10px 12px 11px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.media-card-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card-meta { font-size: 11px; color: var(--muted); }
.media-card-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--border); }
.media-card-actions .gallery-btn { flex: 1; text-align: center; border: 0; border-radius: 7px; padding: 6px 8px; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
.media-card-actions a, .media-card-actions button:not(.gallery-btn) {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 12px;
}

/* Pin / Star Button in List View */
.pin-btn { color: var(--muted); width: 32px; height: 32px; padding: 0 !important; display: grid; place-items: center; }
.pin-btn.pinned { color: #f59e0b !important; }
.pin-btn.pinned svg { fill: currentColor; }

/* Upload Percentage Pill */
.pct-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 7px;
  border-radius: 999px;
}

/* AirDrop-Style Arrival Animation */
.arriving {
  animation: cardArrive 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cardArrive {
  0% { opacity: 0; transform: translateY(-8px) scale(0.985); box-shadow: 0 0 0 3px var(--accent-glow); }
  55% { opacity: 1; transform: translateY(0) scale(1); box-shadow: 0 0 0 4px var(--accent-soft); }
  100% { box-shadow: none; }
}

/* Fullscreen Frosted-Glass Drop Overlay */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(8, 16, 24, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: modalIn 0.14s ease-out;
}
.drop-overlay-card {
  background: var(--surface-solid);
  border: 2px dashed var(--accent);
  border-radius: 24px;
  padding: 42px 48px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg), 0 0 0 8px var(--accent-soft);
}
.drop-overlay-orb {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px -6px var(--accent-glow);
}
.drop-overlay-orb svg { width: 30px; height: 30px; }
.drop-overlay-card h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.drop-overlay-card p { font-size: 13px; color: var(--muted); margin: 0; }

@media (hover: hover) and (pointer: fine) {
  .media-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
  .media-card:hover .media-card-thumb img { transform: scale(1.03); }
}

@media (max-width: 680px) {
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
  .stat-pill { padding: 12px 14px; border-radius: 12px; gap: 4px; }
  .stat-label { font-size: 10px; }
  .stat-pill strong { font-size: 18px; }
  .stat-pill small { font-size: 11px; }
  .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .history-controls { width: 100%; justify-content: space-between; margin-top: 8px; }
  .history-panel .panel-heading { flex-wrap: wrap; }
}

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