/* The layout is written from phone to desktop. Colors, radii and shadows come only from the theme variables (themes.css). */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg) url("../img/scene/page-blocks.svg"); color: var(--ink); font: 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
main { flex: 1 0 auto; }
a { color: var(--link); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px var(--focus-style) var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: var(--tracking); }
.wrap {
  max-width: 1204px; margin: 0 auto; width: 100%;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Panels and buttons */
.panel { background: var(--surface); border: var(--edge-w) solid var(--panel-edge); border-radius: var(--radius); box-shadow: var(--panel-shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 8px 16px;
  font: 600 16px/1.2 var(--font-body); text-align: center; text-decoration: none;
  background: var(--btn); color: var(--btn-ink);
  border: 1px solid var(--btn-edge); border-radius: var(--radius-md);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn.primary, .btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.done { background: var(--done); border-color: var(--done); color: var(--done-ink); }
@media (hover: hover) {
  .btn:hover { background: var(--btn-hover); }
  .btn.primary:hover, .btn.on:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn.done:hover { background: var(--done); border-color: var(--done); }
}
.iconbtn {
  flex: none; display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  background: none; color: var(--menu-ink); border: 0; border-radius: var(--radius-md);
  transition: background-color .15s ease;
}
.iconbtn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn .i-dot { fill: currentColor; stroke: none; }
.iconbtn-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i-close, [aria-expanded="true"] .i-menu { display: none; }
[aria-expanded="true"] .i-close { display: inline; }
@media (hover: hover) { .iconbtn:hover { background: var(--menu-hover); } }
/* The last header icon sits at the right edge of the content, not of the button. The menu comes before <nav>, so without the theme button it is second to last */
#theme-toggle, .menu-toggle:nth-last-child(2) { margin-right: var(--icon-edge); }

/* Header */
header.top { background: var(--top-bg); border-bottom: 1px solid var(--top-edge); }
.top-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 68px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: var(--tracking); color: var(--brand-ink); text-decoration: none; }
.logo { flex: none; display: block; width: 32px; height: 32px; }
.logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.menu { order: 3; width: 100%; display: flex; flex-wrap: wrap; gap: 2px 4px; font-weight: 600; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius-pill); color: var(--menu-ink); text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.menu a.on { background: var(--menu-on-bg); color: var(--menu-on); }
@media (hover: hover) { .menu a:hover { background: var(--menu-hover); } .menu a.on:hover { background: var(--menu-on-bg); } }
.menu-toggle { display: none; }
@media (scripting: enabled) and (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .menu { display: none; }
  .menu.open { display: flex; }
}
/* On the narrowest screens the logo and two buttons must stay on one line */
@media (max-width: 359px) {
  .brand { font-size: 18px; gap: 8px; }
  .logo { width: 28px; height: 28px; }
}

.stale { background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; }
.stale .wrap { padding-block: 10px; }

/* The scene made of blocks. The layers repeat along X and do not scale with the screen width, tile sizes are multiples of the block size */
.hero {
  --ground-w: 960px; --ground-h: 48px; --hills-w: 800px; --hills-h: 88px; --hills-lift: 16px;
  --cloud-w: 800px; --cloud-h: 88px;
  --scene-under: 16px; --sky-cut: 20px; --hero-floor: 28px;
  position: relative;
}
@media (min-width: 600px) {
  .hero {
    --ground-w: 1440px; --ground-h: 72px; --hills-w: 1200px; --hills-h: 132px; --hills-lift: 24px;
    --cloud-w: 1200px; --cloud-h: 132px;
    --sky-cut: 30px; --hero-floor: 36px;
  }
}
/* The scene lies under all the content and extends under the start of the catalog, so the relief does not push the cards away */
.scene {
  position: absolute; inset: 0 0 calc(-1 * var(--scene-under)); z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(var(--sky-top), var(--sky-low)) top / 100% calc(100% - var(--sky-cut)) no-repeat;
}
.scene::before, .scene::after { content: ""; position: absolute; }
.scene::before {
  top: 6px; left: 0; width: calc(100% + var(--cloud-w)); height: var(--cloud-h);
  background: url("../img/scene/clouds.svg") 0 0 / var(--cloud-w) var(--cloud-h) repeat-x;
  animation: clouds-drift 600s linear infinite; will-change: transform;
}
@keyframes clouds-drift { to { transform: translate3d(calc(-1 * var(--cloud-w)), 0, 0); } }
.scene::after {
  inset: 0;
  background:
    url("../img/scene/ground-low.svg") center bottom / var(--ground-w) var(--ground-h) repeat-x,
    url("../img/scene/hills.svg") center bottom var(--hills-lift) / var(--hills-w) var(--hills-h) repeat-x;
}
/* Panoramas in the main theme: the server picks a random one, the file is chosen by the screen width and density */
.scene.pano-1 { --pano-s: url("../img/hero/1-800.webp"); --pano-m: url("../img/hero/1-1400.webp"); --pano-l: url("../img/hero/1-2172.webp"); }
.scene.pano-2 { --pano-s: url("../img/hero/2-800.webp"); --pano-m: url("../img/hero/2-1400.webp"); --pano-l: url("../img/hero/2-2172.webp"); }
/* The panorama always has its bottom edge against the page: the picture's own edge is the transition into the background */
:root[data-theme="modern"] .scene { background: var(--pano-s) center bottom / cover no-repeat; }
:root[data-theme="modern"] .scene::before, :root[data-theme="modern"] .scene::after { content: none; }
@media (min-width: 600px), (min-resolution: 2dppx) {
  :root[data-theme="modern"] .scene { background-image: var(--pano-m); }
}
@media (min-width: 1400px), (min-width: 800px) and (min-resolution: 2dppx) {
  :root[data-theme="modern"] .scene { background-image: var(--pano-l); }
}
/* Wide screen: the picture grows in width, and only ground would be left in the window. The main layer is shifted down for the trees and the sky and does not reach the bottom. The bottom edge of the same picture lies on top as a strip of the usual scale, so the transition into the page does not change */
@media (min-width: 1331px) {
  :root[data-theme="modern"] .scene { padding-bottom: 50px; background-position: center calc(100% + clamp(0px, (100vw - 1330px) * .11, 200px)); background-clip: content-box; }
  :root[data-theme="modern"] .scene::after {
    content: ""; inset: auto 0 0; height: 66px;
    background: inherit; background-position: center bottom; background-size: min(100%, 1400px) auto; background-repeat: repeat-x; background-clip: border-box;
    -webkit-mask-image: linear-gradient(transparent, #000 24%); mask-image: linear-gradient(transparent, #000 24%);
  }
}
/* The panorama runs from the top of the window, the header lies over it. The header, banner and content sit in grid rows, so an open menu and the banner push the page and the panorama apart by themselves */
:root[data-theme="modern"] body:has(.scene) { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; }
:root[data-theme="modern"] .hero { display: contents; }
:root[data-theme="modern"] .scene { position: relative; inset: auto; grid-area: 1 / 1 / 4 / 2; margin-bottom: calc(-1 * var(--scene-under)); }
/* Inner pages: the same panorama as a low strip, the third row sets its height under the header */
:root[data-theme="modern"] .scene-low { --scene-under: 8px; }
:root[data-theme="modern"] body:has(.scene-low) { grid-template-rows: auto auto 44px 1fr auto; }
@media (min-width: 861px) { :root[data-theme="modern"] body:has(.scene-low) { grid-template-rows: auto auto 88px 1fr auto; } }
/* The header as in the reference design: a dark blue strip lies on the panorama and becomes more transparent towards the bottom, text and icons are white */
:root[data-theme="modern"] body:has(.scene) header.top {
  grid-area: 1 / 1; border-bottom: 0;
  --brand-ink: var(--top-ink); --menu-ink: var(--top-ink); --menu-on: var(--top-ink); --menu-on-bg: var(--top-on-bg); --menu-hover: var(--top-hover);
  background: var(--top-band) top / 100% 68px no-repeat;
}
:root[data-theme="modern"] body:has(.scene) .brand { border-radius: var(--radius-md); }
/* «Now» in the name in the accent color. The header lies on a dark strip over the panorama, where the accent gives a contrast of about 2:1, so in the header it is lighter */
:root[data-theme="modern"] .brand-now { color: var(--accent); }
:root[data-theme="modern"] .brand .brand-now { color: #a99bff; }
:root[data-theme="modern"] body:has(.scene) .menu a.on { box-shadow: var(--top-on-glow); }
@media (hover: hover) {
  :root[data-theme="modern"] body:has(.scene) .menu a:hover, :root[data-theme="modern"] body:has(.scene) .menu-toggle:hover { box-shadow: var(--top-hover-ring); }
  :root[data-theme="modern"] body:has(.scene) .menu a.on:hover { box-shadow: var(--top-on-glow-hover); }
}
/* The white ring is visible on the dark strip, the dark gap separates it from the light picture and from the active pill */
:root[data-theme="modern"] body:has(.scene) header.top :focus-visible { outline-color: var(--top-ink); box-shadow: 0 0 0 2px var(--top-focus-gap); }
/* On the right of the header there is an avatar with a menu. Visible at all widths: there is no other way to sign in */
:root[data-theme="modern"] .top-actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 861px) {
  :root[data-theme="modern"] .brand { margin-right: 20px; }
  :root[data-theme="modern"] .top-actions { order: 1; }
}
:root[data-theme="modern"] .top-avatar { background: var(--top-pill); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--top-pill-edge); }
/* vertical-align: otherwise the line inside details may end up taller than 44 px because of the baseline */
:root[data-theme="modern"] .top-avatar { display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 6px 0 5px; vertical-align: top; color: var(--top-ink); list-style: none; cursor: pointer; transition: background-color .15s ease; }
:root[data-theme="modern"] .top-avatar::-webkit-details-marker { display: none; }
@media (hover: hover) { :root[data-theme="modern"] .top-avatar:hover { background: var(--top-hover); box-shadow: var(--top-hover-ring); } }
:root[data-theme="modern"] .top-avatar svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="modern"] .top-avatar-face { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--top-face); box-shadow: 0 0 0 2px var(--top-face-edge); }
:root[data-theme="modern"] .top-avatar-face svg { width: 22px; height: 22px; }
/* Avatar of the signed-in user: a little figure on a transparent background; in modern it stands on a tile, in dark directly on the button */
.top-avatar-face img { display: block; width: 30px; height: 30px; object-fit: contain; }
:root[data-theme="modern"] .top-avatar-arrow { width: 20px; height: 20px; transition: transform .15s ease; }
:root[data-theme="modern"] .top-profile[open] .top-avatar-arrow { transform: rotate(180deg); }
:root[data-theme="modern"] .top-profile { position: relative; }
/* A layer above the debug panel (20) but below the connection hint (22). 70 px: the field on the left and the distance from the avatar to the right edge of the screen on a phone */
:root[data-theme="modern"] .top-profile-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 21;
  width: max-content; min-width: 200px; max-width: calc(100vw - 70px); padding: 8px;
  background: var(--pop-bg); color: var(--pop-ink); border-radius: var(--radius); box-shadow: var(--pop-shadow);
}
:root[data-theme="modern"] .top-profile-menu :is(a, button) {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px;
  font: 600 16px/1.2 var(--font-body); color: var(--pop-ink); text-align: left; text-decoration: none;
  background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; transition: background-color .15s ease;
}
@media (hover: hover) { :root[data-theme="modern"] .top-profile-menu :is(a, button):hover { background: var(--pop-hover); } }
/* The white header ring is not visible on a light panel. The selector repeats the general focus rule in the header and is strengthened with the panel class */
:root[data-theme="modern"] body:has(.scene) header.top .top-profile-menu :focus-visible { outline-color: var(--focus); box-shadow: none; }
:root[data-theme="modern"] body:has(.scene) .stale { grid-area: 2 / 1; }
:root[data-theme="modern"] .hero .wrap { grid-area: 3 / 1; }
/* The heading as in the reference design: white letters with a soft dark blue outline read on both the clouds and the saturated sky */
:root[data-theme="modern"] .hero-big { color: var(--hero-title); text-shadow: var(--hero-title-glow); white-space: nowrap; }
:root[data-theme="modern"] .hero-big::before { background-image: url("../img/panels/cube.svg"); }
:root[data-theme="modern"] body:has(.scene) main { grid-area: 4 / 1; }
:root[data-theme="modern"] body:has(.scene) .about { grid-area: 5 / 1; }
:root[data-theme="modern"] body:has(.scene) .foot { grid-area: 6 / 1; }
/* The menu on a phone opens as a card: the second header row already lies on the picture itself */
@media (max-width: 860px) {
  :root[data-theme="modern"] body:has(.scene) .menu { padding: 4px; background: var(--top-card); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--top-pill-edge), var(--pop-shadow); }
}

