/* Michroma: SIL Open Font License 1.1, see /auth/fonts/OFL.txt. Latin subset only;
   CJK text falls through to the system stack. */
@font-face {
  font-family: "Michroma";
  src: url("/auth/fonts/Michroma-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  /* Brand: assets/brand/monogram-v2-web/manifest.json */
  --oa-mint: #92f1bc;
  --oa-graphite: #555454;
  --oa-charcoal: #151514;
  /* Light only: welcomepage-08 glow, never text or controls */
  --oa-glow: #09ea95;
  --oa-void: #000000;

  --oa-ink: oklch(96.5% 0.008 165);
  --oa-text: oklch(88% 0.014 170);
  --oa-muted: oklch(77% 0.02 172);
  --oa-placeholder: oklch(74% 0.02 172);
  --oa-field: rgb(3 11 10 / 0.6);
  --oa-field-focus: rgb(3 11 10 / 0.7);
  --oa-field-line: rgb(255 255 255 / 0.1);
  --oa-line: rgb(255 255 255 / 0.08);
  --oa-risk: oklch(80% 0.12 30);
  --oa-risk-line: rgb(255 128 108 / 0.32);
  --oa-risk-bg: rgb(255 110 90 / 0.1);

  --oa-font-ui: "Aptos", "SF Pro Text", "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --oa-font-brand: "Michroma", var(--oa-font-ui);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --swap-duration: 620ms;

  --stage-radius: 24px;
  --panel-radius: 20px;
  --field-radius: 12px;
  --cell-radius: 16px;
  --panel-width: clamp(380px, 35vw, 480px);

  /* One glass recipe shared by the panel, the mode pill, and the language pill. */
  --glass-fill:
    linear-gradient(152deg, rgb(255 255 255 / 0.13) 0%, rgb(255 255 255 / 0.045) 42%, rgb(255 255 255 / 0.02) 100%),
    rgb(6 18 16 / 0.48);
  --glass-blur: blur(26px) saturate(175%);
  --glass-rim: linear-gradient(142deg, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.12) 28%, rgb(255 255 255 / 0.03) 55%, rgb(146 241 188 / 0.28) 100%);
  --glass-edge:
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(255 255 255 / 0.04),
    0 2px 8px rgb(0 0 0 / 0.28);

  font-family: var(--oa-font-ui);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--oa-void);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--oa-void);
  color: var(--oa-text);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--oa-mint);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- stage */

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  padding: clamp(28px, 5vh, 56px) clamp(20px, 3vw, 56px) clamp(40px, 6vh, 72px);
}

.stage {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--stage-radius);
  padding: clamp(100px, 13vh, 132px) clamp(28px, 3.6vw, 64px) clamp(44px, 6vh, 64px);
}

.stage-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(62% 70% at 100% 0%, rgb(9 234 149 / 0.98) 0%, rgb(9 234 149 / 0.72) 22%, rgb(8 190 122 / 0.34) 48%, rgb(8 150 100 / 0.1) 72%, transparent 92%),
    radial-gradient(60% 70% at 0% 0%, rgb(46 88 80 / 0.55), transparent 70%),
    radial-gradient(70% 60% at 100% 100%, rgb(12 6 22 / 0.9), transparent 70%),
    linear-gradient(168deg, #0f2a27 0%, #0a1c1c 42%, #050909 100%);
}

.stage-ribbon {
  position: absolute;
  left: 2%;
  top: 56%;
  width: 44%;
  height: 26%;
  border-radius: 999px;
  background: linear-gradient(100deg, transparent 4%, rgb(9 234 149 / 0.5) 36%, rgb(146 241 188 / 0.44) 56%, rgb(46 120 255 / 0.14) 80%, transparent 96%);
  filter: blur(36px);
  transform: rotate(-17deg);
  transition: transform var(--swap-duration) var(--ease-out-expo);
}

.stage[data-side="create"] .stage-ribbon {
  transform: translateX(118%) rotate(-17deg);
}

/* Compact header only exists below the desktop breakpoint. */
.stage-header {
  display: none;
}

.brand,
.cell-brand {
  display: flex;
  align-items: center;
  color: var(--oa-mint);
  text-decoration: none;
  border-radius: 10px;
}

.brand-mark {
  display: block;
  flex: none;
  width: auto;
}

