/* Shared hierarchy across all appearances; theme palettes remain authoritative. */
/* Keep the footer below the board while scripts and recommendation data load. */
#results { min-height:100vh; }
.initial-loading { min-height:320px; }
.discovery-intro { position:relative; padding-right:48px!important; }
#dismiss-discovery-intro { position:absolute; top:6px; right:6px; width:32px; height:32px; min-height:32px; padding:0; font:22px/1 sans-serif; }
.discovery-intro, .discovery-view-copy, .search-results-heading, .discovery-empty { color: var(--paper); }
.discovery-intro { display:flex; align-items:start; justify-content:space-between; gap:12px; padding:12px 16px; margin-bottom:12px; background:color-mix(in srgb,var(--accent) 8%,var(--panel)); border:1px solid var(--line); border-radius:8px; }
.discovery-intro p, .discovery-view-copy p { margin:5px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.discovery-intro button { flex:none; padding:4px 10px; }
.discovery-view-copy { padding:0 4px; display:flow-root; }
#discovery-view-notice { padding-block:4px 14px; }
.discovery-view-copy h2 { font-size:18px; margin:0; }
.discovery-help-link { display:inline-flex; align-items:center; min-height:24px; font-size:11px; margin-top:6px; color:var(--accent); }
.signin-trust { font-size:11px; color:var(--muted); max-width:520px; line-height:1.45; margin:6px 0; }
.signin-trust a { display:inline-flex; align-items:center; min-height:24px; color:var(--accent); }
body:not(.product-signed-in) #loaded-profile-indicator,
body:not(.product-signed-in) #steam-id { display:none; }
#loaded-profile-indicator { text-overflow:ellipsis; }
body.has-results #scan-form > .actions { display:none; }
#account-menu-toggle { display:none; }
.rec-media { min-width:0; }
.rec-media:has(> .rec-game-title) { row-gap:0; align-content:start; }
.rec-game-title { display:block; padding:0 2px; font-size:14px; line-height:1.25; font-weight:650; color:var(--paper); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rec-card .rec-score { font-size:clamp(25px,2.4vw,36px); }
.rec-card .rec-score-sub { font-size:10px; line-height:1.25; }
.rec-card .rec-value-source { display:block; max-width:125px; font-size:10px; color:var(--muted); line-height:1.35; margin-top:5px; }
.rec-new-label { display:none; position:absolute; top:5px; left:5px; border-radius:4px; padding:3px 5px; font-size:9px; font-weight:700; background:#173e2c; color:#d0ffe6; z-index:5; pointer-events:none; }
.rec-card.is-new .rec-new-label { display:block; }
.bucket.is-custom-bucket::after { content:"Saved on this device"; display:block; padding:8px; color:var(--muted); font-size:11px; }
.custom-bucket-drop-surface { min-height:180px; }
.details-pin { padding:5px 8px; font-size:11px; margin-left:auto; white-space:nowrap; }
.game-tooltip-titlebar { flex-wrap:wrap; gap:8px; }
.game-tooltip.game-tooltip--organized:not(.game-tooltip--mobile-pinned) { max-height:min(740px,calc(100dvh - 24px)); }
.game-tooltip.game-tooltip--organized:has(.game-tooltip-preview):not(.game-tooltip--mobile-pinned) { max-height:calc(100dvh - 24px); }
.tooltip-estimate-source { display:block; flex-basis:100%; font-size:11px; color:var(--muted); }
.review-sample-note { margin-top:10px; font-size:11px; line-height:1.5; color:var(--muted); }
.review-sample-note summary { cursor:pointer; color:var(--accent); }
.game-tooltip.game-tooltip--mobile-pinned, .game-tooltip.game-tooltip--organized.game-tooltip--mobile-pinned { position:fixed!important; inset:5vh auto auto 50%!important; transform:translateX(-50%)!important; width:min(640px,calc(100vw - 28px))!important; max-height:90vh!important; overflow:auto; z-index:10021!important; }
.game-tooltip--mobile-pinned .game-tooltip-mobile-close { display:flex; width:100%; justify-content:space-between; margin-bottom:10px; }
.game-tooltip-destination { display:block; padding:10px 0; color:var(--accent); font-weight:650; }
.game-tooltip-mobile-backdrop:not(.hidden) { display:block; position:fixed; inset:0; background:#0009; z-index:10020; }
.is-catalog-search { display:block!important; height:auto!important; }
.catalog-search-results { width:100%; max-height:none!important; }
.search-results-heading { display:flex; justify-content:space-between; gap:14px; align-items:center; padding:8px 4px 18px; }
.search-results-heading h3 { margin:0; font-size:17px; }
.search-results-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:10px; align-items:start; }
.search-results-grid .rec-card { margin:0; min-height:120px; }
.discovery-empty { padding:32px 16px; grid-column:1/-1; }
.discovery-empty p { color:var(--muted); }
.discovery-empty button { margin:5px 8px 5px 0; }
.catalog-search-active .mobile-bucket-nav { display:none!important; }
.calendar-selection-note { margin:4px 14px 14px; color:var(--muted); font-size:12px; }
.release-calendar-grid { grid-template-columns:repeat(var(--release-calendar-column-count,5),minmax(0,1fr))!important; }
.release-calendar-day { min-width:0; }
.release-calendar-card .rec-game-title { display:none; }
.release-calendar-card.uses-portrait-art { max-width:150px; margin-inline:auto; }
.release-calendar-day-cards { gap:6px; }
.release-calendar-actions { flex-wrap:wrap; }
.library-play-controls { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.library-play-controls select { max-width:150px; }
.library-preferences-game.is-top-choice { border-left:3px solid var(--accent); }
.library-preferences-game.is-finished { opacity:.78; }
html[data-site-theme="steampunk"] .rec-card:not(.rec-card-drag-ghost) { box-shadow:none; }
html[data-site-theme="steampunk"] .panel { border-color:color-mix(in srgb,var(--line) 60%,transparent); }
html[data-site-theme="steampunk"] .checkbox-grid label { box-shadow:none; }
@media(max-width:980px) {
  #dismiss-discovery-intro { top:0; right:0; width:44px; height:44px; min-height:44px; }
  .mobile-bucket-nav:not(.hidden) { min-height:44px; }
  .top-layout { display:flex!important; flex-wrap:wrap; align-items:center; gap:8px!important; padding:8px!important; }
  .top-layout .hero { flex:1; margin:0; min-width:0; }
  .top-layout .brand-logo { max-width:185px; }
  #account-menu-toggle { display:block; font-size:11px; padding:9px; }
  .view-navigation { order:2; display:flex!important; flex-wrap:nowrap!important; width:100%; overflow-x:auto; gap:5px; padding-bottom:3px; }
  .view-navigation .view-button { flex:none; padding:9px 10px; min-height:38px; font-size:11px; }
  .form-panel { display:none!important; order:3; width:100%; }
  .account-menu-open .form-panel { display:block!important; }
  .mobile-results-toolbar { min-height:42px; padding:5px 8px; }
  .mobile-results-brand { display:none!important; }
  .mobile-filter-toggle { min-height:36px; padding:6px 12px; margin-left:auto; }
  .discovery-view-copy { padding:8px 4px 4px; }
  .discovery-view-copy h2 { font-size:16px; }
  .discovery-view-copy p { font-size:12px; }
  .discovery-help-link { display:none; }
  .discovery-intro { margin:6px 0; padding:10px; font-size:13px; }
  .discovery-intro p { font-size:12px; }
  .rec-card .rec-score { font-size:30px; }
  .rec-game-title { font-size:13px; }
  .search-results-grid { grid-template-columns:1fr; }
  .search-results-heading { align-items:start; }
  .search-results-heading h3 { font-size:15px; }
  .game-tooltip.game-tooltip--mobile-pinned, .game-tooltip.game-tooltip--organized.game-tooltip--mobile-pinned { top:12px!important; left:12px!important; bottom:auto!important; transform:none!important; width:calc(100vw - 24px)!important; max-height:calc(100dvh - 24px)!important; }
  .release-calendar-grid { display:flex!important; flex-direction:column; }
  .release-calendar-weekday { display:none; }
  .release-calendar-day:not(.has-releases) { display:none; }
  .release-calendar-day-cards { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .release-calendar-card.uses-portrait-art { width:100%; max-width:180px; }
  .library-play-controls { justify-content:start; }
}

/* Keep account management compact and card actions clear of titles. */
.rec-new-label { top:auto; bottom:33px; left:auto; right:5px; }
.top-layout .form-panel .scan-entry-row { display:flex; align-items:flex-start; justify-content:flex-end; gap:12px; }
.top-layout .form-panel .scan-input-stack { flex:0 1 auto; }
.top-layout .form-panel .scan-action-stack { flex:0 0 auto; padding-block:0; }
@media(max-width:980px) {
  html[data-header-style="clean"] .top-layout .hero { width:auto!important; flex:1 1 140px!important; min-height:0; }
  html[data-header-style="clean"] #account-menu-toggle { flex:0 0 auto; width:auto; max-width:140px; }
  .discovery-view-copy .mobile-results-toolbar { grid-column:2; grid-row:1; position:static; min-height:0; margin:0; padding:0; border:0; background:none; box-shadow:none; }
  .discovery-view-copy { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:8px; min-height:42px; }
  #discovery-view-notice { grid-column:1; grid-row:1; }
  .discovery-intro:not(.hidden):not(.notice-dismissed) + .discovery-view-copy #discovery-description { display:none; }
  .discovery-intro p { display:none; }
  .discovery-intro { min-height:42px; align-items:center; }
}

@media(min-width:981px) {
  html[data-header-style="clean"] .shell { padding-top:6px; }
  html[data-header-style="clean"] .top-layout,
  html[data-header-style="clean"] body.has-results .top-layout { align-items:flex-start; padding:0 0 8px; gap:8px 20px; }
  html[data-header-style="clean"] .top-layout .hero,
  html[data-header-style="clean"] .top-layout .view-navigation { min-height:var(--scan-control-height); align-items:center; }
  html[data-header-style="clean"] body.has-profile-avatar .top-layout .hero,
  html[data-header-style="clean"] body.has-profile-avatar .top-layout .view-navigation,
  html[data-header-style="clean"] body.has-profile-avatar .scan-primary-actions { min-height:var(--profile-avatar-size); }
  html[data-header-style="clean"] .top-layout .scan-input-stack { transform:none; margin-bottom:0; }
  html[data-header-style="clean"] .top-layout .form-panel { flex:0 1 auto; }
  .signin-trust { font-size:11px; margin:4px 0 0; }
}
@media(max-width:980px) {
  .mobile-filter-toggle, #account-menu-toggle { min-height:44px; }
  .release-calendar-grid { min-width:0!important; }
  .top-layout .form-panel .scan-entry-row { flex-direction:column; align-items:stretch; }
  .top-layout .form-panel .scan-input-stack, .top-layout .form-panel .scan-action-stack { width:100%; flex:auto; }
  .steam-id-input-row { flex-wrap:wrap; }
  .steam-id-input-row .layout-preset-controls.is-visible { display:flex!important; flex:1 1 100%!important; grid-column:1 / -1!important; width:100%; }
  .steam-id-input-row .layout-preset-controls select { width:100%; max-width:none; min-width:0; }
}

/* Informational messages collapse completely without hiding adjacent controls. */
.dismissible-notice { position:relative; padding-right:40px; }
.dismissible-notice.notice-dismissed, .dismissible-notice.notice-loading { display:none!important; }
.dismissible-notice > button.notice-dismiss { position:absolute; top:0; right:0; display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; min-height:32px; padding:0; border:1px solid transparent; border-radius:6px; background:transparent; color:var(--muted); font:22px/1 sans-serif; cursor:pointer; box-shadow:none; }
.dismissible-notice > button.notice-dismiss:hover { color:var(--paper); background:color-mix(in srgb,var(--accent) 12%,var(--panel)); border-color:var(--line); }
.dismissible-notice > button.notice-dismiss:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.discovery-intro.dismissible-notice { padding-right:48px; }
.discovery-intro > button.notice-dismiss { top:6px; right:6px; }
.library-preferences-help .library-preferences-hint { margin:4px 0 10px; }
@media(max-width:980px) {
  .dismissible-notice { padding-right:48px; min-height:44px; }
  .dismissible-notice > button.notice-dismiss { width:44px; height:44px; }
  .discovery-intro > button.notice-dismiss { top:0; right:0; }
}
