:root {
  color-scheme: light;
  --page: #f7f8fc;
  --page-end: #f1f4fb;
  --text: #1d1f27;
  --text-soft: #626774;
  --text-faint: #9297a5;
  --glass: rgba(255, 255, 255, 0.76);
  --glass-solid: rgba(255, 255, 255, 0.94);
  --control: rgba(255, 255, 255, 0.58);
  --control-strong: rgba(245, 247, 253, 0.9);
  --line: rgba(62, 69, 96, 0.1);
  --line-strong: rgba(108, 119, 201, 0.24);
  --accent: #7180f5;
  --accent-two: #ad7de8;
  --pink: #ef96be;
  --accent-soft: rgba(113, 128, 245, 0.09);
  --accent-soft-strong: rgba(113, 128, 245, 0.16);
  --accent-border: rgba(113, 128, 245, 0.28);
  --accent-shadow: rgba(102, 113, 225, 0.18);
  --success: #45b98c;
  --success-soft: rgba(69, 185, 140, 0.11);
  --danger: #d95765;
  --warning: #9b6d20;
  --warning-soft: rgba(222, 161, 63, 0.1);
  --shadow: 0 30px 85px rgba(73, 77, 108, 0.15), 0 4px 18px rgba(73, 77, 108, 0.08);
  --shadow-soft: 0 16px 42px rgba(76, 81, 113, 0.12);
  --blob-pink: rgba(255, 161, 209, 0.28);
  --blob-blue: rgba(132, 190, 255, 0.31);
  --blob-yellow: rgba(255, 215, 131, 0.25);
  --grid-dot: rgba(87, 96, 139, 0.1);
  --camera-bg: #e9edf8;
  --camera-overlay: rgba(31, 34, 48, 0.72);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #14151c;
  --page-end: #101118;
  --text: #f2f3f8;
  --text-soft: #b2b5c1;
  --text-faint: #777b8a;
  --glass: rgba(31, 33, 44, 0.75);
  --glass-solid: rgba(32, 34, 45, 0.94);
  --control: rgba(41, 43, 56, 0.68);
  --control-strong: rgba(27, 29, 39, 0.9);
  --line: rgba(226, 228, 255, 0.1);
  --line-strong: rgba(155, 164, 255, 0.28);
  --accent: #9ba5ff;
  --accent-two: #c596f4;
  --pink: #f3a4c8;
  --accent-soft: rgba(151, 161, 255, 0.1);
  --accent-soft-strong: rgba(151, 161, 255, 0.18);
  --accent-border: rgba(151, 161, 255, 0.3);
  --accent-shadow: rgba(105, 115, 232, 0.2);
  --success: #70d7ad;
  --success-soft: rgba(88, 207, 160, 0.11);
  --danger: #ff929d;
  --warning: #ddbd7e;
  --warning-soft: rgba(221, 178, 92, 0.08);
  --shadow: 0 36px 100px rgba(0, 0, 0, 0.38), 0 3px 18px rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.25);
  --blob-pink: rgba(222, 92, 165, 0.16);
  --blob-blue: rgba(75, 127, 218, 0.2);
  --blob-yellow: rgba(207, 151, 64, 0.12);
  --grid-dot: rgba(213, 216, 255, 0.08);
  --camera-bg: #1d202b;
  --camera-overlay: rgba(8, 9, 14, 0.76);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #14151c;
    --page-end: #101118;
    --text: #f2f3f8;
    --text-soft: #b2b5c1;
    --text-faint: #777b8a;
    --glass: rgba(31, 33, 44, 0.75);
    --glass-solid: rgba(32, 34, 45, 0.94);
    --control: rgba(41, 43, 56, 0.68);
    --control-strong: rgba(27, 29, 39, 0.9);
    --line: rgba(226, 228, 255, 0.1);
    --line-strong: rgba(155, 164, 255, 0.28);
    --accent: #9ba5ff;
    --accent-two: #c596f4;
    --pink: #f3a4c8;
    --accent-soft: rgba(151, 161, 255, 0.1);
    --accent-soft-strong: rgba(151, 161, 255, 0.18);
    --accent-border: rgba(151, 161, 255, 0.3);
    --accent-shadow: rgba(105, 115, 232, 0.2);
    --success: #70d7ad;
    --success-soft: rgba(88, 207, 160, 0.11);
    --danger: #ff929d;
    --warning: #ddbd7e;
    --warning-soft: rgba(221, 178, 92, 0.08);
    --shadow: 0 36px 100px rgba(0, 0, 0, 0.38), 0 3px 18px rgba(0, 0, 0, 0.22);
    --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.25);
    --blob-pink: rgba(222, 92, 165, 0.16);
    --blob-blue: rgba(75, 127, 218, 0.2);
    --blob-yellow: rgba(207, 151, 64, 0.12);
    --grid-dot: rgba(213, 216, 255, 0.08);
    --camera-bg: #1d202b;
    --camera-overlay: rgba(8, 9, 14, 0.76);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.icon-sprite { position: fixed; width: 0; height: 0; overflow: hidden; pointer-events: none; }
