/* Keep long collection maps from stretching the adjacent history panel. */
#app .slx-floor { align-items: start; }

/* SlabX Galaxy Tab Layout v0.4 — match the approved phone reference.
   Tablets need a full-width header and a stacked dashboard in either orientation.
   Include larger touch tablets without changing wide desktop monitor layouts. */
@media (max-width: 1400px), (pointer: coarse) and (max-width: 1600px) {
  #app.shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #app.shell > aside {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    min-width: 0;
    overflow: visible;
    padding: 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid #8e98a1 !important;
  }
  #app > aside .logo {
    margin: 2px 4px 10px;
  }
  #app > aside .slx-brand-art.slx-brand-silver {
    width: 100%;
    max-width: none;
  }
  #app > aside nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 7px;
    max-width: 100%;
    overflow-x: auto;
    padding: 4px 4px 10px;
  }
  #app > aside nav button {
    flex: 0 0 auto;
    width: auto !important;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    white-space: nowrap;
  }
  #app > aside nav button::before {
    display: none;
  }
  #app > aside > .btn {
    width: auto;
    margin-top: 8px;
  }
  #app > aside .slx-clock,
  #app > aside .slx-device {
    display: none;
  }
  #app > main {
    width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
  }
  #app .top {
    flex-wrap: wrap;
    gap: 10px;
  }
  /* Tier 1/2, Tier 3/4, then Tier 5/Pending; the total spans both columns below. */
  #app .slx-tier-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #app .slx-tier-count.total {
    grid-column: 1 / -1;
  }
  #app .slx-floor {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  #app .slx-floor > .card {
    width: 100%;
    min-width: 0;
  }
  #app .slx-chart {
    height: clamp(260px, 32vw, 420px);
  }
}

/* Let set tiles use the tablet's full width while keeping phone tiles unchanged. */
@media (min-width: 601px) and (max-width: 1400px),
       (min-width: 601px) and (pointer: coarse) and (max-width: 1600px) {
  #app .slx-tier-strip {
    gap: 12px;
  }
  #app .slx-tier-count {
    min-height: 116px;
    padding: 16px 12px;
    gap: 4px;
  }
  #app .slx-tier-count .slx-count-label { font-size: 16px; }
  #app .slx-tier-count .slx-count-num { font-size: 36px; }
  #app .slx-tier-count .slx-count-goal { font-size: 14px; }
  #app .slx-tier-count .slx-count-remain { font-size: 12px; }
  #app .slx-map .heat.slx-era-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
    max-height: none;
    overflow: visible;
  }
}
