:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #0b0b0c;
  --surface-raised: #101011;
  --text: #f5f5f2;
  --muted: #8b8b87;
  --faint: #555552;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #d7ff64;
  --danger: #ff7b72;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body.thanks-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(255, 255, 255, 0.09), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

.thanks-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.thanks-header,
.thanks-footer,
.thanks-gate,
.letter-shell {
  position: relative;
  z-index: 1;
}

.thanks-header {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 96px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.thanks-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.thanks-brand__mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.thanks-status {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.thanks-status i,
.thanks-footer i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(215, 255, 100, 0.45);
}

.thanks-gate {
  display: grid;
  width: min(1060px, calc(100% - 48px));
  min-height: calc(100vh - 196px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 8vw;
  align-items: center;
  padding: 72px 0;
}

.thanks-intro {
  max-width: 700px;
}

.thanks-kicker {
  margin: 0 0 24px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.thanks-intro h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.thanks-intro h1 em {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.thanks-description {
  max-width: 520px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.thanks-description p {
  margin: 0;
}


.thanks-reply {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 2.15;
}

.thanks-reply__channel {
  display: inline-flex;
  margin: 0 2px;
  padding: 2px 7px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(14, 14, 15, 0.88);
  color: var(--text);
  font-weight: 650;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
}


.thanks-reply__channel img {
  display: block;
  width: 18px;
  height: 18px;
}

.thanks-reply__channel--instagram {
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.thanks-reply__channel--instagram:hover {
  border-color: #e4405f;
  color: #ff6b9a;
}

.thanks-reply__channel--instagram:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.thanks-form {
  max-width: 650px;
  margin-top: 46px;
}

.thanks-field + .thanks-field {
  margin-top: 16px;
}

.thanks-field > label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.thanks-input-row {
  display: grid;
  min-height: 66px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(14, 14, 15, 0.88);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.thanks-input-row:focus-within {
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.thanks-input-icon {
  padding-left: 20px;
  color: var(--faint);
  font-size: 1.5rem;
}

.thanks-input-icon--lock {
  font-size: 1rem;
}

.thanks-input-row input {
  width: 100%;
  min-width: 0;
  height: 64px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 1rem/1 var(--sans);
  box-shadow: none;
}

.thanks-input-row input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.thanks-submit {
  display: inline-flex;
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  padding: 0 22px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--text);
  border-radius: 8px;
  background: var(--text);
  color: #090909;
  font: 700 0.82rem/1 var(--sans);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.thanks-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.thanks-submit:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.thanks-submit:focus-visible,
.thanks-brand:focus-visible,
.letter-nav button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.thanks-help,
.thanks-result {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.thanks-result {
  color: var(--accent);
}

.thanks-result.is-error,
.thanks-noscript {
  color: var(--danger);
}

.thanks-noscript {
  font-size: 0.85rem;
}

.thanks-seal {
  display: block;
  width: min(400px, 34vw);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.thanks-seal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thanks-footer {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 100px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.thanks-footer i {
  margin: 0 5px;
}


.thanks-notice-actions {
  margin: 18px 0 0;
}

.thanks-notice-actions a {
  display: inline-flex;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  text-decoration: none;
}

.thanks-notice-actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Letter */
.letter-shell {
  width: min(880px, calc(100% - 48px));
  margin: 0 auto;
  padding: 62px 0 90px;
}

.letter-nav {
  display: flex;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.letter-nav button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  cursor: pointer;
}

.letter-nav button:hover {
  color: var(--text);
}

.letter-card {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 7vw, 76px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 38%),
    var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.letter-card::before {
  position: absolute;
  top: 0;
  left: clamp(32px, 7vw, 76px);
  width: 64px;
  height: 2px;
  background: var(--accent);
  content: "";
}

.letter-card__header {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.letter-to {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

#letter-view .letter-to {
  font-size: 0.82rem;
}

.letter-card h1 {
  max-width: 650px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.letter-sample {
  display: inline-block;
  margin-top: 22px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.letter-content {
  padding: 40px 0 24px;
  color: #d0d0cb;
  font-size: clamp(1rem, 2vw, 1.08rem);
  line-height: 2;
  word-break: keep-all;
}

#letter-view .letter-content {
  font-size: clamp(1.08rem, calc(2vw + 1pt), 1.16rem);
}

.letter-content p {
  margin: 0 0 1.55em;
}

.letter-content h2,
.letter-content h3 {
  margin: 2em 0 0.65em;
  color: var(--text);
  letter-spacing: -0.025em;
}

.letter-content a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.letter-content ul,
.letter-content ol {
  margin: 0 0 1.55em;
  padding-left: 1.5em;
}

.letter-content code {
  padding: 0.15em 0.35em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-raised);
  font-family: var(--mono);
  font-size: 0.86em;
}

.letter-content hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.letter-content blockquote {
  margin: 2.2em 0;
  padding: 6px 0 6px 24px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18em;
  font-style: italic;
}

.letter-content blockquote p {
  margin: 0;
}

.letter-signature {
  display: flex;
  padding-top: 32px;
  flex-direction: column;
  align-items: flex-end;
  border-top: 1px solid var(--line);
}

.letter-signature span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.letter-signature strong {
  margin-top: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 400;
}

.letter-postscript {
  margin: 20px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-align: center;
}

@media (max-width: 760px) {
  .thanks-header {
    min-height: 78px;
  }

  .thanks-gate {
    min-height: calc(100vh - 168px);
    grid-template-columns: 1fr;
    padding: 54px 0 64px;
  }

  .thanks-seal {
    display: none;
  }


  .thanks-intro h1 {
    font-size: clamp(2.8rem, 14vw, 4.8rem);
  }

  .thanks-footer {
    min-height: 90px;
  }

  .thanks-footer span:first-child {
    display: none;
  }

  .thanks-footer {
    justify-content: flex-end;
  }

  .letter-shell {
    padding-top: 38px;
  }

  .letter-nav > span {
    display: none;
  }
}

@media (max-width: 440px) {
  .thanks-header,
  .thanks-footer,
  .thanks-gate,
  .letter-shell {
    width: calc(100% - 32px);
  }

  .thanks-status {
    font-size: 0;
  }

  .thanks-status i {
    margin-right: 0;
  }

  .letter-card {
    padding: 30px 24px;
  }

  .letter-card::before {
    left: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