svg:not(.icon-sprite) { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.noscript { position: fixed; inset: auto 18px 18px; z-index: 100; padding: 12px 16px; border-radius: 14px; color: #fff; background: #d95765; text-align: center; font: 600 13px/1.5 ui-sans-serif, sans-serif; }

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
  transition: background-color 0.28s ease;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.28s ease, color 0.28s ease;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.app-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: 0 24px 48px;
  background:
    radial-gradient(ellipse 68% 48% at -12% 29%, var(--blob-pink), transparent 72%),
    radial-gradient(ellipse 64% 46% at 111% 17%, var(--blob-blue), transparent 72%),
    radial-gradient(ellipse 55% 38% at 96% 82%, var(--blob-yellow), transparent 74%),
    radial-gradient(ellipse 44% 35% at 26% 84%, rgba(170, 139, 248, 0.12), transparent 76%),
    linear-gradient(160deg, var(--page), var(--page-end));
  transition: background 0.35s ease;
}

.dot-grid {
  position: absolute;
  z-index: -4;
  inset: 0;
  opacity: 0.4;
  background-image: radial-gradient(var(--grid-dot) 0.65px, transparent 0.65px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
  pointer-events: none;
}

.ambient {
  position: absolute;
  z-index: -3;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(115px);
  pointer-events: none;
  opacity: 0.52;
  animation: ambient-drift 14s ease-in-out infinite alternate;
}
.ambient-one { top: 180px; left: -330px; background: var(--blob-pink); }
.ambient-two { top: 90px; right: -340px; background: var(--blob-blue); animation-delay: -5s; }
.ambient-three { top: 700px; right: -250px; background: var(--blob-yellow); animation-delay: -9s; }
@keyframes ambient-drift { to { transform: translate3d(22px, -16px, 0) scale(1.06); } }

.site-header {
  width: min(1100px, 100%);
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 3px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: 1px solid var(--accent-border);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent-soft-strong), rgba(239, 150, 190, 0.08));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 8px 24px var(--accent-shadow);
}
.brand-mark i { display: block; border-radius: 2px; background: linear-gradient(135deg, var(--accent), var(--accent-two)); }
.brand-mark i:nth-child(2) { opacity: 0.5; }
.brand-mark i:nth-child(3) { grid-column: 2; opacity: 0.78; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand-copy strong { color: var(--text); font-size: 18px; letter-spacing: 0.05em; }
.brand-copy small { color: var(--text-faint); font-size: 8px; letter-spacing: 0.25em; font-weight: 700; }

.header-tools { display: flex; align-items: center; gap: 10px; }
.privacy-chip,
.theme-switch {
  border: 1px solid var(--line);
  background: var(--control);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}
.privacy-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
}
.privacy-chip span { display: flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 12px; font-weight: 650; }
.privacy-chip span i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.privacy-chip span.offline i { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.privacy-chip small { padding-left: 12px; border-left: 1px solid var(--line); color: var(--text-faint); font-size: 11px; }

.theme-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 14px;
}
.theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  color: var(--text-faint);
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.theme-switch button:hover { color: var(--text); transform: translateY(-1px); }
.theme-switch button.active { color: var(--text); background: var(--glass-solid); box-shadow: 0 3px 12px rgba(57, 61, 88, 0.1); }

.intro {
  width: min(740px, 100%);
  margin: 68px auto 40px;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}
.intro h1 {
  margin: 22px 0 17px;
  color: var(--text);
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.065em;
  font-weight: 760;
}
.intro h1 em {
  color: transparent;
  background: linear-gradient(105deg, var(--accent), var(--accent-two) 48%, var(--pink));
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}
.intro p { max-width: 570px; margin: 0 auto; color: var(--text-soft); font-size: 15px; line-height: 1.8; }

