@import url('./stories/runtime/assistant.css');

/* Match the editor material in Whiteboard_Operation_Replica/public/theme-base.css:
   an inset 80px frost and a separate 2px, 90px-blurred refractive rim. */
body[data-page="auth"] {
  --auth-glass: rgb(18 18 18 / 82%);
  --auth-field: rgb(255 255 255 / 3%);
  --auth-field-hover: rgb(255 255 255 / 6%);
  --auth-field-line: rgb(255 255 255 / 13%);
  --auth-rim-width: 2px;
  --auth-rim-tint: rgb(140 150 164 / 3.5%);
  --auth-rim-backdrop: blur(90px) saturate(1.2);
  /* The editor's regular search fields (38–44px high) use a 10px radius. */
  --auth-field-radius: 10px;
  --auth-shadow: 0 10px 24px -8px rgb(0 0 0 / 19%);
  --auth-header-height: 88px;
  --auth-panel-divider: rgb(146 144 146 / 20%);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
html[data-theme="light"] body[data-page="auth"] {
  --auth-glass: rgb(238 238 240 / 76%);
  --auth-field: rgb(255 255 255 / 45%);
  --auth-field-hover: rgb(255 255 255 / 65%);
  --auth-field-line: rgb(35 32 45 / 13%);
  --auth-rim-tint: rgb(255 255 255 / 12%);
  --auth-shadow: 0 10px 24px -8px rgb(25 25 28 / 9%);
}
body[data-page="auth"] .auth-fluid {
  position: fixed;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: .88;
  mask-image: radial-gradient(ellipse at 50% 48%, #000 20%, #000d 48%, #0005 76%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 48%, #000 20%, #000d 48%, #0005 76%, transparent 100%);
}
body[data-page="auth"] [data-site-header] { position: relative; top: auto; }
.auth-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--auth-header-height); padding: 24px 40px; }
.auth-header .brand { --brand-mark-size: 32px; }
.auth-header .brand-stage { display: none; }
.auth-header-actions { display: flex; align-items: center; gap: 25px; }
.auth-header .header-tools { width: auto; flex: none; margin: 0; gap: 9px; }
.auth-back { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 2px; font-size: 14px; color: var(--color-ink); white-space: nowrap; }
.auth-back svg { width: 17px; height: 17px; }
.auth-back:hover { opacity: .65; }
.auth-main { display: grid; place-items: center; flex: 1; padding: 0 24px; }
.auth-main[data-method-anchored] { align-items: start; padding-top: var(--auth-login-top); }
.auth-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 1000px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: transparent;
  box-shadow: var(--auth-shadow);
}
.auth-form-pane { min-width: 0; width: 100%; max-width: 456px; justify-self: center; padding: 34px 38px 30px; }
.auth-companion-pane { position: relative; display: grid; place-items: center; min-width: 0; padding: 48px 32px; overflow: hidden; border-radius: 0 26px 26px 0; }
.auth-companion-pane::before { content: ""; position: absolute; left: 0; top: 52px; bottom: 52px; width: 1px; background: var(--auth-panel-divider); pointer-events: none; }
.auth-companion-stage { position: relative; display: grid; width: min(160px, 100%); aspect-ratio: 128 / 110; opacity: 1; transform: scale(1); transform-origin: center; transition: opacity 160ms ease, transform 180ms cubic-bezier(.2,.7,.25,1); }
.auth-companion-stage[data-phase="out"] { opacity: 0; transform: scale(.72); }
.auth-companion-stage[data-playback="paused"] { transition: none; }
.auth-companion-stage>[data-auth-companion-fallback] { position: absolute; width: 140%; height: 162%; left: -20%; top: -31%; object-fit: contain; }
.auth-companion-stage>.cloud-assistant { width: 100%; height: 100%; }
.auth-companion-controls { position: absolute; left: 50%; top: calc(50% + 136px); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; }
.auth-companion-controls .auth-companion-step { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgb(227 219 255 / 18%); border-radius: 50%; background: rgb(238 231 255 / 6%); color: #e6def8; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.auth-companion-step svg { width: 17px; height: 17px; pointer-events: none; }
.auth-companion-controls .auth-companion-step:hover { background: rgb(196 175 255 / 15%); border-color: rgb(210 192 255 / 45%); color: #fff; transform: translateY(-1px); }
.auth-companion-controls .auth-companion-step:active { transform: scale(.94); }
.auth-companion-controls .auth-companion-step:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; text-decoration: none; }
html[data-theme="light"] .auth-companion-step { border-color: rgb(80 65 110 / 17%); background: rgb(255 255 255 / 45%); color: #65547f; }
html[data-theme="light"] .auth-companion-step:hover { background: rgb(255 255 255 / 80%); border-color: rgb(110 83 160 / 35%); color: #3f2c60; }
@media(max-width:760px) { .auth-companion-pane { row-gap: 22px; } .auth-companion-controls { position: static; transform: none; } }
@media(prefers-reduced-motion:reduce) { .auth-companion-controls .auth-companion-step { transition: none; } }
.auth-card::before, .auth-trial-dialog::before {
  content: "";
  position: absolute;
  inset: var(--auth-rim-width);
  z-index: -1;
  border-radius: max(0px, calc(var(--auth-surface-radius, 26px) - var(--auth-rim-width)));
  background: var(--auth-glass);
  backdrop-filter: blur(80px);
  -webkit-backdrop-filter: blur(80px);
  pointer-events: none;
}
.auth-card::after, .auth-trial-dialog::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  box-sizing: border-box;
  padding: var(--auth-rim-width);
  border-radius: inherit;
  background: var(--auth-rim-tint);
  backdrop-filter: var(--auth-rim-backdrop);
  -webkit-backdrop-filter: var(--auth-rim-backdrop);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
}
.auth-brand { --brand-mark-size: 60px; position: relative; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 9px; margin-bottom: 28px; height: 58px; font: inherit; cursor: default; }
.auth-brand .brand-stage { display: none; }
body[data-page="auth"] .auth-card h1 { font-family: var(--font-display); font-size: 29px; font-weight: 600; line-height: 1.35; letter-spacing: -.045em; margin: 0 0 12px; text-wrap: balance; }
body[data-auth-view="register"] .auth-card h1 { font-weight: 400; }
html[lang="zh-CN"] body[data-auth-view="register"] .auth-card h1 { font-family: Outfit,"MAIS DingTalk JinBu","MAIS Sans","Microsoft YaHei",sans-serif; font-synthesis: none; }
.auth-description { margin: 0 0 25px; font-size: 13px; line-height: 1.7; color: var(--color-muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 23px; border: 0; border-radius: 11px; background: var(--auth-field); }
.auth-tabs button { min-height: 34px; border-radius: 7px; color: var(--color-muted); font-size: 13px; }
.auth-tabs button[aria-selected="true"] { background: var(--auth-field-hover); color: var(--color-ink); }
html[data-theme="light"] .auth-tabs button[aria-selected="true"] { background: #fff; }
.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 7px; min-width: 0; }
.auth-field label { font-size: 13px; font-weight: 400; color: var(--color-copy); line-height: 1.4; }
.auth-field input {
  min-width: 0; width: 100%; height: 43px; margin: 0; padding: 0 13px;
  border: 0; border-radius: var(--auth-field-radius);
  background: var(--auth-field); color: var(--color-ink);
  font: 400 14px/1.4 var(--font-body); box-shadow: none; caret-color: var(--color-ink);
}
.auth-field input::placeholder { color: var(--color-muted); opacity: 1; }
.auth-field input:hover { background: var(--auth-field-hover); }
.auth-card button { border: 0; }
.auth-card :is(input,button,a):focus { outline: none; box-shadow: none; }
.auth-card :is(button,a):focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.auth-password { position: relative; }
.auth-password input { padding-right: 45px; }
.auth-password button { position: absolute; right: 4px; top: 3px; width: 37px; height: 37px; display: grid; place-items: center; border-radius: 7px; color: var(--color-muted); }
.auth-password button:hover { color: var(--color-ink); }
.auth-password svg { width: 18px; height: 18px; }
.auth-field-hint { font-size: 11px; line-height: 1.5; color: var(--color-muted); margin: -1px 0 0; }
.auth-code-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.auth-send-code { padding: 0 13px; border: 0; border-radius: var(--auth-field-radius); font-size: 12px; white-space: nowrap; background: var(--auth-field); color: var(--color-copy); }
.auth-send-code:hover { background: var(--auth-field-hover); }
.auth-phone-input { display: flex; align-items: center; height: 43px; border: 0; border-radius: var(--auth-field-radius); background: var(--auth-field); }
.auth-phone-input>span { padding: 0 12px; color: var(--color-muted); font: 13px var(--font-display); }
.auth-phone-input input { border: 0; background: transparent; box-shadow: none; height: 41px; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--color-muted); margin-top: -2px; }
.auth-remember { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.auth-remember input { margin: 0; width: 14px; height: 14px; accent-color: var(--color-ink); }
.auth-options a:hover, .auth-switch a:hover, .auth-legal a:hover, .auth-footer a:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-submit { display: flex; align-items: center; justify-content: center; justify-self: center; width: var(--auth-action-width, max-content); max-width: 100%; height: 36px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-ink); font-size: 13px; font-weight: 500; white-space: nowrap; transition: opacity .18s, transform .18s; }
.auth-submit:hover { opacity: .84; }
.auth-submit:active { transform: scale(.99); }
.auth-card button:disabled { opacity: .5; cursor: default; }
.auth-status { margin: 0; font-size: 12px; line-height: 1.6; color: var(--color-muted); overflow-wrap: anywhere; }
.auth-status:empty { display: none; }
.auth-status[data-state="error"] { color: var(--color-error); }
.auth-status[data-provider-status]:not(:empty) { margin-top: 12px; }
.auth-switch { text-align: center; margin: 17px 0 0; font-size: 12px; color: var(--color-muted); }
.auth-switch a { color: var(--color-ink); margin-left: 4px; font-weight: 500; }
.auth-divider { display: flex; align-items: center; gap: 15px; margin: 22px 0 17px; font-size: 11px; color: var(--color-muted); }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--auth-field-line); flex: 1; }
.auth-social { display: flex; justify-content: center; align-items: center; gap: 8px; height: 36px; min-height: 36px; width: var(--auth-action-width, max-content); max-width: 100%; margin-inline: auto; padding: 0 14px; border: 0; border-radius: 999px; background: var(--auth-field); color: var(--color-ink); font-size: 13px; white-space: nowrap; }
.auth-social:hover { background: var(--auth-field-hover); }
.auth-social svg { width: 21px; height: 21px; }
.auth-alternative-phone { display: block; margin: 13px auto 0; font-size: 12px; color: var(--color-muted); text-align: center; }
.auth-alternative-phone:hover { color: var(--color-ink); }
.auth-legal { margin: 21px auto 0; max-width: 290px; color: var(--color-muted); font-size: 11px; line-height: 1.8; text-align: center; }
.auth-legal a { color: var(--color-copy); text-underline-offset: 3px; }
.auth-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 430px);
  grid-template-areas: "contact stats" "filing filing";
  align-items: center;
  gap: 22px 32px;
  min-height: var(--auth-header-height);
  padding: 14px 40px 20px;
  color: var(--color-muted);
}
.auth-footer .auth-stats { grid-area: stats; }
.auth-footer .studio-contact { grid-area: contact; }
.auth-footer .site-icp { grid-area: filing; margin: 0; }
.auth-footer .studio-contact dl { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.auth-footer .studio-contact-name, .auth-footer .studio-contact-email { font-size: 14px; }
@media (max-width: 900px) {
  .auth-footer { grid-template-columns: minmax(0, 430px); grid-template-areas: "stats" "contact" "filing"; justify-content: center; }
  .auth-footer .studio-contact { border-top: 1px solid var(--color-line); padding-top: 16px; }
}
.auth-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px; width: min(100%, 430px); margin: 0; }
.auth-stats>div { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; min-width: 0; }
.auth-stats dd { margin: 0; color: var(--color-ink); font: 400 26px/1.15 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.auth-stats dt { font-size: 11px; line-height: 1.5; white-space: nowrap; }
@media(min-width:1181px) { .auth-stats { gap: 18px; } }
@media(min-width:1181px) and (max-width:1350px) { .auth-stats dt { font-size: 10px; } }
.auth-card [hidden] { display: none !important; }
html[lang="en"] body[data-page="auth"] .auth-card h1 { font-family: var(--font-display); }
.auth-trial-entry { margin-top: 12px; border-top: 1px solid var(--auth-panel-divider); padding-top: 10px; color: var(--color-copy); }
.auth-trial-ack { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.5; cursor: pointer; color: var(--color-copy); }
.auth-trial-ack input { width: 14px; height: 14px; flex: 0 0 14px; margin: 1px 0 0; accent-color: var(--color-ink); }
.auth-trial-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.auth-trial-actions button { min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 12px; line-height: 1.5; cursor: pointer; }
.auth-trial-submit { background: var(--auth-field-hover); color: var(--color-ink); }
.auth-trial-info { color: var(--color-copy); }
.auth-trial-actions button:hover { background: var(--auth-field-hover); color: var(--color-ink); }
.auth-trial-submit:hover { opacity: .84; }
.auth-card :is(.auth-trial-form, .auth-trial-dialog) :is(input,button):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; text-decoration: none; }
.auth-trial-form [data-trial-status] a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.auth-trial-dialog {
  --auth-surface-radius: 24px;
  isolation: isolate;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: clamp(20px, 5vw, 32px);
  border: 0;
  border-radius: var(--auth-surface-radius);
  background: transparent;
  color: var(--color-ink);
  box-shadow: var(--auth-shadow);
}
.auth-trial-dialog::backdrop { background: rgb(16 14 22 / 46%); backdrop-filter: blur(5px); }
html[data-theme="light"] .auth-trial-dialog::backdrop { background: rgb(34 30 44 / 23%); }
.auth-trial-dialog h2 { margin: 0 0 12px; font: 400 24px/1.35 var(--font-display); }
.auth-trial-dialog p, .auth-trial-dialog ul { margin: 0 0 13px; color: var(--color-copy); font-size: 13px; line-height: 1.65; }
.auth-trial-dialog ul { padding-inline-start: 20px; }
.auth-trial-dialog li + li { margin-top: 6px; }
.auth-trial-dialog form { display: grid; margin-top: 18px; }
.auth-trial-dialog .auth-submit { width: max-content; }
@media(max-height:800px) and (min-width:781px) { .auth-form-pane { padding-block: 27px 24px; } .auth-brand { margin-bottom: 22px; } }
@media(max-width:760px) { .auth-card { width: min(100%, 456px); grid-template-columns: minmax(0, 1fr); } .auth-companion-pane { padding: 28px 24px; border-radius: 0 0 26px 26px; } .auth-companion-pane::before { inset: 0 30px auto; width: auto; height: 1px; } .auth-companion-stage { width: 128px; } }
@media(max-width:600px) { body[data-page="auth"] { --auth-header-height: 84px; } .auth-header-inner { padding: 20px; gap: 12px; } .auth-header-actions { gap: 12px; } .auth-header .header-tools { gap: 4px; } .auth-back { gap: 3px; font-size: 13px; } .auth-main { padding-inline: 18px; } .auth-card { border-radius: 23px; } .auth-form-pane { padding: 29px 25px 25px; } .auth-card::before { border-radius: max(0px, calc(23px - var(--auth-rim-width))); } .auth-companion-pane { border-radius: 0 0 23px 23px; } .auth-footer { padding: 12px 20px 18px; } .auth-stats { gap: 14px; } .auth-stats dd { font-size: 23px; } .auth-stats dt { font-size: 10px; } }

