*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  /* Linear-style Core Tokens */
  --bg-app: #060608;             /* Deepest void space */
  --bg-surface: #0c0c10;         /* Primary container background */
  --bg-surface-elevated: #111116;/* Dropdowns, dialogs, active panels */
  
  --border-dim: rgba(255, 255, 255, 0.05);   /* Super subtle grids */
  --border-default: rgba(255, 255, 255, 0.1);  /* Default layout separators */
  --border-strong: rgba(255, 255, 255, 0.2);   /* Input borders / focus boundary */

  /* Looslee Core Colors */
  --bg: var(--bg-app);
  --bg1: var(--bg-surface);
  --bg2: var(--bg-surface-elevated);
  --bg3: #18181f;
  --bg4: #1e1e27;
  --line: var(--border-default);
  --line2: var(--border-strong);
  --line3: rgba(255, 255, 255, 0.3);
  
  --text: #f0f0f8;
  --text-primary: #f0f0f8;
  --text-secondary: #7a7a9a;
  --text2: #7a7a9a;
  --text-muted: #3a3a52;
  --text3: #3a3a52;
  
  --white: #ffffff;
  --blue: #4f7cff;               /* Signature Looslee Blue */
  --blue2: #3b63e8;
  --blue-dim: rgba(79, 124, 255, 0.07);
  --blue-border: rgba(79, 124, 255, 0.2);
  --blue-glow: rgba(79, 124, 255, 0.15);      /* The signature blue glow */

  --green: #00d97e;
  --accent-green: #00d97e;       /* Secure, success, active upload */
  --green-dim: rgba(0, 217, 126, 0.08);
  --accent-green-dim: rgba(0, 217, 126, 0.08);
  --green-border: rgba(0, 217, 126, 0.18);
  --accent-green-border: rgba(0, 217, 126, 0.18);

  --accent-warning: #f5a623;
  --accent-warning-dim: rgba(245, 166, 35, 0.08);

  --red: #ff4d6d;
  --accent-critical: #ff4d6d;    /* Destruction, error, action needed */
  --accent-critical-dim: rgba(255, 77, 109, 0.06);
  --accent-critical-border: rgba(255, 77, 109, 0.2);

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --touch: 44px;
  --r: 8px;
  --radius-sm: 6px;
  --radius-md: 10px;
  
  --font-mono: 'Geist Mono', monospace;
  --font-sans: 'Inter', sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html:not([data-scroll]) {
  scroll-behavior: auto;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior: none;
  user-select: none;
}

/* BACKGROUND */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-radial {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(79, 124, 255, 0.13) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 85% 100%, rgba(0, 217, 126, 0.06) 0%, transparent 55%);
  animation: bgBreathe 8s ease-in-out infinite alternate;
}

@keyframes bgBreathe {
  from {
    opacity: 0.7;
    transform: scale(1);
  }

  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* LAYOUT */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 max(16px, calc(16px + var(--sal))) max(32px, calc(24px + var(--sab)));
  padding-right: max(16px, calc(16px + var(--sar)));
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes blurUp {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.93);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* NAV */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(24px, calc(16px + var(--sat)));
  padding-bottom: 20px;
  margin-bottom: 44px;
  animation: fadeIn 0.5s ease both;
}



.logo {
  display: flex;
  align-items: center;
  gap: 0px;
  /* Reduced to 0 to counter transparent padding */
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  background: transparent;
  display: grid;
  place-items: center;
  position: relative;
  margin-right: 8px;
}

.logo-mark svg {
  width: 13px;
  height: 13px;
  fill: white;
  position: relative;
  z-index: 3;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  transform: scale(2.2);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  draggable: false;
}

.logo {
  -webkit-user-drag: none;
  user-select: none;
}

.logo-mark {
  -webkit-user-drag: none;
}

.logo-name {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--white);
  animation: fadeIn 0.5s ease 0.1s both;
}


.nav-r {
  display: flex;
  align-items: center;
  gap: 2px;
  animation: fadeIn 0.5s ease 0.15s both;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 7px;
  min-height: var(--touch);
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  transition: color 0.15s;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::before {
  transform: scaleX(1);
}

.nav-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg2);
  opacity: 0;
  border-radius: 7px;
  transition: opacity 0.15s;
}

.nav-link:active::after {
  opacity: 1;
}

.nav-github {
  padding: 8px 10px;
  color: var(--text2);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.nav-github:hover {
  color: var(--white);
}

.nav-github::before {
  display: none;
}

/* HERO */
.hero {
  text-align: center;
  margin-bottom: 36px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 217, 126, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(0, 217, 126, 0), 0 0 8px rgba(0, 217, 126, 0.3);
  }
}

.hero-h1 {
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 6px;
  animation: blurUp 0.6s ease 0.2s both;
}

.hero-h2 {
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  margin-bottom: 24px;
  transition: -webkit-text-stroke-color 0.2s;
  animation: blurUp 0.6s ease 0.32s both;
}

.hero-h2:hover {
  -webkit-text-stroke-color: var(--text-secondary);
}

.hero-p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
  animation: fadeUp 0.5s ease 0.44s both;
}

.hero-p strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* STATS */
.stats {
  display: flex;
  align-items: stretch;
  margin-top: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: fadeUp 0.5s ease 0.55s both;
  flex-wrap: wrap;
}

.stat {
  flex: 0 0 25%;
  padding: 12px 6px;
  text-align: center;
  border-right: 1px solid var(--border-dim);
  cursor: default;
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.stat:last-child {
  border-right: none;
}

@media (max-width: 480px) {
  .stat {
    flex: 0 0 50%;
    border-bottom: 1px solid var(--border-dim);
  }
  .stat:nth-child(2) {
    border-right: none;
  }
  .stat:nth-child(3) {
    border-bottom: none;
    border-right: 1px solid var(--border-dim);
  }
  .stat:nth-child(4) {
    border-bottom: none;
    border-right: none;
  }
}

.stat:hover {
  background: rgba(255, 255, 255, 0.02);
}

.stat-n {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  font-family: var(--font-mono);
  line-height: 1.2;
}

.stat-l {
  font-size: 0.58rem;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* CARD */
.card {
  background: linear-gradient(to bottom, var(--bg-surface), #08080a);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-dim);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8), 0 0 60px -10px var(--blue-glow);
  animation: blurUp 0.7s ease 0.6s both;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--border-default);
}

.card-glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.1) 20%, var(--blue) 50%, rgba(79, 124, 255, 0.1) 80%, transparent);
  position: relative;
  overflow: hidden;
}

