.share-card-backdrop {
  position: fixed;
  /* The legacy result sheet and map overlays use 5,000-99,999. */
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 24, 18, 0.58);
}

.share-card-dialog {
  width: min(430px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 1px solid rgba(29, 54, 37, 0.16);
  border-radius: 16px;
  background: #f7f5ef;
  box-shadow: 0 24px 70px rgba(16, 30, 20, 0.32);
}

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

.share-card-dialog-header h2 {
  margin: 0;
  color: #17251c;
  font-size: 16px;
  line-height: 1.4;
}

.share-card-dialog-header h2::after {
  content: "카드 미리보기";
  display: block;
  margin-top: 2px;
  color: #728078;
  font-size: 11px;
  font-weight: 500;
}

.share-card-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #425049;
  background: #ebece8;
  cursor: pointer;
}

.share-card-preview {
  padding: 4px 16px 16px;
}

.share-card-preview .share-card {
  width: 100%;
}

.share-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 0 16px 8px;
}

.share-card-actions button {
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid #d8dfd9;
  border-radius: 8px;
  color: #1d3025;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.share-card-actions button:first-child {
  border-color: #193024;
  color: #fff;
  background: #193024;
}

.share-card-actions button:disabled {
  opacity: 0.56;
  cursor: wait;
}

.share-card-status {
  min-height: 19px;
  padding: 0 16px 16px;
  color: #5a6860;
  font-size: 12px;
  line-height: 1.5;
}

.share-card {
  --share-scale: 1;
  --share-accent: #0f6e56;
  --share-pill-background: #e1f5ee;
  --share-pill-color: #085041;
  box-sizing: border-box;
  display: flex;
  width: calc(300px * var(--share-scale));
  min-height: calc(375px * var(--share-scale));
  flex-direction: column;
  padding: calc(20px * var(--share-scale)) calc(22px * var(--share-scale)) calc(18px * var(--share-scale));
  border: calc(0.5px * var(--share-scale)) solid #dcded8;
  border-radius: calc(16px * var(--share-scale));
  color: #1a1f1c;
  background: #fffefa;
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.share-card[data-size="capture"] {
  --share-scale: 3.6;
  position: fixed;
  top: 0;
  left: -12000px;
  width: 1080px;
  min-height: 1350px;
}

.share-card[data-tone="balanced"] {
  --share-accent: #8a641c;
  --share-pill-background: #fbf1d9;
  --share-pill-color: #765314;
}

.share-card[data-tone="low"] {
  --share-accent: #993c1d;
  --share-pill-background: #faece7;
  --share-pill-color: #712b13;
}

.share-card *,
.share-card *::before,
.share-card *::after {
  box-sizing: border-box;
}

.share-card-top,
.share-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(8px * var(--share-scale));
}

.share-card-top {
  margin-bottom: calc(18px * var(--share-scale));
}

.share-card-brand {
  color: #202723;
  font-size: calc(14px * var(--share-scale));
  font-weight: 800;
}

.share-card-brand::before {
  content: "⌖";
  margin-right: calc(5px * var(--share-scale));
  color: var(--share-accent);
}

.share-card-pill {
  max-width: 62%;
  overflow: hidden;
  padding: calc(3px * var(--share-scale)) calc(10px * var(--share-scale));
  border-radius: 999px;
  color: var(--share-pill-color);
  background: var(--share-pill-background);
  font-size: calc(11px * var(--share-scale));
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-card-eyebrow {
  margin: 0 0 calc(5px * var(--share-scale));
  color: #778078;
  font-size: calc(12px * var(--share-scale));
  letter-spacing: calc(0.5px * var(--share-scale));
}

.share-card-title {
  margin: 0 0 calc(7px * var(--share-scale));
  color: #172019;
  font-size: calc(24px * var(--share-scale));
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.3;
  white-space: pre-line;
  word-break: keep-all;
}

.share-card-hook {
  min-height: calc(44px * var(--share-scale));
  margin: 0 0 calc(12px * var(--share-scale));
  color: #536059;
  font-size: calc(14px * var(--share-scale));
  line-height: 1.6;
  white-space: pre-line;
  word-break: keep-all;
}

.share-card-comparison {
  display: flex;
  gap: calc(7px * var(--share-scale));
  align-items: center;
  margin-bottom: calc(14px * var(--share-scale));
  padding: calc(10px * var(--share-scale)) calc(12px * var(--share-scale));
  border-radius: calc(9px * var(--share-scale));
  color: #233027;
  background: #f5f3ec;
  font-size: calc(12px * var(--share-scale));
  line-height: 1.35;
}

.share-card-comparison-icon {
  flex: 0 0 auto;
  font-size: calc(13px * var(--share-scale));
}

.share-card-comparison-copy {
  min-width: 0;
  color: var(--share-accent);
  font-weight: 850;
}

.share-card[data-tone="low"] .share-card-comparison {
  background: #fff4ee;
}

.share-card-footer {
  margin-top: auto;
  padding-top: calc(13px * var(--share-scale));
  border-top: calc(0.5px * var(--share-scale)) solid #dddfda;
  color: #7d857f;
  font-size: calc(12px * var(--share-scale));
}

.share-card-location {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-card-score strong {
  color: #38473e;
}

.share-card-cta {
  display: block;
  margin-top: calc(12px * var(--share-scale));
  color: var(--share-accent);
  font-size: calc(12px * var(--share-scale));
  font-weight: 800;
  text-align: right;
}

@media (max-width: 420px) {
  .share-card-backdrop {
    padding: 12px;
  }

  .share-card-preview,
  .share-card-dialog-header,
  .share-card-actions,
  .share-card-status {
    padding-right: 12px;
    padding-left: 12px;
  }
}