.wordmark {
  font-family: var(--oa-font-brand);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.pixel-motif {
  position: absolute;
  left: clamp(-8px, 0.8vw, 16px);
  bottom: 0;
  z-index: 1;
  width: clamp(64px, 6.2vw, 96px);
  height: auto;
  fill: var(--oa-glow);
  transform: translateY(42%);
  pointer-events: none;
}

.stage-grid {
  width: 100%;
  display: grid;
  grid-template-columns: var(--panel-width) minmax(0, 1fr);
  grid-template-areas: "panel mosaic";
  column-gap: clamp(28px, 3.6vw, 64px);
  align-items: stretch;
}

.stage[data-side="create"] .stage-grid {
  grid-template-columns: minmax(0, 1fr) var(--panel-width);
  grid-template-areas: "mosaic panel";
}

/* ------------------------------------------------------------ glass pills */

.mode-tabs,
.lang-toggle {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  border-radius: 999px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge);
}

.mode-tabs::after,
.lang-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Selected-segment thumb: a lighter drop of mint glass that slides between segments. */
.mode-tabs::before,
.lang-toggle::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(146 241 188 / 0.26), rgb(146 241 188 / 0.1));
  box-shadow: inset 0 0 0 1px rgb(146 241 188 / 0.36), inset 0 1px 0 rgb(255 255 255 / 0.26);
  transition: transform 320ms var(--ease-out-expo);
}

.mode-tabs[data-active="signup"]::before,
.lang-toggle[data-active="zh"]::before {
  transform: translateX(100%);
}

.mode-tabs {
  position: absolute;
  top: clamp(26px, 4.2vh, 44px);
  left: 50%;
  z-index: 3;
  width: clamp(270px, 22vw, 330px);
  transform: translateX(-50%);
}

.mode-tab,
.lang-toggle button {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--oa-muted);
  cursor: pointer;
  transition: color 200ms var(--ease-out-quart);
}

.mode-tab {
  min-height: 42px;
  padding: 0 12px;
  font-family: var(--oa-font-brand);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

html[lang="zh-Hant"] .mode-tab {
  font-size: 14px;
  letter-spacing: 0.3em;
}

.mode-tab:hover,
.lang-toggle button:hover,
.mode-tab[aria-selected="true"],
.lang-toggle button[aria-pressed="true"] {
  color: var(--oa-ink);
}

.mode-tab:focus-visible,
.lang-toggle button:focus-visible {
  outline-offset: -2px;
}

.lang-toggle {
  padding: 4px;
}

.lang-toggle::before {
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
}

.lang-toggle button {
  min-width: 46px;
  min-height: 34px;
  padding: 0 10px;
  color: var(--oa-text);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* The header pill sits over the brightest part of the glow; deepen its tint. */
.stage-header .lang-toggle {
  background:
    linear-gradient(152deg, rgb(255 255 255 / 0.12) 0%, rgb(255 255 255 / 0.04) 42%, rgb(255 255 255 / 0.02) 100%),
    rgb(4 14 12 / 0.64);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .auth-card,
  .mode-tabs,
  .lang-toggle {
    background: rgb(20 36 33 / 0.96);
  }
}

/* ------------------------------------------------------ liquid glass panel */

.auth-card {
  grid-area: panel;
  position: relative;
  z-index: 2; /* glass passes over the mosaic during the swap */
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-width: 0;
  padding: clamp(28px, 2.8vw, 40px) clamp(24px, 2.4vw, 36px);
  border-radius: var(--panel-radius);
  overflow: hidden;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge);
}

/* Specular rim: bright on the lit top-left edge, fading toward the far corner. */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Soft inner caustic along the top edge. */
.auth-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 42%;
  background: radial-gradient(80% 100% at 30% 0%, rgb(255 255 255 / 0.08), transparent 70%);
  pointer-events: none;
}

.glass-sheen {
  position: absolute;
  inset: -10% -60%;
  z-index: 1;
  background: linear-gradient(104deg, transparent 40%, rgb(255 255 255 / 0.14) 47%, rgb(146 241 188 / 0.24) 50%, rgb(255 255 255 / 0.1) 53%, transparent 60%);
  opacity: 0;
  pointer-events: none;
}

