.qr-share-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #999;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.qr-share-trigger svg { width: 20px; height: 20px; }
.qr-share-trigger:hover { color: #999; }
.qr-share-trigger:active { transform: scale(.96); }
.qr-share-trigger:focus-visible,
.qr-share-close:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }

.qr-share-trigger--desktop {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  z-index: 5;
}
.qr-share-trigger--desktop svg { width: 10px; height: 10px; }

.qr-share-trigger--drawer { display: none; }
.home-drawer-share { display: none; }

.qr-share-modal[hidden] { display: none !important; }
.qr-share-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.qr-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .56);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.qr-share-card {
  position: relative;
  width: min(340px, 100%);
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .28);
  text-align: center;
  color: #172033;
  animation: qr-share-enter .18s ease-out both;
}

.qr-share-card h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.qr-share-card p { margin: 7px 0 18px; color: #64748b; font-size: 13px; }

.qr-share-close {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

#qr-share-code {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 224px;
  height: 224px;
  margin: 0 auto;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

#qr-share-code img,
#qr-share-code canvas { display: block; max-width: 100%; max-height: 100%; }
.qr-share-url {
  max-width: 100%;
  margin-top: 14px;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes qr-share-enter {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px),
       (min-width: 769px) and (max-width: 1366px) and (orientation: portrait) {
  .qr-share-trigger--desktop { display: none; }
  .qr-share-trigger--drawer { display: inline-flex; }
  .home-drawer-share {
    position: absolute;
    top: 4px;
    right: 10px;
    z-index: 2;
    display: block;
  }
}

#qr-share-actions:empty { display: none; }
#qr-share-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .qr-share-card { animation: none; }
}
