:root {
  color-scheme: dark light;
  --page: #101113;
  --surface: #191b1f;
  --surface-raised: #22252a;
  --border: #383d45;
  --text: #f4f1e8;
  --muted: #a8adb5;
  --red: #b4232f;
  --red-hover: #d13442;
  --gold: #d6a84a;
  --green: #3fa56b;
  --focus: #f0c96b;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

/* Preset themes change the visual language only; tenant content and behavior stay identical. */
body.template-tech {
  --page: #071522;
  --surface: #0d2234;
  --surface-raised: #14334a;
  --border: #25506a;
  --text: #e6f4ff;
  --muted: #91b1c5;
  --red: #147eae;
  --red-hover: #1b9acb;
  --gold: #63d4ff;
  --green: #55c7a0;
  --focus: #66d8ff;
}
body.template-royal {
  --page: #180d12;
  --surface: #271318;
  --surface-raised: #381a21;
  --border: #6a3131;
  --text: #fff3dc;
  --muted: #c8a9a1;
  --red: #c53645;
  --red-hover: #e3525f;
  --gold: #efb94b;
  --green: #68c38d;
  --focus: #ffd66d;
}
body.template-portal {
  --page: #101820;
  --surface: #18232d;
  --surface-raised: #22313d;
  --border: #3b5665;
  --text: #f3f7f8;
  --muted: #a9bbc3;
  --red: #b4522c;
  --red-hover: #d8754b;
  --gold: #f0c46a;
  --green: #62bd92;
  --focus: #f3d18b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--text); }
body.has-site-background { background-position: center top; background-repeat: no-repeat; background-size: cover; background-attachment: fixed; }
body.is-booting > :not(.site-boot-screen) { visibility: hidden; }
.site-boot-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: var(--page); color: var(--muted); font-size: 15px; letter-spacing: 0; }
body:not(.is-booting) .site-boot-screen { display: none; }
button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(240, 201, 107, .32); outline-offset: 2px; }

