/* SAFYRE_DESKTOP_LAYOUT_V1 - desktop presentation only */
@media (min-width: 1000px) {
  body.safyre-forest {
    --sf-desktop-width: min(calc(100% - clamp(48px, 16vw - 120px, 360px)), 1440px);
    font-size: 14px;
    line-height: 1.48;
    /* Reveal the whole landscape rather than crop it to fill the screen. */
    background-size: contain !important;
    background-position: center top !important;
  }
  .safyre-forest h1 { font-size: 36px; line-height: 1.12; }
  .safyre-forest h2 { font-size: 26px; line-height: 1.2; }
  .safyre-forest h3 { font-size: 19px; line-height: 1.3; }
  .safyre-forest .sf-header {
    width: var(--sf-desktop-width); max-width: none;
    margin: 0 auto 16px; padding: 10px 24px;
    border-radius: 0 0 17px 17px;
  }
  .safyre-forest .sf-header :is(.brand,.logo,.site-brand) { font-size: 26px; }
  .safyre-forest .sf-header nav { gap: 12px; }
  .safyre-forest .sf-header a[href*="register"] { padding: 6px 13px; }
  .safyre-forest.sf-home main, .safyre-forest.sf-portal main {
    box-sizing: border-box; width: var(--sf-desktop-width); max-width: none;
    margin-inline: auto; padding-inline: 0;
  }
  .safyre-forest.sf-home .sf-section {
    max-width: 1440px; margin: 16px auto !important;
    padding: 20px 24px !important; border-radius: 19px !important;
  }
  .safyre-forest.sf-home > .sf-section { width: var(--sf-desktop-width); }
  .safyre-forest.sf-home .sf-hero {
    min-height: 0; padding-block: 26px !important;
  }
  .safyre-forest.sf-home .sf-hero :is(h1,h2) { margin-block: 4px 12px; }
  .safyre-forest.sf-home .sf-rank { padding-top: 23px !important; }
  .safyre-forest .sf-rank table { font-size: 13px; }
  .safyre-forest .sf-rank :is(td,th) { padding: 5px 10px; }
  .safyre-forest .sf-rank thead th { font-size: 12px; }
  .safyre-forest .sf-rank .sp-char { gap: 9px; }
  .safyre-forest .sf-rank .sp-char .sp-art {
    width: 64px; height: 60px; flex: 0 0 64px; min-width: 0; min-height: 0;
    display: grid; place-items: center;
  }
  .safyre-forest .sf-rank .sp-char .sp-art img {
    width: 100%; height: 100%; max-width: 64px; max-height: 60px;
    object-fit: contain; image-rendering: pixelated;
  }
  .safyre-forest .sf-rank .sp-char strong { font-size: 14px; }
  .safyre-forest .sf-rank .sp-char small { font-size: 12px; line-height: 1.3; }
  .safyre-forest .sf-podium { max-width: 490px; gap: 12px; margin: 10px auto 15px; }
  .safyre-forest .sf-podium-card { padding: 7px 8px 9px; border-radius: 16px 16px 11px 11px; }
  .safyre-forest .sf-podium-card[data-rank="1"] { padding-top: 12px; }
  .safyre-forest .sf-podium-card img { width: 78px; height: 80px; object-fit: contain; }
  .safyre-forest .sf-medal { width: 26px; height: 26px; font-size: 13px; }
  .safyre-forest .sf-podium-card strong { font-size: 14px; }
  .safyre-forest :is(button,.button,.btn,.cta) { font-size: 13px; padding: 7px 12px; }
  .safyre-forest :is(input:not([type="checkbox"]):not([type="radio"]),select) { font-size: 14px; padding: 8px 10px; }
  .safyre-forest :is(.feature-card,.news-card,.stat) { padding: 14px; }
  .safyre-forest :is(footer,.sf-footer) { max-width: 1440px; width: var(--sf-desktop-width); box-sizing: border-box; padding: 14px; }
  /* Ranking profile dialog: keep its own larger standing sprite. */
  .safyre-forest #sp-dialog { max-width: min(1080px, 90vw); max-height: 86vh; }
  .safyre-forest .sp-gear-grid { grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 10px; }
  .safyre-forest .sp-gear summary { padding: 8px; }
  .safyre-forest .sp-gear summary img { max-width: 40px; max-height: 40px; object-fit: contain; image-rendering: pixelated; }
  .safyre-forest .sm-item img { max-width: 40px; max-height: 40px; object-fit: contain; image-rendering: pixelated; }
  .safyre-forest :is(#sm-body,#sm-head) :is(td,th) { padding: 6px 10px; font-size: 13px; }
  /* Portal: more useful space without changing any data or artwork URLs. */
  .safyre-forest.sf-portal main { padding-block: 18px 40px; }
  .safyre-forest.sf-portal main > h1 { margin: 4px 0; }
  .safyre-forest.sf-portal main > .lede { margin: 4px 0 12px; }
  .safyre-forest.sf-portal .panel { padding: 15px 18px; margin: 12px 0; }
  .safyre-forest.sf-portal #login { max-width: 440px; margin: 30px auto; }
  .safyre-forest.sf-portal #dashboard > .bar { padding: 10px 15px; }
  .safyre-forest.sf-portal .cards { grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 9px; margin: 8px 0; }
  .safyre-forest.sf-portal .stat { padding: 10px 12px; }
  .safyre-forest.sf-portal .stat strong { font-size: 19px; }
  .safyre-forest.sf-portal .bar { gap: 10px; }
  .safyre-forest.sf-portal #tabs { padding: 7px; gap: 6px; }
  .safyre-forest.sf-portal .v-hero { gap: 16px; margin: 8px 0; }
  .safyre-forest.sf-portal .v-avatar { flex-basis: 128px; min-height: 125px; padding: 8px; }
  .safyre-forest.sf-portal .v-avatar img { height: 104px; width: auto; object-fit: contain; }
  .safyre-forest.sf-portal .v-layout { grid-template-columns: minmax(0,1fr) minmax(215px,260px); gap: 14px; }
  .safyre-forest.sf-portal .v-paper { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin-bottom: 16px; }
  .safyre-forest.sf-portal .v-grid { grid-template-columns: repeat(auto-fill,minmax(82px,1fr)); gap: 6px; margin: 8px 0 12px; }
  .safyre-forest.sf-portal :is(.v-tile,.v-empty) { min-height: 80px; padding: 4px; gap: 2px; }
  .safyre-forest.sf-portal .v-tile-name { font-size: 11px; }
  /* Preserve the 48px icon / sprite-atlas geometry exactly. */
  .safyre-forest.sf-portal .v-inspect { padding: 11px; }
  .safyre-forest.sf-portal .v-inspect-head h3 { font-size: 16px; }
  .safyre-forest.sf-portal .v-stat-list { gap: 4px 10px; }
  .safyre-forest.sf-portal .v-filters { gap: 8px; margin-top: 8px; }
  .safyre-forest.sf-portal table :is(td,th) { padding: 6px 9px; }
}
@media (min-width: 1280px) {
  .safyre-forest.sf-portal .v-paper { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
