/* Share-only additions. Gift artwork, puzzle controls and reveal motion are unchanged. */
body[data-step="share"] .qr-share {
  display: block;
  padding-top: 24px;
}

.qr-share .qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.qr-panel #gift-qr {
  display: block;
  width: var(--qr-preview-size, 196px);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color-scheme: only light;
  object-fit: contain;
  image-rendering: pixelated;
}

.qr-panel #save-qr {
  margin-top: 18px;
  min-width: 172px;
  max-width: 100%;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 14px;
  background: #fffcf7;
  border: 1px solid #dfd3c6;
  color: #665348;
  font-size: 15px;
  line-height: 1.6;
}

.qr-panel #save-qr:hover {
  border-color: #b9705c;
  background: #f9eee6;
}

.qr-panel .qr-expiry {
  margin: 10px 0 0;
  color: #796e66;
  font-size: 12px;
  line-height: 1.7;
}

.qr-panel .qr-download-status {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #985440;
}

.qr-panel .qr-download-status:empty {
  display: none;
}

body[data-step="share"] .qr-share .share-tools {
  padding-top: 26px;
}

body[data-step="share"] .qr-share .share-copy-main {
  margin-top: 22px;
}

.qr-share .creator-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 24px;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #e0d5c9;
}

.qr-share .creator-tools .text-button {
  min-height: 42px;
  margin: 0 !important;
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.7;
}

/* Each label owns its wrapping text; the checkbox is centred on its first line. */
#consent .consent-choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 20px 0 18px;
}

#consent label.consent-choice {
  display: grid;
  grid-template-columns: 1.25em minmax(0, 1fr);
  column-gap: 11px;
  align-items: start;
  width: 100%;
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  text-align: left;
  color: #493c35;
  cursor: pointer;
}

#consent .consent-choice input[type="checkbox"] {
  display: block;
  width: 1.25em;
  height: 1.25em;
  margin: .2em 0 0;
  padding: 0;
  font: inherit;
  accent-color: #a45943;
  cursor: pointer;
}

#consent .consent-choice > span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

#consent,
#creator-dialog {
  width: min(460px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(var(--viewport-height, 100vh) - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#creator-dialog label {
  display: block;
}

#creator-dialog input[readonly] {
  width: 100%;
  min-width: 0;
  font-size: 14px;
}

@media (max-width: 720px) {
  body[data-step="share"] .qr-share {
    padding-top: 20px;
  }

  .qr-panel #gift-qr {
    width: var(--qr-preview-size, 180px);
  }

  .qr-panel #save-qr {
    margin-top: 16px;
    min-height: 46px;
    border-radius: 12px;
  }

  body[data-step="share"] .qr-share .share-tools {
    padding-top: 22px;
  }

  body[data-step="share"] .qr-share .share-copy-main {
    margin-top: 18px;
  }

  .qr-share .creator-tools {
    gap: 4px 20px;
    margin-top: 20px;
  }

  #consent,
  #creator-dialog {
    padding: 24px;
  }

  #creator-dialog input[readonly] {
    font-size: 16px;
  }
}
