@media (min-width: 900px) {
  body[data-desktop-variant="true"] {
    --desktop-max: 980px;
    --desktop-wide: 1220px;
    --bg: #f3efe6;
    --panel: #fffaf0;
    --panel-2: #e8ecdf;
    --text: #243225;
    --muted: #65715f;
    --line: rgba(47, 47, 47, .14);
    --accent: #6b8f5e;
    --accent-strong: #3f6537;
    --teal: #6b8f5e;
    --green: #6b8f5e;
    --gold: #dcc8a6;
    --coral: #d8a476;
    --tab-1: #a7c49a;
    --tab-2: #dcc8a6;
    --tab-3: #6b8f5e;
    --tab-4: #d7e6f4;
    --tab-5: #f3efe6;
    --tab-6: #d9c7aa;
    background:
      linear-gradient(90deg, rgba(243, 239, 230, .08) 0%, rgba(243, 239, 230, .15) 18%, rgba(243, 239, 230, .94) 31%, rgba(243, 239, 230, .94) 69%, rgba(243, 239, 230, .15) 82%, rgba(243, 239, 230, .08) 100%),
      url("../assets/herd-desktop-landscape.jpg") center bottom / cover no-repeat,
      #f3efe6;
    background-position: center, center calc(100% + var(--valley-pan, 0px)), center;
    background-attachment: fixed, fixed, fixed;
    color: var(--text);
  }

  body[data-desktop-variant="true"] .herd-valley-story {
    display: none;
    position: fixed;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  body[data-desktop-variant="true"] .herd-valley-scene {
    position: absolute;
    top: 0;
    width: clamp(13rem, 17vw, 19rem);
    aspect-ratio: 1;
    filter: drop-shadow(0 14px 20px rgba(64, 75, 58, .12));
    will-change: transform, opacity;
    transition: opacity .18s linear;
  }

  body[data-desktop-variant="true"] .herd-valley-scene > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    clip-path: inset(0 2%);
  }

  body[data-desktop-variant="true"] .sheep-rank-card {
    position: absolute;
    z-index: 1;
    bottom: .2rem;
    width: min(12.4rem, 88%);
    padding: .62rem .7rem;
    border: 1px solid rgba(47, 47, 47, .14);
    border-radius: .9rem;
    background: rgba(255, 250, 240, .92);
    box-shadow: 0 10px 24px rgba(64, 75, 58, .13);
    color: #243225;
    font-size: .68rem;
    line-height: 1.28;
    backdrop-filter: blur(10px);
  }

  body[data-desktop-variant="true"] .scene-left .sheep-rank-card {
    left: .45rem;
  }

  body[data-desktop-variant="true"] .scene-right .sheep-rank-card {
    right: .45rem;
  }

  body[data-desktop-variant="true"] .sheep-rank-author,
  body[data-desktop-variant="true"] .sheep-rank-meta {
    display: block;
    color: #65715f;
    font-size: .58rem;
    font-weight: 800;
  }

  body[data-desktop-variant="true"] .sheep-rank-title-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: .14rem 0;
  }

  body[data-desktop-variant="true"] .sheep-rank-title {
    min-width: 0;
    overflow: hidden;
    flex: 1;
    font-size: .72rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-desktop-variant="true"] .sheep-rank-score {
    flex: 0 0 auto;
    padding: .18rem .34rem;
    border-radius: 999px;
    background: #6b8f5e;
    color: #fffaf0;
    font-size: .6rem;
    font-weight: 950;
  }

  body[data-desktop-variant="true"] .sheep-rank-review {
    display: block;
    overflow: hidden;
    color: #3f4c3b;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-desktop-variant="true"] .herd-valley-scene.scene-left {
    left: max(1rem, calc(50% - 48rem));
  }

  body[data-desktop-variant="true"] .herd-valley-scene.scene-right {
    right: max(1rem, calc(50% - 48rem));
  }

  body[data-desktop-variant="true"] .app,
  body[data-desktop-variant="true"] .auth-screen,
  body[data-desktop-variant="true"] .site-move-screen {
    position: relative;
    z-index: 1;
  }

  body[data-desktop-variant="true"] .app {
    display: block;
    max-width: none;
    min-height: calc(var(--app-vh) * 100);
    background: transparent;
  }

  body[data-desktop-variant="true"] .rail {
    position: fixed;
    z-index: 20;
    top: .85rem;
    left: 50%;
    width: min(var(--desktop-wide), calc(100vw - 3rem));
    height: 4.25rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: .95rem;
    padding: .55rem .8rem;
    border: 1px solid rgba(47, 47, 47, .12);
    border-radius: 999px;
    background: rgba(255, 250, 240, .88);
    box-shadow: 0 18px 46px rgba(64, 75, 58, .13);
    backdrop-filter: blur(18px);
  }

  body[data-desktop-variant="true"] .rail .brand {
    margin: 0 auto 0 0;
    width: 7.9rem;
    height: 2.6rem;
  }

  body[data-desktop-variant="true"] .herd-wordmark {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
    border-radius: .4rem;
    mix-blend-mode: multiply;
  }

  body[data-desktop-variant="true"] .rail-item {
    width: auto;
    min-width: 0;
    padding: .55rem .72rem;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  body[data-desktop-variant="true"] .rail-item .icon {
    display: none;
  }

  body[data-desktop-variant="true"] .rail-item.active,
  body[data-desktop-variant="true"] .rail-item:hover {
    background: #e4eadb;
    color: var(--accent-strong);
  }

  body[data-desktop-variant="true"] .post-trigger {
    margin: 0;
    padding: .62rem 1rem;
    background: linear-gradient(135deg, #a7c49a, #6b8f5e);
    color: #172112;
    box-shadow: 0 10px 22px rgba(107, 143, 94, .28);
  }

  body[data-desktop-variant="true"] .topbar,
  body[data-desktop-variant="true"] .bottom-nav {
    display: none;
  }

  body[data-desktop-variant="true"] main {
    width: min(var(--desktop-wide), calc(100vw - 3rem));
    padding: 7.1rem 0 6rem;
  }

  body[data-desktop-variant="true"] .view.active {
    max-width: none;
  }

  body[data-desktop-variant="true"] .feed-controls,
  body[data-desktop-variant="true"] .home-tabs {
    width: min(var(--desktop-max), 100%);
    margin: 0 auto 1.2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .55rem;
    min-height: auto;
    padding: .7rem;
    border: 1px solid rgba(47, 47, 47, .11);
    border-radius: 24px;
    background: rgba(255, 250, 240, .76);
    box-shadow: 0 12px 34px rgba(64, 75, 58, .08);
  }

  body[data-desktop-variant="true"] .feed-controls .chip,
  body[data-desktop-variant="true"] .home-tabs .chip,
  body[data-desktop-variant="true"] .feed-controls .chip:nth-child(n),
  body[data-desktop-variant="true"] .home-tabs .chip:nth-child(n) {
    width: auto;
    min-width: 5.8rem;
    height: 2.25rem;
    margin: 0;
    padding: 0 .95rem;
    border: 1px solid rgba(47, 47, 47, .1);
    border-radius: 999px;
    background: #eef1e6;
    color: var(--muted);
    box-shadow: none;
  }

  body[data-desktop-variant="true"] .feed-controls .chip.active,
  body[data-desktop-variant="true"] .home-tabs .chip.active {
    border-color: rgba(107, 143, 94, .35);
    background: linear-gradient(135deg, #a7c49a, #6b8f5e);
    color: #172112;
  }

  body[data-desktop-variant="true"] #feed-list,
  body[data-desktop-variant="true"] #search-results,
  body[data-desktop-variant="true"] #profile-rankings,
  body[data-desktop-variant="true"] .profile-shell,
  body[data-desktop-variant="true"] .message-layout,
  body[data-desktop-variant="true"] .search-box,
  body[data-desktop-variant="true"] .search-section,
  body[data-desktop-variant="true"] .top-three-section,
  body[data-desktop-variant="true"] .section-heading:not(.compact) {
    width: min(var(--desktop-max), 100%);
    margin-inline: auto;
  }

  body[data-desktop-variant="true"] .ranking-card,
  body[data-desktop-variant="true"] .feed-prompt-card,
  body[data-desktop-variant="true"] .notice-panel,
  body[data-desktop-variant="true"] .empty-state {
    width: min(var(--desktop-max), 100%);
    margin-inline: auto;
  }

  body[data-desktop-variant="true"] .ranking-card {
    border: 1px solid rgba(47, 47, 47, .12);
    border-radius: 22px;
    background: rgba(255, 250, 240, .9);
    box-shadow: 0 18px 48px rgba(64, 75, 58, .12);
    color: var(--text);
  }

  body[data-desktop-variant="true"] .polished-review-card {
    grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
    overflow: hidden;
  }

  body[data-desktop-variant="true"] .polished-review-card .rank-media-frame {
    min-height: 31rem;
    border-radius: 0;
    background: #dfe6d8;
  }

  body[data-desktop-variant="true"] .polished-review-card .ranking-body {
    padding: 1.4rem 1.55rem;
    align-content: start;
    background: linear-gradient(180deg, rgba(255, 250, 240, .96), rgba(243, 239, 230, .95));
  }

  body[data-desktop-variant="true"] .rank-photo {
    object-fit: cover;
  }

  body[data-desktop-variant="true"] .rank-score-badge {
    right: 1rem;
    bottom: 1rem;
    border: 2px solid rgba(255, 250, 240, .7);
    box-shadow: 0 12px 26px rgba(64, 75, 58, .28);
  }

  body[data-desktop-variant="true"] .rank-title-row h3,
  body[data-desktop-variant="true"] .ranking-card h3 {
    color: var(--text);
    font-size: clamp(1.4rem, 1.8vw, 2.05rem);
  }

  body[data-desktop-variant="true"] .meta-row,
  body[data-desktop-variant="true"] .category,
  body[data-desktop-variant="true"] .review,
  body[data-desktop-variant="true"] .attached-review {
    color: var(--muted);
  }

  body[data-desktop-variant="true"] .name-button {
    color: var(--accent-strong);
  }

  body[data-desktop-variant="true"] .profile-header,
  body[data-desktop-variant="true"] .search-section,
  body[data-desktop-variant="true"] .top-three-section,
  body[data-desktop-variant="true"] .message-layout {
    border: 1px solid rgba(47, 47, 47, .12);
    border-radius: 24px;
    background: rgba(255, 250, 240, .82);
    box-shadow: 0 14px 38px rgba(64, 75, 58, .1);
  }

  body[data-desktop-variant="true"] .profile-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .8rem;
  }

  body[data-desktop-variant="true"] .profile-tile {
    border-radius: 14px;
    aspect-ratio: 2 / 3;
  }

  body[data-desktop-variant="true"] .auth-screen {
    position: relative;
    display: block;
    min-height: calc(var(--app-vh) * 100);
    padding: 0 0 5rem;
    background: #f3efe6;
    overflow: hidden;
  }

  body[data-desktop-variant="true"] .auth-media {
    position: absolute;
    inset: 0 0 auto 0;
    height: 42rem;
    min-height: 0;
    border-radius: 0;
    opacity: .78;
  }

  body[data-desktop-variant="true"] .auth-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.82) contrast(1.02);
  }

  body[data-desktop-variant="true"] .auth-media::after {
    background:
      linear-gradient(90deg, #f3efe6 0%, rgba(243, 239, 230, .2) 26%, rgba(243, 239, 230, .2) 74%, #f3efe6 100%),
      linear-gradient(180deg, rgba(243, 239, 230, .06) 0%, #f3efe6 84%);
  }

  body[data-desktop-variant="true"] .auth-panel {
    position: relative;
    z-index: 1;
    width: min(46rem, calc(100vw - 3rem));
    margin: 0 auto;
    padding: 6.8rem 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }

  body[data-desktop-variant="true"] .auth-brand {
    justify-content: center;
    margin-bottom: 14rem;
    width: 11rem;
    height: 4.4rem;
    margin-inline: auto;
  }

  body[data-desktop-variant="true"] .auth-panel h1 {
    max-width: 42rem;
    margin-inline: auto;
    color: var(--text);
    font-size: clamp(2.75rem, 5vw, 4.65rem);
    line-height: 1.02;
  }

  body[data-desktop-variant="true"] .auth-copy {
    max-width: 37rem;
    margin: 1rem auto 1.4rem;
    color: var(--muted);
    font-size: 1.08rem;
  }

  body[data-desktop-variant="true"] .auth-info-grid {
    grid-template-columns: repeat(3, 1fr);
    margin: 2.4rem auto 1.6rem;
  }

  body[data-desktop-variant="true"] .auth-info-grid article,
  body[data-desktop-variant="true"] .auth-toggle,
  body[data-desktop-variant="true"] .auth-form {
    border-color: rgba(47, 47, 47, .12);
    background: rgba(255, 250, 240, .86);
    box-shadow: 0 12px 30px rgba(64, 75, 58, .1);
  }

  body[data-desktop-variant="true"] .auth-toggle,
  body[data-desktop-variant="true"] .auth-form {
    width: min(30rem, 100%);
    margin-inline: auto;
  }

  body[data-desktop-variant="true"] .composer,
  body[data-desktop-variant="true"] .account-menu,
  body[data-desktop-variant="true"] .share-sheet {
    width: min(760px, calc(100vw - 3rem));
  }
}

@media (min-width: 1200px) {
  body[data-desktop-variant="true"] #search-results .post-grid,
  body[data-desktop-variant="true"] .post-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  body[data-desktop-variant="true"] .herd-valley-story {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-desktop-variant="true"] .herd-valley-story {
    display: none;
  }
}
