/* Desktop presentation. Normal pages scroll in the document. Arcade stages own their viewport. */
@media (min-width: 1000px) {
  .shell {
    max-width: 1500px;
    padding: 8px clamp(12px, 1.5vw, 24px);
  }

  body[data-desktop-test-page] .shell > .hero.properly-art-hero {
    min-height: 0;
    padding: 8px 16px;
    margin-bottom: 6px;
  }

  .hero.properly-art-hero > div:first-child { max-width: 80%; }
  .nav.properly-organised-nav { margin-block: 4px 8px; }
  .layout, .layout > *, #content { min-width: 0; }
  #content > .panel { padding: 12px 14px; margin-bottom: 8px; }
  #content > .panel > :is(h2, h3):first-child { margin-top: 0; }

  body:is([data-desktop-test-page="backpack"]) .shell {
    display: block;
    height: auto;
  }
  body:is([data-desktop-test-page="backpack"]) > footer {
    height: auto;
  }
  body:is([data-desktop-test-page="backpack"]) .layout > :is(#content, aside) {
    display: block;
    overflow: visible;
  }

  /* Scene artwork and hotspots keep the original coordinate space. */
  .properly-location-scene img {
    max-height: clamp(190px, 43dvh, 540px);
    object-fit: contain;
  }
  .properly-location-scene figcaption { padding: 8px 14px; }
  .harbour-balcony-art {
    max-height: min(48dvh, 600px);
    object-fit: contain;
  }

  body[data-desktop-test-page="phone"] .shell > .hero,
  body[data-desktop-test-page="map"] .shell > .hero { display: none; }
  body[data-desktop-test-page="phone"] .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-desktop-test-page="phone"] .layout > aside {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  body[data-desktop-test-page="phone"] .layout > aside > details {
    flex: 1 1 240px;
  }

  .p-phone {
    max-width: 980px;
    margin-block: 0 12px;
  }
  .p-phone-display { padding: 10px 16px 14px; }
  .p-phone-welcome, .p-phone-app-heading { margin-block: 6px 10px; }
  .p-phone-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .p-phone-icon { width: clamp(36px, 7dvh, 56px); }
  .p-phone-app strong { font-size: 14px; }
  .p-phone-app > small { font-size: 12px; }
  .p-phone-dock { margin: 0; padding: 3px; }
  .p-phone-toolbar > :last-child { margin-inline-start: auto; }

  .region-map { padding: 12px; }
  .region-map-location { margin-bottom: 5px; }
  .region-map .p-map {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 6px 14px;
    align-items: start;
  }
  .region-map .p-map > :is(h3, p) { grid-column: 1 / -1; margin: 0; }
  .region-map .p-map-canvas {
    width: min(100%, 84dvh);
    min-height: 0;
    margin-inline: auto;
  }
  .region-map .p-map-results { margin-top: 0; padding: 8px; }
  .region-map .p-map-results > :is(h3, p) { margin-block: 0 5px; }
  .region-map :is(.p-map-list, .ly-map-list) {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
    gap: 5px;
  }
  .region-map :is(.p-map-list, .ly-map-list) button { padding: 5px 7px; }
  .region-map .ly-map-art { height: clamp(175px, 32dvh, 350px); }
  .region-map .blue-mer-ship img {
    max-height: min(38dvh, 460px);
    object-fit: contain;
  }

  .ly-scene > img {
    max-height: min(54dvh, 600px);
    object-fit: contain;
  }
  .proper-activity { max-width: 1050px; }
  .opening-title-layout .stage,
  .opening-title-layout .right-panel { min-height: min(610px, 72dvh); }
  .opening-gate-layout .gate-illustration {
    width: min(100%, 105dvh);
    justify-self: center;
  }
  html.house-mode #app { padding: 6px 12px; gap: 5px; }
  .house-mode .mast { padding-block: 5px; }
  .house-mode .house-embed-head { padding-block: 4px; }
  .modal-bg .modal { max-height: calc(100dvh - 40px); overflow: auto; }
}