/* Panel headers from the reference design: the corners as separate images, the middle repeats between them. Each panel sets its own padding */
:root[data-theme="modern"] .filters, :root[data-theme="modern"] .srv-status { border-top: 0; }
:root[data-theme="modern"] .filters::before, :root[data-theme="modern"] .srv-status::before {
  content: ""; display: block; height: 20px; padding-inline: 24px; pointer-events: none;
  border-top-left-radius: inherit; border-top-right-radius: inherit;
  background:
    url("../img/panels/filter-top-left.png") left top / 24px 20px no-repeat border-box,
    url("../img/panels/filter-top-right.png") right top / 24px 20px no-repeat border-box,
    url("../img/panels/filter-top-mid.png") left top / auto 20px repeat-x content-box;
}
:root[data-theme="modern"] .filters::before { margin: -8px -8px 4px; }
:root[data-theme="modern"] .srv-status::before { margin: -20px -20px -6px; }
:root[data-theme="modern"] .card, :root[data-theme="modern"] .srv-head { position: relative; padding-bottom: 30px; }
:root[data-theme="modern"] .card::after, :root[data-theme="modern"] .srv-head::after {
  content: ""; position: absolute; left: calc(-1 * var(--edge-w)); right: calc(-1 * var(--edge-w)); bottom: calc(-1 * var(--edge-w));
  height: 26px; padding-inline: 36px; pointer-events: none; border-radius: 0 0 var(--radius) var(--radius);
  background:
    url("../img/panels/card-bottom-left.png") left bottom / 36px 26px no-repeat border-box,
    url("../img/panels/card-bottom-right.png") right bottom / 36px 26px no-repeat border-box,
    url("../img/panels/card-bottom-mid.png") left bottom / auto 12px repeat-x content-box;
}
@media (min-width: 861px) {
  :root[data-theme="modern"] .card { padding-bottom: 34px; }
  :root[data-theme="modern"] .srv-head { padding-bottom: 36px; }
  :root[data-theme="modern"] .srv-status::before { margin: -24px -24px -10px; }
  /* The panel has no padding on the right (the scrollbar takes its place), so the header stretches only to the left */
  :root[data-theme="modern"] .filters::before { margin-inline: -4px 0; }
}
/* Filter group headings: bold, text color, no icons */
:root[data-theme="modern"] .fgroup h2 { font: 700 15px var(--font-body); color: var(--ink); }
/* Filter rows: instead of a checkbox, an icon of the mode, platform or mark on a tile of its own color, as in the dark theme (the icons are the same).
   The tones are darker than in the dark theme so that they read on a light panel: an icon on a pale tile and a white icon on a filled one are at least 3:1.
   A 24 px tile with a 6 px gap takes the same space as the former checkbox with its gap, so the rows did not get taller and the labels wrap in the same places */