.workspace-card {
  width: min(780px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--glass);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(32px) saturate(140%);
  -webkit-backdrop-filter: blur(32px) saturate(140%);
  overflow: hidden;
}

.main-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px;
  margin: 14px 14px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--control-strong);
}
.main-switch > i {
  position: absolute;
  z-index: 0;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc(50% - 6px);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--glass-solid);
  box-shadow: 0 5px 18px rgba(53, 58, 87, 0.1);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.main-switch > i.right { transform: translateX(100%); }
.main-switch button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 49px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-faint);
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease;
}
.main-switch button.active { color: var(--text); }
.workspace-content { padding: 26px 28px 30px; }

.content-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.content-type-grid button {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 66px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text-faint);
  text-align: left;
  background: var(--control);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.content-type-grid button:hover { transform: translateY(-1px); border-color: var(--accent-border); }
.content-type-grid button.active { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(113, 128, 245, 0.03); }
.content-type-grid button > span { display: flex; flex-direction: column; gap: 4px; }
.content-type-grid strong { color: var(--text); font-size: 13px; }
.content-type-grid small { color: var(--text-faint); font-size: 10px; }
.content-type-grid .selected-check { position: absolute; top: 8px; right: 8px; padding: 2px; color: white; background: linear-gradient(135deg, var(--accent), var(--accent-two)); border-radius: 50%; }

.link-flow, .file-flow { margin-top: 24px; }
.field-label { display: block; margin: 0 0 9px 2px; color: var(--text-soft); font-size: 12px; font-weight: 650; }
.url-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-faint);
  background: var(--control);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.url-field:focus-within { border-color: var(--accent-border); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--glass-solid); }
.url-field.has-error { border-color: var(--danger); }
.url-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.url-field input::placeholder { color: var(--text-faint); }
.url-field button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; color: var(--text-faint); background: transparent; cursor: pointer; }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 47px;
  padding: 0 18px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s, filter 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.primary-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: white;
  background: linear-gradient(125deg, var(--accent), var(--accent-two));
  box-shadow: 0 12px 30px var(--accent-shadow), inset 0 1px rgba(255, 255, 255, 0.28);
}
.primary-button:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 15px 34px var(--accent-shadow); }
.primary-button:disabled { opacity: 0.38; cursor: not-allowed; transform: none; filter: grayscale(0.2); box-shadow: none; }
.primary-button.full, .secondary-button.full { width: 100%; margin-top: 18px; }
.primary-button.compact { min-width: 132px; }
.secondary-button { border: 1px solid var(--line); color: var(--text-soft); background: var(--control); }
.secondary-button:hover { border-color: var(--accent-border); transform: translateY(-1px); background: var(--glass-solid); }
.field-error, .inline-error { margin: 9px 2px 0; color: var(--danger); font-size: 11px; line-height: 1.5; }
.field-error.centered { text-align: center; }

.static-result { margin-top: 20px; }
.qr-shell { position: relative; overflow: hidden; background: #fff; }
.qr-shell canvas { display: block; width: 100% !important; height: auto !important; }
.animated-qr-shell canvas { image-rendering: crisp-edges; image-rendering: pixelated; }
.static-qr-shell { width: min(330px, 100%); margin: 0 auto; padding: 10px; border-radius: 22px; box-shadow: 0 16px 46px rgba(52, 57, 83, 0.18); }
.qr-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #434754; background: white; font-size: 12px; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

.drop-zone {
  position: relative;
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px dashed var(--line-strong);
  border-radius: 19px;
  background: var(--control);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.drop-zone.is-dragging { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.006); }
.drop-zone > input, .camera-actions input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-empty { width: 100%; display: flex; flex-direction: column; align-items: center; border: 0; background: transparent; color: var(--text-faint); cursor: pointer; }
.drop-empty strong { margin-top: 12px; color: var(--text); font-size: 14px; }
.drop-empty > span:last-child { margin-top: 5px; font-size: 11px; }
.upload-orbit { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--accent-border); border-radius: 16px; color: var(--accent); background: linear-gradient(145deg, var(--accent-soft-strong), rgba(239, 150, 190, 0.08)); }
.file-preview { width: 78px; height: 78px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: var(--control-strong); }
.file-glyph { display: grid; place-items: center; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; color: var(--accent); background: var(--accent-soft); }
.selected-file-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.selected-file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 14px; }
.selected-file-copy span { color: var(--text-faint); font-size: 11px; }
.change-file { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-soft); background: var(--glass-solid); font-size: 11px; cursor: pointer; }