.card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-dim);
  background: var(--bg-surface-elevated);
}

.dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: transform 0.15s;
}

.dot-r {
  background: #ff5f57;
  box-shadow: 0 0 4px rgba(255, 95, 87, 0.4);
}

.dot-y {
  background: #febc2e;
  box-shadow: 0 0 4px rgba(254, 188, 46, 0.3);
}

.dot-g {
  background: #28c840;
  box-shadow: 0 0 4px rgba(40, 200, 64, 0.3);
}

.dots:hover .dot {
  transform: scale(1.2);
}

.card-hdr-title {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.e2e-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--accent-green);
  background: var(--accent-green-dim);
  border: 1px solid var(--accent-green-border);
  padding: 2.5px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.e2e-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-green);
}

.card-body {
  padding: 16px;
}

/* DROP ZONE */
.drop {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  animation: dropBreathe 4s ease-in-out infinite;
}

@keyframes dropBreathe {

  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }

  50% {
    box-shadow: 0 0 20px var(--blue-glow);
  }
}

.drop::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--blue) 50%, transparent 50%) top/8px 1.5px repeat-x, linear-gradient(90deg, var(--blue) 50%, transparent 50%) bottom/8px 1.5px repeat-x, linear-gradient(0deg, var(--blue) 50%, transparent 50%) left/1.5px 8px repeat-y, linear-gradient(0deg, var(--blue) 50%, transparent 50%) right/1.5px 8px repeat-y;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.drop:hover::before,
.drop.over::before {
  opacity: 1;
  animation: borderMarch 0.4s linear infinite;
}

@keyframes borderMarch {
  to {
    background-position: 8px 0, 8px 100%, 0 -8px, 100% -8px;
  }
}

.drop-spotlight {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(79, 124, 255, 0.09) 0%, transparent 65%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  top: 50%;
  left: 50%;
}

.drop:hover .drop-spotlight,
.drop.over .drop-spotlight {
  opacity: 1;
}

.drop-br-tl,
.drop-br-tr,
.drop-br-bl,
.drop-br-br {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--blue);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.drop-br-tl {
  top: 10px;
  left: 10px;
  border-width: 1.5px 0 0 1.5px;
  border-radius: 2px 0 0 0;
  transform: translate(-3px, -3px);
}

.drop-br-tr {
  top: 10px;
  right: 10px;
  border-width: 1.5px 1.5px 0 0;
  border-radius: 0 2px 0 0;
  transform: translate(3px, -3px);
}

.drop-br-bl {
  bottom: 10px;
  left: 10px;
  border-width: 0 0 1.5px 1.5px;
  border-radius: 0 0 0 2px;
  transform: translate(-3px, 3px);
}

.drop-br-br {
  bottom: 10px;
  right: 10px;
  border-width: 0 1.5px 1.5px 0;
  border-radius: 0 0 2px 0;
  transform: translate(3px, 3px);
}

.drop:hover .drop-br-tl,
.drop:hover .drop-br-tr,
.drop:hover .drop-br-bl,
.drop:hover .drop-br-br,
.drop.over .drop-br-tl,
.drop.over .drop-br-tr,
.drop.over .drop-br-bl,
.drop.over .drop-br-br {
  opacity: 1;
  transform: translate(0, 0);
}

.drop:hover,
.drop.over {
  border-color: var(--blue);
  background: var(--blue-dim);
}

.drop.over {
  transform: scale(1.01);
}

.drop-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  position: relative;
}

.drop-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.arc-track {
  fill: none;
  stroke: rgba(79, 124, 255, 0.08);
  stroke-width: 1;
}

.arc-comet {
  fill: none;
  stroke: url(#cometGrad);
  stroke-width: 1.5;
  stroke-linecap: round;
  animation: arcSpin 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  transform-origin: 40px 40px;
}

@keyframes arcSpin {
  0% {
    stroke-dashoffset: 220;
    opacity: 0.3;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    stroke-dashoffset: -220;
    opacity: 0.3;
  }
}

.arc-track2 {
  fill: none;
  stroke: rgba(79, 124, 255, 0.05);
  stroke-width: 1;
}

.arc-comet2 {
  fill: none;
  stroke: url(#cometGrad2);
  stroke-width: 1;
  stroke-linecap: round;
  animation: arcSpin2 3.6s cubic-bezier(0.4, 0, 0.6, 1) 0.8s infinite;
  transform-origin: 40px 40px;
}

@keyframes arcSpin2 {
  0% {
    stroke-dashoffset: -180;
    opacity: 0.2;
  }

  30% {
    opacity: 0.7;
  }

  70% {
    opacity: 0.7;
  }

  100% {
    stroke-dashoffset: 180;
    opacity: 0.2;
  }
}

.drop-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s, border-color 0.3s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(79, 124, 255, 0);
}

.drop:hover .drop-inner {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(79, 124, 255, 0.15);
  border-color: rgba(79, 124, 255, 0.3);
}

.drop.over .drop-inner {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--bg3);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12), 0 8px 28px rgba(0, 0, 0, 0.4);
}

.drop-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: -0.2px;
}

.drop-sub {
  font-size: 0.72rem;
  color: var(--text3);
  font-family: 'Geist Mono', monospace;
  line-height: 1.5;
}

.drop-sub b {
  color: var(--text2);
  font-weight: 500;
}

.drop-cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg3);
  border: 1px solid var(--line2);
  color: var(--text2);
  padding: 10px 22px;
  min-height: var(--touch);
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.drop-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: btnShimmer 2.5s ease-in-out infinite;
}

