/* Light-mode overrides only. Dark mode keeps the original styles unchanged. */
html:root[data-theme="light"] *:is(:focus,:focus-visible,:focus-within){outline:none!important;outline-offset:0!important}
html:root[data-theme="light"] :is(a,button,input,select,textarea,[role="button"],[tabindex]):is(:focus,:focus-visible){box-shadow:none!important;-webkit-tap-highlight-color:transparent}
html:root[data-theme="light"] :is(input,select,textarea):focus,
html:root[data-theme="light"] .code-search:focus-within{border-color:rgba(128,128,128,.35)!important;box-shadow:none!important}
html:root[data-theme="light"] :is(.user-card.selected,.code-card.selected,.nav-item.active,.content-code-card:focus-visible,.edition-choice:focus-visible,.edition-choice:hover){border-color:rgba(128,128,128,.3)!important;box-shadow:none!important;outline:none!important}
html:root[data-theme="light"] :is(.mobile-store-card:hover,.bento-card:hover,.user-card:hover,.code-card:hover,.content-code-card:hover,.support-row:hover,.nav-item:hover,.theme-pill:hover,.mobile-store-redeem-btn:hover,.upgrade8-support-tab:hover){border-color:rgba(128,128,128,.3)!important;box-shadow:none!important;outline:none!important}
html:root[data-theme="light"] .header-account-button[aria-current="page"]{box-shadow:none!important}
html:root[data-theme="light"] .schedule-date.selected{border-color:transparent!important;background:var(--sc-card)!important}
html:root[data-theme="light"] .schedule-date.selected>span{font-weight:800}
html:root[data-theme="light"] :is(a,button,input,select,textarea,[role="button"],[tabindex]){-webkit-tap-highlight-color:transparent}

