:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f4ef;
  color: #1e211d;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

.share-page { width: min(720px, 100%); margin: 0 auto; padding: 28px 16px 48px; }

.share-header { margin-bottom: 20px; }
.share-header p { margin: 6px 0 0; color: #6f746b; }

.brand { color: #162f1e; font-size: 24px; font-weight: 800; text-decoration: none; }

.share-card {
  padding: clamp(18px, 4vw, 32px);
  background: #fff;
  border: 1px solid #e6e3dc;
  border-radius: 24px;
  box-shadow: 0 16px 45px rgb(52 59 47 / 8%);
}

.status { margin: 0; color: #5f675e; }
.status.error { color: #a1302b; }

.images { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 22px; }
.images img { display: block; width: 100%; max-height: 620px; border-radius: 16px; object-fit: cover; background: #e8e8e4; }

h1 { margin: 0 0 18px; font-size: clamp(22px, 4vw, 31px); line-height: 1.15; }
.caption-label { display: block; margin-bottom: 8px; color: #586056; font-size: 14px; font-weight: 650; }

textarea {
  display: block;
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #d6d8d1;
  border-radius: 14px;
  background: #fbfbf9;
  color: inherit;
  font: inherit;
  line-height: 1.45;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
button, .download-link { border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
button { min-height: 46px; padding: 11px 16px; border: 1px solid transparent; }
.primary { background: #216a3a; color: #fff; }
.secondary { border-color: #bac3b7; background: transparent; color: #23482e; }
button:disabled { cursor: not-allowed; opacity: .56; }

.downloads { margin-top: 20px; padding: 14px; border-radius: 14px; background: #f2f6f0; color: #485444; }
.downloads p { margin: 0 0 10px; }
.download-links { display: flex; flex-wrap: wrap; gap: 8px; }
.download-link { display: inline-block; padding: 9px 12px; background: #fff; color: #23482e; text-decoration: none; }
.notice { margin: 20px 0 0; color: #6b7068; font-size: 13px; line-height: 1.45; }
.notice a { color: inherit; }

.payment-plans { display: grid; gap: 10px; margin: 18px 0; }
.payment-plan { display: flex; justify-content: space-between; gap: 14px; width: 100%; min-height: 58px; padding: 13px 14px; border: 1px solid #d6d8d1; background: #fbfbf9; color: inherit; text-align: left; }
.payment-plan span { color: #626b60; font-size: 14px; font-weight: 500; text-align: right; }
.payment-plan.selected { border-color: #216a3a; box-shadow: 0 0 0 2px rgb(33 106 58 / 14%); }
.payment-details { margin-top: 22px; padding-top: 20px; border-top: 1px solid #e2e5df; }
.payment-details h2 { margin: 0 0 8px; font-size: 20px; }
.payment-qr { display: block; width: min(280px, 100%); margin: 16px 0; border-radius: 14px; background: #fff; }
.payment-link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 16px; color: #fff; text-decoration: none; }

@media (prefers-color-scheme: dark) {
  :root { background: #171a17; color: #eef2eb; }
  .brand { color: #d9f5dc; }
  .share-header p, .caption-label, .notice { color: #afb9ad; }
  .share-card { background: #242824; border-color: #3a4039; box-shadow: none; }
  textarea { background: #1d211d; border-color: #444d43; }
  .secondary { border-color: #80967f; color: #c9e9cd; }
  .downloads { background: #2d382d; color: #d7e6d6; }
  .download-link { background: #1d251d; color: #d1f0d4; }
  .payment-plan { background: #1d211d; border-color: #444d43; }
  .payment-plan span { color: #b3bdb1; }
  .payment-details { border-color: #414a40; }
}