@keyframes btnShimmer {

  0%,
  70%,
  100% {
    left: -100%;
  }

  85% {
    left: 150%;
  }
}

.drop-cta:hover {
  border-color: var(--line3);
  color: var(--text);
  background: var(--bg4);
  transform: translateY(-1px);
}

.drop-cta:active {
  transform: scale(0.97) translateY(0);
}

#fi {
  display: none;
}

/* FILE LIST */
.file-list {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.file-list.show {
  display: flex;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 13px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  animation: slideRight 0.3s ease both;
  position: relative;
  overflow: hidden;
}

.file-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue), rgba(79, 124, 255, 0));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}

.file-item:hover {
  border-color: var(--line2);
  background: var(--bg3);
}

.file-item:hover::before {
  transform: scaleY(1);
}

.fext {
  min-width: 34px;
  height: 32px;
  padding: 0 4px;
  flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text2);
  font-family: 'Geist Mono', monospace;
  text-transform: uppercase;
}

.finfo {
  flex: 1;
  min-width: 0;
}

.fname {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fsize {
  font-size: 0.66rem;
  color: var(--text3);
  font-family: 'Geist Mono', monospace;
  margin-top: 1px;
}

.fpct {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--blue);
  font-family: 'Geist Mono', monospace;
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
  transition: color 0.3s;
}

.frem {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: transparent;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.frem:hover {
  background: rgba(255, 77, 109, 0.12);
  color: var(--red);
  transform: scale(1.1);
}

.frem:active {
  transform: scale(0.9);
}

/* ═══════════════════════════════════
   UPLOAD PROGRESS — refined
═══════════════════════════════════ */
.up-prog {
  display: none;
  margin-top: 20px;   /* breathing room below file card */
  margin-bottom: 4px;
}

.up-prog.show {
  display: block;
  animation: fadeUp 0.22s ease both;
}

/* ── Header row: dot · stage · sep · pct ── */
.up-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.up-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  animation: upPulse 1.4s ease-in-out infinite;
}

@keyframes upPulse {
  0%   { box-shadow: 0 0 0 0   rgba(79,124,255,0.55); }
  60%  { box-shadow: 0 0 0 5px rgba(79,124,255,0);    }
  100% { box-shadow: 0 0 0 0   rgba(79,124,255,0);    }
}

.up-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  /* smooth stage transitions */
  transition: opacity 0.25s ease;
}

.up-title.fade-out { opacity: 0; }

.up-pct-sep {
  font-size: 0.6rem;
  color: var(--text3);
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

.up-pct-inline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  transition: color 0.3s;
  flex-shrink: 0;
}

/* ── 4px slim progress bar ── */
.up-track {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 11px;
  position: relative;
}

/* subtle glow while uploading — removed via JS on completion */
.up-prog.uploading .up-track {
  box-shadow: 0 0 0 3px rgba(79,124,255,0.07);
}

.up-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue) 0%, #7ca8ff 55%, var(--blue) 100%);
  background-size: 220% 100%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fillShimmer 2s linear infinite;
}

@keyframes fillShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ── Compact stats strip ── */
.up-stats {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.up-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 11px;   /* tighter vertical rhythm */
  min-width: 0;
}

.up-stat-divider {
  width: 1px;
  background: var(--border-dim);
  flex-shrink: 0;
  margin: 6px 0;
}

.up-stat-label {
  font-size: 0.56rem;
  font-weight: 500;
  color: var(--text3);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.up-stat-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s;
}

/* Muted "Calculating…" state */
.up-stat-value[data-calc="true"] {
  color: var(--text3);
  font-weight: 400;
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 380px) {
  .up-stats {
    flex-direction: column;
  }
  .up-stat-divider {
    width: auto;
    height: 1px;
    margin: 0 10px;
  }
}


/* TRANSFER NOTE */
.transfer-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(79, 124, 255, 0.04);
  border: 1px solid rgba(79, 124, 255, 0.12);
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 0;
}

.transfer-note-ico {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  margin-top: 1px;
}

.transfer-note-body {
  font-size: 0.72rem;
  color: var(--text2);
  line-height: 1.55;
  font-family: 'Geist Mono', monospace;
}

.transfer-note-body strong {
  color: var(--text);
  font-weight: 600;
}

/* SECTIONS */
.divider {
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
  position: relative;
  overflow: hidden;
}

.divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.15), transparent);
  animation: dividerGlow 3s ease-in-out infinite;
}

@keyframes dividerGlow {

  0%,
  100% {
    opacity: 0;
    transform: translateX(-100%);
  }

  50% {
    opacity: 1;
    transform: translateX(100%);
  }
}

.sec-label {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-family: 'Geist Mono', monospace;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* EXPIRY PILLS */
.expiry-pills {
  display: flex;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px;
  position: relative;
}

.pill-slider {
  position: absolute;
  background: var(--bg4);
  border: 1px solid var(--blue-border);
  border-radius: 6px;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(25% - 3px);
  pointer-events: none;
  z-index: 0;
  transition: left 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 16px rgba(79, 124, 255, 0.18), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ep {
  flex: 1;
  padding: 8px 4px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text3);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s, transform 0.15s;
  text-align: center;
  min-height: 34px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1;
  user-select: none;
}

.ep:hover {
  color: var(--text2);
}

.ep.on {
  color: var(--blue);
}

.ep:active {
  transform: scale(0.94);
}

/* SETTINGS ROWS */
.settings {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
  cursor: pointer;
  min-height: var(--touch);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.row:last-child {
  border-bottom: none;
}

.row::before {
  content: '';
  position: absolute;
  left: 0;
  top: -100%;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue), rgba(79, 124, 255, 0));
  transition: top 0.25s ease;
  pointer-events: none;
}

.row:hover {
  background: var(--bg3);
}

.row:hover::before {
  top: 0;
}

.row:active {
  background: var(--bg4);
}

.row-ico {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  transition: transform 0.2s, border-color 0.2s;
}

.row:hover .row-ico {
  transform: scale(1.08);
  border-color: var(--line3);
}

