@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/dm-sans-regular.ttf") format("truetype");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/fonts/dm-sans-semibold.ttf") format("truetype");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/space-grotesk-medium.ttf") format("truetype");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-bold.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --bg: #151719;
  --panel: #202326;
  --panel-raised: #282c2f;
  --ink: #f2eee5;
  --muted: #979e9c;
  --orange: #fa936b;
  --orange-bright: #ffad83;
  --line: #33383a;
  --green: #a4c696;
  --control-scale: 1;
  --control-opacity: 1;
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100svh;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}
button:not(:disabled),
a,
input,
select {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand {
  font-family:
    "Space Grotesk",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}
button {
  font-weight: 600;
}
button:hover:not(:disabled) {
  filter: brightness(1.12);
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Gameplay includes header labels, both renderer canvases/video, and the pad.
   Forms/dialogs retain native editing; touch-action:none on the whole ancestor
   would prevent descendants from opting back into their normal gestures. */
.game-immersed,
.game-immersed * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.game-immersed {
  touch-action: manipulation;
  overscroll-behavior: none;
}
.game-immersed .screen,
.game-immersed .screen canvas,
.game-immersed .screen video,
.game-immersed #controller,
.game-immersed [data-gba-button],
.game-immersed [data-dpad],
.game-immersed [data-layout-group] {
  touch-action: none;
}
.game-immersed :is(input, textarea, select, option, [contenteditable]:not([contenteditable="false"]), [data-native-gestures], dialog),
.game-immersed :is([contenteditable]:not([contenteditable="false"]), [data-native-gestures], dialog) * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  -webkit-user-drag: auto;
  touch-action: auto;
}
.lobby {
  max-width: 1180px;
  margin: auto;
  padding: 0 48px;
}
.site-header {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 25px;
  font-weight: 600;
  display: flex;
  align-items: center;
  letter-spacing: -1px;
}
.brand > span:not(.brand-mark) {
  color: var(--orange);
}
.brand small {
  font-size: 9px;
  letter-spacing: 1px;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  border: 1px solid #464b49;
  border-radius: 4px;
  padding: 3px 5px;
  margin-left: 12px;
  color: #b4bbb5;
}
.brand-mark {
  height: 26px;
  width: 27px;
  margin-right: 11px;
  display: inline-flex;
  position: relative;
  align-items: center;
}
.brand-mark i {
  display: block;
  position: absolute;
  width: 16px;
  height: 11px;
  border: 3px solid var(--orange);
  border-radius: 7px;
  transform: rotate(-42deg);
}
.brand-mark i:first-child {
  left: 0;
  top: 6px;
}
.brand-mark i:last-child {
  left: 9px;
  top: 9px;
}
.status-pill {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 11px;
  background: #1d2121;
  border: 1px solid #313733;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.status-pill i {
  width: 6px;
  height: 6px;
  background: #777e76;
  border-radius: 50%;
}
.status-pill.online i {
  background: var(--green);
  box-shadow: 0 0 12px #a4c69625;
}
.lobby-main {
  padding-bottom: 28px;
}
.intro {
  position: relative;
  min-height: 365px;
  padding: 59px 0 46px;
  overflow: hidden;
}
.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.75px;
  color: var(--muted);
}
.intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro .eyebrow > span {
  width: 5px;
  height: 5px;
  background: var(--orange);
  border-radius: 50%;
}
h1 {
  font-size: 64px;
  font-weight: 500;
  line-height: 1.01;
  letter-spacing: -3.4px;
  margin-top: 22px;
}
.intro-copy {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 19px;
}
.intro-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #777f7a;
  font-size: 10px;
  margin-top: 25px;
}
.tiny-chip {
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 5px 7px;
  border: 1px solid #3c4440;
  border-radius: 4px;
  color: #b7c2b5;
}
.intro-art {
  position: absolute;
  right: 65px;
  top: 64px;
  width: 230px;
  height: 251px;
  background: #b9bca8;
  border-radius: 15px 15px 50px 15px;
  transform: rotate(9deg);
  box-shadow:
    13px 17px 0 #0e1011,
    inset 0 0 0 2px #ffffff20;
  border: 3px solid #777e6f;
  padding: 19px 18px;
  opacity: 0.95;
}
.intro-art:after {
  content: "";
  position: absolute;
  bottom: 20px;
  left: 112px;
  width: 10px;
  height: 4px;
  background: #747e72;
  border-radius: 10px;
  transform: rotate(-30deg);
  box-shadow: 20px 1px #747e72;
}
.art-screen {
  height: 133px;
  border: 13px solid #454c49;
  border-radius: 6px 6px 22px 6px;
  background: #263c31;
  position: relative;
  overflow: hidden;
  color: #d2d9af;
}
.art-screen > span {
  position: absolute;
  top: 14px;
  left: 12px;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 2px;
  font-weight: 700;
  z-index: 2;
}
.art-spark {
  position: absolute;
  top: 10px;
  left: 91px;
  color: #d6c979;
  font-size: 28px;
}
.art-horizon {
  position: absolute;
  width: 140%;
  height: 52%;
  bottom: -7px;
  left: -10px;
  background: #4f6a47;
  transform: rotate(-12deg);
}
.art-horizon:after {
  content: "";
  position: absolute;
  inset: 22px 0 -20px;
  background: #859265;
  transform: rotate(22deg);
}
.art-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 9px;
}
.art-dpad {
  color: #3f4743;
  font-size: 52px;
  line-height: 1;
  text-shadow: 2px 2px #929a89;
}
.art-dots {
  color: #ad5c5c;
  font-size: 30px;
  white-space: nowrap;
  transform: rotate(-25deg);
  letter-spacing: -2px;
}
.art-dots b {
  font-weight: 400;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.section-heading .eyebrow {
  margin-bottom: 8px;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  font-weight: 500;
}
.count {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  color: var(--muted);
  vertical-align: middle;
  background: #24292b;
  border: 1px solid #333a3c;
  border-radius: 5px;
  padding: 3px 6px;
  margin-left: 7px;
  font-weight: 500;
  letter-spacing: 0;
}
.text-button {
  background: none;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-size: 12px;
  white-space: nowrap;
}
.text-button > span {
  font-size: 18px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 18px;
}
.game-card {
  background: #1e2224;
  border: 1px solid #323739;
  border-radius: 12px;
  overflow: hidden;
}
.game-cover {
  height: 155px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #ffffff0b;
}
.game-cover:before {
  content: "";
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid #ffffff15;
  position: absolute;
  top: 15px;
  right: -38px;
  box-shadow:
    0 0 0 22px #ffffff05,
    0 0 0 44px #ffffff04;
}
.cover-0 {
  background: linear-gradient(135deg, #556e53, #283f36);
  color: #d9e8b9;
}
.cover-1 {
  background: linear-gradient(135deg, #a16e53, #4e3931);
  color: #f1d1aa;
}
.cover-2 {
  background: linear-gradient(135deg, #5b6184, #303450);
  color: #d7d8f0;
}
.cover-3 {
  background: linear-gradient(135deg, #91666e, #482f3c);
  color: #f2c8ce;
}
.cover-4 {
  background: linear-gradient(135deg, #568080, #264448);
  color: #c7e4dc;
}
.cartridge-label {
  position: absolute;
  top: 14px;
  left: 15px;
  font-size: 8px;
  letter-spacing: 1.6px;
  opacity: 0.7;
  font-weight: 700;
}
.game-monogram {
  font-family: "Space Grotesk", sans-serif;
  font-size: 62px;
  letter-spacing: -5px;
  transform: rotate(-7deg);
  font-weight: 700;
  text-shadow: 3px 4px #00000025;
  z-index: 1;
}
.cartridge-bottom {
  font-size: 7px;
  letter-spacing: 5px;
  position: absolute;
  bottom: 13px;
  opacity: 0.6;
}
.game-detail {
  padding: 17px 16px 0;
}
.game-detail h3 {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.2px;
}
.game-detail p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.game-play {
  width: calc(100% - 32px);
  margin: 15px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2a3030;
  border: 1px solid #3a4340;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: #d1dbcb;
}
.game-play > span {
  font-size: 16px;
}
.rooms-section {
  margin-top: 39px;
}
.room-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.room-card {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #1d2123;
  border: 1px solid #33393a;
  border-radius: 9px;
  padding: 17px;
  text-align: left;
  min-width: 0;
}
.room-icon {
  font-size: 22px;
  color: #a7bb9d;
  background: #2a342c;
  border: 1px solid #3c493d;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}
.room-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.room-info strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.room-info small {
  font-size: 10px;
  color: var(--muted);
}
.room-capacity {
  font-size: 12px;
  font-weight: 500;
  color: #c2c9be;
  white-space: nowrap;
}
.room-capacity small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.room-arrow {
  color: #727b73;
  margin-left: 9px;
  font-size: 20px;
}
.host-tools {
  margin-top: 34px;
  border: 1px dashed #404644;
  border-radius: 10px;
  padding: 19px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.host-tools > div {
  padding-left: 47px;
  position: relative;
}
.tool-icon {
  font-size: 23px;
  position: absolute;
  left: 0;
  top: 4px;
  color: #8d9b91;
}
.host-tools h3 {
  font-size: 13px;
  font-weight: 500;
}
.host-tools p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}
.lobby-footer {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #737d78;
  padding-top: 28px;
}
.lobby-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lobby-footer i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #829579;
}
.empty-state {
  grid-column: 1/-1;
  border: 1px dashed #39413e;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 225px;
  text-align: center;
  padding: 25px;
}
.empty-icon {
  font-size: 30px;
  color: #8f9f8f;
  margin-bottom: 12px;
}
.empty-state h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.empty-state p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 8px;
  max-width: 300px;
}
.empty-state button {
  margin-top: 21px;
}
.empty-rooms {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #303638;
  border-radius: 9px;
  padding: 20px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.primary-button,
.secondary-button,
.small-button {
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.primary-button {
  background: var(--orange);
  color: #251b15;
  box-shadow: inset 0 1px #ffffff35;
}
.primary-button > span {
  margin-left: auto;
}
.secondary-button {
  background: #2d3434;
  color: #dce1d5;
  border: 1px solid #444d48;
  padding: 10px 14px;
}
.small-button {
  font-size: 10px;
  padding: 8px 11px;
  background: #343b38;
  color: #d6dfcf;
  border: 1px solid #495249;
  white-space: nowrap;
}
.wide {
  width: 100%;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #343b3b;
  border-radius: 50%;
  background: #23282a;
  color: #c5cec6;
  font-size: 25px;
  line-height: 1;
  flex-shrink: 0;
}

body.playing {
  background: #1e2224;
  overflow-x: hidden;
}
.play {
  min-height: 100svh;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) 22px
    max(14px, env(safe-area-inset-bottom));
}
.play-header {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
}
.play-header .icon-button {
  width: 36px;
  height: 36px;
  font-size: 25px;
  background: #252a2d;
  border-color: #3c4344;
}
.play-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.play-heading > span:first-child {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.play-heading > span:last-child {
  font-size: 10px;
  color: #939f98;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.connection-button {
  background: none;
  display: flex;
  gap: 6px;
  align-items: center;
  color: #94a78f;
  font-size: 9px;
  white-space: nowrap;
  padding: 10px 0;
}
.connection-button i {
  width: 5px;
  height: 5px;
  background: #858773;
  border-radius: 50%;
}
.connection-button i.connected {
  background: #a2c18a;
  box-shadow: 0 0 7px #b7d89533;
}
.connection-button i.failed {
  background: var(--orange);
}
.connection-button i.connecting {
  animation: pulse 1.5s infinite;
}
.menu-icon {
  flex-direction: column;
  gap: 5px;
}
.menu-icon span {
  display: block;
  width: 12px;
  height: 1px;
  background: #cbd2cb;
}
.handheld {
  margin-top: 19px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
}
.screen-shell {
  background: #14181a;
  border-radius: 15px 15px 30px 15px;
  border: 1px solid #373d3c;
  padding: 15px 17px 11px;
  box-shadow:
    inset 0 1px #ffffff06,
    0 3px 0 #121516;
}
.screen-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  margin-bottom: 12px;
}
.screen-topline > span:first-child {
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #cbd0c4;
}
.screen-topline > span:first-child > span {
  color: var(--orange);
}
.screen-topline > span:last-child {
  color: #8c9f7e;
  font-size: 7px;
  letter-spacing: 1.4px;
}
.screen {
  background: #101712;
  aspect-ratio: 3/2;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #00000090;
  isolation: isolate;
}
#game-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0a0d0c;
  image-rendering: pixelated;
}
.screen.local-game > canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
.screen.local-game > .stream-overlay,
.screen.local-game > .unlock-media,
.screen.local-game > .input-readout,
.screen.local-game > #paused-label {
  z-index: 1;
}
.screen-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  font-size: 6px;
  letter-spacing: 1px;
  color: #6b7771;
  gap: 8px;
}
.screen-bottomline > span:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 6px;
}
.screen-bottomline b {
  font-weight: 400;
  margin: 0 3px;
}
.screen-bottomline i {
  background: #465044;
  height: 4px;
  width: 4px;
  border-radius: 50%;
}
.screen-bottomline i.on {
  background: #b1d38e;
  box-shadow: 0 0 7px #b1d38e66;
}
.stream-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: #101712;
}
.stream-overlay strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  color: #b8c8ad;
  font-weight: 500;
  line-height: 1.4;
}
.stream-overlay p {
  color: #82937e;
  font-size: 10px;
  line-height: 1.6;
  margin-top: 7px;
  max-width: 240px;
}
.stream-overlay button {
  margin-top: 15px;
  font-size: 10px;
  padding: 9px 15px;
}
.loading-orbit {
  width: 22px;
  height: 22px;
  border: 1px solid #4a5e43;
  border-top-color: #b6cb9f;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  margin-bottom: 17px;
}
.stream-overlay.has-error .loading-orbit {
  display: none;
}
.unlock-media {
  position: absolute;
  inset: 0;
  width: 100%;
  background: #111711ca;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e6eddf;
  gap: 10px;
  z-index: 3;
}
.unlock-media strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 500;
}
.unlock-media small {
  color: #c1cbb4;
  font-size: 10px;
  font-weight: 400;
}
.play-triangle {
  background: #f3976c;
  color: #2e241b;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  font-size: 18px;
  margin-bottom: 3px;
}
.input-readout {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  background: #000000c0;
  font: 9px monospace;
  color: #d7f1c4;
  z-index: 4;
  border-radius: 3px;
  pointer-events: none;
}
.paused-label {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
  background: #000000aa;
  padding: 6px 9px;
  border-radius: 4px;
  color: #f3e7d0;
  pointer-events: none;
}
.protocol-indicator {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgb(13 17 18 / 86%);
  color: #e5eee7;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}
.controller {
  margin: 25px 0 7px;
  opacity: var(--control-opacity);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}
.controller button,
.controller [data-dpad] {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  outline-offset: 5px;
}
.shoulder-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}
.shoulder-button {
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(#3c4345, #2d3335);
  box-shadow:
    0 4px 0 #15191a,
    0 5px 0 #414749,
    inset 0 1px #ffffff16;
  border: 1px solid #515858;
  border-radius: 9px 9px 12px 12px;
  width: 118px;
  height: 39px;
  text-align: left;
  padding: 0 16px;
  color: #dae0d4;
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 15px;
}
.shoulder-button span {
  font-family: "DM Sans", sans-serif;
  font-size: 6px;
  letter-spacing: 1.2px;
  color: #87938a;
  font-weight: 500;
}
.shoulder-button:last-child {
  justify-content: flex-end;
}
.controller-grip {
  font-size: 30px;
  line-height: 1;
  letter-spacing: 4px;
  color: #515b58;
  align-self: center;
  position: relative;
  top: -3px;
}
.main-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  min-height: 156px;
  padding: 0 8px;
}
.dpad {
  width: 156px;
  height: 156px;
  position: relative;
  flex-shrink: 0;
  transform: scale(var(--control-scale));
  transform-origin: center;
  filter: drop-shadow(0 5px 0 #121617);
}
.dpad-base {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  clip-path: polygon(
    34% 0,
    66% 0,
    66% 34%,
    100% 34%,
    100% 66%,
    66% 66%,
    66% 100%,
    34% 100%,
    34% 66%,
    0 66%,
    0 34%,
    34% 34%
  );
  background: #4a5252;
}
.dpad:after {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: polygon(
    34% 0,
    66% 0,
    66% 34%,
    100% 34%,
    100% 66%,
    66% 66%,
    66% 100%,
    34% 100%,
    34% 66%,
    0 66%,
    0 34%,
    34% 34%
  );
  background: linear-gradient(140deg, #41494a, #2b3233);
  pointer-events: none;
  z-index: 0;
}
.dpad button {
  position: absolute;
  width: 34%;
  height: 34%;
  background: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #707c76;
  font-size: 10px;
}
.dpad-up {
  left: 33%;
  top: 0;
}
.dpad-down {
  left: 33%;
  bottom: 0;
}
.dpad-left {
  left: 0;
  top: 33%;
}
.dpad-right {
  right: 0;
  top: 33%;
}
.dpad button span {
  opacity: 0.7;
}
.dpad-center {
  position: absolute;
  left: 42%;
  top: 42%;
  width: 16%;
  height: 16%;
  border-radius: 50%;
  background: #30383a;
  box-shadow: inset 0 1px 2px #151c1d80;
  z-index: 2;
  pointer-events: none;
}
.dpad button.is-pressed {
  background: #657b6040;
  color: #cfdfbe;
}
.dpad button.is-pressed span {
  opacity: 1;
}
.face-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
  transform: rotate(-24deg) scale(var(--control-scale));
  transform-origin: center;
  margin: 0 2px 12px 15px;
  flex-shrink: 0;
}
.face-button {
  width: 67px;
  height: 67px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f5a17b, #db7f59);
  border: 1px solid #ffbe8a;
  border-bottom-color: #a65a3b;
  box-shadow:
    0 6px 0 #8b4e37,
    0 8px 0 #131819,
    inset 0 2px 1px #ffd0a44d;
  color: #442e22;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  font-weight: 600;
  border-radius: 50%;
  padding: 0;
  position: relative;
}
.face-button:before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid #3f4744;
  border-radius: 50%;
  pointer-events: none;
}
.face-b {
  background: linear-gradient(145deg, #a8b4a3, #82927f);
  border-color: #c2cdb4;
  border-bottom-color: #67795f;
  box-shadow:
    0 6px 0 #4f5d4b,
    0 8px 0 #131819,
    inset 0 2px 1px #e0eacb3d;
  color: #2d382b;
}
.face-button.is-pressed {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #8b4e37,
    0 4px 0 #131819,
    inset 0 1px 2px #5f2d2a55;
  filter: brightness(1.13);
}
.face-b.is-pressed {
  box-shadow:
    0 2px 0 #4f5d4b,
    0 4px 0 #131819,
    inset 0 1px 2px #27372755;
}
.shoulder-button.is-pressed {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #15191a,
    0 2px 0 #414749,
    inset 0 2px 2px #111b1e66;
  color: #f5caaa;
  background: #4a5652;
}
.bottom-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 19px;
  min-height: 52px;
  padding: 0 10px;
}
.controller-caption {
  font-size: 6px;
  letter-spacing: 1.1px;
  color: #69776f;
  line-height: 1.9;
  flex: 1;
}
.controller-caption b {
  font-weight: 500;
  color: #8c9a90;
}
.utility-buttons {
  display: flex;
  gap: 20px;
  transform: scale(var(--control-scale));
  transform-origin: center;
}
.utility-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: none;
  padding: 5px 1px;
  min-width: 50px;
  min-height: 50px;
}
.utility-button i {
  display: block;
  background: linear-gradient(#59645f, #434e48);
  width: 39px;
  height: 10px;
  border: 1px solid #6a766c;
  box-shadow: 0 3px 0 #111815;
  border-radius: 10px;
  transform: rotate(-15deg);
}
.utility-button > span {
  font-size: 6px;
  letter-spacing: 1.6px;
  color: #9fae9e;
  font-weight: 500;
}
.utility-button.is-pressed i {
  transform: rotate(-15deg) translateY(2px);
  box-shadow: 0 1px 0 #111815;
  background: #82937d;
}
.speaker {
  display: flex;
  gap: 5px;
  transform: rotate(-20deg);
  justify-content: flex-end;
  flex: 1;
  margin-right: 7px;
}
.speaker i {
  width: 4px;
  height: 24px;
  background: #121819;
  border-radius: 5px;
  box-shadow: 1px 0 #3c4543;
}
.controller.left-handed .main-controls {
  flex-direction: row-reverse;
}
.controller.left-handed .face-buttons {
  margin-left: 0;
  margin-right: 15px;
}
.controller.left-handed .shoulder-row {
  flex-direction: row-reverse;
}
.play-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #37403d;
  margin: 15px 5px 0;
  padding-top: 11px;
  min-height: 41px;
}
.players-button {
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  color: #98a792;
  font-size: 9px;
  font-weight: 400;
}
.avatar-stack {
  display: flex;
  padding-left: 4px;
}
.avatar-stack i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #1e2224;
  background: #566a51;
  color: #dbe2cd;
  font-size: 8px;
  font-style: normal;
  margin-left: -4px;
}
.avatar-stack i:nth-child(2) {
  background: #795e4b;
}
.avatar-stack i:nth-child(3) {
  background: #5c607d;
}
.avatar-stack i:nth-child(4) {
  background: #7f5665;
}
.play-footer .text-button {
  font-size: 10px;
  font-weight: 500;
}