:root[data-theme="modern"] .optrow { --tone: var(--accent); }
:root[data-theme="modern"] .opt .box {
  position: relative; width: 24px; height: 24px; border: 0; border-radius: var(--radius-sm);
  color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, var(--surface));
}
:root[data-theme="modern"] .opt .box svg { display: none; }
:root[data-theme="modern"] .opt .box::before {
  content: ""; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
/* Selected item: the tile is filled with color, the icon is white, a white check mark in the corner; the row is slightly tinted with the same color */
:root[data-theme="modern"] .opt.on .box { color: #ffffff; background: var(--tone); }
:root[data-theme="modern"] .opt.on .box::after {
  content: ""; position: absolute; right: -4px; bottom: -4px; width: 13px; height: 13px; border-radius: 50%;
  background: #ffffff url("../img/dark/icons/check-badge.svg") center / 9px no-repeat; box-shadow: 0 0 0 1.5px var(--tone);
}
:root[data-theme="modern"] .optrow:has(.opt.on) { background: color-mix(in srgb, var(--tone) 8%, transparent); }
@media (hover: hover) { :root[data-theme="modern"] .optrow:has(.opt.on):has(.opt:hover) { background: color-mix(in srgb, var(--tone) 13%, transparent); } }
/* No servers: the tile is gray and pale, like the label */
:root[data-theme="modern"] .opt.zero .box { filter: grayscale(1); opacity: .55; }
@media (min-width: 861px) { :root[data-theme="modern"] .opt { gap: 6px; } }
:root[data-theme="modern"] .optrow:has(> [data-key="Platform-java"]) { --tone: #be6302; --icon: url("../img/dark/icons/java.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Platform-bedrock"]) { --tone: #0d8d63; --icon: url("../img/dark/icons/bedrock.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-anarchy"]) { --tone: #ed1747; --icon: url("../img/dark/icons/anarchy.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-survival"]) { --tone: #108d62; --icon: url("../img/dark/icons/survival.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-bedwars"]) { --tone: #cb4c91; --icon: url("../img/dark/icons/bedwars.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-skywars"]) { --tone: #0a889b; --icon: url("../img/dark/icons/skywars.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-skyblock"]) { --tone: #6a72dc; --icon: url("../img/dark/icons/skyblock.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-pvp"]) { --tone: #c95b0b; --icon: url("../img/dark/icons/pvp.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-grief"]) { --tone: #a450f2; --icon: url("../img/dark/icons/grief.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-vanilla"]) { --tone: #747d88; --icon: url("../img/dark/icons/vanilla.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-minigames"]) { --tone: #977901; --icon: url("../img/dark/icons/minigames.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-clans"]) { --tone: #3178eb; --icon: url("../img/dark/icons/clans.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Mode-economy"]) { --tone: #5e890d; --icon: url("../img/dark/icons/economy.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Access-license"]) { --tone: #397dcf; --icon: url("../img/dark/icons/license.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Access-pirate"]) { --tone: #707e92; --icon: url("../img/dark/icons/pirate.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Flag-newbie"]) { --tone: #098e40; --icon: url("../img/dark/icons/newbie.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Flag-unchecked"]) { --tone: #ac6e0a; --icon: url("../img/dark/icons/unchecked.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Flag-reported"]) { --tone: #d34c64; --icon: url("../img/dark/icons/reported.svg"); }
:root[data-theme="modern"] .optrow:has(> [data-key="Flag-hidden"]) { --tone: #7c7c85; --icon: url("../img/dark/icons/hidden.svg"); }
/* The filters have no «?»: on a computer with a mouse the explanation of the mode pops up to the right of the row on hover or when it is reached from the keyboard, as in the dark theme.
   The hint is anchored to the row (anchor positioning) and stands outside the panel's scroll, so the scroll does not clip it; near the bottom edge of the screen it rises above the row.
   On touch screens, narrow windows and in browsers without anchoring the explanation is not visible, the link still points to it for reading with a screen reader */
@keyframes opt-hint-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (hover: hover) and (min-width: 861px) {
  @supports (position-area: right) {
    /* The sticky panel is its own layer, and the cards on the right are drawn over it together with the hint. While the hint is visible the panel is above them */
    :root[data-theme="modern"] .filters:has(.opt-hint):is(:has(.opt:hover), :has(.opt:focus-visible)) { z-index: 3; }
    :root[data-theme="modern"] .optrow:is(:has(.opt:hover), :has(.opt:focus-visible)) { anchor-name: --opt-hint; }
    :root[data-theme="modern"] .optrow:is(:has(.opt:hover), :has(.opt:focus-visible)) .opt-hint {
      display: block; position: fixed; inset: auto; z-index: 25; width: 280px; margin: -4px 0 0 20px; pointer-events: none;
      position-anchor: --opt-hint; position-area: right span-bottom; position-try-fallbacks: flip-block;
      font-size: 15px; line-height: 1.5;
      animation: opt-hint-in .18s var(--ease-expo) .25s backwards;
    }
  }
}
/* «30 серверов» ("30 servers"): a block with grass, a large number, the word in the regular style */
:root[data-theme="modern"] .reshead h2 { font-size: 22px; }
:root[data-theme="modern"] .reshead h2 span { font-size: 20px; font-weight: 400; color: var(--ink); }
:root[data-theme="modern"] .reshead h2::before {
  content: ""; display: inline-block; vertical-align: -6px; margin-right: 10px; width: 28px; height: 28px;
  background: url("../img/panels/cube.svg") center / contain no-repeat;
}
/* Cards as in the dark theme, in the main theme's colors: on hover they rise, the border lights up, the picture zooms in.
   The icon and the number stay in place. The border is a shadow, not a border color: the bottom of the border is covered by the grass strip */
:root[data-theme="modern"] .card { transition: transform .3s var(--ease-expo), box-shadow .3s ease; }
:root[data-theme="modern"] .card-art { transition: filter .3s ease, object-view-box .6s var(--ease-expo); object-view-box: inset(0); }
@media (hover: hover) {
  :root[data-theme="modern"] .card:hover { box-shadow: var(--card-hover-ring), var(--card-hover-glow); }
  :root[data-theme="modern"] .card.down:hover { box-shadow: 0 0 0 2px var(--field-edge), var(--panel-shadow); }
  :root[data-theme="modern"] .card:not(.down):hover .card-art { filter: saturate(1.15) brightness(1.05); object-view-box: inset(3.5%); }
}
/* The lift is only on a wide screen: on a narrow one the hint is position: fixed, and shifting the card would shift the hint with it.
   The card's stretched link is lowered by the lift height and the border: otherwise, after the lift, the cursor at the bottom edge ends up below the card,
   the hover is lost, the card goes back down, and so on in a loop: the card jitters */
@media (hover: hover) and (min-width: 861px) {
  :root[data-theme="modern"] .card:hover { transform: translateY(-4px); }
  :root[data-theme="modern"] .card:hover h3 a::after { bottom: calc(-4px - var(--edge-w)); }
}
/* Cards slide up from below when they are shown on scroll. The animation is tied to scroll and acts only until they appear,
   so it does not interfere with the lift on hover. Browsers without animation-timeline show everything at once */
@keyframes card-rise { from { transform: translateY(24px) scale(.98); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :root[data-theme="modern"] .card { animation: card-rise linear backwards; animation-timeline: view(); animation-range: entry 0% entry 50%; }
  }
}
/* Rank in the results: «#1», «#2»… in the corner of the card, the first three are gold, silver and bronze.
   «Показать ещё» ("Show more") appends cards to the same list, so the count continues. The number is not read by a screen reader */
:root[data-theme="modern"] .list { counter-reset: rank; }
:root[data-theme="modern"] .list > .card { counter-increment: rank; }
:root[data-theme="modern"] .list > .card::before {
  content: "#" counter(rank); content: "#" counter(rank) / "";
  position: absolute; z-index: 3; top: -9px; left: -7px; min-width: 32px; padding: 2px 8px; text-align: center; pointer-events: none;
  font: 800 12px/1.4 var(--font-body); color: var(--rank-ink); font-variant-numeric: tabular-nums;
  background: var(--rank-bg); border-radius: 9px; box-shadow: var(--rank-shadow);
}
:root[data-theme="modern"] .list > .card:nth-child(1)::before { color: var(--rank-1-ink); background: var(--rank-1); box-shadow: var(--rank-1-shadow); }
:root[data-theme="modern"] .list > .card:nth-child(2)::before { color: var(--rank-2-ink); background: var(--rank-2); box-shadow: var(--rank-2-shadow); }
:root[data-theme="modern"] .list > .card:nth-child(3)::before { color: var(--rank-3-ink); background: var(--rank-3); box-shadow: var(--rank-3-shadow); }
/* In the «Сетка» ("Grid") and «Список» ("List") views the number is in the top right corner, inside the card, as in the tiles: there is only a picture there, and on the left the icon and the name. On a phone (up to 640 px) it stays on the left */
@media (min-width: 640px) {
  :root[data-theme="modern"]:is([data-view="grid"], [data-view="list"]) .list > .card::before { top: 8px; right: 8px; left: auto; }
  /* In «Сетка» the name reaches the right edge, so there is room on its right for the number (up to «#100») */
  :root[data-theme="modern"][data-view="grid"] .list > .card h3 { padding-right: 48px; }
}
/* The server is up: a wave spreads from the green dot */
@keyframes dot-pulse { 0% { opacity: .75; transform: scale(1); } 70%, to { opacity: 0; transform: scale(2.6); } }
:root[data-theme="modern"] .sd-stat[data-state="online"] .dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
:root[data-theme="modern"] :is(.online, .srv-status, .sd-stat)[data-state="online"] .dot { position: relative; }
:root[data-theme="modern"] :is(.online, .srv-status, .sd-stat)[data-state="online"] .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--good); animation: dot-pulse 2.2s ease-out infinite;
}

/* Search */
.hero .wrap { display: grid; gap: 10px; padding-block: 4px var(--hero-floor); }
/* The layer of search panel decorations exists only in the dark theme */
.hero-deco { display: none; }
.hero-big { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: var(--tracking); font-size: clamp(30px, 5.6vw, 42px); line-height: 1.1; }
.hero-big::before { content: ""; flex: none; width: 32px; height: 32px; background: url("../img/scene/cube.svg") center / contain no-repeat; }
@media (min-width: 600px) { .hero-big::before { width: 36px; height: 36px; } }
.searchbox { position: relative; }
/* The submit button is shown only in the adventure theme: in the main theme the search runs on input and Enter */
.search-go { display: none; }
.search-ico { position: absolute; left: 18px; top: 14px; width: 24px; height: 24px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.searchbox input[type="search"] {
  display: block; width: 100%; height: 52px; padding: 0 20px 0 54px;
  font: 500 18px var(--font-body); background: var(--surface); color: var(--ink);
  border: 2px solid var(--hero-edge); border-radius: var(--radius); box-shadow: var(--hero-shadow);
  -webkit-appearance: none; appearance: none; transition: border-color .15s ease, box-shadow .15s ease;
}
@media (hover: hover) { .searchbox input[type="search"]:hover { border-color: var(--accent); box-shadow: var(--hero-shadow-hover); } }
.searchbox input[type="search"]:focus { outline: none; border-color: var(--accent); box-shadow: var(--hero-ring), var(--hero-shadow); }
.searchbox input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
.searchbox input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 15;
  padding: 8px; max-height: 40vh; overflow-y: auto;
  background: var(--pop-bg); color: var(--pop-ink); border-radius: var(--radius); box-shadow: var(--pop-shadow);
}
.suggest button { display: flex; width: 100%; align-items: center; gap: 12px; min-height: 44px; border: 0; border-radius: var(--radius-sm); background: none; padding: 6px 10px; text-align: left; color: var(--pop-ink); }
.suggest button.sel { background: var(--pop-hover); }
@media (hover: hover) { .suggest button:hover { background: var(--pop-hover); } }
.suggest .k { margin-left: auto; color: var(--pop-muted); font-size: 14px; text-align: right; }
.suggest svg, .suggest img { width: 28px; height: 28px; flex: none; border-radius: var(--radius-xs); image-rendering: pixelated; shape-rendering: crispEdges; }
.suggest .tagico { width: 28px; height: 28px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); border-radius: var(--radius-xs); font: 700 14px var(--font-display); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero:has(#q:not(:placeholder-shown)) .examples { display: none; }
.examples a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 14px; border-radius: var(--radius-pill); background: var(--hero-edge); border: 2px solid var(--hero-on); box-shadow: var(--hero-shadow); font: 600 14px var(--font-body); color: var(--hero-on); text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
@media (hover: hover) { .examples a:hover { background: var(--hero-on); border-color: var(--hero-edge); color: var(--accent-text); box-shadow: var(--hero-shadow-hover); } }
.examples a:focus-visible { outline: 3px solid var(--hero-on); outline-offset: 0; box-shadow: 0 0 0 6px var(--focus), var(--hero-shadow); }

/* Catalog */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 8px 56px; align-items: start; }
.filters { padding: 8px; }
.fgroup { padding: 12px 8px; border-top: var(--divider-w) solid var(--line); }
.fgroup:first-child { border-top: 0; }
.fgroup h2 { margin: 0 0 6px; padding-inline: 6px; font: 600 14px var(--font-body); letter-spacing: 0; color: var(--muted); }
/* The row: checkbox, name, number on the right. The link is stretched over the whole row through ::after, so the number and the empty space are clickable too */
.optrow { position: relative; display: flex; align-items: center; gap: 4px; border-radius: var(--radius-sm); transition: background-color .15s ease; }
.opt { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 6px; color: inherit; text-decoration: none; font-size: 16px; }
.opt::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-sm); }
.opt:focus-visible { outline: none; }
.opt:focus-visible::after { outline: 3px var(--focus-style) var(--focus); outline-offset: 2px; }
.opt .label { min-width: 0; }
.opt .box { width: 22px; height: 22px; flex: none; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--field-edge); border-radius: var(--radius-xs); color: var(--accent-ink); transition: background-color .15s ease, border-color .15s ease; }
.opt .box svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.opt.on .box { background: var(--accent); border-color: var(--accent); }
.opt.on .box svg { visibility: visible; }
.opt.on .label { font-weight: 600; }
.optrow .n { flex: none; margin-left: auto; padding-inline: 4px 6px; color: var(--muted); font: 500 14px var(--font-display); font-variant-numeric: tabular-nums; }
.opt.zero, .pill.zero { color: var(--muted); }
@media (hover: hover) { .optrow:has(.opt:hover) { background: var(--surface-2); } }
.pills { display: flex; flex-wrap: wrap; gap: 6px; padding-inline: 6px; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 4px 12px; font: 600 14px var(--font-display); background: var(--surface-2); color: var(--btn-ink); border-radius: var(--radius-pill); text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.pill.on { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .pill:not(.on):hover { background: var(--accent-soft); color: var(--accent-text); } }
.filters-done { display: none; }

@media (scripting: enabled) and (max-width: 860px) {
  .filters { display: none; }
  .filters.open { display: block; position: fixed; inset: 0; z-index: 30; overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px env(safe-area-inset-bottom, 0px); border: 0; border-radius: 0; box-shadow: none; }
  .filters.open .filters-done { display: block; position: sticky; z-index: 2; bottom: 0; padding: 12px 8px; background: var(--surface); border-top: 1px solid var(--line); }
  .filters-done .btn { width: 100%; min-height: 52px; }
}

/* The page heading above the results: on a mode page there is an explanation under it */
.restitle { margin: 0 0 12px; font-size: clamp(22px, 4.6vw, 28px); line-height: 1.15; }
.reslead { margin: -4px 0 16px; max-width: 70ch; }
.reshead { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.reshead h2 { margin: 0; font-size: 20px; }
.reshead h2 span { color: var(--muted); font-weight: 500; }
/* On a phone «Фильтры» ("Filters") and the sort go on one line, the heading below and only when searching */
@media (max-width: 860px) {
  .reshead h2 { order: 3; flex-basis: 100%; }
  .reshead h2.all { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
#mobfilters { display: none; }
@media (scripting: enabled) and (max-width: 860px) { #mobfilters { display: inline-flex; min-height: 44px; } }
.sort { display: none; margin-left: auto; gap: 4px; flex-wrap: wrap; }
.sort .btn { min-height: 36px; padding: 6px 14px; font-size: 14px; border-radius: var(--radius-pill); }
.sort-select { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.sort-select label { display: flex; gap: 6px; align-items: center; }
.sort-select select {
  min-height: 44px; padding: 8px 34px 8px 14px;
  font: 600 16px var(--font-body); color: var(--ink);
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat;
  border: 1.5px solid var(--field-edge); border-radius: var(--radius-md);
  -webkit-appearance: none; appearance: none;
}

/* Catalog view: there is something to choose from only where two columns fit */
.view-toggle { display: none; gap: 2px; padding: 2px; background: var(--surface); border: 1px solid var(--btn-edge); border-radius: var(--radius-pill); }
@media (scripting: enabled) and (min-width: 1064px) { .view-toggle { display: inline-flex; } }
.view-toggle .iconbtn { color: var(--muted); border-radius: var(--radius-pill); transition: background-color .15s ease, color .15s ease; }
.view-toggle .iconbtn:focus-visible { position: relative; z-index: 1; }
.view-toggle svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.view-toggle [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
@media (pointer: fine) { .view-toggle .iconbtn { width: 38px; height: 34px; } }
@media (hover: hover) {
  .view-toggle .iconbtn:hover { background: var(--accent-soft); color: var(--accent-text); }
  .view-toggle [aria-pressed="true"]:hover { background: var(--accent-hover); color: var(--accent-ink); }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 4px 0 14px; background: var(--accent-soft); color: var(--accent-text); border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; }
.chip a { width: 28px; height: 28px; display: grid; place-items: center; color: inherit; font: 500 18px var(--font-display); line-height: 1; text-decoration: none; border-radius: var(--radius-pill); transition: background-color .15s ease; }
@media (hover: hover) { .chip a:hover { background: var(--btn); } }
.reset { color: var(--link); font-size: 14px; margin-left: 6px; }

.list { display: grid; gap: 12px; }
/* «Показать ещё» stands after the list, not in it: in the grid the cards choose their styling by their neighbors and number */
.more { display: flex; justify-content: center; margin-top: 20px; }
.more .btn { min-width: min(100%, 240px); min-height: 48px; padding-inline: 28px; border-radius: var(--radius-pill); }
.more .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.card { --card-bg: var(--surface); --art-w: min(58%, 340px); --art-fade: linear-gradient(90deg, transparent 4%, rgb(0 0 0 / .14) 40%, #000 86%), linear-gradient(rgb(0 0 0 / .4), #000 50%); position: relative; isolation: isolate; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px 14px; padding: 16px; align-items: center; }
.card > * { min-width: 0; }
.card.down { --card-bg: var(--surface-2); background: var(--card-bg); box-shadow: none; }
/* isolate locks the hint inside the card, so a card with an open hint is raised above its neighbors */
.card:has(.tip[open]) { z-index: 25; }
/* The corners are rounded at the picture itself: overflow on the card would clip the hint and the grass. The server page header (.srv-art) draws only its own server picture the same way, and sets the width with its own --art-w */
.card-art, .srv-art {
  position: absolute; z-index: -1; top: 0; right: 0; height: 100%; width: var(--art-w); object-fit: cover;
  border-radius: 0 calc(var(--radius) - var(--edge-w)) calc(var(--radius) - var(--edge-w)) 0;
  -webkit-mask-image: var(--art-fade); mask-image: var(--art-fade); -webkit-mask-composite: source-in; mask-composite: intersect;
}
.card.down .card-art, .srv-head.down .srv-art { filter: grayscale(1); opacity: .45; }
/* The label may extend onto the picture: a soft halo in the card color separates the letters from any drawing, on white it is invisible */
.card :is(h3 a, .slogan, .meta, .online > span, .plat-head:not(.only), .plat-meta) { text-shadow: 0 0 2px var(--card-bg), 0 0 6px var(--card-bg), 0 0 12px var(--card-bg); }
/* The hint lies inside .meta and would inherit the light halo on a dark background */
.card .tip-body { text-shadow: none; }
/* The server's own picture takes its width by proportions so that the logo in the center stays whole. One that is too narrow or too wide is cropped by cover */
.card-art:not(.pano), .srv-art:not(.pano) { --art-fade: linear-gradient(90deg, transparent, rgb(0 0 0 / .3) 18%, #000 42%); width: auto; min-width: 140px; max-width: calc(var(--art-w) * 1.12); }
/* Fallback picture: a piece of the panorama, ground at the bottom. The numbers sometimes coincide for neighbors, in the grid and for every other card: then the second one takes a different piece */
.card-art.pano { object-position: var(--art-x) 100%; }
.art-1 { --art-x: 2%; } .art-1:is(.art-1 + *, .art-1 + * + *) { --art-x: 65%; }
.art-2 { --art-x: 16%; } .art-2:is(.art-2 + *, .art-2 + * + *) { --art-x: 95%; }
.art-3 { --art-x: 30%; } .art-3:is(.art-3 + *, .art-3 + * + *) { --art-x: 9%; }
.art-4 { --art-x: 44%; } .art-4:is(.art-4 + *, .art-4 + * + *) { --art-x: 23%; }
.art-5 { --art-x: 58%; } .art-5:is(.art-5 + *, .art-5 + * + *) { --art-x: 37%; }
.art-6 { --art-x: 72%; } .art-6:is(.art-6 + *, .art-6 + * + *) { --art-x: 51%; }
.art-7 { --art-x: 86%; } .art-7:is(.art-7 + *, .art-7 + * + *) { --art-x: 65%; }
.art-8 { --art-x: 100%; } .art-8:is(.art-8 + *, .art-8 + * + *) { --art-x: 79%; }
@media (min-width: 640px) {
  .card { --art-w: min(46%, 340px); --art-fade: linear-gradient(90deg, transparent 8%, rgb(0 0 0 / .12) 42%, #000 82%), linear-gradient(rgb(0 0 0 / .3), #000 60%); }
}
/* Here the card is tall, and the slogan and the reliability row run almost the full width: the server's own picture is narrower and the text does not reach its opaque part */
@media (min-width: 640px) and (max-width: 999px) {
  .card-art:not(.pano) { max-width: 260px; }
  .card:has(.card-art:not(.pano)) .slogan { padding-right: 26%; }
}
.info { display: contents; }
a.ava { display: block; border-radius: var(--radius-icon); }
.ava svg, .ava img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--radius-icon); shape-rendering: crispEdges; image-rendering: pixelated; }
.card h3 { margin: 0; font-size: 20px; line-height: 1.2; display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
/* The name is shown in full in all views: a long one wraps, a word longer than the line breaks, the icons move to the next line */
.card h3 a { min-width: 0; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
/* The whole card leads to the server page: the link in the name is stretched over the card through ::after. The tag links, hints and the address field
   lie above it and work as before. The name clipping (overflow: hidden) does not affect the stretched layer: its block is the card */
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
/* The tag itself is raised, not the link in it: a tag can shift on hover (transform), then its content goes to a separate layer and would end up under the stretched link */
.card :is(.tag:has(> a), a.badge, .tip, .ip) { position: relative; z-index: 2; }
.card:has(h3 a:focus-visible) { outline: 3px var(--focus-style) var(--focus); outline-offset: 2px; }
.card h3 a:focus-visible { outline: none; }
@media (hover: hover) { .card h3 a:hover { color: var(--accent-text); } }
.badge { display: inline-flex; align-items: center; padding: 2px 10px; font: 600 14px/1.5 var(--font-body); letter-spacing: 0; background: var(--gold); color: var(--badge-ink); border-radius: var(--radius-pill); }
.badge.newbie { background: var(--newbie); color: var(--newbie-ink); }
.badge.offb { background: var(--red); color: var(--on-red); }
/* Likes: a red heart, the number in the regular text color */
.like-icon { flex: none; width: 1.1em; height: 1.1em; fill: var(--bad); }
.badge.likes { gap: 4px; background: var(--surface-2); color: var(--ink); }
.btn.primary .like-icon { fill: currentColor; }
.like-btn { justify-self: start; gap: 8px; white-space: nowrap; }
.like-btn .like-num { color: var(--muted); font-weight: 500; }
.slogan, .tags, .meta { grid-column: 1 / -1; }
.slogan { margin: 0; color: var(--muted); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; font-size: 14px; background: var(--surface-2); color: var(--ink); border-radius: var(--radius-pill); }
.tag.hit { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.card.down .tag { background: var(--surface); }
/* A tag on the server page: the link takes the whole tag tile, «?» lies over its right edge */
.tag > a { align-self: stretch; display: inline-flex; align-items: center; margin: -2px -10px; padding: 2px 10px; color: inherit; text-decoration: none; border-radius: inherit; }
a.badge { text-decoration: none; }
@media (hover: hover) {
  .tag:has(> a:hover) { background: var(--accent-soft); color: var(--accent-text); }
  a.badge:hover { filter: brightness(.94); }
}
mark { background: var(--mark); color: var(--mark-ink); padding: 0 2px; border-radius: var(--radius-xs); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--muted); font-size: 14px; }

/* Explanations open on press: details works without JS too */
.tip { display: inline-block; position: relative; }
.tip summary { list-style: none; cursor: pointer; }
.tip summary::-webkit-details-marker { display: none; }
.tip summary:not(.tip-text) { display: inline-grid; place-items: center; width: 24px; height: 24px; font: 600 14px var(--font-body); background: var(--hint); color: var(--hint-ink); border-radius: var(--radius-pill); }
.tip-text { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--field-edge); text-underline-offset: 3px; }
.tip-body {
  position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 25;
  padding: 12px 14px; font-size: 16px; font-weight: 400;
  background: var(--tip-bg); color: var(--tip-ink); border-radius: var(--radius-md); box-shadow: var(--pop-shadow);
}
@media (min-width: 861px) {
  .tip-body { position: absolute; left: 0; right: auto; bottom: auto; top: calc(100% + 6px); width: 280px; }
}
/* The filter explanation to show on hover. The theme rules show it on a computer with a mouse, otherwise it is only for screen reading */
.opt-hint { display: none; }

.stats { grid-column: 1 / -1; display: grid; gap: 16px; font-size: 16px; }
.plat { display: grid; gap: 6px; align-content: start; }
.plat + .plat { border: 0 solid var(--line); border-top-width: var(--divider-w); padding-top: 16px; }
.card.down .plat + .plat { border-color: var(--surface); }
.plat-head { font-size: 14px; font-weight: 500; color: var(--muted); }
.plat-head.only { justify-self: start; padding: 2px 10px; font-weight: 600; background: var(--gold); color: var(--badge-ink); border-radius: var(--radius-pill); }
.plat-meta { color: var(--muted); font-size: 14px; }
.online { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 8px; align-items: center; }
.online > span:not(.dot) { color: var(--muted); }
.dot { width: 10px; height: 10px; background: var(--muted); border-radius: var(--radius-pill); box-shadow: 0 0 0 3px var(--idle-soft); }
.online[data-state="online"] .dot, .srv-status[data-state="online"] .dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.online[data-state="offline"] .dot, .srv-status[data-state="offline"] .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.online b { color: var(--ink); font: 700 28px/1.1 var(--font-display); letter-spacing: var(--tracking); }
.online > span.state-text { font-weight: 600; color: var(--ink); }
.xp { grid-column: 1 / -1; height: 6px; overflow: hidden; background: var(--xp-track); border-radius: var(--radius-pill); }
.xp progress { display: block; width: 100%; height: 100%; border: 0; background: none; -webkit-appearance: none; appearance: none; }
.xp progress::-webkit-progress-bar { background: none; }
.xp progress::-webkit-progress-value { background: var(--xp-value); border-radius: var(--radius-pill); }
.xp progress::-moz-progress-bar { background: var(--xp-value); border-radius: var(--radius-pill); }
/* The address and the copy icon in one field. The script copies on a click anywhere in the field */
.ip { display: flex; align-items: center; margin-top: 6px; background: var(--surface-2); border-radius: var(--radius-sm); transition: background-color .15s ease; }
/* An address without spaces breaks anywhere: balance splits it in half instead of leaving a couple of letters on the second line */
.ip code { flex: 1 1 0; min-width: 0; font: 500 14px var(--font-mono); background: none; padding: 8px 10px; border-radius: var(--radius-sm); overflow-wrap: anywhere; text-wrap: balance; }
/* The address sits on one line: a long one shrinks to the field width but not below --addr-min. The field is a container, 100cqi is its width
   without padding. The address length is written by the server (data-len, Present.AddressFitLength), in a monospace font each character is .6 em wide,
   with a .01 em margin for rounding. An address that is too long even for --addr-min stays at the normal size and wraps, as before:
   the clamp term is zero while the fitted font is not smaller than --addr-min, and immediately 1em when it is smaller.
   The field height does not change: the line is held by the font of the field itself */
:is(.ip, .address) code { container-type: inline-size; }
:is(.ip, .address) [data-len] {
  --fit: calc(100cqi / (var(--len) * .61));
  font-size: min(1em, var(--fit) + clamp(0px, (var(--addr-min, 10px) - var(--fit)) * 1000, 1em));
}
[data-len="18"] { --len: 18; } [data-len="20"] { --len: 20; } [data-len="22"] { --len: 22; } [data-len="24"] { --len: 24; }
[data-len="26"] { --len: 26; } [data-len="28"] { --len: 28; } [data-len="30"] { --len: 30; } [data-len="32"] { --len: 32; }
[data-len="34"] { --len: 34; } [data-len="36"] { --len: 36; } [data-len="38"] { --len: 38; } [data-len="40"] { --len: 40; }
.card.down .ip { background: var(--surface); }
.ip .copy-icon { flex: none; background: none; color: var(--muted); border-radius: var(--radius-sm); transition: color .15s ease; }
.ip .copy-icon svg { width: 20px; height: 20px; }
.ip .copy-icon .i-done { display: none; }
.ip .copy-icon.done .i-copy { display: none; }
.ip .copy-icon.done .i-done { display: block; animation: copy-pop .26s cubic-bezier(.34, 1.56, .64, 1); }
.ip .copy-icon:focus-visible { outline-offset: -3px; }
@media (pointer: fine) { .ip .copy-icon { width: 36px; height: 36px; } }
@media (scripting: enabled) { .ip[data-copy-area] { cursor: pointer; } }
@media (hover: hover) and (scripting: enabled) {
  .ip[data-copy-area]:hover { background: var(--accent-soft); }
  .ip[data-copy-area]:hover .copy-icon { background: none; color: var(--accent-text); }
}
/* The address is copied: the field is green all the time while .done is set, a short flash around it only when animations are enabled */
.ip[data-copy-area]:has(.done) { background: var(--done); animation: copy-flash .45s ease-out; }
.ip[data-copy-area]:has(.done) .copy-icon { color: var(--done-ink); }
@keyframes copy-pop { from { transform: scale(.3); opacity: 0; } }
@keyframes copy-flash { from { box-shadow: 0 0 0 0 var(--good-soft); } to { box-shadow: 0 0 0 8px transparent; } }
/* This address does not work, although the server has another working one */
.plat-down { color: var(--on-red); font-weight: 600; }

.empty { padding: 28px; display: grid; gap: 12px; justify-items: start; }
.empty h1, .empty h3 { margin: 0; font-size: 20px; }
.empty p { margin: 0; color: var(--muted); }
.status-page { padding-block: 40px; }

.joinhelp {
  position: fixed; z-index: 22;
  left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px));
  padding: 20px; max-height: 70vh; overflow-y: auto; box-shadow: var(--pop-shadow);
}
@keyframes joinhelp-in { from { opacity: 0; transform: translateY(8px); } }
.joinhelp:not([hidden]) { animation: joinhelp-in .2s ease; }
.joinhelp h2 { margin: 0 44px 12px 0; font-size: 20px; }
.joinhelp-warn { margin: 12px 0 0; color: var(--muted); }
.joinhelp-warn:empty { display: none; }
.joinhelp-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; background: none; border: 0; border-radius: var(--radius-pill); font: 500 24px/1 var(--font-display); color: var(--muted); }
@media (hover: hover) { .joinhelp-close:hover { background: var(--surface-2); } }

/* Footer: a call to action for owners, a panel with a description and four groups of links, a strip «Смотри также» ("See also") with all modes,
   at the bottom the number of players, the copyright and documents. On a phone the groups are collapsed: a checkbox before the heading opens the list
   even without JS. From 700 px there is no checkbox, the lists are open */
.foot { margin-top: auto; background: var(--foot-bg); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot .wrap { padding-block: 28px calc(16px + env(safe-area-inset-bottom, 0px)); }
.foot p { margin: 0; }
.foot a { color: var(--muted); text-decoration: none; }
@media (hover: hover) { .foot a:hover { color: var(--link); text-decoration: underline; } }

.foot-cta { display: grid; gap: 16px; margin-bottom: 20px; padding: 20px; background: var(--surface); border: var(--edge-w) solid var(--panel-edge); border-radius: var(--radius); box-shadow: var(--panel-shadow); }
.foot-cta-copy { display: grid; justify-items: start; gap: 6px; }
.foot-cta-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--done-ink); background: var(--done); border-radius: var(--radius-pill); }
.foot-cta-check { display: none; }
.foot .foot-cta-title { font: 700 22px/1.15 var(--font-display); letter-spacing: var(--tracking); color: var(--ink); }
.foot-cta-title span { color: var(--accent-text); }
.foot-cta-text { max-width: 560px; color: var(--muted); line-height: 1.55; }
.foot-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.foot .foot-cta-actions .btn { min-height: 44px; text-decoration: none; }
.foot .foot-cta-actions .btn.primary { color: var(--accent-ink); }
.foot .foot-cta-actions .btn:not(.primary) { color: var(--btn-ink); }
.foot-arrow { display: none; }

.foot-brand { display: grid; justify-items: start; gap: 12px; padding-bottom: 20px; }
.foot .foot-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 700 20px var(--font-display); letter-spacing: var(--tracking); color: var(--ink); text-decoration: none; }
.foot-about { max-width: 640px; line-height: 1.7; }
.foot-about strong { color: var(--ink); }
.foot .foot-about a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.foot .foot-mail {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; overflow-wrap: anywhere;
  font-weight: 600; color: var(--btn-ink); background: var(--btn); border: 1px solid var(--btn-edge); border-radius: var(--radius-md);
}
.foot-mail-icon { flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("../img/social/mail.svg") center / contain no-repeat; mask: url("../img/social/mail.svg") center / contain no-repeat; }

.foot-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.foot-group { position: relative; border-bottom: 1px solid var(--line); }
.foot-main > .foot-group:first-of-type { border-top: 1px solid var(--line); }
.foot-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.foot-title label { display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; }
.foot-title label::after {
  content: ""; flex: none; width: 8px; height: 8px; margin: -4px 6px 0 auto;
  border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .25s ease, margin .25s ease;
}
.foot-toggle:checked ~ .foot-title label::after { margin-top: 4px; transform: rotate(225deg); }
.foot-toggle:focus-visible ~ .foot-title label { outline: 3px var(--focus-style) var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.foot-title-icon { display: none; }
.foot-links { display: none; margin: 0; padding: 0 0 12px; list-style: none; }
.foot-links[data-cols="5"] { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.foot-toggle:checked ~ .foot-links { display: grid; }
.foot-links a { display: inline-block; padding: 5px 0; }
.foot .foot-more a { color: var(--accent-text); font-weight: 600; }

.foot-explore { padding-top: 20px; }
.foot .foot-explore-label { margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.foot-bottom { display: grid; justify-items: center; gap: 14px; padding-top: 20px; text-align: center; }
.foot-live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); }
.foot-live b { color: var(--ink); }
.foot-live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.foot-note { font-size: 13px; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.foot .foot-legal a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; font-size: 13px; border: 1px solid var(--line); border-radius: var(--radius-pill); }
.foot-wordmark { display: none; }
@media (min-width: 700px) {
  .foot-cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 24px 28px; }
  .foot-main { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 28px; }
  .foot-brand { grid-column: 1 / -1; padding-bottom: 0; }
  .foot-toggle { display: none; }
  .foot-group, .foot-main > .foot-group:first-of-type { border: 0; }
  .foot-title { margin-bottom: 8px; }
  .foot-title label { min-height: 0; cursor: auto; }
  .foot-title label::after { content: none; }
  .foot-links { display: grid; padding: 0; }
  .foot-links[data-cols="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }
  .foot-explore { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
  .foot .foot-explore-label { margin-bottom: 12px; }
  .foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 28px; padding-block: 18px 4px; border-top: 1px solid var(--line); }
}
@media (min-width: 1100px) {
  .foot-main { grid-template-columns: minmax(0, 1.55fr) repeat(4, minmax(0, 1fr)); gap: 36px; }
  .foot-brand { grid-column: auto; padding-right: 16px; }
  .foot-links[data-cols="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* The copyright in the middle, the badge with the numbers on the left, the documents on the right */
  .foot-bottom { display: grid; grid-template-columns: 1fr auto 1fr; }
  .foot-live { justify-self: start; }
  .foot-copy { grid-column: 2; }
  .foot-legal { justify-self: end; justify-content: flex-end; }
}
/* The «Как играть» ("How to play") sections that the footer links lead to: in the dark theme the header lies over the page */
.help-page > section[id] { scroll-margin-top: 112px; }

/* The server page. The layout depends on the width of the page column (container), not the window: next to the filter column it is narrower.
   The filter column and the search strip are at the end of the file, after the desktop rules they override */
.srv-col { container-type: inline-size; min-width: 0; }
.server-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* The address and the chart side by side, when there is room left for the chart */
@container (min-width: 780px) {
  .server-page { grid-template-columns: 360px minmax(0, 1fr); }
  .server-page > :not(.srv-status, .chart) { grid-column: 1 / -1; }
  .server-page .chart { --chart-h: 240px; }
}
/* Servers / Mode / Name: a long name wraps instead of being clipped */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; color: var(--muted); font-weight: 600; }
.crumbs > [aria-current] { flex: 0 1 auto; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--muted); text-decoration: none; }
@media (hover: hover) { .crumbs a:hover { color: var(--accent-text); } }
/* The server's own picture lies behind the header, like on a card in the list (the .srv-art rules are next to .card-art). There is no piece of panorama in its place here: without a picture the header stays without one.
   isolate keeps the picture above the panel background and locks the hint, so a header with an open hint rises above the panels below */
.srv-head { --art-w: min(58%, 340px); position: relative; isolation: isolate; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px 16px; padding: 20px; align-items: center; }
.srv-head:has(.tip[open]) { z-index: 25; }
.srv-info { display: contents; }
.srv-head h1 { margin: 0; font-size: clamp(26px, 6vw, 36px); line-height: 1.15; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
/* The halo in the panel color separates the letters from the picture. The «Новый» ("New") badge has its own background, the halo on it is superfluous */
.srv-head :is(h1, .slogan) { text-shadow: 0 0 2px var(--surface), 0 0 6px var(--surface), 0 0 12px var(--surface); }
.srv-head h1 .badge { text-shadow: none; }
/* While the slogan runs the full width of the header, it stops to the left of the opaque part of the picture */
@media (max-width: 860px) {
  .srv-head:has(.srv-art) .slogan { padding-right: 112px; }
}
/* The header is wider than a card and almost empty on the right: the picture takes its width by proportions but may be wider than on a card */
@media (min-width: 640px) {
  .srv-head { --art-w: min(50%, 560px); }
}
/* The server community (Pages/Shared/_ServerLinks.cshtml): a button with a service icon on a tile of its color.
   The colors and icons of the services are shared by all themes and the contacts page (.contact), each theme draws the buttons themselves in its own way */
.srv-links { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.srv-links-label { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.srv-head .srv-links-label { text-shadow: 0 0 2px var(--surface), 0 0 6px var(--surface), 0 0 12px var(--surface); }
.srv-links ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.srv-link { justify-content: flex-start; gap: 10px; min-height: 44px; padding: 6px 14px 6px 6px; white-space: nowrap; }
.srv-link-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--link-icon) center / 20px no-repeat, var(--link-tile); }
.srv-link-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.srv-link[data-link="site"] { --link-tone: #14a37f; --link-tile: #14a37f; --link-icon: url("../img/social/site.svg"); }
:is(.srv-link, .contact)[data-link="discord"] { --link-tone: #5865f2; --link-tile: #5865f2; --link-icon: url("../img/social/discord.svg"); }
:is(.srv-link, .contact)[data-link="vk"] { --link-tone: #0077ff; --link-tile: #0077ff; --link-icon: url("../img/social/vk.svg"); }
:is(.srv-link, .contact)[data-link="telegram"] { --link-tone: #27a6e5; --link-tile: #27a6e5; --link-icon: url("../img/social/telegram.svg"); }
.srv-link[data-link="max"] { --link-tone: #7b5cff; --link-tile: linear-gradient(135deg, #3fb4ff, #8a3dff); --link-icon: url("../img/social/max.svg"); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs .btn { min-height: 44px; border-radius: var(--radius-pill); padding-inline: 18px; }
.srv-status, .srv-section { padding: 20px; display: grid; gap: 14px; align-content: start; }
.srv-section h2, .srv-status h2 { margin: 0; font-size: 20px; }
.srv-about p { margin: 0; }
.srv-about code { font: 500 15px var(--font-mono); overflow-wrap: anywhere; }
/* The server's detailed description (Pages/Shared/_Description.cshtml): paragraphs and lists as plain text, links are not clickable */
.srv-desc { overflow-wrap: anywhere; }
.srv-desc p { margin: 0; }
.desc-list { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.bigstate { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 10px; font-size: 16px; font-weight: 600; }
.bs-text { display: contents; }
.bs-sep { display: none; }
.bs-count { grid-column: 1 / -1; font-size: 18px; font-weight: 500; color: var(--muted); }
.bs-count b { font: 700 clamp(48px, 13vw, 60px)/1.1 var(--font-display); letter-spacing: -.03em; color: var(--ink); margin-right: 2px; }
.address { display: grid; gap: 10px; }
.address-fields { display: grid; gap: 8px; }
.field-label { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
.address code { display: block; font: 500 15px var(--font-mono); background: var(--surface-2); padding: 12px 14px; border-radius: var(--radius-md); overflow-wrap: anywhere; }
.address .btn { min-height: 52px; font-size: 16px; width: 100%; }
.srv-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; margin: 0; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; min-height: 28px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; display: grid; place-items: center; font: 700 14px var(--font-display); background: var(--accent-soft); color: var(--accent-text); border-radius: var(--radius-pill); }
.warn { margin: 0; padding: 10px 14px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 500; border-radius: var(--radius-md); }
.note { margin: 0; color: var(--muted); }

.chart { --chart-h: 200px; }
.chart-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.ranges { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.ranges .btn { min-height: 36px; padding: 6px 14px; font-size: 14px; border-radius: var(--radius-pill); }

/* Moderation (Pages/Shared/_ServerAdmin.cshtml): a calm block with no colors of its own, one row per action.
   On the left a label or a button, on the right a switch or an explanation; when there is not enough room, the right part goes under the left one */
.srv-section.admin-tools { padding: 14px 20px 6px; gap: 2px; }
.admin-tools h2 { font: 600 14px var(--font-body); letter-spacing: 0; color: var(--muted); }
.mod-actions { margin: 0; padding: 0; list-style: none; }
.mod-actions > li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-block: 10px; }
.mod-actions > li + li { border-top: var(--divider-w) solid var(--line); }
.mod-actions > li > :first-child { flex: none; min-width: 11rem; }
.mod-actions .note { flex: 1 1 18em; font-size: 14px; }
.mod-label { font-size: 15px; font-weight: 600; }
/* The server's response to a poll: a paragraph per address, MOTD as is, with its own line breaks */
.mod-poll { display: grid; gap: 6px; }
.mod-poll p { margin: 0; overflow-wrap: anywhere; }
.mod-poll img { float: left; margin: 2px 8px 0 0; border-radius: 4px; image-rendering: pixelated; }
.mod-motd { white-space: pre-wrap; font-family: var(--font-mono); }
.mod-findings { color: var(--warn-ink); }
/* «Присоединить» ("Attach"): the address field and the button on one line */
.mod-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-inline input {
  flex: 1 1 12rem; min-width: 0; min-height: 36px; padding: 6px 10px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.mod-actions > li > .warn { flex: 1 1 100%; }
/* «Поправить карточку» ("Edit the card") expands right in the block: a button row, under it a form. Field styles are in owners.css */
.mod-actions > li > .mod-edit { flex: 1 1 100%; min-width: 0; }
.mod-edit > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; cursor: pointer; list-style: none; }
.mod-edit > summary::-webkit-details-marker { display: none; }
.mod-edit > summary > .btn { flex: none; min-width: 11rem; }
.mod-edit[open] > summary > .btn { color: var(--ink); background: var(--surface-2); }
.mod-edit > form { max-width: 640px; margin-top: 14px; }
.admin-tools .btn { min-height: 36px; padding: 6px 14px; font-size: 15px; }
/* Rating is a short number, the field does not need the full row width */
.mod-rating input { flex: 0 1 9rem; font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .admin-tools .btn { min-height: 44px; } }

/* Comments on the server: the list from oldest to newest, the form under it */
.comment-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.comment-list li { display: grid; gap: 4px; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-md); }
.comment-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.comment-list .comment-report { border-left: 4px solid var(--muted); }
.comment-reason { margin: 0; font-weight: 600; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.comment-meta .btn { font-size: 14px; }
.comment-ava { display: inline-block; width: 28px; height: 28px; margin-right: 6px; vertical-align: middle; object-fit: contain; }
@media (pointer: fine) { .comment-meta .btn { min-height: 32px; padding: 4px 12px; } }
.comment-form { display: grid; gap: 8px; max-width: 640px; }
.comment-form .btn { justify-self: start; min-height: 48px; }

/* Report: the reasons in the comment form are collapsed until opened. details works without JS too */
.report summary { min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report summary::after { content: "▾"; color: var(--muted); }
.report[open] summary::after { content: "▴"; }
.report form { margin-top: 8px; }
.report-reasons { display: grid; min-width: 0; margin: 0; padding: 0; border: 0; }
.report-reasons legend { padding: 0; margin-bottom: 4px; }
.report-reasons label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.report-reasons input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.comment-form textarea {
  display: block; width: 100%; min-height: 48px; padding: 10px 14px; resize: vertical;
  font: 16px/1.4 var(--font-body); background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--field-edge); border-radius: var(--radius-md);
}
.comment-form textarea:focus { border-color: var(--focus); }
.report-ok { margin: 0; padding: 10px 14px; font-weight: 500; background: var(--done); color: var(--done-ink); border-radius: var(--radius-md); }
.plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; }
.yaxis { display: flex; flex-direction: column; justify-content: space-between; text-align: right; color: var(--muted); font-size: 14px; line-height: 1; height: var(--chart-h); font-variant-numeric: tabular-nums; }
.chart svg { display: block; width: 100%; height: var(--chart-h); cursor: pointer; background: var(--chart-bg); border-block: 1px solid var(--chart-grid); }
/* The browser outlines SVG on press. The focus frame is needed only from the keyboard */
.chart svg:focus:not(:focus-visible) { outline: none; }
.bar { fill: var(--chart-bar); rx: var(--bar-radius); transform: translateY(var(--bar-radius)); transition: fill .12s ease; }
.bar.down { fill: var(--chart-down); }
.bar.sel { fill: var(--chart-sel); }
.grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.xaxis { grid-column: 2; display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.xaxis .extra { display: none; }
.chart-read { min-height: 24px; margin: 0; font-weight: 600; }
.chart-read:empty { min-height: 0; margin-bottom: -14px; }
.insight { margin: 0; font-weight: 600; }

/* Help page */
.help-page { padding-block: 24px 56px; display: grid; gap: 16px; max-width: 860px; }
.help-page h1 { margin: 0; font-size: clamp(28px, 6vw, 40px); line-height: 1.1; }
.glossary { display: grid; gap: 6px 20px; margin: 0; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0 0 8px; color: var(--muted); }
@media (min-width: 640px) {
  .glossary { grid-template-columns: 160px minmax(0, 1fr); }
  .glossary dd { margin-bottom: 0; }
}

/* The contacts page (Pages/Contacts.cshtml): a panel as wide as the documents, with cards inside, each with a service icon on a tile of its color,
   like the community buttons on the server page. Two per row on a computer, one under another on a phone.
   The «Скоро» ("Soon") placeholder (div.contact.soon) is not pressable: the tile is gray and pale, the text is muted, no hover */
.contacts-page { padding-block: 24px 40px; }
.contacts-panel { max-width: 820px; margin-inline: auto; padding: 20px; display: grid; gap: 16px; }
.contacts-panel h1 { margin: 0; font-size: clamp(26px, 6vw, 32px); line-height: 1.15; }
.contacts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.contacts li { display: grid; min-width: 0; }
.contact {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; min-height: 72px; padding: 12px 16px 12px 12px;
  color: var(--ink); text-decoration: none; background: var(--btn); border: 1px solid var(--btn-edge); border-radius: var(--radius-md);
  transition: background-color .15s ease, border-color .15s ease;
}
.contact-ico { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 12px; background: var(--link-icon) center / 26px no-repeat, var(--link-tile); }
.contact-name { grid-column: 2; align-self: end; font-weight: 700; line-height: 1.3; }
/* A long email wraps anywhere and does not stick out of the card */
.contact-value { grid-column: 2; align-self: start; min-width: 0; font-size: 14px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.contact[data-link="mail"] { --link-tone: var(--accent); --link-tile: var(--accent); --link-icon: url("../img/social/mail.svg"); }
.contact.soon { cursor: default; background: var(--surface-2); border-style: dashed; }
.contact.soon .contact-ico { filter: grayscale(1); opacity: .45; }
.contact.soon .contact-name { color: var(--muted); }
/* On hover the background is the accent, not gray: the placeholders are filled with gray */
@media (hover: hover) { a.contact:hover { background: var(--accent-soft); border-color: var(--accent); } }
@media (min-width: 640px) {
  .contacts-panel { padding: 32px; }
  .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* The text about the catalog under the results on the home page */
.about { padding-block: 0 56px; }
.about-body { padding: 20px; display: grid; gap: 12px; max-width: 860px; }
.about-body h2 { margin: 0; font-size: 20px; }
.about-body h3 { margin: 8px 0 0; font-size: 17px; }
.about-body p { margin: 0; }
.about-modes { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Touch screens: all pressable elements are at least 44×44 */
@media (pointer: coarse) {
  .btn, .sort .btn, .ranges .btn, .pill, .reset { min-height: 44px; }
  .pill { min-width: 44px; }
  .opt { min-height: 44px; }
  .optrow { min-height: 48px; }
  .chip { min-height: 44px; }
  .chip a { width: 44px; height: 44px; }
  /* The «?» circle stays small, while the press area is 44×44 and does not push the row apart */
  .tip summary:not(.tip-text) { width: 44px; height: 44px; background: radial-gradient(circle, var(--hint) 12px, transparent 12.5px); }
  .tag .tip summary:not(.tip-text) { margin: -11px -10px -11px -6px; }
  .tag > a { margin-block: -11px; padding-block: 11px; }
  .tip-text { display: inline-flex; align-items: center; min-height: 44px; }
  .card .meta { margin-top: -8px; }
  .reset { display: inline-flex; align-items: center; }
  .crumbs a, .foot a, .srv-section > a { min-height: 44px; display: inline-flex; align-items: center; }
  /* A name in several lines: the 44 px height is made up by padding, not flex, otherwise highlighting the found text (<mark>) would tear the line into parts */
  .card h3 a { min-height: 44px; padding-block: calc((44px - 1lh) / 2); }
}
/* Without JS these buttons do nothing. The rule comes after the touch screens block, otherwise .btn would override it */
@media (scripting: none) { .menu-toggle, #theme-toggle, [data-copy] { display: none; } }

/* Desktop */
@media (min-width: 861px) {
  .brand { margin-right: 8px; }
  .menu { order: 0; width: auto; margin-right: auto; }
  .menu a { min-height: 40px; }
  .hero {
    --ground-w: 1600px; --ground-h: 128px; --hills-w: 1600px; --hills-h: 176px; --hills-lift: 52px;
    --cloud-w: 1600px; --cloud-h: 176px;
    --scene-under: 8px; --sky-cut: 52px; --hero-floor: 36px;
  }
  .scene::after {
    background:
      url("../img/scene/trees.svg") center bottom / 1600px 224px repeat-x,
      url("../img/scene/ground.svg") center bottom / var(--ground-w) var(--ground-h) repeat-x,
      url("../img/scene/hills.svg") center bottom var(--hills-lift) / var(--hills-w) var(--hills-h) repeat-x;
  }
  .hero .wrap { justify-items: center; text-align: center; }
  .hero-big { gap: 14px; }
  .hero-big::before { width: 40px; height: 40px; }
  .searchbox { width: min(720px, 100%); }
  .searchbox input[type="search"] { font-size: 20px; }
  .examples { justify-content: center; }
  .layout { grid-template-columns: 232px minmax(0, 1fr); gap: 24px; }
  /* The scrollbar is not hidden in any theme. A thin one: the regular one in a 232 px panel takes 17 px, and words in the labels break in the middle.
     There is no padding on the right: the gap is given by the scrollbar itself, and the labels wrap the same as without it */
  .filters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; padding-inline: 4px 0; }
  /* The panel width is chosen so that the longest label word («Гриферский» — "Griefer") stands on one line together with the counter. The browser may have no hyphenation dictionary, so hyphens is only a fallback */
  .fgroup { padding-inline: 4px; }
  .fgroup h2, .pills { padding-inline: 4px; }
  .opt { gap: 8px; padding-inline: 4px; }
  .optrow .n { padding-right: 4px; }
  .opt .label { hyphens: auto; overflow-wrap: break-word; }
  .list { gap: 16px; }
  .sort { display: flex; }
  .sort-select { display: none; }
  .card { grid-template-columns: 64px minmax(0, 1fr); gap: 14px 20px; padding: 20px; align-items: start; }
  .info { display: grid; gap: 8px; grid-column: 2; }
  .stats { gap: 12px; }
  .joinhelp { left: auto; right: 24px; bottom: 24px; width: 400px; }
  .srv-head { grid-template-columns: 88px minmax(0, 1fr); gap: 24px; padding: 24px; }
  .srv-info { display: grid; gap: 10px; }
  .srv-status, .srv-section { padding: 24px; }
  .xaxis .extra { display: inline; }
}
/* Three columns only where the middle one has enough room */
@media (min-width: 1000px) {
  .card { grid-template-columns: 64px minmax(0, 1fr) 360px; }
  .stats { grid-column: auto; }
}
/* Two platforms side by side: narrower than this width a long address does not fit on a line */
@media (min-width: 1064px) {
  .card:has(.plat + .plat) .info { grid-column: 2 / -1; }
  .card:has(.plat + .plat) .stats { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
  .card:has(.plat + .plat) .online { grid-column: 1 / -1; }
  .card:has(.plat + .plat) .plat + .plat { border-top-width: 0; border-left-width: var(--divider-w); padding-top: 0; padding-left: 16px; }
  /* An address without a label has fewer rows, the address fields must stand level */
  .card:has(.plat + .plat) .plat { align-content: end; }
}
/* Grid: two cards per row. 1064 is the width at which a card is not narrower than 380 px: (1064 − 32 margins − 232 panel − 24 gap − 16 between cards) / 2 */
@media (min-width: 1064px) {
  :root[data-view="grid"] .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root[data-view="grid"] .list > .empty { grid-column: 1 / -1; }
  :root[data-view="grid"] .card { --art-w: 36%; --art-fade: linear-gradient(90deg, transparent 8%, rgb(0 0 0 / .14) 42%, #000 86%), linear-gradient(rgb(0 0 0 / .3), #000 60%); }
  /* Compact card. The cards in a row are of the same height: the free space goes into the gap above the addresses, so the bottom of the card is always filled */
  :root[data-view="grid"] .card { grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 8px 12px; padding: 10px 14px 28px; }
  :root[data-view="grid"] .card .info { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  :root[data-view="grid"] .card h3 { font-size: 18px; }
  :root[data-view="grid"] .card .slogan { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--slogan-lines, 1); overflow: hidden; font-size: 15px; line-height: 1.35; }
  /* The server's own picture is opaque up to the top, the panorama is paler at the top. A long slogan stops where the picture shows */
  :root[data-view="grid"] .card:has(.card-art:not(.pano)) .slogan { padding-right: 26%; }
  /* Tags on one line: the extra ones go to a hidden second line as a whole, rather than being clipped in the middle. A tag that matched the search comes first */
  :root[data-view="grid"] .card .tags { max-height: var(--tags-h, 25px); overflow: hidden; }
  :root[data-view="grid"] .card .tag.hit { order: -1; }
  /* Next to it is a card with two addresses, it is taller. The free space is taken by the slogan and tags: two lines each instead of emptiness */
  :root[data-view="grid"] .card:nth-child(odd):not(:has(.plat + .plat)):has(+ .card .plat + .plat),
  :root[data-view="grid"] .card:has(.plat + .plat) + .card:nth-child(even):not(:has(.plat + .plat)) { --slogan-lines: 2; --tags-h: 56px; }
  /* Details (reliability, version, fill level) stay in the list and on the server page */
  :root[data-view="grid"] .card .meta, :root[data-view="grid"] .card .plat-meta, :root[data-view="grid"] .card .xp { display: none; }
  /* One address: online and the platform in the top row, the address field under it. The .plat wrapper is expanded, so its parts stand directly in the .stats grid */
  :root[data-view="grid"] .card .stats { grid-column: 1 / -1; align-self: end; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  :root[data-view="grid"] .card .plat { display: contents; }
  :root[data-view="grid"] .card .online { grid-row: 1; }
  :root[data-view="grid"] .card .online b { font-size: 20px; }
  :root[data-view="grid"] .card .online > span:not(.dot) { font-size: 14px; line-height: 1.1; }
  :root[data-view="grid"] .card .plat-head { grid-column: 2 / -1; grid-row: 1; line-height: 1.3; }
  :root[data-view="grid"] .card .ip { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
  :root[data-view="grid"] .card .ip code { padding-block: 6px; }
  /* Two addresses or a label by an address: online on top, below one row per address. The label on the left, the field on the right. The label does not lie on the picture, so it needs no backing */
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .stats { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .online { grid-row: auto; }
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0 8px; align-items: center; }
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat + .plat { border-left-width: 0; padding-left: 0; }
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat-head { grid-column: 1; }
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .ip { grid-column: 2; grid-row: 1; }
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat:not(:has(.plat-head)) .ip { grid-column: 1 / -1; }
  /* The address does not work: the label is long and goes on its own line, the field full width under it */
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat:has(.plat-down) { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  :root[data-view="grid"] .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat:has(.plat-down) .ip { grid-column: 1 / -1; grid-row: 2; }
}
/* Phone: a compact card like «Сетка», but at any data-view: there is no switcher here, and the cookie may hold list. Details stay on the server page */
@media (max-width: 639px) {
  .card { grid-template-columns: 48px minmax(0, 1fr); gap: 8px 12px; padding: 10px 14px; align-items: start; }
  :root[data-theme="modern"] .card { padding-bottom: 28px; }
  .card .info { display: grid; grid-column: 2; grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .card h3 { font-size: 18px; }
  /* The press area is 44 px, negative margins keep it from pushing the row apart */
  .card h3 a { margin-block: -11px; padding-block: 11px; }
  /* The same is already stated in the online row, and next to a long icon only one letter of the name was left */
  .card h3 .badge.offb { display: none; }
  .card .slogan { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; font-size: 15px; line-height: 1.35; }
  /* The server's own picture is opaque up to the top and fitted to the card height, so its width hardly depends on the screen: a pixel offset keeps the text and tags to the left of the logo */
  .card:has(.card-art:not(.pano)) :is(.slogan, .tags) { padding-right: 104px; }
  /* Extra tags go to a hidden second line as a whole, the tag itself does not wrap */
  .card .tags { max-height: 25px; overflow: hidden; white-space: nowrap; }
  .card .tag.hit { order: -1; }
  .card .meta, .card .plat-meta, .card .xp { display: none; }
  /* One address: online and the platform label on top, the field under them */
  .card .stats { grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; }
  .card .plat { display: contents; }
  .card .online { grid-row: 1; }
  .card .online b { font-size: 20px; }
  .card .online > span:not(.dot) { font-size: 14px; line-height: 1.1; }
  .card .plat-head { grid-column: 2; grid-row: 1; justify-self: end; line-height: 1.3; text-align: right; }
  .card .plat-head.only { text-align: center; }
  .card .ip { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
  /* break-all gives balance break points, otherwise a couple of port digits is left on the second line */
  .card .ip code { padding: 4px 2px 4px 8px; word-break: break-all; }
  /* 44 px height for a finger, the field stays 36 px. The icon is narrower than usual: the whole field is pressable, and the address needs width */
  .card .ip .copy-icon { width: 36px; height: 44px; margin-block: -4px; }
  /* Two addresses or a label by an address: online on top, the addresses below. The label stands above the field: beside it the field is narrow, the label wraps to two lines, and the address breaks in the middle. The label does not lie on the picture, so it needs no backing */
  .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .stats { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .online { grid-row: auto; }
  .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat + .plat { border-top-width: 0; padding-top: 0; }
  .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .plat-head { grid-column: 1; justify-self: start; text-align: left; }
  .card:is(:has(.plat + .plat), :has(.plat-head:not(.only))) .ip { grid-column: 1; grid-row: auto; }
}
/* Tiles: portrait cards, as many fit in a row as the width allows. On top a picture with the player count in the corner,
   below an icon with the name, the slogan, the modes and the address. The .info and .stats wrappers are expanded, their parts stand directly in the card grid.
   On a phone the compact card remains (the max-width: 639px rules), so tiles start from 640 px */
@media (min-width: 640px) {
  :root[data-view="tiles"] .list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; }
  :root[data-view="tiles"] .list > .empty { grid-column: 1 / -1; }
  :root[data-view="tiles"] .card {
    grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
    grid-template-areas: "art art" "ava title" "slogan slogan" "tags tags";
    gap: 8px 10px; padding: 0 12px 12px; align-items: center; align-content: start;
  }
  :root[data-view="tiles"] .card .info, :root[data-view="tiles"] .card .stats { display: contents; }
  :root[data-view="tiles"] .card .card-art {
    grid-area: art; position: static; z-index: auto; display: block;
    width: calc(100% + 24px); min-width: 0; max-width: none; height: auto; aspect-ratio: 16 / 9; margin: 0 -12px 4px;
    object-fit: cover; -webkit-mask-image: none; mask-image: none;
    border-radius: calc(var(--radius) - var(--edge-w)) calc(var(--radius) - var(--edge-w)) 0 0;
  }
  :root[data-view="tiles"] .card a.ava { grid-area: ava; }
  :root[data-view="tiles"] .card h3 { grid-area: title; font-size: 16px; }
  /* The same is stated by the badge with the player count on the picture */
  :root[data-view="tiles"] .card h3 .badge.offb { display: none; }
  :root[data-view="tiles"] .card .slogan { grid-area: slogan; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 14px; line-height: 1.35; }
  /* Modes on one line: the extra ones go to a hidden second line as a whole. The row takes the free height, so the addresses in a row stand level */
  :root[data-view="tiles"] .card .tags { grid-area: tags; align-self: start; max-height: 25px; overflow: hidden; }
  :root[data-view="tiles"] .card .tag.hit { order: -1; }
  :root[data-view="tiles"] .card :is(.meta, .plat-meta, .xp) { display: none; }
  /* The player count lies on the picture, in its bottom left corner */
  :root[data-view="tiles"] .card .online {
    grid-area: art; align-self: end; justify-self: start; gap: 6px; margin: 0 0 12px -4px; padding: 2px 10px 2px 8px;
    background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: var(--radius-pill); box-shadow: var(--panel-shadow);
  }
  :root[data-view="tiles"] .card .online b { font-size: 15px; }
  :root[data-view="tiles"] .card .online > span:not(.dot) { font-size: 13px; }
  :root[data-view="tiles"] .card .plat { grid-column: 1 / -1; gap: 2px; }
  :root[data-view="tiles"] .card .plat + .plat { border-width: 0; padding: 0; }
  :root[data-view="tiles"] .card .plat-head { font-size: 13px; line-height: 1.3; }
  /* The field in a tile is the narrowest: the address may become a pixel smaller than in other views, as long as it fits on one line */
  :root[data-view="tiles"] .card .ip { --addr-min: 9px; margin-top: 0; }
  :root[data-view="tiles"] .card .ip code { padding: 6px 2px 6px 8px; font-size: 13px; word-break: break-all; }
  /* In the main theme there is a grass strip under the card */
  :root[data-theme="modern"][data-view="tiles"] .card { padding-bottom: 34px; }
  /* The rank in the results lies inside the picture, as in the dark theme */
  :root[data-theme="modern"][data-view="tiles"] .list > .card::before { top: 8px; left: 8px; }
  /* A filter on the picture on hover makes it a separate layer, and it would lie over the badge with the player count */
  :root[data-theme="modern"][data-view="tiles"] .card .online { position: relative; }
}
/* «Список» in the main theme is laid out as in the dark one: the player count is one line at the top of the column with addresses, like the badge of the dark theme,
   not a big number with a strip under it. The fill strip, which the dark theme does not have, sits on the same line to the right of the number,
   so the line is not taller than the badge and the labels with addresses stand in the same places. On a phone (up to 640 px) the compact card remains */
@media (min-width: 640px) {
  :root[data-theme="modern"][data-view="list"] .card .online { grid-template-columns: auto auto minmax(0, 1fr); gap: 0 8px; min-height: 26px; }
  :root[data-theme="modern"][data-view="list"] .card .online b { font-size: 20px; }
  :root[data-theme="modern"][data-view="list"] .card .online > span:not(.dot) { font-size: 14px; line-height: 1.1; }
  :root[data-theme="modern"][data-view="list"] .card .xp { grid-column: 3; margin-left: 4px; }
}
/* The column with addresses on the right starts at the top edge, and the rank number stands right above the end of the strip: the strip does not reach it (room for «#100») */
@media (min-width: 1000px) {
  :root[data-theme="modern"][data-view="list"] .card .xp { margin-right: 40px; }
}
/* Two addresses side by side: the line with the number is under the description above both addresses, the rank number does not interfere with it.
   The strip ends level with the first address field (16 px is the gap between the columns) */
@media (min-width: 1064px) {
  :root[data-theme="modern"][data-view="list"] .card:has(.plat + .plat) .online { width: calc((100% - 16px) / 2); }
  :root[data-theme="modern"][data-view="list"] .card:has(.plat + .plat) .xp { margin-right: 0; }
}
/* The server page: on the left the catalog filter column (Pages/Shared/_ServerSideFilters.cshtml), as on the home page, with the search above it.
   Below 1100 px there is no column: «Фильтры» in the search strip opens it as a panel on the left over a dimmed backdrop; it is closed by the cross,
   a press outside and Escape (Scripts/panels.ts). Without the script the column stays in place: on a phone under the page, on wider screens on the left */
.srv-bar, .filters-close { display: none; }
@media (min-width: 861px) {
  .srv-layout > .filters { grid-area: 1 / 1; }
  .srv-layout > .srv-col { grid-area: 1 / 2; }
}
@keyframes drawer-in { from { transform: translateX(-104%); } }
@keyframes scrim-in { from { opacity: 0; } }
@media (scripting: enabled) and (max-width: 1099px) {
  .srv-layout.layout { grid-template-columns: minmax(0, 1fr); }
  .srv-layout > .srv-col { grid-area: auto; }
  .srv-layout > .filters { display: none; }
  .srv-layout > .filters.open {
    display: block; position: fixed; z-index: 30; inset: 0 auto 0 0; width: min(340px, 88vw); max-height: none;
    overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px env(safe-area-inset-bottom, 0px);
    border: 0; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--pop-shadow); animation: drawer-in .3s var(--ease-expo);
  }
  .srv-layout:has(> .filters.open)::before { content: ""; position: fixed; z-index: 29; inset: 0; background: var(--scrim); animation: scrim-in .2s ease; }
  .srv-layout > .filters.open .filters-close { display: inline-grid; }
  .srv-layout > .filters.open .filters-done { display: block; position: sticky; z-index: 2; bottom: 0; padding: 12px 4px; background: var(--surface); border-top: 1px solid var(--line); }
  .srv-layout > .filters.open .filters-done .btn { width: 100%; min-height: 52px; }
  .srv-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
  .srv-bar #mobfilters { display: inline-flex; flex: none; min-height: 44px; }
}

/* The server page search (Pages/Shared/_SideSearch.cshtml): sends to the catalog, "/" and Ctrl+K put the cursor in the column field */
:root[data-theme="modern"] .sd-side-top { display: flex; align-items: center; gap: 4px; padding: 4px 4px 6px; }
:root[data-theme="modern"] .sd-search-form { flex: 1; min-width: 0; margin: 0; }
:root[data-theme="modern"] .sd-search {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 12px; cursor: text;
  color: var(--muted); background: var(--surface); border: 1.5px solid var(--field-edge); border-radius: var(--radius-md);
  transition: border-color .15s ease;
}
@media (hover: hover) { :root[data-theme="modern"] .sd-search:hover { border-color: var(--accent); } }
:root[data-theme="modern"] .sd-search:focus-within { border-color: var(--accent); outline: 3px var(--focus-style) var(--focus); outline-offset: 2px; }
:root[data-theme="modern"] .sd-search-ico { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
:root[data-theme="modern"] .sd-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; color: var(--ink); font: 500 16px var(--font-body);
  background: none; border: 0; outline: none; -webkit-appearance: none; appearance: none;
}
:root[data-theme="modern"] .sd-search input::placeholder { color: var(--muted); opacity: 1; }
:root[data-theme="modern"] .sd-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
:root[data-theme="modern"] .sd-search kbd { padding: 0 7px; color: var(--muted); font: 600 12px/1.6 var(--font-mono); background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--radius-xs); }
:root[data-theme="modern"] .sd-search:focus-within kbd { visibility: hidden; }
@media (hover: none) { :root[data-theme="modern"] .sd-search kbd { display: none; } }

/* Number tiles (Pages/Shared/_ServerStats.cshtml): two per row, four on a wide column. «Играют сейчас» ("Playing now") has a green top */
:root[data-theme="modern"] .sd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
@container (min-width: 640px) { :root[data-theme="modern"] .sd-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
:root[data-theme="modern"] .sd-stat { min-width: 0; padding: 14px 16px; background: var(--surface); border: var(--edge-w) solid var(--panel-edge); border-radius: var(--radius); box-shadow: var(--panel-shadow); }
:root[data-theme="modern"] .sd-stat.live { background: linear-gradient(var(--good-soft), var(--surface) 75%); }
:root[data-theme="modern"] .sd-stat dt { font-size: 14px; font-weight: 600; color: var(--muted); }
:root[data-theme="modern"] .sd-stat dd { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 0; }
:root[data-theme="modern"] .sd-value {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink); overflow-wrap: anywhere;
  font: 700 26px/1.15 var(--font-display); letter-spacing: var(--tracking); font-variant-numeric: tabular-nums;
}
:root[data-theme="modern"] .sd-value.small { font-size: 19px; line-height: 1.25; }
:root[data-theme="modern"] .sd-value .dot { flex: none; }
:root[data-theme="modern"] .sd-note { color: var(--muted); font-size: 14px; }

/* «Как зайти» ("How to join"): the steps as cards with a number on a purple tile, under them a wide link to the glossary (Pages/Shared/_GlossaryLink.cshtml) */
:root[data-theme="modern"] .server-page .steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
:root[data-theme="modern"] .server-page .steps li { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; padding: 16px; font-weight: 600; background: var(--surface-2); border-radius: var(--radius-md); }
:root[data-theme="modern"] .server-page .steps li::before { position: static; width: 40px; height: 40px; margin-bottom: 12px; font-size: 18px; color: var(--accent-ink); background: var(--accent); border-radius: var(--radius-md); }
:root[data-theme="modern"] .sd-wide {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); text-decoration: none;
  background: var(--accent-soft); border-radius: var(--radius-md); transition: box-shadow .2s ease;
}
:root[data-theme="modern"] .sd-wide-icon { position: relative; flex: none; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--top-on-bg); box-shadow: 0 3px 8px rgb(91 61 245 / .35); }
:root[data-theme="modern"] .sd-wide-icon::after {
  content: ""; position: absolute; inset: 11px; background: var(--accent-ink);
  -webkit-mask: url("../img/dark/icons/nav-help.svg") center / contain no-repeat; mask: url("../img/dark/icons/nav-help.svg") center / contain no-repeat;
}
:root[data-theme="modern"] .sd-wide-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
:root[data-theme="modern"] .sd-wide-copy strong { font-size: 17px; }
:root[data-theme="modern"] .sd-wide-copy span { color: var(--muted); font-size: 14px; }
:root[data-theme="modern"] .sd-wide-go { display: grid; place-items: center; flex: none; width: 36px; height: 36px; color: var(--accent-ink); background: var(--accent); border-radius: var(--radius-pill); transition: transform .3s var(--ease-back); }
:root[data-theme="modern"] .sd-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  :root[data-theme="modern"] .sd-wide:hover { box-shadow: var(--card-hover-ring); }
  :root[data-theme="modern"] .sd-wide:hover .sd-wide-go { transform: translateX(3px); }
}
@media (max-width: 600px) { :root[data-theme="modern"] .sd-wide-go { display: none; } }

/* Similar servers (Pages/Shared/_ServerSimilar.cshtml): a row of cards scrolling sideways, buttons at the edges on a computer (Scripts/scroller.ts).
   The card: a 16:9 picture with the player count in the corner, the name, the slogan, likes and the row's mode. On hover it behaves like a catalog card */
:root[data-theme="modern"] .sd-row-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; margin-bottom: 6px; }
:root[data-theme="modern"] .sd-row-head h2 { margin: 0; font-size: 20px; }
:root[data-theme="modern"] .sd-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--link); text-decoration: none; }
:root[data-theme="modern"] .sd-more .sd-arrow { width: 16px; height: 16px; transition: transform .3s var(--ease-back); }
@media (hover: hover) {
  :root[data-theme="modern"] .sd-more:hover { text-decoration: underline; }
  :root[data-theme="modern"] .sd-more:hover .sd-arrow { transform: translateX(3px); }
}
:root[data-theme="modern"] .sd-scroller { position: relative; }
/* The margins around the row are for the lift, border and shadow of a card on hover: the scroll clips everything that goes beyond them */
:root[data-theme="modern"] .sd-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px;
  margin: -10px -6px -22px; padding: 10px 6px 22px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 6px; scrollbar-width: thin;
}
:root[data-theme="modern"] .sd-grid:focus-visible { outline: 3px var(--focus-style) var(--focus); outline-offset: -3px; border-radius: var(--radius); }
:root[data-theme="modern"] .sd-grid > li { display: flex; min-width: 0; scroll-snap-align: start; }
/* Scroll buttons are at the middle of the pictures: their height is 9/16 of the card width, and the card width is a share of the column width (cqi) */
:root[data-theme="modern"] .sd-scroll {
  position: absolute; z-index: 5; top: calc(12.9cqi - 20px); display: grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
  color: var(--ink); background: var(--surface); border: 1px solid var(--btn-edge); border-radius: var(--radius-pill); box-shadow: var(--pop-shadow);
  transition: opacity .2s ease, transform .2s ease, color .15s ease, border-color .15s ease;
}
@container (min-width: 480px) {
  :root[data-theme="modern"] .sd-grid { grid-auto-columns: calc(33.333% - 8px); }
  :root[data-theme="modern"] .sd-scroll { top: calc(9.4cqi - 22px); }
}
@container (min-width: 720px) {
  :root[data-theme="modern"] .sd-grid { grid-auto-columns: calc(25% - 9px); }
  :root[data-theme="modern"] .sd-scroll { top: calc(7cqi - 23px); }
}
:root[data-theme="modern"] .sd-scroll.prev { left: -12px; }
:root[data-theme="modern"] .sd-scroll.prev .sd-arrow { transform: rotate(180deg); }
:root[data-theme="modern"] .sd-scroll.next { right: -12px; }
:root[data-theme="modern"] .sd-scroll:disabled { opacity: 0; pointer-events: none; }
@media (hover: hover) { :root[data-theme="modern"] .sd-scroll:hover { color: var(--accent-text); border-color: var(--accent); transform: scale(1.06); } }
@media (hover: none) { :root[data-theme="modern"] .sd-scroll { display: none; } }
:root[data-theme="modern"] .sd-card {
  position: relative; isolation: isolate; overflow: hidden; flex: 1; min-width: 0;
  background: var(--surface); border: var(--edge-w) solid var(--panel-edge); border-radius: var(--radius); box-shadow: var(--panel-shadow);
  transition: transform .3s var(--ease-expo), box-shadow .3s ease;
}
:root[data-theme="modern"] .sd-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
:root[data-theme="modern"] .sd-card-link:focus-visible { outline: none; }
:root[data-theme="modern"] .sd-card:has(.sd-card-link:focus-visible) { outline: 3px var(--focus-style) var(--focus); outline-offset: 2px; }
:root[data-theme="modern"] .sd-card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
:root[data-theme="modern"] .sd-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-expo), filter .3s ease; }
:root[data-theme="modern"] .sd-card-media img.pano { object-position: 50% 100%; }
:root[data-theme="modern"] .sd-card.down .sd-card-media img { filter: grayscale(1); opacity: .45; }
:root[data-theme="modern"] .sd-card-media .online {
  position: absolute; z-index: 1; left: 8px; bottom: 8px; gap: 6px; margin: 0; padding: 2px 10px 2px 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: var(--radius-pill); box-shadow: var(--panel-shadow);
}
:root[data-theme="modern"] .sd-card-media .online b { font-size: 15px; }
:root[data-theme="modern"] .sd-card-media .online > span:not(.dot) { font-size: 13px; }
:root[data-theme="modern"] .sd-card-go {
  position: absolute; z-index: 1; right: 8px; bottom: 8px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-pill);
  color: var(--accent-ink); background: var(--accent); box-shadow: 0 6px 16px -4px rgb(91 61 245 / .6);
  opacity: 0; transform: translateY(6px) scale(.85); transition: opacity .2s ease, transform .3s var(--ease-back);
}
:root[data-theme="modern"] .sd-card-go .sd-arrow { width: 16px; height: 16px; }
@media (hover: none) { :root[data-theme="modern"] .sd-card-go { display: none; } }
:root[data-theme="modern"] .sd-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px 12px; }
:root[data-theme="modern"] .sd-card-title {
  display: block; overflow-wrap: anywhere;
  color: var(--ink); font: 700 16px/1.25 var(--font-display); letter-spacing: var(--tracking);
}
:root[data-theme="modern"] .sd-card-by { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 14px; }
:root[data-theme="modern"] .sd-card-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 2px 0 6px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
:root[data-theme="modern"] .sd-card-stats .badge.likes { padding: 0; font-size: 13px; color: var(--ink); background: none; }
:root[data-theme="modern"] .sd-card .tag { margin-top: auto; font-size: 13px; }
:root[data-theme="modern"] .sd-card:has(.sd-card-link:focus-visible) { transform: translateY(-4px); }
:root[data-theme="modern"] .sd-card:has(.sd-card-link:focus-visible) .sd-card-go { opacity: 1; transform: none; }
/* Hover is counted on the list item, and it does not move: at the bottom edge a raised card would leave from under the cursor and jitter */
@media (hover: hover) {
  :root[data-theme="modern"] .sd-grid > li:hover > .sd-card { box-shadow: var(--card-hover-ring), var(--card-hover-glow); transform: translateY(-4px); }
  :root[data-theme="modern"] .sd-grid > li:hover > .sd-card .sd-card-go { opacity: 1; transform: none; }
  :root[data-theme="modern"] .sd-grid > li:hover > .sd-card:not(.down) .sd-card-media img { filter: saturate(1.15); transform: scale(1.07); }
}

/* Questions (Pages/Shared/_ServerFaq.cshtml): expandable rows, «+» turns into «×» */
:root[data-theme="modern"] .sd-faq { display: grid; gap: 8px; }
:root[data-theme="modern"] .sd-faq details { background: var(--surface-2); border-radius: var(--radius-md); }
:root[data-theme="modern"] .sd-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 8px 10px 8px 16px;
  font-weight: 600; list-style: none; cursor: pointer; border-radius: var(--radius-md); transition: color .15s ease;
}
:root[data-theme="modern"] .sd-faq summary::-webkit-details-marker { display: none; }
:root[data-theme="modern"] .sd-faq summary::after {
  content: "+"; content: "+" / ""; flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding-bottom: 2px;
  font: 500 22px/1 var(--font-display); color: var(--accent-text); background: var(--accent-soft); border-radius: var(--radius-pill);
  transition: transform .35s var(--ease-back), background-color .15s ease, color .15s ease;
}
:root[data-theme="modern"] .sd-faq details[open] summary::after { color: var(--accent-ink); background: var(--accent); transform: rotate(45deg); }
@media (hover: hover) { :root[data-theme="modern"] .sd-faq summary:hover { color: var(--accent-text); } }
:root[data-theme="modern"] .sd-faq details p { margin: 0; padding: 0 16px 14px; }
:root[data-theme="modern"] .sd-faq code { padding: 1px 6px; font: 500 14px var(--font-mono); background: var(--surface); border-radius: var(--radius-xs); overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
