/* Keep the desktop game board inside the viewport while preserving artwork proportions. */
@media (min-width: 1121px) {
  .shell {
    height: 100vh;
    min-height: 720px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .topbar {
    flex: 0 0 76px;
  }

  .main-grid,
  .main-grid:has(.scene[data-location="dacha"]) {
    flex: 1;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) 210px;
  }

  .location-rail,
  .side-panel,
  .bottom,
  .offers,
  .ledger {
    min-height: 0;
  }

  .bottom,
  .offers,
  .ledger {
    overflow: hidden;
  }

  .offer-list {
    height: calc(100% - 22px);
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .offer-card {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
  }

  .ledger-list {
    height: calc(100% - 22px);
  }

  .scene[data-location="dacha"] .scene-art {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 0;
    aspect-ratio: auto;
    flex: 1 1 auto;
    margin-top: 78px;
  }

  .scene[data-location="dacha"] .scene-art > #sceneImage {
    object-fit: cover;
    object-position: center 58%;
  }

  .scene[data-location="dacha"] img.scene-layer {
    object-fit: cover;
    object-position: center 58%;
  }

  .scene[data-location="dacha"] .dialogue-box {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    margin: 10px 14px 14px;
  }

  .scene[data-location="dacha"] .scene-cost {
    top: 44px;
    left: auto;
    right: 20px;
  }
}

@media (min-width: 1121px) and (max-height: 900px) {
  .main-grid,
  .main-grid:has(.scene[data-location="dacha"]) {
    grid-template-rows: minmax(0, 1fr) 158px;
  }

  .scene[data-location="dacha"] .scene-art {
    margin-top: 62px;
  }

  .dialogue-box {
    padding: 10px;
  }

  .speaker-portrait {
    width: 76px;
    height: 92px;
  }
}