.auth-card > :not(.glass-sheen) {
  position: relative;
  z-index: 3;
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

h1 {
  margin: 0;
  color: var(--oa-ink);
  font-family: var(--oa-font-brand);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-wrap: balance;
}

/* Sub-flow titles are longer sentences; keep them to one or two lines. */
.card-header[data-size="compact"] h1 {
  font-size: 20px;
  letter-spacing: 0.04em;
}

html[lang="zh-Hant"] h1 {
  font-weight: 600;
  letter-spacing: 0.14em;
}

p {
  margin: 0;
  color: var(--oa-muted);
  font-size: 14px;
  line-height: 1.5;
  text-wrap: pretty;
}

.google-signin {
  display: grid;
  justify-content: center;
  min-height: 44px;
}

/* ----------------------------------------------------------------- fields */

.auth-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--oa-text);
  font-size: 13px;
  font-weight: 600;
}

.field small {
  color: var(--oa-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.input-wrap {
  position: relative;
  display: block;
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--oa-muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  pointer-events: none;
  transition: stroke 160ms var(--ease-out-quart);
}

.input-wrap:focus-within .field-icon {
  stroke: var(--oa-mint);
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--oa-field-line);
  border-radius: var(--field-radius);
  padding: 0 14px 0 45px;
  background: var(--oa-field);
  color: var(--oa-ink);
  font-size: 15px;
  outline: none;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.3);
  transition:
    border-color 160ms var(--ease-out-quart),
    background-color 160ms var(--ease-out-quart),
    box-shadow 160ms var(--ease-out-quart);
}

input::placeholder {
  color: var(--oa-placeholder);
  opacity: 1;
}

input:hover {
  border-color: rgb(255 255 255 / 0.18);
}

input:focus-visible {
  border-color: rgb(146 241 188 / 0.72);
  background: var(--oa-field-focus);
  box-shadow: 0 0 0 3px rgb(146 241 188 / 0.18), inset 0 1px 2px rgb(0 0 0 / 0.3);
}

input[readonly] {
  background: rgb(255 255 255 / 0.03);
  color: var(--oa-muted);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--oa-ink);
  caret-color: var(--oa-ink);
  box-shadow: 0 0 0 100px #0d1c1a inset;
  transition: background-color 9999s;
}

.code-field input {
  padding-right: 45px;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.34em;
  text-align: center;
}

.password-control input {
  padding-right: 54px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  padding: 0;
  background: transparent;
  color: var(--oa-muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 160ms var(--ease-out-quart), color 160ms var(--ease-out-quart);
}

.input-action svg,
.trial-button svg,
.mosaic-cta svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-action svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
}

.input-action .icon-eye-off,
.input-action[aria-pressed="true"] .icon-eye {
  display: none;
}

.input-action[aria-pressed="true"] .icon-eye-off {
  display: block;
}

.input-action:hover,
.input-action:focus-visible {
  background: rgb(255 255 255 / 0.08);
  color: var(--oa-ink);
}

.input-action:focus-visible {
  outline-offset: 0;
}

/* ---------------------------------------------------------------- actions */

/* Primary action: tinted liquid glass instead of a saturated fill. */
.primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background:
    linear-gradient(180deg, rgb(146 241 188 / 0.3), rgb(146 241 188 / 0.13)),
    rgb(8 26 22 / 0.35);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  color: var(--oa-ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    inset 0 0 0 1px rgb(146 241 188 / 0.32),
    inset 0 -10px 18px -12px rgb(146 241 188 / 0.45),
    0 10px 24px -18px rgb(9 234 149 / 0.8);
  transition:
    background-color 160ms var(--ease-out-quart),
    box-shadow 160ms var(--ease-out-quart),
    transform 120ms var(--ease-out-quart);
}

/* Specular highlight across the upper half of the pill. */
.primary::before {
  content: "";
  position: absolute;
  inset: 1px 1px 52%;
  z-index: -1;
  border-radius: 999px 999px 40% 40% / 999px 999px 100% 100%;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0));
  pointer-events: none;
}

.primary:hover {
  background:
    linear-gradient(180deg, rgb(146 241 188 / 0.38), rgb(146 241 188 / 0.18)),
    rgb(8 26 22 / 0.35);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.48),
    inset 0 0 0 1px rgb(146 241 188 / 0.44),
    inset 0 -10px 18px -12px rgb(146 241 188 / 0.55),
    0 12px 26px -16px rgb(9 234 149 / 0.9);
}

