/* A single illustrated city behind independently focusable game controls. */
.tower-entrance {
  --ink: #271342;
  color: var(--ink);
  background: #281784;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
.lobby {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: clip;
}
.city, .city img { position: absolute; inset: 0; width: 100%; height: 100%; }
.city { z-index: -1; background: #181263 center / auto 100% no-repeat; }
@media (aspect-ratio > 3/2) {
  .city { background-image: url("lobby/horizon.4ef56de78964.webp"); }
  .city img { max-width: 150svh; }
}
@media (min-width: 601px) and (3/4 < aspect-ratio <= 1/1) {
  .city { background-image: url("lobby/horizon-tablet.90e85d8ea25d.webp"); }
  .city img { max-width: 75svh; }
}
@media (aspect-ratio > 3/2), (min-width: 601px) and (3/4 < aspect-ratio <= 1/1) {
  .city img {
    margin-inline: auto;
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  }
}
.city img { object-fit: contain; }
.console {
  position: relative;
  container-type: inline-size;
  width: min(100%, max(820px, 150svh));
  aspect-ratio: 3/2;
}
.lobby h1, .hero-copy, .book-panel, .start, .portal-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.lobby h1 { top: 1.37%; width: 45.7%; margin: 0; }
.lobby h1 picture, .lobby h1 img { display: block; width: 100%; height: auto; }
.hero-copy, .book-panel, .start, .portal-nav a, .grade-switch [aria-current] {
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.lobby .hero-copy {
  top: 33.2%; width: 41.86%; height: 6.93%;
  display: grid; place-items: center;
  background-image: url("lobby/caption.01f9dcdd5c1a.webp");
  font-size: 2.39cqw; font-weight: 850; line-height: 1.12; letter-spacing: -.045em;
  text-align: center;
}
.hero-copy span { transform: translateY(-.14cqw); }
.hero-copy b { color: #6420a2; }
.book-panel {
  top: 42%; width: 40.24%; height: 20%;
  background-image: url("lobby/panel.932ccc184725.webp");
  color: #1f1641; font-weight: 800;
}
.book-row {
  position: absolute; inset: 9% 5.2% auto 8.3%; height: 38%;
  display: grid; grid-template-columns: 32.4% 1fr; align-items: center;
}
.book-row h2 {
  display: flex; align-items: center; gap: .75cqw;
  margin: 0; font-size: 1.87cqw; font-weight: 850; letter-spacing: -.055em;
}
.book-row h2 img { width: 3.9cqw; }
.grade-switch {
  display: flex; align-items: stretch; height: 78%; min-height: 40px;
  background: #20224e; border-radius: 1.05cqw;
}
.grade-switch a {
  position: relative; flex: 1; display: grid; place-items: center;
  color: #fff6e9; text-decoration: none; font-size: 1.98cqw; letter-spacing: -.035em;
  font-weight: 850; line-height: 1;
}
.grade-switch [aria-current] {
  z-index: 1; margin-block: -.37cqw; color: #21133a;
  background-image: url("lobby/selected.4bed6f46a7b3.webp");
}
.grade-switch a::after { content: ""; position: absolute; inset: -3px 0; }
.rules-strip {
  position: absolute; inset: 50% 5% 12%; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1.1fr 1.21fr; align-items: center; list-style: none;
}
.rules-strip li {
  display: flex; align-items: center; justify-content: center; gap: .65cqw;
  text-align: center; font-size: 1.58cqw; font-weight: 850; line-height: 1.22; letter-spacing: -.04em;
}
.rules-strip li+li { border-left: .14cqw solid #d6b1b6; }
.rules-strip img { width: 2.5cqw; height: 2.5cqw; object-fit: contain; }
.lobby .start {
  top: 63.7%; width: 41.6%; height: 16.5%;
  display: flex; justify-content: center; align-items: center; gap: 1.5cqw;
  isolation: isolate; background: transparent;
  border: 0; box-shadow: none; padding-bottom: .6cqw; color: #471040;
  font-size: 4.44cqw; font-weight: 900; line-height: 1; letter-spacing: -.06em; text-decoration: none;
}
.play-icon { width: 3.15cqw; height: 3.6cqw; object-fit: contain; }
.start::before {
  content: ""; position: absolute; z-index: -1; inset: -15% -14.6% -13%;
  background: url("lobby/start-wide.1ba8ed1848e3.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}
.portal-nav {
  top: 81.25%; left: 51.05%; width: 47%; height: 9.15%;
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65cqw;
}
.portal-nav a {
  display: flex; justify-content: center; align-items: center; gap: .72cqw;
  background-image: url("lobby/small.bf0e57695f94.webp"); color: var(--ink); text-decoration: none;
  font-size: 1.78cqw; font-weight: 850; letter-spacing: -.055em;
}
.portal-nav img { width: 3.5cqw; height: 3cqw; object-fit: contain; }
.lobby-brand {
  position: absolute; top: 2.5%; left: 2.55%;
  display: inline-flex; gap: .42em; align-items: center;
  color: #fff; font-size: clamp(15px,1.98vw,34px); font-weight: 850; letter-spacing: -.05em; text-decoration: none;
}
.lobby-brand span {
  display: grid; place-items: center; width: 1.48em; aspect-ratio: 1; line-height: 1;
  background: #ffda63; color: #19133b; border-radius: .34em;
}
.teacher-share {
  position: absolute; top: 2.5%; right: 2.55%; z-index: 2; color: #241939;
  font-size: 15px; font-weight: 750; background: #fff2d4; border: 2px solid #52356e;
  border-radius: 12px;
}
.teacher-share summary, .teacher-share a { padding: 12px 15px; cursor: pointer; }
.teacher-share a { display: block; text-decoration: none; }
.lobby-guide .cg-guide-entry { display: none; }
.lobby :is(a,summary):focus-visible { outline: 3px solid white; outline-offset: 2px; box-shadow: 0 0 0 7px #351548; border-radius: .45em; }
.lobby :is(.start,.portal-nav a):hover { filter: brightness(1.08); }
.lobby :is(.start,.portal-nav a):active { translate: 0 2px; }
@media (max-aspect-ratio: 1/1) {
  .console { width: min(100%,max(288px,46.15svh)); aspect-ratio: 852/1846; }
  .lobby-brand { display: none; }
  .lobby h1 { top: .87%; width: 84.75%; }
  .lobby .hero-copy { top: 19.5%; width: 72.4%; height: 4.16%; font-size: max(14px,4.32cqw); }
  .book-panel { top: 50.87%; width: 97.1%; height: 16.85%; background-image: url("lobby/panel-phone.63e55c638100.webp"); }
  .book-row { inset: 10% 5.7% auto 7%; height: 40%; grid-template-columns: 34% 1fr; }
  .book-row h2 { gap: 2.2cqw; font-size: max(16px,4.9cqw); }
  .book-row h2 img { width: 10.3cqw; }
  .grade-switch { min-height: 40px; border-radius: 2.8cqw; }
  .grade-switch a { font-size: max(14px,4.7cqw); }
  .grade-switch [aria-current] { margin-block: -.9cqw; }
  .rules-strip { inset: 52% 4% 14%; grid-template-columns: 1.02fr .99fr 1.12fr; }
  .rules-strip li { gap: 1.15cqw; font-size: max(14px,4.15cqw); }
  .rules-strip li+li { border-left-width: .34cqw; }
  .rules-strip img { width: 6.3cqw; height: 6.5cqw; }
  .lobby .start { top: 68.75%; width: 79.8%; height: 9.94%; gap: 3.2cqw; font-size: 9.3cqw; padding-bottom: 1cqw; }
  .start::before { inset: -13.4% -12.2% -9%; background-image: url("lobby/start-phone.242dcfef928a.webp"); }
  .play-icon { width: 6.35cqw; height: 7.3cqw; }
  .portal-nav { top: 79.7%; left: 50%; width: 92.4%; height: 10.25%; gap: 1.9cqw; }
  .portal-nav a { flex-direction: column; gap: 1.1cqw; background-image: url("lobby/small-phone.94f733d1c47d.webp"); font-size: max(14px,4.7cqw); }
  .portal-nav img { width: 12cqw; height: 8.8cqw; }
  .teacher-share { top: auto; bottom: 1%; right: 2%; }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .console { width: min(100%, max(530px, 150svh)); }
  .portal-nav { min-height: 44px; }
  .grade-switch { min-height: 30px; }
  .grade-switch a, .portal-nav a, .book-row h2 { font-size: max(13px,1.8cqw); }
  .rules-strip li, .lobby .hero-copy { font-size: max(12px,2cqw); }
  .grade-switch a::after { inset:-7px 0; }
}
