/* First paint, account entry and desktop connections share the same launch identity. */
.launch-surface {
  --launch-bg: #faf8f5;
  --launch-panel: #f5f2ed;
  --launch-ink: #1a1c1e;
  --launch-muted: #757575;
  --launch-line: #e7e7e7;
  --launch-accent: #e46a36;
  --launch-soft: #fbede6;
  box-sizing: border-box;
  margin: 0;
  color: var(--launch-ink);
  background: var(--launch-bg);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color-scheme: light;
}
:root[data-appearance="dark"] .launch-surface {
  --launch-bg: #212121;
  --launch-panel: #1b1b1b;
  --launch-ink: #ececec;
  --launch-muted: #a3a3a3;
  --launch-line: #383838;
  --launch-accent: #ff8a65;
  --launch-soft: #392a24;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-appearance="light"]) .launch-surface {
    --launch-bg: #212121;
    --launch-panel: #1b1b1b;
    --launch-ink: #ececec;
    --launch-muted: #a3a3a3;
    --launch-line: #383838;
    --launch-accent: #ff8a65;
    --launch-soft: #392a24;
    color-scheme: dark;
  }
}
.launch-surface *,
.launch-surface *::before,
.launch-surface *::after {
  box-sizing: border-box;
}
.launch-surface button,
.launch-surface input {
  font: inherit;
}
.launch-surface button {
  cursor: pointer;
}
.launch-surface button:focus-visible,
.launch-surface input:focus-visible {
  outline: 2px solid var(--launch-accent);
  outline-offset: 3px;
}
.launch-surface button:disabled,
.launch-surface input:disabled {
  opacity: 0.5;
  cursor: wait;
}
:root .launch-surface.startup-screen {
  --povact-mark-filter: invert(1);
  --launch-bg: #050505;
  --launch-panel: #11100f;
  --launch-ink: #f1ebe5;
  --launch-muted: #a39a91;
  --launch-line: #302720;
  --launch-accent: #f69a55;
  --launch-soft: #2c1c12;
  color-scheme: dark;
  background: var(--launch-bg);
}
.startup-screen {
  height: 100dvh;
  min-height: 480px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 32px 40px 26px;
  position: relative;
  isolation: isolate;
  overflow: hidden auto;
  background-image: radial-gradient(
    ellipse at 50% 45%,
    color-mix(in srgb, var(--launch-accent) 6%, transparent),
    transparent 48%
  );
}
.launch-topline,
.launch-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.launch-topline {
  font-size: 11px;
  color: var(--launch-muted);
  letter-spacing: 1px;
}
.launch-topline > span:first-child {
  color: var(--launch-ink);
  font-weight: 650;
  letter-spacing: 2px;
}
.startup-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 24px 64px;
}
.startup-emblem {
  position: relative;
  width: min(340px, 39vh, 66vw);
  height: min(340px, 39vh, 66vw);
  margin-bottom: 22px;
}
.startup-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Canvas includes a transparent drift margin. Keep the original visible logo size
   and identical first-paint/React layout; the artwork itself moves inside it. */