.transfer-settings { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--control); }
.settings-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.settings-heading span { display: flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 12px; font-weight: 700; }
.settings-heading small { color: var(--text-faint); font-size: 10px; }
.speed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.speed-grid button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-faint); background: var(--glass); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.speed-grid button:hover { transform: translateY(-1px); }
.speed-grid button.active { border-color: var(--accent-border); background: var(--accent-soft); }
.speed-grid strong { color: var(--text); font-size: 12px; }
.speed-grid button.active strong { color: var(--accent); }
.speed-grid span { font-size: 10px; font-weight: 700; }
.speed-grid small { color: var(--text-faint); font-size: 8.5px; }
.redundancy-heading { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.redundancy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.redundancy-grid button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-faint); background: var(--glass); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.redundancy-grid button:hover { transform: translateY(-1px); }
.redundancy-grid button.active { border-color: var(--accent-border); background: linear-gradient(145deg, var(--accent-soft), rgba(239, 150, 190, 0.07)); }
.redundancy-grid strong { color: var(--text); font-size: 11px; }
.redundancy-grid button.active strong { color: var(--accent); }
.redundancy-grid small { color: var(--text-faint); font-size: 8.5px; line-height: 1.4; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); cursor: pointer; }
.toggle-row > span { display: flex; align-items: center; gap: 9px; color: var(--accent); }
.toggle-row > span > span { display: flex; flex-direction: column; gap: 2px; }
.toggle-row strong { color: var(--text); font-size: 11px; }
.toggle-row small { color: var(--text-faint); font-size: 9px; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row > i { position: relative; flex: 0 0 auto; width: 37px; height: 21px; border-radius: 999px; background: rgba(125, 129, 148, 0.28); transition: background 0.2s; }
.toggle-row > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--text-faint); transition: transform 0.2s, background 0.2s; }
.toggle-row input:checked + i { background: var(--accent-soft-strong); }
.toggle-row input:checked + i::after { transform: translateX(16px); background: var(--accent); }
.estimate-line { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; margin: 14px 2px 0; color: var(--text-faint); font-size: 10px; }
.estimate-line > span { display: flex; align-items: center; gap: 6px; }
.estimate-line strong { color: var(--accent); font-size: 11px; }
.estimate-line small { text-align: right; color: var(--text-faint); }
.size-warning { margin: 12px 0 0; padding: 10px 12px; border: 1px solid rgba(192, 143, 55, 0.18); border-radius: 11px; color: var(--warning); background: var(--warning-soft); font-size: 10px; line-height: 1.6; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sender-stage { position: relative; }
.sender-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 15px; }
.icon-text-button, .icon-button { display: inline-flex; align-items: center; gap: 6px; border: 0; color: var(--text-faint); background: transparent; font-size: 11px; cursor: pointer; }
.icon-button { justify-self: end; justify-content: center; width: 35px; height: 35px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--control); }
.live-pill { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--accent-border); border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 9px; font-weight: 700; }
.live-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.sender-fileline { display: flex; align-items: center; gap: 10px; width: min(480px, 100%); margin: 0 auto 12px; color: var(--accent); }
.sender-fileline div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sender-fileline strong { max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 11px; }
.sender-fileline span { color: var(--text-faint); font-size: 9px; }
.animated-qr-shell { width: min(480px, 100%); margin: 0 auto; padding: 9px; border-radius: 22px; box-shadow: 0 20px 55px rgba(42, 46, 70, 0.2), 0 0 0 1px var(--line); }
.paused-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #f2f3f8; background: rgba(18, 19, 26, 0.84); backdrop-filter: blur(8px); font-size: 11px; }
.sender-readout { width: min(480px, 100%); margin: 14px auto 0; }
.readout-row { display: flex; justify-content: space-between; color: var(--text-soft); font-size: 10px; font-variant-numeric: tabular-nums; }
.progress-track { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: var(--accent-soft); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-two), var(--pink)); box-shadow: 0 0 12px var(--accent-shadow); transition: width 0.12s linear; }
.readout-meta { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-faint); font-size: 8.5px; }
.sender-controls { width: min(480px, 100%); margin: 15px auto 0; display: grid; grid-template-columns: 126px 1fr; align-items: center; gap: 13px; }
.sender-control { min-height: 42px; }
.sender-controls p { margin: 0; color: var(--text-faint); font-size: 8.5px; line-height: 1.55; }
.sender-stage.is-fullscreen { display: flex; flex-direction: column; justify-content: center; width: 100vw; height: 100vh; padding: 22px; color: #f2f3f8; background: #111219; }
.sender-stage.is-fullscreen .animated-qr-shell { width: min(72vh, 86vw); }
.sender-stage.is-fullscreen .sender-fileline, .sender-stage.is-fullscreen .sender-readout, .sender-stage.is-fullscreen .sender-controls { width: min(72vh, 86vw); }
.sender-stage.is-fullscreen .sender-topbar { position: absolute; top: 18px; left: 20px; right: 20px; }
.sender-stage.is-fullscreen .sender-fileline strong,
.sender-stage.is-fullscreen .readout-row { color: #f2f3f8; }
.sender-stage.is-fullscreen .sender-fileline span,
.sender-stage.is-fullscreen .readout-meta,
.sender-stage.is-fullscreen .sender-controls p,
.sender-stage.is-fullscreen .icon-text-button { color: #979ba9; }

.camera-box { position: relative; min-height: 430px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(circle at 50% 40%, var(--accent-soft-strong), transparent 55%), var(--camera-bg); }
.camera-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.2s; }
.camera-box.is-live video { opacity: 1; }
.capture-canvas { display: none; }
.camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.scanner-glyph { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 16px; border: 1px solid var(--accent-border); border-radius: 22px; color: var(--accent); background: linear-gradient(145deg, var(--accent-soft-strong), rgba(239, 150, 190, 0.08)); box-shadow: 0 16px 38px var(--accent-shadow); }
.camera-placeholder strong { color: var(--text); font-size: 16px; }
.camera-placeholder p { margin: 7px 0 20px; color: var(--text-faint); font-size: 11px; }
.camera-placeholder .primary-button { min-width: 145px; }
.camera-error { max-width: 320px; margin: -8px 0 15px; color: var(--danger); font-size: 10px; line-height: 1.5; }
.scan-frame { position: absolute; top: 50%; left: 50%; width: min(62vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); }
.scan-frame i { position: absolute; width: 34px; height: 34px; border-color: #a9b1ff; border-style: solid; filter: drop-shadow(0 0 5px rgba(150, 160, 255, 0.45)); }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 8px 0 0; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 8px 0 0; }
.scan-frame i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 8px; }
.scan-frame i:nth-child(4) { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 8px; }
.scan-frame span { position: absolute; left: 7px; right: 7px; top: 8px; height: 1px; background: linear-gradient(90deg, transparent, #abb3ff, transparent); box-shadow: 0 0 12px #9aa5ff; animation: scanner 2s ease-in-out infinite alternate; }
@keyframes scanner { to { transform: translateY(275px); } }
.camera-actions { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.camera-actions button, .camera-actions label { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 11px; color: #e3e4ed; background: var(--camera-overlay); backdrop-filter: blur(14px); font-size: 10px; cursor: pointer; }
.album-error { position: absolute; z-index: 3; left: 50%; bottom: 55px; transform: translateX(-50%); padding: 7px 10px; border-radius: 9px; color: #ffe3e5; background: rgba(116, 42, 52, 0.9); font-size: 9px; white-space: nowrap; }
.scan-tips { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 17px; color: var(--text-faint); font-size: 10px; }
.scan-tips span { display: flex; align-items: center; gap: 6px; }
.receive-progress { margin-top: 15px; padding: 14px; border: 1px solid var(--accent-border); border-radius: 16px; background: var(--accent-soft); }
.receive-progress-head { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; }
.receive-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--accent); background: var(--accent-soft-strong); }
.receive-progress-head div { display: flex; flex-direction: column; gap: 3px; }
.receive-progress-head strong { color: var(--text); font-size: 11px; }
.receive-progress-head small { color: var(--text-faint); font-size: 8.5px; }
.receive-progress-head b { color: var(--accent); font-size: 14px; font-variant-numeric: tabular-nums; }
.progress-track.large { height: 6px; margin-top: 12px; }
.receive-stats { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-faint); font-size: 8.5px; font-variant-numeric: tabular-nums; }

.scan-result-card { display: flex; flex-direction: column; align-items: center; min-height: 430px; padding: 26px 10px 5px; text-align: center; }
.success-orbit { display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid rgba(69, 185, 140, 0.28); border-radius: 50%; color: white; background: var(--success); box-shadow: 0 0 0 10px var(--success-soft), 0 18px 42px rgba(56, 166, 124, 0.18); }
.success-kicker { margin-top: 15px; color: var(--success); font-size: 9px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.scan-result-card h2 { max-width: 520px; margin: 10px 0 5px; overflow-wrap: anywhere; color: var(--text); font-size: 18px; }
.scan-result-card > p { margin: 0; color: var(--text-faint); font-size: 10px; }
.received-image { max-width: min(420px, 100%); max-height: 230px; margin-top: 14px; object-fit: contain; border: 1px solid var(--line); border-radius: 16px; background: var(--control-strong); }
.received-file-icon { display: grid; place-items: center; width: 60px; height: 60px; margin-top: 16px; border: 1px solid var(--accent-border); border-radius: 17px; color: var(--accent); background: var(--accent-soft); }
.scan-result-card .primary-button.full, .scan-result-card .secondary-button.full { max-width: 390px; }
.decoded-text { width: min(500px, 100%); max-height: 120px; margin-top: 12px !important; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; color: var(--text-soft) !important; background: var(--control); overflow-wrap: anywhere; line-height: 1.6; }
.scan-again { display: flex; align-items: center; gap: 6px; margin-top: 18px; border: 0; color: var(--text-faint); background: transparent; font-size: 10px; cursor: pointer; }

.protocol-strip { width: min(960px, 100%); margin: 54px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.protocol-strip article { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 25px 22px; }
.protocol-strip article + article { border-left: 1px solid var(--line); }
.protocol-strip article > span { color: var(--accent); font: 700 9px/1.3 ui-monospace, monospace; opacity: 0.78; }
.protocol-strip strong { color: var(--text-soft); font-size: 11px; }
.protocol-strip p { margin: 7px 0 0; color: var(--text-faint); font-size: 9px; line-height: 1.7; }
footer { width: min(960px, 100%); margin: 20px auto 0; display: flex; justify-content: space-between; color: var(--text-faint); font-size: 9px; }
footer span { display: flex; align-items: center; gap: 6px; }

@media (max-width: 820px) {
  .privacy-chip small { display: none; }
  .privacy-chip { padding: 8px 10px; }
}

@media (max-width: 720px) {
  .app-shell { padding: 0 14px 32px; }
  .site-header { min-height: 76px; }
  .intro { margin: 46px auto 30px; }
  .intro h1 { font-size: clamp(39px, 13vw, 58px); }
  .intro p { padding: 0 8px; font-size: 13px; }
  .workspace-card { border-radius: 25px; }
  .workspace-content { padding: 20px 17px 22px; }
  .content-type-grid { gap: 7px; }
  .content-type-grid button { grid-template-columns: 1fr; justify-items: center; min-height: 75px; padding: 10px 5px; text-align: center; }
  .content-type-grid button > span { gap: 2px; }
  .content-type-grid small { font-size: 8.5px; }
  .drop-zone { min-height: 138px; }
  .speed-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .speed-grid button { padding: 9px 7px; }
  .speed-grid small { min-height: 0; }
  .redundancy-grid { gap: 5px; }
  .redundancy-grid button { padding: 9px 7px; }
  .settings-heading small { display: none; }
  .estimate-line { grid-template-columns: auto auto; }
  .estimate-line small { grid-column: 1 / -1; text-align: left; }
  .camera-box { min-height: 390px; }
  .scan-frame { width: min(69vw, 280px); }
  @keyframes scanner { to { transform: translateY(min(63vw, 255px)); } }
  .sender-controls { grid-template-columns: 112px 1fr; }
  .readout-meta span:nth-child(2) { display: none; }
  .protocol-strip { grid-template-columns: 1fr; margin-top: 42px; }
  .protocol-strip article { padding: 18px 10px; }
  .protocol-strip article + article { border-left: 0; border-top: 1px solid var(--line); }
  footer { flex-direction: column; align-items: center; gap: 9px; }
}

@media (max-width: 580px) {
  .privacy-chip { display: none; }
  .theme-switch button { width: 32px; padding: 0; }
  .theme-switch button span { display: none; }
}

@media (max-width: 430px) {
  .brand-copy small { display: none; }
  .intro h1 { letter-spacing: -0.055em; }
  .main-switch { margin: 10px 10px 0; }
  .workspace-content { padding-inline: 13px; }
  .result-actions { flex-direction: column; }
  .result-actions > * { width: 100%; }
  .file-preview { width: 58px; height: 58px; }
  .change-file { padding: 7px; }
  .sender-fileline, .sender-readout, .sender-controls { width: 100%; }
  .camera-box { min-height: 360px; }
}

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