﻿:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #657282;
  --line: #d9e1e8;
  --paper: #f6f8fb;
  --panel: #ffffff;
  --accent: #d6422b;
  --accent-dark: #aa301f;
  --gold: #f2bd45;
  --teal: #0f8f8c;
  --blue: #2f6fd6;
  --orange: #e5832d;
  --red: #c93945;
  --steel: #7d8794;
  --shadow: 0 18px 50px rgba(20, 34, 52, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 22px;
}

.topbar {
  max-width: 1180px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar h1,
.wall-head h2,
.result-copy h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.view {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
}

.view.active {
  display: block;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.panel,
.game-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.creation-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preview-panel {
  padding: 18px;
}

.mode-tabs,
.style-row {
  display: flex;
  gap: 8px;
}

.mode-tab,
.style-chip,
.ghost-button,
.icon-button,
.light-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
}

.mode-tab.active,
.style-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff5f2;
}

.mode-panel {
  display: none;
}

.mode-panel.active {
  display: block;
}

.file-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  border: 1px dashed #aab6c4;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfe;
}

.file-pick input {
  display: none;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

textarea {
  width: 100%;
  min-height: 126px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  outline: none;
}

textarea:focus {
  border-color: var(--teal);
}

.style-row {
  margin-top: 10px;
}

.settings-row {
  padding-top: 2px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.primary-button {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 13px 18px;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button.compact {
  padding: 11px 14px;
}

.preview-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #18212c;
  aspect-ratio: 3 / 2;
}

.preview-frame canvas,
.result-image canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d8e0e8;
  padding: 20px;
  text-align: center;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.preview-meta span {
  background: #eef3f7;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.game-layout {
  display: flex;
  justify-content: center;
}

.game-card {
  width: min(100%, 960px);
  overflow: hidden;
}

.hud {
  min-height: 64px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.hud strong {
  display: block;
  font-size: 20px;
}

.hud span {
  color: var(--muted);
  font-size: 13px;
}

.hud-stats,
.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  padding: 8px 10px;
  font-size: 13px;
}

.test-only {
  border-color: #f0c879;
  background: #fff8e7;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  background: #101821;
}

#gameCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 900 / 620;
}

.overlay-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 32px;
  background: rgba(14, 18, 24, 0.64);
}

.hidden {
  display: none;
}

.ad-banner {
  height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: #f9fbfc;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.ad-banner strong {
  color: var(--ink);
}

.result-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: center;
}

.result-image,
.result-copy {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.result-image {
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #15202b;
}

.result-copy {
  padding: 24px;
}

.result-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.success-view.active {
  position: fixed;
  inset: 0;
  z-index: 20;
  max-width: none;
  margin: 0;
}

.victory-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #05080c;
}

.victory-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080b0f;
}

.victory-border {
  position: absolute;
  inset: 22px;
  border: 6px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 42px rgba(242, 189, 69, 0.72);
  pointer-events: none;
}

