@layer theme, base, components, utilities;

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/roboto-latin-ext.woff2?v=2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/roboto-latin.woff2?v=2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/nunito-900-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ink: #151318;
  --bar: #201b20;
  --panel: #282128;
  --white: #f2ece7;
  --muted: #a49ba5;
  --red: #ff303c;
  --accent-hover: #ff515a;
  --border: #382c33;
  --nav-text: #c9c1c9;
  --accent-glow: rgba(255, 48, 60, .25);
  --body: Roboto, "Segoe UI", sans-serif;
  --nav-height: 4.15rem;
  --panel-radius: 1.3rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; background: var(--ink); color: var(--white); font: 1rem/1.55 var(--body); }
h1, h2, p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #ffd7da; outline-offset: 4px; }
section[id] { scroll-margin-top: 1.5rem; }

.container { width: min(89%, 93rem); max-width: none; margin-inline: auto; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 10; top: 1rem; left: 1rem; background: var(--ink); padding: .65rem 1rem; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

:root { --nav-width: calc(min(89vw, 93rem) + 2rem); --discord-width: 8rem; }
.topbar { --nav-padding: clamp(1rem, 2.45vw, 2.55rem); position: fixed; z-index: 2; inset: 0 0 auto; }
.navigation { width: var(--nav-width); min-height: var(--nav-height); margin: auto; padding: 0 var(--nav-padding); display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(.5rem, 1.75vw, 1.85rem); background: var(--bar); backdrop-filter: none; border-radius: 0 0 .8rem .8rem; }

@media (min-width: 961px) {
  :root { --discord-gap: calc((var(--nav-height) - 2.75rem) / 2); }
  .navigation { padding-inline-end: var(--discord-gap); }
  .discord-button { width: var(--discord-width); }
}

@supports (clip-path: shape(from 0 0, arc to 1px 1px of 1px cw, close)) {
  @media (min-width: 961px) {
    :root {
      --side-height: 1.65rem;
      --radius: calc((var(--nav-height) - var(--side-height)) / 2);
      --mid-depth: calc(var(--side-height) + var(--radius));
      --edge: calc((100vw - var(--nav-width)) / 2);
      --notch-end: calc(100vw - var(--edge) - var(--discord-width) - 2 * var(--discord-gap) + var(--radius));
      --notch-start: min(calc(47vw + .6rem), calc(var(--notch-end) - 4 * var(--radius) - .5rem));
      --stream-edge: calc(var(--radius) + .5rem);
    }
    .topbar::before {
      content: "";
      position: absolute;
      z-index: -1;
      inset: 0;
      pointer-events: none;
      background: var(--bar);
      backdrop-filter: none;
      clip-path: shape(
        from 0 0,
        vline to var(--side-height),
        hline to calc(var(--edge) - var(--radius)),
        arc to var(--edge) var(--mid-depth) of var(--radius) cw,
        arc to calc(var(--edge) + var(--radius)) 100% of var(--radius) ccw,
        hline to var(--notch-start),
        arc to calc(var(--notch-start) + var(--radius)) var(--mid-depth) of var(--radius) ccw,
        arc to calc(var(--notch-start) + 2 * var(--radius)) var(--side-height) of var(--radius) cw,
        hline to calc(var(--notch-end) - 2 * var(--radius)),
        arc to calc(var(--notch-end) - var(--radius)) var(--mid-depth) of var(--radius) cw,
        arc to var(--notch-end) 100% of var(--radius) ccw,
        hline to calc(100% - var(--edge) - var(--radius)),
        arc to calc(100% - var(--edge)) var(--mid-depth) of var(--radius) ccw,
        arc to calc(100% - var(--edge) + var(--radius)) var(--side-height) of var(--radius) cw,
        hline to 100%,
        vline to 0,
        close
      );
    }
    .navigation { background: transparent; backdrop-filter: none; }
    .topbar .navigation > .navbar-start {
      width: calc(var(--notch-start) - var(--edge) - var(--radius));
      margin-inline-start: calc(var(--radius) - var(--nav-padding));
    }
    main .hero-scene {
      grid-template-columns: calc(var(--notch-start) + var(--stream-edge))
        minmax(0, calc(var(--notch-end) - var(--notch-start) - 2 * var(--stream-edge)));
      padding-inline: 0;
      padding-top: calc(var(--nav-height) - .75rem);
    }
    main .hero-inner { align-self: start; }
  }
}
.navigation :is(.navbar-start, .navbar-end) { width: auto; min-width: 0; }
.navigation .navbar-start { justify-content: center; }
.navigation .navbar-end { justify-content: end; }
.brand { color: var(--white); display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .15em .55em; width: max-content; max-width: 100%; font-size: clamp(1.15rem, 2vw, 2.05rem); line-height: 1; font-weight: 750; letter-spacing: -.025em; }
.brand > span { white-space: nowrap; }
.brand b { color: var(--red); font-weight: inherit; }
.brand-collaboration { display: inline-flex; align-items: baseline; gap: .55em; }
.brand-cross { color: #000; }
.brand-partner { color: #6b3db5; }
@supports (background-clip: text) {
  .brand-partner {
    background: linear-gradient(105deg, #43267d, #743dba 53%, #52419d);
    background-clip: text;
    color: transparent;
  }
}
@media (forced-colors: active) {
  .brand-partner { background: none; color: LinkText; }
}
#mapa, #gracze { scroll-margin-top: calc(var(--nav-height) + .75rem); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.55rem; height: auto; padding: .55rem .75rem; border: 0; border-radius: 5px; color: inherit; background: transparent; box-shadow: none; font: 500 .875rem/1.2 var(--body); cursor: pointer; white-space: nowrap; transition: background-color .18s, color .18s; }
.btn:hover { box-shadow: none; }
.discord-button { min-height: 2.75rem; padding-inline: 1.1rem; border-radius: .68rem; background: var(--red); color: #fff; font-size: clamp(.9rem, 1.1vw, 1.02rem); box-shadow: 0 2px 8px #0003; }
.discord-button:hover { background: var(--accent-hover); box-shadow: 0 3px 10px #0003; }
.discord-button .icon { width: 1.45rem; height: 1.45rem; }

.hero-scene { position: relative; isolation: isolate; min-height: clamp(21rem, 22.25vw, 26rem); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); place-items: center; padding: calc(var(--nav-height) + 1rem) max(5.5%, (100% - 93rem) / 2) 2.75rem; }
.hero-background, .hero-scene::after { position: fixed; inset: 0; width: 100%; height: 100%; }
.hero-background { z-index: -2; object-fit: cover; object-position: 50% 43%; filter: blur(5px); transform: scale(1.035); }
.hero-scene::after { content: ""; z-index: -1; background: linear-gradient(180deg, rgba(21, 19, 24, .35) 0%, rgba(21, 19, 24, .65) 60%, var(--ink) 100%); }
.hero-player-count {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: .12em .28em;
  padding-inline: 1rem;
  color: #f3f6fb;
  font: 900 clamp(1.6rem, 1rem + 2.4vw, 3.3rem)/1 "Nunito", "Arial Rounded MT Bold", var(--body);
  font-size-adjust: cap-height from-font;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 3px 14px #061122cc;
}
.hero-player-count .icon { width: .9em; height: .9em; color: var(--red); }
.online-caption { grid-column: 1 / -1; text-align: center; color: var(--white); font-size: .48em; letter-spacing: .06em; }
.theme-winter .hero-player-count .icon { color: #b9ddf5; }
@media (width > 960px) {
  .hero-player-count { transform: translateX(var(--counter-shift, 0px)); }
}
.hero-inner { position: relative; z-index: 1; isolation: isolate; width: min(80%, 33.6rem); text-align: center; }
.hero-inner::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at center, #ff303c14, #ff303c08 40%, transparent 73%); pointer-events: none; }
.snow-layer { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.snow-behind { z-index: 0; }
.snow-front { z-index: 5; }
.bluemc-mark { position: fixed; z-index: 4; left: max(1rem, env(safe-area-inset-left)); bottom: max(.8rem, env(safe-area-inset-bottom)); display: flex; align-items: center; }
.bluemc-credit { display: flex; align-items: center; gap: .24rem; color: #9eb4d2; opacity: .14; filter: drop-shadow(0 1px 0 #02050a); }
.btn.bluemc-trigger { width: 2.75rem; min-height: 2.75rem; padding: 0; color: color-mix(in srgb, var(--muted) 55%, transparent); list-style: none; }
.bluemc-trigger::-webkit-details-marker { display: none; }
.bluemc-trigger .icon { width: .9rem; height: .9rem; }
.bluemc-trigger:is(:hover, :focus-visible) { color: var(--white); }
.bluemc-disclosure[open] .bluemc-trigger .icon { rotate: 180deg; }
.bluemc-mark img { width: 2.7rem; height: auto; }
.bluemc-label { display: block; width: 6.5rem; height: auto; fill: currentColor; }
.bluemc-powered { font-size: 7px; font-weight: 500; letter-spacing: .58em; }
.bluemc-name { font-size: 22px; font-weight: 650; }
.bluemc-info {
  position: absolute;
  inset: auto auto 100% 0;
  width: min(27rem, calc(100vw - 2rem));
  max-height: 65svh;
  margin-bottom: .35rem;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.15rem;
  border-radius: .9rem;
  color: var(--white);
  background: var(--panel);
  font-size: .875rem;
  line-height: 1.5;
}
.bluemc-info p + p { margin-block-start: .7rem; }

main { display: flex; flex-direction: column; min-height: 100svh; overflow: clip; }
.content { --ground-rise: 1rem; --ground-sides: clamp(10rem, 11.5vw, 14rem); --ground-corner: 1.5rem; position: relative; isolation: isolate; flex: 1; margin-top: -1.1rem; padding-bottom: 3rem; }
.content::before, .content::after { content: ""; position: absolute; z-index: -1; pointer-events: none; background: var(--ink); }
.content::before { inset: calc(-1 * var(--ground-rise)) calc(-1 * var(--ground-rise)) 0; border-radius: 2rem 2rem 0 0; }
.content::after { inset: var(--ground-sides) 0 -16px; box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); }
.dashboard {
  --panel-height: clamp(20rem, 26vw, 27rem);
  display: grid;
  grid-template-columns: minmax(0, 2.025fr) minmax(0, 0fr);
  gap: 0;
  transition: grid-template-columns .32s ease, gap .32s ease;
}
.dashboard.has-players { grid-template-columns: minmax(0, 2.025fr) minmax(0, 1fr); gap: 1.25rem; }
.dashboard::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: calc(var(--ground-sides) - var(--ground-corner));
  inset-inline: calc(-1 * (var(--ground-rise) + var(--ground-corner)));
  height: calc(var(--ground-corner) + 1px);
  background:
    radial-gradient(circle at top left, transparent calc(var(--ground-corner) - .5px), var(--ink) var(--ground-corner)) left top / var(--ground-corner) 100% no-repeat,
    radial-gradient(circle at top right, transparent calc(var(--ground-corner) - .5px), var(--ink) var(--ground-corner)) right top / var(--ground-corner) 100% no-repeat;
}
.map-dialog h2 { font: 550 1.62rem/1.1 var(--body); letter-spacing: -.018em; }
.section-icon { color: var(--red); width: 1.4rem; height: 1.4rem; }
.compact-button { color: var(--muted); padding: .45rem .55rem; }
.compact-button:hover { background: var(--border); color: var(--white); }
.compact-button .icon { width: 1rem; height: 1rem; }

.map-stage, .twitch-screen { position: relative; width: 100%; border-radius: var(--panel-radius); overflow: hidden; }
.map-stage { height: var(--panel-height); background: var(--panel); }
.map-picture { display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.map-picture:focus-visible { outline-offset: -5px; }
.map-stage > .map-picture, .map-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-stage img { width: 100%; height: 100%; object-fit: cover; }
.map-picture-close { width: 100%; cursor: zoom-out; }

.twitch-feature { position: relative; min-width: 0; border-radius: var(--panel-radius); overflow: hidden; }
.twitch-screen { aspect-ratio: 16 / 9; }
.twitch-screen > *, .stream-preview img { position: absolute; inset: 0; width: 100%; height: 100%; }
.twitch-screen img { object-fit: cover; object-position: center 44%; }
.twitch-player { display: block; border: 0; opacity: 0; pointer-events: none; }
.twitch-player[data-loaded] { opacity: 1; pointer-events: auto; }
.stream-preview { display: grid; place-items: center; }
.stream-preview:focus-visible { outline-offset: -5px; }
.stream-play { z-index: 1; display: grid; place-items: center; width: 3.25rem; aspect-ratio: 1; border-radius: 50%; background: rgba(21, 19, 24, .85); color: #fff; }
.stream-preview:hover .stream-play { background: var(--border); }
.stream-play .icon { width: 1.65rem; height: 1.65rem; }
.twitch-status {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .55rem;
  padding: .75rem;
  background: rgb(95 101 109 / .65);
  color: var(--white);
  font-size: .875rem;
}
.twitch-status .offline-play { background: rgb(27 30 35 / .55); }
.btn.stream-next {
  position: absolute;
  z-index: 2;
  inset: 50% .55rem auto auto;
  translate: 0 -50%;
  width: 2.75rem;
  height: 2.75rem;
  padding: .5rem;
  border-radius: 50%;
  color: #fff;
  background: #101822e8;
}
.btn.stream-next:hover { background: var(--border); }

.players-panel { display: flex; flex-direction: column; gap: .65rem; height: var(--panel-height); min-width: 0; padding: 1rem; overflow: hidden; background: var(--panel); border-radius: var(--panel-radius); transition: opacity .25s ease, padding .32s ease, height .32s ease, visibility 0s; }
.dashboard:not(.has-players) .players-panel { visibility: hidden; opacity: 0; padding-inline: 0; transition-delay: 0s, 0s, 0s, .32s; }
.players-panel h2 { display: flex; align-items: center; gap: .55rem; color: var(--white); font-size: 1.05rem; font-weight: 550; }
.players-panel h2 .icon { color: var(--ice, var(--red)); }
.players-status { color: var(--muted); font-size: .875rem; }
.players-list { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border) transparent; list-style: none; padding: .15rem .4rem .15rem 0; }
.players-list > li { display: flex; align-items: center; gap: .75rem; min-height: 3rem; padding: .35rem .55rem; border-radius: .55rem; background: var(--ink); }
.players-list > li + li { margin-top: .35rem; }
.players-list img { width: 2.25rem; height: 2.25rem; border-radius: .35rem; image-rendering: pixelated; }
.players-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-button { margin: .3rem 0 -.3rem -.45rem; }

.map-dialog { position: fixed; inset: 0; margin: auto; width: min(93vw, 75rem); max-width: none; max-height: 92dvh; padding: 0; background: var(--panel); color: var(--white); border: 0; border-radius: var(--panel-radius); }
.map-dialog::backdrop { background: #110e14dc; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1rem .55rem 1.2rem; }
.map-dialog img { width: 100%; height: auto; }
.icon-button { width: 2.6rem; padding: .45rem; }
.icon-button:hover { background: var(--border); }

@media (prefers-reduced-motion: no-preference) {
  .hero-player-count { animation: counter-enter .52s cubic-bezier(.2,.8,.3,1) .18s backwards; }
  .content { animation: ground-enter .85s cubic-bezier(.22,.8,.3,1) backwards; }
  @keyframes ground-enter {
    from { transform: translateY(100vh); }
    76% { transform: translateY(-14px); }
    to { transform: translateY(0); }
  }
  .topbar { animation: navigation-enter .48s cubic-bezier(.2,.8,.3,1) backwards; }

  @keyframes navigation-enter {
    from { translate: 0 -100%; }
    to { translate: 0 0; }
  }
  @keyframes counter-enter {
    from { opacity: 0; translate: 0 .45rem; }
    to { opacity: 1; translate: 0 0; }
  }
  .hero-inner::before { animation: halo-enter .72s ease-out backwards; }
  [data-reveal="waiting"]:not(:focus-within) { opacity: 0; }
  [data-reveal="visible"] { animation: panel-enter .48s cubic-bezier(.19,.75,.3,1) var(--reveal-delay, 0ms) backwards; }
  .map-stage[data-reveal="visible"] { animation-name: map-enter; --reveal-delay: 870ms; }
  .twitch-player { transition: opacity .18s ease-out; }
  .map-dialog[open] { animation: dialog-enter .26s cubic-bezier(.2,.77,.3,1) backwards; }
  .map-dialog[open]::backdrop { animation: backdrop-enter .22s ease-out backwards; }

  @keyframes halo-enter {
    from { opacity: 0; transform: scale(.66); }
    45% { opacity: 1; transform: scale(1.17); }
    to { opacity: 1; transform: none; }
  }
  @keyframes map-enter {
    from { opacity: 0; transform: translateY(1.25rem) scale(.985); }
    to { opacity: 1; transform: none; }
  }
  @keyframes panel-enter {
    from { opacity: 0; transform: translateY(1.25rem) scale(.98); }
    to { opacity: 1; transform: none; }
  }
  @keyframes dialog-enter {
    from { opacity: 0; transform: translateY(.45rem) scale(.985); }
    to { opacity: 1; transform: none; }
  }
  @keyframes backdrop-enter {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
@media (max-width: 1050px) {
  :root { --nav-width: 94vw; }
  .topbar { --nav-padding: 1.1rem; }
  .navigation { gap: 1.25rem; }
}
@media (max-width: 960px) {
  :root { --nav-height: 3.75rem; }
  .dashboard { --panel-height: clamp(13rem, 52vw, 22rem); }
  .dashboard, .dashboard.has-players { grid-template-columns: minmax(0, 1fr); }
  .dashboard.has-players { gap: 1rem; }
  .dashboard:not(.has-players) .players-panel { height: 0; padding: 0; }
  .navigation { width: 100%; border-radius: 0; }
}
@media (max-width: 760px) {
  .content { --ground-rise: .5rem; --ground-sides: 6rem; --ground-corner: .5rem; }
  :root { --panel-radius: 1.1rem; }
  .container { width: calc(100% - 2rem); }
  .discord-button { padding-inline: .75rem; }
  .brand { align-content: center; min-height: 2.75rem; font-size: clamp(1rem, 3.25vw, 1.45rem); }
  .hero-scene {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: .5rem;
    padding: calc(var(--nav-height) + 1.25rem) 1rem 2rem;
  }
  .hero-background { object-position: 47% 41%; }
  .hero-player-count { margin-block: .2rem .55rem; }
  .dashboard { --panel-height: clamp(11.5rem, 53vw, 21rem); }
  main { min-height: calc(100svh - 2.75rem); }
  .content { padding-bottom: 1.25rem; }
  .bluemc-mark { position: relative; inset: auto; width: max-content; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
  .bluemc-info { inset-inline: 50% auto; translate: -50% 0; }
  .bluemc-mark img { width: 1.8rem; }
  .bluemc-label { width: 4.4rem; }
}
@media (max-width: 405px) {
  .navigation { padding-inline: .85rem; }
  .discord-button { width: 2.75rem; }
  .discord-button span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .snow-layer { display: none; }
  .dashboard, .dashboard .players-panel { transition: none; }
}

/* Seasonal palette: remove theme-winter from html to restore the standard theme. */
.theme-winter {
  --ink: #0c1628;
  --bar: #eaf3fc;
  --panel: #142238;
  --red: #e63946;
  --accent-hover: #ff5260;
  --ice: #a8d8f0;
  --gold: #e8c47c;
  --white: #f5f8fc;
  --muted: #9baec2;
  --nav-text: #263648;
  --border: #304b66;
  --accent-glow: rgba(230, 57, 70, .16);
}
.theme-winter .brand { color: var(--nav-text); }
.theme-winter .navigation { background: linear-gradient(180deg, #ffffff80, transparent), var(--bar); box-shadow: inset 0 1px #fff; }
@supports (clip-path: shape(from 0 0, arc to 1px 1px of 1px cw, close)) {
  @media (min-width: 961px) {
    .theme-winter .navigation { background: transparent; box-shadow: none; }
    .theme-winter .topbar::before { background: linear-gradient(180deg, #ffffff80, transparent), var(--bar); }
  }
}
.theme-winter .hero-scene::after { background: radial-gradient(ellipse at 68% 22%, #89cfff26, transparent 38%), linear-gradient(180deg, #142c4859, #0c1628a6 55%, var(--ink) 95%); }
.theme-winter .hero-inner::before { inset: -12% -18%; background: radial-gradient(ellipse, #a8d8f02b, #6baeea0d 48%, transparent 72%); }
.theme-winter .stream-play { background: #101822d9; }
.theme-winter .discord-button { background: #c9283d; box-shadow: 0 3px 12px #c9283d26, inset 0 1px #ffffff24; }
.theme-winter .discord-button:hover { background: var(--accent-hover); }
.theme-winter :focus-visible { outline-color: var(--gold); }.theme-winter .topbar { filter: none; }
.theme-winter .navigation, .theme-winter .topbar::before { background-image: radial-gradient(ellipse at 15% 0, #fff 0, transparent 48%), linear-gradient(180deg, #ffffff80, transparent); }
/* Contour details are static and never capture pointer input. */
.winter-trim { display: none; }
.theme-winter .winter-trim { display: block; position: absolute; inset: 0 0 auto; width: 100%; overflow: visible; pointer-events: none; }
.winter-frost { fill: none; stroke: #eef8ff; stroke-opacity: .8; stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: none; }
.winter-crystals { fill: none; stroke: #fff; stroke-opacity: .65; stroke-width: 5; stroke-dasharray: .5 11 1 17 .5 8; stroke-linecap: round; }
.winter-wire { fill: none; stroke: #786d51; stroke-opacity: .48; stroke-width: .65; }
.winter-light-halo { fill: url(#winter-bulb-glow); opacity: .3; }
.winter-socket { fill: none; stroke: #a68d5d; stroke-width: 1; }
.winter-bulb { fill: #ffd68a; }
.theme-winter .hero-inner::before { inset: -25% -30%; background: radial-gradient(ellipse at center, #b9ddf538, #85bbef12 45%, transparent 72%); }
.theme-winter .hero-scene::after { background: radial-gradient(ellipse at 68% 20%, #89cfff24, transparent 40%), linear-gradient(180deg, #142c4859, #0c1628ad 48%, var(--ink) 86%); }
@media (max-width: 960px) {
  .theme-winter .winter-trim { opacity: .8; }
}

@media (prefers-reduced-motion: no-preference) {
  .theme-winter .winter-bulb, .theme-winter .winter-light-halo {
    animation: winter-light-flicker var(--light-duration, 4s) ease-in-out var(--light-delay, 0s) infinite;
  }
  @keyframes winter-light-flicker {
    0%, 100% { fill: #ffd68a; }
    35% { fill: #d9af68; }
    55% { fill: #efd18b; }
    75% { fill: #c59a59; }
  }
  .theme-winter .winter-light-halo { animation-name: winter-halo-flicker; }
  @keyframes winter-halo-flicker {
    0%, 100% { opacity: .4; }
    35% { opacity: .1; }
    55% { opacity: .28; }
    75% { opacity: .06; }
  }
}

.winter-snow-ridge { fill: #f0f8ff; }
.winter-bulb-reflection { fill: none; stroke: #fff3d0; stroke-width: .55; stroke-linecap: round; opacity: .65; }
.theme-winter .hero-scene::after { background: radial-gradient(ellipse at 68% 20%, #489eea30, transparent 42%), linear-gradient(180deg, #0c315766, #0b2344b8 48%, var(--ink) 86%); }
.theme-winter .content::before { background: radial-gradient(ellipse 70% calc(var(--ground-sides) - var(--ground-corner)) at 50% 0, #14243b, var(--ink) 100%), var(--ink); }
.theme-winter .content::before {
  box-shadow: 0 -1px 2px #c2eeff80, 0 -3px 9px #85ccf04d, 0 -7px 24px #5fb9ec33;
}

.winter-edge-glow {
  fill: none;
  stroke: #ffd68a;
  stroke-width: 3;
  opacity: .7;
  filter: drop-shadow(0 2px 4px #ffd68acc) drop-shadow(0 4px 10px #e8c47c99);
  pointer-events: none;
}
.map-expand, .map-close { position: absolute; z-index: 4; right: .7rem; bottom: .7rem; width: 2.65rem; height: 2.65rem; padding: .65rem; background: var(--panel); color: var(--white); border: 1px solid var(--border); border-radius: .7rem; box-shadow: 0 3px 12px #0004; }
.map-expand:hover, .map-close:hover { background: var(--border); color: var(--ice, var(--white)); }
.map-dialog { width: 80vw; height: 80dvh; max-height: 80dvh; overflow: hidden; box-shadow: 0 20px 80px #0008, 0 0 24px #a8d8f026; outline: none; }
.map-dialog-content { position: absolute; inset: 0; }
.map-dialog-content img { width: 100%; height: 100%; object-fit: contain; }
.map-close { top: .7rem; bottom: auto; }
.map-dialog { transform-origin: top left; }
@media (prefers-reduced-motion: no-preference) { .map-dialog[open] { animation: none; } }
.map-expand, .map-close { right: 8px; width: 32px; height: 32px; min-height: 32px; padding: 6px; border: 0; border-radius: 0; background: #222c; color: #bbb; box-shadow: none; }
.map-expand { bottom: 80px; }
.map-close { top: 48px; }
.map-expand:hover, .map-close:hover { background: #444e; color: #fff; }
.map-expand .icon, .map-close .icon { width: 20px; height: 20px; }

.map-dialog { outline: none; border: 0; }

@media (max-width: 760px) {
  .map-dialog { width: calc(100% - 1.5rem); height: 88dvh; max-height: 88dvh; }
  .map-dialog-content { inset-block-start: 3.25rem; }
  .map-expand, .map-close { width: 2.75rem; height: 2.75rem; min-height: 2.75rem; border-radius: .5rem; }
  .map-expand { bottom: .5rem; }
  .map-close { top: .25rem; }
}

.lightweight-graphics .snow-layer { display: none; }
.lightweight-graphics .hero-background { filter: none; transform: none; }
.lightweight-graphics .winter-edge-glow { filter: none; }
.lightweight-graphics :is(.topbar, .content, .hero-player-count, .winter-bulb, .winter-light-halo),
.lightweight-graphics .hero-inner::before,
.lightweight-graphics .map-dialog[open]::backdrop { animation: none; }
.lightweight-graphics .dashboard, .lightweight-graphics .dashboard .players-panel { transition: none; }