@media (min-width: 1000px) {
  .properly-home-art img {
    min-height: 0;
    height: auto;
    max-height: min(48dvh, 485px);
    object-fit: contain;
  }
  .proper-activity .proper-boat-art {
    max-height: min(36dvh, 400px);
    object-fit: contain;
  }
  .proper-activity .proper-beam-scene { height: clamp(125px, 22dvh, 235px); }
  .proper-activity .proper-playfield { min-height: clamp(190px, 31dvh, 320px); }
}

@media (min-width: 1000px) {
  body > header { padding-block: 7px; }
  #stats { gap: 5px; }
  #stats .stat { padding-block: 4px; }

  #content:has(> .properly-fish-hero) > .properly-fish-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: center;
  }
  .properly-fish-under { padding: 10px 14px; }
  .properly-fish-stats { margin-block: 7px; }

  #content:has(> .properly-aliza-showcase) {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
    gap: 8px;
  }
  #content:has(> .properly-aliza-showcase) > :not(#properlyArcadeMachines) { grid-column: 1; }
  #properlyArcadeMachines { grid-column: 2; grid-row: 1 / span 4; }
  .properly-aliza-showcase { grid-template-columns: minmax(0, 1fr); }
  .properly-aliza-showcase .properly-aliza-portrait { min-height: 0; }
  .properly-aliza-showcase .properly-aliza-portrait img {
    display: block;
    width: 100%;
    min-height: 0;
    height: min(28dvh, 300px);
    object-fit: contain;
  }
}

@media (min-width: 1000px) {
  body:has(#proper-activity) .shell > .hero { display: none; }
  body:has(#proper-activity) .layout { grid-template-columns: minmax(0, 1fr); }
  #content > .proper-activity {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(0, 2fr);
    grid-template-rows: repeat(6, auto);
    align-items: start;
    align-content: start;
    gap: 6px 16px;
  }
  .proper-activity > :not(.proper-activity-play) { grid-column: 1; margin-block: 0; }
  .proper-activity-play { grid-column: 2; grid-row: 1 / span 6; min-width: 0; }
  .proper-activity-play .actions { margin-block: 6px 0; }
  .proper-activity .proper-beam-moves { margin-block: 6px; }
  .proper-activity-play > p { margin-bottom: 0; }

  .region-map > .actions { margin-block: 4px 8px; }
  .region-map .p-map-results .p-map-list button { min-height: 0; }
  .p-phone button.p-phone-app { padding-block: 7px; min-height: 0; }
  .p-phone-welcome h2 { font-size: clamp(29px, 4dvh, 40px); }
}

@media (min-width: 1000px) {
  .village-map-navigation { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .village-map-navigation .actions { margin: 0 0 5px; }
  .village-map-navigation button { min-height: 34px; padding: 5px 10px; }
  .region-map .p-map-canvas { width: min(100%, 58dvh); }
  body[data-desktop-test-page="map"] .layout > aside {
    display: flex; flex-wrap: wrap; gap: 6px;
  }
  body[data-desktop-test-page="map"] .layout > aside > details {
    flex: 1 1 240px; margin: 0;
  }

  #boycie-motors .property-car-card > svg {
    display: block;
    width: 100%;
    height: clamp(120px, 22dvh, 220px);
    background: #ebe2ee;
  }
  #boycie-motors .property-car-card > div { padding: 8px 12px; }
  #boycie-motors .property-car-card p { margin-block: 4px; }
  #boycie-motors > p { margin-block: 6px; }

  body[data-desktop-test-page="skills"]:has(.p-skills-overview) .shell > .hero { display: none; }
  .p-skills-overview .p-skills-header { padding: 8px 14px; }
  .p-skills-overview .p-skills-toolbar { padding-block: 6px; }
  .p-skills-overview .p-skill-grid { padding-block: 9px; }
  .p-skills-overview .p-skill-tiles { gap: 6px; }
  .p-skills-overview .p-skill-tile { min-height: 54px; padding-block: 4px; }
  .p-skills-overview .p-skill-tiles + .p-skill-tiles { margin-top: 8px; }
  .p-skills-overview .p-skill-portrait { max-height: 120px; object-fit: cover; }
}
@media (min-width: 1350px) {
  .p-skills-overview .p-skill-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