.row-body {
  flex: 1;
}

.row-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.row-sub {
  font-size: 0.68rem;
  color: var(--text3);
  margin-top: 1.5px;
  line-height: 1.4;
}

.always-badge {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

/* TOGGLE */
.tog {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--bg4);
  border: 1px solid var(--line2);
  position: relative;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.tog::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text3);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.4), background 0.25s, box-shadow 0.25s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.tog.on {
  background: rgba(79, 124, 255, 0.15);
  border-color: rgba(79, 124, 255, 0.3);
}

.tog.on::after {
  transform: translateX(18px);
  background: var(--blue);
  box-shadow: 0 0 8px rgba(79, 124, 255, 0.5);
}

.tog:active::after {
  transform: scaleX(1.3);
}

.tog.on:active::after {
  transform: translateX(18px) scaleX(1.3);
}

.tog.locked {
  cursor: default;
  opacity: 0.65;
}

/* PASSWORD */
.pwd-row {
  display: none;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(79, 124, 255, 0.02);
}

.pwd-row.open {
  display: block;
  animation: slideDown 0.22s ease both;
}

.pwd-in {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 7px;
  padding: 10px 13px;
  min-height: var(--touch);
  color: var(--text);
  font-size: 16px;
  font-family: 'Geist Mono', monospace;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.pwd-in::placeholder {
  color: var(--text3);
}

.pwd-in:focus {
  border-color: rgba(79, 124, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.08);
}

.pwd-in-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pwd-in-wrap .pwd-in {
  padding-right: 42px;
}

.pwd-eye {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text3);
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
  user-select: none;
}

.pwd-eye:hover {
  color: var(--text2);
}

.pwd-eye:active {
  color: var(--blue);
}

.pwd-counter {
  font-size: 0.62rem;
  font-family: 'Geist Mono', monospace;
  color: var(--text3);
  text-align: right;
  margin-top: 5px;
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

.pwd-counter.full {
  color: var(--red);
}

/* GENERATE BUTTON */
.gen-btn {
  width: 100%;
  margin-top: 20px;
  background: var(--white);
  color: #08081a;
  border: none;
  border-radius: 10px;
  padding: 15px 20px;
  min-height: var(--touch);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}

.gen-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.gen-btn:not(:disabled):not(.done)::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.08), transparent);
  animation: genIdle 2.5s ease-in-out infinite;
}

@keyframes genIdle {

  0%,
  60%,
  100% {
    left: -100%;
  }

  80% {
    left: 150%;
  }
}

.gen-btn:not(:disabled):hover {
  background: #ededf8;
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 10px 28px rgba(0, 0, 0, 0.35);
}

.gen-btn:not(:disabled):active {
  transform: scale(0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gen-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(79, 124, 255, 0.2);
  transform: scale(0);
  animation: rippleAnim 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.gen-btn:disabled {
  opacity: 0.18;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.gen-btn.done {
  background: var(--bg3);
  color: var(--green);
  border: 1px solid var(--green-border);
  box-shadow: 0 0 20px rgba(0, 217, 126, 0.06);
  animation: doneWave 0.4s ease;
}

@keyframes doneWave {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(0.97);
  }

  70% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

.gen-btn.done::before,
.gen-btn.done::after {
  display: none;
}

/* OUTPUT */
.output {
  display: none;
  margin-top: 20px;
}

.output.show {
  display: block;
}

.output.show .link-wrap {
  animation: fadeUp 0.4s ease 0.05s both;
}

.output.show .qr-panel.open {
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.output.show .details {
  animation: fadeUp 0.4s ease 0.15s both;
}

.output.show .timer-card {
  animation: fadeUp 0.4s ease 0.25s both;
}

.output.show .timer-bar {
  animation: fadeUp 0.4s ease 0.3s both;
}

.link-wrap {
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  transition: border-color 0.25s, box-shadow 0.25s;
  position: relative;
}

.output.show .link-wrap {
  animation: linkAppear 0.5s ease both;
}

@keyframes linkAppear {
  0% {
    opacity: 0;
    transform: translateY(8px);
    box-shadow: 0 0 0 0 var(--blue-glow);
  }

  50% {
    box-shadow: 0 0 20px 4px rgba(79, 124, 255, 0.08);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 0 0 0 transparent;
  }
}

.link-wrap:hover {
  border-color: var(--line2);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.05);
}

.link-txt {
  flex: 1;
  padding: 13px 15px;
  font-size: 0.75rem;
  color: var(--blue);
  font-family: 'Geist Mono', monospace;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  letter-spacing: 0.2px;
}

.link-btns {
  display: flex;
}

.lbtn {
  background: var(--bg2);
  border: none;
  border-left: 1px solid var(--line);
  color: var(--text2);
  padding: 0 16px;
  min-height: var(--touch);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.lbtn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue-dim);
  opacity: 0;
  transition: opacity 0.15s;
}

.lbtn:hover {
  background: var(--bg3);
  color: var(--text);
}

.lbtn:hover::after {
  opacity: 0.5;
}

.lbtn:active {
  transform: scale(0.96);
}

.lbtn.copied {
  color: var(--green);
  background: var(--green-dim);
}

/* QR */
.qr-panel {
  display: none;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.qr-panel.open {
  display: flex;
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

#qrCanvas {
  border-radius: 5px;
  image-rendering: pixelated;
}

.qr-sub {
  font-size: 0.67rem;
  color: var(--text3);
  font-family: 'Geist Mono', monospace;
  text-align: center;
  line-height: 1.5;
}

/* DETAILS */
.details {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.details-head {
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Geist Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-badge {
  font-size: 0.55rem;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDot 1.5s ease-in-out infinite;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 15px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
  animation: fadeIn 0.3s ease both;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row:hover {
  background: var(--bg3);
}

.dk {
  font-size: 0.7rem;
  color: var(--text3);
  font-family: 'Geist Mono', monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dv {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  font-family: 'Geist Mono', monospace;
  transition: color 0.3s;
}

.dv.g {
  color: var(--green);
}

.dv.b {
  color: var(--blue);
}

/* TIMER */
.timer-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--touch);
  position: relative;
  overflow: hidden;
}

.timer-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--t-pct, 100%);
  background: linear-gradient(90deg, rgba(79, 124, 255, 0.06), transparent);
  transition: width 1s linear;
  pointer-events: none;
}

.timer-l {
  display: flex;
  align-items: center;
  gap: 9px;
}

.timer-ic {
  width: 26px;
  height: 26px;
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.timer-label {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text2);
}

.timer-val {
  font-family: 'Geist Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 2px;
  transition: color 0.4s;
}

.timer-val.tick {
  animation: digitFlip 0.12s ease;
}

@keyframes digitFlip {
  0% {
    transform: translateY(-2px);
    opacity: 0.7;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.timer-val.danger {
  color: var(--red);
  animation: timerDanger 1s ease-in-out infinite;
}

@keyframes timerDanger {

  0%,
  100% {
    text-shadow: none;
  }

  50% {
    text-shadow: 0 0 12px rgba(255, 77, 109, 0.5);
  }
}

.timer-bar {
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--blue), #7ca8ff);
  border-radius: 2px;
  transition: width 1s linear, background 0.5s;
}

.timer-fill.danger {
  background: var(--red);
}

/* FEATURES GRID */
.feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.feat {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 14px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateY(10px);
}

.feat.visible {
  animation: featReveal 0.4s ease forwards;
}

@keyframes featReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feat::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.05), transparent);
  transition: left 0.4s ease;
  pointer-events: none;
}

.feat:hover::before {
  left: 120%;
}

.feat::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.feat:hover {
  background: var(--bg3);
  border-color: var(--line2);
  transform: translateY(-1px);
}

.feat:hover::after {
  opacity: 1;
}

.feat:active {
  transform: scale(0.98);
}

.feat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.feat-ico {
  width: 28px;
  height: 28px;
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  transition: transform 0.25s;
}

.feat:hover .feat-ico {
  transform: scale(1.1) rotate(-5deg);
}

.feat-tag {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--blue);
  font-family: 'Geist Mono', monospace;
  background: var(--blue-dim);
  border: 1px solid var(--blue-border);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.feat-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -0.1px;
}

