:root {
  --lobby-wood: #6b351b;
  --lobby-wood-deep: #2d130d;
  --lobby-cream: #fff2c8;
  --lobby-coral: #ff6246;
  --lobby-green: #73c923;
  --lobby-red: #b5342b;
  --lobby-cyan: #68e8ff;
  --lobby-shadow: 0 0.8svh 1.7svh rgba(16, 31, 30, 0.48);
}

.screen-queue,
.screen-queue .gdd-screen-host,
.screen-queue .gdd-lobby {
  width: 100%;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}

.screen-queue .gdd-global-bar { display: none; }
.screen-queue .gdd-screen-host { position: relative; }

.gdd-lobby {
  position: relative;
  isolation: isolate;
  background: #163c42;
  color: var(--lobby-cream);
  font-family: var(--font-ui);
  text-shadow: 0 2px 0 #39150f, 0 0 5px rgba(45, 15, 10, 0.65);
}

.gdd-lobby button,
.gdd-lobby input { font: inherit; }

.gdd-lobby-world {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-image: linear-gradient(rgba(3, 28, 35, 0.03), rgba(3, 28, 35, 0.1)), var(--lobby-background);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.gdd-lobby-world img[aria-hidden="true"] { pointer-events: none; user-select: none; }
.gdd-lobby .gdd-landscape-gate { display: none; }

.gdd-lobby-title {
  position: absolute;
  z-index: 5;
  left: 33.5%;
  top: 2.6%;
  width: 33%;
  height: 18%;
  display: grid;
  place-items: center;
}

.gdd-lobby-title > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gdd-lobby-title h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 1.2%;
  color: #fff4d5;
  font-size: clamp(1.45rem, 3.15vw, 3.25rem);
  font-weight: 1000;
  letter-spacing: 0.025em;
  line-height: 1;
}

.gdd-lobby-mode-rail {
  position: absolute;
  z-index: 6;
  left: 0.8%;
  top: 3.5%;
  width: 23.5%;
  height: 36%;
}

.gdd-lobby-mode-rail > img,
.gdd-lobby-settings > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gdd-lobby-mode-rail > div {
  position: absolute;
  inset: 13% 13% 12% 13%;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 1.5%;
}

.gdd-lobby-mode-rail button {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff5da;
  text-align: left;
}

