body.auth-locked { overflow: hidden; }
.app-boot {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  align-content: center; gap: 18px; padding: 24px; background: #0c111b; color: #f4f1eb;
  text-align: center;
}
.app-booting .app-boot { display: grid; }
.app-booting .auth-gate, .app-booting .app-shell { display: none; }
[data-appearance="light"] .app-boot { background: #f3f6fa; color: #182536; }
[data-appearance="light"] .app-boot p { color: #556477; }
.app-boot-brand { display: flex; align-items: center; gap: 10px; font: 700 24px/1.1 var(--display, sans-serif); }
.app-boot-brand > span:last-child > span { color: #efbd68; }
.app-boot-mark {
  display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #efbd68;
  border-radius: 11px; color: #efbd68; font-size: 14px; letter-spacing: -.02em;
}
.app-boot p { max-width: 42ch; margin: 0; color: #b8c2cf; font-size: 14px; line-height: 1.5; }
.app-booting .app-boot-mark { animation: app-boot-pulse 1.1s ease-in-out infinite alternate; }
@keyframes app-boot-pulse { from { opacity: .55; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.app-shell[aria-hidden="true"] { display: none; }
.auth-gate {
  position: fixed; inset: 0; z-index: 100; overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr;
  background: #101a2b; color: #f1eee7; font: 14px/1.5 'DM Sans', sans-serif;
  transition: opacity .28s ease, visibility .28s;
  scrollbar-color: #53667c #101a2b;
}
.auth-gate.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.auth-gate ::selection { background: #efbd68; color: #17283e; }
.auth-gate svg { width: 16px; height: 16px; flex-shrink: 0; }
.auth-story {
  background: #17283e; padding: clamp(32px, 4.2vw, 68px);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  min-height: 640px;
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font: 700 28px 'Space Grotesk', sans-serif; letter-spacing: -1px;
  position: relative; z-index: 1;
}
.auth-brand > span > span, .auth-brand-mark { color: #efbd68; }
.auth-brand .auth-brand-mark { width: 29px; height: 29px; }
.auth-story-copy { margin: auto 0; padding: 60px 0 44px; position: relative; z-index: 1; }
.auth-story-copy h1 {
  font: 500 clamp(42px, 4.6vw, 66px)/1.09 'Space Grotesk', sans-serif;
  letter-spacing: -.03em; margin: 0 0 24px; max-width: 11ch;
}
.auth-story-copy h1 em { color: #efbd68; font-style: normal; }
.auth-story-copy p { color: #bbcad9; font-size: 16px; line-height: 1.8; max-width: 34ch; margin: 0; }
.auth-story-foot {
  position: relative; z-index: 1; color: #b8c8d9; font-size: 12px;
  display: flex; gap: 10px; align-items: center; border-top: 1px solid #3b4a5c; padding-top: 22px;
}
.auth-story-foot svg { color: #efbd68; }
.auth-sigil { position: absolute; width: 440px; height: 440px; right: -200px; top: 30%; transform: rotate(45deg); border: 1px solid #efbd681b; pointer-events: none; }
.auth-sigil::before, .auth-sigil::after { content: ''; position: absolute; inset: 44px; border: 1px solid #efbd681b; }
.auth-sigil::after { inset: 88px; }
.auth-access { padding: 30px clamp(28px, 4vw, 64px) 28px; display: flex; flex-direction: column; min-width: 0; min-height: 640px; }
.auth-panel { width: 100%; max-width: 390px; margin: auto; padding: 35px 0; }
.auth-panel-head { margin-bottom: 29px; }
.auth-panel h2 { font: 600 clamp(28px, 2.8vw, 36px)/1.15 'Space Grotesk', sans-serif; letter-spacing: -.03em; margin: 0 0 12px; }
.auth-panel-head p { color: #afbed0; font-size: 14px; margin: 0; line-height: 1.65; max-width: 34ch; }
.auth-options { display: grid; gap: 12px; }
.auth-provider {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 16px 17px; border: 1px solid #35465d; background: #152237; color: #f1eee7;
  border-radius: 10px; min-height: 76px; transition: background .18s, border-color .18s;
}
.auth-provider:hover:not(:disabled) { background: #1d2e45; border-color: #efbd68; }
.auth-provider > span { display: grid; gap: 4px; min-width: 0; }
.auth-provider strong { font-size: 14px; font-weight: 600; }
.auth-provider small { font-size: 12px; color: #afbed0; }
.auth-provider > svg, .auth-provider > img { width: 24px; height: 24px; flex-shrink: 0; }
.auth-provider .auth-arrow { width: 16px; height: 16px; margin-left: auto; color: #afbed0; }
.auth-provider:disabled { cursor: not-allowed; }
.auth-provider:disabled .auth-arrow { opacity: .35; }
.auth-provider[aria-busy="true"] { opacity: .72; }
.auth-separator { display: flex; align-items: center; gap: 12px; color: #afbed0; font-size: 12px; margin: 24px 0 17px; }
.auth-separator::before, .auth-separator::after { content: ''; height: 1px; background: #35465d; flex: 1; }
.auth-guest {
  width: 100%; border: 1px solid #35465d; border-radius: 10px; background: transparent; color: #f1eee7;
  padding: 14px 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 14px; min-height: 50px; transition: background .18s, border-color .18s;
}
.auth-guest:hover { background: #1d2e45; border-color: #efbd68; }
.auth-guest-note { text-align: center; color: #afbed0; font-size: 12px; margin: 11px 0 0; }
.auth-privacy-note { color: #8497ad; font-size: 11px; line-height: 1.5; margin: 10px auto 0; max-width: 40ch; text-align: center; }
.auth-privacy { display: flex; justify-content: center; align-items: center; gap: 7px; color: #afbed0; font-size: 12px; margin: 0; }
.auth-build { margin: 7px 0 0; color: #71869d; font: 600 9px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .03em; text-align: center; }
.auth-status, .auth-error { font-size: 12px; line-height: 1.6; margin: 18px 0 0; }
.auth-status { color: #afbed0; }
.auth-error { color: #f4aaa5; }
.auth-status:empty, .auth-error[hidden] { display: none; }
.auth-gate button:focus-visible { outline: 3px solid #efbd68; outline-offset: 4px; }
#auth-welcome:focus { outline: none; }
@media (max-width: 760px) {
  .auth-gate { display: block; }
  .auth-story { min-height: auto; padding: 26px 28px; }
  .auth-story-copy { padding: 40px 0 12px; }
  .auth-story-copy h1 { font-size: 38px; max-width: 16ch; margin-bottom: 14px; }
  .auth-story-copy p { max-width: 42ch; font-size: 14px; }
  .auth-story-foot { display: none; }
  .auth-access { padding: 14px 27px 25px; min-height: auto; }
  .auth-panel { padding: 20px 0 30px; max-width: 410px; }
  .auth-panel-head { margin-bottom: 24px; }
  .auth-panel h2 { font-size: 28px; }
  .auth-provider { gap: 12px; padding: 16px 14px; }
}
@media (prefers-reduced-motion: reduce) { .auth-gate, .auth-provider, .auth-guest { transition: none; } .app-booting .app-boot-mark { animation: none; } }