.feat-desc {
  font-size: 0.65rem;
  color: var(--text3);
  line-height: 1.5;
  font-family: 'Geist Mono', monospace;
}

/* HOW IT WORKS — CARDS */
.how-section {
  padding: 4px 0 2px;
}

.how-header {
  text-align: center;
  margin-bottom: 16px;
}

.how-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.how-section-sub {
  font-size: 0.7rem;
  color: var(--text2);
  font-family: 'Geist Mono', monospace;
}

.how-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.how-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  overflow: hidden;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.how-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.how-card:hover {
  border-color: rgba(79, 124, 255, 0.28);
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.06) 0%, rgba(255,255,255,0.02) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(79, 124, 255, 0.12);
}

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

.how-card:active {
  transform: scale(0.98);
}

.how-card-step {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--blue);
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.5px;
  background: var(--blue-dim);
  border: 1px solid var(--blue-border);
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1;
}

.how-card-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.how-card:hover .how-card-icon {
  transform: scale(1.15) rotate(-5deg);
}

.how-card-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-top: 2px;
}

.how-card-desc {
  font-size: 0.65rem;
  color: var(--text2);
  line-height: 1.5;
  font-family: 'Geist Mono', monospace;
}

/* FOOTER */
footer {
  margin-top: 32px;
  padding: 20px 0;
  padding-bottom: max(20px, calc(16px + var(--sab)));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeUp 0.6s ease 0.8s both;
}

.fcopy {
  font-size: 0.72rem;
  color: var(--text3);
  font-weight: 500;
}

.flinks {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.flinks a {
  font-size: 0.72rem;
  color: var(--text3);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  min-height: 36px;
  display: flex;
  align-items: center;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.flinks a:hover {
  color: var(--text2);
  background: var(--bg2);
}

.flinks a:active {
  background: var(--bg3);
}

/* TOAST */
.toast {
  position: fixed;
  bottom: max(24px, calc(16px + var(--sab)));
  left: 50%;
  transform: translateX(-50%) translateY(40px) scale(0.95);
  background: var(--bg3);
  border: 1px solid var(--line2);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.4);
  max-width: calc(100vw - 48px);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

.tdot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--green);
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE DESIGN SYSTEM — Mobile-first, additive
   XS base (320–767px): no query needed
   SM 768px+ | MD 1024px+ | LG 1280px+ | XL 1440px+ | 2XL 1920px+
   No max-width breakpoints. No overlapping queries.
   ══════════════════════════════════════════════════════ */

/* ── SM: 768px+ — Tablet ── */
@media (min-width: 768px) {
  .page {
    max-width: 720px;
    padding-left: max(32px, calc(28px + var(--sal)));
    padding-right: max(32px, calc(28px + var(--sar)));
  }

  nav {
    margin-bottom: 56px;
  }

  .hero {
    margin-bottom: 44px;
  }

  .hero-h1 {
    letter-spacing: -2px;
  }

  .hero-h2 {
    letter-spacing: -2px;
  }

  .hero-p {
    max-width: 420px;
  }

  .stats {
    flex-wrap: nowrap;
  }

  .stat {
    flex: 1;
    border-bottom: none;
  }

  .stat:nth-child(2) {
    border-right: 1px solid var(--line);
  }

  .stat:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .stat:last-child {
    border-right: none;
  }

  .card-body {
    padding: 20px;
  }

  .drop {
    padding: 40px 20px;
  }

  .feat-grid {
    grid-template-columns: 1fr 1fr;
  }

  footer {
    flex-direction: row;
    align-items: center;
  }

  .flinks {
    margin-left: 0;
  }
}

/* ── MD: 1024px+ — Laptop ── */
@media (min-width: 1024px) {
  .page {
    max-width: 960px;
    padding-left: max(48px, calc(40px + var(--sal)));
    padding-right: max(48px, calc(40px + var(--sar)));
  }

  nav {
    margin-bottom: 68px;
  }

  .hero {
    margin-bottom: 52px;
  }

  .hero-h1 {
    letter-spacing: -2.5px;
  }

  .hero-h2 {
    letter-spacing: -2px;
  }

  .hero-p {
    max-width: 480px;
  }

  .card-body {
    padding: 24px;
  }

  .drop {
    padding: 44px 24px;
  }

  .feat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .how-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── LG: 1280px+ — Desktop ── */
@media (min-width: 1280px) {
  .page {
    max-width: 1180px;
    padding-left: max(60px, calc(52px + var(--sal)));
    padding-right: max(60px, calc(52px + var(--sar)));
  }

  nav {
    margin-bottom: 80px;
  }

  .hero-h1 {
    letter-spacing: -3px;
  }

  .hero-h2 {
    letter-spacing: -2.5px;
  }

  .hero-p {
    max-width: 520px;
  }

  .card-body {
    padding: 28px;
  }

  .drop {
    padding: 52px 28px;
  }

  .feat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── XL: 1440px+ — Wide Desktop ── */
@media (min-width: 1440px) {
  .page {
    max-width: 1320px;
    padding-left: max(80px, calc(72px + var(--sal)));
    padding-right: max(80px, calc(72px + var(--sar)));
  }

  nav {
    margin-bottom: 88px;
  }

  .hero-p {
    max-width: 560px;
  }
}

/* ── 2XL: 1920px+ — Ultra-wide ── */
@media (min-width: 1920px) {
  .page {
    max-width: 1400px;
  }

  .toast {
    max-width: 400px;
  }
}

/* ── Landscape Mobile ── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    margin-bottom: 20px;
  }

  .hero-h1,
  .hero-h2 {
    font-size: 2rem;
  }

  .stats {
    display: none;
  }

  nav {
    margin-bottom: 20px;
  }

  .drop {
    padding: 22px 16px;
  }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  #bgCanvas {
    display: none;
  }

  .feat {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-contrast: high) {
  :root {
    --line: #333;
    --line2: #444;
    --text2: #aaa;
    --text3: #666;
  }
}

/* DYNAMIC */
@keyframes genPulse {
  0% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08), 0 4px 24px rgba(0, 0, 0, 0.4);
  }

  100% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }
}

