/* Keep the complete welcome gallery above the dock on exhibition displays. */
@media (min-width: 900px) and (min-height: 600px) {
  body[data-screen="home"] {
    --home-header: 64px;
    --home-dock-space: 88px;
  }
  body[data-screen="home"] .ex-header { height: var(--home-header); }
  body[data-screen="home"] main {
    height: calc(100dvh - var(--home-header));
    min-height: 0;
    padding-bottom: calc(var(--home-dock-space) + env(safe-area-inset-bottom, 0px));
  }
  body[data-screen="home"] #home {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: clamp(10px, 1.6dvh, 18px);
    padding-top: clamp(10px, 1.8dvh, 22px);
    padding-bottom: 8px;
  }
  #home .home-heading { margin: 0 auto; }
  #home .home-heading h1 {
    font-size: clamp(38px, 5.5dvh, 60px);
    margin: clamp(10px, 1.6dvh, 20px) 0 10px;
  }
  #home .home-heading p { margin: 0; font-size: clamp(13px, 1.7dvh, 16px); }
  #home .collection-heading, #home .welcome-footer { margin: 0 2px; }
  #home .experience-grid, #home .featured-experience {
    height: 100%;
    min-height: 0;
  }
  #home .experience-grid { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  #home .experience-card { min-height: 0; }
  #home .pillar-preview { min-height: 0; }
  #home .experience-card:not(.featured-experience) .card-copy {
    padding-top: clamp(16px, 2.5dvh, 28px);
    padding-bottom: clamp(14px, 2dvh, 22px);
  }
  #home .card-action { min-height: 36px; }
  #home .featured-experience .card-copy {
    padding-top: clamp(18px, 2.8dvh, 30px);
    padding-bottom: clamp(16px, 2dvh, 22px);
  }
  #home .featured-experience .card-copy h2 { font-size: clamp(30px, 4.3dvh, 46px); }
}

/* A shorter display gets three complete cards side by side. */
@media (min-width: 900px) and (min-height: 600px) and (max-height: 950px) {
  #home .experience-grid {
    grid-template-columns: 1.35fr 1fr 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: clamp(12px, 1.6vw, 20px);
  }
  #home .featured-experience { grid-row: auto; }
  #home .featured-experience .card-copy {
    left: 14px; right: 14px; bottom: 14px;
    padding: clamp(16px, 2.4dvh, 24px);
  }
  #home .featured-experience .card-copy h2 { font-size: clamp(27px, 3.7dvh, 35px); }
  #home .featured-experience p { font-size: 12px; margin-bottom: 12px; }
  #home .desktop-break { display: none; }
  #home .featured-experience .card-action { font-size: 11px; padding-top: 10px; }
  #home .experience-card:not(.featured-experience) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(75px, 38%) minmax(0, 1fr);
    grid-template-areas: "image" "copy";
  }
  #home .experience-card:not(.featured-experience) .card-image {
    height: auto; min-height: 0;
    margin: 8px 8px 0; border-radius: 20px;
  }
  #home .experience-card:not(.featured-experience) .card-copy { padding: 16px 20px; }
  #home .experience-card:not(.featured-experience) h2 {
    font-size: clamp(22px, 2.9dvh, 27px); margin: 10px 0 8px;
  }
  #home .experience-card:not(.featured-experience) p { font-size: 12px; margin-bottom: 6px; }
  #home .experience-duration { margin: 0 0 6px; }
  #home .glass-pillars { width: min(100%, 230px); padding: 12px 18px; gap: 6px; }
  #home .glass-pillars > span { height: clamp(55px, 8dvh, 85px); padding-top: 12px; }
  #home .glass-pillars > span:nth-child(2) { height: clamp(70px, 10dvh, 110px); }
  #home .glass-pillars > span:nth-child(3) { height: clamp(85px, 12dvh, 130px); }
  #home .glass-pillars > span:nth-child(4) { height: clamp(70px, 10dvh, 108px); }
  #home .glass-pillars > span:nth-child(5) { height: clamp(55px, 8dvh, 83px); }
}

@media (min-width: 900px) and (min-height: 600px) and (max-height: 700px) {
  body[data-screen="home"] { --home-header: 52px; --home-dock-space: 80px; }
  #home .home-heading h1 { font-size: 36px; margin: 8px 0 6px; }
  #home .exhibition-label { padding: 5px 12px; font-size: 8px; }
  #home .experience-card:not(.featured-experience) {
    grid-template-rows: minmax(65px, 29%) minmax(0, 1fr);
  }
  #home .experience-card:not(.featured-experience) .card-copy { padding: 12px 18px; }
  #home .experience-card:not(.featured-experience) h2 { margin: 7px 0; font-size: 22px; }
  #home .experience-card:not(.featured-experience) p { font-size: 11px; }
  #home .featured-badge { top: 14px; left: 14px; }
  #home .featured-experience .card-copy { padding: 14px 18px; }
  #home .featured-experience .card-copy h2 { font-size: 27px; margin: 8px 0; }
  #home .featured-experience p { font-size: 11px; margin-bottom: 9px; }
  #home .glass-pillars { width: 170px; padding: 6px 12px; gap: 5px; }
  #home .glass-pillars > span { height: 36px; padding-top: 7px; }
  #home .glass-pillars > span:nth-child(2) { height: 46px; }
  #home .glass-pillars > span:nth-child(3) { height: 56px; }
  #home .glass-pillars > span:nth-child(4) { height: 45px; }
  #home .glass-pillars > span:nth-child(5) { height: 35px; }
  #home .glass-pillars svg { width: 13px; height: 13px; }
}
