/* web/styles/desktop-auth.css */
body:has(.desktop-auth-main) {
  background: var(--pm-canvas);
  color: var(--pm-ink);
}
.desktop-auth-main {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(112px, 17vh, 164px) 24px 32px;
}
.desktop-auth-main:has(.desktop-auth[data-step=avatar]) {
  min-height: 100dvh;
  padding: 16px 24px;
  justify-content: center;
}
.page.desktop-auth {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 44px;
  background: var(--pm-surface);
  border: 0;
  border-radius: 20px;
  box-shadow: none;
}
.page.desktop-auth[data-step=username],
.page.desktop-auth[data-step=avatar] {
  border: 1px solid var(--pm-line);
  box-shadow: 0 16px 48px color-mix(in srgb, var(--pm-shadow) 27%, transparent);
}
.desktop-auth-heading {
  margin-bottom: 32px;
}
.desktop-auth h1 {
  color: var(--pm-ink);
  font: 400 clamp(34px, 3.5vw, 44px)/1.15 var(--pm-display, "ABC Stefan", sans-serif);
  letter-spacing: var(--pm-display-tracking);
  margin: 0 0 16px;
  text-wrap: balance;
}
.desktop-auth-mark {
  display: block;
  width: 72px;
  height: 72px;
  margin: -10px 0 22px -10px;
  object-fit: contain;
}
.desktop-auth-heading p {
  margin: 0;
  color: var(--pm-muted);
  font-size: 15px;
  line-height: 1.55;
}
.desktop-auth-form,
.desktop-auth-fields {
  display: grid;
  gap: 20px;
}
.desktop-auth .field {
  min-width: 0;
  gap: 9px;
}
.desktop-auth .field > .label {
  margin-left: 0;
}
.desktop-auth .label {
  color: var(--pm-ink);
  font: 500 12px/1.4 var(--pm-copy, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif);
  letter-spacing: 0;
}
.desktop-auth .input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--pm-line);
  border-radius: 12px;
  background: var(--pm-subtle);
  color: var(--pm-ink);
  font: 400 16px/1.4 var(--pm-copy, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif);
  box-shadow: none;
  transition: border-color .15s;
}
.desktop-auth .input:focus {
  border-color: var(--pm-red-text);
  outline: none;
  box-shadow: none;
  background: var(--pm-surface);
}
.desktop-auth .input::placeholder {
  color: var(--pm-muted);
}
.desktop-auth .input:disabled {
  opacity: .6;
}
.desktop-auth input[autocomplete=one-time-code] {
  text-align: center;
  font-size: 26px;
  letter-spacing: .28em;
  text-indent: .28em;
  font-variant-numeric: tabular-nums;
}
.desktop-auth-hint {
  margin: -8px 0 0;
  color: var(--pm-muted);
  font-size: 12px;
  line-height: 1.5;
}
.desktop-auth-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.desktop-auth-actions .btn {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  font: 600 14px/1.3 var(--pm-copy, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif);
}
.desktop-auth-actions .btn.primary {
  background: var(--pm-red);
  color: var(--pm-on-accent);
  border: 0;
}
.desktop-auth-actions .btn.primary:hover:not(:disabled) {
  background: var(--pm-red-hover);
}
.desktop-auth-actions .btn.primary:disabled {
  background: var(--pm-line);
  color: var(--pm-muted);
  opacity: 1;
  cursor: default;
}
.desktop-auth-form[aria-busy=true] .desktop-auth-actions .btn.primary:disabled {
  background: var(--pm-red);
  color: var(--pm-on-accent);
  opacity: .72;
  cursor: progress;
}
.desktop-auth-actions .btn.ghost {
  background: transparent;
  color: var(--pm-muted);
  font-weight: 400;
  border: 0;
  min-height: 44px;
}
.desktop-auth-actions .btn.ghost:hover {
  color: var(--pm-red-text);
  background: var(--pm-subtle);
}
.desktop-auth-drawing {
  position: relative;
  width: min(100%, 336px, max(96px, calc(100dvh - 400px)));
  margin-inline: auto;
  aspect-ratio: 1;
  border: 1px solid var(--pm-line);
  border-radius: 16px;
  background: var(--pm-subtle);
  overflow: hidden;
}
.desktop-auth-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.desktop-auth-undo {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--pm-line);
  border-radius: 50%;
  background: var(--pm-surface);
  color: var(--pm-ink);
  cursor: pointer;
}
.desktop-auth-undo svg {
  width: 20px;
  height: 20px;
}
.desktop-auth-undo:hover:not(:disabled) {
  border-color: var(--pm-red-text);
  color: var(--pm-red-text);
}
.desktop-auth-undo:disabled {
  opacity: .45;
  cursor: default;
}
.desktop-auth-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--pm-red) 6%, var(--pm-surface));
  color: var(--pm-red-text-hover);
  font-size: 13px;
  line-height: 1.5;
}
.desktop-auth #desktop-recaptcha {
  position: absolute;
}
.desktop-auth-status:empty,
.desktop-auth-hint:empty,
.desktop-auth-fields:empty,
.desktop-auth-actions [hidden],
#desktop-recaptcha:empty {
  display: none;
}
.desktop-auth .btn:focus-visible,
.desktop-auth-undo:focus-visible,
.desktop-auth-canvas:focus-visible {
  outline: 2px solid var(--pm-red-text);
  outline-offset: 4px;
}
@media (max-width: 540px) {
  .desktop-auth-main {
    padding: 96px 16px 24px;
  }
  .page.desktop-auth {
    padding: 30px 24px;
    border-radius: 16px;
  }
  .desktop-auth h1 {
    font-size: 36px;
  }
}
@media (max-height: 700px) {
  .desktop-auth-main:has(.desktop-auth[data-step=avatar]) {
    padding: 8px 16px;
  }
  .desktop-auth[data-step=avatar] {
    padding: 24px;
  }
  .desktop-auth[data-step=avatar] .desktop-auth-heading {
    margin-bottom: 16px;
  }
  .desktop-auth[data-step=avatar] h1 {
    font-size: 36px;
    margin-bottom: 8px;
  }
  .desktop-auth[data-step=avatar] .desktop-auth-form {
    gap: 12px;
  }
  .desktop-auth[data-step=avatar] .desktop-auth-actions {
    gap: 4px;
  }
  .desktop-auth[data-step=avatar] .desktop-auth-actions .btn {
    min-height: 44px;
  }
  .desktop-auth[data-step=avatar] .desktop-auth-drawing {
    width: min(100%, 300px, max(96px, calc(100dvh - 330px)));
  }
}
@media (max-width: 360px) and (max-height: 700px) {
  .desktop-auth[data-step=avatar] .desktop-auth-drawing {
    width: min(100%, 300px, max(96px, calc(100dvh - 360px)));
  }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-auth .input {
    transition: none;
  }
}
html.phone #app:has(> .desktop-auth-main) {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
html.phone #app > .desktop-auth-main {
  flex: none;
  min-height: 100svh;
  padding: 76px var(--pm-gutter) calc(32px + env(safe-area-inset-bottom));
}
html.phone #app > .desktop-auth-main:has(.desktop-auth[data-step=username]) {
  padding-top: 40px;
}
html.phone #app > .desktop-auth-main:has(.desktop-auth[data-step=avatar]) {
  min-height: 100dvh;
  padding: 24px var(--pm-gutter) calc(16px + env(safe-area-inset-bottom));
}
html.phone #app > .desktop-auth-main > .page.desktop-auth {
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
html.phone .desktop-auth h1 {
  font-size: 32px;
  margin-bottom: 10px;
}
html.phone .desktop-auth-heading {
  margin-bottom: 28px;
}
html.phone .desktop-auth-drawing {
  width: min(100%, max(96px, calc(100dvh - 400px)));
}
.modal:has(.hero-signup-auth),
html.phone .modal:has(.hero-signup-auth) {
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--pm-scrim);
  backdrop-filter: blur(8px);
}
.modal > .sheet:has(> .hero-signup-auth),
html.phone .modal > .sheet:has(> .hero-signup-auth) {
  display: block;
  width: min(480px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sheet .hero-signup-auth .desktop-auth-main {
  min-height: 0;
  padding: 0;
  background: transparent;
}
.sheet .hero-signup-auth .page.desktop-auth {
  width: 100%;
  margin: 0;
  padding: 28px 24px;
  border: 1px solid var(--pm-line);
  box-shadow: 0 16px 48px color-mix(in srgb, var(--pm-shadow) 27%, transparent);
}
html.invitation-open,
html.invitation-open body {
  overflow: hidden;
}
.modal:has(.invitation-card),
html.phone .modal:has(.invitation-card) {
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--pm-scrim) 70%, transparent);
  backdrop-filter: blur(5px);
}
.modal > .sheet:has(> .invitation-card),
html.phone .modal > .sheet:has(> .invitation-card) {
  display: block;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  outline: 0;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--pm-line);
  border-radius: 28px;
  background: var(--pm-raised);
  box-shadow: 0 24px 90px color-mix(in srgb, var(--pm-shadow) 45%, transparent);
}
.invitation-card {
  position: relative;
  padding: 32px 28px 24px;
  text-align: center;
}
.invitation-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--pm-muted);
  background: transparent;
}
.invitation-close:hover {
  background: var(--pm-subtle);
  color: var(--pm-ink);
}
.invitation-close .pm-glyph,
.invitation-close svg {
  width: 16px;
  height: 16px;
}
.invitation-card h1 {
  margin: 0 0 20px;
  padding: 0;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.12;
  text-wrap: balance;
}
.invitation-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--pm-red-mark);
}
.invitation-amount {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  color: var(--pm-red-text);
}
.invitation-amount > span:first-child {
  font: var(--pm-display-weight) clamp(56px, 9vw, 76px)/1 var(--pm-display);
  letter-spacing: var(--pm-display-tracking);
  overflow-wrap: anywhere;
}
.invitation-amount > span:last-child {
  color: var(--pm-muted);
  font-size: 14px;
}
.invitation-copy {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--pm-ink-2);
}
.invitation-detail {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--pm-muted);
}
.invitation-actions {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}
.invitation-actions > .btn {
  width: 100%;
  min-height: 48px;
}
.invitation-actions > .btn.ghost {
  min-height: 40px;
  color: var(--pm-muted);
}
.invitation-account {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 14px 0 0;
  color: var(--pm-muted);
  font-size: 13px;
}
.invitation-account .pm-glyph,
.invitation-account svg {
  width: 18px;
  height: 18px;
  margin-right: 4px;
}
.invitation-account strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--pm-ink);
}
.invitation-balance {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--pm-subtle);
  color: var(--pm-muted);
  font-size: 12px;
}
.invitation-balance strong {
  color: var(--pm-ink);
  font-size: 14px;
  white-space: nowrap;
}
.home-invitation-note {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(400px, 100%);
  margin: 24px auto 0;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--pm-on-media) 30%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--pm-media) 64%, transparent);
  text-align: left;
  color: var(--pm-on-media);
}
.home-hero .home-invitation-note:not([hidden]) + .home-button {
  margin-top: 20px;
}
.home-invitation-note[hidden] {
  display: none;
}
.home-invitation-note > .pm-glyph,
.home-invitation-note > svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--pm-lime);
}
.home-invitation-note > div {
  flex: 1;
  min-width: 0;
}
.home-invitation-note strong {
  font-size: 14px;
}
.home-page .home-invitation-note p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  opacity: .8;
}
.home-invitation-review {
  align-self: center;
  flex: none;
  padding: 4px 0 4px 6px;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 11px;
}
@media (max-height: 650px) {
  .invitation-card {
    padding: 24px 22px 18px;
  }
  .invitation-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
  }
  .invitation-mark .pm-glyph {
    --pm-glyph-w: 44px !important;
    --pm-glyph-h: 44px !important;
  }
  .invitation-card h1 {
    margin-bottom: 14px;
    font-size: 28px;
  }
  .invitation-amount {
    margin-bottom: 12px;
  }
  .invitation-amount > span:first-child {
    font-size: 56px;
  }
  .invitation-actions {
    margin-top: 14px;
  }
}
.desktop-auth-invitation {
  display: grid;
  gap: 8px;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: 14px;
  background: var(--pm-subtle);
  text-align: left;
}
.desktop-auth-invitation strong {
  font-size: 22px;
  line-height: 1.2;
  color: var(--pm-ink);
}
.desktop-auth-invitation p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--pm-ink-2);
}
.desktop-auth-invitation a {
  color: var(--pm-muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.desktop-auth-invitation .desktop-auth-invitation-label {
  font-size: 12px;
  color: var(--pm-muted);
}
.hero-signup-auth .desktop-auth-invitation {
  padding: 12px 14px;
  margin-bottom: 20px;
  gap: 4px;
}
.hero-signup-auth .desktop-auth-invitation strong {
  font-size: 20px;
}
.modal > .sheet:has(> .signin-choice) {
  width: min(400px, 100%);
}
.signin-choice {
  display: grid;
  gap: 12px;
  padding: 16px 8px 4px;
  text-align: center;
}
.signin-choice-title {
  margin: 0;
  color: var(--pm-ink);
  font: var(--pm-display-weight) 30px/1.1 var(--pm-display);
  letter-spacing: var(--pm-display-tracking);
}
.signin-choice-lede {
  max-width: 30ch;
  margin: 0 auto 10px;
  color: var(--pm-ink-2);
  font: 400 15px/1.45 var(--pm-copy);
}
.signin-choice-ways {
  display: grid;
  gap: 10px;
}
.signin-choice-google,
.signin-choice-phone {
  height: 46px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: 600 15px/1 var(--pm-copy);
  cursor: pointer;
  transition: background-color 160ms ease;
}
.signin-choice-first {
  background: var(--pm-red);
  color: var(--pm-on-accent);
}
.signin-choice-other {
  background: transparent;
  color: var(--pm-ink);
  box-shadow: inset 0 0 0 1px var(--pm-line-strong);
}
@media (hover: hover) {
  .signin-choice-first:hover {
    background: var(--pm-red-hover);
  }
  .signin-choice-other:hover {
    background: var(--pm-subtle);
  }
}
.signin-choice :is(.signin-choice-google, .signin-choice-phone):focus-visible {
  outline: 2px solid var(--pm-focus);
  outline-offset: 3px;
}
.signin-choice-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--pm-muted);
  font: 400 13px/1.4 var(--pm-copy);
}
.signin-choice-status[data-tone=alert] {
  color: var(--pm-red-text);
}
@media (prefers-reduced-motion: reduce) {
  .signin-choice-google,
  .signin-choice-phone {
    transition: none;
  }
}