/* DOWNLOAD CONFIRMATION (sender side) */
.dl-confirmed {
  text-align: center;
  padding: 8px 0 4px;
  position: relative;
  animation: blurUp 0.5s ease both;
}

.dl-confirmed-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
}

.confetti-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: confettiBurst 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes confettiBurst {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }

  60% {
    opacity: 1;
  }

  100% {
    transform: translate(var(--cx), var(--cy)) scale(1);
    opacity: 0;
  }
}

.dl-confirmed-check {
  margin: 0 auto 18px;
  width: 56px;
  height: 56px;
  position: relative;
  z-index: 1;
  animation: checkPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes checkPop {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.dl-confirmed-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  animation: fadeUp 0.4s ease 0.2s both;
}

.dl-confirmed-sub {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 20px;
  animation: fadeUp 0.4s ease 0.3s both;
}

.dl-confirmed-details {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  text-align: left;
  animation: fadeUp 0.4s ease 0.4s both;
}

.dl-confirmed-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.dl-confirmed-detail:last-child {
  border-bottom: none;
}

.dl-confirmed-detail:hover {
  background: var(--bg3);
}

.dl-confirmed-label {
  font-size: 0.7rem;
  color: var(--text3);
  font-family: 'Geist Mono', monospace;
}

.dl-confirmed-value {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  font-family: 'Geist Mono', monospace;
}

.dl-confirmed-green {
  color: var(--green) !important;
}

.dl-confirmed-note {
  font-size: 0.65rem;
  color: var(--text3);
  font-family: 'Geist Mono', monospace;
  margin-bottom: 18px;
  line-height: 1.6;
  animation: fadeUp 0.4s ease 0.5s both;
}

.dl-confirmed-btn {
  width: 100%;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  min-height: var(--touch);
  animation: fadeUp 0.4s ease 0.55s both;
}

.dl-confirmed-btn:hover {
  background: var(--bg4);
  border-color: var(--line3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dl-confirmed-btn:active {
  transform: scale(0.98);
}

/* ══════════════════════════════════════
   PREMIUM QUEUE OVERLAY — V2
   ══════════════════════════════════════ */

/* ── Keyframes ── */

@keyframes queueOverlayIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

@keyframes queueOverlayOut {
  from { opacity: 1; transform: translateY(0);    filter: blur(0); }
  to   { opacity: 0; transform: translateY(-12px); filter: blur(6px); }
}

@keyframes qPosSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes qPosSlideOut {
  from { opacity: 1; transform: translateY(0)     scale(1); }
  to   { opacity: 0; transform: translateY(-14px) scale(0.9); }
}

@keyframes qNodePulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.12); }
}

@keyframes qLineMarch {
  from { stroke-dashoffset: 24; }
  to   { stroke-dashoffset: 0; }
}

@keyframes qActivityFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes qActivityFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}

@keyframes qCountdownPop {
  0%   { opacity: 0; transform: scale(0.4); }
  60%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes qCountdownOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.4); }
}

@keyframes qCardGlowBlue {
  from { box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8), 0 0 60px -10px var(--blue-glow); }
  to   { box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8), 0 0 80px -5px rgba(79,124,255,0.45), 0 0 30px rgba(79,124,255,0.25) inset; }
}

@keyframes qHeartbeat {
  0%, 100% { transform: scale(1); }
  30%       { transform: scale(1.04); }
  60%       { transform: scale(0.98); }
}

@keyframes qProgressGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(79,124,255,0.4); }
  50%       { box-shadow: 0 0 16px rgba(79,124,255,0.7), 0 0 28px rgba(79,124,255,0.3); }
}

@keyframes qEtaGlow {
  0%, 100% { text-shadow: 0 0 12px rgba(79,124,255,0); }
  50%       { text-shadow: 0 0 12px rgba(79,124,255,0.5); }
}

