.me-quick-scan {
  display: none !important;
}

@media (max-width: 1023px) {
  .workspace-layout.tab-me .me-quick-scan {
    display: flex !important;
    margin: 10px 0 0;
    border-radius: 0;
  }

  .workspace-layout.tab-me .me-profile[hidden] + .me-quick-scan {
    display: none !important;
  }

  .me-quick-scan .wechat-list-row {
    min-height: 58px;
  }
}

.me-quick-scan-icon {
  background: linear-gradient(145deg, #12a676, #08715c);
}

.me-quick-scan-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.linxi-qr-scanner-open {
  overflow: hidden;
}

.linxi-qr-scanner[hidden] {
  display: none !important;
}

.linxi-qr-scanner {
  position: fixed;
  z-index: 2147483600;
  inset: 0;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #061f1b;
  color: #ffffff;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.linxi-qr-scanner-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #061f1b;
}

.linxi-qr-scanner-head {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 10px 0;
  background: rgba(4, 35, 29, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.linxi-qr-scanner-title {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
}

.linxi-qr-scanner-close {
  grid-column: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.linxi-qr-scanner-close:active {
  background: rgba(255, 255, 255, 0.12);
}

.linxi-qr-scanner-camera {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(21, 117, 91, 0.28), transparent 45%),
    #071713;
}

.linxi-qr-scanner-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #071713;
}

.linxi-qr-scanner-frame {
  position: absolute;
  top: 46%;
  left: 50%;
  width: min(72vw, 320px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(2, 17, 14, 0.48);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.linxi-qr-scanner-line {
  position: absolute;
  right: 14px;
  left: 14px;
  top: 12%;
  height: 2px;
  border-radius: 999px;
  background: #26e7a7;
  box-shadow: 0 0 12px rgba(38, 231, 167, 0.9);
  animation: linxi-qr-scan-line 2.1s ease-in-out infinite alternate;
}

.linxi-qr-scanner-status {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 22px;
  left: 18px;
  min-height: 24px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
}

.linxi-qr-scanner-actions {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 12px;
  min-height: calc(76px + env(safe-area-inset-bottom));
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: rgba(4, 35, 29, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.linxi-qr-scanner-action {
  min-width: 108px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.linxi-qr-scanner-action:active {
  background: rgba(255, 255, 255, 0.2);
}

.linxi-qr-scanner-close:focus-visible,
.linxi-qr-scanner-action:focus-visible {
  outline: 2px solid #43efb5;
  outline-offset: 2px;
}

.linxi-qr-scanner-file {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (orientation: landscape) and (max-height: 620px) {
  .linxi-qr-scanner-frame {
    top: 50%;
    width: min(58vh, 300px);
  }

  .linxi-qr-scanner-status {
    bottom: 12px;
  }

  .linxi-qr-scanner-actions {
    position: absolute;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 4;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .linxi-qr-scanner-action {
    min-width: 88px;
    background: rgba(4, 35, 29, 0.78);
  }
}

@keyframes linxi-qr-scan-line {
  from { top: 12%; }
  to { top: calc(88% - 2px); }
}

@media (prefers-reduced-motion: reduce) {
  .linxi-qr-scanner-line {
    animation: none;
    top: 50%;
  }
}
