/* ═══════════════════════════════════════════════════════════
   WaldorfMinds — invite, post and auth pages (/i/…, /p/…, /a/…)
   ═══════════════════════════════════════════════════════════ */
.app-link { padding-bottom: clamp(48px, 9vh, 96px); }
.app-link .page-hero__title { font-size: clamp(34px, 6vw, 60px); }

/* who invited them */
.app-link__avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  overflow: hidden;
  border-radius: var(--blob-a);
  border: 4px solid #fff;
  background: var(--gold-soft);
  box-shadow: 0 10px 26px rgba(94, 62, 0, 0.2);
  font-size: 40px;
  font-weight: 800;
  color: var(--amber);
}
.app-link__avatar img { width: 100%; height: 100%; object-fit: cover; }

.app-link__logo {
  width: 88px;
  height: auto;
  margin: 0 auto 18px;
  padding: 10px;
  border-radius: var(--blob-b);
  background: #FFFBEF;
  box-shadow: 0 10px 26px rgba(94, 62, 0, 0.16);
}

/* the code, big and easy to read out */
.invite-code {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 28px;
  padding: 16px 30px 18px;
  border-radius: var(--card);
  border: 2px dashed color-mix(in srgb, var(--amber) 55%, transparent);
  background: rgba(255, 255, 255, 0.72);
}
.invite-code__label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.invite-code__value {
  font-size: clamp(32px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  user-select: all;
  -webkit-user-select: all;
}

/* store buttons */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}
.store-btn { min-width: 0; white-space: normal; text-align: center; }
.store-status {
  max-width: 46ch;
  margin: 18px auto 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 14%, #fff);
  color: var(--ink);
  font-weight: 600;
}
.store-status.is-failed { border-radius: 18px; background: color-mix(in srgb, var(--amber) 14%, #fff); }
.store-status__link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--ink-faint);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}
.store-hint {
  max-width: 46ch;
  margin: 14px auto 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* ─── auth email links (/a/…) ─── */
/* the seal, with a small badge saying what this page does */
.auth-mark {
  position: relative;
  width: 104px;
  margin: 0 auto 18px;
}
.auth-mark img {
  display: block;
  width: 88px;
  height: auto;
  margin: 0 auto;
  padding: 10px;
  border-radius: var(--blob-b);
  background: var(--cream);
  box-shadow: 0 10px 26px rgba(94, 62, 0, 0.16);
}
.auth-mark::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: var(--blob-a);
  background: var(--c);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}
.auth-mark--confirm { --c: var(--green); }
.auth-mark--confirm::after { content: "✉"; }
.auth-mark--reset { --c: var(--violet); }
.auth-mark--reset::after { content: "✱"; }
.auth-mark--email { --c: var(--blue); }
.auth-mark--email::after { content: "@"; }
.auth-mark--done { --c: var(--green); }
.auth-mark--done::after { content: "✓"; }
.auth-mark--expired { --c: var(--amber); }
.auth-mark--expired::after { content: "⌛"; font-size: 15px; }

.auth-note {
  max-width: 46ch;
  margin: 18px auto 0;
  padding: 12px 20px;
  border-radius: var(--card);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}
.auth-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
}
.auth-actions > .store-hint { margin-bottom: 8px; }
.auth-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: min(100%, 380px);
  margin-top: 14px;
  text-align: left;
}
.auth-form .btn { align-self: center; margin-top: 6px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.auth-field input {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
.auth-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 35%, transparent); }
.auth-show { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.auth-error {
  padding: 10px 16px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--red) 12%, #fff);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}
.auth-get-app { font-size: 14.5px; color: var(--ink-soft); }
.auth-get-app + .store-buttons { margin-top: 12px; }

@media (prefers-color-scheme: dark) {
  .app-link__avatar { border-color: var(--surface); background: var(--surface); }
  .invite-code { background: rgba(38, 32, 19, 0.7); }
  .store-status { background: color-mix(in srgb, var(--green) 22%, var(--surface)); }
  .store-status.is-failed { background: color-mix(in srgb, var(--amber) 22%, var(--surface)); }
  .auth-mark img { background: var(--surface); }
  .auth-mark::after { border-color: var(--surface); }
  .auth-note { background: rgba(38, 32, 19, 0.7); }
  .auth-field input { border-color: rgba(255, 251, 239, 0.18); background: var(--surface); color: inherit; }
  .auth-error { background: color-mix(in srgb, var(--red) 22%, var(--surface)); color: inherit; }
}