.gdd-lobby-mode-row { position: absolute; inset: -14% -8%; width: 116%; height: 128%; object-fit: fill; }
.gdd-lobby-mode-icon { position: absolute; z-index: 1; left: 4%; top: 9%; width: 22%; height: 82%; object-fit: contain; }
.gdd-lobby-mode-rail button strong {
  position: absolute;
  z-index: 1;
  left: 28%;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  overflow: hidden;
  font-size: clamp(0.58rem, 1.13vw, 1.12rem);
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.gdd-lobby-mode-rail button[aria-pressed="true"] strong { color: #fffef1; }

.gdd-lobby-settings {
  position: absolute;
  z-index: 6;
  right: 0.4%;
  top: 11.2%;
  width: 22.4%;
  height: 34%;
}

.gdd-lobby-settings > img { transform: scale(1.1, 1.08); }

.gdd-lobby-settings > div {
  position: absolute;
  inset: 15% 12% 14%;
  display: grid;
  grid-template-rows: 1fr 0.86fr 1fr 1.25fr;
  align-items: center;
}

.gdd-lobby-settings label,
.gdd-lobby-settings p {
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4%;
  border-bottom: 1px solid rgba(255, 231, 178, 0.3);
  color: #fff4d6;
  font-size: clamp(0.52rem, 0.92vw, 0.9rem);
  font-weight: 1000;
  line-height: 1.05;
}

.gdd-lobby-settings p span { color: #ffe9b1; text-align: right; }
.gdd-lobby-settings [data-testid="lobby-room-code"] { letter-spacing: 0.09em; }
.gdd-lobby-room-code-row { gap: 2% !important; }
.gdd-lobby-room-code-row > strong { flex: 1 1 auto; }
.gdd-lobby-room-code-row > [data-testid="lobby-room-code"] { flex: 0 0 auto; }
.gdd-lobby-room-actions { flex: 0 0 auto; display: flex !important; gap: 0.2rem !important; }
.gdd-lobby-settings [data-testid="lobby-copy-code"],
.gdd-lobby-settings [data-testid="lobby-open-join"] {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0.22rem 0.45rem;
  border: 2px solid #d99b42;
  border-radius: 0.42rem;
  background: #5b2c18;
  color: #fff6d6;
  font-size: 0.62em;
  font-weight: 1000;
}
.gdd-lobby-settings [data-testid="lobby-open-join"] { border-color: #72dff2; color: #bff7ff; }

.gdd-lobby-switch {
  position: relative;
  flex: 0 0 auto;
  width: clamp(38px, 4vw, 62px);
  height: clamp(22px, 2.15vw, 34px);
  padding: 0;
  border: 2px solid #3e210f;
  border-radius: 99px;
  background: #693b25;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45);
}

.gdd-lobby-switch span {
  position: absolute;
  top: 8%;
  left: 6%;
  width: 43%;
  aspect-ratio: 1;
  border: 2px solid #bda56c;
  border-radius: 50%;
  background: #eee7cf;
  transition: left 120ms ease;
}

.gdd-lobby-switch[aria-checked="true"] { background: #72c51f; }
.gdd-lobby-switch[aria-checked="true"] span { left: 51%; }

.gdd-lobby-seats {
  position: absolute;
  z-index: 4;
  left: 6.5%;
  right: 6.5%;
  top: 44.5%;
  height: 36.5%;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
}

.gdd-lobby-seat {
  position: relative;
  min-width: 0;
  height: 100%;
  color: #fff4d5;
  text-align: center;
}

.gdd-lobby-seat-frame { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: fill; }
.gdd-lobby-seat-number {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 0;
  transform: translate(-50%, -9%);
  width: 22%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: max(1px, 0.18vw) solid #f6ca70;
  border-radius: 50%;
  background: linear-gradient(#7d3b20, #3c190f);
  color: #fff9df;
  font-size: clamp(0.62rem, 1.35vw, 1.32rem);
  box-shadow: var(--lobby-shadow);
}

.gdd-lobby-host {
  position: absolute;
  z-index: 6;
  left: -15%;
  top: 6%;
  width: 34%;
  height: 13%;
  display: grid;
  place-items: center;
}

.gdd-lobby-host img { position: absolute; inset: -25% -8%; width: 116%; height: 150%; object-fit: contain; }
.gdd-lobby-host b { position: relative; margin-top: 26%; color: #fff5c9; font-size: clamp(0.36rem, 0.58vw, 0.56rem); }

.gdd-lobby-seat-portrait {
  position: absolute;
  z-index: 2;
  left: 17%;
  top: 8%;
  width: 66%;
  height: auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: clamp(3px, 0.36vw, 6px) solid #e5ad4b;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #4a2718 0 58%, #241009 100%);
  box-shadow:
    inset 0 0 0 clamp(2px, 0.16vw, 3px) #6a351c,
    0 0 0 clamp(2px, 0.14vw, 3px) #3c1a10,
    0 0.35rem 0.5rem rgba(0, 0, 0, 0.45);
}

.gdd-lobby-seat-puppy { width: 90%; height: 90%; object-fit: contain; object-position: center; filter: drop-shadow(0 0.35rem 0.2rem rgba(0, 0, 0, 0.45)); }
.gdd-lobby-seat-portrait button { width: 100%; height: 100%; padding: 13%; border: 0; border-radius: 50%; background: transparent; }
.gdd-lobby-seat-portrait button img { width: 100%; height: 100%; object-fit: contain; }

.gdd-lobby-seat-copy {
  position: absolute;
  z-index: 3;
  left: 19%;
  right: 19%;
  top: 48.2%;
  height: 31%;
  display: grid;
  grid-template-rows: 38% 62%;
  align-items: center;
}

.gdd-lobby-seat-copy h3,
.gdd-lobby-seat-copy strong,
.gdd-lobby-seat-copy small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gdd-lobby-seat-copy h3 { margin: 0; color: #fff3cc; font-size: clamp(0.48rem, 0.92vw, 0.9rem); line-height: 1; }
.gdd-lobby-seat-copy strong { color: #6ee7ff; font-size: clamp(0.39rem, 0.67vw, 0.66rem); }
.gdd-lobby-seat-copy small { margin-top: 4%; color: #f4d9a9; font-size: clamp(0.32rem, 0.55vw, 0.54rem); }

.gdd-lobby-ping { display: flex; align-items: end; justify-content: center; gap: 2%; height: 38%; margin-top: 3%; }
.gdd-lobby-ping i { width: 6%; height: 25%; border-radius: 99px; background: #83d530; box-shadow: 0 0 4px #65d927; }
.gdd-lobby-ping i:nth-child(2) { height: 45%; }
.gdd-lobby-ping i:nth-child(3) { height: 67%; }
.gdd-lobby-ping i:nth-child(4) { height: 90%; }
.gdd-lobby-ping[data-quality="3"] i:nth-child(4),
.gdd-lobby-ping[data-quality="2"] i:nth-child(n+3),
.gdd-lobby-ping[data-quality="1"] i:nth-child(n+2) { background: #654932; box-shadow: none; }
.gdd-lobby-ping b { margin-left: 4%; color: #f4ddad; font-size: clamp(0.31rem, 0.5vw, 0.5rem); }

.gdd-lobby-ready-state {
  position: absolute;
  z-index: 3;
  left: 22%;
  right: 22%;
  top: 80.5%;
  color: #fff7d4;
  font-size: clamp(0.38rem, 0.68vw, 0.67rem);
  font-weight: 1000;
}
.gdd-lobby-ready-state.is-ready { color: #baff85; }
.gdd-lobby-ready-state.is-not-ready,
.gdd-lobby-ready-state.is-disconnected { color: #ffb48d; }

.gdd-lobby-footer { position: absolute; z-index: 8; inset: 0; pointer-events: none; }
.gdd-lobby-footer button,
.gdd-lobby-footer form { pointer-events: auto; }

.gdd-lobby-image-button { position: absolute; min-height: 44px; padding: 0; border: 0; background: transparent; color: #fff8dc; }
.gdd-lobby-image-button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.gdd-lobby-image-button strong { position: relative; z-index: 1; display: grid; width: 100%; height: 100%; place-items: center; font-size: clamp(0.72rem, 1.55vw, 1.55rem); font-weight: 1000; }
.gdd-lobby-image-button:disabled { opacity: 0.55; filter: grayscale(0.45); }
.gdd-lobby-image-button.is-leave { left: 2.2%; bottom: 3%; width: 14%; height: 10.5%; }
.gdd-lobby-image-button.is-start { left: 35.5%; bottom: 2.4%; width: 29%; height: 13.5%; }
.gdd-lobby-image-button.is-ready { right: 15.5%; bottom: 3%; width: 13.5%; height: 10.5%; }

.gdd-lobby-chat {
  position: absolute;
  left: 18.5%;
  bottom: 1.7%;
  width: 28.5%;
  height: 8%;
  margin: 0;
  display: block;
  align-items: center;
}
.gdd-lobby-chat > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.gdd-lobby-chat > div { display: none; }
.gdd-lobby-chat input {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 76%;
  height: 100%;
  margin: 0 0 0 7%;
  padding: 0 2%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff4d5;
  text-shadow: none;
  font-size: clamp(0.48rem, 0.77vw, 0.75rem);
}
.gdd-lobby-chat input::placeholder { color: #d9ba91; }
.gdd-lobby-chat button { position: absolute; z-index: 2; right: 5%; top: 50%; min-width: 44px; height: 44px; transform: translateY(-50%); border: 0; background: transparent; color: #fff0c9; font-size: 0.62rem; font-weight: 1000; }

.gdd-lobby-friends {
  position: absolute;
  right: 1.5%;
  bottom: 1.5%;
  width: 11.5%;
  height: 17%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff4d5;
}
.gdd-lobby-friends img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gdd-lobby-friends strong { position: absolute; z-index: 1; left: 15%; right: 15%; bottom: 18%; font-size: clamp(0.48rem, 0.92vw, 0.9rem); }

.gdd-lobby-friends-drawer {
  position: absolute;
  z-index: 20;
  right: 1.2%;
  bottom: 16%;
  width: 24%;
  height: 31%;
  color: #fff4d5;
}
.gdd-lobby-friends-drawer[hidden] { display: none; }
.gdd-lobby-friends-drawer > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.gdd-lobby-friends-drawer > div { position: absolute; inset: 18% 15% 15%; display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: 5%; text-align: center; }
.gdd-lobby-friends-drawer h2,
.gdd-lobby-friends-drawer p,
.gdd-lobby-friends-drawer strong { grid-column: 1 / -1; margin: 0; }
.gdd-lobby-friends-drawer h2 { font-size: clamp(0.72rem, 1.35vw, 1.3rem); }
.gdd-lobby-friends-drawer p { font-size: clamp(0.48rem, 0.75vw, 0.72rem); }
.gdd-lobby-friends-drawer strong { color: #79ebff; font-size: clamp(0.8rem, 1.5vw, 1.45rem); letter-spacing: 0.12em; }
.gdd-lobby-friends-drawer button { min-height: 44px; border: 2px solid #d99b42; border-radius: 0.45rem; background: #5b2c18; color: #fff4d5; font-size: clamp(0.46rem, 0.72vw, 0.7rem); font-weight: 1000; }

.gdd-lobby-connection {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 52%;
  width: min(38rem, 48vw);
  min-height: 13rem;
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  gap: 0.7rem;
  padding: 2rem;
  border: 4px solid #b8752d;
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(99, 47, 22, 0.97), rgba(45, 20, 12, 0.98));
  box-shadow: inset 0 0 0 3px #4a210f, 0 1rem 2rem rgba(10, 8, 5, 0.55);
  color: #fff4d5;
  text-align: center;
}
.gdd-lobby-connection strong { font-size: clamp(1.1rem, 2.2vw, 2rem); text-shadow: 0 3px #351508; }
.gdd-lobby-connection p { max-width: 32rem; margin: 0; color: #f0d7aa; line-height: 1.35; }
.gdd-lobby-connection > span { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.gdd-lobby-connection button { min-height: 48px; border: 3px solid #d99b42; border-radius: 0.7rem; background: linear-gradient(#7b3f20, #431d10); color: #fff4d5; font-weight: 1000; }
.gdd-lobby-connection button:first-child { border-color: #8ec942; background: linear-gradient(#8bd438, #3d831a); }
.gdd-lobby-connection > i { width: 2.4rem; aspect-ratio: 1; justify-self: center; border: 0.3rem solid rgba(255, 244, 213, 0.2); border-top-color: #fff4d5; border-radius: 50%; animation: lobby-connection-spin 0.8s linear infinite; }
@keyframes lobby-connection-spin { to { transform: rotate(360deg); } }

.gdd-lobby-service-message {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 16.2%;
  transform: translateX(-50%);
  max-width: 50%;
  min-height: 1.2em;
  color: #fff1bd;
  font-size: clamp(0.45rem, 0.72vw, 0.7rem);
  font-weight: 900;
  text-align: center;
}

.gdd-lobby-join-backdrop {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 17, 20, 0.68);
  backdrop-filter: blur(3px);
}

.gdd-lobby-join-card {
  position: relative;
  width: min(42rem, 48vw);
  min-height: 52%;
  color: #fff4d5;
  filter: drop-shadow(0 1rem 1.4rem rgba(12, 5, 3, 0.65));
}
.gdd-lobby-join-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.gdd-lobby-join-card > div { position: relative; z-index: 1; min-height: inherit; padding: 10% 12% 8%; display: grid; align-content: center; text-align: center; }
.gdd-lobby-join-card h2 { margin: 0; font-size: clamp(1rem, 2vw, 2rem); text-shadow: 0 3px #351508; }
.gdd-lobby-join-card p { margin: 0.35rem auto 0.65rem; max-width: 34rem; color: #f0d7aa; font-size: clamp(0.62rem, 0.9vw, 0.92rem); line-height: 1.25; }
.gdd-lobby-join-card form { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.35rem 0.65rem; }
.gdd-lobby-join-card label { color: #ffe297; font-size: clamp(0.62rem, 0.9vw, 0.9rem); font-weight: 1000; }
.gdd-lobby-join-card input {
  min-width: 0;
  height: 3rem;
  padding: 0 0.8rem;
  border: 3px solid #d99b42;
  border-radius: 0.65rem;
  background: #26120d;
  color: #fff7dd;
  font-size: clamp(1rem, 1.8vw, 1.75rem);
  font-weight: 1000;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}
.gdd-lobby-join-card output { grid-column: 1 / -1; min-height: 1.15em; color: #ffd191; font-size: clamp(0.54rem, 0.75vw, 0.74rem); font-weight: 900; }
.gdd-lobby-join-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.gdd-lobby-join-actions button { min-height: 48px; border: 3px solid #9b5a27; border-radius: 0.7rem; background: linear-gradient(#7b3f20, #431d10); color: #fff4d5; font-weight: 1000; }
.gdd-lobby-join-actions button[type="submit"] { border-color: #8ec942; background: linear-gradient(#8bd438, #3d831a); }
.gdd-lobby-join-actions button:disabled { opacity: 0.6; }

.gdd-lobby button:focus-visible,
.gdd-lobby input:focus-visible { outline: 3px solid var(--lobby-cyan); outline-offset: 2px; }

.gdd-matchmaking-card {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 51%;
  width: min(48%, 720px);
  min-width: 460px;
  height: 61%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: 34% 1fr;
  grid-template-rows: 38% 19% 17% 1fr;
  align-items: center;
  gap: 2% 5%;
  padding: 4.5% 5% 3.5%;
  border: 5px solid #6f3515;
  border-radius: 2rem;
  color: #fff5d5;
  background: linear-gradient(180deg, rgba(105, 48, 20, 0.96), rgba(43, 20, 13, 0.98));
  box-shadow: inset 0 0 0 3px #d28a39, inset 0 0 2.4rem #170b08, 0 1rem 2rem rgba(16, 10, 9, 0.5);
}
.gdd-matchmaking-card::before,
.gdd-matchmaking-card::after { content: ''; position: absolute; z-index: -1; left: 8%; right: 8%; height: 10%; border: 4px solid #754019; border-radius: 60%; background: #a86629; }
.gdd-matchmaking-card::before { top: -4%; }
.gdd-matchmaking-card::after { bottom: -4%; }
.gdd-matchmaking-orbit { position: relative; grid-row: 1 / 3; width: min(18vw, 210px); aspect-ratio: 1; place-self: center; border: 5px solid #df963c; border-radius: 50%; background: radial-gradient(circle, #63e5f5 0 7%, #156f8c 8% 25%, #2d160e 27% 63%, #6f3515 65% 100%); box-shadow: 0 0 2rem #42d6ef88, inset 0 0 0 4px #321409; }
.gdd-matchmaking-orbit span { position: absolute; inset: 18%; display: grid; place-items: center; border-radius: 50%; background: #25130e; }
.gdd-matchmaking-orbit span img { width: 76%; height: 76%; object-fit: contain; filter: drop-shadow(0 0 0.8rem #77efff); }
.gdd-matchmaking-orbit > i { position: absolute; z-index: 2; left: 47%; top: -5%; width: 7%; aspect-ratio: 1; border-radius: 50%; background: #adf6ff; box-shadow: 0 0 0.75rem #64eafa; transform-origin: 50% 780%; animation: gdd-matchmaking-orbit 2.2s linear infinite; }
.gdd-matchmaking-orbit > i:nth-child(2) { animation-delay: -0.72s; }
.gdd-matchmaking-orbit > i:nth-child(3) { animation-delay: -1.44s; }
.gdd-matchmaking-orbit[data-state='MATCH_FOUND'] { border-color: #a7ff72; box-shadow: 0 0 2.5rem #74eb74; }
@keyframes gdd-matchmaking-orbit { to { transform: rotate(360deg); } }
.gdd-matchmaking-copy { align-self: end; }
.gdd-matchmaking-copy > span { color: #74eaff; font-size: clamp(0.56rem, 0.78vw, 0.78rem); font-weight: 1000; letter-spacing: 0.16em; }
.gdd-matchmaking-copy h2 { margin: 0.25rem 0; font-size: clamp(1.2rem, 2.35vw, 2.4rem); line-height: 1; text-shadow: 0 3px #391409; }
.gdd-matchmaking-copy p { margin: 0; color: #e7cc9d; font-size: clamp(0.62rem, 0.86vw, 0.9rem); }
.gdd-matchmaking-count { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 5%; }
.gdd-matchmaking-count strong { grid-row: 1 / 3; color: #fff; font-size: clamp(1.5rem, 3vw, 3rem); }
.gdd-matchmaking-count strong small { color: #b98f61; font-size: 0.45em; }
.gdd-matchmaking-count span { align-self: end; color: #e8cf9f; font-size: clamp(0.46rem, 0.65vw, 0.66rem); font-weight: 1000; }
.gdd-matchmaking-count > i { align-self: start; height: 0.7rem; overflow: hidden; border: 2px solid #b06b2e; border-radius: 1rem; background: #27130d; }
.gdd-matchmaking-count > i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #35bcd7, #a8f567); transition: width 300ms ease; }
.gdd-matchmaking-meta { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2%; }
.gdd-matchmaking-meta span { padding: 0.5rem; border: 2px solid #7b431e; border-radius: 0.65rem; background: #2a160f; text-align: center; }
.gdd-matchmaking-meta small, .gdd-matchmaking-meta strong { display: block; }
.gdd-matchmaking-meta small { color: #bd9569; font-size: clamp(0.4rem, 0.55vw, 0.58rem); }
.gdd-matchmaking-meta strong { color: #fff3cc; font-size: clamp(0.55rem, 0.76vw, 0.78rem); }
.gdd-matchmaking-bot-offer { position: absolute; z-index: 4; inset: 61% 5% 5%; display: grid; grid-template-columns: 1fr 1fr; gap: 7%; padding: 2% 5%; border: 3px solid #d18b3c; border-radius: 1rem; background: #30160ff2; text-align: center; }
.gdd-matchmaking-bot-offer p { grid-column: 1 / -1; margin: 0; color: #eed4a7; font-size: clamp(0.5rem, 0.75vw, 0.78rem); }
.gdd-matchmaking-bot-offer button { min-height: 44px; border: 3px solid #8f4e22; border-radius: 0.75rem; color: #fff6d8; background: linear-gradient(#7d411f, #47200f); font-weight: 1000; }
.gdd-matchmaking-bot-offer button:last-child { border-color: #84bb32; background: linear-gradient(#82cc2c, #357d18); }
.gdd-matchmaking-cancel { grid-column: 1 / -1; position: relative; justify-self: center; align-self: end; width: 34%; min-width: 150px; height: 3.5rem; }
.gdd-matchmaking-cancel:disabled { opacity: 0.45; }

@media (prefers-reduced-motion: reduce) { .gdd-matchmaking-orbit > i { animation: none; } }

@media (max-width: 900px) and (max-height: 450px) and (orientation: landscape) {
  .gdd-lobby-title { left: 33%; top: 0; width: 34%; height: 19%; }
  .gdd-lobby-title h1 { font-size: clamp(1.05rem, 3.1vw, 1.7rem); }
  .gdd-lobby-mode-rail { left: -0.4%; top: 1.5%; width: 23%; height: 38%; }
  .gdd-lobby-mode-rail > div { inset: 13% 12% 12%; }
  .gdd-lobby-mode-rail button { min-height: 32px; }
  .gdd-lobby-mode-rail button strong { font-size: clamp(0.44rem, 1.42vw, 0.68rem); }

  .gdd-lobby-settings { right: -0.2%; top: 8.5%; width: 23%; height: 35%; }
  .gdd-lobby-settings > div { inset: 15% 12%; grid-template-rows: repeat(4, 1fr); }
  .gdd-lobby-settings label,
  .gdd-lobby-settings p { font-size: 0.48rem; }
  .gdd-lobby-settings label:last-child strong { max-width: 62%; }
  .gdd-lobby-settings [data-testid="lobby-copy-code"] { min-height: 24px; padding: 0 4px; }
  .gdd-lobby-settings [data-testid="lobby-open-join"] { min-height: 24px; padding: 0 4px; }
  .gdd-lobby-switch { width: 35px; height: 21px; }

  .gdd-lobby-seats { left: 3.5%; right: 3.5%; top: 41.5%; height: 40%; }
  .gdd-lobby-seat-number { font-size: 0.58rem; }
  .gdd-lobby-seat-copy h3 { font-size: 0.48rem; }
  .gdd-lobby-seat-copy strong { font-size: 0.38rem; }
  .gdd-lobby-seat-copy small,
  .gdd-lobby-ping b { display: none; }
  .gdd-lobby-ping { height: 30%; }
  .gdd-lobby-ready-state { font-size: 0.34rem; }
  .gdd-lobby-host b { font-size: 0.32rem; }

  .gdd-lobby-image-button.is-leave { left: 0.5%; bottom: 0.5%; width: 15%; height: 15%; }
  .gdd-lobby-image-button.is-start { left: 36%; bottom: 0; width: 28%; height: 17%; }
  .gdd-lobby-image-button.is-ready { right: 15%; bottom: 0.5%; width: 18%; height: 15%; }
  .gdd-lobby-image-button strong { font-size: 0.68rem; }
  .gdd-lobby-chat { left: 16%; bottom: 0; width: 25%; height: 12%; }
  .gdd-lobby-chat input { margin-left: 8%; font-size: 0.48rem; }
  .gdd-lobby-chat button { min-width: 44px; height: 44px; margin-right: 3%; font-size: 0.48rem; }
  .gdd-lobby-friends { right: 0.3%; bottom: 0; width: 14%; height: 19%; }
  .gdd-lobby-friends strong { font-size: 0.48rem; }
  .gdd-lobby-friends-drawer { right: 0.3%; bottom: 18%; width: 30%; height: 45%; }
  .gdd-lobby-friends-drawer > div { inset: 16% 14% 13%; }
  .gdd-lobby-friends-drawer button { min-height: 32px; }
  .gdd-lobby-service-message { bottom: 16%; font-size: 0.42rem; }
  .gdd-lobby-connection { top: 57%; width: 54vw; min-height: 50%; padding: 1rem 1.4rem; gap: 0.35rem; }
  .gdd-lobby-connection strong { font-size: 0.95rem; }
  .gdd-lobby-connection p { font-size: 0.55rem; }
  .gdd-lobby-connection button { min-height: 44px; font-size: 0.55rem; }
  .gdd-lobby-join-card { width: 60vw; min-height: 72%; }
  .gdd-lobby-join-card > div { padding: 8% 11% 6%; }
  .gdd-lobby-join-card h2 { font-size: 1rem; }
  .gdd-lobby-join-card p { margin: 0.15rem auto 0.35rem; font-size: 0.52rem; }
  .gdd-lobby-join-card form { gap: 0.2rem 0.45rem; }
  .gdd-lobby-join-card label { font-size: 0.52rem; }
  .gdd-lobby-join-card input { height: 2.35rem; font-size: 1rem; }
  .gdd-lobby-join-card output { font-size: 0.48rem; }
  .gdd-lobby-join-actions button { min-height: 44px; }
}

@media (orientation: portrait) {
  .screen-queue .gdd-lobby-world { display: none; }
  .screen-queue .gdd-lobby .gdd-landscape-gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-content: center;
    gap: 0.7rem;
    padding: 2rem;
    background: linear-gradient(150deg, #123b4d, #071c31);
    color: #fff5d8;
    text-align: center;
  }
  .screen-queue .gdd-landscape-gate h1 { margin: 0; font-size: clamp(2rem, 10vw, 4rem); }
  .screen-queue .gdd-landscape-gate p { margin: 0; color: #bfeaf0; }
}

@media (prefers-reduced-motion: reduce) {
  .gdd-lobby-switch span { transition: none; }
}

.gdd-intro article > img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 7px 5px rgba(13, 17, 42, 0.4));
}

@media (max-width: 900px) and (orientation: landscape) {
  .gdd-matchmaking-title { left: 34%; top: -1%; width: 32%; height: 23%; }
  .gdd-matchmaking-card { top: 55%; width: 63%; min-width: 0; height: 66%; grid-template-columns: 28% 1fr; padding: 3% 4% 2.5%; border-width: 3px; border-radius: 1rem; }
  .gdd-matchmaking-orbit { width: min(21vh, 116px); border-width: 3px; }
  .gdd-matchmaking-copy h2 { font-size: clamp(0.86rem, 2.8vw, 1.25rem); }
  .gdd-matchmaking-copy p { font-size: 0.46rem; }
  .gdd-matchmaking-count strong { font-size: 1.4rem; }
  .gdd-matchmaking-meta span { padding: 0.25rem; }
  .gdd-matchmaking-cancel { width: 38%; min-width: 120px; height: 2.4rem; }
  .gdd-matchmaking-bot-offer { inset: 58% 3% 3%; padding: 1.5% 4%; }
  .gdd-intro article > img { height: 46px; }
}
