/* Ice-white cyber workspace. These rules never apply to the dark theme or print. */
@media screen {
  :root:not([data-xuewu-theme="dark"]) {
    --xw-page: #edf4fa;
    --xw-surface: #ffffff;
    --xw-panel: #f0f7fd;
    --xw-table-head: #e1eff9;
    --xw-ink: #263b52;
    --xw-heading: #10283f;
    --xw-muted: #516b82;
    --xw-link: #086b8c;
    --xw-link-hover: #5340a8;
    --xw-border: #b9cedf;
    --xw-hover: #007ea60d;
    --xw-code-bg: #edf7ff;
    --xw-code-ink: #185475;
    --xw-article-accent: #087ca0;
    --xw-accent: #087ca0;
    --xw-accent-soft: #009fc414;
    --xw-grid: #246b9110;
    --xw-line-strong: #7baac5;
    --xw-tab-fill: #009fc420;
    --xw-tab-edge: #087ca06b;
    --xw-tab-glow: #008ed138;
    --xw-tab-violet: #7252c9;
  }

  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook {
    background-image:
      radial-gradient(ellipse at 88% 0, #4ae3f224, transparent 42%),
      radial-gradient(ellipse at 25% 15%, #9478ee10, transparent 38%),
      linear-gradient(#176b9916 1px, transparent 1px),
      linear-gradient(90deg, #176b9916 1px, transparent 1px),
      linear-gradient(var(--xw-grid) 1px, transparent 1px),
      linear-gradient(90deg, var(--xw-grid) 1px, transparent 1px);
    background-size: auto, auto, 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  }
  html:root:not([data-xuewu-theme="dark"]) .mw-body ::selection { background: #b9edf4; color: #10283f; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #firstHeading::after {
    width: 96px;
    background: linear-gradient(90deg, #0088b4, #6e52ca);
    box-shadow: 0 2px 8px #008ed130;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .lua-reference .mw-heading2::before { color: #7051bf; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook :is(.lua-reference .mw-heading2, .tlbb-wiki-home .home-h2)::after {
    background: linear-gradient(90deg, #1589ae, #9079cc88 58%, #b9cedf44);
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .lua-reference .lua-lead {
    border-left-color: #188caf;
    background: linear-gradient(90deg, #d9f1fb, #e8effb66 70%, transparent);
  }

  /* Dark terminal surfaces give light articles a clear technical hierarchy. */
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook :is(.lua-reference pre, .tlbb-wiki-home .home-pre, .mw-body pre.xuewu-talk-example) {
    position: relative;
    background: #102138;
    color: #c9e6f4;
    border-color: #355978;
    box-shadow: inset 3px 0 #29b8d5, 0 8px 22px #193b6818;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .lua-reference pre::before {
    background: #19314c;
    color: #a6c9e1;
    border-bottom-color: #355978;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .lua-reference pre::after {
    background: #54d9ec;
    box-shadow: -9px 0 #a48be9, -18px 0 #68839d;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .lua-reference pre code {
    background: transparent;
    color: inherit;
    border: 0;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .mw-body table.wikitable {
    border-color: #9fbdd3;
    box-shadow: 0 6px 20px #193b680d;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .mw-body table.wikitable th {
    background: #19334f;
    color: #c8effa;
    border-color: #3f607b;
    border-bottom-color: #24a8c7;
    font-family: Consolas, "Microsoft YaHei", monospace;
  }

  /* Keep the existing dragon artwork, framed as a static holographic emblem. */
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-hero {
    border-color: #367a9c;
    background-image:
      radial-gradient(ellipse at 90% 15%, #8b72df24, transparent 48%),
      linear-gradient(#6bbedb10 1px, transparent 1px),
      linear-gradient(90deg, #6bbedb10 1px, transparent 1px),
      linear-gradient(115deg, #0c1e34, #123e57);
    background-size: auto, 32px 32px, 32px 32px, auto;
    box-shadow: 0 12px 30px #1b467b24, inset 0 1px #96e5f155;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -20px;
    right: -8px;
    width: 310px;
    height: 310px;
    border: 1px dashed #6bdaef55;
    border-radius: 50%;
    outline: 1px solid #7cb9ef28;
    outline-offset: 18px;
    box-shadow: 0 0 28px #52ceef0b;
    pointer-events: none;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-hero::after {
    background: linear-gradient(90deg, #5ce9f4 0 25%, #a28bf4 25% 38%, #5cd6ee22 38%);
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-hero-foot b { color: #8ce3ef; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-btn {
    border-color: #83b6d377;
    background: #102b42a6;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-btn:hover {
    border-color: #93dce9;
    background: #204863;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-btn-primary {
    border-color: #91eaf3;
    background: linear-gradient(115deg, #6adcec, #abf2f5);
    box-shadow: 0 0 20px #36cfff28;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-btn-primary a { color: #102b42; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-btn-primary:hover {
    border-color: #d3fbff;
    background: linear-gradient(115deg, #8ae9f4, #c3fbfb);
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-card {
    border-color: #a9c7dc;
    background: linear-gradient(130deg, #ffffff, #f3faff);
    box-shadow: inset 0 2px #2183a5, 0 7px 22px #1d497a10;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-card::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-top: 2px solid #795bc5;
    border-right: 2px solid #795bc5;
    pointer-events: none;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-card:hover {
    border-color: #218caf;
    box-shadow: inset 0 2px #218caf, 0 8px 24px #008ed125;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home :is(.home-panel, .home-links) {
    border-color: #a9c7dc;
    box-shadow: 0 5px 20px #1d497a0c;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-nav a {
    color: #275779;
    font-family: Consolas, "Microsoft YaHei", monospace;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-pre { border-left-color: #29b8d5; }

  /* Shared native forms inherit the light palette, with a stronger panel edge. */
  html:root:not([data-xuewu-theme="dark"]) body:is(.mw-special-Userlogin, .mw-special-CreateAccount) #mw-content-text .mw-htmlform {
    border-color: #91bad3;
    box-shadow: inset 0 2px #218caf, 0 9px 28px #1b467b18;
  }
  html:root:not([data-xuewu-theme="dark"]) body:is(.mw-special-Userlogin, .mw-special-CreateAccount) #mw-content-text .cdx-button--weight-primary:not(:disabled),
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .oo-ui-flaggedElement-primary .oo-ui-buttonElement-button {
    background: linear-gradient(110deg, #086b8c, #4b57a8);
    color: #f4fbff;
    border-color: #116c95;
    box-shadow: 0 3px 12px #15799e24;
  }

  /* Special pages use the same terminal frame and ice-white control surfaces. */
  html:root:not([data-xuewu-theme="dark"]) body:is(.mw-special-Userlogin, .mw-special-CreateAccount) #mw-content-text .mw-htmlform {
    position: relative;
    padding-top: 34px;
    background: linear-gradient(135deg, #ffffff, #f5fbff);
  }
  html:root:not([data-xuewu-theme="dark"]) body:is(.mw-special-Userlogin, .mw-special-CreateAccount) #mw-content-text .mw-htmlform::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 25px;
    border-bottom: 1px solid #3a6986;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(110deg, #19334f, #263c60);
    pointer-events: none;
  }
  html:root:not([data-xuewu-theme="dark"]) body:is(.mw-special-Userlogin, .mw-special-CreateAccount) #mw-content-text .mw-htmlform::after {
    content: "";
    position: absolute;
    top: 11px;
    right: 14px;
    width: 4px;
    height: 4px;
    background: #54d9ec;
    box-shadow: -9px 0 #a48be9, -18px 0 #68839d;
    pointer-events: none;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-CreateAccount .mw-number-text {
    position: relative;
    border: 1px solid #a9c7dc;
    border-left: 3px solid #218caf;
    border-radius: 4px;
    background: linear-gradient(130deg, #ffffff, #edf7ff);
    box-shadow: 0 5px 18px #1d497a10;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-CreateAccount .mw-number-text::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-top: 1px solid #795bc5;
    border-right: 1px solid #795bc5;
    pointer-events: none;
  }

  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-search-top-table {
    display: flow-root;
    padding: 16px;
    border: 1px solid #91bad3;
    border-top: 2px solid #218caf;
    border-radius: 6px;
    background: linear-gradient(130deg, #ffffff, #f0f8ff);
    box-shadow: 0 8px 24px #1b467b18;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .mw-search-profile-tabs {
    margin: 14px 0 0;
    background: #eaf4fc;
    border-color: #a8c7dd;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .search-types .current a {
    background: linear-gradient(115deg, #19334f, #37496d);
    color: #e3f7ff;
    box-shadow: inset 0 -2px #54d9ec, 0 2px 7px #193b681c;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-searchoptions {
    border-color: #91bad3;
    border-top: 2px solid #218caf;
    background: linear-gradient(135deg, #ffffff, #f5fbff);
    box-shadow: 0 6px 20px #1b467b12;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-searchoptions .oo-ui-fieldLayout { margin: 6px 0; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-searchoptions .checkbox-wrapper > div { padding-bottom: 0; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .cdx-table-pager {
    background: linear-gradient(110deg, #19334f, #243c5d);
    color: #d4ecf7;
    border-color: #3a6986;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .cdx-table-pager .cdx-button {
    background: #234460;
    color: #d4ecf7;
    border-color: #527d99;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .cdx-table-pager .cdx-button:not([disabled]):hover { background: #355b7b; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .cdx-table-pager .cdx-button[disabled] {
    background: transparent;
    border-color: transparent;
    opacity: .4;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search .cdx-table-pager .cdx-button__icon { filter: brightness(0) invert(.85); }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .mw-search-result {
    padding-left: 12px;
    border-left: 2px solid transparent;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .mw-search-result:hover {
    background: linear-gradient(90deg, #d9f1fb88, transparent);
    border-left-color: #218caf;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .searchmatch {
    background: #d1eef7;
    color: #155672;
  }

  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .oo-ui-tagMultiselectWidget {
    border-radius: 6px;
    box-shadow: 0 7px 22px #1b467b18;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .oo-ui-tagMultiselectWidget.oo-ui-widget-enabled .oo-ui-tagMultiselectWidget-handle {
    background: linear-gradient(110deg, #19334f, #243c5d);
    border-color: #3a6986;
    border-radius: 5px 5px 0 0;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .oo-ui-tagMultiselectWidget-handle :is(.oo-ui-labelElement-label, .oo-ui-buttonElement-button) { color: #d4ecf7; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .oo-ui-tagMultiselectWidget.oo-ui-widget-enabled .oo-ui-tagItemWidget.oo-ui-widget-enabled {
    background: #284965;
    color: #d4ecf7;
    border-color: #527d99;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterMenuHeaderWidget-header { background: #19334f; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterMenuHeaderWidget-header :is(.oo-ui-labelElement-label, .oo-ui-buttonElement-button, .mw-rcfilters-ui-filterMenuHeaderWidget-title) { color: #d4ecf7; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterMenuHeaderWidget-header .oo-ui-buttonElement-button {
    background: #234460;
    border-color: #527d99;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .oo-ui-popupWidget-popup {
    border-color: #91bad3;
    border-top: 2px solid #218caf;
    border-radius: 5px;
    box-shadow: 0 9px 26px #1b467b24;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterWrapperWidget-numChangesAndDateWidget .oo-ui-buttonElement-button {
    background: #19334f;
    color: #d4ecf7;
    border-color: #3a6986;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges :is(.oo-ui-tagMultiselectWidget-handle, .mw-rcfilters-ui-filterMenuHeaderWidget-header, .mw-rcfilters-ui-filterWrapperWidget-numChangesAndDateWidget) .oo-ui-widget-enabled > .oo-ui-buttonElement-button:hover {
    background: #345774;
    color: #e3f7ff;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges :is(.oo-ui-tagMultiselectWidget-handle, .mw-rcfilters-ui-filterMenuHeaderWidget-header, .mw-rcfilters-ui-filterWrapperWidget-numChangesAndDateWidget) .oo-ui-iconElement-icon { filter: brightness(0) invert(.85); }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterWrapperWidget-numChangesAndDateWidget .oo-ui-indicatorElement-indicator { filter: brightness(0) invert(.85); }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-changeslist-legend {
    border-color: #a9c7dc;
    background: linear-gradient(130deg, #ffffff, #edf7ff);
    box-shadow: 0 5px 18px #1d497a10;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-changeslist-legend summary {
    padding: 4px 8px;
    border-radius: 3px;
    background: #19334f;
    color: #d4ecf7;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-changeslist h4 {
    padding: 6px 10px;
    border-left: 3px solid #218caf;
    background: linear-gradient(90deg, #d9f1fb88, transparent);
  }
}

@media screen and (min-width: 551px) {
  html:root:not([data-xuewu-theme="dark"]) #column-one::before {
    content: "";
    position: fixed;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    width: 12.2em;
    border-right: 1px solid #355773;
    background: linear-gradient(180deg, #11243b, #0c1b2e);
    pointer-events: none;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #sidebar { border-right: 0; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #sidebar .portlet h3 { color: #83d7eb; border-color: #35516b; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #sidebar .portlet li a { color: #bdcede; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #sidebar .portlet li a:hover { color: #baf3fc; background: #6bd4ef18; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #p-search #searchInput {
    background: #0d1b2d;
    color: #cde3f2;
    border-color: #436780;
  }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #p-search #searchInput::placeholder { color: #9cb9cf; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #p-search input[type="submit"] { color: #abcade; border-color: #436780; }
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook #p-cactions::after { background: linear-gradient(90deg, #1b91b7, #8b73ce 45%, #b9cedf55); }
}

@media screen and (max-width: 780px) {
  html:root:not([data-xuewu-theme="dark"]) body.skin-monobook .tlbb-wiki-home .home-hero::before {
    top: 16px;
    right: -10px;
    width: 190px;
    height: 190px;
    opacity: .35;
  }
}

@media screen and (max-width: 550px) {
  html:root:not([data-xuewu-theme="dark"]) body:is(.mw-special-Search, .mw-special-Userlogin, .mw-special-CreateAccount, .mw-special-Recentchanges) :is(#sidebar-mobilejs, #p-personal, #p-cactions, #p-tb).mobile-menu-active {
    min-width: min(220px, calc(100vw - 24px));
    border-top: 2px solid #218caf;
    background: linear-gradient(135deg, #ffffff, #edf7ff);
    box-shadow: 0 12px 30px #193b6830;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-search-top-table { padding: 12px; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Search #mw-content-text .cdx-table-pager__end {
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
  }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterTagMultiselectWidget-views { flex-wrap: wrap; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterTagMultiselectWidget-views-input { flex-basis: 100%; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterTagMultiselectWidget-views-select { width: 100%; }
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .mw-rcfilters-ui-filterTagMultiselectWidget-views-select-widget {
    border-left-width: 1px;
    border-top: 0;
    text-align: left;
  }
}

@media screen and (max-width: 360px) {
  html:root:not([data-xuewu-theme="dark"]) body.mw-special-Recentchanges .oo-ui-popupWidget:has(.mw-rcfilters-ui-changesLimitPopupWidget) { margin-right: 12px; }
}