body[data-auth-view="login"] { --auth-header-height: 64px; }
body[data-auth-view="login"] .auth-header-inner { padding-block: 12px; }
body[data-auth-view="login"] .auth-form-pane { padding-block: 20px; }
body[data-auth-view="login"] .auth-brand { --brand-mark-size: 46px; height: 42px; margin-bottom: 10px; }
body[data-page="auth"][data-auth-view="login"] .auth-card h1 { margin-bottom: 12px; }
body[data-auth-view="login"] .auth-tabs { margin-bottom: 10px; }
body[data-auth-view="login"] .auth-form { gap: 10px; }
body[data-auth-view="login"] .auth-field { gap: 5px; }
body[data-auth-view="login"] .auth-switch { margin-top: 10px; }
body[data-auth-view="login"] .auth-divider { margin-block: 8px; }
body[data-auth-view="login"] .auth-legal { max-width: none; margin-top: 10px; }
body[data-auth-view="login"] .auth-legal br, body[data-auth-view="login"] .auth-stats { display: none; }
body[data-auth-view="login"] .auth-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "contact filing";
  min-height: 0;
  gap: 4px 18px;
  padding-block: 8px;
}
body[data-auth-view="login"] .auth-footer .studio-contact { border: 0; padding: 0; }
body[data-auth-view="login"] .auth-footer .studio-contact dl { gap: 2px 12px; }
body[data-auth-view="login"] .auth-footer .studio-contact dt { display: none; }
body[data-auth-view="login"] .auth-footer :is(.studio-contact-name, .studio-contact-email, .site-icp) { font-size: 11px; }
@media (max-height: 690px) {
  body[data-auth-view="login"] { --auth-header-height: 48px; }
  body[data-auth-view="login"] .auth-header-inner { padding-block: 6px; }
  body[data-auth-view="login"] .auth-form-pane { padding-block: 12px; }
  body[data-auth-view="login"] .auth-brand { display: none; }
  body[data-auth-view="login"] .auth-form { gap: 7px; }
  body[data-auth-view="login"] .auth-trial-entry { margin-top: 8px; padding-top: 6px; }
  body[data-auth-view="login"] .auth-legal { margin-top: 6px; }
  body[data-auth-view="login"] .auth-footer { padding-block: 4px; }
}
@media (max-width: 760px) {
  body[data-auth-view="login"] .auth-companion-pane { grid-template-columns: auto auto; justify-content: center; column-gap: 22px; padding: 9px 20px; }
  body[data-auth-view="login"] .auth-companion-stage { width: 68px; }
  body[data-auth-view="login"] .auth-footer { grid-template-columns: minmax(0, 1fr); grid-template-areas: "contact" "filing"; justify-items: center; }
  body[data-auth-view="login"] .auth-footer .studio-contact dl { justify-content: center; }
}
@media (max-width: 760px) and (max-height: 710px) {
  body[data-auth-view="login"] .auth-companion-pane { display: none; }
}
@media (max-width: 460px) and (max-height: 690px) {
  body[data-auth-view="login"] .auth-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "contact filing";
    justify-items: start;
    padding-inline: 18px;
  }
  body[data-auth-view="login"] .auth-footer .studio-contact dl > :first-child { display: none; }
}
