/* Catalogue-first layout, with actions and starting skills on every card. */
.catalogue-legacy[hidden],[data-shelf-panel][hidden],.shelf-card[hidden],.site-mode-switch[hidden]{display:none!important}
.catalogue-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:24px}.catalogue-heading h1{font-size:clamp(1.8rem,3.5vw,3rem);letter-spacing:-.045em;margin:8px 0 12px;line-height:1.15}.catalogue-heading p{max-width:620px;line-height:1.6}.catalogue-kicker{font-size:.7rem;font-weight:800;letter-spacing:.14em;color:var(--muted,#526458)}.catalogue-heading>button{flex-shrink:0}.catalogue-tabs,.catalogue-filters{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.catalogue-tabs{border-bottom:1px solid #d6dfd4;padding-bottom:12px}.catalogue-tabs button,.catalogue-filters button{font:inherit;border:1px solid #bdcbbd;background:#fff;color:#294435;border-radius:12px;min-height:44px;padding:10px 18px;cursor:pointer}.catalogue-tabs [aria-pressed=true],.catalogue-filters [aria-pressed=true]{background:#294e3d;color:white;border-color:#294e3d}.catalogue-context{font-size:.85rem;line-height:1.5;margin-bottom:20px}.game-shelf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.game-shelf .shelf-card{display:flex;flex-direction:column;align-items:stretch;position:relative;text-align:left;border:1px solid #dce1d6;border-radius:20px;background:var(--card,#fff)!important;color:var(--ink,#223c30)!important;overflow:hidden;min-width:0;box-shadow:0 4px 12px #223c3008;cursor:pointer;text-decoration:none}.game-shelf .kids-catalogue-card,.game-shelf .hearthwild-lobby-card,.shelf-safari{padding:20px;gap:12px;min-height:310px}.game-shelf .kids-card-symbol{height:85px;font-size:48px;display:grid;place-content:center}.game-shelf .game-visual{height:135px}.game-shelf .game-body{padding:18px}.game-shelf .game-title h3,.game-shelf .shelf-card>strong{font-size:1.15rem}.game-shelf .shelf-meta{font-size:.76rem;line-height:1.6;border-top:1px solid #dce1d6;margin: auto 18px 0;padding:12px 0 16px;color:var(--muted,#526458)}.game-shelf .kids-catalogue-card .shelf-meta,.game-shelf .hearthwild-lobby-card .shelf-meta,.shelf-safari .shelf-meta{margin: auto 0 0}.game-shelf .hearthwild-lobby-card img{width:100%;height:120px;object-fit:cover;border-radius:12px}.game-shelf .hearthwild-lobby-copy{display:grid;gap:8px}.game-shelf .common-catalogue-art{height:85px}.game-shelf .tags,.game-shelf .available,.game-shelf .coming{display:none}.catalogue [data-shelf-panel=help]{max-width:800px;line-height:1.7}.catalogue [data-shelf-panel=help] p{margin:12px 0}.catalogue :focus-visible{outline:3px solid #ac682c;outline-offset:3px}.nav [data-nav=progression],.nav [data-nav=leaderboard],.nav [data-nav=games],.nav [data-nav=friends],.side-bottom .support-card{display:none}.nav-label{display:none}.setup-pages{display:flex;gap:8px;margin:12px 0}.setup-pages button{min-height:44px;padding:10px 18px;border:1px solid #c4cfc3;border-radius:10px;background:#fff;font:inherit}.setup-pages [aria-pressed=true]{background:#294e3d;color:#fff}.setup-pane[hidden]{display:none!important}#setup-dialog{max-height:calc(100dvh - 24px);overflow:auto}#setup-form .setup-fields{max-height:none;overflow:visible}#setup-submit{position:sticky;bottom:0;min-height:48px}#question-availability{font-size:.8rem;line-height:1.5;margin:8px 0 14px}.setup-basic-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:1100px){.game-shelf{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.game-shelf{grid-template-columns:1fr}.catalogue-heading{display:block}.catalogue-heading>button{margin-top:12px}.catalogue-heading h1{font-size:2rem}.setup-basic-grid{grid-template-columns:1fr}.game-shelf .shelf-card{min-height:0}.catalogue-tabs button,.catalogue-filters button{padding:9px 12px}.catalogue-heading p{font-size:.9rem}}
@media(max-height:500px){#setup-submit{position:static}}
.offline-games[hidden]{display:none!important}.offline-playground .game-shelf{margin-top:20px}.offline-playground .shelf-card{min-height:0}
#setup-form input,#setup-form select{min-height:44px}#setup-submit{position:static}
/* When text grows, the whole setup remains in normal document flow. */
#setup-dialog[open]{display:block;width:min(600px,calc(100vw - 16px));padding:20px;box-sizing:border-box}#setup-form{display:block;max-height:none;height:auto}#setup-form .setup-fields{height:auto;max-height:none;overflow:visible;flex:none;padding:0}#setup-form .setup-pages{flex-wrap:wrap}#setup-form input,#setup-form select{min-width:0;max-width:100%}#setup-submit{margin-top:16px}#setup-dialog .dialog-head{flex-wrap:wrap}#setup-dialog .dialog-head h2{overflow-wrap:anywhere}#setup-dialog .setup-pages button{font-size:1rem}
#setup-dialog{max-width:none}
.catalogue-heading h1{overflow-wrap:anywhere}
/* Put playable choices in the first screen; supporting information follows them. */
.catalogue-start{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.catalogue-start h1{font-size:1.35rem;line-height:1.25}
.catalogue-start .catalogue-filters{margin:0}
.catalogue .game-shelf{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.catalogue .game-shelf .shelf-card{min-height:0;padding:12px;gap:8px;border-radius:16px}
.catalogue .game-shelf .game-body{padding:0}
.catalogue .game-shelf .game-title h3,.catalogue .game-shelf .shelf-card>strong{font-size:1rem;line-height:1.3;overflow-wrap:anywhere}
.catalogue .game-shelf :is(.game-visual,.kids-card-symbol,.common-catalogue-art){height:100px;min-height:0;border:0;border-radius:12px}
.catalogue .game-shelf .game-visual{margin:-12px -12px 0}
.catalogue .game-shelf .mini-tile{width:48px;height:58px;font-size:40px}
.catalogue .game-shelf :is(.card-cta,.kids-card-play,.shelf-card>small,.favorite,.spark){display:none}
.catalogue .game-shelf .shelf-meta{margin:0;margin-top:auto;padding:6px 0 0;font-size:.75rem;line-height:1.4}
.catalogue .game-shelf .hearthwild-lobby-card img{height:100px}
.catalogue .game-shelf .hearthwild-lobby-copy strong{font-size:1rem}
.catalogue .game-shelf .hearthwild-lobby-copy :is(small,.eyebrow){display:none}
.catalogue-help{margin-top:32px;border-top:1px solid var(--line);padding-top:24px;line-height:1.6}
.catalogue-help h2{font-size:1.2rem;margin:16px 0 12px}.catalogue-help p{margin:12px 0}
.catalogue-game-guide{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px}
.catalogue-game-guide h3{font-size:1rem}.catalogue-game-guide p{font-size:.9rem;line-height:1.5}
.catalogue-help .topbar{padding:12px 0;margin-top:20px;height:auto;flex-wrap:wrap}
body.game-first-catalogue .topbar .profile{min-height:44px}
.catalogue-help a{min-height:44px;display:flex;align-items:center}
@media(max-width:760px){
 body.game-first-catalogue .sidebar{height:auto;min-height:60px;padding:8px 12px;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;position:relative;inset:auto}
 body.game-first-catalogue .sidebar .brand{display:flex;justify-content:center;width:auto;min-width:44px;min-height:44px;margin:0;padding:0}
 body.game-first-catalogue .sidebar .trent-monogram{width:36px;height:36px}
 body.game-first-catalogue .sidebar .trent-wordmark{display:none}
 body.game-first-catalogue .nav{display:flex;flex:1;width:auto;margin:0;gap:4px;justify-content:flex-end}
 body.game-first-catalogue .nav button{min-height:44px;padding:8px 10px;flex-direction:row;flex:0 1 auto;font-size:.85rem}
 body.game-first-catalogue .nav button span{display:block;font-size:inherit}
 body.game-first-catalogue .side-bottom{display:none}
 body.game-first-catalogue .content{padding:12px}
 .catalogue .game-shelf{gap:8px}
 .catalogue .game-shelf .shelf-card{padding:8px;border-radius:12px}
 .catalogue .game-shelf .game-visual{margin:-8px -8px 0}
 .catalogue .game-shelf :is(.game-visual,.kids-card-symbol,.common-catalogue-art){height:72px;font-size:36px}
 .catalogue .game-shelf .game-title h3,.catalogue .game-shelf .shelf-card>strong{font-size:.85rem}
 .catalogue .game-shelf .shelf-meta{font-size:.7rem}
 .catalogue .game-shelf .letter-tiles{transform:scale(.75)}
 .catalogue .game-shelf .hearthwild-lobby-card img{height:72px}
}
/* Rem-based threshold gives enlarged text more room instead of squeezing labels. */
@media(max-width:22rem){.catalogue .game-shelf{grid-template-columns:repeat(2,minmax(0,1fr))}}
html.trivia-keyboard-view body.game-first-catalogue .sidebar{display:none}
.catalogue .game-shelf .kids-card-symbol svg{width:100%;height:100%;max-width:140px}
.catalogue .game-shelf .hearthwild-lobby-copy{display:block;margin:0;padding:0;flex:none}
.catalogue .game-shelf .hearthwild-lobby-copy strong{display:block;line-height:1.3;margin:0;overflow-wrap:anywhere}
.catalogue-game-guide .shelf-meta{font-size:.8rem;color:var(--muted)}
.catalogue .common-catalogue-art{align-items:center;overflow:hidden}
.catalogue .common-catalogue-art .common-art{width:48%;max-width:72px;height:auto;aspect-ratio:1}
.catalogue .common-catalogue-art .common-art:last-child{width:38%;height:auto}

/* One detailed illustration family and one image/title rhythm for every game. */
.game-shelf .shelf-card .catalogue-original-art{display:none!important}
.game-shelf .shelf-card .catalogue-illustration{display:flex;align-items:center;justify-content:center;width:100%;height:144px;flex:none;border-radius:12px;overflow:hidden;background:#fff}
.game-shelf .shelf-card .catalogue-illustration img{display:block;width:100%;max-width:100%;height:100%;object-fit:contain;border-radius:0}
.catalogue .game-shelf .shelf-card{gap:12px;grid-column:auto}
.catalogue .game-shelf .game-title h3,.catalogue .game-shelf .shelf-card>strong,.catalogue .game-shelf .hearthwild-lobby-copy strong{font-family:var(--heading-font,'Manrope',sans-serif);font-size:1rem;font-weight:750;line-height:1.3;letter-spacing:-.025em}
.catalogue .game-shelf .game-title>.icon{display:none}
.catalogue .game-shelf .hearthwild-lobby-copy{width:100%}
@media(max-width:760px){
 .game-shelf .shelf-card .catalogue-illustration{height:80px;border-radius:9px}

 .catalogue .game-shelf .shelf-card{gap:8px}
 .catalogue .game-shelf .game-title h3,.catalogue .game-shelf .shelf-card>strong,.catalogue .game-shelf .hearthwild-lobby-copy strong{font-size:.85rem}
}

/* Title and star share a footer; launch and favourite remain sibling controls. */
.game-shelf .shelf-item{position:relative;min-width:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:16px;background:var(--surface,#fff);box-shadow:0 4px 12px #223c3008}
.game-shelf .shelf-item[hidden]{display:none!important}
html .game-shelf .shelf-item .shelf-card{width:100%;flex:1;border:0;box-shadow:none;transform:none;padding:12px;overflow:visible}
html .game-shelf .shelf-item .catalogue-card-title{display:flex;align-items:center;min-height:44px;margin: auto 56px 0 0;padding:0;width:auto;flex:none;text-align:left}
html .game-shelf .catalogue-card-title :is(h3,strong){margin:0}
.catalogue-favourites-note{font-size:.8rem;line-height:1.5;color:var(--muted);margin:0 0 12px}
.game-shelf .catalogue-favourite{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;min-width:44px;margin:0;padding:10px;border:0;border-radius:10px;background:transparent;color:var(--muted);cursor:pointer}
.catalogue-favourite svg{width:24px;height:24px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.game-shelf .catalogue-favourite:hover{background:var(--soft,#e5eddc);color:var(--forest)}
.game-shelf .catalogue-favourite[aria-pressed=true]{color:var(--forest)}
.catalogue-favourite[aria-pressed=true] svg{fill:currentColor}
/* Inset rings cannot be cut off by the page's scrolling container. */
html .game-shelf .shelf-item .shelf-card:focus-visible{outline:3px solid var(--focus,#a33e16);outline-offset:-3px}
.game-shelf .catalogue-favourite:focus-visible{outline:3px solid var(--focus,#a33e16);outline-offset:-3px}
@media(max-width:760px){.catalogue .game-shelf{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:22rem){.catalogue .game-shelf{grid-template-columns:1fr}}

/* The two secondary actions share the title row without nesting launch controls. */
html .game-shelf .shelf-item .catalogue-card-title{margin-right:100px}
.game-shelf .catalogue-info-link{position:absolute;right:56px;bottom:12px;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:10px;color:var(--muted);text-decoration:none}
.catalogue-info-link svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.game-shelf .catalogue-info-link:hover{background:var(--soft,#e5eddc);color:var(--ink)}
.game-shelf .catalogue-info-link:focus-visible{outline:3px solid var(--focus,#a33e16);outline-offset:-3px}
.catalogue[hidden],.catalogue-info-page[hidden],.catalogue-info-panels [hidden]{display:none!important}
.catalogue-info-page{max-width:1100px;margin:auto}
.catalogue-info-page h1{font-size:clamp(1.6rem,3vw,2.5rem);margin:24px 0 16px}
.catalogue-info-intro{max-width:750px;line-height:1.65;margin-bottom:24px}
.catalogue-info-intro p{margin:12px 0}
.catalogue-info-layout{display:grid;grid-template-columns:minmax(180px,240px) minmax(0,1fr);gap:24px;align-items:start}
.catalogue-info-tabs{display:flex;flex-direction:column;gap:4px}
.catalogue-info-tabs button{min-height:44px;padding:10px 16px;text-align:left;font:inherit;color:var(--ink);background:transparent;border:1px solid transparent;border-radius:10px;cursor:pointer;overflow-wrap:anywhere}
.catalogue-info-tabs [aria-selected=true]{background:var(--surface,#fff);border-color:var(--line);font-weight:750;box-shadow:inset 4px 0 var(--forest,#294e3d)}
.catalogue-info-panels{min-width:0;padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface,#fff);line-height:1.7}
.catalogue-info-panels h3,.catalogue-info-panels h2{font-size:1.4rem;margin:16px 0 12px}
.catalogue-info-panels p{margin:12px 0}
.catalogue-info-art{display:block;width:100%;height:200px;object-fit:contain}
.catalogue-info-page :focus-visible{outline:3px solid var(--focus,#a33e16);outline-offset:2px}
.catalogue-info-back{min-height:44px}
.catalogue-install-dialog{width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px}
.catalogue-install-dialog .topbar{height:auto;padding:16px 0;flex-wrap:wrap;gap:12px}
.catalogue-install-dialog .dialog-head{gap:12px}
.catalogue-install-dialog .close{min-height:44px;min-width:44px}
@media(max-width:760px){
 .catalogue-info-layout{grid-template-columns:minmax(0,1fr);gap:16px}
 .catalogue-info-tabs{max-height:180px;overflow:auto;border-bottom:1px solid var(--line);padding:4px}
 .catalogue-info-panels{padding:16px}
 .catalogue-info-art{height:130px}
}
@media(max-width:28rem){.catalogue .game-shelf{grid-template-columns:1fr}}
.catalogue-info-page h1:focus{outline:none}
.catalogue-info-panels .catalogue-info-intro{border-top:1px solid var(--line);padding-top:20px;margin:24px 0 0;font-size:.9rem}
.game-shelf .catalogue-info-link{padding:0;border:0;background:transparent;cursor:pointer}
.catalogue-game-popup{width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;overflow:hidden}
.catalogue-game-popup[open]{display:flex;flex-direction:column}
.catalogue-game-popup .dialog-head{flex:none;display:flex;align-items:center;gap:16px;margin-bottom:12px}
.catalogue-game-popup h2{flex:1;min-width:0;font-size:1.25rem;overflow-wrap:anywhere}
.catalogue-game-popup .close{flex:none;min-width:44px;min-height:44px}
.catalogue-game-popup-content{overflow:auto;min-height:0;line-height:1.65}
.catalogue-game-popup-content p{margin:12px 0}
.catalogue-game-popup .catalogue-info-art{height:160px}
.catalogue-game-popup :focus-visible{outline:3px solid var(--focus,#a33e16);outline-offset:-3px}
.catalogue-docs-link{display:flex;align-items:center;min-height:44px;margin:12px 0}
@media(max-height:500px){.catalogue-game-popup .catalogue-info-art{height:80px}}
