/* V165 — desktop game lobby inspired by the supplied reference.
   Mobile and tablet layouts intentionally retain the existing interface. */
.desktop-sidebar,.desktop-topbar{display:none}

@media (min-width:1100px){
  body[data-page="home"].is-authenticated{background:radial-gradient(ellipse 760px 520px at 74% 4%,#123c2c38,transparent 70%),#080b0e}
  body[data-page="home"].is-authenticated .app-wrap{
    display:grid;grid-template-columns:216px minmax(0,1fr);grid-template-rows:minmax(0,1fr);
    width:100%;max-width:none;height:100vh;height:100dvh;min-height:0;margin:0;padding:0;gap:0;overflow:hidden
  }
  body[data-page="home"].is-authenticated .app-wrap:has(#games-view:not([hidden])),
  body[data-page="home"].is-authenticated .app-wrap:has(#profile-view:not([hidden])){max-width:none}
  body[data-page="home"].is-authenticated .desktop-sidebar{
    grid-column:1;grid-row:1;display:flex;flex-direction:column;min-width:0;min-height:0;
    padding:28px 14px 96px;background:linear-gradient(180deg,#10151a 0%,#0c1116 100%);
    border-right:1px solid #dbe6e20e;box-shadow:10px 0 32px #0002;z-index:2
  }
  body[data-page="home"].is-authenticated .desktop-brand{
    display:flex;flex-direction:column;align-items:flex-start;gap:0;width:100%;padding:0 9px 8px;
    border:0;background:transparent;text-align:left;color:#f5f7f4;box-shadow:none
  }
  body[data-page="home"].is-authenticated .desktop-brand>span{font-size:11px;line-height:1.8;color:#aab4b2;font-weight:500}
  body[data-page="home"].is-authenticated .desktop-brand>strong{font-size:36px;line-height:1.15;letter-spacing:-.06em;font-weight:850}
  body[data-page="home"].is-authenticated .desktop-brand>strong>span{color:#a8e5b1}
  body[data-page="home"].is-authenticated .desktop-side-nav{display:flex;flex-direction:column;gap:7px;margin-top:27px}
  body[data-page="home"].is-authenticated .desktop-side-link{
    display:flex;align-items:center;justify-content:flex-start;gap:13px;width:100%;min-height:47px;padding:10px 13px;
    border:1px solid transparent;border-radius:15px;background:transparent;color:#8e989b;
    font-size:14px;font-weight:500;text-align:left;box-shadow:none;transition:background .18s ease,color .18s ease,border-color .18s ease
  }
  body[data-page="home"].is-authenticated .desktop-side-link .icon{width:19px;height:19px;color:currentColor}
  body[data-page="home"].is-authenticated .desktop-side-link[aria-current="page"]{background:linear-gradient(120deg,#ffffff13,#ffffff08);border-color:#ffffff08;color:#f2f5f0;box-shadow:inset 0 1px #ffffff08}
  body[data-page="home"].is-authenticated .desktop-side-link:hover{background:#ffffff0b;color:#e8eee9}
  body[data-page="home"].is-authenticated:has(#profile-view:not([hidden])) #desktop-profile-nav{background:linear-gradient(120deg,#ffffff13,#ffffff08);border-color:#ffffff08;color:#f2f5f0}
  body[data-page="home"].is-authenticated #main-content{
    grid-column:2;grid-row:1;display:block;flex:initial;width:100%;max-width:none;min-width:0;min-height:0;height:100%;
    overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;
    padding:20px clamp(28px,3vw,44px) 42px;scrollbar-width:none
  }
  body[data-page="home"].is-authenticated .desktop-topbar{display:flex;align-items:center;justify-content:flex-end;gap:16px;min-height:54px;margin:0 0 7px}
  body[data-page="home"].is-authenticated .desktop-topbar-actions{display:flex;align-items:center;gap:12px}
  body[data-page="home"].is-authenticated .desktop-balance-pill{
    display:flex;align-items:center;gap:9px;min-height:40px;padding:7px 14px;border:1px solid #ffffff16;border-radius:999px;
    background:linear-gradient(135deg,#1b2525d9,#10171bd9);box-shadow:inset 0 1px #ffffff0c,0 5px 16px #0003;
    color:#e6eee6;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums
  }
  body[data-page="home"].is-authenticated .desktop-balance-coin{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;color:#e6d28c;background:radial-gradient(circle at 35% 30%,#7f8d5d,#354434 68%);border:1px solid #e4d69b55;font-size:13px}
  body[data-page="home"].is-authenticated .desktop-balance-pill small{font-size:10px;color:#9ca9a2;font-weight:500}
  body[data-page="home"].is-authenticated .desktop-profile-button{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid #ffffff18;background:linear-gradient(145deg,#1b2528,#11171b);color:#c9d4cc;box-shadow:inset 0 1px #ffffff0b}
  body[data-page="home"].is-authenticated .desktop-profile-button .icon{width:19px;height:19px}
  body[data-page="home"].is-authenticated:has(#profile-view:not([hidden])) .desktop-profile-button{border-color:#c6e7ce55;color:#e4f1e5;background:linear-gradient(145deg,#263c32,#17241f)}
  body[data-page="home"].is-authenticated #games-view .section-heading:not(.compact){display:none!important}
  body[data-page="home"].is-authenticated #games-view .game-category-switch{display:none!important}
  body[data-page="home"].is-authenticated #games-view #home-featured{
    width:min(100%,536px);min-height:184px;margin:50px auto 65px;border-radius:21px
  }
  /* V166: the admin-managed home banner spans the full desktop content area. */
  body[data-page="home"].is-authenticated #games-view #home-banners{
    width:100%;max-width:none;min-width:0;height:clamp(230px,22vw,340px);min-height:0;
    margin:22px 0 38px;border-radius:22px;box-sizing:border-box
  }
  body[data-page="home"].is-authenticated #games-view #home-banners[hidden]{display:none!important}
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-slides{
    width:100%;height:100%;min-height:0
  }
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-slide{
    width:100%;height:100%;min-height:0;padding:clamp(28px,3vw,42px) clamp(26px,4vw,54px) 54px;
    box-sizing:border-box
  }
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-copy{max-width:min(64%,760px)}
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-kicker{font-size:11px;margin-bottom:11px}
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-copy h2{
    font-size:clamp(25px,2.45vw,40px);line-height:1.48;margin-bottom:10px
  }
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-copy p{
    max-width:560px;font-size:clamp(12px,1vw,15px);line-height:1.8;margin-bottom:16px
  }
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-link{
    min-height:40px;padding:9px 16px;font-size:12px
  }
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-controls{bottom:13px;left:20px;right:20px;gap:8px}
  body[data-page="home"].is-authenticated #games-view #home-banners .banner-controls>button{width:32px;height:32px;min-height:32px}
  body[data-page="home"].is-authenticated #games-view #home-featured{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}
  body[data-page="home"].is-authenticated #games-view #home-featured .home-feature-copy{padding:17px 0 19px 23px}
  body[data-page="home"].is-authenticated #games-view #home-featured .home-feature-overline{font-size:10px;margin-bottom:7px}
  body[data-page="home"].is-authenticated #games-view #home-featured .home-feature-copy h2{font-size:23px;line-height:1.45;margin-bottom:6px}
  body[data-page="home"].is-authenticated #games-view #home-featured .home-feature-copy p{font-size:10px;margin-bottom:10px}
  body[data-page="home"].is-authenticated #games-view #home-featured .home-feature-button{min-height:36px;padding:7px 12px;font-size:10px}
  body[data-page="home"].is-authenticated #games-view #home-featured .home-feature-art{height:158px;max-height:158px;margin-right:9px}
  body[data-page="home"].is-authenticated #games-view #home-featured .home-feature-page{bottom:5px}
  body[data-page="home"].is-authenticated #games-view .game-grid{
    display:flex;flex-flow:row nowrap;align-items:stretch;gap:16px;width:100%;min-width:0;
    overflow-x:auto;overflow-y:hidden;padding:2px 22px 18px 2px!important;margin:0;
    scroll-snap-type:x mandatory;scroll-padding-inline:2px;scroll-behavior:smooth;
    overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;cursor:grab;user-select:none
  }
  body[data-page="home"].is-authenticated #games-view .game-grid.is-dragging{cursor:grabbing;scroll-snap-type:none;scroll-behavior:auto}
  body[data-page="home"].is-authenticated #games-view .game-grid .game-card{
    flex:0 0 250px;width:250px;height:286px;min-height:286px;max-height:286px;
    scroll-snap-align:start;scroll-snap-stop:normal;user-select:none
  }
  body[data-page="home"].is-authenticated #games-view .game-grid .game-card[data-game-permission].v134-full-card{height:286px;min-height:286px}
  body[data-page="home"].is-authenticated #games-view .game-grid .game-card[data-game-permission]>.tile-label{font-size:10px}
  body[data-page="home"].is-authenticated #games-view .game-grid .game-card[data-game-permission]>h2{font-size:19px}
  body[data-page="home"].is-authenticated #games-view .game-grid .game-card[data-game-permission]>p{font-size:11px}
  body[data-page="home"].is-authenticated #games-view .game-grid .game-card[data-game-permission]>.tile-meta{font-size:10px}
  body[data-page="home"].is-authenticated #games-view .game-category-empty{max-width:100%}
  body[data-page="home"].is-authenticated #games-view>#home-results{max-width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body[data-page="home"].is-authenticated .bottom-nav{
    position:fixed!important;left:25px!important;bottom:22px!important;top:auto!important;transform:none!important;
    align-items:center;justify-content:center;width:166px!important;height:58px!important;
    margin:0!important;padding:0!important;overflow:visible!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important
  }
  body[data-page="home"].is-authenticated .bottom-nav .rw-nav-shell,
  body[data-page="home"].is-authenticated .bottom-nav #nav-games,
  body[data-page="home"].is-authenticated .bottom-nav #nav-profile{display:none!important}
  body[data-page="home"].is-authenticated .bottom-nav .rw-nav{
    position:relative;inset:auto;display:flex;flex:1 1 auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;
    width:100%;height:52px;min-height:52px;padding:7px 11px;border:1px solid #ffffff14;border-radius:14px;
    background:linear-gradient(125deg,#192522,#111a1b);box-shadow:0 9px 22px #0006,inset 0 1px #ffffff10;color:#c7dfcc
  }
  body[data-page="home"].is-authenticated .bottom-nav .rw-nav-wheel{position:relative;inset:auto;flex:0 0 32px;width:32px;height:32px;min-width:32px;min-height:32px;filter:drop-shadow(0 2px 4px #0008)}
  body[data-page="home"].is-authenticated .bottom-nav .rw-nav-wheel img{width:32px;height:32px;max-width:32px;max-height:32px}
  body[data-page="home"].is-authenticated .bottom-nav .rw-nav>span:last-child{position:static;transform:none;max-width:none;overflow:visible;white-space:normal;text-align:left;font-size:11px;line-height:1.5;color:#c8dfcf}
}

@media (min-width:1100px) and (max-height:720px){
  body[data-page="home"].is-authenticated #games-view #home-featured{margin-bottom:38px}
  body[data-page="home"].is-authenticated #games-view #home-banners{
    height:clamp(205px,22vw,250px);margin:14px 0 30px
  }
  body[data-page="home"].is-authenticated #games-view .game-grid .game-card[data-game-permission]{height:254px;min-height:254px;max-height:254px}
  body[data-page="home"].is-authenticated #games-view .game-grid .game-card[data-game-permission].v134-full-card{height:254px;min-height:254px}
}