.primary:active {
  transform: scale(0.985);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.primary.is-busy::after {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.secondary-actions {
  min-height: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.secondary-actions:not(:has(> :not([hidden]))) {
  display: none;
}

.link-button {
  border: 0;
  border-radius: 6px;
  padding: 2px 4px;
  margin-left: -4px;
  background: transparent;
  color: var(--oa-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.link-button:hover {
  color: var(--oa-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.back-button::before {
  content: "\2190\00a0";
}

.trial-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-left: auto;
  border-radius: 999px;
  padding: 0 14px 0 16px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.04));
  color: var(--oa-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), inset 0 0 0 1px rgb(255 255 255 / 0.12);
  transition: background-color 160ms var(--ease-out-quart), color 160ms var(--ease-out-quart);
}

.trial-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
  transition: transform 200ms var(--ease-out-quart);
}

.trial-button:hover {
  background: linear-gradient(180deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0.07));
  color: var(--oa-ink);
}

.trial-button:hover svg {
  transform: translateX(2px);
}

.notice,
.dev-link {
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--field-radius);
  padding: 11px 13px;
  background: rgb(255 255 255 / 0.06);
  color: var(--oa-text);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notice.error {
  border-color: var(--oa-risk-line);
  background: var(--oa-risk-bg);
  color: var(--oa-risk);
}

.dev-link a {
  display: block;
  margin-top: 6px;
  color: var(--oa-mint);
  font-weight: 600;
}

.dev-link strong {
  display: block;
  color: var(--oa-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

/* ----------------------------------------------------------------- mosaic */

.mosaic {
  grid-area: mosaic;
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: clamp(460px, 58vh, 600px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(140px, 1fr));
  gap: clamp(10px, 1vw, 16px);
}

.cell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--cell-radius);
  background: linear-gradient(158deg, rgb(255 255 255 / 0.085), rgb(255 255 255 / 0.02) 72%);
  box-shadow: inset 0 0 0 1px var(--oa-line), inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.cell-wide-top {
  grid-column: 1 / 3;
  grid-row: 1;
  container-type: inline-size;
  display: grid;
  place-items: center;
}

.cell-brand {
  gap: 5cqi;
}

.cell-brand .brand-mark {
  height: 15cqi;
}

.cell-brand .wordmark {
  font-size: 4.9cqi;
}

.cell-tagline {
  grid-column: 3;
  grid-row: 1;
  container-type: inline-size;
  display: flex;
  align-items: flex-end;
  padding: clamp(12px, 1.2vw, 18px);
  background:
    radial-gradient(110% 70% at 100% 0%, rgb(9 234 149 / 0.9), rgb(9 234 149 / 0.22) 45%, transparent 68%),
    linear-gradient(170deg, #07231d, #030a09);
}

.cell-tagline .brand-line {
  font-size: clamp(9.5px, 6.6cqi, 12.5px);
}

.cell-dots {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  padding-bottom: 20px;
}

.cell-dots span {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--oa-glow);
  opacity: 0.8;
}

.cell-art {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90% 80% at 20% 0%, rgb(146 241 188 / 0.18), transparent 60%),
    linear-gradient(160deg, #1b1f1e, #0b0d0d);
}

.cell-art svg {
  width: 72%;
  height: auto;
}

.cell-message {
  grid-column: 2 / 4;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  padding: clamp(18px, 1.7vw, 26px);
  background:
    radial-gradient(85% 110% at 100% 0%, rgb(9 234 149 / 0.7), rgb(9 234 149 / 0.12) 48%, transparent 66%),
    linear-gradient(165deg, #0a1f1b, #040a09);
}

.cell-message h2 {
  margin: 0;
  color: var(--oa-ink);
  font-family: var(--oa-font-brand);
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.06em;
}

html[lang="zh-Hant"] .cell-message h2 {
  font-weight: 600;
}

.cell-message p {
  max-width: 36ch;
  color: var(--oa-text);
}

.mosaic-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px 8px 0;
  background: transparent;
  color: var(--oa-mint);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.mosaic-cta svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
  transition: transform 200ms var(--ease-out-quart);
}

.mosaic-cta:hover svg {
  transform: translateX(3px);
}

.mosaic-cta:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cell-tall {
  grid-column: 4;
  grid-row: 2 / 4;
  background:
    radial-gradient(120% 60% at 100% 0%, rgb(9 234 149 / 0.4), transparent 60%),
    linear-gradient(180deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.015));
}

.cell-motion {
  grid-column: 1 / 3;
  grid-row: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 1.7vw, 26px);
  background: linear-gradient(150deg, rgb(255 255 255 / 0.06), rgb(20 14 36 / 0.35) 80%);
}

.cell-small {
  grid-column: 3;
  grid-row: 3;
  display: grid;
  place-items: center;
  padding: 12px;
  background: linear-gradient(150deg, rgb(255 255 255 / 0.05), rgb(20 14 36 / 0.3));
}

.brand-line {
  max-width: 30ch;
  color: var(--oa-mint);
  font-family: var(--oa-font-brand);
  font-size: clamp(11px, 0.85vw, 12.5px);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.12em;
}

html[lang="zh-Hant"] .brand-line {
  letter-spacing: 0.2em;
}

.cell-motion .brand-line {
  color: var(--oa-text);
}

.pixel-plus {
  flex: none;
  width: 22px;
  height: 22px;
  fill: var(--oa-glow);
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1099px) {
  .mosaic {
    display: none;
  }

  .stage {
    justify-content: flex-start;
    padding: 28px clamp(20px, 4vw, 40px) 64px;
  }

  .stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(100%, 480px);
    margin: 0 auto 24px;
  }

  .brand {
    gap: 12px;
  }

  .brand .brand-mark {
    height: 40px;
  }

  .brand .wordmark {
    font-size: 13px;
  }

  .mode-tabs {
    position: relative;
    top: auto;
    left: auto;
    width: min(100%, 330px);
    margin: 0 auto 24px;
    transform: none;
  }

  .stage-grid,
  .stage[data-side="create"] .stage-grid {
    grid-template-columns: minmax(0, 480px);
    grid-template-areas: "panel";
    justify-content: center;
  }

  .stage-ribbon,
  .stage[data-side="create"] .stage-ribbon {
    left: 18%;
    width: 64%;
    transform: rotate(-17deg);
  }
}