.topbar { position: sticky; z-index: 80; top: 0; height: 80px; border-bottom: 1px solid #4a3a24; background: #06070e; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.topbar-inner { width: min(1800px, calc(100% - 48px)); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; overflow: hidden; border: 1px solid #6d542a; border-radius: 6px; background: #202226; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; }
.topbar-tools, .member-actions, .member-profile { display: flex; align-items: center; gap: 10px; }
.topbar-tools { flex: 0 0 auto; }
.member-profile { min-width: 0; }
.portal-nav { display: flex; min-width: 0; align-items: center; gap: 2px; }
.portal-nav a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 5px; color: var(--muted); text-decoration: none; font-size: 13px; }
.portal-nav a:hover, .portal-nav a.is-active { background: var(--surface-raised); color: var(--text); }
.member-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.member-level { padding: 4px 8px; border: 1px solid #6f572c; border-radius: 999px; color: #f1ca72; font-size: 12px; white-space: nowrap; }
.theme-toggle { width: 40px; height: 40px; flex: 0 0 40px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-raised); color: var(--text); cursor: pointer; transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
.theme-toggle:hover { border-color: var(--gold); background: #2a2e34; color: #f2cf77; }
.theme-toggle-icon { font-size: 21px; line-height: 1; }
.directory-trigger { min-height: 80px; display: inline-flex; align-items: center; padding: 0 16px; border: 0; border-radius: 0; background: var(--red); color: #fff; text-decoration: none; font-size: 13px; white-space: nowrap; }
.directory-trigger:hover { background: var(--red-hover); color: #fff; }
.nav-search { position: relative; display: flex; width: 156px; height: 38px; flex: 0 0 156px; border: 1px solid #403c32; border-radius: 999px; background: #111116; overflow: hidden; }
.nav-search input { min-width: 0; flex: 1; padding: 0 8px 0 12px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.nav-search input::placeholder { color: var(--muted); }
.nav-search button { width: 36px; flex: 0 0 36px; padding: 0; border: 0; border-left: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }
.nav-search button:hover { color: var(--gold); background: var(--surface-raised); }

.button { min-height: 40px; padding: 0 17px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-raised); color: var(--text); cursor: pointer; transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
.button:hover { border-color: #69717c; background: #2a2e34; }
.button-primary { border-color: #d04b56; background: var(--red); color: #fff; font-weight: 700; }
.button-primary:hover { border-color: #e06a74; background: var(--red-hover); }
.button-quiet { background: transparent; }
.button-wide { width: 100%; margin-top: 4px; }
.button:disabled { border-color: #4d5259; background: #303238; color: #c2c4c8; cursor: wait; }

.ticker { width: 100%; height: 48px; margin: 0; display: flex; align-items: stretch; overflow: hidden; border: 1px solid #51442e; border-radius: 0; background: #1a1b1e; }
.ticker-label { width: 74px; flex: 0 0 74px; display: grid; place-items: center; background: #5f1c24; color: #fff; font-weight: 800; }
.ticker-window { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.ticker-track { width: max-content; min-width: 100%; height: 100%; display: flex; align-items: center; gap: 54px; padding-left: 28px; color: #e7d8b8; white-space: nowrap; animation: ticker-move 30s linear infinite; }
.ticker-track a { color: inherit; text-decoration: none; }
.ticker-track a:hover { color: #fff; }
@keyframes ticker-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.page-content { width: min(1800px, calc(100% - 48px)); min-width: 0; min-height: calc(100vh - 248px); margin: 36px auto 52px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid #34373d; }
.section-heading h1 { margin: 3px 0 0; font-size: 28px; line-height: 1.2; }
.section-kicker, .dialog-eyebrow { margin: 0; color: var(--gold); font: 700 12px/1.4 "Segoe UI", sans-serif; }
.server-count { color: var(--muted); font-size: 14px; white-space: nowrap; }

.server-grid { display: grid; grid-template-columns: repeat(auto-fill, 320px); justify-content: center; gap: 22px; }
.server-card { width: 320px; height: 410px; display: grid; grid-template-rows: 180px minmax(0, 1fr); overflow: hidden; border: 2px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 14px 35px rgba(0, 0, 0, .18); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.server-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 18px 38px rgba(0, 0, 0, .28); }
.server-cover { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: #26292e; }
.server-cover img, .server-cover video { width: 100%; height: 100%; display: block; object-fit: cover; }
.server-cover .server-recommended-badge { position: absolute; z-index: 2; top: 0; right: 0; width: 92px; height: 48px; display: block; object-fit: contain; pointer-events: none; }
.server-ribbon { position: absolute; z-index: 3; inset: auto 0 0; min-width: 0; min-height: 32px; display: flex; align-items: center; justify-content: center; padding: 4px 12px; overflow: hidden; background: rgba(190, 40, 49, .72); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.server-cover::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--red); }
.server-body { min-height: 0; display: flex; flex-direction: column; padding: 18px; }
.server-title-row { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.server-title { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.server-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; color: #9ce2b7; font-size: 12px; }
.server-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(63, 165, 107, .16); }
.server-subtitle { min-height: 22px; margin: 7px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d6bd88; font-size: 14px; }
.server-description { height: 44px; margin: 10px 0 0; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 22px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.server-tags { min-height: 28px; display: flex; align-items: center; gap: 6px; margin-top: 10px; overflow: hidden; }
.server-tag { flex: 0 0 auto; padding: 3px 7px; border: 1px solid #51452f; border-radius: 4px; color: #d9c28f; font-size: 11px; }
.server-actions { display: flex; gap: 8px; margin-top: auto; }
.server-link { flex: 1 1 0; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d04b56; border-radius: 6px; background: var(--red); color: #fff; text-decoration: none; font-weight: 800; transition: background-color .16s ease; }
.server-link:hover { background: var(--red-hover); }
.server-link.disabled { border-color: #4d5259; background: #303238; color: #c2c4c8; pointer-events: none; }

.empty-state { min-height: 260px; display: grid; place-content: center; justify-items: center; gap: 7px; border: 1px dashed #4a4e55; border-radius: 8px; color: var(--muted); }
.empty-state strong { color: var(--text); font-size: 18px; }
.site-footer { min-height: 72px; display: flex; align-items: center; justify-content: center; gap: 18px; border-top: 1px solid #303238; color: #7f858e; font-size: 13px; }

.auth-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid #52565e; border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .48); }
.auth-dialog-wechat { width: min(560px, calc(100vw - 32px)); max-width: calc(100vw - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: transparent; box-shadow: 0 30px 80px rgba(0, 0, 0, .58); }
.wechat-login-shell { position: relative; width: 100%; aspect-ratio: 560 / 562; background: transparent url('/assets/images/login.png') center / 100% 100% no-repeat; }
.wechat-login-shell > .icon-button { position: absolute; z-index: 4; top: 14px; right: 7%; border-color: rgba(255, 239, 190, .55); background: rgba(111, 18, 19, .42); color: #fff4d2; }
.wechat-login-shell > .icon-button:hover { border-color: #fff1bf; background: rgba(111, 18, 19, .72); color: #fff; }
.auth-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.site-notice-dialog { width: min(860px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 48px)); padding: 0; overflow: hidden; border: 1px solid #b85b32; border-radius: 8px; background: #24151a; color: #fff3dc; box-shadow: 0 30px 90px rgba(0, 0, 0, .62); }
.site-notice-dialog::backdrop { background: rgba(3, 6, 10, .76); }
.site-notice-shell { position: relative; min-height: 260px; display: grid; grid-template-columns: minmax(220px, 42%) minmax(0, 1fr); }
.site-notice-image { min-height: 260px; background: #171018; }
.site-notice-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.site-notice-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 44px 48px 42px; background: linear-gradient(135deg, #3a1b1d, #24151a 72%); }
.site-notice-eyebrow { margin: 0 0 8px; color: #e6a14d; font: 700 11px/1.4 "Segoe UI", sans-serif; }
.site-notice-copy h2 { margin: 0; color: #ffe0a2; font-size: clamp(24px, 3vw, 34px); line-height: 1.25; }
.site-notice-copy > div { margin-top: 18px; color: #f7e9d2; font-size: 15px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.site-notice-close { position: absolute; z-index: 2; top: 12px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 224, 162, .42); border-radius: 50%; background: rgba(20, 10, 13, .52); color: #ffe0a2; cursor: pointer; font-size: 25px; line-height: 1; }
.site-notice-close:hover { border-color: #ffe0a2; background: rgba(20, 10, 13, .82); color: #fff; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 24px 24px 18px; border-bottom: 1px solid var(--border); }
.dialog-header h2 { margin: 4px 0 0; font-size: 24px; }
.icon-button { width: 40px; height: 40px; flex: 0 0 40px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: #25282d; color: #d7d9dc; cursor: pointer; font-size: 26px; line-height: 1; }
.icon-button:hover { border-color: #d04b56; background: #4a1d22; color: #fff; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 18px 24px 0; }
.auth-tab { height: 40px; border: 1px solid var(--border); background: #1b1d21; color: var(--muted); cursor: pointer; }
.auth-tab:first-child { border-radius: 6px 0 0 6px; }
.auth-tab:last-child { border-radius: 0 6px 6px 0; }
.auth-tab.active { border-color: #b88f40; background: #3f3422; color: #f2d691; font-weight: 700; }
.auth-form { display: grid; gap: 15px; padding: 22px 24px 26px; }
.auth-form label { display: grid; gap: 7px; color: #d9dadd; font-size: 13px; }
.auth-form input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #4b5058; border-radius: 6px; background: #111215; color: #fff; }
.auth-form input::placeholder { color: #7e838c; }
.auth-form input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(240, 201, 107, .16); }
.wechat-login-panel { position: absolute; inset: 0; display: block; padding: 0; text-align: center; }
.wechat-login-qr { position: absolute; z-index: 2; top: 50%; left: 50%; width: min(220px, 39%); aspect-ratio: 1; transform: translate(-50%, -50%); object-fit: contain; border: 0; border-radius: 8px; background: transparent; box-shadow: 0 5px 16px rgba(74, 7, 7, .34); }
.wechat-login-code-line { position: absolute; z-index: 3; top: 71%; left: 3%; width: 94%; margin: 0; color: #fff7e1; font-size: 17px; line-height: 1.4; white-space: nowrap; text-shadow: 0 1px 3px rgba(79, 8, 8, .78); }
.wechat-login-code { color: #ffe36f; font-size: 22px; letter-spacing: 2px; line-height: 1; }
.wechat-login-status { position: absolute; z-index: 3; top: 80%; left: 4%; width: 92%; margin: 0; color: #ffe69a; font-size: 13px; line-height: 1.5; text-shadow: 0 1px 3px rgba(79, 8, 8, .78); }
.wechat-login-panel .button-wide { position: absolute; z-index: 3; top: 86%; left: 50%; min-height: 36px; transform: translateX(-50%); margin: 0; padding: 0 20px; border-color: #ffe3a0; background: rgba(119, 22, 19, .76); color: #fff4cd; box-shadow: 0 3px 8px rgba(74, 7, 7, .28); }
.wechat-login-panel .button-wide:hover { border-color: #fff4cd; background: rgba(119, 22, 19, .92); color: #fff; }
@media (max-width: 460px) {
  .auth-dialog-wechat { width: calc(100vw - 16px); max-width: calc(100vw - 16px); }
  .wechat-login-qr { width: 43%; }
  .wechat-login-code-line { top: 71%; font-size: 14px; }
  .wechat-login-code { font-size: 19px; letter-spacing: 1px; }
  .wechat-login-status { top: 80%; font-size: 11px; }
  .wechat-login-panel .button-wide { top: 86%; min-height: 34px; font-size: 12px; }
}
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; max-width: calc(100vw - 32px); transform: translateX(-50%); padding: 12px 18px; border: 1px solid #656a72; border-radius: 6px; background: #25282d; color: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, .34); }
.toast.error { border-color: #bf4550; background: #4a1d22; }

.portal-hero { display: block; position: relative; width: min(1800px, calc(100% - 48px)); height: 390px; min-height: 390px; margin: 16px auto 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.portal-hero-media, .portal-hero-media img, .portal-hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.portal-hero-media { left: 0; right: auto; width: 100%; transform: none; }
.portal-hero-media img, .portal-hero-media video { display: block; object-fit: contain; background: var(--surface); }
.portal-hero-media[data-fit="fill"] img, .portal-hero-media[data-fit="fill"] video { object-fit: fill; }
.portal-hero-media::after { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: rgba(7, 13, 18, .48); }
.template-portal .portal-hero-media::after { background: transparent; }
.hero-carousel-track { position: absolute; z-index: 1; inset: 0; overflow: hidden; }
.hero-slide { position: absolute; z-index: 1; top: 50%; left: 50%; width: min(980px, calc(100% - 128px)); height: calc(100% - 74px); visibility: hidden; opacity: 0; transform: translate(-50%, -50%) scale(.76); transition: transform .35s ease, opacity .35s ease, visibility 0s linear .35s; pointer-events: none; }
.hero-slide.is-prev, .hero-slide.is-next { visibility: visible; opacity: .34; transition-delay: 0s; }
.hero-slide.is-prev { transform: translate(calc(-50% - min(38vw, 560px)), -50%) scale(.76); }
.hero-slide.is-next { transform: translate(calc(-50% + min(38vw, 560px)), -50%) scale(.76); }
.hero-slide.is-active { z-index: 2; visibility: visible; opacity: 1; transform: translate(-50%, -50%) scale(1); transition-delay: 0s; pointer-events: auto; }
.hero-slide img, .hero-slide video { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 12px; background: var(--surface); box-shadow: 0 18px 44px rgba(0, 0, 0, .34); }
.portal-hero-media[data-fit="fill"] .hero-slide img, .portal-hero-media[data-fit="fill"] .hero-slide video { object-fit: fill; }
.portal-hero-media.is-single .hero-slide { width: 100%; height: 100%; }
.portal-hero-media.is-single .hero-slide img, .portal-hero-media.is-single .hero-slide video { border-radius: 0; box-shadow: none; }
.portal-hero-media.is-duo .hero-slide, .portal-hero-media.is-duo .hero-slide.is-prev, .portal-hero-media.is-duo .hero-slide.is-next, .portal-hero-media.is-duo .hero-slide.is-active { position: absolute; z-index: 1; top: 0; width: 50%; height: 100%; visibility: visible; opacity: 1; transform: none; transition: none; pointer-events: auto; }
.portal-hero-media.is-duo .hero-slide:first-child { left: 0; }
.portal-hero-media.is-duo .hero-slide:last-child { left: 50%; box-shadow: inset 1px 0 0 var(--border); }
.portal-hero-media.is-duo .hero-slide img, .portal-hero-media.is-duo .hero-slide video { border-radius: 0; box-shadow: none; }
.portal-hero-media.is-duo .hero-slide-actions { bottom: 40px; width: 100%; padding: 0 10px; gap: 6px; flex-wrap: wrap; justify-content: center; }
.portal-hero-media.is-duo .hero-slide-button { min-height: 34px; padding: 0 14px; font-size: 13px; }
.portal-hero-media.is-static .hero-carousel-arrow, .portal-hero-media.is-static .hero-carousel-dots { display: none; }
.hero-slide-actions { position: absolute; left: 50%; bottom: 54px; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; }
.hero-slide-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid rgba(255,255,255,.72); border-radius: 6px; background: rgba(15, 23, 30, .72); color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
.hero-slide-button:hover { background: rgba(15, 23, 30, .9); }
.hero-carousel-arrow { position: absolute; z-index: 5; top: 50%; width: 52px; height: 52px; display: inline-grid; place-items: center; padding: 0; transform: translateY(-50%); border: 1px solid rgba(24, 31, 38, .12); border-radius: 50%; background: rgba(255, 255, 255, .94); color: #1c2630; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); cursor: pointer; font-size: 0; line-height: 0; transition: background-color .16s ease, transform .16s ease; }
.carousel-arrow-icon { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.hero-carousel-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.hero-carousel-arrow-prev { left: clamp(16px, 4vw, 52px); }
.hero-carousel-arrow-next { right: clamp(16px, 4vw, 52px); }
.hero-carousel-dots { position: absolute; z-index: 6; inset: auto 0 8px; height: 20px; display: flex; justify-content: center; align-items: center; gap: 8px; pointer-events: auto; }
.hero-carousel-dot { width: 10px; height: 10px; flex: 0 0 10px; padding: 0; border: 1px solid rgba(28,38,48,.5); border-radius: 50%; background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(0,0,0,.24); cursor: pointer; pointer-events: auto; }
.hero-carousel-dot:hover { transform: scale(1.2); }
.hero-carousel-dot.is-active { width: 24px; flex-basis: 24px; border-color: #1677ff; border-radius: 999px; background: #1677ff; }
.portal-hero-media.is-single .hero-carousel-arrow { display: none; }
html[data-color-theme="light"] .hero-carousel-dot { border-color: rgba(64, 75, 88, .5); background: rgba(255,255,255,.96); }
html[data-color-theme="light"] .hero-carousel-dot.is-active { border-color: #1677ff; background: #1677ff; }
.portal-hero-content { position: absolute; z-index: 1; inset: 0; width: 100%; min-height: 100%; padding: 0; background: transparent; pointer-events: none; }
.hero-custom-control { position: absolute; margin: 0; max-width: 88%; }
.ticker { position: relative; z-index: 20; width: min(1800px, calc(100% - 48px)); margin: 12px auto 24px; }
.portal-features { position: relative; width: min(1800px, calc(100% - 48px)); margin: 0 auto 38px; overflow: hidden; }
#announcement[hidden] + .portal-features { margin-top: 24px; }
.feature-carousel-viewport { width: 100%; overflow: hidden; }
.feature-carousel-track { display: flex; gap: 28px; transform: translateX(0); transition: transform .35s ease; }
.feature-card { min-width: 0; height: 252px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.feature-login { height: 405px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; text-align: center; }
.feature-login-icon { width: 84px; height: 84px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid var(--gold); border-radius: 50%; background: var(--surface-raised); color: var(--gold); font-size: 18px; font-weight: 800; }
.feature-login h2, .feature-promo h2 { margin: 0; color: var(--text); font-size: 20px; }
.feature-login p, .feature-promo p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.feature-login-member { width: 100%; display: grid; gap: 5px; margin-top: 8px; color: var(--gold); font-size: 13px; font-weight: 600; line-height: 19px; }
.feature-login-member > span { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 8px; align-items: center; text-align: left; }
.feature-login-member > span::before { content: attr(data-label); text-align: right; font-weight: 600; }
.feature-login-signin-row { position: relative; min-height: 19px; }
.feature-login-signin-row > span { width: 100%; min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 8px; align-items: center; text-align: left; }
.feature-login-signin-row > span::before { content: attr(data-label); text-align: right; font-weight: 600; }
.feature-login-checkin { position: absolute; top: 50%; right: 0; min-height: 34px; margin: 0; padding: 0 12px; transform: translateY(-50%); }
.feature-login-button { width: 100%; margin-top: auto; }
.feature-played-games-button { width: 100%; min-height: 34px; margin-top: 8px; font-size: 12px; }
/* While the member block is hidden the two actions have to stay adjacent at the bottom
   of the card instead of leaving a gap between the hint text and the login button. */
.feature-login-member[hidden] ~ .feature-played-games-button { margin-top: auto; }
.feature-login-member[hidden] ~ .feature-login-button { margin-top: 8px; }
.feature-promo { flex: 0 0 calc((100% - 56px) / 3); display: flex; flex-direction: column; cursor: default; }
.feature-promo.is-link { cursor: pointer; }
.feature-promo-media { height: 100%; flex: 1 1 auto; overflow: hidden; background: var(--surface-raised); }
.feature-promo-media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease; }
.feature-promo.is-link:hover .feature-promo-media img { transform: scale(1.04); }
.feature-carousel-arrow { position: absolute; z-index: 2; top: 50%; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.72); border-radius: 50%; background: rgba(15,23,30,.72); color: #fff; cursor: pointer; font-size: 0; line-height: 0; }
.feature-carousel-arrow[hidden] { display: none; }
.feature-carousel-arrow-prev { left: 12px; }
.feature-carousel-arrow-next { right: 12px; }
.feature-carousel-dots { position: absolute; z-index: 2; right: 0; bottom: 10px; left: 0; display: flex; justify-content: center; gap: 7px; pointer-events: none; }
.feature-carousel-dot { width: 9px; height: 9px; padding: 0; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(0,0,0,.36); cursor: pointer; pointer-events: auto; }
.feature-carousel-dot.is-active { width: 22px; border-radius: 999px; background: #fff; }
.portal-body-layout { width: 100%; min-width: 0; margin: 0 auto 52px; display: grid; grid-template-columns: 318px minmax(0, 1fr); gap: 28px; align-items: start; }
.portal-sidebar { min-width: 0; display: grid; gap: 24px; align-content: start; }
.latest-games { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.portal-section-title { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.portal-section-title h2 { margin: 0; color: var(--gold); font-size: 25px; line-height: 1.2; }
.portal-section-title a { color: var(--gold); font-size: 12px; text-decoration: none; }
.portal-section-title a:hover { color: var(--text); }
.latest-games > .portal-section-title { padding: 0 18px; margin-bottom: 0; }
.latest-game-tabs { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 46px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.latest-game-tab { min-width: 0; border: 0; border-top: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.latest-game-tab:hover { border-top-color: var(--gold); color: var(--text); background: var(--surface-raised); }
.latest-game-tab.is-active { border-top-color: var(--red); color: var(--text); background: var(--surface); }
.latest-game-list { display: grid; height: 540px; overflow-y: auto; align-content: start; }
.latest-game-item { min-width: 0; height: 90px; display: grid; grid-template-columns: 95px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid rgba(120, 128, 138, .16); }
.latest-game-item:last-child { border-bottom: 0; }
.latest-game-item:hover { background: var(--surface-raised); }
.latest-game-item img, .latest-game-item video { width: 95px; height: 68px; display: block; object-fit: cover; background: var(--surface-raised); }
.latest-game-details { min-width: 0; display: grid; gap: 5px; }
.latest-game-details strong, .latest-game-details span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-game-details strong { color: var(--text); font-size: 13px; font-weight: 600; }
.latest-game-details span { color: var(--muted); font-size: 12px; }
.latest-game-meta { min-width: 0; display: flex; align-items: center; gap: 5px; overflow: hidden; }
.latest-game-badge { flex: 0 0 auto; overflow: hidden; padding: 2px 6px; border: 1px solid rgba(120, 128, 138, .42); border-radius: 3px; color: var(--muted); font-size: 11px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.latest-game-badge.is-recommended { border-color: #c98d24; background: #211b12; color: #e3a83a; }
.latest-game-badge.is-new { border-color: #2d8f68; background: #10251f; color: #5fc797; }
.latest-game-badge.is-featured { border-color: #a44559; background: #2b171d; color: #e17a8c; }
.latest-game-tag-line, .latest-game-open-date { display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.latest-game-open-date { color: var(--gold); }
html[data-color-theme="light"] .latest-game-badge.is-recommended { border-color: #d39b2a; background: #fff8e8; color: #9a6500; }
html[data-color-theme="light"] .latest-game-badge.is-new { border-color: #43a17d; background: #edf9f3; color: #217655; }
html[data-color-theme="light"] .latest-game-badge.is-featured { border-color: #c56a80; background: #fff1f4; color: #a53f59; }
.latest-game-actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.latest-game-link { min-height: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; border: 1px solid var(--gold); border-radius: 4px; color: var(--gold); font-size: 12px; text-decoration: none; white-space: nowrap; }
.latest-game-link:hover { background: var(--gold); color: var(--page); }
.latest-game-link.disabled { opacity: .55; pointer-events: none; }
.latest-players { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.latest-players > .portal-section-title { padding: 0 18px; margin-bottom: 0; }
.latest-player-list { display: grid; }
.latest-player-list { height: 540px; overflow: hidden; }
.latest-player-header { height: 43px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(56px, .72fr) 72px; align-items: center; gap: 8px; padding: 0 14px 0 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--red); background: var(--surface-raised); color: var(--text); font-size: 12px; font-weight: 700; }
.latest-player-header span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-player-track { animation: latest-player-scroll 30s linear infinite; }
.latest-player-track.is-static { animation: none; }
.latest-player-track.is-paused { animation-play-state: paused; }
@keyframes latest-player-scroll { from { transform: translateY(0); } to { transform: translateY(calc(-1 * var(--latest-player-loop, 33.333333%))); } }
.latest-player-item { min-width: 0; height: 54px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(56px, .72fr) 72px; align-items: center; gap: 8px; padding: 8px 14px 8px 18px; border-top: 1px solid rgba(120, 128, 138, .16); }
.latest-player-item strong, .latest-player-item span, .latest-player-item time { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-player-item strong { color: var(--text); font-size: 13px; }
.latest-player-item span, .latest-player-item time, .latest-player-empty { color: var(--muted); font-size: 12px; }
.latest-player-item .latest-player-id { color: var(--red); }
.latest-player-item time { color: var(--green); font-variant-numeric: tabular-nums; }
.latest-player-item:hover { position: relative; z-index: 2; background: var(--surface-raised); }
.latest-player-item time { color: var(--gold); font-variant-numeric: tabular-nums; }
.latest-player-popover { position: fixed; z-index: 40; min-width: 220px; max-width: min(360px, calc(100vw - 16px)); padding: 10px 12px; border: 1px solid var(--gold); border-radius: 5px; background: var(--surface-raised); color: var(--text); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); pointer-events: none; font-size: 12px; line-height: 1.7; }
.latest-player-popover div { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 6px; }
.latest-player-popover b { color: var(--gold); font-weight: 700; }
.latest-player-popover span { overflow-wrap: anywhere; }
.latest-player-empty { display: block; padding: 18px; text-align: center; }
.game-sections { min-width: 0; max-width: 100%; }
.game-grid { min-width: 0; max-width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.game-card { width: auto; max-width: 100%; min-width: 0; height: 350px; display: grid; grid-template-rows: 200px minmax(0, 1fr); border: 2px solid var(--border); border-radius: 4px; background: var(--surface); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.game-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 14px 30px rgba(0, 0, 0, .28); }
.game-card .server-body { min-height: 0; overflow: hidden; padding: 13px 14px 14px; }
.game-card .server-body { padding-top: 22px; }
.game-card .server-title { font-size: 17px; }
.game-card .server-subtitle { margin-top: 5px; font-size: 12px; }
.game-card .server-title-row { align-items: center; gap: 8px; }
.game-card .server-title { flex: 0 1 auto; max-width: 54%; }
.game-card .server-tags-inline { min-width: 0; min-height: 24px; display: flex; align-items: center; gap: 5px; margin: 0; overflow: hidden; }
.game-card .server-tags-inline .server-tag { max-width: 82px; overflow: hidden; padding: 3px 8px; border-radius: 3px; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 17px; }
.game-card .server-tags-inline .server-tag:nth-child(1) { border-color: #c98d24; background: #211b12; color: #e3a83a; }
.game-card .server-tags-inline .server-tag:nth-child(2) { border-color: #2d8f68; background: #10251f; color: #5fc797; }
.game-card .server-tags-inline .server-tag:nth-child(3) { border-color: #a44559; background: #2b171d; color: #e17a8c; }
.game-card .server-tags-inline .server-tag:nth-child(4) { border-color: #4c7fb0; background: #132131; color: #7bb5ec; }
html[data-color-theme="light"] .game-card .server-tags-inline .server-tag:nth-child(1) { border-color: #d39b2a; background: #fff8e8; color: #9a6500; }
html[data-color-theme="light"] .game-card .server-tags-inline .server-tag:nth-child(2) { border-color: #43a17d; background: #edf9f3; color: #217655; }
html[data-color-theme="light"] .game-card .server-tags-inline .server-tag:nth-child(3) { border-color: #c56a80; background: #fff1f4; color: #a53f59; }
html[data-color-theme="light"] .game-card .server-tags-inline .server-tag:nth-child(4) { border-color: #6395c5; background: #eef6ff; color: #376c9f; }
.game-card .server-description { height: 38px; margin-top: 7px; font-size: 12px; line-height: 19px; }
.game-card .server-tags { min-height: 24px; margin-top: 5px; }
.game-card .server-tag { padding: 2px 6px; font-size: 10px; }
.game-card .server-link { min-height: 34px; font-size: 13px; }
.all-games-title { margin-top: 24px; }
.all-games-title .server-count { font-size: 12px; }
.template-portal .topbar { border-color: #3f5662; background: #111c24; }
.template-portal .brand-mark { border-color: #536e7a; background: #263640; }
.template-portal .ticker { border-color: #53616a; background: #1b2831; }
.template-portal .ticker-label { background: #8f4e32; }
.template-portal .ticker-track { color: #f1d69c; }
.template-portal .section-heading { border-color: #435762; }
.template-portal .server-grid { grid-template-columns: repeat(auto-fill, 270px); justify-content: center; gap: 22px; }
.template-portal .server-card:not(.game-card) { width: 270px; height: 390px; }
.template-portal .server-cover::after { background: var(--gold); }
.template-portal .server-link { border-color: #d07049; background: var(--red); }
.template-portal .server-link:hover { background: var(--red-hover); }

.template-classic .topbar { border-color: #57412a; background: #171514; }
.template-classic .brand-mark { border-color: #88622f; background: #28201a; }
.template-classic .portal-hero-media::after { background: rgba(10, 7, 5, .36); }
.template-classic .ticker { border-color: #57412a; background: #211a14; }
.template-classic .ticker-label { background: #76252a; }
.template-classic .section-heading { border-color: #493926; }

.template-tech .portal-hero-media::after { background: rgba(2, 13, 25, .32); }
.template-tech .ticker { border-color: #25506a; background: #0b1d2d; }
.template-tech .ticker-label { background: #126a8d; }

.template-royal .portal-hero-media::after { background: rgba(38, 6, 11, .28); }
.template-royal .ticker { border-color: #713733; background: #2a151a; }
.template-royal .ticker-label { background: #8f2935; }

@media (max-width: 1099px) and (min-width: 700px) {
  .feature-promo { flex-basis: calc((100% - 28px) / 2); }
}

@media (max-width: 760px) {
  .topbar { height: auto; }
  .topbar-inner { min-height: 112px; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 10px 0 8px; }
  .brand { grid-column: 1; grid-row: 1; }
  .topbar-tools { grid-column: 2; grid-row: 1; }
  .portal-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
  .portal-nav a { flex: 1; justify-content: center; padding: 0 8px; }
}

@media (max-width: 900px) {
  .portal-body-layout { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar-inner, .page-content { width: calc(100% - 24px); }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .brand strong { max-width: 128px; font-size: 16px; }
  .member-level { display: none; }
  .member-name { max-width: 92px; }
  .portal-nav { overflow-x: auto; justify-content: flex-start; }
  .portal-nav a { flex: 0 0 auto; }
  .directory-trigger { display: none; }
  .nav-search { display: none; }
  .button { padding: 0 13px; }
  .ticker { margin-top: 16px; }
  .ticker-label { width: 58px; flex-basis: 58px; }
  .portal-hero { width: calc(100% - 24px); height: 300px; min-height: 300px; margin-top: 12px; }
  .portal-hero-content { width: 100%; min-height: 300px; padding: 0; background: transparent; }
  .hero-slide { width: calc(100% - 64px); height: calc(100% - 72px); }
  .hero-slide.is-prev { transform: translate(calc(-50% - 48vw), -50%) scale(.72); }
  .hero-slide.is-next { transform: translate(calc(-50% + 48vw), -50%) scale(.72); }
  .portal-hero-media.is-duo .hero-slide, .portal-hero-media.is-duo .hero-slide.is-prev, .portal-hero-media.is-duo .hero-slide.is-next, .portal-hero-media.is-duo .hero-slide.is-active { width: 100%; height: 50%; transform: none; }
  .portal-hero-media.is-duo .hero-slide:first-child { top: 0; left: 0; box-shadow: none; }
  .portal-hero-media.is-duo .hero-slide:last-child { top: 50%; left: 0; box-shadow: inset 0 1px 0 var(--border); }
  .portal-hero-media.is-duo .hero-slide-actions { bottom: 16px; }
  .hero-carousel-arrow { width: 42px; height: 42px; font-size: 0; line-height: 0; }
  .hero-carousel-arrow-prev { left: 10px; }
  .hero-carousel-arrow-next { right: 10px; }
  .ticker { width: calc(100% - 24px); margin-top: 12px; }
  .portal-features { width: calc(100% - 24px); margin-bottom: 28px; }
  .feature-carousel-track { gap: 14px; }
  #announcement[hidden] + .portal-features { margin-top: 16px; }
  .portal-body-layout { width: 100%; }
  .game-grid { grid-template-columns: 1fr; }
  .feature-card { height: 220px; }
  .feature-login { height: 405px; }
  .feature-promo { flex-basis: 100%; }
  .page-content { margin-top: 28px; }
  .site-notice-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .site-notice-shell { min-height: 0; display: flex; flex-direction: column; }
  .site-notice-image { min-height: 150px; max-height: 36vh; }
  .site-notice-copy { padding: 28px 24px 30px; }
  .site-notice-copy h2 { font-size: 25px; }
  .site-notice-copy > div { font-size: 14px; line-height: 1.75; }
  .section-heading h1 { font-size: 24px; }
  .server-grid { grid-template-columns: minmax(0, 320px); }
  .server-card { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.template-tech .topbar { border-color: #1c4961; background: #081b2b; }
.template-tech .brand-mark { border-color: #27627d; background: #0f2b40; }
.template-tech .ticker { border-color: #25506a; background: #0b1d2d; }
.template-tech .ticker-label { background: #126a8d; }
.template-tech .ticker-track { color: #b8eaff; }
.template-tech .section-heading { border-color: #20445a; }
.template-tech .server-cover { background: #102f46; }
.template-tech .server-cover::after { background: #35c6ef; }
.template-tech .server-link { border-color: #1995c5; background: #147eae; }
.template-tech .server-link:hover { background: #1b9acb; }
.template-tech .server-tag { border-color: #2b5c75; color: #9bdcf4; }
.template-tech .auth-dialog { border-color: #2c607a; }
.template-tech .auth-dialog::backdrop { background: rgba(1, 12, 22, .78); }
.template-tech .auth-tab.active { border-color: #2f9bc4; background: #123d56; color: #a9eaff; }
.template-tech .auth-form input { border-color: #2a5b73; background: #071522; }
.template-tech .icon-button { background: #123148; }

.template-royal .topbar { border-color: #6e3430; background: #211015; }
.template-royal .brand-mark { border-color: #865037; background: #351920; }
.template-royal .ticker { border-color: #713733; background: #2a151a; }
.template-royal .ticker-label { background: #8f2935; }
.template-royal .ticker-track { color: #f6dca4; }
.template-royal .section-heading { border-color: #55282a; }
.template-royal .server-cover { background: #3c1b20; }
.template-royal .server-cover::after { background: #e0a735; }
.template-royal .server-link { border-color: #e3525f; background: #c53645; }
.template-royal .server-link:hover { background: #e3525f; }
.template-royal .server-tag { border-color: #70432e; color: #f0cb82; }
.template-royal .auth-dialog { border-color: #7a3b37; }
.template-royal .auth-dialog::backdrop { background: rgba(25, 5, 10, .8); }
.template-royal .auth-tab.active { border-color: #c68d38; background: #53301e; color: #ffdc8a; }
.template-royal .auth-form input { border-color: #713a38; background: #180d12; }
.template-royal .icon-button { background: #432027; }

/* Keep every storefront action distinguishable: 进入官网 keeps the theme primary colour,
   下载游戏 uses a fixed download green, 签到 a reward gold, 查看(全部)游戏 an informational
   blue and 退出 a slate secondary colour instead of another plain bordered button. */
.server-link.server-download-link { border-color: #3f9c72; background: #23704f; color: #fff; }
.server-link.server-download-link:hover { border-color: #4fbb8b; background: #2a8459; }
.feature-login-checkin { border-color: #b8862c; background: #8d6118; color: #fff; font-weight: 700; }
.feature-login-checkin:hover:not(:disabled) { border-color: #c0922f; background: #95691a; color: #fff; }
.feature-played-games-button { border-color: #2f7bad; background: #1f5f8b; color: #fff; font-weight: 700; }
.feature-played-games-button:hover:not(:disabled) { border-color: #3d94cc; background: #25709f; color: #fff; }
.feature-login-button.is-logout { border-color: #5b6673; background: #46536b; color: #f2f5f8; }
.feature-login-button.is-logout:hover { border-color: #71809a; background: #52617c; color: #fff; }

html[data-color-theme="light"] {
  --page: #f3f5f7;
  --surface: #ffffff;
  --surface-raised: #e9edf1;
  --border: #cbd3dc;
  --text: #17212b;
  --muted: #5c6875;
  --red: #a92e39;
  --red-hover: #c13a46;
  --gold: #946514;
  --green: #237b50;
  --focus: #a86f12;
  color-scheme: light;
}
html[data-color-theme="light"] body.template-classic,
html[data-color-theme="light"] body.template-tech,
html[data-color-theme="light"] body.template-royal,
html[data-color-theme="light"] body.template-portal {
  --page: #f3f5f7;
  --surface: #ffffff;
  --surface-raised: #e9edf1;
  --border: #cbd3dc;
  --text: #17212b;
  --muted: #5c6875;
  --red: #a92e39;
  --red-hover: #c13a46;
  --gold: #946514;
  --green: #237b50;
  --focus: #a86f12;
}
html[data-color-theme="light"] body.template-tech { --red: #096e9e; --red-hover: #0d83b8; --gold: #0877a4; --green: #237c62; }
html[data-color-theme="light"] body.template-royal { --red: #ad2e3b; --red-hover: #c9404d; --gold: #9a6816; --green: #2d8056; }
html[data-color-theme="light"] body.template-portal { --red: #a84b2b; --red-hover: #c05d36; --gold: #8d6118; --green: #257b5c; }
html[data-color-theme="light"] .topbar,
html[data-color-theme="light"] .template-classic .topbar,
html[data-color-theme="light"] .template-tech .topbar,
html[data-color-theme="light"] .template-royal .topbar,
html[data-color-theme="light"] .template-portal .topbar { border-color: #cbd3dc; background: rgba(255, 255, 255, .97); box-shadow: 0 6px 20px rgba(29, 41, 54, .1); }
html[data-color-theme="light"] .brand-mark,
html[data-color-theme="light"] .template-classic .brand-mark,
html[data-color-theme="light"] .template-tech .brand-mark,
html[data-color-theme="light"] .template-royal .brand-mark,
html[data-color-theme="light"] .template-portal .brand-mark { border-color: #bdc6d0; background: #eef1f4; }
html[data-color-theme="light"] .portal-nav a:hover,
html[data-color-theme="light"] .portal-nav a.is-active { background: #e8edf2; color: #111a22; }
html[data-color-theme="light"] .theme-toggle,
html[data-color-theme="light"] .button { border-color: #bcc6d0; background: #f6f8fa; color: #17212b; }
html[data-color-theme="light"] .theme-toggle:hover,
html[data-color-theme="light"] .button:hover { border-color: #8996a4; background: #e7ecf1; color: #111820; }
html[data-color-theme="light"] .button-primary,
html[data-color-theme="light"] .button-primary:hover { border-color: var(--red); background: var(--red); color: #fff; }
html[data-color-theme="light"] .button-quiet { background: transparent; }
html[data-color-theme="light"] .server-link.server-download-link { border-color: #1f6a49; background: #23704f; color: #fff; }
html[data-color-theme="light"] .server-link.server-download-link:hover { border-color: #2b8f5e; background: #2a8459; }
html[data-color-theme="light"] .feature-login-checkin { border-color: #6d4a0e; background: #8d6118; color: #fff; }
html[data-color-theme="light"] .feature-login-checkin:hover:not(:disabled) { border-color: #6d4a0e; background: #95691a; color: #fff; }
html[data-color-theme="light"] .feature-played-games-button { border-color: #17496b; background: #1f5f8b; color: #fff; }
html[data-color-theme="light"] .feature-played-games-button:hover:not(:disabled) { border-color: #2a6f9d; background: #25709f; color: #fff; }
html[data-color-theme="light"] .feature-login-button.is-logout { border-color: #46536b; background: #55637a; color: #fff; }
html[data-color-theme="light"] .feature-login-button.is-logout:hover { border-color: #47546c; background: #5f6f8b; color: #fff; }
html[data-color-theme="light"] .member-level { border-color: #c28b32; color: #7a5010; }
html[data-color-theme="light"] .ticker,
html[data-color-theme="light"] .template-classic .ticker,
html[data-color-theme="light"] .template-tech .ticker,
html[data-color-theme="light"] .template-royal .ticker,
html[data-color-theme="light"] .template-portal .ticker { border-color: #c8d0d8; background: #fff; }
html[data-color-theme="light"] .ticker-track,
html[data-color-theme="light"] .template-tech .ticker-track,
html[data-color-theme="light"] .template-royal .ticker-track,
html[data-color-theme="light"] .template-portal .ticker-track { color: #55452c; }
html[data-color-theme="light"] .ticker-label { background: var(--red); color: #fff; }
html[data-color-theme="light"] .section-heading,
html[data-color-theme="light"] .template-classic .section-heading,
html[data-color-theme="light"] .template-tech .section-heading,
html[data-color-theme="light"] .template-royal .section-heading,
html[data-color-theme="light"] .template-portal .section-heading { border-color: #ccd3da; }
html[data-color-theme="light"] .portal-hero-media::after { background: rgba(255, 255, 255, .3); }
html[data-color-theme="light"] body.template-portal .portal-hero-media::after { background: transparent; }
html[data-color-theme="light"] .portal-hero-content { background: transparent; border: 0; }
html[data-color-theme="light"] .server-card { background: #fff; box-shadow: 0 12px 30px rgba(36, 49, 61, .12); }
html[data-color-theme="light"] .server-cover { background: #e4e8ec; }
html[data-color-theme="light"] .server-subtitle { color: #785817; }
html[data-color-theme="light"] .server-status { color: #236f4a; }
html[data-color-theme="light"] .server-tag { border-color: #c9ae77; color: #6e521a; background: #fffaf0; }
html[data-color-theme="light"] .empty-state { border-color: #adb8c3; }
html[data-color-theme="light"] .site-footer { border-color: #cbd3dc; color: #5d6873; }
html[data-color-theme="light"] .auth-dialog { border-color: #b9c3cd; background: #fff; box-shadow: 0 30px 80px rgba(20, 30, 40, .28); }
html[data-color-theme="light"] .auth-dialog-wechat { border-color: transparent; background: transparent; box-shadow: 0 30px 80px rgba(20, 30, 40, .38); }
html[data-color-theme="light"] .site-notice-dialog { border-color: #bd6d43; background: #fffaf5; color: #3b2221; box-shadow: 0 30px 90px rgba(20, 30, 40, .28); }
html[data-color-theme="light"] .site-notice-copy { background: linear-gradient(135deg, #fff1df, #fffaf5 72%); }
html[data-color-theme="light"] .site-notice-copy h2 { color: #8b3c24; }
html[data-color-theme="light"] .site-notice-copy > div { color: #4d342c; }
html[data-color-theme="light"] .site-notice-eyebrow { color: #9a5d19; }
html[data-color-theme="light"] .site-notice-close { border-color: rgba(139, 60, 36, .34); background: rgba(255, 255, 255, .7); color: #8b3c24; }
html[data-color-theme="light"] .site-notice-close:hover { border-color: #8b3c24; background: #fff; color: #6f2d1c; }
html[data-color-theme="light"] .dialog-header { border-color: #cbd3dc; }
html[data-color-theme="light"] .icon-button { border-color: #bcc6d0; background: #eef2f5; color: #303b46; }
html[data-color-theme="light"] .icon-button:hover { border-color: var(--red); background: #f7e4e6; color: #81232c; }
html[data-color-theme="light"] .auth-tab { border-color: #c6cfd8; background: #edf1f4; color: #4d5965; }
html[data-color-theme="light"] .auth-tab.active { border-color: #ad7c28; background: #fff3d9; color: #6f4b0f; }
html[data-color-theme="light"] .auth-form label { color: #36424e; }
html[data-color-theme="light"] .auth-form input { border-color: #aeb9c4; background: #fff; color: #17212b; }
html[data-color-theme="light"] .auth-form input::placeholder { color: #697582; }
html[data-color-theme="light"] .toast { border-color: #9faab5; background: #fff; color: #17212b; }
html[data-color-theme="light"] .toast.error { border-color: #b73340; background: #fff0f1; color: #7b1f28; }
