:root {
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  color: #314c43;
  background: #f6f4e9;
  font-synthesis: none;
  --paper: #f6f4e9;
  --ink: #314c43;
  --muted: #717c70;
  --coral: #cb5b48;
  --line: #dcded1;
  --green: #537d61;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #496f95;
  outline-offset: 4px;
}
button:active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
p {
  margin: 0;
}
button {
  border: 0;
}
main {
  min-height: 100dvh;
}
.home {
  overflow-x: clip;
  max-width: 1500px;
  margin: auto;
  padding: 0 5.5vw;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 1px;
}
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  margin-top: 4px;
  color: var(--muted);
}
.brand-mark {
  background: #e9a897;
  color: #fff7e8;
  display: grid;
  place-items: center;
  width: 38px;
  height: 40px;
  font-size: 22px;
  border-radius: 14px 14px 17px 6px;
  transform: rotate(-7deg);
}
.text-button {
  background: none;
  font-size: 13px;
  padding: 10px 0;
  color: #596b60;
}
.text-button span {
  margin-left: 15px;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.3fr);
  gap: 30px;
  flex: 1;
  align-items: center;
}
.intro {
  padding: 20px 0 35px;
  z-index: 1;
}
.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #7c836c;
}
.intro h1 {
  font-size: clamp(50px, 5vw, 76px);
  font-weight: 850;
  letter-spacing: -3px;
  line-height: 1.22;
  margin: 19px 0 21px;
}
.intro h1 span {
  color: var(--coral);
}
.intro-copy {
  font-size: 15px;
  line-height: 1.9;
  color: #657268;
}
.room-entry {
  max-width: 365px;
  margin-top: 30px;
}
.entry-tabs {
  display: flex;
  gap: 27px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 19px;
}
.entry-tabs button {
  font-size: 14px;
  padding: 0 0 11px;
  background: none;
  color: #737c70;
  border-bottom: 2px solid transparent;
}
.entry-tabs button[aria-selected='true'] {
  color: var(--ink);
  font-weight: 750;
  border-bottom-color: var(--ink);
}
fieldset {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
}
legend,
.input-label {
  font-size: 12px;
  color: #647264;
  margin-bottom: 10px;
}
.role-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.role-choices label {
  position: relative;
  cursor: pointer;
}
.role-choices input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.role-choices span {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  border: 1px solid #daddce;
  border-radius: 12px;
  padding: 4px 14px;
  font-size: 13px;
  background: #ffffff55;
  overflow: hidden;
}
.role-choices img {
  width: 30px;
  height: 41px;
  object-fit: cover;
  object-position: top;
}
.role-choices input:checked + span {
  background: #e9eedf;
  border: 1px solid #779677;
  color: #365540;
  font-weight: 700;
}
.role-choices input:focus-visible + span {
  outline: 3px solid #496f95;
  outline-offset: 3px;
}
.primary {
  background: var(--coral);
  color: #fff9ef;
  min-height: 49px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 14px;
  width: 100%;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  box-shadow: 0 4px 0 #b54b3a;
  transition:
    background 0.18s,
    transform 0.18s;
}
.primary:hover {
  background: #bc4d3c;
}
.primary span {
  margin-left: auto;
  font-size: 20px;
  font-weight: 400;
}
.form-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 15px;
  text-align: center;
  line-height: 1.7;
}
.room-input {
  display: block;
  width: 100%;
  height: 58px;
  border: 1px solid #b9c5b2;
  border-radius: 12px;
  background: #fffdf5;
  color: var(--ink);
  font-size: 25px;
  letter-spacing: 9px;
  padding: 8px 16px;
  margin: 10px 0 17px;
}
.room-input::placeholder {
  font-size: 16px;
  letter-spacing: 4px;
  color: #7d8375;
}
.error {
  color: #b33a32;
  line-height: 1.6;
  font-size: 13px;
  margin-top: 15px;
}
.hero-art {
  position: relative;
  min-height: 580px;
  height: min(690px, 75vh);
  align-self: center;
  isolation: isolate;
}
.hero-art > canvas {
  position: absolute;
  width: 120%;
  height: 100%;
  left: -9%;
  object-fit: cover;
  z-index: -1;
  border-radius: 45% 45% 14% 14%;
}
.hero-caption {
  position: absolute;
  top: 4%;
  left: 28%;
  font-size: 13px;
  color: #6f8063;
  transform: rotate(-5deg);
  display: flex;
  align-items: center;
  gap: 10px;
}
.caption-line {
  width: 25px;
  border-top: 1px solid #9ca884;
}
.cover-people {
  position: absolute;
  inset: 15% -2% 10%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.cover-people canvas {
  height: 100%;
  max-width: 56%;
  object-fit: contain;
  filter: drop-shadow(0 12px 9px #52674413);
}
.cover-boy {
  margin-right: -4%;
}
.cover-girl {
  margin-left: -4%;
}
.character-names {
  position: absolute;
  bottom: 3%;
  left: 22%;
  right: 19%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  letter-spacing: 4px;
  color: #52664d;
}
.heart {
  color: #d98771;
  font-size: 19px;
}
.home-footer {
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
  color: #77816f;
  font-size: 11px;
  letter-spacing: 1px;
  gap: 15px;
}
.small-button {
  border: 1px solid #ccd6c6;
  border-radius: 10px;
  background: #ffffff6b;
  padding: 10px 15px;
  font-size: 12px;
  min-height: 38px;
}
.small-button:hover {
  background: #ffffff;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.lobby {
  max-width: 1100px;
  margin: auto;
  padding: 0 6vw 28px;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 50% 60%, #e4ebd2 0, transparent 65%);
}
.lobby-content {
  text-align: center;
  padding-top: 22px;
}
.lobby h1 {
  font-size: 40px;
  letter-spacing: -1.5px;
  margin: 13px 0;
}
.invite {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin: 21px 0 12px;
  flex-wrap: wrap;
}
.invite strong {
  font-size: 37px;
  letter-spacing: 10px;
  font-variant-numeric: tabular-nums;
  color: #c36350;
}
.lobby-players {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 8px auto 20px;
  max-width: 590px;
}
.player-slot {
  width: 42%;
  transition: opacity 0.2s;
}
.player-slot.absent .player-art {
  opacity: 0.28;
  filter: grayscale(0.7);
}
.player-art {
  height: 240px;
  transition: opacity 0.2s;
}
.player-art canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.player-slot h2 {
  font-size: 20px;
  margin: 9px 0;
}
.you {
  font-size: 10px;
  color: #9c614d;
  vertical-align: middle;
}
.player-status {
  font-size: 12px;
  color: #687760;
  min-height: 20px;
}
.lobby-heart {
  color: #cc8d79;
  font-size: 23px;
  padding-bottom: 70px;
}
.ready-button {
  width: 280px;
  margin: auto;
}
.journey {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 11px;
  color: #7a8471;
  margin: 37px 0 0;
}
.journey i {
  width: 40px;
  height: 1px;
  background: #c7d2ba;
}
.journey .current {
  color: #496540;
  font-weight: 700;
}
.game-screen {
  height: var(--available-height, 100dvh);
  background: #edf1e5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  position: relative;
}
.game-bar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  max-width: 1200px;
  width: 100%;
  margin: auto;
}
.game-bar > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stage-number {
  font-size: 12px;
  color: #718069;
  border: 1px solid #bcc9b2;
  border-radius: 50%;
  padding: 7px;
}
.game-bar strong {
  font-size: 16px;
  letter-spacing: 1px;
}
.game-stats #star-count {
  font-size: 22px;
  color: #a57b2c;
  letter-spacing: 5px;
}
.room-tag {
  font-size: 11px;
  color: #77846b;
}
.game-viewport {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}
.game-viewport canvas {
  display: block;
  width: var(--world-width, 960px);
  height: var(--world-height, 540px);
  aspect-ratio: 16/9;
  object-fit: contain;
  border-radius: 18px;
}
.level-hint {
  position: relative;
  font-size: 12px;
  background: #fdfbf0ed;
  color: #546347;
  border: 1px solid #e0e3ce;
  padding: 9px 16px;
  border-radius: 10px;
  text-align: center;
  max-width: 72%;
  margin: 0 auto 4px;
  flex-shrink: 0;
  pointer-events: none;
}
.game-identity {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-size: 10px;
  color: #5f7354;
  display: flex;
  gap: 15px;
  background: #f7f6e9cc;
  padding: 7px 10px;
  border-radius: 8px;
}
.controls {
  height: 86px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  margin: auto;
  touch-action: none;
  padding-bottom: env(safe-area-inset-bottom);
}
.directions,
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.controls button {
  height: 61px;
  width: 67px;
  border-radius: 17px;
  border: 1px solid #bfccb5;
  background: #fffdf3;
  box-shadow: 0 4px 0 #becbb0;
  font-size: 26px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.controls button.pressed {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #becbb0;
  background: #dfe9ce;
}
.controls button.interact {
  font-size: 13px;
  width: 65px;
  height: 50px;
}
.controls button.interact.available {
  border-color: #be624f;
  background: #f8dbc9;
  color: #8f392c;
}
.controls button.jump {
  width: 95px;
  background: #cf6b57;
  border-color: #b45945;
  box-shadow: 0 4px 0 #a94e3b;
  color: #fff9ea;
}
.jump span {
  font-size: 13px;
}
.controls p {
  font-size: 11px;
  color: #718064;
  letter-spacing: 1px;
}
.game-overlay {
  position: absolute;
  inset: 0;
  background: #233e3c52;
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 5;
  overflow: auto;
}
.overlay-card {
  background: #fbf8ed;
  padding: 28px 35px;
  border-radius: 23px;
  width: 400px;
  max-width: 100%;
  text-align: center;
  box-shadow: 0 20px 80px #24372726;
}
.overlay-symbol {
  color: #d47b62;
  font-size: 37px;
  display: block;
  margin-bottom: 7px;
}
.overlay-card h2 {
  font-size: 27px;
  margin: 12px 0;
}
.overlay-card > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.8;
  margin: 8px 0 15px;
}
.overlay-card .primary {
  margin: 16px 0 6px;
}
.overlay-card .text-button {
  display: block;
  margin: auto;
}
.rotate-hint {
  display: none;
}
.connection,
.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 12px;
  background: #304d42;
  color: #fff9ec;
  padding: 13px 20px;
  text-align: center;
  font-size: 13px;
  max-width: 90vw;
  width: max-content;
  box-shadow: 0 6px 26px #20362b24;
}
.connection {
  top: 18px;
}
.toast {
  bottom: 25px;
}
dialog {
  border: 1px solid #e0e1d2;
  border-radius: 22px;
  background: #fbf8ef;
  color: var(--ink);
  padding: 33px;
  max-width: 480px;
  width: calc(100% - 36px);
  box-shadow: 0 25px 100px #233c3933;
}
dialog::backdrop {
  background: #213d3a66;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 28px;
  line-height: 1.4;
  margin: 12px 0 25px;
}
.dialog-close {
  position: absolute;
  right: 17px;
  top: 12px;
  background: none;
  font-size: 27px;
  color: #7c8575;
}
dialog ol {
  padding-left: 23px;
}
dialog li {
  padding-left: 8px;
  margin: 19px 0;
  font-size: 14px;
}
dialog li p {
  font-size: 13px;
  color: #6b7867;
  line-height: 1.9;
  margin-top: 5px;
}
.dialog-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}
.dialog-actions button {
  width: 50%;
}
#leave-dialog > p {
  line-height: 1.8;
  font-size: 14px;
}
@media (min-width: 1450px) {
  .hero-art {
    height: 690px;
  }
  .home-grid {
    gap: 70px;
  }
  .intro h1 {
    font-size: 82px;
  }
}
@media (max-width: 850px) {
  .home {
    padding: 0 6vw;
  }
  .topbar {
    height: 77px;
  }
  .home-grid {
    grid-template-columns: 1fr 1.15fr;
    gap: 0;
  }
  .intro h1 {
    font-size: 50px;
  }
  .intro-copy {
    font-size: 13px;
  }
  .hero-art {
    min-height: 470px;
    height: 65vh;
  }
  .hero-caption {
    font-size: 10px;
    left: 15%;
  }
  .room-entry {
    margin-top: 23px;
  }
  .character-names {
    font-size: 13px;
    left: 15%;
    right: 10%;
  }
  .room-tag {
    display: none;
  }
  .game-bar {
    height: 47px;
  }
  .controls {
    height: 72px;
  }
  .controls button {
    height: 53px;
    width: 61px;
  }
  .game-bar .small-button {
    min-height: 31px;
    padding: 6px 11px;
  }
  .game-bar strong {
    font-size: 13px;
  }
  .game-stats #star-count {
    font-size: 17px;
  }
  .level-hint {
    font-size: 10px;
    padding: 6px 10px;
    top: 5px;
  }
  .game-identity {
    bottom: 5px;
    padding: 5px 8px;
  }
  .game-viewport canvas {
    border-radius: 12px;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .home-grid {
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: stretch;
  }
  .intro {
    padding: 14px 0 22px;
  }
  .intro h1 {
    font-size: 38px;
    margin: 15px 0;
    letter-spacing: -2px;
  }
  .intro .eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
  }
  .intro-copy {
    font-size: 12px;
    line-height: 1.9;
    margin-top: 64px;
  }
  .hero-art {
    position: absolute;
    top: 10px;
    right: 0;
    width: 50%;
    height: 180px;
    min-height: 0;
    z-index: -0;
    pointer-events: none;
  }
  .hero-caption {
    display: none;
  }
  .cover-people {
    inset: 14% -6% 8%;
  }
  .character-names {
    font-size: 10px;
    bottom: 1%;
    left: 10%;
    right: 0;
    letter-spacing: 1px;
  }
  .character-names .heart {
    font-size: 12px;
  }
  .hero-art > canvas {
    width: 100%;
    left: 0;
  }
  .room-entry {
    max-width: 100%;
    margin-top: 22px;
    position: relative;
  }
  .brand {
    font-size: 16px;
  }
  .brand small {
    font-size: 9px;
  }
  .home-footer {
    font-size: 9px;
    letter-spacing: 0;
    line-height: 1.7;
    flex-wrap: wrap;
    padding-top: 12px;
    gap: 6px;
  }
  .home {
    min-height: 100dvh;
  }
  .home-grid {
    flex: 1;
    justify-content: flex-start;
  }
  .intro {
    flex: 0;
  }
  .role-choices span {
    height: 57px;
  }
  .primary {
    min-height: 51px;
  }
  .lobby {
    padding: 0 6vw 20px;
  }
  .lobby-content {
    padding-top: 15px;
  }
  .lobby h1 {
    font-size: 31px;
  }
  .invite {
    gap: 12px;
  }
  .invite strong {
    font-size: 32px;
    letter-spacing: 7px;
  }
  .invite .text-button {
    width: 100%;
    padding: 0;
  }
  .player-art {
    height: 210px;
  }
  .lobby-players {
    gap: 10px;
  }
  .lobby-heart {
    font-size: 18px;
  }
  .journey {
    gap: 9px;
    font-size: 9px;
    margin-top: 30px;
  }
  .journey i {
    width: 14px;
  }
  .lobby .muted {
    font-size: 11px;
  }
  .rotate-hint {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 8;
    background: #f4f3e8;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .rotate-hint > span {
    font-size: 65px;
    color: #ce7c63;
  }
  .rotate-hint h2 {
    font-size: 26px;
  }
  .rotate-hint p {
    line-height: 1.9;
    color: #768067;
    font-size: 14px;
  }
}
@media (max-height: 550px) and (orientation: landscape) {
  .game-bar {
    height: 39px;
  }
  .controls {
    height: 65px;
  }
  .controls p {
    font-size: 10px;
  }
  .controls button {
    height: 46px;
    width: 59px;
    border-radius: 13px;
  }
  .controls button.interact {
    height: 42px;
  }
  .controls button.jump {
    width: 86px;
  }
  .stage-number {
    padding: 4px;
    font-size: 10px;
  }
  .game-bar .small-button {
    padding: 5px 10px;
    min-height: 28px;
  }
  .game-bar strong {
    font-size: 12px;
  }
  .level-hint {
    max-width: 70%;
    font-size: 9px;
    top: 3px;
  }
  .game-identity {
    font-size: 9px;
  }
  .overlay-card {
    padding: 16px 25px;
    max-width: 430px;
  }
  .overlay-symbol {
    display: none;
  }
  .overlay-card h2 {
    font-size: 23px;
    margin: 7px 0;
  }
  .overlay-card > p:not(.eyebrow) {
    margin: 6px 0;
    font-size: 12px;
  }
  .overlay-card .primary {
    min-height: 40px;
    margin: 10px 0 2px;
  }
  .overlay-card .text-button {
    padding: 6px;
    font-size: 11px;
  }
  .lobby .topbar {
    height: 50px;
  }
  .lobby-content {
    padding-top: 0;
  }
  .lobby-content > .eyebrow,
  .lobby-content > .muted,
  .journey {
    display: none;
  }
  .lobby h1 {
    font-size: 25px;
    margin: 0 0 6px;
  }
  .invite {
    margin: 0;
    gap: 15px;
  }
  .invite strong {
    font-size: 26px;
  }
  .lobby-players {
    margin: 0 auto 8px;
  }
  .player-art {
    height: 110px;
  }
  .player-slot h2 {
    font-size: 14px;
    margin: 0;
  }
  .player-status {
    font-size: 10px;
  }
  .lobby-heart {
    padding: 0;
  }
  .lobby .primary {
    min-height: 40px;
  }
  .lobby .form-note {
    margin-top: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-height: 550px) and (orientation: landscape) {
  .level-hint {
    max-width: 65%;
  }
}

/* Short landscapes need a height budget, including browser and safe-area space. */
@media (orientation: landscape) and (max-height: 600px) {
  main {
    min-height: var(--available-height, 100dvh);
  }
  .home {
    height: var(--available-height, 100dvh);
    min-height: 0;
    padding: env(safe-area-inset-top) max(22px, env(safe-area-inset-right)) env(safe-area-inset-bottom)
      max(22px, env(safe-area-inset-left));
  }
  .home .topbar {
    height: 44px;
  }
  .home .brand {
    font-size: 14px;
    gap: 8px;
  }
  .home .brand small,
  .home .eyebrow,
  .home-footer,
  .home .form-note {
    display: none;
  }
  .home .brand-mark {
    width: 27px;
    height: 29px;
    font-size: 17px;
    border-radius: 10px 10px 12px 4px;
  }
  .home-grid {
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    min-height: 0;
    align-items: stretch;
  }
  .intro {
    min-height: 0;
    padding: 8px 0 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    align-content: center;
  }
  .intro h1 {
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -1.5px;
    line-height: 1.2;
    margin: 0 0 8px;
  }
  .intro h1 br {
    display: none;
  }
  .intro-copy {
    font-size: 12px;
    line-height: 1.5;
  }
  .intro-copy .long-copy {
    display: none;
  }
  .room-entry {
    margin-top: 14px;
    max-width: 360px;
  }
  .entry-tabs {
    margin-bottom: 10px;
  }
  .entry-tabs button {
    padding: 5px 0 8px;
    font-size: 13px;
  }
  .home fieldset {
    margin-bottom: 10px;
  }
  .home legend {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .role-choices span {
    height: 44px;
    padding: 3px 10px;
    gap: 8px;
    font-size: 12px;
  }
  .home .primary {
    min-height: 44px;
    padding: 9px 14px;
    font-size: 13px;
  }
  .room-input {
    height: 44px;
    margin: 5px 0 10px;
    font-size: 20px;
  }
  .home .error {
    margin-top: 10px;
  }
  .hero-art {
    min-height: 0;
    height: 100%;
    align-self: stretch;
  }
  .hero-caption {
    top: 5%;
    left: 20%;
    font-size: 11px;
    background: #f6f4e9d9;
    padding: 5px 9px;
    border-radius: 12px;
  }
  .character-names {
    font-size: 12px;
    bottom: 5%;
    background: #f6f4e9e6;
    padding: 5px 10px;
    border-radius: 12px;
  }
  .lobby {
    height: var(--available-height, 100dvh);
    min-height: 0;
    padding: env(safe-area-inset-top) max(22px, env(safe-area-inset-right)) env(safe-area-inset-bottom)
      max(22px, env(safe-area-inset-left));
    overflow-y: auto;
  }
  .lobby .topbar {
    height: 44px;
  }
  .lobby-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto 1fr;
    column-gap: 22px;
    align-items: center;
    align-content: center;
    height: calc(100% - 44px);
    min-height: 215px;
    padding: 12px 0;
    text-align: left;
  }
  .lobby-content > .eyebrow,
  .lobby-content > .muted,
  .lobby .journey {
    display: none;
  }
  .lobby h1 {
    font-size: 27px;
    margin: 0 0 12px;
  }
  .invite {
    grid-column: 1;
    justify-content: flex-start;
    gap: 8px 12px;
    margin: 0 0 14px;
  }
  .invite strong {
    font-size: 28px;
    letter-spacing: 5px;
  }
  .invite .text-button {
    font-size: 11px;
    padding: 4px 0;
  }
  .lobby-players {
    grid-column: 2;
    grid-row: 1 / 5;
    width: 100%;
    height: 100%;
    margin: 0;
    gap: 8px;
  }
  .player-art {
    height: clamp(90px, 45dvh, 230px);
  }
  .player-slot h2 {
    font-size: 14px;
    margin: 4px 0;
  }
  .player-status {
    font-size: 10px;
  }
  .lobby-heart {
    padding: 0;
  }
  .ready-button {
    width: 100%;
    min-height: 44px;
    grid-column: 1;
    margin: 0;
  }
  .lobby .form-note {
    grid-column: 1;
    align-self: start;
    font-size: 10px;
    text-align: left;
    margin-top: 10px;
  }
  .game-screen {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .game-bar {
    height: 42px;
  }
  .controls {
    height: 62px;
    padding-bottom: 5px;
  }
  .controls p,
  .game-identity {
    display: none;
  }
  .controls button {
    min-height: 44px;
  }
  .level-hint {
    position: static;
    transform: none;
    max-width: 100%;
    font-size: 11px;
    padding: 3px 8px;
    border: 0;
    background: none;
    flex-shrink: 0;
  }
  .game-viewport {
    padding-bottom: 2px;
  }
  dialog {
    max-height: calc(var(--available-height, 100dvh) - 24px);
    overflow-y: auto;
    padding: 22px;
  }
}
@media (orientation: landscape) and (max-height: 600px) and (min-aspect-ratio: 2/1) {
  .game-viewport {
    width: auto;
    margin: 0 106px;
  }
  .controls {
    position: absolute;
    inset: auto max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    height: auto;
    pointer-events: none;
  }
  .directions,
  .actions {
    flex-direction: column;
    gap: 14px;
    pointer-events: auto;
  }
  .controls button,
  .controls button.jump,
  .controls button.interact {
    width: 78px;
    height: 54px;
  }
  .level-hint {
    margin: 0 100px;
  }
}
