/* Fantasy/anime surface layer. Load after theme.css, player-admin.css and
   lobby-refresh.css. Original secret-card art, card copy and saved cosmetics
   stay under their own component styles. No additional fonts or animation. */
body.wt-refresh {
  color-scheme: dark;
  --wt-ink: #f7f0df;
  --wt-muted: #b8c6cd;
  --wt-accent: #e7bd72;
  --wt-surface: rgba(13, 25, 37, .93);
  --wt-bg: #07131f;
  --wt-line: rgba(207, 185, 140, .25);
  --wt-gold: #e7bd72;
  --wt-emerald: #82dfb8;
  --wt-amethyst: #c7a6f5;
  --wt-raised: rgba(24, 41, 53, .92);
  --wt-deep: rgba(7, 16, 27, .96);
  --bg: var(--wt-bg);
  --bg-2: #102232;
  --panel: var(--wt-surface);
  --panel-strong: var(--wt-raised);
  --panel-deep: var(--wt-deep);
  --paper: var(--wt-ink);
  --text: var(--wt-ink);
  --muted: var(--wt-muted);
  --line: var(--wt-line);
  --line-strong: rgba(231, 189, 114, .48);
  --teal: var(--wt-emerald);
  --coral: #ffae9d;
  --gold: var(--wt-gold);
  --amber: var(--wt-gold);
  --lime: #bce397;
  --ink: #0b1b27;
  --danger: #ffacb8;
  --shadow: 0 16px 48px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 238, 196, .04);
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--wt-ink) !important; /* theme.css sets the body colour important. */
  background: linear-gradient(180deg, rgba(5, 13, 22, .12), rgba(5, 13, 22, .43)),
    url('/assets/refresh/generated/cartoon-world-v3.webp') center top / cover fixed no-repeat,
    var(--wt-bg) !important; /* Replaces the light body background in theme.css. */
}

