/* Content-first home. Account and playback controllers keep their existing styles. */
.discover-home .topbar { height: auto; min-height: 76px; display: grid; grid-template-columns: 1fr auto; gap: 0 28px; padding-block: 14px; }
.discover-home .brand-logo { width: 152px; height: auto; }
.discover-home .desktop-nav { justify-content: center; }
.discover-home .desktop-nav button { border: 0; padding: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.discover-home .header-actions { grid-column: 2; grid-row: 1; }
.discover-home .desktop-nav { display: none; }
.discover-home .search-box { min-height: 44px; width: 100%; padding: 0 8px 0 14px; border-radius: 9px; }
.discover-home .search-box input { min-width: 0; width: 100%; padding: 10px 4px; }
.discover-home .search-submit { min-height: 40px; flex-shrink: 0; }
.discover-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 58px; }
.discover-tools button, .discover-tools a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.025); color: #d5ced7; font-size: 12px; cursor: pointer; text-decoration: none; }
.discover-tools button:first-child { margin-right: auto; }
.discover-tools button span { color: var(--accent); }
.discover-home #library { padding-top: 8px; scroll-margin-top: 12px; }
.discover-home #library .section-heading { margin-bottom: 10px; gap: 8px; }
.discover-home #library .section-kicker { display: none; }
.discover-home #library h2 { font-size: 22px; }
.discover-home .catalog-summary { font-size: 11px; }
.discover-filters { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: start; gap: 6px; margin-bottom: 14px; }
.catalog-modes { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); min-width: 0; gap: 4px; }
.catalog-modes button, #catalogFilters summary, .active-filters button, .empty-state button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: none; color: #aaa3ae; cursor: pointer; font-size: 12px; }
.catalog-modes button[aria-pressed="true"] { color: var(--accent); background: rgba(240,179,92,.1); border-color: rgba(240,179,92,.35); }
.catalog-modes button { min-width: 0; padding-inline: 2px; white-space: nowrap; }
#catalogFilters { min-width: 0; }
#catalogFilters summary { display: flex; width: 44px; padding: 0; align-items: center; justify-content: center; list-style: none; }
#catalogFilters summary::-webkit-details-marker { display: none; }
#catalogFilters summary svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
#catalogFilters[open] summary { color: var(--accent); border-color: rgba(240,179,92,.35); }
#catalogFilters[open] .catalog-nav { position: absolute; z-index: 20; top: 44px; left: 0; right: 0; max-height: min(65vh,520px); overflow-y: auto; background: var(--panel); box-shadow: 0 12px 24px #0008; }
.discover-home .catalog-nav { margin: 8px 0 0; padding: 8px; }
.discover-home .catalog-nav-row { padding-block: 5px; }
.active-filters { margin: -4px 0 12px; color: var(--muted); font-size: 12px; }
.active-filters button { min-height: 32px; margin-left: 8px; }
.discover-home .movie-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px 16px; }
.discover-home .movie-card { min-width: 0; }
.discover-home .movie-info h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; line-height: 1.5; height: 3em; overflow: hidden; margin-top: 9px; }
.discover-home .movie-info p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.discover-home .movie-info .movie-expiry { display:block; color:#c4a879; font-variant-numeric:tabular-nums; }
.discover-home .poster-rank { display: none; }
.discover-home .movie-info .movie-date { margin-top: 4px; }
.discover-home .empty-state button { margin: 6px; }
.discover-home .footer { margin-top: 36px; }
.discover-home :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Show one focus boundary for the search group, not a second field inside it. */
.discover-home .search-box:focus-within { outline: 1px solid var(--accent); outline-offset: 0; border-bottom-color: transparent; }
.discover-home .search-box input:focus-visible { outline: none; }
@media (min-width: 1300px) { .discover-home .movie-grid { grid-template-columns: repeat(5,minmax(0,1fr)); } }
@media (max-width: 760px) {
 .discover-home .topbar { grid-template-columns: 1fr auto; padding-block: 8px; gap: 7px; min-height: 64px; }
 .discover-home .brand-logo { width: 116px; }
 .discover-home .header-actions { grid-column: 2; }
 .discover-home .login-button { min-height: 36px; padding: 0 12px; }
 .discover-home .search-box { min-height: 42px; }
 .discover-home .search-box svg { width: 18px; flex-shrink: 0; }
 .discover-home .search-box input { font-size: 16px; }
 .discover-tools { min-height: 50px; gap: 5px; }
 .discover-tools button, .discover-tools a { min-height: 38px; padding: 0 7px; font-size: 11px; flex: 1; white-space: nowrap; }
 .discover-tools button span { display: none; }
 .discover-home #library { padding-top: 5px; }
 .discover-home #library h2 { font-size: 18px; }
 .discover-home #library .section-heading { margin-bottom: 5px; align-items: center; }
 .discover-home .catalog-summary { font-size: 9px; max-width: 56%; text-align: right; }
 .discover-filters { gap: 4px; margin-bottom: 10px; }
 .catalog-modes { gap: 3px; }
 .catalog-modes button { font-size: 11px; }
 .discover-home .movie-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 10px; }
 .discover-home .movie-info h3 { font-size: 12px; margin-top: 7px; }
 .discover-home .movie-info p { font-size: 10px; }
 .discover-home .mobile-nav { grid-template-columns: repeat(5,minmax(0,1fr)); height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: max(4px,env(safe-area-inset-bottom)); }
 .discover-home .mobile-nav a, .discover-home .mobile-nav button { min-height: 44px; font-size: 10px; }
 .discover-home .mobile-nav button:nth-child(3) > span:last-child { margin-top: 0; }
 .discover-home { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .discover-home * { scroll-behavior: auto !important; } }
.discover-float-tools { position: fixed; z-index: 19; right: 8px; bottom: 94px; display: flex; flex-direction: column; gap: 5px; }
.discover-home .discover-float-tools .checkin-float, .discover-home .discover-float-tools .mini-games-entry { position: static; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 44px; min-width: 0; height: 48px; min-height: 44px; padding: 4px; gap: 1px; border-radius: 10px; background: rgba(26,20,29,.9); border: 1px solid rgba(240,179,92,.3); color: var(--accent); box-shadow: 0 2px 12px #0005; text-decoration: none; font-size: 10px; }
.discover-home .discover-float-tools .checkin-float span, .discover-home .discover-float-tools .mini-games-entry span { display: block; font-size: 10px; }
.discover-home .discover-float-tools .checkin-float > span:first-child, .discover-home .discover-float-tools .mini-games-entry > span:first-child { font-size: 15px; }
.discover-home:has(dialog[open]) .discover-float-tools { visibility: hidden; }
.discover-home .discover-float-tools [hidden] { display: none !important; }
.discover-float-tools { bottom: calc(80px + env(safe-area-inset-bottom)); }
.discover-home .header-actions .login-button { display: inline-flex; }
.discover-home .search-box { height: 44px; }
.discover-home .discover-float-tools .checkin-float svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.discover-home [data-open-checkin][hidden] { display: none !important; }
@media (max-width: 760px) { .discover-home .discover-tools .desktop-favorites { display: none; } }

/* Home is a category feed; the library keeps its complete filters and pagination. */
.discover-home:not([data-view="home"]) #home,
.discover-home:not([data-view="home"]) #homeCategoryFeed,
.discover-home:not([data-view="home"]) .discover-tools,
.discover-home[data-view="home"] #library { display: none; }
.discover-home[data-view="library"] #library { padding-top: 18px; }
.discover-home:has(#playerPanel:not([hidden])) #home,
.discover-home:has(#playerPanel:not([hidden])) #homeCategoryFeed,
.discover-home:has(#playerPanel:not([hidden])) .discover-tools { display: none; }
.library-entry { border: 0; background: transparent; color: var(--accent); min-height: 44px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.discover-home #library .section-heading { justify-content: space-between; }
.home-directory { padding: 4px 0 8px; }
.home-directory-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.home-directory-heading h1 { margin: 0; color: #eee4dc; font-size: 21px; font-weight: 600; }
.home-category-nav { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #ffffff03; }
.home-category-row { display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: start; gap: 8px; }
.home-category-row + .home-category-row { border-top: 1px solid #ffffff08; }
.home-category-row > strong { display: flex; align-items: center; min-height: 44px; color: #d3b58b; font-size: 12px; font-weight: 500; }
.home-category-row > div { display: flex; flex-wrap: wrap; gap: 0 6px; min-width: 0; }
.home-category-row button { min-height: 44px; flex-shrink: 0; padding: 7px 10px; border: 0; background: none; color: #cbc1cd; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.home-category-row button:hover { color: var(--accent); }
.home-directory-status { color: var(--muted); font-size: 13px; line-height: 1.7; }
.home-directory-status button, .home-category-status button, .home-section-placeholder button { min-height: 44px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px; background: none; color: var(--accent); cursor: pointer; }
.home-category-feed { padding-top: 6px; }
.home-category-section { padding: 14px 0 24px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.home-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-category-heading h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 21px; font-weight: 600; }
.home-category-heading h2 span { color: #9b8b9e; font-size: 12px; font-weight: 400; }
.home-category-count { margin: 5px 0 0; color: #8e8190; font-size: 11px; }
.home-category-heading > button { flex-shrink: 0; min-height: 44px; padding: 0 8px 0 14px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.home-category-status { min-height: 19px; margin: 8px 0 12px; color: #a28c72; font-size: 11px; line-height: 1.7; }
.home-category-section[data-home-state="error"] .home-category-status { color: #e2a58b; }
.discover-home .home-category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.home-section-placeholder, .home-section-empty { grid-column: 1/-1; display: grid; align-content: center; justify-items: center; gap: 12px; margin: 0; padding: 20px; color: var(--muted); font-size: 13px; background: #ffffff02; border-radius: 8px; }
.home-section-placeholder { min-height: 450px; }
.home-section-empty { min-height: 120px; }
@media (max-width: 760px) {
  .discover-home .mobile-nav { z-index: 45; }
  .discover-home .login-button { min-height: 44px; }
  .discover-home .discover-tools button, .discover-home .discover-tools a { min-height: 44px; }
  .discover-home .search-submit { min-height: 44px; }
  .home-directory { padding-top: 0; }
  .home-directory-heading { margin-bottom: 3px; }
  .home-directory-heading h1 { font-size: 18px; }
  .home-category-nav { padding: 4px 8px; }
  .home-category-row { grid-template-columns: 32px minmax(0,1fr); gap: 4px; }
  .home-category-row > div { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-x: contain; }
  .home-category-row button { padding-inline: 9px; }
  .home-category-heading h2 { gap: 8px; font-size: 18px; }
  .home-category-heading h2 span { font-size: 11px; }
  .home-category-section { padding: 12px 0 20px; }
  .home-category-count { font-size: 10px; }
  .home-category-status { margin-bottom: 10px; }
  .discover-home .home-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-section-placeholder { min-height: 700px; }
}

/* One purpose-made panoramic artwork; the full composition stays visible. */
.home-game-promotion { margin-top: 12px; margin-bottom: 2px; }
.home-game-banner { position: relative; display: block; container-type: inline-size; padding: 0; overflow: hidden; border: 1px solid #b1843e; border-radius: 12px; background: #0d0e10; color: #fff0d0; text-decoration: none; box-shadow: inset 0 1px #f6d39118; }
.home-game-banner:hover { border-color: #efc77e; }
.home-game-banner:focus-visible { outline: 3px solid #efc77e; outline-offset: 4px; }
.home-game-art { display: block; position: relative; min-width: 0; }
.home-game-art img { display: block; width: 100%; height: auto; }
.discover-home[data-view="library"] .home-game-promotion { margin-top: 8px; margin-bottom: 12px; }
.discover-home[data-view="favorites"] .home-game-promotion,
.discover-home[data-view="account"] .home-game-promotion,
.discover-home:has(#playerPanel:not([hidden])) .home-game-promotion { display: none; }
@media (max-width: 760px) {
  .home-game-promotion { margin-top: 10px; }
  .home-game-banner { border-radius: 10px; }
}

/* Search opens on demand from the middle item of the bottom navigation. */
.discover-home { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.discover-home .mobile-nav { position: fixed; z-index: 45; left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); width: min(520px,calc(100% - 32px)); height: 66px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 18px; background: rgba(16,13,18,.96); box-shadow: 0 6px 32px #0006; backdrop-filter: blur(16px); }
.discover-home .mobile-nav a, .discover-home .mobile-nav button { display: flex; min-width: 0; min-height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none; color: #aaa1ad; font: inherit; font-size: 10px; text-decoration: none; cursor: pointer; }
.discover-home .mobile-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.discover-home .mobile-nav .active { color: var(--accent); }
.discover-home .mobile-nav .nav-search { display: flex; width: 34px; height: 34px; margin: 0; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: linear-gradient(135deg,#ffe1a3,#ddb15e); color: #271b0b; }
.discover-home .mobile-nav [data-open-search] { gap: 1px; }
.discover-home .search-panel { width: min(560px,calc(100% - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: min(18vh,150px) auto auto; padding: 20px; overflow: auto; opacity: 1; transition: none; border: 1px solid #6c5032; border-radius: 16px; background: #161119; color: #fff4e4; box-shadow: 0 18px 80px #0009; }
.discover-home .search-panel:not([open]) { display: none; }
.discover-home .search-panel[open] { display: block; }
.discover-home .search-panel::backdrop { background: #000b; backdrop-filter: blur(4px); }
.search-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.search-dialog-heading h2 { margin: 0; font-size: 20px; }
.discover-home .search-panel .search-close { display: block; width: 44px; height: 44px; flex-shrink: 0; border: 0; background: transparent; color: #bdadbe; font-size: 28px; cursor: pointer; }
.discover-home .search-panel .search-box { height: 50px; gap: 8px; padding: 0 5px 0 12px; border: 1px solid #6b5134; border-radius: 9px; }
.discover-home .search-panel .search-box input { min-width: 0; font-size: 16px; }
.discover-home .search-panel .search-submit { min-height: 42px; padding-inline: 12px; border-radius: 6px; }
.search-dialog-hint { margin: 12px 0 0; color: #a99caf; font-size: 12px; line-height: 1.5; }
@media (max-width: 760px) {
  .discover-home .mobile-nav { left: 0; right: 0; bottom: 0; transform: none; width: 100%; height: calc(64px + env(safe-area-inset-bottom)); padding: 4px 8px max(4px,env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 0; }
  .discover-home .search-panel { padding: 16px; }
}
