/* lobby-layout.css: retained cascade position */ /* Close-up character on the left, main actions and prop menu on the right. */
html:has(body[data-screen='lobby']),
body[data-screen='lobby'] {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body[data-screen='lobby'] #app,
.screen-lobby {
  height: 100dvh;
  min-height: 0;
  overflow: clip;
}
.screen-lobby #main {
  height: 100%;
  min-height: 0;
  max-width: none;
  padding: 0;
  position: relative;
}
.screen-lobby #main > .banner {
  position: relative;
  z-index: 5;
  flex: none;
  margin: 100px 4% 0;
  padding: 8px 12px;
}
.screen-lobby .lobby-hero {
  position: absolute;
  inset: 0;
  min-height: 0;
  min-width: 0;
  display: block;
  padding: 0;
}
.screen-lobby .lobby-character {
  position: absolute;
  inset: 0 auto 0 0;
  width: 53%;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  pointer-events: none;
}
.screen-lobby .hero-character {
  position: absolute;
  height: 170dvh;
  width: auto;
  max-height: none;
  max-width: none;
  left: calc(30vw - 62.333dvh);
  top: -1.5dvh;
  bottom: auto;
  transform: none;
  object-fit: contain;
}
.screen-lobby .mode-menu {
  position: absolute;
  left: 54.5%;
  right: 3%;
  top: 14%;
  height: 52%;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 2.3dvh;
}
.screen-lobby .mode-button {
  min-height: 0;
  height: 100%;
  padding: 10px 8%;
  justify-content: center;
}
.screen-lobby .mode-title {
  font-size: clamp(28px, 4.1vw, 68px);
}
.screen-lobby .maintenance-note {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 6px;
  font-size: 11px;
}
.screen-lobby .lobby-dock {
  --dock-size: min(12.5vw, 24dvh);
  position: absolute;
  right: 3%;
  bottom: 4.5%;
  width: auto;
  max-width: none;
  margin: 0;
  display: flex;
  gap: clamp(12px, 2vw, 34px);
  align-items: flex-end;
}
.screen-lobby .lobby-dock .dock-button {
  width: var(--dock-size);
  height: var(--dock-size);
  min-width: 0;
  min-height: 0;
  max-width: none;
  padding: 8px;
  flex: none;
}
.screen-lobby .mode-symbol {
  width: clamp(25px, 4vw, 55px);
  height: clamp(25px, 4vw, 55px);
}
.screen-lobby .mode-arrow {
  margin-left: 0;
}
/* The horizontal pill gives names breathing room; only settings stays outside. */
.lobby-hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.lobby-hud > * {
  position: absolute;
  pointer-events: auto;
}
.screen-lobby .lobby-profile {
  --profile-avatar: clamp(58px, 7.6dvh, 78px);
  top: max(20px, env(safe-area-inset-top));
  left: max(24px, env(safe-area-inset-left));
  width: clamp(260px, 20vw, 360px);
  max-width: calc(100% - 240px);
  gap: 18px;
  padding: 9px 32px 9px 9px;
  border: 1px solid #a28651;
  border-radius: 999px;
  color: #fff5dd;
}
.screen-lobby .lobby-profile .avatar {
  width: var(--profile-avatar);
  height: var(--profile-avatar);
  border-color: #e1c48a;
}
.screen-lobby .lobby-profile .profile-info {
  flex: 1;
  min-width: 0;
}
.screen-lobby .lobby-profile .account-name {
  font-size: clamp(22px, 2vw, 32px);
  max-width: none;
}
.lobby-profile .connection {
  position: absolute;
  bottom: 14px;
  left: calc(9px + var(--profile-avatar) - 8px);
  margin: 0;
  filter: drop-shadow(0 1px 2px #182e3a);
}
.lobby-profile .connection i {
  width: 10px;
  height: 10px;
  border: 1px solid #fff2c6;
  background: #da9751;
}
.lobby-profile .connection.online i {
  background: #7cce91;
}
.lobby-profile .connection-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.lobby-wallet {
  top: max(25px, env(safe-area-inset-top));
  right: calc(max(24px, env(safe-area-inset-right)) + 78px);
}
.lobby-wallet .coin {
  min-width: 150px;
  min-height: 50px;
  padding: 8px 24px;
  border-radius: 999px;
  border: 2px solid #ad884b;
}
.lobby-tools {
  top: max(20px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
  display: flex;
}
.lobby-tools .header-button {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  padding: 14px;
  border: 2px solid #ac874e;
  border-radius: 50%;
}
.lobby-tools .header-button .ui-icon {
  width: 29px;
  height: 29px;
}
.lobby-tools .header-button > span {
  display: none;
}
.lobby-tools .header-button:focus-visible {
  outline-color: #fff7df;
  outline-offset: 4px;
}
@media (min-width: 601px) and (max-aspect-ratio: 1/1) {
  .screen-lobby .hero-character {
    height: 130dvh;
    top: 12dvh;
    left: calc(25vw - 47.667dvh);
  }
  .screen-lobby .mode-menu {
    left: 51%;
    right: 4%;
    top: 23%;
    height: 42%;
    gap: 2dvh;
  }
  .screen-lobby .mode-title {
    font-size: clamp(28px, 4vw, 42px);
  }
  .screen-lobby .lobby-dock {
    --dock-size: 13.5vw;
    right: 4%;
    bottom: 8%;
    gap: 1.5vw;
  }
}
/* Phones keep full-width actions below the close-up, with the dock at the right edge. */
@media (max-width: 600px) {
  .screen-lobby #main {
    padding: calc(max(12px, env(safe-area-inset-top)) + 68px) max(16px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
  .screen-lobby #main > .banner {
    margin: 0 0 6px;
    font-size: 10px;
  }
  .screen-lobby .lobby-hero {
    position: relative;
    inset: auto;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 0;
  }
  .screen-lobby .lobby-character {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .screen-lobby .hero-character {
    height: max(690px, 104dvh);
    top: 0;
    left: calc(50% - max(690px, 104dvh) * 0.36);
    bottom: auto;
    transform: none;
  }
  .screen-lobby .mode-menu {
    position: relative;
    inset: auto;
    display: flex;
    height: auto;
    justify-self: end;
    align-self: end;
    width: 100%;
    max-width: 430px;
    gap: clamp(8px, 1.7dvh, 15px);
    padding: 8px 0 0;
  }
  .screen-lobby .mode-button {
    height: clamp(50px, 8dvh, 80px);
    min-height: 0;
    padding: 8px 22px;
    gap: 16px;
  }
  .screen-lobby .mode-title {
    font-size: clamp(23px, 6.8vw, 29px);
  }
  .screen-lobby .lobby-dock {
    --dock-size: clamp(68px, 10.5dvh, 90px);
    position: relative;
    inset: auto;
    justify-self: end;
    align-self: end;
    width: auto;
    max-width: 100%;
    margin-top: clamp(8px, 2dvh, 17px);
    gap: 10px;
  }
  .screen-lobby .lobby-dock .dock-button {
    width: var(--dock-size);
    height: var(--dock-size);
    min-height: 0;
    max-width: none;
    flex: none;
    padding: 5px 3px 12px;
  }
  .screen-lobby .lobby-profile {
    --profile-avatar: 42px;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    width: clamp(164px, 51vw, 220px);
    max-width: calc(100% - 144px);
    gap: 9px;
    padding: 7px 18px 7px 7px;
  }
  .screen-lobby .lobby-profile .account-name {
    font-size: 17px;
    letter-spacing: 0;
  }
  .lobby-profile .connection {
    left: 41px;
    bottom: 10px;
  }
  .lobby-wallet {
    top: max(20px, env(safe-area-inset-top));
    right: calc(max(10px, env(safe-area-inset-right)) + 48px);
  }
  .lobby-wallet .coin {
    min-width: 64px;
    min-height: 37px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .lobby-tools {
    top: max(16px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
  }
  .lobby-tools .header-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
  }
  .lobby-tools .header-button .ui-icon {
    width: 22px;
    height: 22px;
  }
}
@media (min-width: 601px) and (max-height: 540px) {
  .screen-lobby #main > .banner {
    margin-top: 64px;
    font-size: 10px;
  }
  .screen-lobby .lobby-profile {
    --profile-avatar: 38px;
    top: 10px;
    left: 16px;
    width: 220px;
    gap: 12px;
    padding: 6px 24px 6px 6px;
  }
  .screen-lobby .lobby-profile .account-name {
    font-size: 20px;
  }
  .lobby-profile .connection {
    left: 37px;
    bottom: 8px;
  }
  .lobby-wallet {
    top: 12px;
    right: 72px;
  }
  .lobby-wallet .coin {
    min-width: 100px;
    min-height: 40px;
    padding: 6px 14px;
  }
  .lobby-tools {
    top: 10px;
    right: 16px;
  }
  .lobby-tools .header-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }
  .lobby-tools .header-button .ui-icon {
    width: 24px;
    height: 24px;
  }
  .screen-lobby .hero-character {
    top: 60px;
  }
  .screen-lobby .mode-menu {
    top: 21%;
    height: 48%;
    gap: 2dvh;
  }
  .screen-lobby .mode-title {
    font-size: clamp(23px, 3.7vw, 32px);
  }
  .screen-lobby .mode-button {
    padding: 4px 20px;
    gap: 12px;
  }
  .screen-lobby .lobby-dock {
    --dock-size: 23dvh;
    gap: 14px;
    bottom: 3%;
  }
}