.victory-copy {
  position: absolute;
  left: 50%;
  top: 42px;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  padding: 18px 20px;
  text-align: center;
  color: #fff;
  background: rgba(8, 12, 18, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.victory-copy p,
.victory-copy h2 {
  margin: 0;
}

.victory-copy h2 {
  font-size: 36px;
  margin: 4px 0 8px;
}

.victory-copy strong {
  color: #ffe19a;
}

.victory-actions {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.light-button {
  background: rgba(255, 255, 255, 0.92);
}

.wall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.wall-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.wall-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: #111923;
}

.wall-item div {
  padding: 12px;
}

.wall-item strong {
  display: block;
  margin-bottom: 4px;
}

.wall-item span {
  color: var(--muted);
  font-size: 13px;
}

.empty-wall {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .wall-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .setup-grid,
  .result-shell {
    grid-template-columns: 1fr;
  }

  .hud {
    grid-template-columns: 1fr;
  }

  .hud-stats,
  .hud-actions {
    flex-wrap: wrap;
  }

  .ad-banner {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 56px;
    padding: 8px 14px;
    text-align: center;
    gap: 2px;
  }

  .victory-border {
    inset: 12px;
    border-width: 4px;
  }

  .victory-copy {
    top: 24px;
  }

  .victory-copy h2 {
    font-size: 28px;
  }

  .victory-actions {
    width: calc(100% - 34px);
    flex-direction: column;
  }
}



/* theme override */
:root {
  --ink: #08152a;
  --muted: #627188;
  --line: #cad8ec;
  --paper: #edf4fb;
  --panel: #ffffff;
  --accent: #f2bd45;
  --accent-dark: #d99a1f;
  --gold: #f2bd45;
  --teal: #2f9bb6;
  --blue: #2364bd;
  --orange: #ec8d36;
  --red: #d3484f;
  --shadow: 0 18px 48px rgba(9, 28, 56, 0.14);
}

body {
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 189, 69, 0.18), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eaf2fb 44%, #dceaf7 100%);
}

.topbar {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(202, 216, 236, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(12, 38, 78, 0.18);
}

.brand-lockup h1 {
  color: #071327;
  font-size: 30px;
  line-height: 1;
}

.brand-lockup span {
  display: block;
  margin-top: 4px;
  color: #2364bd;
  font-weight: 800;
}

.eyebrow {
  color: #d99a1f;
}

.brand-card {
  padding: 14px;
  color: #fff;
  background: linear-gradient(135deg, #071327, #123a75 58%, #2364bd);
  border: 1px solid rgba(242, 189, 69, 0.45);
  border-radius: 8px;
  box-shadow: inset 0 0 28px rgba(242, 189, 69, 0.12);
}

.brand-card strong,
.brand-card span {
  display: block;
}

.brand-card strong {
  font-size: 18px;
  margin-bottom: 6px;
}

.brand-card span {
  color: #d9e8ff;
  font-size: 13px;
  line-height: 1.55;
}

.panel,
.game-card,
.result-image,
.result-copy,
.wall-item {
  border-color: rgba(22, 61, 120, 0.16);
}

.mode-tab.active,
.style-chip.active {
  border-color: var(--gold);
  color: #071327;
  background: #fff6d9;
}

.primary-button {
  background: linear-gradient(135deg, #f2bd45, #e18d25);
  color: #08152a;
  box-shadow: 0 10px 22px rgba(225, 141, 37, 0.25);
}

.primary-button:hover {
  background: linear-gradient(135deg, #ffd66b, #d98118);
}

.ghost-button,
.icon-button,
.light-button,
.mode-tab,
.style-chip {
  border-color: #c6d7ed;
}

.preview-frame,
.canvas-wrap,
.result-image {
  background: #071327;
}

.ad-banner {
  background: linear-gradient(90deg, #071327, #123a75, #071327);
  color: #dbeafe;
  border-top: 1px solid rgba(242, 189, 69, 0.45);
}

.ad-banner strong {
  color: #f2bd45;
}

.victory-border {
  border-color: #f2bd45;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.68), 0 0 52px rgba(242,189,69,0.86), inset 0 0 34px rgba(35,100,189,0.36);
}

.wall-item strong {
  color: #123a75;
}

@media (max-width: 820px) {
  .brand-lockup img {
    width: 64px;
    height: 64px;
  }

  .brand-lockup h1 {
    font-size: 25px;
  }
}


/* single-color reveal stage */
.preview-frame,
.canvas-wrap,
.result-image {
  background: #071327;
}

#gameCanvas,
#previewCanvas,
#levelCanvas {
  background: #071327;
}


/* web layout cleanup */
.app-shell {
  padding: 24px 32px;
}

.topbar,
.view {
  max-width: 1280px;
}

.setup-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 22px;
}

.game-layout {
  width: 100%;
}

.game-card {
  width: min(100%, 1120px);
}

.hud {
  min-height: 58px;
  grid-template-columns: 1fr auto;
  padding: 10px 16px;
}

.hud strong {
  font-size: 24px;
  line-height: 1;
}

.hud > div:first-child span,
.hud-stats {
  display: none;
}

.hud-actions {
  justify-content: flex-end;
}

.canvas-wrap {
  border-top: 1px solid rgba(202, 216, 236, 0.75);
}

#gameCanvas {
  aspect-ratio: 900 / 620;
}

@media (max-width: 820px) {
  .app-shell {
    padding: 14px;
  }

  .hud {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hud-actions {
    justify-content: flex-start;
  }
}


/* normal mode and abandon */
.normal-card {
  min-height: 118px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  color: #f5f9ff;
  background: linear-gradient(135deg, #071327, #163d78 66%, #0b5fa5);
  border: 1px solid rgba(242, 189, 69, 0.42);
  border-radius: 8px;
}

.normal-card strong {
  font-size: 20px;
}

.normal-card span {
  color: #d7e8ff;
  font-size: 14px;
  line-height: 1.6;
}

.danger-button {
  color: #b42318;
  border-color: #f0b4ac;
  background: #fff7f5;
}

.danger-button:hover {
  background: #ffe9e5;
}


/* share challenge */
.share-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-button {
  color: #123a75;
  background: #f7fbff;
}

.share-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.share-status.alert {
  color: #d92d20;
  font-size: 15px;
  font-weight: 700;
}

/* v19 interaction and mobile refinements */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.file-pick {
  position: relative;
  min-height: 104px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  touch-action: manipulation;
}

.photo-thumb {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(242, 189, 69, 0.82);
  box-shadow: 0 10px 24px rgba(9, 28, 56, 0.16);
}

.photo-thumb.hidden {
  display: none;
}

.share-status.alert {
  display: block;
  margin-top: 8px;
  color: #d11f34;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.invite-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: center;
}

.invite-shell .result-image canvas {
  width: 100%;
  height: auto;
  display: block;
}

.canvas-wrap {
  width: 100%;
  aspect-ratio: 900 / 620;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.game-card {
  width: min(100%, 1180px);
}

.game-active {
  overscroll-behavior: none;
}

.game-active .app-shell {
  min-height: 100svh;
}

.pointer-control,
.pointer-control * {
  cursor: none;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 19, 39, 0.56);
}

.settings-modal.hidden {
  display: none;
}

.settings-panel {
  width: min(100%, 420px);
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
  color: #071327;
  border: 1px solid rgba(202, 216, 236, 0.95);
  box-shadow: 0 22px 70px rgba(7, 19, 39, 0.28);
}

.settings-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-title strong {
  font-size: 20px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #e1eaf5;
  font-weight: 800;
}

.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: #2364bd;
}

.settings-note {
  margin: 10px 0 0;
  color: #627188;
  font-size: 13px;
  line-height: 1.55;
}

#levelResultText {
  white-space: pre-line;
  font-weight: 800;
}

.ad-banner {
  display: none !important;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
  }

  .topbar {
    padding: 8px;
    align-items: center;
  }

  .brand-lockup {
    min-width: 0;
    gap: 8px;
  }

  .brand-lockup img {
    width: 48px;
    height: 48px;
  }

  .brand-lockup h1 {
    font-size: 19px;
    white-space: nowrap;
  }

  .brand-lockup span,
  .eyebrow {
    font-size: 11px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .ghost-button {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 12px;
    white-space: nowrap;
  }

  .setup-grid,
  .invite-shell,
  .result-shell {
    grid-template-columns: 1fr;
  }

  .hud {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hud-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .hud-actions .icon-button {
    min-width: 0;
    padding: 8px 6px;
    font-size: 12px;
  }

  .game-layout {
    min-height: calc(100svh - 88px);
    align-items: start;
  }

  .game-card {
    width: 100%;
  }

  .canvas-wrap {
    aspect-ratio: 9 / 6.2;
  }

  .share-status.alert {
    font-size: 15px;
  }
}

@media (max-width: 430px) {
  .topbar {
    flex-wrap: nowrap;
  }

  .top-actions .ghost-button {
    padding: 7px 7px;
    font-size: 11px;
  }

  .brand-lockup img {
    width: 44px;
    height: 44px;
  }

  .brand-lockup h1 {
    font-size: 17px;
  }

  .brand-lockup span {
    display: none;
  }
}


/* v23: keep desktop cursor visible while game is running */
.pointer-control,
.pointer-control * {
  cursor: auto !important;
}


/* v27: compact mobile header and centered photo picker */
#photoPickText {
  width: 100%;
  text-align: center;
  justify-self: center;
}

.empty-preview:empty {
  display: none !important;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  .brand-lockup {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-lockup > div {
    min-width: 0;
  }

  .brand-lockup h1 {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-actions {
    flex: 0 0 auto;
    gap: 5px;
  }

  .top-actions .ghost-button {
    min-height: 34px;
    padding: 6px 7px;
    font-size: 11px;
    line-height: 1;
  }

  .hud-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 430px) {
  .brand-lockup img {
    width: 40px !important;
    height: 40px !important;
  }

  .brand-lockup h1 {
    font-size: 16px !important;
  }

  .top-actions .ghost-button {
    padding: 6px 6px;
    font-size: 10.5px;
  }
}

/* v30: mobile setup and public play tuning */
@media (max-width: 720px) {
  #setupView .preview-panel {
    display: none;
  }

  #setupView .setup-grid {
    display: block;
  }

  #setupView .creation-panel {
    gap: 16px;
    padding: 16px;
  }

  #photoMode .file-pick {
    min-height: 194px;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 18px;
  }

  #photoPickText {
    font-size: 18px;
    font-weight: 900;
  }

  #photoMode .photo-thumb {
    width: 112px;
    height: 112px;
  }

  .hud-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* v31: winner display name */
