/* Arena shell, scoped so game, room and economy controls retain their own CSS. */
body.wg-shell-ready { padding-left: 292px; }

.wg-shell-shade[hidden] { display: none !important; }
.wg-shell-shade { position: fixed; inset: 0; z-index: 1000; background: #020b0ac9; }

.wg-shell-sidebar {
  --wg-lime: #c2f46e;
  position: fixed;
  z-index: 1001;
  inset: 12px auto 12px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 276px;
  padding: 24px 34px 18px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #698568 transparent;
  background: radial-gradient(circle at 12% 4%, #334a35a8, transparent 35%), linear-gradient(160deg, #192820 0%, #111b17 49%, #0d1714 100%);
  color: #f1f4ef;
  -webkit-mask: url('/arena/sidebar-mask.svg') no-repeat 0 0 / 100% 100%;
  mask: url('/arena/sidebar-mask.svg') no-repeat 0 0 / 100% 100%;
  filter: drop-shadow(0 17px 24px #0008);
}
.wg-shell-sidebar *, .wg-shell-toggle * { box-sizing: border-box; }
.wg-shell-sidebar a { color: inherit; text-decoration: none; }
.wg-shell-sidebar-head { display: flex; align-items: center; min-width: 0; }
.wg-shell-brand { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0 4px 24px; color: #f5faf1 !important; line-height: 1; }
.wg-shell-brand-mark { display: grid; place-items: center; flex: none; width: 54px; height: 54px; filter: drop-shadow(0 7px 11px #0009); }
.wg-shell-brand-mark img { display: block; width: 54px; height: 54px; object-fit: contain; }
.wg-shell-brand-wordmark { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; font-size: 18px; font-weight: 900; letter-spacing: -.045em; }
.wg-shell-brand-wordmark strong { color: var(--wg-lime); }
.wg-shell-label { padding: 14px 14px 7px; color: #74867a; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.wg-shell-nav { display: block; width: auto; color: #b4c1b9; font-size: 13px; }
.wg-shell-nav-group { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid #334038; }
.wg-shell-nav-group:last-child { border-bottom: 0; }
.wg-shell-nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 5px 9px; border: 1px solid transparent; border-radius: 12px; line-height: 1.2; transition: background-color .2s, border-color .2s, color .2s, transform .24s cubic-bezier(.2,.7,.2,1); }
.wg-shell-nav a:hover { background: #26382b; border-color: #46634a; color: #f4fff0; }
.wg-shell-nav a.active { background: linear-gradient(100deg, #314d2c, #243b2b 85%); border-color: #617d4d; color: #e6ffbb; font-weight: 800; box-shadow: inset 3px 0 #d4ff88, 0 5px 15px #0003; }
.wg-shell-nav-glyph { position: relative; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid color-mix(in srgb, var(--nav-accent) 32%, transparent); border-radius: 12px; background: radial-gradient(circle at 24% 12%, color-mix(in srgb, var(--nav-accent) 35%, #fff), transparent 31%), linear-gradient(145deg, color-mix(in srgb, var(--nav-accent) 28%, #2b3e32), #101915 75%); color: var(--nav-accent); box-shadow: inset 0 1px 1px #ffffff9c, inset 0 -3px 5px #0008, 0 3px 0 #080f0c, 0 7px 11px #0005; transition: transform .24s, border-color .2s, box-shadow .2s; }
.wg-shell-nav-glyph::before { content: ''; position: absolute; inset: 2px; border: 1px solid #ffffff31; border-radius: 9px; pointer-events: none; }
.wg-shell-icon { display: block; flex: none; width: 23px; height: 23px; stroke-width: 2.2; filter: drop-shadow(0 2px 2px #000b); }
.wg-shell-nav a.active .wg-shell-nav-glyph, .wg-shell-nav a:hover .wg-shell-nav-glyph { border-color: color-mix(in srgb, var(--nav-accent) 65%, transparent); box-shadow: 0 0 13px color-mix(in srgb, var(--nav-accent) 18%, transparent), inset 0 1px #ffffff25; }
.wg-shell-subnav { display: grid; gap: 3px; margin: 2px 0 8px 42px; }
.wg-shell-subnav a { display: block; min-height: 27px; padding: 6px 9px; color: #9fb4a6; font-size: 11px; }
.wg-shell-subnav a.active { border-color: #55704d; background: #2c422f; color: #d7ff9c; box-shadow: none; }
.wg-shell-note { margin: auto 11px 0; padding-top: 24px; color: #93a397; font-size: 10px; line-height: 1.55; }
.wg-shell-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 10px 0; }

body.wg-shell-ready button.wg-shell-theme, body.wg-shell-ready button.wg-shell-close, body.wg-shell-ready button.wg-shell-toggle { box-sizing: border-box; font: inherit; cursor: pointer; }
body.wg-shell-ready button.wg-shell-theme { min-height: 32px; padding: 5px 9px; border: 1px solid #4c664a; border-radius: 9px; background: #203426; color: #cde5c8; font-size: 10px; font-weight: 800; box-shadow: none; }
body.wg-shell-ready button.wg-shell-theme:hover { background: #2b4831; color: #f2ffe6; transform: none; box-shadow: none; }
.wg-shell-language { display: flex; gap: 4px; align-items: center; font-size: 10px; font-weight: 900; }
.wg-shell-language a { padding: 6px 4px; border-radius: 5px; color: #9eafa1; }
.wg-shell-language a[aria-current] { color: #d8ffab; }
body.wg-shell-ready button.wg-shell-close, body.wg-shell-ready button.wg-shell-toggle { display: none; }
.wg-shell-sidebar a:focus-visible, body.wg-shell-ready .wg-shell-sidebar button:focus-visible, body.wg-shell-ready button.wg-shell-toggle:focus-visible { outline: 2px solid #d3ff84; outline-offset: 2px; }

/* Keep the existing game header compact; the rail supplies the desktop logo. */
@media (min-width: 1181px) {
  body.wg-shell-ready > header .brand { display: none; }
}
@media (hover: hover) {
  .wg-shell-nav a:hover { transform: translateX(3px); }
  .wg-shell-nav a:hover .wg-shell-nav-glyph { transform: translateY(-2px) rotate(-5deg) scale(1.06); }
}

/* At tablet and phone widths the rail becomes a drawer. The toggle stays in
   the header's flow area, so it scrolls away before the game canvas. */
@media (max-width: 1180px) {
  body.wg-shell-ready { padding-left: 0; }
  body.wg-shell-ready > header { position: relative; padding-left: max(76px, calc(env(safe-area-inset-left) + 76px)); }
  body.wg-shell-ready > header.hub-header { padding-left: max(76px, calc(env(safe-area-inset-left) + 76px)); }
  body.wg-shell-ready > header.hub-header .brand img { display: none; }
  body.wg-shell-ready button.wg-shell-toggle { position: absolute; z-index: 20; top: 50%; left: max(12px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: center; gap: 1px; width: 53px; height: 46px; padding: 3px 4px 3px 1px; transform: translateY(-50%); border: 1px solid #60805a; border-radius: 13px; background: linear-gradient(145deg, #263f30, #11231b); color: #d6f6be; box-shadow: 0 4px 0 #08140e, 0 8px 18px #0007, inset 0 1px #eaffbc53; }
  body.wg-shell-ready button.wg-shell-toggle img { width: 35px; height: 35px; object-fit: contain; }
  .wg-shell-toggle-bars { display: grid; gap: 3px; flex: none; width: 9px; }
  .wg-shell-toggle-bars i { display: block; width: 9px; height: 2px; border-radius: 2px; background: #c9f79d; }
  body.wg-shell-ready button.wg-shell-toggle:hover { transform: translateY(-50%); background: #304d36; box-shadow: 0 4px 0 #08140e, 0 8px 18px #0007; }
  .wg-shell-sidebar { inset: max(8px, env(safe-area-inset-top)) auto max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); width: min(292px, calc(100vw - 16px)); padding: 20px 14px 16px; border: 1px solid #536b55; border-radius: 28px 18px 28px 18px; box-shadow: 18px 0 48px #0008; filter: none; -webkit-mask: none; mask: none; visibility: hidden; pointer-events: none; transform: translateX(calc(-100% - 24px)); transition: transform .22s ease, visibility .22s; }
  body.wg-shell-open .wg-shell-sidebar { visibility: visible; pointer-events: auto; transform: translateX(0); }
  body.wg-shell-open { overflow: hidden; }
  body.wg-shell-ready button.wg-shell-close { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin: -15px -2px 0 auto; padding: 0; border: 1px solid #627d5b; border-radius: 10px; background: #23382c; color: #eaffd5; font-size: 25px; line-height: 1; box-shadow: none; }
  body.wg-shell-ready button.wg-shell-close:hover { background: #315039; color: #fff; transform: none; box-shadow: none; }
  .wg-shell-brand { padding-bottom: 13px; }
}
@media (max-width: 600px) {
  body.wg-shell-ready > header { padding-left: max(76px, calc(env(safe-area-inset-left) + 76px)); }
  body.wg-shell-ready > header .brand { white-space: nowrap; }
}
@media (max-height: 570px) {
  .wg-shell-sidebar { padding-top: 12px; }
  .wg-shell-label { padding-top: 5px; }
  .wg-shell-nav-group { padding: 5px 0; gap: 1px; }
  .wg-shell-nav a { min-height: 36px; }
  .wg-shell-subnav a { min-height: 24px; }
  .wg-shell-note { padding-top: 10px; }
}

html[data-theme='light'] body.wg-shell-ready { background: radial-gradient(ellipse at 80% 8%, #dbe9d5bb, transparent 38%), #f3f6f0; color: #18271d; }
html[data-theme='light'] .wg-shell-sidebar { background: radial-gradient(circle at 12% 2%, #f9fff2, transparent 36%), linear-gradient(160deg, #ecf4e8, #e4eee3 57%, #dce9df); border-color: #b1c8ad; color: #203826; }
html[data-theme='light'] .wg-shell-brand { color: #1b3123 !important; }
html[data-theme='light'] .wg-shell-brand-wordmark strong { color: #3b722b; }
html[data-theme='light'] .wg-shell-label, html[data-theme='light'] .wg-shell-note { color: #536b59; }
html[data-theme='light'] .wg-shell-nav { color: #364d3d; }
html[data-theme='light'] .wg-shell-nav-group { border-color: #c3d6c1; }
html[data-theme='light'] .wg-shell-nav a:hover { background: #d2e5cd; border-color: #afcda7; color: #203c26; }
html[data-theme='light'] .wg-shell-nav a.active { background: linear-gradient(100deg, #c9e4b3, #dcefcf); border-color: #9dbd87; color: #1d4a25; box-shadow: inset 3px 0 #518c37, 0 5px 14px #8fab9122; }
html[data-theme='light'] .wg-shell-nav-glyph { background: radial-gradient(circle at 24% 12%, color-mix(in srgb, var(--nav-accent) 40%, #fff), transparent 31%), linear-gradient(145deg, color-mix(in srgb, var(--nav-accent) 26%, #304d3a), #14271e 75%); }
html[data-theme='light'] .wg-shell-subnav a { color: #526e59; }
html[data-theme='light'] .wg-shell-subnav a.active { color: #1d4a25; }
html[data-theme='light'] body.wg-shell-ready button.wg-shell-theme { background: #e6f1df; border-color: #a8c5a0; color: #315734; }
html[data-theme='light'] .wg-shell-language a { color: #4c6751; }
html[data-theme='light'] .wg-shell-language a[aria-current] { color: #1d5829; }

/* The playfield stays dark for contrast; surrounding panels follow the catalog theme. */
html[data-theme='light'] body.wg-shell-ready > header { border-color: #c9d6c9; }
html[data-theme='light'] body.wg-shell-ready > header .brand, html[data-theme='light'] body.wg-shell-ready > header .back { color: #233c2b; }
html[data-theme='light'] body.wg-shell-ready > header .brand span, html[data-theme='light'] body.wg-shell-ready .eyebrow, html[data-theme='light'] body.wg-shell-ready .intro h1 em, html[data-theme='light'] body.wg-shell-ready .hub-intro h1 em, html[data-theme='light'] body.wg-shell-ready .intro h1 span, html[data-theme='light'] body.wg-shell-ready .practice-link a { color: #3b722b; }
html[data-theme='light'] body.wg-shell-ready .badge, html[data-theme='light'] body.wg-shell-ready .demo-tag, html[data-theme='light'] body.wg-shell-ready .hub-lang { color: #356b2f; border-color: #a6c396; }
html[data-theme='light'] body.wg-shell-ready .intro p:not(.eyebrow), html[data-theme='light'] body.wg-shell-ready .hub-note, html[data-theme='light'] body.wg-shell-ready .help, html[data-theme='light'] body.wg-shell-ready .practice-link { color: #526454; }
html[data-theme='light'] body.wg-shell-ready .mode-list article, html[data-theme='light'] body.wg-shell-ready .setup, html[data-theme='light'] body.wg-shell-ready .terms-grid > div { background: #fff; border-color: #cbd8c9; }
html[data-theme='light'] body.wg-shell-ready .mode-list span, html[data-theme='light'] body.wg-shell-ready .explain, html[data-theme='light'] body.wg-shell-ready .agree { color: #4c6150; }
html[data-theme='light'] body.wg-shell-ready .setup input:not([type='checkbox']) { background: #fff; color: #18271d; border-color: #b1c6b4; }
html[data-theme='light'] body.wg-shell-ready .wallet, html[data-theme='light'] body.wg-shell-ready .practice-tag { color: #356b2f; border-color: #9ab58b; }
html[data-theme='light'] body.wg-shell-ready .wallet b, html[data-theme='light'] body.wg-shell-ready #status { color: #356b2f; }
html[data-theme='light'] body.wg-shell-ready .playfield { color: #f3f5f1; }
html[data-theme='light'] body.wg-shell-ready .hub-card { background: #fff; border-color: #c6d8c8; }
html[data-theme='light'] body.wg-shell-ready .hub-card-link { color: #192f21; }
html[data-theme='light'] body.wg-shell-ready .hub-card p:not(.hub-state) { color: #526454; }
html[data-theme='light'] body.wg-shell-ready .hub-state { color: #3b782b; }
html[data-theme='light'] body.wg-shell-ready .hub-state--planned { color: #5c6d61; }
html[data-theme='light'] body.wg-shell-ready .coming { color: #536657; border-color: #aebfae; }
html[data-theme='light'] body.wg-shell-ready .topbar nav a { color: #48604e; }
html[data-theme='light'] body.wg-shell-ready .notice { background: #e4f0df; border-color: #afcda7; color: #4c6050; }
html[data-theme='light'] body.wg-shell-ready .notice strong, html[data-theme='light'] body.wg-shell-ready .notice a { color: #36742e; }
html[data-theme='light'] body.wg-shell-ready .panel, html[data-theme='light'] body.wg-shell-ready .room-card { background: #fff; border-color: #cbd8c9; }
html[data-theme='light'] body.wg-shell-ready .create-panel label, html[data-theme='light'] body.wg-shell-ready .my-card p, html[data-theme='light'] body.wg-shell-ready .room-card p { color: #536658; }
html[data-theme='light'] body.wg-shell-ready .create-panel input:not([type='checkbox']), html[data-theme='light'] body.wg-shell-ready .create-panel select, html[data-theme='light'] body.wg-shell-ready .invite-link input { background: #fff; border-color: #abc3ae; color: #1b3023; }
html[data-theme='light'] body.wg-shell-ready .empty-state { color: #586c5c; border-color: #b8cbb7; }
html[data-theme='light'] body.wg-shell-ready .room-card .meta span { background: #eaf3e5; border-color: #bad0b7; color: #405c42; }
html[data-theme='light'] body.wg-shell-ready .ghost { background: #e9f2e6; border-color: #b5cbb4; color: #27442f; }
html[data-theme='light'] body.wg-shell-ready footer { border-color: #c9d6c9; color: #536957; }
html[data-theme='light'] body.wg-shell-ready footer a { color: #3b722b; }

@media (prefers-reduced-motion: reduce) {
  .wg-shell-sidebar, .wg-shell-nav a, .wg-shell-nav-glyph { transition: none !important; }
  .wg-shell-nav a:hover, .wg-shell-nav a:hover .wg-shell-nav-glyph { transform: none !important; }
}

/* ---------- Green menu v4: same panel, icons, dock and phone bar as the main pages
   (assets/multipage.css + assets/redesign.css). Only the shell's own classes are styled. ---------- */
:root { --wg-rail-w: clamp(252px, 19vw, 300px); --wg-gold: #e9c979; --wg-bar-h: 0px; }
body.wg-shell-ready { padding-left: calc(var(--wg-rail-w) + 16px); }

.wg-shell-sidebar {
  isolation: isolate;
  inset: 7px auto 7px 7px;
  width: var(--wg-rail-w);
  padding: 20px 47px 17px 13px;
  font-size: 15px;
  background: radial-gradient(circle at 62% 5%, #8b7a3e38, transparent 29%), radial-gradient(circle at 5% 46%, #536b432d, transparent 37%), linear-gradient(159deg, #26372b 0%, #12251e 51%, #091713 100%);
  -webkit-mask: url('/arena/sidebar-mask.svg') 0 0 / 100% 100% no-repeat;
  mask: url('/arena/sidebar-mask.svg') 0 0 / 100% 100% no-repeat;
  filter: drop-shadow(9px 13px 18px #0009);
  box-shadow: inset 2px 0 #f4d79438, inset 0 1px #d6e6ad44;
}
.wg-shell-sidebar::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(110deg, transparent 36%, #ecc76816 48%, transparent 65%); background-size: 240% 100%; animation: wg-shell-rail-glow 12s ease-in-out infinite; }
@keyframes wg-shell-rail-glow { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

.wg-shell-brand { gap: 6px; padding: 0 4px 11px; font-weight: 800; }
.wg-shell-brand-mark, .wg-shell-brand-mark img { width: 41px; height: 41px; }
.wg-shell-brand-wordmark { gap: 3px; font-size: 15px; }
.wg-shell-label { padding: 8px 10px 3px; color: #c4ad75; font-size: 8px; letter-spacing: .19em; }

.wg-shell-nav { display: flex; flex-direction: column; justify-content: flex-start; gap: 0; flex: 1 0 auto; font-size: 13.5px; }
.wg-shell-nav-group { flex: none; align-content: start; gap: 3px; padding: 7px 0; border-bottom: 1px solid #233139; }
.wg-shell-nav a { min-height: 48px; gap: 12px; padding: 4px 9px 4px 6px; border-radius: 8px; font-weight: 700; }
.wg-shell-nav a.active { border-color: #a89561; background: linear-gradient(100deg, #475233b8, #233a2b 80%); box-shadow: inset 3px 0 var(--wg-gold), 0 0 15px #d3b46b18; color: #fff5d8; font-weight: 800; }

.wg-shell-nav-glyph { width: 32px; height: 32px; border: 1px solid #b8a06e75; border-radius: 11px 8px 11px 8px; background: radial-gradient(circle at 28% 12%, #d6c78268, transparent 40%), linear-gradient(150deg, #395544, #10241e 72%); box-shadow: inset 0 1px #ffffff7b, inset 0 -3px #0008, 0 3px 6px #0009, 0 0 0 1px #d5ad5931; }
.wg-shell-nav-glyph::before { inset: 2px; border-color: #ffe7ab45; border-radius: 8px 5px 8px 5px; }
.wg-shell-nav-glyph .wg-shell-icon { display: none; }
.wg-shell-nav-glyph::after { content: ''; position: relative; z-index: 1; display: block; width: 30px; height: 30px; background: center / contain no-repeat; filter: drop-shadow(0 2px 2px #0007); transition: transform .2s ease; }
.wg-shell-nav a.active .wg-shell-nav-glyph { border-color: #efce86; box-shadow: inset 0 1px #fff9d6, 0 3px 7px #0009, 0 0 12px #f2ce7b45; }
.wg-shell-nav-games .wg-shell-nav-glyph::after, .wg-shell-bar-games .wg-shell-bar-icon { background-image: url('/assets/nav-icons-v2/games.svg'); }
.wg-shell-nav-lobby .wg-shell-nav-glyph::after { background-image: url('/assets/nav-icons-v2/lobby.svg'); }
.wg-shell-nav-rounds .wg-shell-nav-glyph::after { background-image: url('/assets/nav-icons-v2/rounds.svg'); }
.wg-shell-nav-challenges .wg-shell-nav-glyph::after { background-image: url('/assets/nav-icons-v2/challenges.svg'); }
.wg-shell-nav-rankings .wg-shell-nav-glyph::after { background-image: url('/assets/nav-icons-v2/rankings.svg'); }
.wg-shell-nav-tournaments .wg-shell-nav-glyph::after, .wg-shell-bar-tournaments .wg-shell-bar-icon { background-image: url('/assets/nav-icons-v2/tournaments.svg'); }
.wg-shell-nav-referrals .wg-shell-nav-glyph::after { background-image: url('/assets/nav-icons-v2/referrals.svg'); }
.wg-shell-nav-share .wg-shell-nav-glyph::after { background-image: url('/assets/nav-icons-v2/share.svg'); }
.wg-shell-nav-community .wg-shell-nav-glyph::after { background-image: url('/assets/nav-icons-v2/community.svg'); }
.wg-shell-nav-profile .wg-shell-nav-glyph::after, .wg-shell-bar-profile .wg-shell-bar-icon { background-image: url('/assets/nav-icons-v2/profile.svg'); }
.wg-shell-nav-support .wg-shell-nav-glyph::after, .wg-shell-bar-support .wg-shell-bar-icon { background-image: url('/assets/nav-icons-v2/support.svg'); }
.wg-shell-nav-rules .wg-shell-nav-glyph::after, .wg-shell-bar-rules .wg-shell-bar-icon { background-image: url('/assets/nav-icons-v2/rules.svg'); }

/* Profile, Support, Rules: a dock at the bottom of the menu. */
.wg-shell-nav-group.wg-shell-dock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: auto; padding: 12px 0 2px; border: 0; border-top: 1px solid #3a4e3e; }
.wg-shell-dock a { flex-direction: column; justify-content: center; gap: 5px; min-height: 80px; padding: 8px 2px; border-color: #34493a; border-radius: 14px 10px 14px 10px; background: #16241c; font-size: 11.5px; text-align: center; }
.wg-shell-dock a span:last-child { line-height: 1.15; }
.wg-shell-nav .wg-shell-dock a.active { border-color: #a89561; background: linear-gradient(100deg, #475233b8, #233a2b 80%); }
.wg-shell-footer { margin-top: 10px; }

@media (hover: hover) {
  .wg-shell-nav a:hover .wg-shell-nav-glyph { transform: translateY(-2px) rotate(-5deg) scale(1.06); box-shadow: inset 0 1px 1px #ffffffbb, inset 0 -3px 5px #0008, 0 5px 0 #080f0c, 0 11px 16px #0007; }
  .wg-shell-nav a:hover .wg-shell-nav-glyph::after { transform: translateY(-2px) rotate(-4deg); }
  .wg-shell-dock a:hover { background: #26382b; transform: translateY(-2px); }
}
@media (min-width: 1181px) and (max-height: 860px) {
  .wg-shell-nav a { min-height: 42px; }
  .wg-shell-dock a { min-height: 70px; }
  .wg-shell-nav-group { padding: 4px 0; }
}

/* Tablet and phone drawer: the main pages' phone panel. */
@media (max-width: 1180px) {
  body.wg-shell-ready { padding-left: 0; }
  .wg-shell-sidebar { inset: 0 auto 0 0; width: min(290px, 84vw); padding: max(19px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border: 1px solid #23333a; border-left: 0; border-radius: 0 26px 26px 0; background: radial-gradient(circle at 68% 5%, #8b7a3e38, transparent 32%), linear-gradient(155deg, #26372b, #0c1a17 76%); box-shadow: 10px 0 32px #0009, inset 2px 0 #f4d79435; filter: none; -webkit-mask: none; mask: none; }
  .wg-shell-sidebar::after { border-radius: inherit; }
  .wg-shell-nav a { min-height: 44px; }
  /* Become visible at once when opening, so focus can move to the close button. */
  body.wg-shell-open .wg-shell-sidebar { transition: transform .22s ease, visibility 0s; }
}

/* Phones: Profile / Support / Rules move from the drawer to the quick bar, as on the main pages. */
.wg-shell-bar, .wg-shell-bar-space { display: none; }
@media (max-width: 780px) {
  :root { --wg-bar-h: calc(66px + env(safe-area-inset-bottom)); }
  .wg-shell-nav-group.wg-shell-dock { display: none; }
  .wg-shell-nav-group:nth-last-child(2) { border-bottom: 0; }
  .wg-shell-bar-space { display: block; height: var(--wg-bar-h); }
  .wg-shell-bar { position: fixed; z-index: 990; left: 0; right: 0; bottom: 0; box-sizing: border-box; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--wg-bar-h); padding: 6px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left)); background: linear-gradient(180deg, #17271ef2, #0e1914fa); border-top: 1px solid #536b55; box-shadow: 0 -10px 28px #0008; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-family: inherit; }
  .wg-shell-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; border-radius: 14px; color: #c9d8c6; font-size: 10.5px; font-weight: 800; line-height: 1.2; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .wg-shell-bar a .wg-shell-bar-icon { width: 32px; height: 32px; border-radius: 10px; background-position: center; background-size: contain; background-repeat: no-repeat; box-shadow: 0 3px 8px #0007; }
  .wg-shell-bar a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wg-shell-bar a[aria-current="page"] { color: #fff; background: linear-gradient(180deg, #314d2c, #243b2b); box-shadow: inset 0 2px #d4ff88; }
  .wg-shell-bar a:active { transform: scale(.95); }
  .wg-shell-bar a:focus-visible { outline: 2px solid #d3ff84; outline-offset: -2px; }
  body.wg-shell-open .wg-shell-bar { display: none; }
  /* Keep the help button and the Rocket control dock above the bar. */
  body.wg-shell-ready:not(.arena-chat-top) .wg-help-fab { bottom: calc(var(--wg-bar-h) + 10px) !important; }
  body.wg-shell-ready > header.rocket-header ~ main .control { bottom: calc(var(--wg-bar-h) + 8px); }
}
@media (min-width: 701px) and (max-width: 780px) {
  body.wg-shell-ready.arena-chat-top .wg-help-fab { bottom: calc(var(--wg-bar-h) + 10px) !important; }
}

/* Custom art dropped into /assets/art/ wins over the built-in set (see assets/art-slots.js). */
html.art-nav-games .wg-shell-nav-games .wg-shell-nav-glyph::after, html.art-nav-games .wg-shell-bar-games .wg-shell-bar-icon { background-image: var(--art-nav-games) !important; }
html.art-nav-lobby .wg-shell-nav-lobby .wg-shell-nav-glyph::after { background-image: var(--art-nav-lobby) !important; }
html.art-nav-rounds .wg-shell-nav-rounds .wg-shell-nav-glyph::after { background-image: var(--art-nav-rounds) !important; }
html.art-nav-challenges .wg-shell-nav-challenges .wg-shell-nav-glyph::after { background-image: var(--art-nav-challenges) !important; }
html.art-nav-rankings .wg-shell-nav-rankings .wg-shell-nav-glyph::after { background-image: var(--art-nav-rankings) !important; }
html.art-nav-tournaments .wg-shell-nav-tournaments .wg-shell-nav-glyph::after, html.art-nav-tournaments .wg-shell-bar-tournaments .wg-shell-bar-icon { background-image: var(--art-nav-tournaments) !important; }
html.art-nav-referrals .wg-shell-nav-referrals .wg-shell-nav-glyph::after { background-image: var(--art-nav-referrals) !important; }
html.art-nav-share .wg-shell-nav-share .wg-shell-nav-glyph::after { background-image: var(--art-nav-share) !important; }
html.art-nav-community .wg-shell-nav-community .wg-shell-nav-glyph::after { background-image: var(--art-nav-community) !important; }
html.art-nav-profile .wg-shell-nav-profile .wg-shell-nav-glyph::after, html.art-nav-profile .wg-shell-bar-profile .wg-shell-bar-icon { background-image: var(--art-nav-profile) !important; }
html.art-nav-support .wg-shell-nav-support .wg-shell-nav-glyph::after, html.art-nav-support .wg-shell-bar-support .wg-shell-bar-icon { background-image: var(--art-nav-support) !important; }
html.art-nav-rules .wg-shell-nav-rules .wg-shell-nav-glyph::after, html.art-nav-rules .wg-shell-bar-rules .wg-shell-bar-icon { background-image: var(--art-nav-rules) !important; }

/* Light theme, as on the main pages. */
html[data-theme='light'] .wg-shell-sidebar { background: radial-gradient(circle at 70% 3%, #fff8d9, transparent 34%), linear-gradient(160deg, #f2f3df, #dfebdf 63%, #d1e4d6); }
html[data-theme='light'] .wg-shell-nav-glyph { background: radial-gradient(circle at 28% 12%, #e7cf8f90, transparent 42%), linear-gradient(150deg, #476a50, #193327 75%); }
html[data-theme='light'] .wg-shell-nav a.active, html[data-theme='light'] .wg-shell-nav .wg-shell-dock a.active { background: linear-gradient(100deg, #e9dfb5, #d8e8cd); color: #24432a; border-color: #c3ac6b; }
html[data-theme='light'] .wg-shell-dock a { background: #e2eedf; border-color: #b1c8ad; }
html[data-theme='light'] .wg-shell-nav-group.wg-shell-dock { border-top-color: #b1c8ad; }
@media (max-width: 780px) {
  html[data-theme='light'] .wg-shell-bar { background: linear-gradient(180deg, #f2f8eeef, #e2ecdff7); border-top-color: #b1c8ad; box-shadow: 0 -8px 22px #2a4e7022; }
  html[data-theme='light'] .wg-shell-bar a { color: #2c4a32; }
  html[data-theme='light'] .wg-shell-bar a[aria-current="page"] { color: #1d4a25; background: #c9e4b3; box-shadow: inset 0 2px #518c37; }
}
@media (prefers-reduced-motion: reduce) {
  .wg-shell-sidebar::after { animation: none; }
  .wg-shell-nav-glyph::after, .wg-shell-dock a { transition: none !important; }
  .wg-shell-dock a:hover, .wg-shell-nav a:hover .wg-shell-nav-glyph::after { transform: none !important; }
}
/* Perf: the closed phone drawer is invisible; do not tick its rail glow every frame. */
@media (max-width: 1180px) {
  body:not(.wg-shell-open) .wg-shell-sidebar::after { animation-play-state: paused; }
}
