.share-dialog {
  width: min(400px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(25, 49, 29, 0.98), rgba(6, 18, 10, 0.98));
  color: #f1dfb7;
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58), inset 0 1px rgba(255, 239, 200, 0.08);
}

.share-dialog::backdrop {
  background: rgba(2, 8, 4, 0.7);
  backdrop-filter: blur(5px);
}

.share-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.share-dialog-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.share-dialog button {
  min-height: 29px;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(245, 226, 184, 0.13), rgba(184, 132, 72, 0.075));
  color: inherit;
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 239, 200, 0.055);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.share-dialog button:hover {
  color: #fff0ca;
  background: linear-gradient(145deg, rgba(245, 226, 184, 0.21), rgba(184, 132, 72, 0.12));
  transform: translateY(-1px);
}

.share-dialog button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.share-dialog-header button {
  padding: 3px 8px;
  font-size: 0.82rem;
}

#share-card-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 10px;
  background: #081008;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.share-dialog-hint {
  margin: 8px 0;
  font-size: 0.82rem;
  opacity: 0.82;
}

.share-app-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.share-app-options button {
  min-width: 0;
  padding: 4px 3px;
  font-size: 0.78rem;
}

.share-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.share-card-actions button {
  padding: 4px 7px;
  font-size: 0.8rem;
}

.share-destination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.share-destination-links a {
  color: inherit;
  text-decoration: none;
  opacity: 0.78;
  transition: color 160ms ease, opacity 160ms ease;
}

.share-destination-links a:hover {
  color: #fff0ca;
  opacity: 1;
}

#share-card-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 0.82rem;
}

@media (max-width: 420px) {
  .share-dialog {
    padding: 10px;
  }

  .share-app-options button {
    font-size: 0.82rem;
  }
}