.povact-particle-emblem {
  position: relative;
  flex: none;
  pointer-events: none;
}
.povact-particle-emblem .povact-particle-canvas {
  display: block;
  position: absolute;
  width: 290.6976744%;
  height: 186.0465116%;
  left: -95.3488372%;
  top: -43.0232558%;
}
.povact-particle-emblem .povact-particle-fallback {
  display: block;
  position: absolute;
  inset: 0;
}
.startup-screen::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 12%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--launch-accent) 22%, transparent),
    transparent
  );
  pointer-events: none;
  z-index: -1;
}
.startup-center > :not(.startup-emblem) {
  position: relative;
  z-index: 1;
}
.startup-screen h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 350;
  line-height: 1.1;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
}
.startup-tagline {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  max-width: 100%;
  letter-spacing: 1.3px;
  padding-left: 1.3px;
  text-wrap: balance;
}
.startup-english {
  margin: 10px 0 0;
  color: var(--launch-muted);
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: 1.8px;
}
.startup-state {
  max-width: min(480px, 100%);
  margin-top: 24px;
  color: var(--launch-muted);
}
.startup-state p {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.startup-track {
  width: 128px;
  height: 2px;
  margin: auto;
  overflow: hidden;
  border-radius: 2px;
  background: var(--launch-line);
}
.startup-track span {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--launch-accent);
  animation: launch-progress 1.8s ease-in-out infinite;
}
.startup-screen.has-error .startup-state {
  margin-top: 28px;
}
.startup-screen.has-error .startup-state p {
  color: var(--launch-ink);
}
.startup-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.launch-primary,
.launch-secondary {
  min-height: 38px;
  padding: 10px 16px;
  border-radius: 9px;
  border: 1px solid var(--launch-line);
  font-size: 12px !important;
  font-weight: 550;
}
.launch-primary {
  background: var(--launch-accent);
  color: #1a1c1e;
  border-color: var(--launch-accent);
}
.launch-secondary {
  background: var(--launch-bg);
  color: var(--launch-ink);
}
.launch-primary:hover {
  filter: brightness(0.94);
}
.launch-secondary:hover {
  background: var(--launch-panel);
}
.launch-footer {
  font-size: 10px;
  color: var(--launch-muted);
  line-height: 1.6;
}
.launch-footer > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.launch-footer i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--launch-muted);
  opacity: 0.5;
}
.launch-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.launch-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.launch-brand > span {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: 2px;
}
.launch-brand small {
  display: block;
  color: var(--launch-muted);
  font-size: 6px;
  font-weight: 450;
  letter-spacing: 1px;
  margin-top: 5px;
}
.auth-page.launch-surface,
.connection-page.launch-surface {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr);
  height: 100dvh;
  min-height: 600px;
  padding-top: 0;
}
.launch-surface .auth-story,
.launch-surface .connection-story {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px clamp(32px, 5vw, 72px) 30px;
  background:
    radial-gradient(
      ellipse at 40% 42%,
      color-mix(in srgb, var(--launch-accent) 7%, transparent),
      transparent 60%
    ),
    var(--launch-bg);
  color: var(--launch-ink);
  position: relative;
  overflow: hidden;
}
.launch-surface .auth-story::after {
  content: none;
}
.launch-surface .auth-story-copy {
  margin: auto 0;
  padding: 20px 0;
}
.auth-emblem {
  width: min(320px, 36vh, 100%);
  aspect-ratio: 1;
  margin: 0 0 20px;
}
.auth-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}
.auth-story-copy > :not(.povact-particle-emblem) {
  position: relative;
  z-index: 1;
}
.launch-surface .auth-story-copy > span {
  font-size: 11px;
  color: var(--launch-muted);
  letter-spacing: 2px;
}
.launch-surface .auth-story-copy h1 {
  margin: 14px 0;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.5;
  letter-spacing: 0.5px;
  font-weight: 550;
}
.launch-surface .auth-story-copy p {
  color: var(--launch-muted);
  line-height: 1.8;
  font-size: 12px;
}
.launch-surface .auth-footnote {
  color: var(--launch-muted);
  font-size: 10px;
  margin: 0;
}
.launch-surface .auth-panel,
.launch-surface .connection-panel {
  background: var(--launch-panel);
  border-left: 1px solid var(--launch-line);
  padding: 42px clamp(24px, 4vw, 64px);
  display: flex;
  align-items: safe center;
  justify-content: center;
  overflow: auto;
}
.launch-surface .auth-form-wrap,
.connection-form-wrap {
  width: min(100%, 360px);
}
.launch-surface .auth-heading {
  color: var(--launch-accent);
  margin-bottom: 20px;
}
.launch-surface .auth-form-wrap h2 {
  font-size: 26px;
  font-weight: 550;
  color: var(--launch-ink);
}
.launch-surface .auth-form-wrap > p,
.launch-surface .auth-form-wrap label,
.launch-surface .password-hint {
  color: var(--launch-muted);
}
.launch-surface .auth-tabs {
  background: var(--launch-bg);
  border-color: var(--launch-line);
}
.launch-surface .auth-tabs button {
  color: var(--launch-muted);
}
.launch-surface .auth-tabs button.active {
  background: var(--launch-soft);
  color: var(--launch-accent);
  box-shadow: none;
}
.launch-surface .auth-form-wrap input,
.launch-surface .password-field {
  background: var(--launch-bg);
  border-color: var(--launch-line);
  color: var(--launch-ink);
}
.launch-surface .password-field input {
  background: transparent;
}
.launch-surface .auth-submit {
  background: var(--launch-accent);
  border-color: var(--launch-accent);
  color: #1a1c1e;
  min-height: 40px;
}
.launch-surface .auth-submit:hover {
  background: var(--launch-accent);
  filter: brightness(0.94);
}
.launch-surface .auth-link {
  color: var(--launch-accent);
}
.launch-surface .auth-local-note {
  border-color: var(--launch-line);
}
@keyframes launch-progress {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(325%);
  }
}
@keyframes launch-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1050px) {
  .launch-surface .auth-story,
  .launch-surface .connection-story {
    padding-inline: 32px;
  }
  .launch-surface .auth-panel,
  .launch-surface .connection-panel {
    padding-inline: 28px;
  }
}
@media (max-width: 700px) {
  .startup-screen {
    padding: 30px 22px 22px;
  }
  .startup-center {
    padding: 24px 0 40px;
  }
  .startup-emblem {
    width: min(260px, 34vh, 66vw);
    height: min(260px, 34vh, 66vw);
  }
  .startup-tagline {
    max-width: 24em;
    font-size: 12px;
    letter-spacing: 0.6px;
  }
  .startup-english {
    letter-spacing: 1px;
    font-size: 8px;
  }
  .auth-page.launch-surface,
  .connection-page.launch-surface {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }
  .launch-surface .auth-story,
  .launch-surface .connection-story {
    padding: 40px 24px 24px;
    flex-shrink: 0;
  }
  .launch-surface .auth-story-copy,
  .launch-surface .auth-footnote {
    display: none;
  }
  .launch-surface .auth-panel,
  .launch-surface .connection-panel {
    flex: 1;
    padding: 30px 24px;
    border-left: 0;
    border-top: 1px solid var(--launch-line);
    overflow: visible;
  }
}
.auth-entry-page.launch-surface {
  grid-template-columns: minmax(0, .85fr) minmax(400px, 1.15fr);
}
.auth-entry-page .auth-story-copy {
  padding-block: 0;
}
.auth-entry-page .auth-emblem {
  width: min(176px, 26vh, 100%);
  margin-bottom: 14px;
}
.auth-entry-page .auth-story-copy p {
  max-width: 22em;
  color: var(--launch-ink);
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 500;
  line-height: 1.65;
}
.auth-entry-page .auth-form-wrap {
  width: min(100%, 384px);
}
.auth-entry-page .auth-beta-notice {
  margin: 0 0 10px;
  font-size: 11px;
}
.auth-entry-page .auth-form-wrap h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 2.3vw, 34px);
  font-weight: 650;
  letter-spacing: -.025em;
  color: var(--launch-ink);
}
.auth-entry-page .auth-entry-description {
  margin: 0;
  font-size: 13px;
}
.auth-entry-page .auth-tabs {
  margin: 20px 0 0;
}
.auth-entry-page .auth-tabs button.active {
  color: var(--launch-ink);
  box-shadow: inset 0 -2px var(--launch-accent);
  font-weight: 600;
}
.auth-entry-page .auth-form-wrap form {
  margin-top: 18px;
}
.auth-entry-page .auth-submit {
  margin-top: 10px;
}
.auth-entry-page .phone-submit {
  justify-content: center;
}
.auth-entry-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 14px;
  color: var(--launch-muted);
  font-size: 12px;
}
.auth-entry-links .auth-link {
  margin: 0;
  color: var(--launch-ink);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-entry-page .auth-download {
  width: fit-content;
  margin-top: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--launch-muted);
}
.auth-entry-page .auth-download:hover {
  color: var(--launch-ink);
}
.auth-entry-page .auth-download span {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 7px;
  align-items: baseline;
}
.auth-entry-page .auth-local-note {
  margin: 16px 0 0;
  padding-top: 12px;
}
@media (max-width: 700px) {
  .auth-entry-page .auth-story { padding: 22px 24px 16px; }
  .auth-entry-page .auth-panel { align-items: flex-start; padding: 24px; }
}
@supports (-webkit-app-region: drag) {
  .startup-screen {
    padding-top: 42px;
    -webkit-app-region: drag;
  }
  .startup-actions,
  .launch-surface button,
  .launch-surface input {
    -webkit-app-region: no-drag;
  }
}
@media (prefers-reduced-motion: reduce) {
  .launch-surface *,
  .launch-surface *::before,
  .launch-surface *::after {
    animation: none !important;
    transition: none !important;
  }
  .startup-track span {
    transform: translateX(60%);
  }
}
body:has(> #root > .startup-screen) {
  margin: 0;
}

/* Transparent pen mark: black on light surfaces, white on dark surfaces. */
:root {
  --povact-mark-filter: invert(0);
}
:root[data-appearance="dark"] {
  --povact-mark-filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-appearance="light"]) {
    --povact-mark-filter: invert(1);
  }
}
img[src$="povact-launch.png"],
img[src$="povact-core.webp"],
img[src$="povact-core-hd.webp"] {
  filter: var(--povact-mark-filter, invert(0));
}