.winner-name-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: center;
}

.winner-name-label {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

#displayNameInput {
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

#displayNameInput:disabled {
  opacity: 0.54;
}

#displayNameInput::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

.winner-hide-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.winner-hide-row input {
  width: 18px;
  height: 18px;
  accent-color: #f2bd45;
}

#submitRankButton:disabled {
  opacity: 0.76;
  cursor: default;
}

.winner-name-form.submitted {
  display: none;
}

@media (max-width: 720px) {
  .winner-name-form {
    grid-template-columns: 1fr;
  }

  .winner-name-label {
    text-align: center;
  }
}

/* v34: keep desktop game fully visible, lock scroll only on touch devices */
body.game-active {
  overflow: auto;
}

body.game-active .app-shell {
  min-height: auto;
  padding-top: 12px;
  padding-bottom: 18px;
}

body.game-active .topbar {
  margin-bottom: 10px;
  padding-top: 6px;
  padding-bottom: 6px;
}

body.game-active .brand-lockup img {
  width: 54px;
  height: 54px;
}

body.game-active .brand-lockup h1 {
  font-size: 22px;
}

body.game-active .game-card {
  width: min(100%, calc((100svh - 148px) * 900 / 620));
  max-width: 1180px;
}

@media (pointer: coarse), (max-width: 720px) {
  body.game-active {
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
  }

  body.game-active .app-shell,
  body.game-active .canvas-wrap,
  body.game-active #gameCanvas {
    touch-action: none;
    overscroll-behavior: none;
  }
}
/* v35: desktop gameplay must fit the visible window without hiding the paddle */
@media (hover: hover) and (pointer: fine) and (min-width: 721px) {
  body.game-active {
    overflow-y: auto;
  }

  body.game-active .app-shell {
    min-height: 100vh;
    padding-top: 10px;
    padding-bottom: 12px;
  }

  body.game-active .topbar {
    margin-bottom: 8px;
  }

  body.game-active .game-layout {
    align-items: flex-start;
  }

  body.game-active .game-card {
    width: min(100%, calc((100vh - 136px) * 900 / 620));
    min-width: 720px;
  }

  body.game-active .hud {
    min-height: 48px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  body.game-active #gameCanvas,
  body.game-active .canvas-wrap {
    touch-action: auto;
  }
}

@media (hover: hover) and (pointer: fine) and (max-height: 760px) {
  body.game-active .brand-lockup img {
    width: 44px;
    height: 44px;
  }

  body.game-active .brand-lockup h1 {
    font-size: 19px;
  }

  body.game-active .top-actions .ghost-button {
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  body.game-active .game-card {
    width: min(100%, calc((100vh - 112px) * 900 / 620));
  }
}



