body:has(.mirt-welcome) { background: #f6fbff; }
.mirt-welcome { --welcome-ink:#0c2852; --welcome-muted:#567198; --welcome-surface:rgba(255,255,255,.9); --welcome-border:#d9e7f5; position:relative; isolation:isolate; display:grid; grid-template-columns:minmax(320px,390px) minmax(0,710px); grid-template-rows:1fr auto auto 1fr; column-gap:54px; max-width:1280px; min-height:calc(100svh - 38px); margin:auto; padding:64px 44px; color:var(--welcome-ink); }
.mirt-welcome::before { content:''; position:fixed; inset:0; z-index:-1; pointer-events:none; background:radial-gradient(ellipse at 68% 55%,#d9edff 0,transparent 52%),radial-gradient(ellipse at 3% 100%,#e4f4ff,transparent 45%); }
.mirt-welcome .welcome-identity { grid-column:1; grid-row:2; margin:0 0 36px 14px; }
.mirt-welcome .welcome-identity a { display:inline-flex; position:relative; color:var(--welcome-ink); font-size:clamp(64px,7vw,96px); font-weight:900; line-height:1; letter-spacing:-.055em; text-decoration:none; }
.mirt-welcome .welcome-identity a span { width:13px; height:13px; border-radius:50%; background:#11bce2; margin:3px 0 0 6px; }
.mirt-welcome .welcome-identity h1 { font-size:clamp(19px,2vw,26px); font-weight:500; color:var(--welcome-muted); margin:13px 0 0; letter-spacing:-.025em; white-space:nowrap; }
.mirt-welcome .welcome-auth { grid-column:1; grid-row:3; padding:24px 28px; background:var(--welcome-surface); border:1px solid var(--welcome-border); border-radius:22px; box-shadow:0 16px 55px #427db00b; min-width:0; }
.mirt-welcome .auth-tabs { margin:0; }
.mirt-welcome .auth-tab-buttons { border:0; border-radius:0; background:transparent; padding:0; gap:0; border-bottom:2px solid var(--welcome-border); margin:0 0 26px; }
.mirt-welcome .auth-tab-buttons button { border-radius:0; background:transparent; color:var(--welcome-muted); box-shadow:none; position:relative; font-size:16px; font-weight:600; padding:10px 4px 15px; }
.mirt-welcome .auth-tab-buttons button.active { color:#0783ff; }
.mirt-welcome .auth-tab-buttons button.active::after { content:''; position:absolute; height:3px; border-radius:3px; background:#0783ff; bottom:-2px; left:0; right:0; }
.mirt-welcome .stack-form { gap:10px; }
.mirt-welcome .stack-form label { font-size:14px; font-weight:500; color:var(--welcome-muted); }
.mirt-welcome .stack-form input:not([type=hidden]) { min-height:50px; font-size:16px; background:transparent; color:var(--welcome-ink); border:1px solid var(--welcome-border); border-radius:11px; }
.mirt-welcome .stack-form .button-primary { min-height:50px; margin-top:12px; background:#0783ff; border:0; border-radius:11px; color:white; font-size:17px; font-weight:600; }
.mirt-welcome .auth-recovery-link { display:block; text-align:center; margin:21px 0 0; color:#0783ff; font-size:14px; }
.mirt-welcome .welcome-showcase { grid-column:2; grid-row:1/-1; align-self:center; position:relative; width:100%; aspect-ratio:1/1; }
.welcome-showcase .welcome-shot { position:absolute; overflow:hidden; border:3px solid white; border-radius:18px; background:white; box-shadow:0 20px 35px #23527c24; }
.welcome-shot img,.welcome-shot svg { display:block; width:100%; height:auto; }
.welcome-showcase .welcome-shot-chat { width:39%; left:3%; top:20%; transform:rotate(-11deg); z-index:1; }
.welcome-showcase .welcome-shot-music { width:39%; right:5%; top:7%; transform:rotate(9deg); z-index:2; }
.welcome-showcase .welcome-shot-story { width:43%; left:29%; top:10%; transform:rotate(3deg); z-index:3; }
.welcome-showcase .welcome-shot-post { width:47%; right:0; bottom:0; transform:rotate(11deg); z-index:4; }
.welcome-showcase .welcome-emoji { position:absolute; z-index:5; display:grid; place-items:center; width:58px; height:58px; border-radius:50%; background:#fff7d8; font-size:36px; box-shadow:0 8px 22px #33577a1c; }
.welcome-emoji-cool { left:12%; top:8%; transform:rotate(-12deg); }
.welcome-emoji-laugh { right:0; top:6%; transform:rotate(12deg); }
.welcome-emoji-wow { right:-4%; bottom:1%; transform:rotate(10deg); }
.mirt-welcome .welcome-theme { position:absolute; right:34px; top:18px; display:flex; gap:4px; }
.welcome-theme button { width:34px; height:34px; border:1px solid var(--welcome-border); border-radius:10px; background:var(--welcome-surface); color:var(--welcome-muted); font-size:21px; cursor:pointer; }
.welcome-theme button[aria-pressed=true] { color:#0783ff; border-color:#0783ff; }
body:has(.mirt-welcome) .site-footer { background:transparent; border:0; padding:8px; min-height:0; }
html[data-theme=dark] body:has(.mirt-welcome) { background:#061222; }
html[data-theme=dark] .mirt-welcome { --welcome-ink:#fff; --welcome-muted:#b6cae5; --welcome-surface:#0b1c30e6; --welcome-border:#274461; }
html[data-theme=dark] .mirt-welcome::before { background:radial-gradient(ellipse at 70% 45%,#112f53 0,transparent 58%); }
html[data-theme=dark] .welcome-showcase .welcome-shot { border-color:#294560; box-shadow:0 22px 40px #0006; }
html[data-theme=dark] .welcome-showcase .welcome-emoji { background:#14304c; border:1px solid #315778; }
html[data-theme=dark] .welcome-identity a span { display:none; }
@media(max-width:800px) {
 .mirt-welcome { display:flex; flex-direction:column; min-height:calc(100svh - 32px); max-width:480px; padding:62px 22px 12px; gap:0; }
 .mirt-welcome .welcome-theme { top:12px; right:22px; }
 .mirt-welcome .welcome-identity { text-align:center; margin:0 0 12px; }
 .mirt-welcome .welcome-identity a { font-size:56px; }
 .mirt-welcome .welcome-identity h1 { font-size:18px; margin-top:8px; }
 .mirt-welcome .welcome-showcase { width:90%; flex:none; margin:0 auto; }
 .welcome-showcase .welcome-shot { border-width:2px; border-radius:12px; }
 .welcome-showcase .welcome-emoji { width:35px; height:35px; font-size:23px; }
 .mirt-welcome .welcome-auth { position:relative; z-index:6; width:100%; padding:18px 22px; margin-top:-4px; border-radius:20px; }
 .mirt-welcome .auth-tab-buttons { margin-bottom:18px; }
 .mirt-welcome .auth-tab-buttons button { font-size:14px; padding:6px 4px 12px; }
 .mirt-welcome .stack-form input:not([type=hidden]),.mirt-welcome .stack-form .button-primary { min-height:46px; }
 .mirt-welcome .auth-recovery-link { margin-top:16px; font-size:13px; }
}
@media(prefers-reduced-motion:no-preference) { .welcome-theme button { transition:background .2s,border-color .2s; } }
/* Keep the public layout full width inside the shared flex page shell. */
.mirt-welcome { width:100%; }
.mirt-welcome .auth-tab-buttons button.active { background:transparent; box-shadow:none; }
.welcome-showcase .welcome-shot-story { left:26%; width:41%; }
.welcome-showcase .welcome-shot-music { right:0; width:42%; }

/* Email onboarding uses the same compact field rhythm as phone login. */
.mirt-welcome .email-auth h2 { font-size:22px; margin:0 0 10px; }
.mirt-welcome .email-auth .auth-tab-buttons { margin-bottom:18px; }
.mirt-welcome .email-auth .field-wrap { display:grid; gap:6px; }
.mirt-welcome .email-auth .errorlist { margin:0; padding-left:18px; color:var(--danger, #b42318); }
.mirt-welcome .email-auth .stack-form small { color:var(--welcome-muted); font-size:12px; }

@media (min-width:801px) and (max-height:850px) {
  .mirt-welcome:has(.email-auth) { padding-top:24px; padding-bottom:24px; }
  .mirt-welcome:has(.email-auth) .welcome-identity { margin-bottom:20px; }
  .mirt-welcome:has(.email-auth) .welcome-identity a { font-size:64px; }
  .mirt-welcome .welcome-auth .email-auth h2 { font-size:21px; margin:0 0 8px; }
  .mirt-welcome .welcome-auth .email-auth > p { margin:0 0 12px; font-size:13px; }
  .mirt-welcome .welcome-auth .email-auth .stack-form { gap:8px; }
  .mirt-welcome .welcome-auth .email-auth .stack-form input { min-height:44px; }
}

.mirt-welcome .email-verification__help {
  display:grid;
  gap:12px;
  margin-top:18px;
}
.mirt-welcome .email-verification__help form,
.mirt-welcome .email-verification__help p { margin:0; }
.mirt-welcome .email-verification__help p {
  color:var(--welcome-muted);
  font-size:13px;
  line-height:1.5;
}
.mirt-welcome .email-verification__resend {
  width:100%;
  min-height:46px;
  padding:12px 16px;
  border:1px solid var(--welcome-border);
  border-radius:11px;
  background:transparent;
  color:var(--welcome-ink);
  box-shadow:none;
  font-size:14px;
  font-weight:600;
}
.mirt-welcome .email-verification__resend:hover {
  background:var(--welcome-surface);
  border-color:var(--welcome-muted);
}
.mirt-welcome .email-verification__local {
  margin-top:20px;
  padding-top:16px;
  border-top:1px solid var(--welcome-border);
  font-size:13px;
  line-height:1.5;
}
.mirt-welcome .email-verification__local summary { cursor:pointer; }
