/* Minimal reset replacing Tailwind preflight. */
*,
::before,
::after {
  box-sizing: border-box;
  border: 0 solid;
}
button,
input {
  font: inherit;
}
button {
  background: transparent;
}
a {
  color: inherit;
  text-decoration: inherit;
}
svg,
video,
canvas {
  display: block;
  vertical-align: middle;
}
video {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .method-switch {
    grid-template-columns: 1fr !important;
  }
  .lan-answer {
    grid-template-columns: 1fr !important;
  }
  .lan-answer > div:last-child {
    padding: 0 8px 14px !important;
  }
  .lan-answer > .qrbox {
    min-height: 310px;
  }
}
.method-switch {
  width: min(100%, 480px);
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.method-switch button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
  background: #101115;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.method-switch button:hover {
  border-color: #41444c;
}
.method-switch button.active {
  color: var(--text);
  border-color: #6f8ff577;
  background: #6f8ff50d;
}
.method-switch button > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.method-switch strong {
  font-size: 13px;
}
.method-switch small {
  color: var(--muted);
  font-size: 10px;
}
.secondary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--text);
  background: #202127;
  border: 1px solid #3a3c43;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.secondary-button:hover {
  border-color: var(--blue);
}
.lan-answer {
  min-height: 352px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: center;
}
.lan-answer > .qrbox {
  min-height: 330px;
}
.lan-answer > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 18px;
}
.lan-answer > div:last-child > b {
  font-size: 17px;
}
.lan-answer > div:last-child > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.lan-answer > div:last-child > small {
  margin-top: 8px;
  color: var(--green);
  font-size: 11px;
}
.qrbox.camera {
  position: relative;
  background: #090a0c;
}
.transfer-progress {
  margin-top: auto;
  padding: 13px 14px;
  background: #101115;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.transfer-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}
.transfer-progress > div strong {
  color: var(--text);
}
.transfer-progress > b {
  display: block;
  height: 4px;
  overflow: hidden;
  background: #292b31;
  border-radius: 4px;
}
.transfer-progress > b i {
  display: block;
  height: 100%;
  min-width: 4px;
  background: var(--blue);
  border-radius: 4px;
  transition: width 0.18s ease;
}
:root {
  --bg: #0c0d10;
  --panel: #141519;
  --soft: #191a1f;
  --line: #2b2d33;
  --text: #f2f3f5;
  --muted: #9699a2;
  --blue: #6f8ff5;
  --green: #6ed7a8;
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 28px;
}
.page > header {
  width: min(100%, 1080px);
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.brand > i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--panel);
  border: 1px solid #3a3c43;
  border-radius: 8px;
}
.local {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.wrap {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 68px 0 48px;
}
.intro {
  text-align: center;
}
.intro p {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.intro h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}
.intro > span {
  display: block;
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.tabs {
  width: 320px;
  margin: 40px auto 16px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.tabs button {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}
.tabs button.active {
  color: var(--text);
  background: var(--soft);
  box-shadow: inset 0 0 0 1px #3a3c43;
}
.panel {
  min-height: 390px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 60px #0004;
}
.drop {
  min-height: 352px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #101115;
  border: 1px dashed #3a3c43;
  border-radius: 11px;
  cursor: pointer;
  transition: 0.15s;
}
.drop:hover,
.drop.dragging {
  border-color: var(--blue);
  background: #6f8ff50c;
}
.drop input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.drop > i,
.placeholder > i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  color: var(--blue);
  background: #6f8ff516;
  border: 1px solid #6f8ff52e;
  border-radius: 12px;
}
.drop strong {
  font-size: 16px;
}
.drop > span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.sender {
  min-height: 352px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
}
.details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.file {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.file > i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--blue);
  background: #6f8ff518;
  border-radius: 8px;
}
.file > span {
  min-width: 0;
  flex: 1;
}
.file strong,
.file small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file strong {
  font-size: 13px;
}
.file small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.file button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.step b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--text);
  border: 1px solid #3a3c43;
  border-radius: 50%;
  font-size: 11px;
}
.step strong {
  color: var(--text);
}
.primary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.primary:hover {
  background: #809cff;
}
.primary em {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1s infinite;
}
.qrbox {
  min-height: 352px;
  display: grid;
  place-items: center;
  padding: 10px;
  background: #f7f7f8;
  border-radius: 11px;
  overflow: hidden;
}
.qrbox canvas {
  width: min(100%, 310px) !important;
  height: auto !important;
}
.qrbox > div:not(.idle) {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 8px 4px;
  color: #696c75;
  font-size: 11px;
  font-weight: 700;
}
.qrbox > div i {
  color: #607edb;
  font-style: normal;
  letter-spacing: 3px;
}
.idle {
  max-width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #24252a;
}
.idle svg {
  margin-bottom: 18px;
  color: #868994;
}
.idle strong {
  font-size: 14px;
}
.idle span {
  margin-top: 8px;
  color: #777a83;
  font-size: 12px;
}
.camera {
  min-height: 352px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.camera video {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}
.placeholder,
.success {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.placeholder > span,
.success > span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.placeholder .primary,
.success .primary {
  margin-top: 24px;
}
.success {
  width: 100%;
  min-height: 352px;
  justify-content: center;
  background: #101713;
}
.success > i {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--green);
  background: #6ed7a818;
  border: 1px solid #6ed7a840;
  border-radius: 50%;
}
.success > button,
.status > button {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
}
.camera > i {
  width: 54px;
  height: 54px;
  position: absolute;
  z-index: 1;
  border-color: var(--blue);
  border-style: solid;
}
.tl {
  top: 48px;
  left: 48px;
  border-width: 2px 0 0 2px;
}
.tr {
  top: 48px;
  right: 48px;
  border-width: 2px 2px 0 0;
}
.bl {
  bottom: 48px;
  left: 48px;
  border-width: 0 0 2px 2px;
}
.br {
  right: 48px;
  bottom: 48px;
  border-width: 0 2px 2px 0;
}
.scanline {
  width: calc(100% - 96px);
  height: 1px;
  position: absolute;
  left: 48px;
  top: 50%;
  z-index: 1;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
  animation: scan 2.2s ease-in-out infinite;
}
.status {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 0;
  color: var(--muted);
  font-size: 12px;
}
.status > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status > span > i {
  width: 7px;
  height: 7px;
  background: #60636c;
  border-radius: 50%;
}
.status > span > i.on {
  background: var(--green);
  box-shadow: 0 0 10px #6ed7a877;
}
.status > div {
  min-width: 220px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
}
.status > div > b {
  grid-column: 1/-1;
  height: 3px;
  background: #2a2c31;
  border-radius: 3px;
  overflow: hidden;
}
.status > div > b i {
  display: block;
  height: 100%;
  background: var(--blue);
}
.status > button {
  margin: 0;
}
.error {
  margin: 13px 0 0;
  color: #ff8989;
  text-align: center;
  font-size: 13px;
}
footer {
  width: min(100%, 1080px);
  margin: auto auto 0;
  padding: 22px 0 28px;
  display: flex;
  justify-content: space-between;
  color: #666871;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
@keyframes scan {
  0%,
  100% {
    transform: translateY(-105px);
  }
  50% {
    transform: translateY(105px);
  }
}
@media (max-width: 720px) {
  .page {
    padding: 0 16px;
  }
  .page > header {
    height: 64px;
  }
  .wrap {
    padding-top: 46px;
  }
  .intro h1 {
    font-size: 40px;
  }
  .tabs {
    width: 100%;
    margin-top: 32px;
  }
  .sender {
    grid-template-columns: 1fr;
  }
  .qrbox {
    min-height: 330px;
    order: -1;
  }
  .status {
    align-items: flex-start;
    flex-direction: column;
  }
  .status > div {
    width: 100%;
    min-width: 0;
  }
  footer {
    gap: 10px;
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.manual-pairing {
  margin-top: 16px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.manual-pairing label {
  font-size: 13px;
}
.manual-pairing small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.manual-pairing textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 12px monospace;
  overflow-wrap: anywhere;
}
.manual-pairing button {
  align-self: flex-start;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.primary:disabled {
  opacity: 0.5;
}
.panel button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.placeholder {
  padding: 20px;
}
.placeholder > span {
  max-width: 420px;
  line-height: 1.6;
}
.camera video {
  display: none;
}
.camera.scanning video {
  display: block;
}
.qrbox[hidden] {
  display: none !important;
}
.file strong {
  max-width: 260px;
}
.manual-pairing textarea {
  color-scheme: dark;
}
.success > span {
  max-width: 90%;
  overflow-wrap: anywhere;
}
.camera-close {
  position: absolute;
  bottom: 12px;
  z-index: 3;
}