dialog {
  color: var(--ink);
  background: #22282a;
  border: 1px solid #48504d;
  box-shadow: 0 20px 90px #00000070;
  padding: 0;
}
dialog::backdrop {
  background: #090e11ad;
  backdrop-filter: blur(7px);
}
.sheet-dialog {
  width: min(100% - 28px, 520px);
  max-height: 88svh;
  border-radius: 18px;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 25px 20px;
  border-bottom: 1px solid #3a4240;
}
.sheet-header .eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.sheet-header h2 {
  font-size: 25px;
}
.sheet-header .icon-button {
  width: 33px;
  height: 33px;
  font-size: 24px;
  background: #303839;
  border-color: #4a5350;
}
.sheet-body {
  padding: 20px 25px 26px;
}
.menu-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #171f20;
  border: 1px solid #36413c;
  border-radius: 8px;
  margin-bottom: 20px;
}
.menu-tabs button {
  flex: 1;
  background: none;
  padding: 10px 12px;
  border-radius: 5px;
  color: #8c9b8d;
  font-size: 11px;
}
.menu-tabs button.active {
  background: #3a4640;
  color: #e0e7d6;
  box-shadow: 0 1px 3px #00000020;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 16px;
}
.action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #2f3935;
  border: 1px solid #465348;
  padding: 15px 4px 12px;
  border-radius: 8px;
  color: #c7d4c1;
  font-size: 8px;
  font-weight: 500;
}
.action-button > span {
  font-size: 19px;
  color: #c2d2b4;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #36403b;
  font-size: 11px;
  min-height: 52px;
}
.audio-setting-row > div { min-width: 0; }
.audio-setting-row .quiet-copy { margin-top: 6px; line-height: 1.4; }
.audio-setting-row > button { flex-shrink: 0; }
.invite-copy-fallback { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.invite-copy-fallback > input { width: 100%; margin: 8px 0; user-select: text; -webkit-user-select: text; }
.invite-copy-fallback > button { margin-top: 8px; }
.invite-copy-fallback .quiet-copy { margin-top: 10px; line-height: 1.5; }
.setting-row label {
  color: #c7d0c2;
  flex: 1;
}
.setting-row input[type="range"] {
  max-width: 145px;
  min-width: 60px;
  width: 35%;
  accent-color: var(--orange);
  height: 18px;
}
.setting-row output {
  font-size: 10px;
  min-width: 34px;
  text-align: right;
  color: #94a18e;
}
.setting-row select {
  max-width: 160px;
}
.setting-row input[type="text"] {
  width: 130px;
  min-width: 0;
  font-size: 11px;
  padding: 9px;
}
.setting-row input[type="checkbox"] {
  appearance: none;
  width: 32px;
  height: 19px;
  border-radius: 20px;
  background: #171f1b;
  border: 1px solid #596351;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.setting-row input[type="checkbox"]:before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  background: #84917e;
  border-radius: 50%;
  transition: transform 0.15s;
}
.setting-row input[type="checkbox"]:checked {
  background: #8aab78;
  border-color: #b4cd94;
}
.setting-row input[type="checkbox"]:checked:before {
  transform: translateX(13px);
  background: #20331c;
}
select,
input[type="text"],
input[type="password"] {
  background: #1b2420;
  border: 1px solid #4a564b;
  color: #d6dfcc;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 11px;
  min-height: 35px;
}
.notice {
  background: #303c31;
  border: 1px solid #465545;
  color: #b8c8a9;
  padding: 12px 13px;
  font-size: 10px;
  line-height: 1.7;
  border-radius: 7px;
  margin-top: 16px;
}
.notice b {
  font-weight: 500;
  color: #d0ddc2;
}
.notice p {
  margin-top: 5px;
}
.subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 11px;
}
.subheading h3 {
  font-size: 12px;
  font-weight: 500;
}
.subheading > span {
  font-size: 8px;
  color: #859581;
}
.state-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.state-controls select {
  flex: 1;
  min-width: 0;
}
.state-controls .secondary-button {
  font-size: 10px;
  padding: 10px 11px;
}
.danger-text {
  background: none;
  color: #d58f77;
  font-size: 11px;
  padding: 0;
  margin-top: 25px;
}
.panel-intro {
  font-size: 11px;
  color: #97a68f;
  line-height: 1.7;
  margin: 0 0 8px;
}
.menu-panel > .wide {
  margin-top: 18px;
}
.menu-panel > .text-button {
  justify-content: center;
  margin-top: 8px;
}
.room-summary {
  display: flex;
  align-items: center;
  gap: 13px;
}
.room-summary > div {
  flex: 1;
  min-width: 0;
}
.room-summary h3 {
  font-size: 16px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}
