/* Flapverse flight lobby. Shared visual language with Cosmic Survivor. */
:root {
  --deck-ink: #060d1c;
  --deck-panel: #0b172b;
  --deck-line: #253c54;
  --deck-cyan: #8ce6ed;
  --deck-muted: #a3b8ce;
  --deck-gold: #ffd38a;
  --site-footer-height: 48px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--deck-cyan);
  outline-offset: 4px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.deck-eyebrow {
  color: var(--deck-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.5;
}
.deck-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 14px 22px;
  border: 1px solid #d7ffff;
  border-radius: 12px;
  background: linear-gradient(115deg, #acf4f0, #7bc8ea);
  color: #071727;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 30px #40d5e017;
  transition:
    filter 0.2s,
    transform 0.2s;
}
.deck-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.text-link {
  color: var(--deck-cyan);
  font-size: 14px;
  text-decoration: none;
}
.text-link span {
  margin-left: 12px;
}
body:not([data-route="game"]) {
  overflow: auto;
  background: #060d1c;
  color: #eff7ff;
}
body:not([data-route="game"])::before {
  background:
    linear-gradient(90deg, #060d1ce8, #060d1c40),
    url("/assets/ui/sky-lobby-v1.png") center / cover;
}
body:not([data-route="game"]) .scene {
  visibility: hidden;
}
body:not([data-route="game"]) .site-main {
  min-height: 100dvh;
  padding: 28px clamp(20px, 5vw, 80px) 0;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px 80px;
  align-items: center;
  max-width: 1180px;
  margin: auto;
  min-height: calc(100dvh - 28px);
}
.auth-brand,
.game-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #edf8ff;
  text-decoration: none;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.12em;
}
.auth-brand {
  grid-column: 1/-1;
  align-self: start;
}
.auth-brand img,
.game-brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.auth-brand small,
.game-brand small {
  display: block;
  margin-top: 3px;
  color: #a3b8ce;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-intro h2 {
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin: 22px 0;
}
.auth-intro h2 em,
.lobby-hero h1 em {
  color: #b5edf1;
  font-style: normal;
}
.auth-intro > p:not(.deck-eyebrow) {
  max-width: 350px;
  font-size: 16px;
  line-height: 1.8;
  color: #b5c8dc;
  margin-bottom: 24px;
}
.auth-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 70px;
  color: #adc4d6;
  font-size: 10px;
}
.auth-features span {
  padding-left: 10px;
  border-left: 2px solid #78d9e3;
}
.auth-card {
  padding: 32px;
  background: linear-gradient(135deg, #102138f5, #081326f5);
  border: 1px solid #2c455f;
  border-radius: 22px;
  box-shadow: 0 25px 90px #0006;
  max-width: 440px;
  width: 100%;
  justify-self: end;
}
.auth-card h1 {
  color: #f1f8ff;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 10px 0;
  font-weight: 800;
}
.auth-card header > p:last-child {
  color: var(--deck-muted);
  font-size: 13px;
  line-height: 1.65;
}
.auth-form {
  margin-top: 24px;
}
.auth-card .text-slate-700,
.auth-card .text-slate-800 {
  color: #e3f0fb;
}
.auth-card .text-slate-500,
.auth-card .text-slate-600 {
  color: #aebfd3;
}
.auth-card .text-sky-600,
.auth-card .text-sky-700,
.auth-card a {
  color: #9ae9f0;
}
.auth-card input:not([type="checkbox"]) {
  background: #050f20;
  border: 1px solid #2c415a;
  color: #eef7ff;
  border-radius: 10px;
  box-shadow: none;
}
.auth-card input::placeholder {
  color: #7b91aa;
}
.auth-card input[type="checkbox"] {
  accent-color: #8ce6ed;
}
.auth-card button[type="submit"] {
  color: #092235;
  background: linear-gradient(115deg, #b0f0eb, #7bc8ea);
  border-radius: 10px;
  box-shadow: 0 8px 24px #5cd9e011;
}
.auth-card-footer {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #253c54;
  color: #a5e7ee;
  font-size: 13px;
}
.auth-legal {
  font-size: 11px;
  line-height: 1.7;
  color: #99aec4;
  margin-top: 20px;
}
.auth-legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-information {
  grid-column: 1/-1;
  align-self: end;
  padding: 16px 0;
}
.information-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 24px;
  font-size: 11px;
}
.information-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #b5c9db;
  text-decoration: none;
}
.information-links a:hover {
  color: #adf3f6;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.support-note {
  color: #adc2d6;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 22px;
}
.auth-card .support-action {
  color: #092235;
}
.site-header {
  background: #060d1c;
  border-bottom: 1px solid #253c54;
  gap: 20px;
}
.header-account {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-left: auto;
  color: #b7c9dc;
  font-size: 13px;
}
.header-account > span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-account strong {
  display: flex;
  gap: 7px;
  color: #ffda8f;
  align-items: center;
}
.site-header,
.flight-hud,
.flight-deck,
.store-dialog {
  --readable-text: #ecf5ff;
  --readable-muted: #aebfd4;
  --readable-subtle: #8cabc3;
  --readable-panel: #102239;
  --readable-panel-strong: #17304a;
  --readable-border: #2c465e;
  --readable-divider: #293e56;
  --readable-link: #95e7ef;
  --readable-hover: #1a3550;
}
.account-menu-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  color: #d5eaf8;
  font-size: 12px;
}
.account-menu-link:hover {
  background: #1a3550;
}
.deck-backdrop {
  position: fixed;
  inset: var(--site-header-height) 0 var(--site-footer-height);
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background:
    linear-gradient(115deg, #060d1ccf, #060d1c80),
    url("/assets/ui/sky-lobby-v1.png") center/cover;
}
.flight-deck {
  display: flex;
  flex-direction: column;
  width: min(1160px, 100%);
  max-height: 100%;
  min-height: 0;
  border: 1px solid #36516b;
  border-radius: 22px;
  background: linear-gradient(125deg, #0c192def, #060e1dfa);
  color: #edf6ff;
  overflow: hidden;
  box-shadow: 0 30px 100px #0007;
}
.deck-header {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #263b54;
  background: #081326;
}
.deck-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #aebfd4;
}
.status-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #93e2c4;
  box-shadow: 0 0 12px #93e2c480;
}
.deck-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid #2a4059;
  border-radius: 12px;
  background: #040c1b;
}
.deck-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #a5bad0;
  font-size: 12px;
  font-weight: 700;
}
.deck-tabs button[aria-pressed="true"] {
  background: #1b3c52;
  color: #aaf2f4;
  box-shadow: inset 0 0 0 1px #4e8ba0;
}
.deck-help {
  justify-self: end;
  color: #a9c2d7;
  font-size: 11px;
}
.deck-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  scrollbar-gutter: stable;
}
.lobby-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
}
.lobby-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 410px;
  overflow: hidden;
  border: 1px solid #36506a;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #06102132, #06102120 40%, #061021f0 95%),
    url("/assets/ui/sky-lobby-v1.png") 60% center/cover;
}
.lobby-hero-copy {
  padding: 30px;
  background: linear-gradient(90deg, #061021b0, transparent);
}
.lobby-hero h1 {
  font-size: clamp(32px, 3.5vw, 50px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin: 18px 0;
  text-shadow: 0 2px 12px #06102180;
}
.lobby-hero-copy > p:last-child {
  color: #d1ddea;
  font-size: 13px;
  line-height: 1.7;
  max-width: 285px;
}
.lobby-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 22px 28px;
  border-top: 1px solid #b4e6ff26;
  background: #071326b0;
}
.lobby-stats span {
  color: #abc0d4;
  font-size: 10px;
}
.lobby-stats strong {
  display: block;
  margin-top: 5px;
  color: #f0f8ff;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
}
.lobby-stats .gold-value {
  color: var(--deck-gold);
}
.lobby-setup {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 8px 4px;
  min-width: 0;
}
.lobby-setup h2 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.035em;
  margin-top: 4px;
}
.loadout-card {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #2a4058;
  border-radius: 12px;
  background: linear-gradient(110deg, #193449, #0c1a2e);
  padding: 12px;
}
.loadout-card img {
  width: 84px;
  height: 65px;
  object-fit: contain;
}
.loadout-card > div {
  min-width: 0;
  flex: 1;
}
.loadout-card span {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  color: #9bb7ce;
  letter-spacing: 0.1em;
}
.loadout-card strong {
  display: block;
  font-size: 14px;
  margin: 4px 0;
}
.loadout-card small {
  display: block;
  color: #aebfd4;
  font-size: 10px;
}
.loadout-card button {
  padding: 12px;
  border: 1px solid #3a536a;
  border-radius: 9px;
  color: #a5eaf0;
}
.lobby-powerups h3 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}
.lobby-powerups h3 span {
  font-size: 10px;
  font-weight: 400;
  color: #94aec6;
}
.lobby-powerups p {
  color: #a3b8ce;
  font-size: 12px;
  line-height: 1.7;
}
.powerup-choices {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.powerup-choices button {
  display: flex;
  flex: 1;
  min-width: 115px;
  align-items: center;
  text-align: left;
  gap: 7px;
  padding: 7px;
  border: 1px solid #314861;
  border-radius: 9px;
  background: #0e2036;
  font-size: 10px;
}
.powerup-choices button[aria-pressed="true"] {
  border-color: #91e2e8;
  background: #183d4b;
}
.powerup-choices img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.powerup-choices small {
  display: block;
  color: #abc2d6;
  margin-top: 3px;
}
.play-action {
  margin-top: auto;
  width: 100%;
}
.play-action > span {
  margin-left: auto;
}
.controls-hint {
  text-align: center;
  color: #a4b7cd;
  font-size: 10px;
  margin-top: -8px;
}
kbd {
  padding: 2px 5px;
  border: 1px solid #3b5067;
  border-radius: 4px;
  font-size: 9px;
}
.lobby-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #253c54;
}
.lobby-audio > span {
  margin-right: auto;
  font-size: 10px;
  color: #9cb4ca;
}
.lobby-audio button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid #30465d;
  border-radius: 8px;
  color: #92a8be;
  font-size: 10px;
}
.lobby-audio button[aria-pressed="true"] {
  color: #a8ecf0;
  background: #173047;
}
.lobby-shortcuts {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lobby-shortcuts > * {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 14px;
  padding: 17px;
  border: 1px solid #2a4058;
  border-radius: 12px;
  color: #a6e7ed;
  background: #0d1b2e;
  text-decoration: none;
  transition: background 0.2s;
}
.lobby-shortcuts > *:hover {
  background: #193149;
}
.lobby-shortcuts strong {
  display: block;
  color: #e9f4fc;
  font-size: 12px;
}
.lobby-shortcuts small {
  display: block;
  font-size: 10px;
  color: #9db5cc;
  margin-top: 4px;
}
.lobby-shortcuts > * > span:last-child {
  margin-left: auto;
}
.deck-workspace {
  max-width: 850px;
  margin: 0 auto;
  min-height: 430px;
}
.workspace-heading {
  margin: 0 0 24px;
}
.workspace-heading h1 {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.04em;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.workspace-heading > p:last-child {
  color: #a7bdd3;
  font-size: 13px;
}
.game-information {
  position: fixed;
  z-index: 100;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: var(--site-footer-height);
  display: grid;
  align-items: center;
  background: #060d1c;
  border-top: 1px solid #253c54;
}
body[data-game-phase="playing"] .game-information {
  display: none;
}
.store-backdrop {
  bottom: var(--site-footer-height);
  padding: 24px;
  background: #030a16d9;
}
.store-dialog {
  max-width: 1160px;
  background: #081427;
  border: 1px solid #36516b;
  border-radius: 22px;
  padding: 24px;
  color: #edf6ff;
}
.store-item {
  display: flex;
  flex-direction: column;
  background: #0f2136;
  border-radius: 14px;
}
.store-item > button {
  margin-top: auto;
  transform: none;
  border-radius: 9px;
  background: #95dee9;
  color: #07192a;
}
.store-item > div:nth-child(2) {
  flex-direction: column;
  gap: 9px;
  padding-bottom: 16px;
}
.store-item h3 {
  font-size: 16px;
}
.store-item p {
  font-size: 11px;
}
.store-tabs button {
  border-radius: 9px;
}
@media (max-width: 1000px) {
  .auth-layout {
    gap: 28px;
  }
  .deck-heading {
    display: none;
  }
  .deck-header {
    grid-template-columns: 1fr auto;
  }
  .lobby-hero-copy {
    padding: 24px;
  }
  .lobby-hero {
    min-height: 380px;
  }
  .lobby-shortcuts > * {
    gap: 8px;
    padding: 14px;
  }
}
@media (max-width: 720px) {
  :root {
    --site-header-height: 66px;
    --site-footer-height: 74px;
  }
  body:not([data-route="game"]) .site-main {
    padding: 20px 20px 0;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: calc(100dvh - 20px);
  }
  .auth-intro {
    display: none;
  }
  .auth-card {
    justify-self: center;
    max-width: 440px;
    padding: 26px;
  }
  .auth-brand {
    font-size: 15px;
  }
  .auth-information {
    padding: 10px 0 16px;
  }
  .information-links {
    gap: 0 18px;
    max-width: 400px;
    margin: auto;
    font-size: 10px;
  }
  .site-header {
    gap: 12px;
    padding: 10px 16px;
  }
  .game-brand {
    font-size: 13px;
    gap: 8px;
  }
  .game-brand img {
    width: 34px;
    height: 34px;
  }
  .game-brand small {
    font-size: 7px;
  }
  .header-account {
    font-size: 12px;
    gap: 8px;
  }
  .header-account > span {
    display: none;
  }
  .site-header [data-game-menu] > button {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .deck-backdrop {
    padding: 12px;
  }
  .flight-deck {
    border-radius: 16px;
  }
  .deck-header {
    display: block;
    padding: 12px;
  }
  .deck-help {
    display: none;
  }
  .deck-tabs button {
    font-size: 11px;
    min-height: 40px;
    padding: 8px;
  }
  .deck-body {
    padding: 14px;
  }
  .lobby-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .lobby-hero {
    min-height: 250px;
    background-position: center 45%;
  }
  .lobby-hero-copy {
    padding: 22px;
  }
  .lobby-hero h1 {
    font-size: 32px;
    margin: 12px 0;
  }
  .lobby-hero-copy > p:last-child {
    font-size: 11px;
    max-width: 220px;
  }
  .lobby-stats {
    padding: 14px 22px;
  }
  .lobby-stats strong {
    font-size: 22px;
  }
  .lobby-stats span {
    font-size: 9px;
  }
  .lobby-setup {
    gap: 16px;
    padding: 0;
  }
  .lobby-setup h2 {
    font-size: 22px;
  }
  .lobby-shortcuts {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .lobby-shortcuts > * {
    padding: 14px;
  }
  .lobby-shortcuts small {
    font-size: 11px;
  }
  .lobby-shortcuts strong {
    font-size: 13px;
  }
  .deck-workspace {
    min-height: 350px;
  }
  .workspace-heading h1 {
    font-size: 25px;
  }
  .deck-workspace button {
    overflow-wrap: anywhere;
  }
  .store-backdrop {
    padding: 12px;
  }
  .store-dialog {
    padding: 16px;
    border-radius: 16px;
  }
  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .store-item {
    padding: 9px;
  }
  .store-item h3 {
    font-size: 13px;
  }
  .store-item button {
    font-size: 11px;
    padding: 10px 6px;
  }
  .store-item > div:first-child {
    height: 100px;
  }
  .store-item p {
    line-height: 1.6;
  }
  .store-tabs {
    gap: 6px;
  }
  .store-tabs button {
    padding: 10px;
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .store-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 20px;
  }
  .loadout-card img {
    width: 60px;
  }
  .lobby-stats {
    padding: 14px;
  }
  .information-links {
    gap: 0 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flight-deck,
  .deck-backdrop,
  .deck-primary {
    animation: none !important;
    transition: none;
  }
  .deck-primary:hover {
    transform: none;
  }
}
@media (max-width: 720px) {
  .lobby-hero {
    min-height: 210px;
  }
  .lobby-hero-copy {
    padding: 20px;
  }
  .lobby-hero-copy > p:last-child {
    display: none;
  }
  .lobby-setup > div:first-child {
    order: 0;
  }
  .lobby-setup .loadout-card {
    order: 1;
  }
  .lobby-setup .play-action {
    order: 2;
  }
  .lobby-setup .controls-hint {
    order: 3;
  }
  .lobby-setup .lobby-powerups {
    order: 4;
  }
  .lobby-setup .lobby-audio {
    order: 5;
  }
  .deck-workspace {
    min-width: 0;
  }
  .deck-workspace > div {
    min-width: 0;
  }
  .profile-tabs > button {
    padding: 12px 5px;
    font-size: 12px;
    overflow-wrap: normal;
  }
}
.profile-details {
  grid-template-columns: minmax(0, 1fr);
}
.profile-details > * {
  min-width: 0;
}
@media (max-width: 360px) {
  .profile-tabs > button {
    font-size: 10px;
    padding-inline: 2px;
  }
}

.flight-hud > div, .flight-hud > button { border-radius:12px; background:#0a192deb; }
.session-state { position:relative; margin:12vh auto; color:#edf6ff; background:#0c1b30; border-color:#36516b; border-radius:20px; }
.session-state h2 { color:#edf6ff; font-size:26px; }
.session-state p { color:#abc5d9; }