@keyframes qScanLine {
  from { transform: translateY(0); opacity: 0.6; }
  to   { transform: translateY(100%); opacity: 0; }
}

/* ── Queue Overlay Container ── */

.queue-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: linear-gradient(to bottom, var(--bg-surface), #08080a);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: queueOverlayIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.queue-overlay.leaving {
  animation: queueOverlayOut 0.4s cubic-bezier(0.4, 0, 1, 1) both;
  pointer-events: none;
}

/* Ambient top glow line */
.queue-overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--blue) 35%, #7ca8ff 50%, var(--blue) 65%, transparent 100%);
  opacity: 0.7;
  z-index: 1;
}

/* Radial ambient background */
.queue-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(79,124,255,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(79,124,255,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Scan line effect */
.queue-overlay-scanline {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(79,124,255,0.3), transparent);
  animation: qScanLine 4s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

/* ── Inner scroll area ── */
.queue-overlay-inner {
  position: relative;
  z-index: 3;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(79,124,255,0.2) transparent;
}

.queue-overlay-inner::-webkit-scrollbar {
  width: 3px;
}
.queue-overlay-inner::-webkit-scrollbar-track { background: transparent; }
.queue-overlay-inner::-webkit-scrollbar-thumb { background: rgba(79,124,255,0.25); border-radius: 99px; }

/* ── File Summary Header ── */
.queue-file-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: rgba(79,124,255,0.06);
  border: 1px solid rgba(79,124,255,0.14);
  border-radius: var(--radius-md);
  animation: queueOverlayIn 0.5s cubic-bezier(0.16,1,0.3,1) 0.05s both;
}

.queue-file-summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.queue-file-summary-icon {
  width: 32px;
  height: 32px;
  background: rgba(79,124,255,0.1);
  border: 1px solid rgba(79,124,255,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.queue-file-summary-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.queue-file-summary-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.queue-file-summary-size {
  font-size: 0.67rem;
  color: var(--text2);
  font-family: var(--font-mono);
}

.queue-file-summary-badge {
  font-size: 0.6rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--blue);
  background: rgba(79,124,255,0.1);
  border: 1px solid rgba(79,124,255,0.2);
  border-radius: 4px;
  padding: 3px 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Illustration ── */
.queue-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
  animation: queueOverlayIn 0.5s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

.queue-illustration svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* Node animations */
.q-node-1 { animation: qNodePulse 2.4s ease-in-out infinite; }
.q-node-2 { animation: qNodePulse 2.4s ease-in-out 0.6s infinite; }
.q-node-3 { animation: qNodePulse 2.4s ease-in-out 1.2s infinite; }
.q-node-4 { animation: qNodePulse 2.4s ease-in-out 1.8s infinite; }
.q-line-1  { animation: qLineMarch 1.2s linear infinite; }
.q-line-2  { animation: qLineMarch 1.2s linear 0.4s infinite; }
.q-line-3  { animation: qLineMarch 1.2s linear 0.8s infinite; }

/* ── Position Section ── */
.queue-pos-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  animation: queueOverlayIn 0.5s cubic-bezier(0.16,1,0.3,1) 0.15s both;
}

.queue-pos-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

/* Number flip wrapper */
.queue-pos-number-wrap {
  position: relative;
  height: 68px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.queue-pos-number {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1;
  animation: qPosSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  background: linear-gradient(135deg, #ffffff 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.queue-pos-number.leaving {
  animation: qPosSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) both;
  position: absolute;
}

.queue-pos-ahead {
  font-size: 0.75rem;
  color: var(--text2);
  font-family: var(--font-mono);
  transition: opacity 0.3s;
}

/* ── Stats Row ── */
.queue-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  animation: queueOverlayIn 0.5s cubic-bezier(0.16,1,0.3,1) 0.2s both;
}

.queue-stat-card {
  background: var(--bg3);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

.queue-stat-card.eta-card {
  border-color: rgba(79,124,255,0.15);
}

.queue-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79,124,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.queue-sc-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.queue-sc-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  font-family: var(--font-mono);
  transition: opacity 0.25s;
}

.queue-sc-value.eta-value {
  color: var(--blue);
  animation: qEtaGlow 3s ease-in-out infinite;
}

.queue-sc-sub {
  font-size: 0.58rem;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ── Progress Bar ── */
.queue-prog-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: queueOverlayIn 0.5s cubic-bezier(0.16,1,0.3,1) 0.25s both;
}

.queue-prog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-prog-title {
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.queue-prog-pct {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--blue);
  font-family: var(--font-mono);
  transition: opacity 0.3s;
}

.queue-prog-track {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
}

.queue-prog-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue2) 0%, var(--blue) 50%, #7ca8ff 100%);
  background-size: 300% 100%;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 2%;
  position: relative;
  animation: queueFillShimmer 2.5s linear infinite, qProgressGlow 2.5s ease-in-out infinite;
}

.queue-prog-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #7ca8ff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(79,124,255,0.8), 0 0 14px rgba(79,124,255,0.4);
}

.queue-prog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-prog-ahead-text {
  font-size: 0.62rem;
  color: var(--text3);
  font-family: var(--font-mono);
}

.queue-active-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-family: var(--font-mono);
  color: var(--blue);
  background: rgba(79,124,255,0.08);
  border: 1px solid rgba(79,124,255,0.15);
  border-radius: 4px;
  padding: 2px 7px;
}

.queue-active-dot {
  width: 4px;
  height: 4px;
  background: var(--blue);
  border-radius: 50%;
  animation: queueBlink 1.4s ease-in-out infinite;
}

/* ── Activity Feed ── */
.queue-activity-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: queueOverlayIn 0.5s cubic-bezier(0.16,1,0.3,1) 0.3s both;
}

.queue-activity-header {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

.queue-activity-feed {
  background: var(--bg3);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  position: relative;
  overflow: hidden;
}

.queue-activity-feed::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(79,124,255,0.4), transparent);
  border-radius: 99px;
}

.queue-activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  line-height: 1.4;
  transition: opacity 0.4s ease;
}