@media (max-width: 767px) {
  .auth-shell {
    padding: 0;
  }

  .stage {
    border-radius: 0;
    padding: 22px 16px 88px;
  }

  .stage-light {
    background:
      radial-gradient(120% 55% at 110% -8%, rgb(9 234 149 / 0.85) 0%, rgb(9 234 149 / 0.4) 20%, rgb(8 170 110 / 0.14) 40%, transparent 62%),
      linear-gradient(172deg, #0f2a27 0%, #0a1c1c 40%, #050909 100%);
  }

  .stage-ribbon,
  .stage[data-side="create"] .stage-ribbon {
    left: 4%;
    top: 58%;
    width: 92%;
    height: 22%;
  }

  .stage-header {
    margin-bottom: 20px;
  }

  .brand .brand-mark {
    height: 32px;
  }

  .brand .wordmark {
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .lang-toggle button {
    min-width: 42px;
    min-height: 32px;
  }

  .mode-tabs {
    margin-bottom: 18px;
  }

  .stage-grid,
  .stage[data-side="create"] .stage-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-card {
    gap: 18px;
    padding: 26px 18px 22px;
  }

  h1 {
    font-size: 28px;
  }

  .pixel-motif {
    left: 18px;
    bottom: 24px;
    width: 48px;
    transform: none;
  }
}

@media (max-height: 760px) and (min-width: 1100px) {
  .stage {
    padding-top: 92px;
    padding-bottom: 44px;
  }

  .mode-tabs {
    top: 22px;
  }

  .mosaic {
    min-height: 440px;
  }

  .pixel-motif {
    width: 56px;
    transform: translateY(62%);
  }
}

/* ---------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .stage[data-side="create"] .stage-grid {
    grid-template-columns: var(--panel-width) minmax(0, 1fr);
    grid-template-areas: "panel mosaic";
  }

  .stage[data-side="create"] .stage-ribbon {
    transform: rotate(-17deg);
  }

  .stage-ribbon,
  .mode-tabs::before,
  .lang-toggle::before,
  .mode-tab,
  .lang-toggle button,
  .field-icon,
  input,
  .primary,
  .trial-button svg,
  .mosaic-cta svg {
    transition: none;
  }

  .primary.is-busy::after {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.6;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 1099px) {
  .stage[data-side="create"] .stage-grid {
    grid-template-columns: minmax(0, 480px);
    grid-template-areas: "panel";
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 767px) {
  .stage[data-side="create"] .stage-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
