@layer rc-legacy {
/* Canvas-only trial: shared controls and pseudo-elements stay free of CSS
 * animations/transitions while the scene draws independently in canvas. */
.auth-entry, .auth-entry *, .auth-entry *::before, .auth-entry *::after {
  animation: none !important;
  transition: none !important;
}
/* Auth-only presentation. Keep form actions and the persistent lounge canvas in
 * app.js; control colours continue to come from the shared rc-system layer. */
.auth-screen.auth-entry {
  --entry-gutter: clamp(28px, 5vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(48px, 7vw, 120px);
  row-gap: 36px;
  align-items: center;
  width: 100%;
  height: var(--app-height, 100dvh);
  min-height: 0;
  padding: 30px var(--entry-gutter) 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: radial-gradient(ellipse at 18% 58%, color-mix(in srgb, var(--rc-accent) 7%, transparent), transparent 55%), var(--rc-bg-deep);
  color: var(--rc-ink);
  isolation: isolate;
}
.auth-entry .auth-atmosphere { z-index: -1; }
.auth-entry .signal-grid { display: none; }
.auth-entry .signal-ribbon { opacity: .12; filter: none; width: 100%; left: 0; animation: none; }
.auth-entry .ribbon-a { top: 38%; transform: rotate(-19deg); background: linear-gradient(90deg, transparent, var(--rc-border-hover), transparent); }
.auth-entry .ribbon-b { display: none; }
.auth-entry .ribbon-c { top: 82%; transform: rotate(-19deg); background: linear-gradient(90deg, transparent, var(--rc-border-hover), transparent); }
.auth-entry-mast {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rc-border);
}
.auth-entry-brand { display: flex; align-items: center; gap: 10px; }
.auth-entry-brand .auth-logo { width: 42px; height: 42px; }
.auth-entry-brand > span { display: flex; align-items: baseline; font-size: 25px; letter-spacing: -1px; font-weight: 700; }
.auth-entry-brand-light { font-weight: 450; color: var(--rc-muted); }
.auth-entry-brand i { width: 6px; height: 6px; border-radius: 50%; background: var(--rc-accent); margin-left: 4px; }
.auth-entry .auth-showcase {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 900px;
  margin: 0;
  animation: none;
}
.auth-entry-scene { margin: 0; position: relative; }
.auth-entry-caption { margin: 0 0 16px; color: var(--rc-ink); font-size: clamp(32px, 3.4vw, 54px); line-height: 1.15; letter-spacing: -.04em; font-weight: 600; }
.auth-entry .auth-lounge-stage {
  height: clamp(320px, 50vh, 540px);
  background: transparent;
  margin: 0 -12px;
  /* Both axes reach fully transparent at the actual rectangle edges.
   * Fade only the perimeter; keep faces and labels at full opacity. */
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-composite: intersect;
}
.auth-entry .call-surface::before, .auth-entry .call-surface::after { display: none; }
.auth-entry .auth-card {
  width: 100%;
  max-width: 400px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}
.auth-entry .auth-card::before { display: none; }
.auth-entry-heading { margin-bottom: 30px; }
.auth-entry-heading h2 { margin: 0; font-size: 32px; line-height: 1.2; letter-spacing: -.035em; font-weight: 650; }
.auth-entry .auth-credentials-stack { gap: 0; }
.auth-entry .auth-workspace-invite.active { margin-bottom: 20px; }
.auth-entry .auth-form { gap: 18px; }
.auth-entry .field { gap: 10px; text-transform: none; font-size: 13px; font-weight: 500; }
.auth-entry .input { min-height: 52px; padding: 14px 16px; font-size: 16px; border-radius: 12px; }
.auth-entry .auth-submit { min-height: 52px; margin-top: 6px; border-radius: 12px; font-size: 15px; }
.auth-entry .auth-switch { min-height: 36px; margin: 0; padding: 6px 0; font-size: 14px; font-weight: 500; }
.auth-entry .auth-form > .auth-switch.muted { margin-top: -12px; font-size: 13px; }
.auth-entry .auth-legal-note { margin: 14px 0 0; font-size: 11px; line-height: 1.6; }
.auth-entry .auth-legal-note a { text-decoration: none; }
.auth-entry .auth-legal-note a:hover { text-decoration: underline; }
.auth-entry .auth-legal-consent { line-height: 1.5; }
.auth-entry :is(button, a):focus-visible { outline: 2px solid var(--rc-accent); outline-offset: 4px; }
.auth-entry-footer { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--rc-border); color: var(--rc-muted); font-size: 11px; }
@media (min-width: 961px) {
  .auth-entry .auth-card::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(-1 * clamp(24px, 3.5vw, 60px)); width: 1px; background: var(--rc-border); pointer-events: none; }
}
@media (max-width: 960px) {
  .auth-screen.auth-entry, .auth-screen.auth-entry:has(input[name="passwordConfirm"]) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    height: var(--mobile-viewport-height, var(--app-height, 100dvh));
    padding: max(16px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    -webkit-overflow-scrolling: touch;
  }
  .auth-entry-mast { order: 0; flex-shrink: 0; padding-bottom: 14px; }
  .auth-entry-brand > span { font-size: 23px; }
  .auth-entry-brand .auth-logo { width: 34px; height: 34px; }
  .auth-entry .auth-showcase { display: contents; }
  /* The decorative caption/canvas must not add a second screen below mobile
   * auth. Keep the brand and the complete form in the existing scroll owner. */
  .auth-entry-caption, .auth-entry-scene { display: none; }
  .auth-entry .auth-card { order: 2; flex: 0 0 auto; width: min(100%, 440px); max-width: 440px; margin: 20px auto 0; }
  .auth-entry-heading { margin-bottom: 18px; }
  .auth-entry-heading h2 { font-size: 22px; }
  .auth-entry .auth-form { gap: 10px; }
  .auth-entry .auth-switch { min-height: 44px; }
  .auth-entry .auth-form > .auth-switch.muted { margin-top: -10px; }
  .auth-entry .auth-legal-note { margin-top: 4px; }
  .auth-entry-footer { order: 4; flex: 0 0 auto; margin-top: auto; padding-top: 14px; }
}
@media (max-width: 360px) {
  .auth-screen.auth-entry, .auth-screen.auth-entry:has(input[name="passwordConfirm"]) { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-entry .auth-card, .auth-entry .auth-showcase { animation: none; }
}
}
