/* Layered important rules take precedence over the older, injected page skins. */
@layer gm-appearance {
  .gm-theme-toggle {
    display:inline-grid!important;place-items:center!important;flex:0 0 44px!important;
    width:44px!important;height:44px!important;min-height:44px!important;padding:10px!important;
    margin:0!important;border:1px solid #3e4658!important;border-radius:50%!important;
    background:#191e29!important;color:#eef0f6!important;cursor:pointer!important;box-shadow:none!important;
  }
  .gm-theme-toggle svg {width:22px!important;height:22px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;}
  .gm-theme-toggle:hover {border-color:#a78bfa!important;}
  .gm-theme-toggle:focus-visible {outline:3px solid #a78bfa!important;outline-offset:3px!important;}
  .gm-theme-floating {position:fixed!important;top:12px!important;right:12px!important;z-index:900!important;}
  html[data-gm-theme="dark"] {color-scheme:dark;}
  html[data-gm-theme="light"] {
    color-scheme:light;
    --gm-bg:#f5f6fa!important;--gm-surface:#fff!important;--gm-surface-2:#eef0f6!important;
    --gm-border:#d9dfe9!important;--gm-text:#182033!important;--gm-muted:#526078!important;
    --gm-purple:#6d28d9!important;--gm-purple-2:#5b21b6!important;--gm-cyan:#036e83!important;--gm-green:#087f5b!important;
    --bg:#f5f6fa!important;--panel:#fff!important;--text:#182033!important;--muted:#526078!important;--border:#d9dfe9!important;
  }
  html[data-gm-theme="light"] body {background:#f5f6fa!important;color:#182033!important;}
  html[data-gm-theme="light"] body:before {display:none!important;}
  html[data-gm-theme="light"] :is(main,nav,form,details,dl,dt,dd,h1,h2,h3,h4,h5,h6,p,span,small,strong,b,em,label,div,section,article,aside,li,td,th,summary,legend) {color:inherit!important;border-color:#d9dfe9!important;}
  html[data-gm-theme="light"] :is(header,.nav,footer,.section.alt,.window-bar,.match-head,.chat-header,.chat-list,.chat-pane,.sidebar,.gm-extra-menu,#gm-ux-mobile-nav,#gm-ux-mobile-nav a,.multi summary,.multi-panel,#gm-language-wrap,#gm-policy-language-wrap,.gm-tour-guide,.gm-friends-search-bar,.topbar,.notice,.section,.choice,.summary div,.language-picker summary,.language-options,.answer,.answer-num,.note,.top-link) {background:#fff!important;color:#182033!important;border-color:#d9dfe9!important;box-shadow:none!important;}
  html[data-gm-theme="light"] .news-about a {border-color:#d9dfe9!important;}
  html[data-gm-theme="light"] :is(.card,.panel,.item,.news-article,.news-about,.gm2-player,.gm2-panel,.gm3-panel,.gm3-trend,.gm3-game,.filter-shell,.empty-state,.gm2-empty,.demo,.feature,.step,.stat,.chem,.modal,.modal-content,.match-shell,.match-card,.big-cta,.auth-card,.quiz-card,.profile-card,.notification,.conversation,.chat-message,.bubble,.gm-toast,.toast,.gm-tour-card) {
    background:#fff!important;color:#182033!important;border-color:#d9dfe9!important;box-shadow:0 4px 18px rgba(24,32,51,.04)!important;
  }
  html[data-gm-theme="light"] :is(.gm-v2-panel,.gm-v2-card,.gm-friends-search,.gm-friends-player,.box,.gm-tour-modal) {background:#fff!important;color:#182033!important;border-color:#d9dfe9!important;box-shadow:none!important;}
  html[data-gm-theme="light"] :is(.gm-v2-pill,.gm-feedback-tags button.on) {background:#eee7fa!important;color:#5b21b6!important;}
  html[data-gm-theme="light"] .gm-session-voice-btn {background:#6d28d9!important;color:#fff!important;}
  html[data-gm-theme="light"] :is(.hero,.gm3-hero) {background:none!important;}
  html[data-gm-theme="light"] :is(.grad,.hero h1,.gm3-hero h1) {-webkit-text-fill-color:#182033!important;color:#182033!important;}
  html[data-gm-theme="light"] :is(a,.gm2-link,.gm3-panel-head a,.news-read,.news-kicker,.news-article-source,.gm2-score strong,.gm3-game span) {color:#6d28d9!important;}
  html[data-gm-theme="light"] :is(.news-article h3 a,.news-about a,header nav a,.gm-extra-menu a,#gm-ux-mobile-nav a) {color:#182033!important;}
  html[data-gm-theme="light"] a:hover {color:#5b21b6!important;}
  html[data-gm-theme="light"] :is(header nav a.gm-active,.gm-extra-menu a:hover,#gm-ux-mobile-nav a.gm-active,.news-teammates,.news-discovery-filter,.chip,.pill,.tag,.news-game-tags span,.gm-nav-count,.preview-tag,.answer.on,.answer.active,.choice.selected) {background:#eee7fa!important;color:#5b21b6!important;border-color:#d1bee9!important;}
  html[data-gm-theme="light"] :is(button,.btn,.gm2-btn,.gm-round-action,.gm-account-chip,.news-button,.gm3-trend-actions a) {background:#eef0f6!important;color:#182033!important;border-color:#ccd3df!important;box-shadow:none!important;}
  html[data-gm-theme="light"] :is(button,.btn,.gm2-btn,.gm-round-action,.gm-account-chip,.news-button):hover {background:#e7eaf2!important;}
  html[data-gm-theme="light"] [data-gm-profile-actions] .gm-profile-action-quiet {background:transparent!important;color:#526078!important;}
  html[data-gm-theme="light"] [data-gm-profile-actions] .gm-profile-action-quiet.danger {color:#b42336!important;}
  html[data-gm-theme="light"] :is(.primary,.btn-primary,.btn-discord,.btn.go,.gm2-btn.primary,button[type="submit"],.gm3-profile .gm2-btn,.gm-bell-badge,.badge-unread,.message.sent,.bubble.mine) {background:#6d28d9!important;color:#fff!important;border-color:#6d28d9!important;}
  html[data-gm-theme="light"] :is(.primary,.btn-primary,.btn-discord,.gm2-btn.primary,button[type="submit"],.gm3-profile .gm2-btn,.message.sent,.bubble.mine) :is(span,small,strong,b,svg) {color:#fff!important;}
  html[data-gm-theme="light"] :is(input,select,textarea,option) {background:#fff!important;color:#182033!important;border-color:#b5bfd0!important;box-shadow:none!important;color-scheme:light!important;}
  html[data-gm-theme="light"] :is(input,textarea)::placeholder {color:#627087!important;opacity:1!important;}
  html[data-gm-theme="light"] :is(.muted,.sub,.meta,.gm2-meta,.gm2-presence,.gm3-panel-sub,.gm3-activity small,.gm3-profile-copy span,.gm2-task span span,.news-lead,.news-update,.news-filter,.news-article-meta,.news-about p,.news-status,.hero-copy,.mini,.reason,.founding-note,.trust-row,.gm-account-role) {color:#526078!important;}
  html[data-gm-theme="light"] :is(.online,.online-line,.success,.ok,.gm2-presence.online) {color:#087f5b!important;}
  html[data-gm-theme="light"] :is(.error,.danger,.err) {color:#b42336!important;}
  html[data-gm-theme="light"] :is(.gm2-avatar,.gm-account-avatar,.avatar,.feature-icon,.step-no,.gm2-circle-icon) {background:#eee7fa!important;color:#5b21b6!important;border-color:#d1bee9!important;}
  html[data-gm-theme="light"] :is(.meter,.founding-track,.progress-track) {background:#e4e7ef!important;}
  html[data-gm-theme="light"] .gm3-ring {background:conic-gradient(#7850cc calc(var(--pct)*1%),#e4e7ef 0)!important;color:#182033!important;}
  html[data-gm-theme="light"] .gm3-ring:before {background:#fff!important;}
  html[data-gm-theme="light"] :is(a,button,input,select,textarea):focus-visible {outline:3px solid #6d28d9!important;outline-offset:3px!important;}
  html[data-gm-theme="light"] .gm-theme-toggle {background:#fff!important;color:#5b21b6!important;border-color:#ccd3df!important;}
  /* Leave room for the appearance control before the desktop links get crowded. */
  body.gm-app-shell-v2 header nav {min-width:0!important;max-width:100%!important;overflow:hidden!important;}
  @media(max-width:1320px) {
    body.gm-app-shell-v2 header {display:flex!important;gap:8px!important;padding-left:14px!important;padding-right:14px!important;}
    body.gm-app-shell-v2 header .logo {margin-right:auto!important;}
    body.gm-app-shell-v2 header>nav {display:none!important;}
    body.gm-app-shell-v2 .gm-header-actions {margin-right:48px!important;}
    body.gm-app-shell-v2 .gm-account-chip {display:none!important;}
    body.gm-app-shell-v2 #gm-ux-mobile-toggle {display:grid!important;position:absolute!important;right:14px!important;top:50%!important;transform:translateY(-50%)!important;}
  }
  @media(max-width:380px) {
    .gm-header-actions {gap:2px!important;}
    .gm-header-actions .gm-theme-toggle {flex-basis:40px!important;width:40px!important;}
  }
  @media(max-width:700px) {
    header.topbar .topbar-inner {height:auto!important;min-height:72px!important;padding:12px 0!important;flex-wrap:wrap!important;gap:12px!important;}
    header.topbar .top-links {flex-wrap:wrap!important;max-width:100%!important;gap:8px!important;}
  }
}
