/* Shared presence and appearance layer. Dark remains unchanged unless selected. */
[data-presence-uid]{--presence-colour:#8993a3;border-color:var(--presence-colour)!important;box-shadow:0 0 0 2px var(--presence-colour)!important;border-radius:50%!important}
[data-presence="active"]{--presence-colour:#21c777}[data-presence="dnd"]{--presence-colour:#f0a340}
.availability-control{display:grid;gap:6px;padding:10px;min-width:0}.availability-control label{font-size:.75rem;font-weight:700;color:var(--text2)}.availability-control select{width:100%;min-width:0;font-size:.8rem;padding:9px}.availability-control small{font-size:.68rem;color:var(--text3);max-width:220px;line-height:1.45}
#availability-profile{max-width:230px;padding:0}.profile-hero:has(#availability-profile){flex-wrap:wrap}#nav-user-menu{min-width:240px!important;max-width:calc(100vw - 24px)}
.experience-theme{margin-bottom:16px}.experience-theme select{max-width:380px}.experience-status{font-size:.78rem;color:var(--text2);margin:10px 0 0}
.game-common-badge{display:block;width:fit-content;margin-top:5px;padding:3px 6px;border:1px solid #21c77760;border-radius:7px;background:#21c77718;color:#87e5b4;font-size:.59rem!important;font-weight:700}.explorer-games{row-gap:16px}
#gpf-refresh svg{width:21px;height:21px}#gpf-refresh[aria-busy="true"] svg{animation:gpf-refresh-spin .8s linear infinite}#gpf-pull-refresh{position:fixed;top:calc(var(--nav-h) + 12px);left:50%;transform:translateX(-50%);z-index:1500;border:1px solid var(--border2);border-radius:24px;padding:12px 18px;background:var(--surface);color:var(--text);box-shadow:0 5px 24px #0003;font-size:.8rem;pointer-events:none;white-space:nowrap}
@keyframes gpf-refresh-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#gpf-refresh[aria-busy="true"] svg{animation:none}}
@media(max-width:480px){.nav-right{gap:6px!important}.navbar .gpf-install{display:none}#gpf-refresh,.gpf-notifications{width:40px;min-width:40px;height:40px;padding:8px}#nav-user-trigger{padding:5px!important;gap:4px!important}.profile-hero:has(#availability-profile){flex-direction:row}#availability-profile{flex:1}.explorer-games{grid-template-columns:repeat(2,minmax(0,1fr))}}
html[data-theme="light"]{color-scheme:light;--bg:#dce5ef;--bg2:#d2deec;--surface:#ffffff;--surface2:#edf2f8;--border:#afc0d4;--border2:#91a8c2;--accent:#007e8a;--accent2:#6b42b5;--text:#18283f;--text2:#435771;--text3:#596c83;--success:#16824e;--danger:#bf3048;--soft-shadow:0 12px 32px #19395826,0 2px 6px #19395812}
html[data-theme="light"] body{background:var(--bg);color:var(--text)}
html[data-theme="light"] .gpf-game-background::after{background:linear-gradient(180deg,#dce5efa6 0%,#dce5efb8 60%,#dce5efcc 100%)}
html[data-theme="light"] .gpf-game-grid{opacity:.68;filter:saturate(.65)}
html[data-theme="light"] .navbar,html[data-theme="light"] .sidebar,html[data-theme="light"] .gpf-mobile-nav{background:#edf3faf5;border-color:var(--border);color:var(--text)}
html[data-theme="light"] .logo{background:#142234;border-radius:10px;padding:5px 8px!important}
html[data-theme="light"] .logo img{height:33px!important}
html[data-theme="light"] .app-main{background:linear-gradient(180deg,#dce5ef0d,#dce5ef33 600px)}
html[data-theme="light"] :is(.filters-bar,.lfg-panel,.info-card,.profile-hero,.friend-card,.req-card,.party-card,.player-card,.action-card,.explorer-profile,.explorer-filters,.explorer-search,.discord-detail,.squad-mine,.squad-filters,.content-form,.modal,.gpf-sheet,.gpf-update,.toast){background:linear-gradient(135deg,#fffffff7,#edf3faf7);border-color:var(--border);color:var(--text);box-shadow:var(--soft-shadow)}
html[data-theme="light"] #app-stats-bar{background:#ffffffed!important;border-color:var(--border)!important}
html[data-theme="light"] :is(.form-input,.chat-input,.ms-trigger,.cp-input,.auth-tabs,.gpf-settings-tabs,.explorer-search input,.explorer-filters select,.explorer-full-profile,.explorer-more>div,.squad-choice,.gpf-install,.gpf-notifications){background:var(--surface);color:var(--text);border-color:var(--border2)}
html[data-theme="light"] :is(input,textarea)::placeholder{color:#63758c}
html[data-theme="light"] :is(.btn-ghost,.btn-outline,.toggle-btn,.lfg-pill,.explorer-chip){color:var(--text2);background:#ffffffb8;border-color:var(--border2)}
html[data-theme="light"] .btn-primary{background:#007e8a;color:#fff}
html[data-theme="light"] .btn-primary:hover{background:#006975}
html[data-theme="light"] :is(.sidebar-item.active,.auth-tab.active,.gpf-settings-tabs button[aria-selected="true"],.gpf-mobile-nav button[aria-current="page"],.gpf-mobile-nav button[aria-expanded="true"],.gpf-menu-grid button[aria-current="page"]){background:#ebe4fa;color:#573690;border-color:#c6b3e8}
html[data-theme="light"] #app-nav-bar .nav-link.active{background:#ebe4fa!important;color:#573690!important;border-color:#c6b3e8!important}
html[data-theme="light"] :is(.info-card-title,.explorer-hero h1,.squad-heading h1){color:var(--text)}
html[data-theme="light"] :is(.explorer-bio,.explorer-identity p,.explorer-availability p,.explorer-section-head>span,.explorer-game>span,.squad-choice small,.squad-eyebrow,.squad-result-hint){color:var(--text2)}
html[data-theme="light"] :is(.explorer-tags span,.explorer-reasons,.tag,.party-tag,.social-chip,.match-details){background:#eaf0f8;color:var(--text2);border-color:var(--border)}
html[data-theme="light"] .explorer-reasons span{color:#32665b}
html[data-theme="light"] .game-common-badge{color:#12603d;background:#e0f5e9;border-color:#a4d5ba}
html[data-theme="light"] :is(.cp-header,.chat-hdr,.cp-input-bar,.chat-input-bar){background:var(--surface2);border-color:var(--border)}
html[data-theme="light"] :is(.cp-msg-in,.msg-in,.gchat-bubble-msg){background:#edf2f8;color:var(--text);border-color:var(--border)}
html[data-theme="light"] :is(.cp-msg-out,.msg-out,.gchat-bubble-msg.own){background:#ddf2f3;color:var(--text);border-color:#acdade}
html[data-theme="light"] .gpf-google-button{background:#fff;color:#242424}
html[data-theme="light"] .gpf-google-mark{color:#4285f4}
/* Artwork keeps its dark scrim and readable captions in both modes. */
html[data-theme="light"] :is(.orb-surface,.explorer-cover,.profile-game-banner,.squad-hero-card,.squad-active-card,.discord-detail-art){color:#f5f8ff}
html[data-theme="light"] :is(.player-orb,.discord-orb){--text:#f5f8ff;--text2:#d3ddec;--text3:#b8c7db}
html[data-theme="light"] .squad-hero-card{--text:#f5f8ff;--text2:#d3ddec;--text3:#b8c7db;background:#182432}
html[data-theme="light"] .squad-active-card{background:#182432;--text:#f5f8ff;--text2:#d3ddec}
html[data-theme="light"] .explorer-cover:after{background:linear-gradient(90deg,#111f2fbb,#20223a22),linear-gradient(0deg,#172638,transparent 85%)}
html[data-theme="light"] .discord-detail-art:after{background:linear-gradient(transparent,#f8fbff)}
html[data-theme="light"] .profile-banner-caption{color:#f5f8ff}
html[data-theme="light"] .gpf-story{--text:#f2f4fa;--text2:#d0d9e8;--accent:#20d9e8;--accent2:#b995ff;background:#0c1118bb;color:#f2f4fa}
html[data-theme="light"] :is(.explorer-searchbar,#explorer-filters){background:#ffffffec;border-color:var(--border2);box-shadow:var(--soft-shadow)}
html[data-theme="light"] .explorer-search,html[data-theme="light"] .explorer-search input{background:transparent;box-shadow:none}
html[data-theme="light"] :is(.explorer-live,.explorer-eyebrow){color:#65527e;border-color:var(--border2)}
html[data-theme="light"] .explorer-results-heading h2 span{color:#573690;background:#ebe4fa}

/* Light surfaces retain depth against the visible game mosaic. */
html[data-theme="light"] .explorer-profile{border:1px solid #9eb3cd;box-shadow:0 16px 40px #183b6029,0 3px 9px #183b601a}
html[data-theme="light"] :is(.compatibility-details,.explorer-reasons){background:#e2ebf6;border-color:#a5bad3}
html[data-theme="light"] .compatibility-details summary{color:#314e70;font-weight:650}
html[data-theme="light"] :is(.compatibility-criteria b,.explorer-friend-state){color:#19664e}
html[data-theme="light"] .explorer-friend-state{background:#e2f1e9;border:1px solid #a1c6b4;border-radius:10px;padding:9px 6px}
html[data-theme="light"] :is(.explorer-searchbar,#explorer-filters,#app-stats-bar){border-color:#9eb3cd!important}
html[data-theme="light"] :is(.explorer-live,.explorer-eyebrow){color:#4b3965}
html[data-theme="light"] .explorer-more button:hover{background:#e1eaf5}

.gpf-admin-setup{display:flex;flex-wrap:wrap;gap:6px;width:100%;margin-top:8px;font-size:.72rem}.gpf-admin-setup span{padding:5px 8px;border:1px solid var(--border2);border-radius:8px;background:var(--surface2);color:var(--text2)}.gpf-admin-setup small{width:100%;color:var(--text3)}.gpf-admin-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:15px 0}.gpf-admin-user-info{flex-wrap:wrap}