.room-summary p {
  font-size: 10px;
  color: #a0ac99;
  margin-top: 4px;
}
.player-list {
  margin-top: 16px;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #374336;
}
.player-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4c6246;
  color: #d7e3c8;
  font-size: 11px;
}
.player-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.player-info b {
  font-size: 11px;
  font-weight: 500;
}
.player-info small {
  font-size: 9px;
  color: #8b9b83;
}
.peer-status {
  font-size: 8px;
  color: #b4c99e;
  background: #31422d;
  border-radius: 20px;
  padding: 4px 7px;
}
.peer-status.away {
  color: #c0b29a;
  background: #3a362e;
}
.connection-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.connection-stats > span {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.connection-stats small {
  font-size: 7px;
  color: #8c9b83;
  letter-spacing: 1px;
}
.connection-stats b {
  font-size: 11px;
  font-weight: 500;
}
.quiet-copy {
  font-size: 10px;
  line-height: 1.7;
  color: #8b9a85;
}
.form-body {
  display: flex;
  flex-direction: column;
  gap: 19px;
}
.form-body > label:not(.file-drop) {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 11px;
  color: #bbc8b2;
}
.form-body input:not([type="file"]),
.form-body select {
  font-size: 12px;
  padding: 12px;
  min-height: 43px;
}
.selected-game-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: #d6e2ca;
  background: #2d3a2e;
  border: 1px solid #465642;
  padding: 15px;
  border-radius: 8px;
}
.file-drop {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed #65715d;
  border-radius: 9px;
  padding: 27px 20px;
  background: #283329;
  text-align: center;
}
.file-drop > span {
  font-size: 30px;
  line-height: 1;
  color: #b2c69f;
}
.file-drop strong {
  font-size: 12px;
  font-weight: 500;
  color: #d5e3c8;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.file-drop small {
  font-size: 9px;
  color: #91a084;
}
.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.host-links a {
  font-size: 11px;
  color: var(--orange);
}
.form-body .notice {
  margin: 0;
}
.practice-banner {
  position: fixed;
  top: max(76px, calc(env(safe-area-inset-top) + 65px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: min(330px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #d6e1c3;
  color: #27381c;
  box-shadow: 0 5px 20px #00000050;
  border: 1px solid #f3f5dd;
  border-radius: 10px;
  padding: 13px 15px;
}
.practice-banner > span {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.practice-banner small {
  font-size: 7px;
  letter-spacing: 1.4px;
  color: #647851;
}
.practice-banner b {
  font-size: 11px;
  font-weight: 500;
}
.practice-banner .small-button {
  background: #b3c49d;
  color: #27381c;
  border-color: #9eb28b;
}
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 100;
  background: #d4e2c5;
  color: #273622;
  box-shadow: 0 7px 30px #00000040;
  border: 1px solid #eef2dc;
  border-radius: 9px;
  padding: 13px 18px;
  font-size: 11px;
  line-height: 1.6;
  max-width: min(90vw, 440px);
  width: max-content;
  text-align: center;
  pointer-events: none;
}
.toast.error {
  background: #e7c5b4;
  color: #503329;
  border-color: #f9dbcc;
}
input[type="range"] {
  cursor: pointer;
}
input:disabled,
select:disabled {
  opacity: 0.4;
}
.compact-dialog {
  width: min(100% - 28px, 440px);
}
.immersion-steps {
  margin: 18px 0;
  padding-left: 22px;
}
.immersion-steps li {
  margin: 12px 0;
  line-height: 1.55;
}
.immersion-player-note {
  margin: 16px 0;
  padding: 12px;
  background: #151719;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.immersion-help {
  display: block;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (min-width: 800px) {
  .play {
    max-width: 640px;
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .play-header {
    margin-bottom: 8px;
  }
  .handheld {
    margin-top: 14px;
  }
  .screen-shell {
    padding: 17px 21px 12px;
  }
  .screen {
    max-height: 335px;
  }
  .controller {
    max-width: 450px;
    width: 100%;
    margin: 27px auto 8px;
  }
  .play-footer {
    margin-left: 35px;
    margin-right: 35px;
  }
  .main-controls {
    padding: 0 14px;
  }
  .sheet-dialog {
    max-height: 85svh;
  }
  .play-header .connection-button {
    margin-right: 12px;
  }
}
@media (max-width: 700px) {
  .lobby {
    padding: 0 25px;
  }
  .site-header {
    height: 88px;
  }
  .brand {
    font-size: 23px;
  }
  .brand small {
    display: none;
  }
  .status-pill {
    font-size: 10px;
    padding: 7px 9px;
  }
  .intro {
    padding-top: 40px;
    min-height: 342px;
  }
  .intro .eyebrow {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
  h1 {
    font-size: 53px;
    letter-spacing: -2.7px;
    margin-top: 21px;
  }
  .intro-copy {
    font-size: 12px;
    margin-top: 16px;
  }
  .intro-meta {
    font-size: 8px;
    gap: 6px;
    margin-top: 22px;
  }
  .tiny-chip {
    font-size: 8px;
    padding: 4px 6px;
  }
  .intro-art {
    width: 165px;
    height: 185px;
    right: -27px;
    top: 91px;
    transform: rotate(12deg);
    opacity: 0.7;
    padding: 14px 12px;
    border-width: 2px;
    border-radius: 11px 11px 37px 11px;
    box-shadow: 9px 11px 0 #0e1011;
  }
  .art-screen {
    height: 94px;
    border-width: 9px;
  }
  .art-screen > span {
    font-size: 13px;
    left: 9px;
    top: 10px;
  }
  .art-spark {
    font-size: 20px;
    left: 65px;
    top: 7px;
  }
  .art-dpad {
    font-size: 39px;
  }
  .art-dots {
    font-size: 22px;
  }
  .intro-art:after {
    bottom: 16px;
    left: 80px;
    width: 8px;
    height: 3px;
    box-shadow: 16px 1px #747e72;
  }
  .art-bottom {
    margin-top: 7px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .game-cover {
    height: 139px;
  }
  .game-detail {
    padding: 14px 12px 0;
  }
  .game-detail h3 {
    font-size: 12px;
  }
  .game-detail p {
    font-size: 8px;
  }
  .game-play {
    margin: 12px;
    width: calc(100% - 24px);
    font-size: 10px;
    padding: 8px 10px;
  }
  .game-monogram {
    font-size: 54px;
  }
  .cartridge-label {
    font-size: 6px;
    left: 11px;
    letter-spacing: 1.1px;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .section-heading .eyebrow {
    font-size: 8px;
  }
  .section-heading {
    margin-bottom: 17px;
  }
  .section-heading .text-button {
    font-size: 10px;
  }
  .room-list {
    grid-template-columns: 1fr;
  }
  .rooms-section {
    margin-top: 31px;
  }
  .host-tools {
    align-items: flex-start;
    flex-direction: column;
    padding: 17px;
    gap: 15px;
    margin-top: 26px;
  }
  .host-tools > div {
    padding-left: 40px;
  }
  .host-tools .secondary-button {
    align-self: flex-end;
    font-size: 10px;
    padding: 8px 12px;
  }
  .host-tools p {
    font-size: 10px;
  }
  .lobby-footer {
    font-size: 8px;
  }
  .empty-state {
    min-height: 220px;
  }
  .empty-state p {
    font-size: 11px;
  }
  .empty-rooms {
    font-size: 11px;
    padding: 17px;
  }
  .intro .eyebrow,
  .intro h1,
  .intro-copy,
  .intro-meta {
    position: relative;
    z-index: 1;
  }
}
@media (max-width: 420px) {
  .play {
    padding-left: 17px;
    padding-right: 17px;
  }
  .play-header {
    gap: 8px;
  }
  .play-header .icon-button {
    width: 33px;
    height: 33px;
  }
  .connection-button {
    font-size: 8px;
  }
  .play-heading > span:first-child {
    font-size: 11px;
  }
  .play-heading > span:last-child {
    font-size: 9px;
  }
  .handheld {
    margin-top: 16px;
  }
  .screen-shell {
    padding: 13px 14px 10px;
  }
  .screen-topline {
    margin-bottom: 10px;
  }
  .screen-topline > span:first-child {
    font-size: 10px;
  }
  .controller {
    margin-top: 23px;
  }
  .shoulder-button {
    width: 110px;
    height: 36px;
    font-size: 15px;
    padding: 0 13px;
    gap: 12px;
  }
  .main-controls {
    padding: 0 4px;
    margin-top: 25px;
    min-height: 146px;
  }
  .dpad {
    width: 145px;
    height: 145px;
  }
  .face-buttons {
    gap: 17px;
    margin-right: 1px;
    margin-left: 10px;
  }
  .face-button {
    width: 61px;
    height: 61px;
    font-size: 24px;
  }
  .bottom-controls {
    margin-top: 14px;
    padding: 0 7px;
  }
  .utility-buttons {
    gap: 12px;
  }
  .speaker {
    gap: 4px;
  }
  .speaker i {
    height: 21px;
  }
  .play-footer {
    margin-top: 12px;
    padding-top: 9px;
  }
  .sheet-header {
    padding: 22px 20px 18px;
  }
  .sheet-body {
    padding: 18px 20px 23px;
  }
  .setting-row {
    font-size: 10px;
    gap: 8px;
  }
  .setting-row input[type="range"] {
    max-width: 124px;
  }
  .setting-row select {
    max-width: 138px;
  }
  .state-controls {
    gap: 6px;
  }
  .state-controls .secondary-button {
    padding: 10px 9px;
    font-size: 9px;
  }
  .subheading > span {
    font-size: 7px;
  }
  .action-button {
    font-size: 7px;
  }
  .setting-row input[type="text"] {
    width: 109px;
  }
  .form-body {
    gap: 17px;
  }
}
@media (max-width: 359px) {
  .play {
    padding-left: 12px;
    padding-right: 12px;
  }
  .play-header {
    gap: 7px;
  }
  .connection-button span {
    display: none;
  }
  .main-controls {
    padding: 0;
  }
  .dpad {
    width: 132px;
    height: 132px;
  }
  .face-buttons {
    gap: 15px;
    margin-left: 8px;
  }
  .face-button {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }
  .shoulder-button {
    width: 100px;
  }
  .controller-caption {
    display: none;
  }
  .bottom-controls {
    padding-left: 35px;
  }
  .speaker {
    max-width: 55px;
  }
  .lobby {
    padding: 0 20px;
  }
  .brand {
    font-size: 21px;
  }
  .intro-art {
    right: -62px;
  }
  h1 {
    font-size: 49px;
  }
  .sheet-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .sheet-header {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (max-height: 740px) and (orientation: portrait) {
  .play {
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .handheld {
    margin-top: 11px;
  }
  .screen-shell {
    padding-top: 10px;
  }
  .screen-topline {
    margin-bottom: 8px;
  }
  .screen-bottomline {
    margin-top: 8px;
  }
  .controller {
    margin-top: 18px;
  }
  .shoulder-button {
    height: 32px;
  }
  .main-controls {
    margin-top: 19px;
    min-height: 132px;
  }
  .dpad {
    width: 132px;
    height: 132px;
  }
  .face-button {
    width: 57px;
    height: 57px;
    font-size: 22px;
  }
  .bottom-controls {
    margin-top: 9px;
    min-height: 45px;
  }
  .utility-button {
    min-height: 44px;
    gap: 8px;
  }
  .play-footer {
    margin-top: 9px;
    padding-top: 7px;
    min-height: 33px;
  }
  .handheld {
    justify-content: flex-start;
  }
  .play {
    min-height: 100svh;
  }
  .play-header {
    min-height: 43px;
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  body.playing {
    overflow: hidden;
  }
  .play {
    height: 100svh;
    max-width: none;
    padding: 8px max(22px, env(safe-area-inset-right)) 7px
      max(22px, env(safe-area-inset-left));
    position: relative;
  }
  .play-header {
    height: 37px;
    min-height: 37px;
    width: min(55vw, 480px);
    align-self: center;
    z-index: 4;
    gap: 8px;
  }
  .play-header .icon-button {
    width: 28px;
    height: 28px;
    font-size: 22px;
  }
  .play-heading > span:first-child {
    font-size: 9px;
  }
  .play-heading > span:last-child {
    font-size: 8px;
  }
  .connection-button {
    font-size: 7px;
  }
  .menu-icon span {
    width: 10px;
  }
  .handheld {
    margin: 0;
    display: block;
    flex: 1;
    position: relative;
    min-height: 0;
  }
  .screen-shell {
    position: absolute;
    left: 50%;
    top: 5px;
    transform: translateX(-50%);
    width: min(54vw, calc((100svh - 98px) * 1.5));
    padding: 8px 10px 7px;
    border-radius: 10px 10px 20px 10px;
    z-index: 1;
  }
  .screen-topline {
    margin-bottom: 5px;
  }
  .screen-topline > span:first-child {
    font-size: 8px;
  }
  .screen-topline > span:last-child {
    font-size: 5px;
  }
  .screen-bottomline {
    margin-top: 6px;
    font-size: 5px;
  }
  .screen-bottomline > span:first-child {
    font-size: 5px;
  }
  .screen-bottomline > span:last-child {
    font-size: 4px;
  }
  .controller {
    position: absolute;
    inset: 0;
    margin: 0;
    max-width: none;
    pointer-events: none;
    z-index: 2;
  }
  .controller button,
  .controller [data-dpad] {
    pointer-events: auto;
  }
  .shoulder-row {
    position: absolute;
    left: 1px;
    right: 1px;
    top: 8px;
    padding: 0;
  }
  .shoulder-button {
    width: 104px;
    height: 29px;
    font-size: 13px;
    gap: 10px;
    padding: 0 13px;
  }
  .shoulder-button span {
    font-size: 5px;
    letter-spacing: 0.5px;
  }
  .controller-grip {
    display: none;
  }
  .main-controls {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-40%);
    padding: 0;
    margin: 0;
    min-height: 0;
  }
  .dpad {
    width: 125px;
    height: 125px;
  }
  .face-buttons {
    gap: 12px;
    margin: 0 -5px 0 0;
    transform: rotate(-24deg) scale(calc(var(--control-scale) * 0.93));
  }
  .face-button {
    width: 55px;
    height: 55px;
    font-size: 21px;
  }
  .face-button:before {
    inset: -5px;
  }
  .bottom-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 13px;
    margin: 0;
    padding: 0;
    min-height: 0;
    display: block;
  }
  .controller-caption,
  .speaker {
    display: none;
  }
  .utility-buttons {
    justify-content: space-between;
    gap: 0;
    transform: none;
  }
  .utility-button {
    min-width: 104px;
    min-height: 39px;
    padding: 3px 5px;
    gap: 7px;
    transform: scale(var(--control-scale));
  }
  .utility-button i {
    height: 7px;
    width: 34px;
  }
  .utility-button > span {
    font-size: 5px;
  }
  .play-footer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(51vw, 410px);
    bottom: 7px;
    margin: 0;
    padding-top: 6px;
    min-height: 23px;
  }
  .play-footer .text-button {
    font-size: 8px;
    padding: 3px 0;
  }
  .play-footer .text-button > span {
    font-size: 12px;
  }
  .players-button {
    font-size: 8px;
    gap: 6px;
  }
  .avatar-stack i {
    width: 17px;
    height: 17px;
    font-size: 6px;
  }
  .sheet-dialog {
    max-height: 92svh;
  }
  .stream-overlay strong {
    font-size: 12px;
  }
  .stream-overlay p {
    font-size: 8px;
  }
  .loading-orbit {
    width: 17px;
    height: 17px;
    margin-bottom: 10px;
  }
  .controller.left-handed .shoulder-row {
    flex-direction: row-reverse;
  }
  .controller.left-handed .face-buttons {
    margin-left: -5px;
    margin-right: 0;
  }
  .controller.left-handed .utility-buttons {
    flex-direction: row-reverse;
  }
  .practice-banner {
    top: 9px;
    left: 18px;
    transform: none;
    width: 170px;
    padding: 9px 10px;
  }
  .practice-banner small {
    font-size: 6px;
  }
  .practice-banner b {
    font-size: 9px;
  }
  .practice-banner .small-button {
    font-size: 8px;
    padding: 6px 8px;
  }
  .practice-banner > span {
    gap: 3px;
  }
}
@media (orientation: landscape) and (max-height: 370px) {
  .screen-shell {
    width: min(54vw, calc((100svh - 85px) * 1.5));
    top: 1px;
  }
  .play-header {
    height: 32px;
    min-height: 32px;
  }
  .dpad {
    width: 110px;
    height: 110px;
  }
  .main-controls {
    top: 48%;
  }
  .face-button {
    width: 49px;
    height: 49px;
  }
  .shoulder-row {
    top: 3px;
  }
  .shoulder-button {
    height: 25px;
    width: 92px;
  }
  .bottom-controls {
    bottom: 10px;
  }
  .play-footer {
    bottom: 5px;
  }
  .screen-topline {
    margin-bottom: 4px;
  }
  .screen-bottomline {
    margin-top: 4px;
  }
  .screen-shell {
    padding-top: 6px;
    padding-bottom: 5px;
  }
  .utility-button {
    min-width: 92px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.backup-note {
  margin-top: 10px;
}
.clear-seat {
  background: none;
  border: 1px solid #5a4b42;
  color: #c4927e;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-row .clear-seat {
  margin-left: 1px;
}
.shoulder-button {
  min-height: 44px;
}
.utility-button {
  min-height: 44px;
}
@media (max-width: 700px) {
  .intro-art {
    opacity: 0.23;
    right: -55px;
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  .screen-shell {
    width: min(54vw, calc((100svh - 128px) * 1.5));
  }
  .shoulder-button {
    height: 44px;
  }
  .utility-button {
    height: 44px;
  }
  .play-footer {
    z-index: 3;
  }
}
@media (orientation: landscape) and (max-height: 370px) {
  .screen-shell {
    width: min(54vw, calc((100svh - 117px) * 1.5));
  }
}
.patch-game {
  display: block;
  background: none;
  color: #879780;
  font-size: 8px;
  margin: -6px 16px 13px;
  padding: 3px 0;
  font-weight: 400;
}
.game-card .patch-game:hover {
  color: #bfceb2;
}
.rewind-button {
  margin-top: 15px !important;
  font-size: 11px;
}
.cheat-form {
  border-top: 1px solid #3b4738;
  padding-top: 20px;
  margin-top: 20px;
}
.cheat-form label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #b9c9ad;
  font-size: 11px;
}
.cheat-form textarea {
  font-family: monospace;
  font-size: 12px;
  background: #1b2420;
  color: #d6dfcc;
  border: 1px solid #4a564b;
  border-radius: 6px;
  padding: 12px;
  resize: vertical;
  width: 100%;
  line-height: 1.7;
  min-height: 95px;
}
.cheat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #384435;
}
.cheat-toggle-label {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  cursor: pointer;
}
.cheat-toggle-label input {
  accent-color: #abc28b;
  width: 18px;
  height: 18px;
}
.cheat-list > .quiet-copy {
  padding: 14px 0;
}
.dpad {
  transform-origin: left center;
}
.face-buttons {
  transform-origin: right center;
}
.controller.left-handed .dpad {
  transform-origin: right center;
}
.controller.left-handed .face-buttons {
  transform-origin: left center;
}
.controller.custom-layout {
  position: relative;
  width: 100%;
  max-width: none;
  flex: none;
  height: 280px;
  margin: 22px 0 7px;
  touch-action: none;
}
.custom-layout .layout-group {
  position: absolute;
  margin: 0 !important;
  transform: none !important;
  translate: -50% -50%;
  touch-action: none;
  flex: none;
  pointer-events: auto;
}
.custom-layout .layout-group:not([data-dpad]) > button {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  transform: none;
  box-sizing: border-box;
}
.custom-layout .face-button {
  font-size: 25px;
}
.custom-layout .face-button.is-pressed,
.custom-layout .shoulder-button.is-pressed {
  transform: none !important;
  filter: brightness(1.12);
}
.custom-layout .face-button:before {
  inset: -5px;
}
.custom-layout .utility-button {
  gap: 8px;
  padding: 3px 0;
}
.custom-layout .utility-button i {
  max-width: 80%;
}
.custom-layout .shoulder-button {
  justify-content: space-between;
  padding: 0 12px;
  gap: 7px;
}
.custom-layout .shoulder-button span {
  font-size: 5px;
  letter-spacing: 0.8px;
}
.custom-layout .layout-group[data-layout-group="r"] .shoulder-button {
  justify-content: space-between;
}
.layout-drag-hint {
  display: none;
  pointer-events: none;
}
.layout-editing {
  opacity: 1 !important;
}
.layout-editing .layout-group {
  outline: 1px dashed #8ba77c;
  outline-offset: 3px;
  border-radius: 7px;
  cursor: grab;
}
.layout-editing .layout-group[data-layout-group="a"],
.layout-editing .layout-group[data-layout-group="b"] {
  border-radius: 50%;
}
.layout-editing .layout-group > button {
  pointer-events: none;
}
.layout-editing .layout-drag-hint {
  display: block;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  color: #e7f0d5;
  background: #263d25d9;
  border-radius: 3px;
  padding: 2px 4px;
  white-space: nowrap;
  z-index: 8;
}
.layout-editing .layout-selected {
  outline: 2px solid #f7a57c;
  outline-offset: 4px;
}
.layout-editing .layout-blocked {
  outline-color: #df7969;
}
.layout-toolbar {
  position: fixed;
  z-index: 25;
  left: 50%;
  top: max(76px, calc(env(safe-area-inset-top) + 65px));
  transform: translateX(-50%);
  width: min(360px, calc(100% - 26px));
  padding: 14px 15px 11px;
  background: #d4dfc3;
  color: #293a23;
  border: 1px solid #f1f5da;
  border-radius: 10px;
  box-shadow: 0 7px 28px #00000040;
}
.layout-toolbar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.layout-toolbar-heading > span {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.layout-toolbar small {
  font-size: 7px;
  letter-spacing: 1px;
  color: #667a55;
}
.layout-toolbar b {
  font-size: 12px;
  font-weight: 500;
}
.layout-toolbar .small-button {
  background: #b2c69b;
  color: #2f4321;
  border-color: #9bad86;
}
.layout-toolbar-options {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
}
.layout-toolbar-options select {
  width: 105px;
  min-height: 29px;
  background: #c1cfad;
  border-color: #9cac8b;
  color: #314527;
  font-size: 10px;
  padding: 6px 7px;
}
.layout-toolbar-options input {
  min-width: 20px;
  width: 100%;
  accent-color: #758b5a;
}
.layout-toolbar-options output {
  font-size: 9px;
  min-width: 28px;
}
.layout-toolbar-options .text-button {
  font-size: 9px;
  color: #5f774a;
  padding: 5px 0;
}
.layout-toolbar p {
  font-size: 8px;
  color: #6d7c5d;
  margin-top: 8px;
  line-height: 1.5;
}
@media (max-height: 740px) and (orientation: portrait) {
  .controller.custom-layout {
    margin-top: 17px;
    margin-bottom: 5px;
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  .controller.custom-layout {
    position: absolute;
    inset: 0;
    height: auto;
    margin: 0;
    pointer-events: none;
  }
  .custom-layout .face-button {
    font-size: 22px;
  }
  .custom-layout .shoulder-button {
    font-size: 13px;
  }
  .layout-toolbar {
    top: 8px;
    width: min(365px, 48vw);
    padding: 10px 12px 8px;
  }
  .layout-toolbar b {
    font-size: 10px;
  }
  .layout-toolbar-options {
    margin-top: 8px;
    gap: 7px;
  }
  .layout-toolbar p {
    font-size: 7px;
    margin-top: 6px;
  }
  .layout-toolbar-options select {
    min-height: 25px;
    padding: 4px 6px;
    font-size: 9px;
    width: 100px;
  }
  .layout-toolbar .small-button {
    font-size: 8px;
    padding: 6px 8px;
  }
  .layout-toolbar small {
    font-size: 6px;
  }
  .custom-layout .utility-button > span {
    font-size: 6px;
  }
}
.resume-hint {
  margin-top: 8px;
}
.favorite-game {
  position: absolute;
  right: 3px;
  top: 2px;
  z-index: 3;
  background: none;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}
.favorite-game[aria-pressed="true"] {
  color: #f6d998;
  opacity: 1;
}
.unlock-media.sound-only {
  inset: auto 8px 8px;
  width: calc(100% - 16px);
  height: 35px;
  min-height: 35px;
  flex-direction: row;
  gap: 8px;
  border: 1px solid #687b5655;
  border-radius: 5px;
  background: #111a12e8;
  padding: 5px 8px;
  justify-content: center;
}
.unlock-media.sound-only .play-triangle {
  width: 22px;
  height: 22px;
  font-size: 8px;
  margin: 0;
  flex-shrink: 0;
}
.unlock-media.sound-only strong {
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
}
.unlock-media.sound-only small {
  font-size: 7px;
  color: #b2c2a3;
}
.player-info {
  min-width: 0;
}
.player-info b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-row > .small-button {
  font-size: 8px;
  padding: 6px 7px;
}

.fullscreen-button[aria-pressed="true"] {
  color: #d3e6bb;
  border-color: #83966e;
}
body.fullscreen-game {
  overflow: hidden;
}
body.fullscreen-game .play {
  height: 100dvh;
  min-height: 0;
  padding-top: max(6px, env(safe-area-inset-top));
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}
/* Controller themes keep their chosen bezel in installed and native fullscreen. */
body.fullscreen-game .play:not([data-controller-theme]) .screen-topline,
body.fullscreen-game .play:not([data-controller-theme]) .screen-bottomline,
body.fullscreen-game .play-footer {
  display: none;
}
body.fullscreen-game .play:not([data-controller-theme]) .screen-shell {
  padding: 0;
  border: 0;
  border-radius: 4px;
}
body.fullscreen-game .handheld {
  margin-top: 8px;
}
@media (orientation: landscape) and (max-height: 600px) {
  body.fullscreen-game .handheld {
    margin-top: 0;
  }
  body.fullscreen-game .screen-shell {
    top: 0;
    width: min(54vw, calc((100dvh - 64px) * 1.5));
  }
}
/* A durable identity is checked before catalog Play can allocate a new game. */
.device-library-status { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; padding:11px 14px; margin:0 0 16px; border:1px solid #72836a55; border-radius:12px; background:#72836a14; color:var(--text,#ece8dc); font-size:13px; line-height:1.5; }
.device-library-status[hidden],.device-save-status[hidden] { display:none; }
.device-library-status.is-warning,.device-save-status.is-warning { border-color:#cb8b5c77; }
.device-library-status .text-button { margin-left:auto; font-size:12px; }
.device-save-status { font-size:12px; line-height:1.6; padding:10px 12px; border:1px solid #72836a55; border-radius:10px; }
.device-pair-dialog #device-pair-form { display:grid; gap:12px; }
.device-pair-dialog #device-pair-form label { font-size:13px; }
.device-pair-dialog #device-pair-name { width:100%; min-height:48px; font-size:16px; }
.device-pair-code-panel { margin:20px 0; padding:20px 12px; border:1px solid #87976d77; border-radius:16px; background:#7f93651a; text-align:center; }
.device-pair-code-panel[hidden],.device-pair-admin[hidden] { display:none; }
.device-pair-code-panel output { display:block; margin:10px 0; font:700 clamp(28px,8vw,39px)/1.3 ui-monospace,monospace; letter-spacing:.12em; user-select:text; -webkit-user-select:text; }
.device-pair-code-panel small { display:block; font-size:12px; line-height:1.6; opacity:.75; }
.device-pair-message { font-size:13px; line-height:1.7; }
.device-pair-admin { margin:20px 0; padding:16px; border:1px solid #72836a55; border-radius:14px; }
.device-pair-admin summary { cursor:pointer; font-weight:600; }
.device-pair-request { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; padding:16px 0; border-bottom:1px solid #72836a33; }
.device-pair-request select { width:100%; min-height:44px; }
.device-library-status .secondary-button { width:100%; min-height:44px; }
