:root {
  --canvas: #f5f5f3;
  --surface: #ffffff;
  --ink: #20201e;
  --muted: #6f706b;
  --soft: #8c8d87;
  --line: #dedfd9;
  --focus: #315f50;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .2em; }
img { display: block; }
h1, h2, p, ul { margin-top: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.app-icon { width: 72px; height: 72px; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 32px rgba(32, 32, 30, .1); }
.app-icon-small { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 5px 18px rgba(32, 32, 30, .09); }

.placeholder-page { display: grid; min-height: 100svh; padding: 32px; }
.placeholder { display: grid; justify-items: center; align-content: center; width: min(560px, 100%); margin: auto; text-align: center; }
.placeholder .app-icon { margin-bottom: 24px; }
.wordmark { margin-bottom: 15px; color: var(--muted); font-size: 14px; font-weight: 650; letter-spacing: .01em; }
.placeholder h1 { margin-bottom: 0; font-size: clamp(42px, 8vw, 72px); font-weight: 560; line-height: 1; letter-spacing: -.055em; }

.document-page { min-height: 100svh; background: var(--surface); }
.document-header { border-bottom: 1px solid var(--line); }
.document-header-inner, .document, .document-footer-inner { width: min(760px, calc(100% - 48px)); margin-inline: auto; }
.document-header-inner { display: flex; align-items: center; min-height: 88px; }
.brand-link { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 16px; font-weight: 680; letter-spacing: -.02em; text-decoration: none; }
.document { padding-block: 72px 96px; }
.document-heading { padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.document-heading h1 { margin-bottom: 18px; font-size: clamp(42px, 8vw, 68px); font-weight: 580; line-height: 1.02; letter-spacing: -.055em; }
.document-heading p { margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.document section { padding-top: 42px; }
.document h2 { margin-bottom: 15px; font-size: 22px; font-weight: 650; letter-spacing: -.025em; }
.document p, .document li { color: #43443f; font-size: 16px; line-height: 1.72; }
.document p { margin-bottom: 16px; }
.document ul { margin-bottom: 16px; padding-left: 22px; }
.document li + li { margin-top: 9px; }
.document a { color: #245947; }
.contact-card { margin-top: 44px; padding: 24px; background: var(--canvas); border: 1px solid var(--line); border-radius: 14px; }
.contact-card h2 { margin-bottom: 10px; }
.contact-card p:last-child { margin-bottom: 0; }
.document-footer { border-top: 1px solid var(--line); background: var(--canvas); }
.document-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 96px; color: var(--muted); font-size: 13px; }
.document-footer p { margin-bottom: 0; }

.error-page { display: grid; min-height: 100svh; padding: 32px; }
.error-card { display: grid; justify-items: start; align-content: center; width: min(620px, 100%); margin: auto; }
.error-card .brand-link { margin-bottom: 76px; }
.page-code { margin-bottom: 14px; color: var(--soft); font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.error-card h1 { margin-bottom: 30px; font-size: clamp(44px, 9vw, 72px); font-weight: 560; line-height: 1; letter-spacing: -.055em; }
.text-link { color: #245947; font-size: 15px; font-weight: 650; }

.invite-page { min-height: 100svh; background: #fbf8f7; }
.invite-main { display: grid; min-height: 100svh; padding: 40px 24px; }
.invite-card { align-self: center; width: min(580px, 100%); margin-inline: auto; overflow: hidden; border: 1px solid #e6dfdf; border-radius: 28px; background: var(--surface); box-shadow: 0 28px 80px rgba(62, 27, 43, .11), 0 3px 12px rgba(62, 27, 43, .05); }
.invite-card-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px 12px; }
.invite-card .brand-link { font-size: 20px; font-weight: 750; letter-spacing: -.035em; }
.invite-card .app-icon-small { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 5px 18px rgba(54, 17, 39, .13); }
.invite-about-link { padding: 9px 13px; border: 1px solid #ead4db; border-radius: 999px; color: #9f284d; font-size: 13px; font-weight: 650; text-decoration: none; transition: border-color .18s ease, background-color .18s ease; }
.invite-about-link:hover { border-color: #c96a87; background: #fff7f9; }
.invite-hero { width: 100%; height: 240px; margin-block: -4px 2px; object-fit: cover; object-position: center; }
.invite-content { padding: 0 32px 32px; }
.invite-card h1 { max-width: 500px; margin-bottom: 14px; font-size: clamp(34px, 6vw, 42px); font-weight: 720; line-height: 1.03; letter-spacing: -.048em; }
.invite-intro { max-width: 500px; margin-bottom: 26px; color: #77716f; font-size: 16px; line-height: 1.5; }
.invite-code { margin-bottom: 26px; }
.invite-code > span { display: block; margin: 0 0 9px 2px; color: #a82f55; font-size: 11px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.invite-code-row { display: flex; align-items: stretch; min-height: 72px; overflow: hidden; border: 1.5px solid #d76487; border-radius: 15px; background: #fffafb; }
.invite-code-row strong { display: flex; flex: 1; align-items: center; min-width: 0; padding: 0 20px; color: #351228; font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace; font-size: clamp(21px, 5vw, 29px); font-weight: 750; letter-spacing: .13em; }
.copy-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; padding-inline: 16px; border: 0; border-left: 1px solid #ecc3d0; color: #a82550; background: transparent; font: inherit; font-size: 14px; font-weight: 720; cursor: pointer; transition: background-color .18s ease; }
.copy-button:hover { background: #fff0f4; }
.copy-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.copy-status { min-height: 0; margin: 8px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.copy-status:empty { margin: 0; }
.invite-steps { margin-bottom: 24px; }
.invite-steps h2 { margin: 0 0 12px; font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.invite-steps ol { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.invite-steps li { display: flex; align-items: center; gap: 12px; color: #383432; font-size: 15px; line-height: 1.35; }
.invite-steps li span { display: grid; flex: 0 0 26px; height: 26px; place-items: center; border-radius: 50%; color: #fff; background: #351228; font-size: 12px; font-weight: 750; }
.app-store-button { display: grid; place-items: center; width: 100%; min-height: 58px; padding: 13px 18px; border-radius: 15px; color: #fff; background: #351228; box-shadow: 0 10px 24px rgba(53, 18, 40, .18); font-size: 16px; font-weight: 720; line-height: 1.25; text-align: center; text-decoration: none; transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.app-store-button:hover { background: #4b1838; box-shadow: 0 12px 28px rgba(53, 18, 40, .23); transform: translateY(-1px); }
.invite-problem { margin: 18px 0 0; padding: 14px 16px; border: 1px solid #efc9c9; border-radius: 12px; color: #7b3434; background: #fff7f7; font-size: 14px; line-height: 1.5; }

@media (max-width: 560px) {
  .placeholder-page, .error-page { padding: 24px; }
  .document-header-inner, .document, .document-footer-inner { width: min(100% - 36px, 760px); }
  .document-header-inner { min-height: 76px; }
  .document { padding-block: 54px 72px; }
  .document-heading { padding-bottom: 38px; }
  .document section { padding-top: 34px; }
  .document-footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; min-height: 112px; }
  .invite-main { padding: 16px 12px; }
  .invite-card { border-radius: 22px; }
  .invite-card-header { padding: 18px 18px 6px; }
  .invite-card .brand-link { gap: 9px; font-size: 17px; }
  .invite-card .app-icon-small { width: 36px; height: 36px; border-radius: 10px; }
  .invite-about-link { padding: 8px 10px; font-size: 11px; }
  .invite-hero { height: 180px; margin-block: -8px -2px; }
  .invite-content { padding: 0 20px 22px; }
  .invite-card h1 { margin-bottom: 12px; font-size: clamp(31px, 10vw, 38px); }
  .invite-intro { margin-bottom: 22px; font-size: 15px; }
  .invite-code { margin-bottom: 22px; }
  .invite-code-row { min-height: 64px; }
  .invite-code-row strong { padding-inline: 14px; font-size: clamp(18px, 6vw, 24px); letter-spacing: .09em; }
  .copy-button { min-width: 62px; padding-inline: 13px; }
  .copy-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .invite-steps { margin-bottom: 20px; }
  .invite-steps li { font-size: 14px; }
  .app-store-button { min-height: 54px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .invite-about-link, .app-store-button { transition: none; }
}