.queue-activity-item.done { color: var(--green); opacity: 0.7; }
.queue-activity-item.active { color: var(--text); }
.queue-activity-item.pending { color: var(--text3); }

.queue-activity-icon {
  width: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

/* Live status line */
.queue-live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  min-height: 20px;
  position: relative;
}

.queue-live-dot {
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
  flex-shrink: 0;
  animation: queueBlink 1.6s ease-in-out infinite;
}

.queue-live-text {
  font-size: 0.7rem;
  color: var(--text2);
  font-family: var(--font-mono);
  animation: qActivityFadeIn 0.4s ease both;
}

.queue-live-text.fading {
  animation: qActivityFadeOut 0.3s ease both;
}

/* ── Cancel Button ── */
.queue-overlay-cancel {
  padding: 0 20px 16px;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

.queue-overlay-cancel-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: var(--touch);
  -webkit-tap-highlight-color: transparent;
}

.queue-overlay-cancel-btn:hover {
  border-color: rgba(255,77,109,0.3);
  color: var(--accent-critical);
  background: rgba(255,77,109,0.06);
  transform: translateY(-1px);
}

.queue-overlay-cancel-btn:active {
  transform: scale(0.98);
}

.queue-overlay-cancel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ── Countdown Transition Screen ── */
.queue-overlay.granted {
  animation: qCardGlowBlue 0.5s ease both;
}

.queue-overlay.granted::before {
  background: linear-gradient(90deg, transparent, var(--blue) 20%, #7ca8ff 50%, var(--blue) 80%, transparent);
  opacity: 1;
}

.queue-countdown-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 20px;
  position: relative;
  z-index: 3;
  animation: queueOverlayIn 0.4s ease both;
}

.queue-countdown-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(79,124,255,0.1);
  border: 1px solid rgba(79,124,255,0.25);
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--blue);
  letter-spacing: 0.04em;
}

.queue-countdown-badge-dot {
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
  animation: queueBlink 1s ease-in-out infinite;
}

.queue-countdown-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-align: center;
}

.queue-countdown-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.queue-countdown-ring svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.queue-countdown-ring-track {
  stroke: rgba(79,124,255,0.12);
  fill: none;
  stroke-width: 3;
}

.queue-countdown-ring-fill {
  stroke: var(--blue);
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 6px rgba(79,124,255,0.6));
}

.queue-countdown-number-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.queue-countdown-number {
  font-size: 3.8rem;
  font-weight: 900;
  font-family: var(--font-mono);
  letter-spacing: -0.06em;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, var(--blue) 60%, #7ca8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: qCountdownPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  filter: drop-shadow(0 0 20px rgba(79,124,255,0.5));
}

.queue-countdown-number.exiting {
  animation: qCountdownOut 0.3s ease both;
}

.queue-countdown-sub {
  font-size: 0.73rem;
  color: var(--text2);
  font-family: var(--font-mono);
  text-align: center;
  line-height: 1.6;
}

/* ── Joining Queue State ── */
.queue-joining-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 20px;
  position: relative;
  z-index: 3;
}

.queue-joining-icon {
  width: 52px;
  height: 52px;
  background: rgba(79,124,255,0.1);
  border: 1px solid rgba(79,124,255,0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: qHeartbeat 2s ease-in-out infinite;
}

.queue-joining-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.queue-joining-sub {
  font-size: 0.72rem;
  color: var(--text2);
  font-family: var(--font-mono);
  text-align: center;
  line-height: 1.6;
}

/* ── Card glow states ── */
.card.queue-active {
  border-color: rgba(79,124,255,0.2);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8),
              0 0 60px -5px rgba(79,124,255,0.3),
              0 0 20px rgba(79,124,255,0.12) inset;
  position: relative;
}

.card.queue-granted {
  border-color: rgba(79,124,255,0.4);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8),
              0 0 80px -5px rgba(79,124,255,0.45),
              0 0 30px rgba(79,124,255,0.2) inset;
}

/* ── Responsive overrides ── */
@media (max-width: 480px) {
  .queue-overlay-inner {
    padding: 14px 14px 12px;
    gap: 12px;
  }

  .queue-pos-number {
    font-size: 3.2rem;
  }

  .queue-pos-number-wrap {
    height: 54px;
  }

  .queue-countdown-ring {
    width: 100px;
    height: 100px;
  }

  .queue-countdown-number {
    font-size: 3.2rem;
  }

  .queue-stats-row {
    gap: 8px;
  }

  .queue-sc-value {
    font-size: 1.1rem;
  }

  .queue-overlay-cancel {
    padding: 0 14px 14px;
  }
}

@media (min-width: 768px) {
  .queue-pos-number {
    font-size: 4.8rem;
  }

  .queue-pos-number-wrap {
    height: 78px;
  }

  .queue-overlay-inner {
    padding: 24px 24px 18px;
    gap: 18px;
  }

  .queue-overlay-cancel {
    padding: 0 24px 18px;
  }
}

@media (min-width: 1280px) {
  .queue-illustration svg {
    max-width: 320px;
  }
}

/* ── State Cards Shared Styles (E2E Completion/Cancellations) ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dl-state-card {
  padding: 36px 28px 32px;
  text-align: center;
  animation: fadeSlideUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
}

.dl-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.dl-state-icon svg { width: 100%; height: 100%; }

.state-icon-success {
  background: rgba(0, 217, 126, 0.1);
  border: 1px solid rgba(0, 217, 126, 0.2);
  color: var(--green);
}
.state-icon-danger {
  background: rgba(255, 77, 106, 0.12);
  border: 1px solid rgba(255, 77, 106, 0.25);
  color: #ff4d6a;
}
.state-icon-warn {
  background: rgba(255, 176, 32, 0.1);
  border: 1px solid rgba(255, 176, 32, 0.2);
  color: #ffb020;
}
.state-icon-muted {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text3);
}

.dl-state-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.4px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.dl-state-body {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 24px;
}

.dl-state-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}
.dl-state-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
  transform: translateY(-1px);
}