/* The approved gallery applies to the catalog, leaving all game controls intact. */
.catalog-card[aria-busy=true]{position:relative;cursor:progress}
.entry-progress{position:absolute;left:8px;right:8px;bottom:8px;padding:9px 12px;border-radius:7px;background:#234a41;color:#fff;text-align:center;font-size:13px}
.portrait-app.gallery-hall{background:#faf9f6;color:#394d45}
/* The shared header is also visible while loading, on invitations and on errors. */
.portrait-app>.topbar{width:min(100%,760px);min-height:64px;padding:10px 22px;padding-top:max(10px,env(safe-area-inset-top));background:#faf9f6;border-bottom:1px solid #e5e5df}
.portrait-app>.topbar .brand{font-size:15px;font-weight:400;letter-spacing:.5px;line-height:1.5}
.portrait-app>.topbar .brand>span{display:none}
.portrait-app.gallery-hall .hall-join{display:flex;align-items:center;gap:7px;min-height:44px;padding:8px 0 8px 10px;font-size:12px;font-weight:400;color:#777f78;border-radius:4px}
.portrait-app.gallery-hall .hall-join>span{font-size:20px;font-weight:300;color:#50665b}
.portrait-app.gallery-hall>main{width:min(100%,760px);padding:16px 22px 28px}
.portrait-app.gallery-hall .catalog-heading{margin:0 0 14px;min-height:40px}
.portrait-app.gallery-hall .catalog-heading h2{font-size:12px;font-weight:400;color:#788078;letter-spacing:.3px}
.portrait-app.gallery-hall .catalog-heading select{font-size:11px;font-weight:400;min-height:44px;max-width:118px;padding:6px 0 6px 6px;color:#788078;border-radius:4px}
.portrait-app.gallery-hall .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 16px}
.portrait-app.gallery-hall .catalog-game,.portrait-app.gallery-hall .catalog-map{padding:0;margin:0;display:block;background:transparent;border:0;border-radius:0;min-width:0}
.portrait-app.gallery-hall .catalog-card,.portrait-app.gallery-hall .catalog-map-card{display:block;width:100%;text-align:left;border:0;padding:0;background:transparent;color:inherit;border-radius:7px;font-weight:400;min-width:0;text-decoration:none}
.portrait-app.gallery-hall .catalog-art{position:relative;display:block;width:100%;aspect-ratio:1;overflow:hidden;border-radius:7px;background:#eceee6}
.portrait-app.gallery-hall .catalog-art img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.portrait-app.gallery-hall .catalog-caption{display:flex;align-items:baseline;justify-content:space-between;gap:5px;margin-top:9px;min-width:0}
.portrait-app.gallery-hall .catalog-name{font-size:12px;font-weight:400;line-height:1.6;min-width:0;overflow-wrap:anywhere}
.portrait-app.gallery-hall .catalog-players{flex:none;white-space:nowrap;font-size:10px;line-height:1.6;color:#748078;font-variant-numeric:tabular-nums}
.portrait-app.gallery-hall .catalog-introduction{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:10.5px;line-height:1.8;font-weight:400;color:#848981;margin-top:5px}
.portrait-app.gallery-hall .catalog-card:focus-visible,.portrait-app.gallery-hall .catalog-map-card:focus-visible{outline:2px solid #718c7a;outline-offset:5px}
.portrait-app.gallery-hall .catalog-card:active .catalog-art img,.portrait-app.gallery-hall .catalog-map-card:active .catalog-art img{transform:scale(.98)}
.portrait-app.gallery-hall .foot{font-size:10px;font-weight:400;color:#a2a69d;line-height:1.9;padding:28px 0 12px;margin:0}
.portrait-app.gallery-hall .foot>span{font-size:9px}
.portrait-app.gallery-hall>main>.quiet{font-size:11px;font-weight:400;color:#7d877e}
.portrait-app.gallery-hall .resume-section{padding:0;margin-bottom:12px}
.portrait-app.gallery-hall .resume-row{background:#f0f3ec;border-color:#e2e8dc;border-radius:7px}
.portrait-app.gallery-hall .resume-row strong{font-weight:500;font-size:12px}
@media(min-width:650px){.portrait-app.gallery-hall .catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:30px 22px}}
@media(max-width:350px){.portrait-app>.topbar,.portrait-app.gallery-hall>main{padding-left:16px;padding-right:16px}.portrait-app.gallery-hall .catalog-grid{gap:22px 12px}.portrait-app.gallery-hall .catalog-caption{flex-wrap:wrap;gap:0 6px}.portrait-app.gallery-hall .catalog-name{font-size:11.5px}}
@media(prefers-reduced-motion:reduce){.portrait-app.gallery-hall .catalog-art img{transition:none}}

.portrait-app.gallery-hall .catalog-beta{position:absolute;top:0;right:0;z-index:1;display:block;padding:6px 9px;border-radius:0 7px 0 9px;background:#f5bd47;color:#342505;box-shadow:0 2px 6px #0003;font-size:11px;font-weight:700;line-height:1.4;pointer-events:none}
.portrait-app.gallery-hall .catalog-beta-notice{display:block;margin-top:6px;color:#765a22;font-size:11px;line-height:1.7;text-align:left;overflow-wrap:anywhere}

/* Choice information remains readable beside the existing cover gallery. */
.portrait-app.gallery-hall .catalog-caption{flex-wrap:wrap}
.portrait-app.gallery-hall .catalog-players{white-space:normal}
.portrait-app.gallery-hall .catalog-facts{display:block;font-size:12px;line-height:1.7;margin-top:6px;color:#596c5f;overflow-wrap:anywhere}
.portrait-app.gallery-hall .catalog-name{font-size:14px}
.portrait-app.gallery-hall .catalog-introduction{font-size:12px}
.catalog-preview{max-height:85svh;overflow:auto;overscroll-behavior:contain}
.catalog-preview p{line-height:1.85;overflow-wrap:anywhere}
.catalog-preview-meta{font-size:13px;color:#63736a}
.catalog-preview-actions{display:flex;gap:10px;margin-top:20px}
.catalog-preview-actions button{flex:1;min-height:44px}
.portrait-app.gallery-hall .catalog-rating{display:none;align-items:center;flex-wrap:wrap;gap:0 3px;min-height:44px;width:fit-content;max-width:100%;font-size:12px;line-height:1.7;font-weight:500;color:#846322;text-decoration:none;font-variant-numeric:tabular-nums}
.portrait-app.gallery-hall .catalog-rating small{font-size:10px;font-weight:400;color:#848981}
.portrait-app.gallery-hall .catalog-rating-pending{color:#848981;font-weight:400}

/* Keep search above recovery cards and the catalog; preserve the mobile keyboard. */
.gallery-hall .hall-search{display:flex;gap:8px;margin:8px 0 12px;min-width:0}.gallery-hall .hall-search input{flex:1;min-width:0;width:0;margin:0;padding:12px 14px;font-size:16px;background:#fcfcf8;border:1px solid #bcc7b7;border-radius:8px}.gallery-hall .hall-search button{flex:none;min-height:46px;margin:0;padding:10px 16px}.gallery-hall .search-summary:empty{display:none}.gallery-hall .search-summary{margin:0 0 16px}.gallery-hall .search-empty{padding:24px 0}
.gallery-hall .search-history{margin-bottom:24px}.gallery-hall .search-history>p{margin:0 0 6px}.gallery-hall .search-history-items{display:flex;flex-wrap:wrap;gap:8px}.gallery-hall .search-history-item{display:flex;max-width:100%;min-width:0;border:1px solid #cbd2c5;border-radius:8px;background:#f4f5ef;overflow:hidden}.gallery-hall .search-history-item button{min-height:44px;margin:0;border:0;border-radius:0;background:transparent;color:#394d45;font-size:14px}.gallery-hall .search-history-query{min-width:0;padding:8px 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gallery-hall .search-history-item .search-history-delete{flex:none;min-width:44px;padding:8px;font-size:20px}.gallery-hall .search-history-item button:hover{background:#e5eadd}.gallery-hall .search-history-item button:focus-visible{outline:2px solid #394d45;outline-offset:-3px}

/* Header controls must not depend on the catalog's ready-only gallery class. */
.portrait-app>.topbar .brand{margin-right:auto;flex:1;white-space:nowrap}
.portrait-app>.topbar .hall-header-links{display:flex;align-items:center;gap:4px;flex:none}
.portrait-app>.topbar .hall-wish{display:flex;align-items:center;min-height:44px;padding:0 5px;color:#68756c;font-size:12px;text-decoration:none;white-space:nowrap}
.portrait-app>.topbar .hall-notification{position:relative;display:grid;place-items:center;min-width:44px;min-height:44px;color:#68756c;text-decoration:none}
.portrait-app>.topbar .hall-notification svg{display:block;width:18px;height:18px}
.portrait-app>.topbar .hall-unread{position:absolute;right:11px;top:9px;width:6px;height:6px;border-radius:50%;background:#ad5143;border:1px solid #faf9f6}
.portrait-app>.topbar .hall-unread[hidden]{display:none}
/* Personal discovery uses two compact rows above the existing cover gallery. */
.gallery-hall .hall-discovery{margin:0 0 8px}
.gallery-hall .hall-discovery-top{display:flex;justify-content:space-between;align-items:center;gap:6px;border-bottom:1px solid #e0e4db}
.gallery-hall .hall-scopes{display:flex;gap:17px;min-width:0}
.gallery-hall .hall-scopes button{position:relative;min-height:48px;padding:0;background:transparent;border:0;border-radius:0;color:#6c786f;font-size:14px;font-weight:400;white-space:nowrap}
.gallery-hall .hall-scopes button[aria-pressed=true]{color:#234a41;font-weight:500}
.gallery-hall .hall-scopes button[aria-pressed=true]:after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:#234a41}
.gallery-hall [data-favorites-count]{font-size:11px;font-variant-numeric:tabular-nums;margin-left:3px}
.gallery-hall .hall-discovery select{width:auto;max-width:94px;min-height:44px;margin:0;padding:6px 0;border:0;border-radius:4px;background:transparent;color:#596c5f;font-size:12px;font-weight:400;flex:none}
.gallery-hall .hall-discovery-filters{display:flex;align-items:center;justify-content:space-between;gap:6px;padding-top:12px}
.gallery-hall .hall-play-filter{display:flex;gap:3px;align-items:center}
.gallery-hall .hall-play-filter button{min-height:44px;padding:5px 10px;border:0;border-radius:7px;background:transparent;color:#6c786f;font-size:12px;font-weight:400;white-space:nowrap}
.gallery-hall .hall-play-filter button[aria-pressed=true]{background:#edf1e8;color:#234a41;font-weight:500}
.gallery-hall .discovery-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:34px;margin-bottom:9px;font-size:11px;color:#6c786f;font-variant-numeric:tabular-nums}
.gallery-hall .discovery-error{margin:0 0 12px}
.gallery-hall .catalog-title-row{display:flex;gap:1px;align-items:center;min-height:46px;margin-top:2px}
.gallery-hall .catalog-title-row .catalog-caption{flex:1;min-width:0;margin-top:0;justify-content:flex-start;gap:0 6px}
.gallery-hall .catalog-favorite{display:grid;place-items:center;flex:none;min-width:44px;min-height:44px;margin-right:-5px;padding:0;border:0;background:transparent;border-radius:7px;color:#748078}
.gallery-hall .catalog-favorite svg{display:block;width:18px;height:18px}
.gallery-hall .catalog-favorite[aria-pressed=true]{color:#234a41}
.gallery-hall .catalog-favorite[aria-pressed=true] svg{fill:currentColor}
.gallery-hall .catalog-favorite[aria-busy=true]{opacity:.45}
.gallery-hall .catalog-discovery-fact{display:block;margin-top:7px;font-size:11px;line-height:1.8;color:#6c786f;font-variant-numeric:tabular-nums}
#party-toast .toast-undo{display:inline-flex;align-items:center;min-height:44px;min-width:44px;margin-left:14px;padding:0 4px;border:0;background:transparent;color:inherit;font-size:13px;text-decoration:underline;text-underline-offset:3px}
@media(max-width:360px){.gallery-hall .hall-scopes{gap:12px}.gallery-hall .hall-scopes button{font-size:13px}.gallery-hall .hall-play-filter button{padding-left:8px;padding-right:8px}}