html:root[data-theme="light"][data-theme]{
  --bg-color:#fff!important;--sidebar-bg:#fff!important;--card-bg:#fff!important;
  --bg:#fff!important;--card:#fff!important;--page:#fff!important;--page-deep:#fff!important;
  --surface:#fff!important;--surface-solid:#fff!important;--surface-raised:#fff!important;
  --input-bg:#fff!important;--control-bg:#fff!important;--stub-bg:#fff!important;--ticket-wash:#fff!important;
  --text-main:#111!important;--modal-text-main:#111!important;--sidebar-text:#111!important;--ink:#111!important;
  --text-sub:#616161!important;--modal-text-sub:#616161!important;--muted:#616161!important;
  background:#fff!important;
}
html:root[data-theme="light"][data-theme] :is(body,.rgl-main,.rgl-sidebar,.account-page-view,.schedule-page,.schedule-app){background:#fff!important}
html:root[data-theme="light"][data-theme] :is(.mobile-store-card,.account-card,.bento-card,.support-profile,.support-workspace,.support-dialog,.tos-glass-card,.login-card,.upgrade8-help-section,.upgrade8-support-modal-panel,.modal-sheet,.schedule-item,.schedule-live,.schedule-live-item,.card){background:#fff!important}
html:root[data-theme="light"][data-theme] .schedule-app{--sc-bg:#fff!important;--sc-card:#fff!important}
html:root[data-theme="light"][data-theme] :is(#particleCanvas,.blob){display:none!important}
html:root[data-theme="light"][data-theme] body::before,
html:root[data-theme="light"][data-theme] .liquid-background::after,
html:root[data-theme="light"][data-theme] .metric::after{display:none!important}

/* Subtle boundaries; the page's top and bottom edges stay open. */
html:root[data-theme="light"] .rgl-sidebar{border:1px solid #e5e5e5!important;border-top:0!important;border-bottom:0!important;box-sizing:border-box}
html:root[data-theme="light"] .rgl-hero{border:1px solid #e5e5e5!important;border-top:0!important;border-bottom:0!important;box-sizing:border-box;z-index:1}
html:root[data-theme="light"] :is(#langTrigger,#mobileLangTrigger).lang-trigger-sidebar,
html:root[data-theme="light"] :is(#scheduleLanguage,#supportLanguage,#adminLanguage){border:1px solid #e5e5e5!important;box-sizing:border-box}
html:root[data-theme="light"] :is(.rgl-sidebar,.mobile-nav-overlay,.upgrade8-language) .lang-list{border:1px solid #e5e5e5!important;box-sizing:border-box}
html:root[data-theme="light"].upgrade8-page[data-theme] .upgrade8-language #langTrigger,
html:root[data-theme="light"].upgrade8-page[data-theme] .upgrade8-language .lang-list{border:1px solid #e5e5e5!important;box-sizing:border-box}
html:root[data-theme="light"] .support-home-view .bento-card{border:1px solid #e5e5e5!important;box-sizing:border-box}
html:root[data-theme="light"] .rgl-main:has(#contactTriggerBtn){border-right:1px solid #e5e5e5!important;box-sizing:border-box}
html:root[data-theme="light"][data-theme] .rgl-main:has(#contactTriggerBtn){background:#f5f5f5!important}

@media (max-width: 768px) {
  html[data-ui-home] {
    --mobile-home-surface: #fff;
    --mobile-home-divider: #ddd;
  }

  html[data-ui-home][data-theme="dark"] {
    --mobile-home-surface: #000;
    --mobile-home-divider: #2b2b2b;
  }

  html[data-ui-home] #mainContainer > .rgl-sidebar {
    border-bottom: 1px solid var(--mobile-home-divider) !important;
  }

  html[data-ui-home] body:not(.account-is-banned) #mainContainer > .rgl-main {
    background: var(--mobile-home-surface) !important;
  }

  /* The upgraded header overlays the first 68px of the main area. */
  html.upgrade8-page[data-ui-home] body:not(.account-is-banned) #mainContainer > .rgl-main {
    background: linear-gradient(var(--mobile-home-divider), var(--mobile-home-divider))
      0 68px / 100% 1px no-repeat var(--mobile-home-surface) !important;
  }

  html[data-ui-home] #mainContainer .account-page-view {
    background: transparent !important;
  }

  html[data-ui-home] #mainContainer .rgl-bg-image {
    display: none !important;
  }
}

/* Dark mode: suppress interaction rings only; keep surfaces and layout unchanged. */
html:root[data-theme="dark"] *:is(:focus,:focus-visible,:focus-within){outline:none!important;outline-offset:0!important}
html:root[data-theme="dark"] :is(a,button,input,select,textarea,summary,[role="button"],[tabindex]):is(:focus,:focus-visible){box-shadow:none!important}
html:root[data-theme="dark"] :is(input,select,textarea):focus,
html:root[data-theme="dark"] .code-search:focus-within{border-color:rgba(128,128,128,.35)!important;box-shadow:none!important}
html:root[data-theme="dark"] :is(.user-card.selected,.code-card.selected,.nav-item.active,.content-code-card:focus-visible,.edition-choice:focus-visible,.edition-choice:hover){border-color:rgba(128,128,128,.3)!important;box-shadow:none!important}
html:root[data-theme="dark"] :is(.user-card:hover,.code-card:hover,.content-code-card:hover,.support-row:hover,.error-directory-row:hover){border-color:rgba(128,128,128,.3)!important}
html:root[data-theme="dark"].upgrade8-page :is(.mobile-store-card:hover,.theme-pill:hover,.mobile-store-redeem-btn:hover,.mobile-store-btn:hover,.upgrade8-support-tab:hover,.upgrade8-help-nav a:hover,.upgrade8-help-card:hover,.upgrade8-link-card:hover){border-color:rgba(128,128,128,.3)!important}
html:root[data-theme="dark"].upgrade8-page .mobile-store-card:hover{box-shadow:0 36px 82px rgba(0,0,0,.39),inset 0 1px rgba(255,255,255,.17)!important}
html:root[data-theme="dark"].upgrade8-page .theme-pill:hover{box-shadow:0 12px 34px rgba(0,0,0,.2)!important}
html:root[data-theme="dark"] .header-account-button[aria-current="page"]{box-shadow:none!important}
html:root[data-theme="dark"] .schedule-date.selected{border-color:transparent!important}
html:root[data-theme="dark"] :is(a,button,input,select,textarea,summary,[role="button"],[tabindex]){-webkit-tap-highlight-color:transparent}