/* Text stays quiet against the world artwork; gold and jade indicate actions. */
body.wt-refresh a:not(.secret-card *, .premium-card-preview *) { color: var(--wt-emerald); }
body.wt-refresh a:hover:not(.secret-card *, .premium-card-preview *) { color: #a6f0ce; }
body.wt-refresh :focus-visible { outline-color: #f3d28e; }
body.wt-refresh h1:not(.secret-card *, .premium-card-preview *),
body.wt-refresh h2:not(.secret-card *, .premium-card-preview *) { color: var(--wt-ink); font-family: Georgia, 'Times New Roman', serif; letter-spacing: -.02em; text-shadow: 0 3px 20px rgba(0, 0, 0, .2); }
body.wt-refresh h3:not(.secret-card *, .premium-card-preview *) { color: var(--wt-ink); }
body.wt-refresh :is(.muted, .sub, .lead, .hero-sub, .rules-tagline, .wt-hero-meta, .wt-config-back):not(.secret-card *, .premium-card-preview *) { color: var(--wt-muted); }
body.wt-refresh :is(.wt-eyebrow, .kicker, .panel-eyebrow):not(.secret-card *, .premium-card-preview *) { color: var(--wt-gold); }
body.wt-refresh :is(.topbar, .top, .wt-nav) { border-color: var(--wt-line); }
body.wt-refresh :is(.brand, .brand-word, .wt-logo) { color: var(--wt-ink); }
body.wt-refresh .brand-word { -webkit-text-fill-color: currentColor; }
body.wt-refresh .wt-logo span { color: var(--wt-gold); }
body.wt-refresh .brand-mark { background: #101e2b; border: 1px solid var(--wt-line); box-shadow: 0 0 20px rgba(231, 189, 114, .08); }
body.wt-refresh .wt-nav nav a { color: var(--wt-muted); }
body.wt-refresh .wt-nav nav a[aria-current] { color: var(--wt-gold); }
body.wt-refresh .wt-nav nav .wt-nav-account { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); }

/* Shared surfaces: the artwork remains visible around panels, never through
   a low-opacity field or long body text. Nested surfaces do not add blur. */
body.wt-refresh :is(.panel, .card, .settings-card, .box, .profile-panel, .rank-card,
  .premium-card, .section-card, .player-tile, .empty, .row, .stat-card, .stats-card,
  .lobby-card, .section, .showcase-card, .unlock-item, .rank-panel):not(.secret-card, .secret-card *, .premium-card-preview, .premium-card-preview *) {
  color: var(--wt-ink);
  background: var(--wt-surface);
  border-color: var(--wt-line);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}
body.wt-refresh .panel-head { background: rgba(23, 39, 49, .9); border-color: var(--wt-line); }
body.wt-refresh .panel-title { color: var(--wt-ink); }
body.wt-refresh .panel-title svg { color: var(--wt-gold); }
body.wt-refresh :is(.stat-card b, .stats-card b, .stats-grid b) { color: var(--wt-ink); }
body.wt-refresh :is(.stat-card small, .stats-card small) { color: var(--wt-muted); }
body.wt-account .ach-empty-state p { color: var(--wt-muted); }
body.wt-refresh :is(.btn, .button, button.action, .btn-link):not(.secret-card *) {
  color: var(--wt-ink);
  background: var(--wt-raised);
  border-color: rgba(214, 198, 162, .32);
  box-shadow: inset 0 1px 0 rgba(255, 242, 211, .05);
  backdrop-filter: none;
}
body.wt-refresh :is(.btn:hover, .button:hover, button.action:hover, .btn-link:hover):not(.secret-card *) {
  color: #fff7e7; background: #253d4b; border-color: rgba(231, 189, 114, .6);
}
body.wt-refresh :is(.btn.teal, .btn.primary, .btn-main, .button-primary, .btn.premium, .btn.btn-gold, .btn.btn-register-cta):not(.secret-card *, .premium-card-preview *) {
  color: #0d211e;
  background: linear-gradient(135deg, #f2d393, #e4ba70);
  border-color: #edca89;
  box-shadow: 0 5px 20px rgba(231, 189, 114, .12), inset 0 1px 0 rgba(255, 248, 226, .38);
}
body.wt-refresh :is(.btn.teal:hover, .btn.primary:hover, .btn-main:hover, .btn.premium:hover, .btn.btn-gold:hover, .btn.btn-register-cta:hover):not(.secret-card *, .premium-card-preview *) {
  color: #0d211e; background: #f4dca2; border-color: #f5dda8;
}
body.wt-refresh :is(.btn.secondary, .btn.ghost, .mobile-menu-toggle, .rules-close-x) {
  color: var(--wt-ink); background: var(--wt-raised); border-color: var(--wt-line);
}
body.wt-refresh :is(.btn.danger, button.danger) { color: #ffc1ca; background: #432632; border-color: #885064; }
body.wt-refresh :is(.btn.danger:hover, button.danger:hover) { background: #593140; border-color: #b56b80; }
body.wt-refresh input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]),
body.wt-refresh textarea,
body.wt-refresh select { color: #f5eedf; background: var(--wt-deep); border-color: rgba(176, 198, 207, .4); box-shadow: inset 0 1px 5px rgba(0, 0, 0, .12); }
body.wt-refresh :is(input, textarea)::placeholder { color: #9faebc; }
body.wt-refresh :is(input, textarea, select):focus { border-color: var(--wt-gold); }
body.wt-refresh :is(input[type=checkbox], input[type=radio], input[type=range]) { accent-color: var(--wt-emerald); }
body.wt-refresh select option { color: var(--wt-ink); background: #102231; }
body.wt-refresh input:-webkit-autofill { -webkit-text-fill-color: var(--wt-ink); box-shadow: 0 0 0 1000px #102231 inset; caret-color: var(--wt-ink); }
body.wt-refresh :is(.field label, .field > span, .wt-password-field > label) { color: var(--wt-ink); }
body.wt-refresh :is(.field small, .toggle small) { color: var(--wt-muted); }
body.wt-refresh :is(.segment, .stepper) { background: var(--wt-deep); border-color: var(--wt-line); }
body.wt-refresh .segment button { color: var(--wt-muted); background: transparent; }
body.wt-refresh .segment button.active { color: #0d211e; background: var(--wt-emerald); box-shadow: none; }
body.wt-refresh .stepper button { color: var(--wt-emerald) !important; background: #18313a !important; /* Existing stepper rule is important. */ }
body.wt-refresh #onlineMode .segment { background: var(--wt-deep); border-color: var(--wt-line); }
body.wt-refresh #onlineMode .segment button { color: var(--wt-muted); background: transparent; }
body.wt-refresh #onlineMode .segment button.active { color: #102822; background: var(--wt-emerald); border-color: var(--wt-emerald); }
body.wt-refresh :is(.game-settings-top, .game-settings-bottom, .toggle, .secret-mode-picker,
  .secret-roles-panel, .collapsible-panel, .category-option, .secret-role-setting) { background: rgba(10, 23, 35, .82); color: var(--wt-ink); border-color: var(--wt-line); }
body.wt-refresh .switch { background: #3e5361; border-color: #718796; }
body.wt-refresh input:checked + .switch { background: #278f6f; }
body.wt-refresh .secret-mode-option { color: var(--wt-ink); background: var(--wt-raised); border-color: var(--wt-line); }
body.wt-refresh .secret-mode-option.active { color: #b2f2d3; background: #173a36; border-color: #65b896; }
body.wt-refresh .secret-mode-option.special.active { color: #e2ccff; background: #312a48; border-color: #a487cb; }
body.wt-refresh .secret-role-icon { color: var(--wt-emerald); background: #173c3a; }
body.wt-refresh .secret-role-icon.spy { color: var(--wt-amethyst); background: #352b49; }
body.wt-refresh :is(.status-pill, .chip, .pill) { color: var(--wt-muted); background: var(--wt-raised); border-color: var(--wt-line); }
body.wt-refresh .chip.active { color: var(--wt-gold); background: #3a3024; border-color: #b59157; }
body.wt-refresh .dot { background: var(--wt-emerald); box-shadow: 0 0 0 3px rgba(130, 223, 184, .12); }
body.wt-refresh .notification-badge { color: #102822; background: var(--wt-emerald); }

/* Landing, guides and dialogs. Layout and original game cards are unchanged. */
body.wt-refresh .hero h1 { color: var(--wt-ink); letter-spacing: -.035em; }
body.wt-refresh .hero-accent { color: var(--wt-emerald); }
body.wt-refresh .hero .lead { color: #c3cfd2; }
body:is(.wt-game, .wt-premium) .hero-copy {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(213, 195, 153, .19);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(8, 21, 32, .82), rgba(9, 24, 35, .7));
  box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
}
body.wt-game .hero-copy h1 { line-height: 1.06; }
body.wt-refresh .hero-art { border: 1px solid var(--wt-line); box-shadow: 0 22px 65px rgba(0, 0, 0, .3); }
body.wt-refresh .mode-card { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); box-shadow: var(--shadow); }
body.wt-refresh :is(.mode-card:hover, .mode-card.active) { border-color: var(--wt-gold); box-shadow: 0 12px 35px rgba(0, 0, 0, .28), 0 0 0 1px rgba(231, 189, 114, .2); }
body.wt-refresh .mode-card-img { background: linear-gradient(135deg, #152c39, #101f2c); object-fit: contain; padding: 2px 12px; }
body.wt-refresh .mode-card-pill { color: var(--wt-gold); background: #162734; border-color: rgba(231, 189, 114, .4); }
body.wt-refresh .mode-card-body b { color: var(--wt-ink); }
body.wt-refresh .mode-card-desc { color: var(--wt-muted); }
body.wt-refresh .mode-card-tag { color: var(--wt-emerald); }
body.wt-refresh .wt-icon { display: inline-block; flex-shrink: 0; vertical-align: -0.15em; color: inherit; }
body.wt-refresh .wt-nav nav a { display: inline-flex; align-items: center; gap: 7px; }
body.wt-refresh :is(.btn,.btn-link,button) > .wt-icon { flex-shrink: 0; }
body.wt-admin .wt-payment-ops { padding: 18px; margin-bottom: 28px; border: 1px solid var(--wt-line); border-radius: 16px; background: #102b35; }
body.wt-admin .wt-readiness-list { padding: 0; margin: 16px 0; list-style: none; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 24px; }
body.wt-admin .wt-readiness-list li { display: flex; gap: 8px; align-items: start; font-size: 13px; }
body.wt-admin .wt-readiness-list strong { margin-left: auto; white-space: nowrap; color: var(--wt-gold); }
body.wt-admin .wt-table-scroll { overflow-x: auto; }
@media(max-width:720px) { body.wt-admin .wt-readiness-list { grid-template-columns: 1fr; } }
body.wt-refresh .wt-new-feature { background: linear-gradient(130deg, rgba(19, 54, 54, .94), rgba(36, 28, 56, .93)); border-color: rgba(164, 189, 176, .28); }
body.wt-refresh .wt-new-feature h2 { color: var(--wt-ink); }
body.wt-refresh .wt-new-feature p { color: var(--wt-muted); }
body.wt-refresh .wt-feature-point { color: var(--wt-muted); background: rgba(6, 17, 29, .64); }
body.wt-refresh .wt-feature-point b { color: var(--wt-emerald); }
body.wt-refresh .modal-backdrop { background: rgba(3, 8, 17, .78); }
body.wt-refresh :is(.modal-card, .avatar-dialog-box, .camera-modal-box) { color: var(--wt-ink); background: #101f2e; border-color: rgba(231, 189, 114, .42); box-shadow: 0 25px 90px rgba(0, 0, 0, .55); }
body.wt-refresh .rules-header h2 { color: var(--wt-ink); }
body.wt-refresh .rules-mode-tab { color: var(--wt-muted); background: #172c3c; border-color: var(--wt-line); }
body.wt-refresh .rules-mode-tab.active { color: var(--wt-emerald); background: #163d36; border-color: #65b896; }
body.wt-refresh .rules-mode-tab.special.active { color: var(--wt-gold); background: #403223; border-color: #be995b; }
body.wt-refresh :is(.rules-role-card, .rules-secret-intro, .rules-secret-flow > div, .rules-quick-item) { color: var(--wt-ink); background: #152a39; border-color: var(--wt-line); }
body.wt-refresh :is(.rules-role-card p, .rules-secret-intro p, .rules-secret-meta) { color: var(--wt-muted); }
body.wt-refresh .rules-role-tag { color: var(--wt-gold); background: #3b3225; border-color: #76613e; }
body.wt-refresh :is(.wt-guide-step, .wt-guide-modes article, .wt-guide-table-scroll) { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); }
body.wt-refresh :is(.wt-guide-intro, .wt-guide-step p, .wt-guide-modes p, .wt-guide details p, .wt-guide-role-table th) { color: var(--wt-muted); }
body.wt-refresh :is(.wt-guide details, .wt-guide-role-table th, .wt-guide-role-table td) { border-color: var(--wt-line); }
body.wt-refresh .wt-guide-number { color: #0d211e; background: var(--wt-gold); }
body.wt-refresh .wt-guide-modes a { color: var(--wt-emerald); }
body.wt-refresh .wt-guide-callout { color: var(--wt-ink); background: #16382f; border: 1px solid rgba(130, 223, 184, .32); }
body.wt-refresh .wt-guide-callout p { color: #c6e0d5; }
body.wt-refresh .wt-guide-graphic { background: #122331; border: 1px solid var(--wt-line); }
body.wt-refresh .site-footer { color: var(--wt-muted); border-color: var(--wt-line); }
body.wt-refresh footer a { color: #bedecf !important; /* theme.css has an important footer link colour. */ }
body.wt-refresh #quickCameraBtn { color: #b6f2d6 !important; background: #174438 !important; border-color: #468970 !important; }

/* Account editor: replace every fixed light surface in player-admin.css. */
body.wt-account .wt-quicknav :is(a, button) { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); }
body.wt-account .wt-quicknav :is(a, button):hover { color: var(--wt-gold); background: #253548; border-color: var(--wt-gold); }
body.wt-account :is(.section-toggle, .wt-profile-editor-preview, .wt-achievement-picker label,
  .prem-setting-row, .premium-choice-panel, .character-option, .avatar-upload-label,
  .avatar-camera-btn, .wt-upload-preview) { color: var(--wt-ink); background: #142a38; border-color: var(--wt-line); }
body.wt-account .wt-achievement-picker label:has(input:checked) { color: #c4f4df; background: #1b433b; box-shadow: inset 0 0 0 1px #629d84; }
body.wt-account .prem-setting-row.open { background: #263543; border-color: var(--wt-gold); }
body.wt-account .premium-choice-panel :is(.premium-ring-choice, .premium-glow-choice, .premium-color-choice, .premium-badge-choice) { color: var(--wt-ink); background: #0d202e; border-color: var(--wt-line); }
body.wt-account .prem-save-footer { color: var(--wt-ink); background: #152a39; border-color: rgba(231, 189, 114, .5); box-shadow: 0 10px 35px rgba(0, 0, 0, .4); }
body.wt-account .prem-save-status.ok { color: #9ae9bd; }
body.wt-account .prem-save-status.err { color: #ffb5c0; }
body.wt-account .avatar-dialog-box { color: var(--wt-ink); background: #102331; border-color: var(--wt-line); }
body.wt-account .character-option.active { border-color: var(--wt-gold); box-shadow: 0 0 0 2px rgba(231, 189, 114, .25); }
body.wt-account .character-option.locked { opacity: .65; }
body.wt-account .wt-style-preview { background: linear-gradient(120deg, #152e3b, #242541); border-color: rgba(199, 166, 245, .36); }
body.wt-account :is(.account-hero-panel, .account-benefit, .friend-card, .history-item, .premium-status-card) { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); }
body.wt-account .hero-benefits-toggle { color: #10241e; background: linear-gradient(130deg, #f3d695, #9ee4c1); border-color: #cbddb0; }
body.wt-account #wtykaCookieBanner { color: #d2dfdc; background: #0d2230; border-color: var(--wt-line); }
body.wt-account #wtykaCookieBanner a { color: #a5e9c9; }

/* Public profiles and collected rewards keep their rarity and cosmetic colours. */
body:is(.wt-public-profile, .wt-profile) .hero,
body.wt-collection .hero { color: var(--wt-ink); background: linear-gradient(125deg, rgba(18, 50, 51, .95), rgba(31, 25, 50, .95)); border-color: var(--wt-line); }
body:is(.wt-public-profile, .wt-profile) :is(.card, .showcase-card, .unlock-item, .badge, .role-pill, .rank-panel) { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); }
body:is(.wt-public-profile, .wt-profile) :is(.card b, .showcase-card b, .unlock-item b, .badge b, .rating-number) { color: var(--wt-ink); }
body:is(.wt-public-profile, .wt-profile) :is(.card span, .showcase-card small, .role-pill span) { color: var(--wt-muted); }
body:is(.wt-public-profile, .wt-profile) .xp-bar { background: #304453; }
body:is(.wt-public-profile, .wt-profile) .xp-bar > span { background: linear-gradient(90deg, #64bb9d, #d8ca82); }
body:is(.wt-public-profile, .wt-profile) :is(.xp-level, .rating-change) { color: var(--wt-emerald); background: #1b4038; border-color: #477f68; }
body:is(.wt-public-profile, .wt-profile) .rating-change.negative { color: #ffbbc5; background: #432633; border-color: #885064; }
body:is(.wt-public-profile, .wt-profile) .showcase-card img { background: #102433; }
body.wt-collection .wt-collection-search input { color: var(--wt-ink); background: var(--wt-deep); border-color: var(--wt-line); }
body.wt-collection .item { color: var(--wt-ink); background: linear-gradient(145deg, var(--rarity-bg), #0d2030 85%); border-color: var(--wt-line); }
body.wt-collection .item h3 { color: var(--wt-ink); }
body.wt-collection .item img { background: #142938; border-color: var(--wt-line); }
body.wt-collection .meta span { color: var(--wt-muted); background: #102331; border-color: var(--wt-line); }
body.wt-collection .item .wt-owned { color: #b6f0d2; background: #174338; border-color: #44856c; }
body.wt-account .premium-name,
body:is(.wt-public-profile, .wt-profile) .premium-name,
body.wt-online .premium-name,
body.wt-ranking .premium-name { color: #ffe0a0; }

/* Premium offer: gold for purchase, emerald for access and amethyst for style. */
body.wt-premium .hero h1 em { color: var(--wt-gold); }
body.wt-premium .hero { backdrop-filter: none; }
body.wt-premium .hero-badge { color: var(--wt-gold); background: #3b3225; border-color: #917441; }
body.wt-premium .hero-visual { background: radial-gradient(circle, rgba(181, 145, 94, .18), transparent 68%); }
body.wt-premium :is(.cta-block, .section, .wt-compare-grid article) { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); box-shadow: var(--shadow); }
body.wt-premium .wt-compare-grid article:last-child { background: linear-gradient(145deg, #252744, #152f38); border-color: rgba(199, 166, 245, .44); }
body.wt-premium .wt-compare-grid h3 { color: var(--wt-ink); }
body.wt-premium .wt-compare-grid li::before { color: var(--wt-emerald); }
body.wt-premium .package-card { background: #142938; border-color: var(--wt-line); }
body.wt-premium .package-price { color: var(--wt-gold); }
body.wt-premium .premium-check-row { color: var(--wt-muted); background: #0d202e; border-color: var(--wt-line); }
body.wt-premium .premium-check-row input { accent-color: var(--wt-gold); }
body.wt-premium .payment-disabled { color: #f6d48e; background: #403524; border-color: #8b754a; }
body.wt-premium .status-active { color: #b6f0d2; background: #183f35; border-color: #4f8e75; }
body.wt-premium .sec-icon { color: var(--wt-gold); background: #3b3225; border-color: #76613e; }
body.wt-premium .perks-grid .perk-item { color: var(--wt-ink); background: #142a38; border-color: var(--wt-line); }
body.wt-premium :is(.ve-card, .badge-btn, .vote-effect-btn, .card-effect-btn, .reaction-btn) { color: var(--wt-ink); background: #142a38; border-color: var(--wt-line); }
body.wt-premium :is(.ve-preview-btn, .section-demo-btn) { color: var(--wt-emerald); background: #193b38; border-color: #4b8571; }
body.wt-premium-status .panel { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); }

/* Moderation: dense information has solid surfaces and distinct status colours. */
body.wt-admin .admin-dashboard-hero { background: linear-gradient(135deg, #22382f, #292c44); border-color: rgba(231, 189, 114, .38); }
body.wt-admin .admin-dashboard-kicker { color: var(--wt-gold); background: #152532; border-color: #806946; }
body.wt-admin :is(.admin-dashboard-card, .stage11-live-card, .stage11-admin-chart, .wt-admin-tools) { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); }
body.wt-admin .admin-dashboard-card:first-child b { font-size: 32px; white-space: nowrap; }
body.wt-admin :is(.admin-card, .moderation-card, .room-card, .stage9-card, .detail-card, .stat-card, .stats-card, .content-card, .mini-row) { color: var(--wt-ink); background: #142938; border-color: var(--wt-line); }
body.wt-admin .admin-nav .btn-link { color: var(--wt-ink); background: #142938; border-color: var(--wt-line); }
body.wt-admin .admin-nav .btn-link.active { color: #0c231c; background: var(--wt-emerald); border-color: var(--wt-emerald); }
body.wt-admin .admin-nav form button { color: #ffc1ca; background: #432632; border-color: #885064; }
body.wt-admin :is(table, .admin-table, .stage9-table) { color: var(--wt-ink); background: #0e2331; border-color: var(--wt-line); }
body.wt-admin :is(table, .admin-table, .stage9-table) th { color: #c6d3d6; background: #1d3443; border-color: var(--wt-line); }
body.wt-admin :is(table, .admin-table, .stage9-table) td { border-color: rgba(174, 194, 204, .17); }
body.wt-admin :is(table, .admin-table, .stage9-table) tbody tr:hover { background: #1c3545; }
body.wt-admin :is(.status-badge, .online-pill.is-online) { color: #b6f0d2; background: #174338; border-color: #44856c; }
body.wt-admin :is(.status-deleted, .status-blocked) { color: #ffc1ca; background: #432632; border-color: #885064; }
body.wt-admin .status-inactive { color: #f6d48e; background: #403524; border-color: #8b754a; }
body.wt-admin :is(.badge, .online-pill) { color: var(--wt-muted); background: #1c3141; border-color: var(--wt-line); }
body.wt-admin .stage11-bar-track { background: #294351; }
body.wt-admin .stage11-bar-track i { background: linear-gradient(90deg, #68bca3, #d0c67e); }

/* Lobby and rankings: undo light overrides without resetting player cosmetics. */
body.wt-online :is(.page-title h1, .section-head h2, .lobby-card h2, .lobby-card h3, .online-friends-panel-head b, .member-name, .member-role) { color: var(--wt-ink); }
body.wt-online .online-status-bar { background: #172e3e; border-color: var(--wt-line); }
body.wt-online .online-status-bar > span { color: #c6d5d7 !important; /* lobby-refresh.css sets this important. */ }
body.wt-online :is(.online-status-friends, .online-friends-panel) { color: var(--wt-emerald); background: #15392f; border-color: #4b8571; }
body.wt-refresh.wt-online :is(.lobby-card, .online-friends-panel) { color: var(--wt-ink); background: var(--wt-surface); border-color: var(--wt-line); }
body.wt-online :is(button, .create-lobby-panel, .create-lobby-toggle) { color: var(--wt-ink); background: #172e3e; border-color: var(--wt-line); }
body.wt-online .create-lobby-toggle { background: linear-gradient(135deg, #1e3c38, #292c44); border-color: rgba(130, 223, 184, .35); }
body.wt-online .create-lobby-toggle :is(.toggle-icon, .toggle-state) { color: #11291e; background: var(--wt-emerald); }
body.wt-online .create-lobby-toggle small { color: var(--wt-muted); }
body.wt-online :is(.section-count-badge, .lobby-type-tag.public, .lobby-type-tag.custom, .lobby-player-count) { color: var(--wt-emerald); background: #163931; border-color: #4b8571; }
body.wt-online .lobby-player-count.almost { color: #f6d48e; background: #403524; border-color: #8b754a; }
body.wt-online .lobby-player-count.full { color: #ffc1ca; background: #432632; border-color: #885064; }
body.wt-online .lobby-player-count :is(strong, span, em) { color: inherit; }
body.wt-online :is(.lobby-card > .muted, .lobby-empty, .lobby-card .members, .member, .lobby-card .settings-panel, .lobby-settings) { color: var(--wt-muted); background: #102332; border-color: var(--wt-line); }
body.wt-online .lobby-card-large .member,
body.wt-online .lobby-card-large .members { background: #102332; border-color: var(--wt-line); }
body.wt-online .lobby-card .actions button:not(.secondary),
body.wt-online .create-lobby-panel button[type=submit],
body.wt-online .global-chat-form button[type=submit] { color: #10241e; background: var(--wt-gold); border-color: #edca89; }
body.wt-online :is(.global-chat-panel, .lobby-chat) { color: var(--wt-ink); background: #0d2130; border-color: rgba(130, 223, 184, .25); }
body.wt-online :is(.global-chat-messages, .global-chat-note) { background: #142c3a; border-color: var(--wt-line); }
body.wt-online :is(.global-chat-subtitle, .global-chat-note, .gchat-time) { color: var(--wt-muted); }
body.wt-ranking :is(.rating, .rating-number, .rank-score, .score, .my-rank-title, .rself-score) { color: var(--wt-ink); }
body.wt-ranking :is(.rank-table, .table-wrap, .my-rank-panel, .my-rank-slot, .ranking-self-card) { background: var(--wt-surface); border-color: var(--wt-line); }
body.wt-ranking :is(th, .rank-head) { color: var(--wt-muted); background: #172e3e; border-color: var(--wt-line); }
body.wt-ranking td { border-color: var(--wt-line); }
body.wt-ranking :is(.rank-row:hover, tbody tr:hover) { background: #1b3342; }
body.wt-ranking :is(.mode-tabs .active, .pagination .active, .btn.active) { color: #102822; background: var(--wt-emerald); border-color: var(--wt-emerald); }

@media (min-width: 980px) {
  body.wt-admin .admin-nav { background: rgba(9, 23, 35, .96); border: 1px solid var(--wt-line); }
}
@media (max-width: 760px) {
  body.wt-refresh { background-attachment: scroll !important; background-size: 100% 100%, auto 100dvh !important; background-position: center top !important; }
  body.wt-refresh :is(.top-actions, .topbar-actions, .topbar-links) { background: #102534; border-color: var(--wt-line); box-shadow: 0 16px 45px rgba(0, 0, 0, .4); }
  body.wt-refresh .hero h1 { letter-spacing: -.025em; text-shadow: 0 3px 20px rgba(0, 0, 0, .45); }
  body:is(.wt-game, .wt-premium) .hero-copy { padding: 20px 18px; border-radius: 18px; }
  body.wt-refresh :is(.mobile-menu-toggle, .hero-benefits-toggle) { border-color: rgba(231, 189, 114, .42); }
  body.wt-account .prem-save-footer { bottom: 8px; }
}
@media (max-width: 640px) {
  body.wt-refresh .mode-card-img { object-fit: contain; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  body.wt-refresh :is(.btn, .mode-card, .character-option) { transition: none; }
}

/* Connection feedback is visible even when notifications are collapsed. */
body.wt-refresh [data-social-connection] { display: inline-flex; align-items: center; gap: .4em; color: var(--wt-muted); font-size: .85rem; }
body.wt-refresh [data-social-connection]::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* Guild identity: a clear crest and a warm, legible wordmark. */
body.wt-refresh :is(.brand,.wt-logo) { flex-shrink:0; gap:10px; text-decoration:none; }
body.wt-refresh .brand-word,
body.wt-refresh .wt-logo { font-family:Georgia,'Times New Roman',serif; font-size:clamp(23px,2.4vw,30px); font-weight:900; letter-spacing:-.035em; color:#ffe2a0; -webkit-text-fill-color:#ffe2a0; text-shadow:0 2px 0 #654223,0 4px 18px #020913; }
body.wt-refresh .brand-mark { width:48px; height:54px; border:0; border-radius:0; background:none; box-shadow:none; overflow:visible; }
body.wt-refresh .brand-mark img,
body.wt-refresh .wt-logo img { display:block; width:48px; height:54px; object-fit:contain; border-radius:0; filter:drop-shadow(0 3px 9px #0008); }
body.wt-refresh .wt-logo span { color:#8ae6d1; -webkit-text-fill-color:#8ae6d1; }
body.wt-refresh :is(.top-actions,.topbar-actions) .btn { border-color:#637c83; background:linear-gradient(150deg,#214454,#142d3e); color:#f7efdb; box-shadow:inset 0 1px 0 #c4d7d414,0 3px 8px #020a1333; }
body.wt-refresh :is(.top-actions,.topbar-actions) .btn:hover { border-color:#dcc18a; background:#2b4c59; }
body.wt-refresh :is(.top-actions,.topbar-actions) .btn.premium { color:#30200f; border-color:#f4d88f; background:linear-gradient(120deg,#ffdfa0,#dca952); box-shadow:inset 0 1px 0 #fff2bf,0 4px 18px #d79e3522; }
body.wt-refresh :is(.top-actions,.topbar-actions) .btn.teal { background:#24554f; border-color:#7abdab; color:#e5fff1; }
@media(max-width:800px) {
  body.wt-refresh :is(.topbar,.top) { display:grid !important; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px 8px; flex-wrap:wrap; padding:12px 0; min-height:76px; }
  body.wt-refresh :is(.topbar,.top) > :is(.brand,.brand-block,.page-title) { grid-column:1; grid-row:1; min-width:0; }
  body.wt-refresh .brand { width:fit-content; max-width:100%; gap:8px; }
  body.wt-refresh .brand-word { font-size:clamp(21px,6.1vw,28px); white-space:nowrap; }
  body.wt-refresh .brand-mark,
  body.wt-refresh .brand-mark img { width:40px; height:46px; }
  body.wt-refresh :is(.topbar,.top) > .mobile-menu-toggle { display:inline-flex; grid-column:2; grid-row:1; align-self:start; position:static; width:auto; min-width:76px; min-height:44px; margin:0; padding:9px 12px; border:1px solid #b89c61; border-radius:12px; background:linear-gradient(145deg,#294752,#122b3c); color:#ffe5ad; font-size:13px; box-shadow:inset 0 1px 0 #fbe3a622; }
  body.wt-refresh .mobile-menu-toggle[aria-expanded="true"] { background:#e3bd73; color:#18272c; border-color:#ffe3a0; }
  body.wt-refresh :is(.topbar,.top) > :is(.top-actions,.topbar-actions,.topbar-links) { display:none; grid-column:1/-1; grid-row:2; position:static !important; width:100%; min-width:0; margin:0; inset:auto; order:3; border:1px solid #536d79; padding:12px; border-radius:16px; }
  body.wt-refresh :is(.topbar,.top).menu-open > :is(.top-actions,.topbar-actions,.topbar-links) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  body.wt-refresh :is(.top-actions,.topbar-actions) :is(.btn,form,.btn-auth-pair) { min-width:0; width:100%; }
  body.wt-refresh :is(.top-actions,.topbar-actions) .btn { min-height:44px; white-space:normal; justify-content:center; padding:9px 8px; font-size:12px; }
  body.wt-refresh :is(.top-actions,.topbar-actions) .btn-auth-pair { display:contents; }
  body.wt-refresh :is(.top-actions,.topbar-actions) .btn-auth-pair > .btn { border-radius:11px; }
  body.wt-refresh .hero-art { display:block !important; width:100%; min-height:0; height:auto; margin:0; border-radius:18px; }
  body.wt-refresh .hero-art > img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; }
  body.wt-game:not(.game-page) .hero { gap:18px; padding:16px 0 22px; min-height:0; }
  body.wt-game:not(.game-page) .hero-copy { padding:0; }
  body.wt-premium .hero-visual { display:block; width:100%; flex:auto; height:210px; margin-top:12px; }
  body.wt-premium .hero-visual .pcard { width:110px; aspect-ratio:9/14; }
}
@media(max-width:359px) {
  body.wt-refresh .brand-word { font-size:20px; }
  body.wt-refresh .brand-mark,
  body.wt-refresh .brand-mark img { width:33px; height:39px; }
  body.wt-refresh :is(.topbar,.top) > .mobile-menu-toggle { min-width:70px; padding-inline:9px; }
}
body.wt-refresh [data-social-connection][data-connection-state="live"] { color: var(--wt-emerald); }
body.wt-refresh [data-social-connection][data-connection-state="offline"],
body.wt-refresh [data-social-connection][data-connection-state="expired"] { color: #ffbdaf; }
:where(.wt-game) .round-presets { padding:17px; border:1px solid #c8d4b32d; border-radius:16px; background:linear-gradient(130deg,#173340e8,#0b1e2de8); }
:where(.wt-game) .round-presets > div:first-child { display:grid; gap:5px; color:#f4dfaa; }
:where(.wt-game) .round-presets small { display:block; color:#b7cbd0; font-size:11px; line-height:1.5; font-weight:500; }
:where(.wt-game) .round-preset-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:13px; }
:where(.wt-game) .round-preset-options button { display:flex; gap:10px; align-items:center; padding:12px; min-height:64px; border:1px solid #66818b; border-radius:12px; color:#e9f1e8; background:#102b38; font:inherit; font-size:12px; text-align:left; cursor:pointer; }
:where(.wt-game) .round-preset-options button[aria-pressed=true] { border-color:#e2bf78; background:#304840; color:#ffe2a5; }
:where(.wt-game) .round-preset-options button:focus-visible { outline:2px solid #b6ebd3; outline-offset:3px; }
:where(.wt-game) .round-presets p { font-size:11px; line-height:1.6; color:#bae8d3; margin:9px 0 0; }
:where(.wt-game) .round-presets p:empty { display:none; }
@media(max-width:680px) { :where(.wt-game) .round-preset-options { grid-template-columns:1fr; } }
