/* Unbounded and Fixel Text (SIL Open Font License 1.1), subset to Latin + Cyrillic. */
@font-face { font-family: "Fixel Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/FixelText-Regular.woff2) format("woff2"); }
@font-face { font-family: "Fixel Text"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/FixelText-Medium.woff2) format("woff2"); }
@font-face { font-family: "Fixel Text"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/FixelText-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Fixel Text"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/FixelText-Bold.woff2) format("woff2"); }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/Unbounded-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/Unbounded-ExtraBold.woff2) format("woff2"); }

/* BavovnaCraft's own controls, on the site and in the admin panel (README «Interface rule»): checkboxes, radio
   buttons, switches and sliders drawn over the browser's own (kept in the form), and the parts `controls.js` adds —
   dropdowns, the calendar, the palette, the box for a file, a search box's ×, the suggestions under a field and number
   fields with − and +. Built into both stylesheets ahead of each one's own, whose `:root` sets the tokens to its look:
   --ctl-field, --ctl-field-hover, --ctl-field-edge, --ctl-radius (a field), --ctl-pop, --ctl-pop-edge,
   --ctl-pop-label, --ctl-pop-radius (a list or a box over the page), --ctl-lit (a lit row), --ctl-mark-edge,
   --ctl-mark-hover (an empty checkbox), --ctl-track (a switch that's off, a slider's track). */

/* A checkbox (`span.tick > input[type=checkbox] + i`), a radio button (`span.tick.is-radio`) and a switch
   (`span.switch > input[type=checkbox][role=switch] + i`): the browser's own input lies over the one drawn here,
   unseen, so a click, the keyboard, a screen reader and the form's own checks all go to it. Empty, a box is a plain
   square with a clear edge (a consent's box must be ticked by the person, and look it); ticked, it fills with the
   accent; after a try to send the form without a box it must have, its edge turns red. */
.tick, .switch { position: relative; display: inline-flex; flex: none; vertical-align: middle; }
.tick > input, .switch > input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer;
}
.tick > input:disabled, .switch > input:disabled { cursor: not-allowed; }
.tick > i {
  position: relative; display: block; width: 20px; height: 20px; border: 2px solid var(--ctl-mark-edge); border-radius: 6px;
  transition: background-color .12s, border-color .12s;
}
.tick > i::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; opacity: 0;
  border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.tick:hover > input:not(:disabled) + i, label:hover .tick > input:not(:disabled) + i { border-color: var(--ctl-mark-hover); }
.tick > input:checked + i { border-color: var(--accent); background: var(--accent); }
.tick > input:checked + i::after { opacity: 1; }
.tick.is-radio > i { border-radius: 50%; }
.tick.is-radio > i::after {
  left: 3px; top: 3px; width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--accent); transform: none;
}
.tick.is-radio > input:checked + i { background: transparent; }
.tick > input:focus-visible + i, .switch > input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.tick > input:disabled + i, .switch > input:disabled + i { opacity: 0.45; }
.tick > input:user-invalid + i { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 156, 138, 0.18); }
.switch > i {
  position: relative; display: block; width: 34px; height: 20px; border-radius: 999px; background: var(--ctl-track);
  transition: background-color .15s;
}
.switch > i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--soft); transition: transform .15s, background-color .15s;
}
.switch > input:checked + i { background: var(--accent); }
.switch > input:checked + i::after { transform: translateX(14px); background: var(--on-accent); }

/* Number fields: no browser arrows anywhere (− and + of ours where steps matter, `.stepper`); a phone still shows
   its number pad (`inputmode`). */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* A slider: the browser's own range input, its track and thumb drawn here. */
input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 24px; margin: 0; padding: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--ctl-track); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--ctl-track); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--ctl-pop); box-shadow: 0 0 0 1px var(--accent);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ctl-pop); box-shadow: 0 0 0 1px var(--accent);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px rgba(255, 213, 0, 0.3); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px rgba(255, 213, 0, 0.3); }

/* A search box: our × (`controls.js`) in place of the browser's. */
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-field { position: relative; display: block; min-width: 0; }
.search-field > input[type="search"] { padding-right: 38px; }
.search-clear {
  position: absolute; top: 50%; right: 6px; display: none; place-items: center; width: 28px; height: 28px; margin-top: -14px;
  padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.search-field.has-text .search-clear { display: grid; }
.search-clear:hover { background: var(--ctl-lit); color: var(--text); }

/* What floats over the page: a list, the calendar, the palette. */
.dropdown-list, .calendar, .palette {
  position: fixed; z-index: 60; margin: 0; background: var(--ctl-pop); border: 1px solid var(--ctl-pop-edge);
  border-radius: var(--ctl-pop-radius); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45); color: var(--text);
  font-weight: 400; text-align: left;
}
.dropdown-list[hidden], .calendar[hidden], .palette[hidden] { display: none; }

/* A dropdown (`controls.js` over a `<select>`): the select stays under the button, unseen; the button looks like the
   page's own fields (each stylesheet's `.dropdown-button`). */
.dropdown { position: relative; display: block; min-width: 0; }
.dropdown > select {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none;
}
.dropdown-button { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; text-align: left; cursor: pointer; }
.dropdown-button:disabled { cursor: not-allowed; opacity: 0.6; }
.dropdown-button.is-blank .dropdown-value { color: var(--faint); }
.dropdown-value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-arrow {
  flex: none; width: 7px; height: 7px; margin: 0 3px 3px 0; border: solid var(--muted); border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform .12s;
}
.dropdown.is-open .dropdown-arrow { transform: translateY(3px) rotate(-135deg); }
.dropdown.is-invalid .dropdown-button { border-color: var(--danger); }
.dropdown-list { max-height: 320px; padding: 4px; overflow-y: auto; overscroll-behavior: contain; }
.dropdown-option {
  position: relative; padding: 8px 12px 8px 32px; border-radius: calc(var(--ctl-pop-radius) - 4px); color: var(--soft);
  line-height: 1.35; overflow-wrap: anywhere; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
/* No bar on the lit row here (the chosen one already has its tick, its colour and the background): the suggestion
   list keeps its bar, having nothing else to mark the row. */
.dropdown-option.is-lit { background: var(--ctl-lit); color: var(--text); }
.dropdown-option.is-chosen { color: var(--accent); font-weight: 600; }
.dropdown-option.is-chosen::before {
  content: ""; position: absolute; left: 13px; top: 50%; width: 5px; height: 10px; margin-top: -7px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.dropdown-option.is-blank { color: var(--faint); }
.dropdown-option[aria-disabled="true"] { color: var(--faint); cursor: default; }
.dropdown-group {
  padding: 10px 12px 4px; color: var(--ctl-pop-label); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
@media (pointer: coarse) { .dropdown-option { padding-top: 12px; padding-bottom: 12px; } }

/* A date and time (`controls.js` over an `input[type=datetime-local]`): our field with the calendar's button in it,
   the browser's input under it, unseen. */
.datetime { position: relative; display: block; min-width: 0; }
.datetime > .datetime-value { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.datetime > input.datetime-text { width: 100%; padding-right: 44px; font-variant-numeric: tabular-nums; }
.datetime.is-invalid > input.datetime-text { border-color: var(--danger); }
.datetime-button {
  position: absolute; top: 50%; right: 5px; display: grid; place-items: center; width: 32px; height: 30px; margin-top: -15px;
  padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.datetime-button:hover, .datetime-button[aria-expanded="true"] { background: var(--ctl-lit); color: var(--accent); }
.datetime-button:disabled { opacity: 0.45; cursor: not-allowed; }
.calendar { width: 300px; padding: 12px; font-size: 14px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.calendar-title { font-weight: 700; }
.calendar-step {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--soft);
  font: 600 20px/1 var(--body); cursor: pointer;
}
.calendar-step:hover { background: var(--ctl-lit); color: var(--accent); }
.calendar-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar-grid th { padding: 4px 0 6px; color: var(--ctl-pop-label); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.calendar-grid th abbr { text-decoration: none; }
.calendar-grid td { padding: 1px; text-align: center; }
.calendar-day {
  width: 100%; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text);
  font: 500 14px var(--body); font-variant-numeric: tabular-nums; cursor: pointer;
}
.calendar-day:hover { background: rgba(255, 255, 255, 0.07); }
.calendar-day.is-other { color: var(--faint); }
.calendar-day.is-today { box-shadow: inset 0 0 0 1px var(--accent); }
.calendar-day[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.calendar-day:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.calendar-time {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ctl-pop-edge);
  color: var(--soft); font-weight: 600;
}
.calendar-time > input.calendar-clock { width: 76px; padding: 7px 10px; text-align: center; font-variant-numeric: tabular-nums; }
.calendar-time > input.calendar-clock.is-wrong { border-color: var(--danger); }
.calendar-zone { color: var(--ctl-pop-label); font-size: 12px; font-weight: 400; }
.calendar-foot { display: flex; align-items: center; gap: 2px; margin-top: 10px; }
.calendar-link {
  padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--accent); font: 600 13px var(--body); cursor: pointer;
}
.calendar-link:hover { background: var(--ctl-lit); }
.calendar-done {
  margin-left: auto; padding: 7px 14px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  font: 700 13px var(--body); cursor: pointer;
}
.calendar-done:hover { background: var(--accent-hover); }

/* A colour (`controls.js` over an `input[type=color][data-sync]`): a swatch of the hex field's colour, and a palette. */
.swatch-button {
  flex: none; display: grid; width: 44px; height: 40px; padding: 5px; border: 1px solid var(--ctl-field-edge);
  border-radius: var(--ctl-radius); background: var(--ctl-field); cursor: pointer;
}
.swatch-button:hover, .swatch-button[aria-expanded="true"] { border-color: var(--accent); }
.swatch-chip { display: block; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.swatch-chip.is-empty {
  background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.18) 4px 6px) !important;
}
.palette { display: grid; grid-template-columns: repeat(9, 26px); gap: 6px; padding: 10px; }
.palette-swatch {
  position: relative; width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.palette-swatch.is-lit { outline: 2px solid var(--text); outline-offset: 2px; }
.palette-swatch.is-chosen::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px #000;
}
.palette-name { grid-column: 1 / -1; min-height: 18px; color: var(--ctl-pop-label); font-size: 12px; }

/* A file (`controls.js` over an `input[type=file]`): the browser's input lies over the whole box, unseen. */
.file-pick {
  position: relative; display: flex; min-width: 0; padding: 12px 14px; border: 1px dashed var(--ctl-mark-edge);
  font-weight: 400; line-height: 1.4;
  border-radius: var(--ctl-radius); background: var(--ctl-field); transition: border-color .12s, background-color .12s;
}
.file-pick > input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer;
}
.file-pick:hover, .file-pick.is-over { border-color: var(--accent); }
.file-pick.is-over { border-style: solid; background: rgba(255, 213, 0, 0.07); }
.file-pick:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-pick:has(> input:user-invalid) { border-color: var(--danger); }
.file-pick.is-disabled { opacity: 0.5; }
.file-pick.is-disabled > input { cursor: not-allowed; }
.file-pick-face { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-pick-icon {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--ctl-lit); color: var(--accent);
}
.file-pick-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.file-pick-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.file-pick-button {
  padding: 5px 12px; border-radius: 8px; background: var(--chip); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.file-pick:hover .file-pick-button { background: var(--accent); color: var(--on-accent); }
.file-pick-or { color: var(--muted); font-size: 13px; }
.file-pick-names { color: var(--faint); font-size: 13px; overflow-wrap: anywhere; }
.file-pick.has-files .file-pick-names { color: var(--soft); }

/* The suggestions under a field (`controls.js`, `data-suggest`): a dark card as wide as the field, the lit row in the
   accent, over the field near the screen's bottom; the keys' line only where there is a keyboard and a mouse. */
.suggest { position: relative; display: block; min-width: 0; }
.suggest-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); overflow: hidden;
  background: var(--ctl-pop); border: 1px solid var(--ctl-pop-edge); border-radius: var(--ctl-pop-radius);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45); font-weight: 400; text-align: left;
}
.suggest-list.is-up { top: auto; bottom: calc(100% + 4px); box-shadow: 0 -10px 22px rgba(0, 0, 0, 0.45); }
.suggest-rows { position: relative; overflow-y: auto; overscroll-behavior: contain; }
.suggest-row {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 7px 14px 7px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04); color: var(--text); font-size: 15px; line-height: 1.25;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.suggest-row:first-child { border-top: 0; }
@media (hover: hover) { .suggest-row:hover { background: rgba(255, 255, 255, 0.05); } }
.suggest-row.is-lit { background: var(--ctl-lit); box-shadow: inset 3px 0 0 var(--accent); }
.suggest-row b { color: var(--accent); font-weight: 700; }
.suggest-row .face { flex: none; width: 22px; height: 22px; border-radius: 4px; background: var(--ctl-field); }
.suggest-icon { flex: none; width: 24px; height: 24px; image-rendering: pixelated; }
.suggest-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.suggest-tag {
  flex: none; padding: 2px 6px; border: 1px solid var(--ctl-pop-edge); border-radius: 6px; color: var(--ctl-pop-label);
  font: 700 11px/1.2 var(--body); letter-spacing: 0.06em; text-transform: uppercase;
}
.suggest-dot {
  flex: none; width: 8px; height: 8px; margin: 0 3px 0 auto; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}
.suggest-two { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; gap: 1px; }
.suggest-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ctl-pop-label); font-size: 12px; }
.suggest-sub b { color: var(--soft); }
.suggest-id { font: 12px var(--mono); }
.suggest-hint { flex: none; margin-left: auto; color: var(--ctl-pop-label); font-size: 12px; white-space: nowrap; }
.suggest-empty { padding: 11px 14px; color: var(--ctl-pop-label); font-size: 14px; }
.suggest-keys {
  display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 7px 12px; border-top: 1px solid var(--ctl-pop-edge);
  color: var(--ctl-pop-label); font-size: 12px;
}
.suggest-keys kbd {
  margin-right: 5px; padding: 1px 5px; border: 1px solid var(--ctl-pop-edge); border-radius: 4px;
  color: var(--soft); font: 600 11px/1.3 var(--body);
}
.suggest-list [hidden] { display: none; }
@media (hover: none) { .suggest-keys { display: none; } }

/* A number field of ours: − and + beside the number (`controls.js`). */
.stepper {
  display: flex; align-items: stretch; min-width: 0;
  border: 1px solid var(--ctl-field-edge); border-radius: var(--ctl-radius); background: var(--ctl-field);
}
.stepper:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.stepper > input[type="number"] {
  flex: 1 1 auto; width: 100%; min-width: 0; border: 0; border-radius: var(--ctl-radius); background: transparent;
  font-variant-numeric: tabular-nums;
}
.stepper > input[type="number"]:focus-visible { outline: none; }
.stepper.is-live > input[type="number"] { padding-left: 4px; padding-right: 4px; border-radius: 0; text-align: center; }
.stepper-btn {
  flex: none; width: 46px; padding: 0; border: 0; background: transparent; color: var(--soft); cursor: pointer;
  font: 500 22px/1 var(--body); touch-action: manipulation; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.stepper-btn:first-child { border-right: 1px solid var(--ctl-field-edge); border-radius: calc(var(--ctl-radius) - 1px) 0 0 calc(var(--ctl-radius) - 1px); }
.stepper-btn:last-child { border-left: 1px solid var(--ctl-field-edge); border-radius: 0 calc(var(--ctl-radius) - 1px) calc(var(--ctl-radius) - 1px) 0; }
@media (hover: hover) { .stepper-btn:hover:not(:disabled) { background: var(--ctl-field-hover); color: var(--text); } }
.stepper-btn:active:not(:disabled) { background: var(--ctl-lit); color: var(--accent); }
.stepper-btn:disabled { color: var(--faint); opacity: 0.45; cursor: default; }
/* A small one, in a table's row (the warehouse's «Скільки купити»). */
.stepper.is-small { display: inline-flex; border-radius: 10px; }
.stepper.is-small > input[type="number"] { width: 56px; flex: none; }
.stepper.is-small .stepper-btn { width: 32px; font-size: 18px; }
.stepper.is-small .stepper-btn:first-child { border-radius: 9px 0 0 9px; }
.stepper.is-small .stepper-btn:last-child { border-radius: 0 9px 9px 0; }
@media (pointer: coarse) { .stepper.is-small .stepper-btn { width: 40px; } .stepper.is-small > input[type="number"] { min-height: 40px; } }

/* BavovnaCraft public site — "Степ": pixel steppe, navy glass, one yellow accent. */

:root {
  --navy: #0b1330;
  --navy-deep: #070c1d;
  --panel: rgba(8, 12, 24, 0.8);
  --panel-strong: rgba(8, 12, 24, 0.9);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --chip: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --soft: rgba(255, 255, 255, 0.86);
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.56);
  --accent: #ffd500;
  --accent-hover: #ffe14d;
  --accent-edge: #b89a00;
  --on-accent: #14161c;
  --good: #4ade80;
  --warn: #ffb347;
  --danger: #ff9c8a;
  --idle: #9aa3b8;
  /* A list floating over the page (the suggestions under a field), as the overlay's: its well, edge and labels. */
  --well: #0b1120;
  --well-edge: #2b3754;
  --well-label: #8b96ad;
  /* Our own controls (`controls.css`): a field, what floats over the page, a box's edge, a switch's track. */
  --ctl-field: var(--surface);
  --ctl-field-hover: var(--surface-hover);
  --ctl-field-edge: var(--line);
  --ctl-radius: 12px;
  --ctl-pop: var(--well);
  --ctl-pop-edge: var(--well-edge);
  --ctl-pop-label: var(--well-label);
  --ctl-pop-radius: 12px;
  --ctl-lit: rgba(255, 213, 0, 0.12);
  --ctl-mark-edge: rgba(255, 255, 255, 0.55);
  --ctl-mark-hover: rgba(255, 255, 255, 0.85);
  --ctl-track: #2a3354;
  /* A select left to the browser: our arrow on it. */
  --select-arrow: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 17px) 55% / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 55% / 5px 5px no-repeat;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Fixel Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --header-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h2 { font: 800 clamp(24px, 3vw, 32px)/1.15 var(--display); letter-spacing: -0.01em; }
h3 { font-weight: 700; font-size: 18px; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pixel, .brand-mark, .step-icon { image-rendering: pixelated; flex: none; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 18px; border: 0; border-radius: 12px;
  font: 600 15px/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, transform .1s, box-shadow .1s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 var(--accent-edge); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-edge); }
.btn-ghost { background: var(--chip); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: var(--text); }
.btn-small { padding: 8px 14px; font-size: 14px; box-shadow: 0 3px 0 var(--accent-edge); }
.btn-xl { padding: 18px 28px; font-size: 18px; font-weight: 700; border-radius: 14px; }
.btn.is-disabled { background: var(--chip); color: var(--faint); box-shadow: none; cursor: not-allowed; }
.btn-icon { image-rendering: pixelated; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 12, 24, 0.62);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { border-radius: 6px; }
.wordmark { font: 800 17px/1 var(--display); letter-spacing: 0.02em; white-space: nowrap; }
.wordmark .accent { color: var(--accent); }
.site-nav { display: flex; gap: 4px; margin-left: 8px; }
.site-nav a {
  padding: 8px 12px; border-radius: 10px; color: var(--soft);
  font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, 0.08); }
.lang-switch a {
  padding: 5px 10px; border-radius: 8px; color: var(--soft);
  font: 700 12px/1.2 var(--body); letter-spacing: 0.04em; text-decoration: none;
}
.lang-switch a:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.lang-switch a[aria-current="true"] { background: #fff; color: var(--on-accent); }

/* «Увійти» and, signed in, the nickname (to «Акаунт»). */
.header-login { box-shadow: none; }
.header-login-icon { display: none; width: 18px; height: 18px; }
.me-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.08); color: var(--text); text-decoration: none; font: 600 14px/1.2 var(--body);
}
.me-chip:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.me-head { width: 24px; height: 24px; border-radius: 5px; image-rendering: pixelated; flex: none; }
.me-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* One row: a little less room around the sections, and a long nickname ends in «…». */
@media (min-width: 1200px) {
  .header-row { gap: 16px; }
  .site-nav a { padding: 8px 10px; }
  .me-name { max-width: 76px; }
}
/* Narrower, the sections go to a row of their own. */
@media (max-width: 1199px) {
  .header-row { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; }
  .site-nav { order: 3; width: 100%; margin: 0 -12px; padding: 0 0 6px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  :root { --header-h: 104px; }
}
/* A phone (860 px and narrower): one row, the brand, the language, the account and the menu
   button; the sections and «Завантажити» are in the menu's panel (below). */
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .header-row { flex-wrap: nowrap; gap: 8px; padding-top: 0; }
  .site-nav, .header-download { display: none; }
  .me-name { max-width: 100px; }
}
/* Narrower, an icon for the account. */
@media (max-width: 600px) {
  .me-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .me-chip { padding: 5px; }
  .header-actions { gap: 8px; }
  .header-login { padding: 7px; }
  .header-login-icon { display: block; }
  .header-login-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* A phone's row is full: everything a little smaller, down to the narrowest phones, where the
   wordmark goes on two lines. */
@media (max-width: 480px) {
  .wordmark { font-size: 15px; }
  .brand { gap: 8px; }
  .header-row .wordmark { font-size: 13px; }
  .header-actions { gap: 6px; }
  .lang-switch a { padding: 5px 7px; }
}
@media (max-width: 380px) {
  .wrap.header-row { padding: 0 12px; }
  .wordmark { font-size: 14px; }
  .header-row .wordmark { font-size: 12px; }
  .header-actions { gap: 4px; }
  .lang-switch a { padding: 5px 6px; font-size: 11px; }
}
@media (max-width: 340px) { .header-row .wordmark { display: flex; flex-direction: column; gap: 2px; } }

/* The menu button: three lines, and a ✕ on yellow while the menu is open. */
.menu-button {
  display: none; place-items: center; width: 36px; height: 36px; padding: 0; flex: none;
  border: 0; border-radius: 11px; background: rgba(255, 255, 255, 0.08); color: var(--text); cursor: pointer;
}
@media (hover: hover) { .menu-button:hover { background: rgba(255, 255, 255, 0.14); } }
.menu-button svg { width: 22px; height: 22px; }
.menu-button .icon-cross { display: none; }
.menu-button[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); }
.menu-button[aria-expanded="true"] .icon-bars { display: none; }
.menu-button[aria-expanded="true"] .icon-cross { display: block; }
/* Without the script (it keeps aria-expanded), the same from the open panel itself. */
.site-header:has(.menu-panel:popover-open) .menu-button { background: var(--accent); color: var(--on-accent); }
.site-header:has(.menu-panel:popover-open) .icon-bars { display: none; }
.site-header:has(.menu-panel:popover-open) .icon-cross { display: block; }

/* The menu's panel: the sections right under the header, and under them the dimmed page (the
   panel's scrim, a button that closes it), kept still. A popover, so closed it is hidden by the
   browser; menu.js opens it with .is-open where there are none. */
.menu-panel { display: none; }
@media (max-width: 860px) {
  .menu-button { display: grid; }
  .menu-panel {
    position: fixed; inset: calc(var(--header-h) + 1px) 0 0; width: auto; height: auto; max-width: none; max-height: none;
    margin: 0; padding: 0; flex-direction: column; overflow: hidden; border: 0; background: none; color: var(--text);
  }
  .menu-panel:popover-open { display: flex; }
  .menu-panel.is-open { display: flex; z-index: 30; }
  .menu-sheet {
    position: relative; z-index: 1; flex: 0 1 auto; min-height: 0; padding: 6px 0 16px; overflow-y: auto; overscroll-behavior: contain;
    border-bottom: 1px solid var(--line); background: rgba(8, 12, 24, 0.97); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: menu-drop 0.16s ease-out;
  }
  .menu-scrim {
    flex: 1 0 0; min-height: 0; padding: 0; border: 0; border-radius: 0;
    background: rgba(4, 7, 16, 0.55); cursor: default; animation: menu-fade 0.16s ease-out;
  }
  html.menu-open { overflow: hidden; }
  html:has(.menu-panel:popover-open) { overflow: hidden; }
}
.menu-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 24px;
  color: var(--soft); font-weight: 500; font-size: 16px; text-decoration: none;
}
.menu-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.menu-link:focus-visible { outline-offset: -3px; }
.menu-link[aria-current="page"] { color: var(--accent); background: rgba(255, 213, 0, 0.08); box-shadow: inset 3px 0 0 var(--accent); }
.menu-chevron { color: var(--faint); font-size: 22px; line-height: 1; }
.menu-link[aria-current="page"] .menu-chevron { color: inherit; }
.menu-download { display: flex; margin: 10px 24px 0; }
@media (max-width: 480px) {
  .menu-link { padding: 0 16px; }
  .menu-download { margin: 10px 16px 0; }
}
@keyframes menu-drop { from { opacity: 0; transform: translateY(-6px); } }
@keyframes menu-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .menu-sheet, .menu-scrim { animation: none; } }

/* Hero */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 48px) 0 clamp(130px, 19vh, 210px);
  min-height: min(100vh, 860px);
  display: flex; align-items: center;
  background: #4f86dd url(steppe-day.svg) 72% 100% / cover no-repeat;
  image-rendering: pixelated;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 620px) 1fr; gap: 32px; align-items: end; }
.hero-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 24px 60px rgba(4, 8, 20, 0.35);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  color: var(--soft); font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
}
.eyebrow .dot { width: 10px; height: 10px; background: var(--accent); box-shadow: 3px 3px 0 #ff8a1a; }
.hero-title { font: 800 clamp(32px, 4.6vw, 56px)/1.06 var(--display); letter-spacing: -0.015em; margin-bottom: 20px; }
.lead { color: var(--soft); font-size: clamp(16px, 1.6vw, 18px); line-height: 1.6; max-width: 60ch; }
.hero-panel .lead { margin-bottom: 28px; }
.download .dl-meta { margin-top: 14px; color: var(--muted); font-size: 14px; }
.download .dl-alt { margin-top: 6px; font-size: 14px; }
.hero-stats { display: flex; flex-direction: column; gap: 12px; justify-self: end; }
.stat {
  display: flex; flex-direction: column; min-width: 200px; padding: 16px 20px;
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px;
}
.stat-value { font: 800 28px/1.1 var(--display); }
.stat-label { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) {
  .hero { min-height: 0; padding-bottom: 170px; background-position: 88% 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: row; justify-self: stretch; }
  .stat { flex: 1; min-width: 0; padding: 12px 16px; }
  .stat-value { font-size: 22px; }
}
@media (max-width: 480px) {
  .hero { padding-top: calc(var(--header-h) + 24px); }
  .btn-xl { width: 100%; padding: 16px 20px; font-size: 17px; }
}

/* A strip of pixel soil under every landscape. */
.soil { height: 24px; background: #6b4420 url(soil.svg) 0 0 / 48px 24px repeat-x; image-rendering: pixelated; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section-head .more { font-weight: 600; text-decoration: none; }
.empty { color: var(--muted); padding: 28px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }

/* What the network has (the landing page) */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature {
  display: flex; flex-direction: column; gap: 8px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.feature .pixel { margin-bottom: 8px; }
/* Whole-pixel line heights keep the cards, and so the pixel art in the next ones, on whole pixels. */
.feature h3 { line-height: 22px; }
.feature p { color: var(--muted); font-size: 15px; }
.feature .more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 14px; line-height: 22px; text-decoration: none; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* On a phone the icon sits beside the title, so nine cards stay short. */
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px 14px; align-items: center; padding: 18px; }
  .feature .pixel { margin: 0; }
  .feature p, .feature .more { grid-column: 1 / -1; }
  .feature .more { padding-top: 0; }
}

/* Downloads */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.platform {
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.platform.is-current { border-color: var(--accent); background: rgba(255, 213, 0, 0.08); }
.platform-head p { font-size: 14px; margin-top: 2px; }
.platform-file { font-size: 14px; color: var(--soft); overflow-wrap: anywhere; }
.platform .btn { margin-top: auto; align-self: flex-start; }
.hash { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 8px 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); }
.hash-label { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; flex: none; }
.hash-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--soft); }
.copy {
  flex: none; padding: 5px 10px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--chip); color: var(--text); font: 600 12px/1.2 var(--body);
}
.copy:hover { background: rgba(255, 255, 255, 0.2); }
.copy.is-done { background: var(--good); color: var(--on-accent); }
.mac-install {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 32px; align-items: center;
  margin-top: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.mac-install h3 { margin-bottom: 6px; }
.mac-install .muted { font-size: 14px; }
.command { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); min-width: 0; }
.command code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 14px; color: var(--accent); scrollbar-width: thin; }
.mac-install .note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .mac-install { grid-template-columns: 1fr; } }

/* Server cards */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.server-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.scene { position: relative; overflow: hidden; background-color: #2f6bd0; background-size: cover; background-repeat: no-repeat; image-rendering: pixelated; }
.scene-day { background-image: url(steppe-day.svg); }
.scene-dusk { background-image: url(steppe-dusk.svg); background-color: #5a3c8c; }
.scene-night { background-image: url(steppe-night.svg); background-color: #111c44; }
.server-card .scene { height: 132px; background-position: 88% 72%; }
.scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.server-icon {
  position: absolute; left: 16px; bottom: -1px; display: grid; place-items: center;
  width: 60px; height: 56px; border-radius: 12px 12px 0 0; background: #111829;
}
.server-card.is-soon .scene { filter: saturate(0.55) brightness(0.85); }
.status {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; background: rgba(4, 8, 16, 0.72);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.status .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--idle); }
.status-online .dot { background: var(--good); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2); }
.status-maintenance .dot { background: var(--warn); }
.status-soon .dot { background: var(--accent); }
.server-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 18px 18px; background: #111829; }
.server-body h3 { font: 800 18px/1.2 var(--display); }
.server-body > p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 600; color: var(--soft); }
.server-meta { display: flex; gap: 20px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.server-meta dt { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.server-meta dd { margin: 0; color: var(--soft); font-weight: 600; }

/* «Ще від Бавовни»: Vatra under the servers. Its campfire across the whole block, and the text on a
   dark card over it, at the bottom left. */
.vatra-section { padding-top: 0; }
.vatra-hero { display: flex; align-items: flex-end; min-height: 400px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #2b1d52 url(vatra.svg) 50% 60% / cover no-repeat; }
.vatra-over { display: flex; flex-direction: column; gap: 14px; max-width: 470px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-strong); }
.vatra-over .eyebrow, .vatra-over h2, .vatra-over p { margin: 0; }
.vatra-over > p { font-size: 17px; line-height: 1.55; color: var(--soft); }
.vatra-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.vatra-actions .muted { font-size: 14px; }
/* A phone: the whole picture on top (it is 1.6 times as wide as tall), the card under it. */
@media (max-width: 600px) {
  .vatra-hero { min-height: 0; padding: calc((100vw - 32px) / 1.6 - 24px) 12px 12px; background-size: 100% auto; background-position: 50% 0; }
  .vatra-over { max-width: none; padding: 20px; }
}

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .15s, transform .15s; }
.news-card:hover { border-color: rgba(255, 213, 0, 0.5); transform: translateY(-2px); }
.news-card.is-pinned { border-color: rgba(255, 213, 0, 0.35); }
.news-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.news-link:hover { color: inherit; }
.news-cover { height: 150px; background-position: 88% 70%; display: grid; place-items: center; }
.news-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: rgba(4, 8, 16, 0.55); }
.news-body { display: flex; flex-direction: column; gap: 8px; padding: 18px; flex: 1; background: #111829; }
.news-body h3 { font-size: 19px; line-height: 1.3; }
.news-body > p { color: var(--muted); font-size: 15px; }
.news-date { color: var(--faint); font-size: 13px; font-weight: 600; }
.news-date .pin { color: var(--accent); }
.news-body .more { margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 600; font-size: 14px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; top: 20px; right: 20px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font: 800 16px/1 var(--display);
}
.step-icon { margin-bottom: 16px; }
.step h3 { margin-bottom: 6px; font-size: 18px; }
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Inner page banners */
.page-banner {
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 56px) 0 120px;
  background: #4f86dd url(steppe-day.svg) 80% 100% / cover no-repeat;
  image-rendering: pixelated;
}
.page-banner .wrap > * { max-width: 680px; }
.page-banner h1 {
  display: inline-block; padding: 14px 22px; margin-bottom: 14px; border-radius: 16px;
  background: var(--panel); font: 800 clamp(28px, 4vw, 44px)/1.1 var(--display);
}
.page-banner .lead { padding: 14px 20px; border-radius: 14px; background: var(--panel); }
@media (max-width: 860px) { .page-banner { background-position: 90% 100%; padding-bottom: 90px; } }

.pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; color: var(--muted); }
.pager a { font-weight: 600; text-decoration: none; }

/* Article */
.article-head { padding: 48px 0 24px; }
.article-head h1 { font: 800 clamp(28px, 4vw, 42px)/1.12 var(--display); margin: 12px 0 14px; }
.back { font-weight: 600; font-size: 14px; text-decoration: none; }
.article-image { display: block; width: 100%; border-radius: 16px; margin-bottom: 28px; }
.article .prose { padding-bottom: 72px; }
.prose { font-size: 17px; line-height: 1.7; color: var(--soft); }
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3 { color: var(--text); margin-top: 1.6em; }
.prose h1 { font: 800 28px/1.2 var(--display); }
.prose h2 { font: 800 22px/1.25 var(--display); }
.prose h3 { font-size: 19px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul.seller { list-style: none; padding-left: 0; }
.prose li + li { margin-top: 0.4em; }
.prose code { font-family: var(--mono); font-size: 0.9em; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); }
.prose pre { overflow-x: auto; padding: 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); }
.prose pre code { padding: 0; background: none; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose img { border-radius: 12px; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.rules h2:first-child { margin-top: 0; }
.rules ol { counter-reset: none; }
.rules li::marker { color: var(--accent); font-weight: 700; }

/* Open-source licences (/licenses): a licence opens to its texts, a text to its words. */
.license-list { font-size: 15px; line-height: 1.5; }
.license { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.license + .license { margin-top: 8px; }
.license > summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap;
  padding: 13px 18px; cursor: pointer; color: var(--text); font-weight: 700; list-style: none;
}
.license > summary::-webkit-details-marker { display: none; }
.license > summary::before { content: "+"; flex: none; width: 14px; color: var(--accent); font-family: var(--mono); }
.license[open] > summary::before { content: "−"; }
.license-name { flex: 1 1 200px; min-width: 0; }
.license-count { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 600; }
.license-text { padding: 10px 18px; border-top: 1px solid var(--line); }
.license-text > summary { cursor: pointer; color: var(--soft); font-size: 14px; overflow-wrap: anywhere; }
.license-text > summary:hover { color: var(--text); }
.license-text pre {
  margin: 10px 0 4px; padding: 14px; max-height: 420px; overflow: auto; border-radius: 10px;
  background: rgba(0, 0, 0, 0.35); color: var(--soft); font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
div.license-text pre { margin-top: 4px; }

/* Part of the income to the army (/pay, the payment page and /army) */
.flag { flex: none; width: 24px; height: 16px; margin-top: 4px; border-radius: 3px; background: linear-gradient(#0057b7 50%, #ffd700 50%); }
.fund-note { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; padding: 18px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.fund-body { min-width: 0; }
.fund-text { color: var(--soft); }
.fund-total { margin-top: 10px; color: var(--muted); font-size: 15px; }
.army-banner .crumbs { width: fit-content; margin-bottom: 12px; padding: 6px 14px; border-radius: 10px; background: var(--panel); color: var(--muted); font-size: 14px; }
.army-banner .crumbs a { color: var(--soft); }
.army-banner h1 .flag { display: inline-block; width: 30px; height: 20px; margin: 0 14px 0 0; vertical-align: 0.06em; }
.army-table .item { color: var(--text); }
.army-to small { display: block; margin-top: 2px; color: var(--faint); font-size: 13px; }
.army-receipt { white-space: nowrap; }
@media (max-width: 560px) { .army-table .item { white-space: normal; } }
.pay-fund { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.pay-fund .flag { margin-top: 3px; width: 21px; height: 14px; }
.pay-agree { margin-top: 12px; color: var(--faint); font-size: 13px; }

/* Pay */
.notice { display: flex; gap: 20px; align-items: flex-start; padding: 24px; background: var(--surface); border: 1px solid rgba(255, 213, 0, 0.35); border-radius: 16px; }
.notice h2 { font-size: 20px; margin-bottom: 8px; }
.notice p { color: var(--muted); }
.pay-terms { margin-top: 16px; color: var(--muted); font-size: 14px; }
h2.sub { font-size: 20px; margin: 40px 0 16px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.product { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.product h3 { font-size: 16px; margin-bottom: 6px; }
.product p { color: var(--muted); font-size: 14px; }
.product .price { margin-top: 12px; color: var(--accent); font-weight: 700; font-size: 16px; }
.product .price-uah { margin-top: 2px; }
.price-table { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.price-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.price-table th { padding: 12px 18px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.price-table td { padding: 14px 18px; vertical-align: top; border-bottom: 1px solid var(--line); }
.price-table tr:last-child td { border-bottom: 0; }
.price-table .item { font-weight: 700; white-space: nowrap; }
.price-table .desc { color: var(--muted); }
.price-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-table td.num { color: var(--accent); font-weight: 700; }
.price-note { margin-top: 12px; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .price-table th, .price-table td { padding: 12px; } }

/* Leaderboards (/top) */
.top-server + .top-server { margin-top: clamp(40px, 6vw, 64px); }
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.board { min-width: 0; padding: 20px 22px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.board-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.board-head h2, .board-head h3 { font: 800 18px/1.2 var(--display); }
.board-head p { margin-top: 2px; font-size: 14px; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.board-place {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--chip); color: var(--soft); font: 800 13px/1 var(--display);
}
.board-list .is-gold .board-place { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 var(--accent-edge); }
.board-list .is-silver .board-place { background: #d9dfeb; color: var(--on-accent); box-shadow: 0 3px 0 #8f99ad; }
.board-list .is-bronze .board-place { background: #e0975a; color: var(--on-accent); box-shadow: 0 3px 0 #9c5a26; }
.board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board-value { flex: none; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-empty { padding: 14px 0 12px; border-top: 1px solid var(--line); color: var(--muted); }
.top-note {
  display: flex; gap: 16px; align-items: center; margin-top: clamp(32px, 5vw, 48px); padding: 18px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--soft);
}
.top-note code { font-family: var(--mono); font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: var(--accent); white-space: nowrap; }
@media (max-width: 480px) {
  .board { padding: 16px 16px 8px; }
  .top-note { align-items: flex-start; padding: 16px; }
}

/* Payment page: Solana Pay request, live status */
.pay-banner { padding-bottom: 56px; }
.pay-section { padding-top: clamp(28px, 4vw, 48px); }
.pay-wrap { max-width: 980px; }
/* Only the parts for the payment's state are shown; site.js switches data-state. `test`: a card
   payment made with LiqPay's test keys went through, and credited nothing. */
[data-state="pending"] .only-paid, [data-state="pending"] .only-expired, [data-state="pending"] .only-test,
[data-state="paid"] .only-pending, [data-state="paid"] .only-expired, [data-state="paid"] .only-test,
[data-state="expired"] .only-pending, [data-state="expired"] .only-paid, [data-state="expired"] .only-test,
[data-state="test"] .only-pending, [data-state="test"] .only-paid, [data-state="test"] .only-expired { display: none !important; }
.pay-card {
  display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(24px, 4vw, 44px); align-items: start;
  padding: clamp(20px, 4vw, 36px); border-radius: 22px;
  background: var(--panel-strong); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(4, 8, 20, 0.35);
}
/* The card's choices are lines of text: a little more room for them. */
@media (min-width: 761px) { [data-state="pending"] .pay-card { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); } }
[data-state="paid"] .pay-card, [data-state="expired"] .pay-card, [data-state="test"] .pay-card { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
[data-state="paid"] .pay-card { border-color: rgba(74, 222, 128, 0.45); }
.nowrap { white-space: nowrap; }
/* How to pay: the card panel. */
.pay-methods { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pay-methods .btn { width: 100%; }
.method-title { font: 800 18px/1.2 var(--display); }
/* The card panel: what pays, the saved card or another, remembering the card, the button. */
.pay-marks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pay-marks li {
  padding: 4px 10px; border-radius: 8px; background: var(--chip);
  color: var(--soft); font: 700 12px/1.3 var(--body); white-space: nowrap;
}
.card-form { display: flex; flex-direction: column; gap: 12px; }
.card-choice { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.card-option, .card-save {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
}
.card-option:hover, .card-save:hover { background: var(--surface-hover); }
/* The picked one: a 2px yellow edge (the inset shadow adds the second pixel without moving anything). */
.card-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card-save { align-items: flex-start; }
.card-save .tick { margin-top: 1px; }
.card-save[hidden] { display: none; }
.card-option-text, .card-save > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-option-text strong, .card-save strong { font-size: 15px; line-height: 1.35; }
.card-option-text .muted, .card-save .muted { font-size: 13px; line-height: 1.45; }
/* A card drawn small, with its brand on it (we keep no logos). */
.card-badge {
  flex: none; display: grid; place-items: center; min-width: 46px; height: 30px; padding: 0 6px; border-radius: 6px;
  background: linear-gradient(135deg, #2a3d78, #141d44); border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text); font: 800 11px/1 var(--body); letter-spacing: 0.02em; white-space: nowrap;
}
.card-signin { font-size: 14px; }
.card-icon { flex: none; }
.card-note { color: var(--muted); font-size: 13px; }
.card-error, .card-test { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.card-error { background: rgba(255, 156, 138, 0.12); border: 1px solid rgba(255, 156, 138, 0.45); color: var(--danger); }
.card-test { background: rgba(255, 179, 71, 0.1); border: 1px solid rgba(255, 179, 71, 0.45); color: var(--warn); }
.pay-label { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.pay-amount { margin: 6px 0 2px; font: 800 clamp(32px, 4.6vw, 48px)/1.1 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pay-amount .unit { color: var(--soft); font-size: 0.55em; white-space: nowrap; }
.pay-network { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; font-weight: 500; }
.pay-get {
  display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 18px; border-radius: 14px;
  background: rgba(255, 213, 0, 0.08); border: 1px solid rgba(255, 213, 0, 0.3);
}
.pay-get div { display: flex; flex-direction: column; }
.pay-get .muted { font-size: 13px; }
.pay-get strong { font: 800 24px/1.15 var(--display); }
.pay-status { margin-top: 14px; }
.status-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); font-weight: 600; }
.status-row .dot { width: 10px; height: 10px; flex: none; border-radius: 3px; background: var(--idle); }
.status-row .dot-wait { background: var(--accent); animation: pay-pulse 1.4s ease-in-out infinite; }
@keyframes pay-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .status-row .dot-wait { animation: none; } }
.pay-timer { margin-left: auto; color: var(--soft); font: 600 14px/1 var(--mono); white-space: nowrap; }
.status-row.is-paid { background: rgba(74, 222, 128, 0.14); color: var(--good); font-size: 17px; }
.status-row .check {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px;
  background: var(--good); color: var(--on-accent); font-weight: 800;
}
.status-row.is-expired, .status-row.is-test { color: var(--warn); }
.status-row.is-expired .dot, .status-row.is-test .dot { background: var(--warn); }
.pay-after { margin-top: 14px; color: var(--muted); }
@media (max-width: 760px) {
  .pay-card { grid-template-columns: 1fr; }
  .pay-info { order: -1; }
  .pay-methods { max-width: 380px; width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) {
  .pay-wrap { padding: 0 16px; }
  .pay-card { padding: 16px; border-radius: 18px; }
  .card-option, .card-save { padding: 12px; }
}
/* On the way to LiqPay's checkout or the bank: a short page site.js leaves at once. */
.pay-handoff { display: flex; align-items: center; min-height: 56vh; }
.pay-handoff .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.pay-handoff h1 { font: 800 clamp(24px, 3.4vw, 34px)/1.15 var(--display); }
.pay-handoff p { max-width: 52ch; color: var(--muted); }
.pay-handoff p.muted { font-size: 14px; }

/* 404 and error pages */
.is-lost main, .error-body { display: flex; }
.lost, .error-page {
  flex: 1; display: flex; align-items: center; min-height: 70vh;
  background: #111c44 url(steppe-night.svg) 85% 100% / cover no-repeat; image-rendering: pixelated;
}
.lost { margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + 40px) 0 140px; }
.lost-panel { max-width: 560px; padding: clamp(24px, 4vw, 36px); border-radius: 22px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); }
.lost-code, .error-code { font: 800 72px/1 var(--display); color: var(--accent); }
.lost h1 { font: 800 clamp(28px, 4vw, 40px)/1.1 var(--display); margin: 12px 0; }
.lost .lead { margin-bottom: 24px; }
.verify-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; }
.verify-mark svg { width: 28px; height: 28px; }
.verify-mark.is-done { color: var(--good); background: rgba(74, 222, 128, 0.16); }
.verify-mark.is-expired { color: var(--warn); background: rgba(255, 179, 71, 0.16); }
.verify-mark.is-key { color: var(--accent); background: rgba(255, 213, 0, 0.14); }
/* The new password's form (`/reset-password`). */
.reset-form { display: grid; gap: 14px; }
.reset-field { display: grid; gap: 6px; color: var(--soft); font-size: 14px; font-weight: 600; }
.reset-field input {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 16px var(--body);
}
.reset-field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.reset-field textarea {
  width: 100%; min-height: 96px; padding: 11px 14px; border-radius: 12px; resize: vertical;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 16px/1.45 var(--body);
}
.reset-field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.reset-hint { color: var(--faint); font-size: 13px; }
.reset-error { margin-bottom: 16px; color: var(--danger); font-weight: 600; }
.reset-form .btn { justify-self: start; margin-top: 4px; }
/* Signing in: `/login`, `/login/code`, `/register`, `/forgot-password`. */
.auth-panel { max-width: 480px; }
.auth-from {
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); color: var(--soft); font-size: 14px; line-height: 1.45;
}
.auth-forgot { justify-self: end; margin-top: -6px; font-size: 14px; font-weight: 500; }
.auth-switch { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.reset-hint.auth-hint { margin-top: -6px; }
.auth-checks { display: grid; gap: 10px; margin-top: 2px; }
.auth-check { display: flex; gap: 10px; align-items: flex-start; color: var(--soft); font-size: 14px; line-height: 1.45; font-weight: 500; }
.reset-field .auth-code { font: 600 22px/1.2 var(--mono); letter-spacing: 0.18em; text-align: center; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.reset-form .auth-actions .btn { margin-top: 0; }
.auth-notice { margin-bottom: 18px; padding: 10px 14px; border-radius: 12px; background: rgba(74, 222, 128, 0.12); color: var(--good); font-size: 14px; font-weight: 600; }
.link-button {
  padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.link-button:hover { color: var(--accent-hover); }
/* A connected app's mark (we keep no logos of theirs). */
.app-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, 0.1); color: var(--soft);
}
.app-mark svg { width: 18px; height: 18px; }
/* The consent page and the page of an app we don't know (`/connect/…`). */
.consent-panel { max-width: 520px; }
.lost .consent-panel h1 { font-size: clamp(26px, 3.2vw, 32px); }
.app-pair { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.app-pair .link { display: flex; gap: 6px; }
.app-pair .link span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.32); }
.app-pair .app-mark { width: 48px; height: 48px; border-radius: 13px; }
.app-pair .app-mark svg { width: 26px; height: 26px; }
.consent-who {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 22px; padding: 12px 14px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.06); color: var(--soft); font-size: 15px;
}
.consent-who strong { color: var(--text); }
.consent-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.consent-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--soft); line-height: 1.45; }
.consent-list svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.consent-yes svg { color: var(--good); }
.consent-list .consent-no { color: var(--muted); }
.consent-no svg { color: var(--faint); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.consent-small { margin-top: 18px; color: var(--faint); font-size: 13px; line-height: 1.5; }
.lost .lead.lead-small { font-size: 16px; }
.unknown-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
/* «Акаунт» and «Підключені програми». */
.acc-panel { max-width: 720px; display: grid; gap: 28px; }
.acc-panel .auth-notice { margin-bottom: -8px; }
.acc-ban { margin-bottom: -8px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 179, 71, 0.12); color: var(--warn); font-size: 14px; font-weight: 600; }
.acc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.lost .acc-name { font: 800 clamp(28px, 4vw, 40px)/1.1 var(--display); margin: 0; overflow-wrap: anywhere; }
.acc-mail { margin-top: 8px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.acc-mail .ok { color: var(--good); font-weight: 600; }
.acc-mail .no { color: var(--warn); font-weight: 600; }
.acc-h2 { font: 800 20px/1.2 var(--display); margin: 0 0 6px; }
.acc-sub { color: var(--muted); font-size: 15px; }
.acc-sub.acc-after { margin-top: 12px; font-size: 14px; }
.acc-none { margin-top: 14px; color: var(--soft); }
.app-card, .acc-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 14px; padding: 16px 18px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.app-card .app-mark { width: 44px; height: 44px; border-radius: 12px; }
.app-card .app-mark svg { width: 24px; height: 24px; }
.app-card .who, .acc-card .who { flex: 1 1 200px; min-width: 0; }
.app-card .name, .acc-card .name { font-weight: 700; font-size: 17px; }
.app-card .meta, .acc-card .meta { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 2px; }
/* «Збережена картка». */
.acc-card .card-badge { min-width: 58px; height: 40px; border-radius: 8px; font-size: 12px; }
.btn-unlink, .btn-forget, .btn-off { background: rgba(255, 156, 138, 0.14); color: var(--danger); }
.btn-unlink:hover, .btn-forget:hover, .btn-off:hover { background: rgba(255, 156, 138, 0.24); color: var(--danger); }
.acc-note { padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; line-height: 1.6; }
.acc-note a { color: var(--soft); }
/* «Вхід і безпека»: the email's letter and code, the password, two-factor sign-in. A refusal stands in
   its own part, above its form. */
.sec-form { max-width: 420px; margin-top: 14px; }
.sec-error { max-width: 520px; margin-top: 12px; }
.sec-verify { display: grid; gap: 12px; margin-top: 14px; }
.sec-verify .sec-form, .sec-verify .sec-error { margin-top: 0; }
.sec-verify strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.sec-again { color: var(--muted); font-size: 14px; }
.sec-more summary { color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; }
.sec-more > div { display: grid; gap: 12px; max-width: 520px; margin-top: 10px; }
.sec-more .sec-form, .sec-more .sec-error { margin-top: 0; }
.sec-about { margin-top: 6px; max-width: 64ch; }
.cab-confirm.sec-off { margin-top: 14px; }
.sec-off .acc-sub { font-size: 14px; }
.sec-off .sec-error { margin-top: 0; }
/* Turning two-factor sign-in on: the QR code (dark on white, as scanners want it) beside the steps. */
.totp-setup { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; max-width: 780px; }
.totp-qr { padding: 6px; border-radius: 14px; background: #fff; line-height: 0; }
.totp-qr svg { display: block; width: 200px; height: 200px; }
.totp-steps { display: grid; gap: 16px; min-width: 0; }
.totp-list { display: grid; gap: 12px; margin: 0; padding-left: 20px; color: var(--soft); }
.totp-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.totp-key code {
  padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); color: var(--text);
  font: 600 15px/1.3 var(--mono); letter-spacing: 0.06em; overflow-wrap: anywhere;
}
.totp-steps .sec-form, .totp-steps .sec-error { margin-top: 0; }
.totp-codes {
  display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 36px; width: max-content; max-width: 100%; margin: 16px 0;
  padding: 16px 20px; list-style: none; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.totp-codes code { font: 600 16px/1.3 var(--mono); letter-spacing: 0.04em; }
@media (max-width: 640px) {
  .totp-setup { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .totp-qr { justify-self: start; }
}
@media (max-width: 380px) { .totp-codes { grid-template-columns: max-content; } }
/* «Пристрої»: one card a sign-in, marked by what it is; this browser's outlined. */
.dev-list { display: grid; gap: 10px; }
.dev-list .acc-card { margin-top: 0; }
.dev-card.is-current { border-color: rgba(255, 213, 0, 0.45); }
.dev-mark { width: 44px; height: 44px; border-radius: 12px; }
.dev-mark svg { width: 22px; height: 22px; }
.dev-kind, .dev-this {
  display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  line-height: 1.5; vertical-align: 2px; white-space: nowrap;
}
.dev-kind { background: var(--chip); color: var(--soft); }
.dev-this { background: var(--accent); color: var(--on-accent); font-weight: 700; }
/* The cabinet (`/account/…`): a side menu in groups beside the section, and the balance in the
   header beside the nickname. Its pages keep the header's sections in a row of their own at every
   width above a phone's, so the balance has room. On a phone the balance is the section's first
   line, and the side menu one row under the header that scrolls sideways. */
.head-balance { margin: 0; color: var(--soft); font-size: 14px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.head-balance b, .cab-purse b { color: var(--accent); font-weight: 700; }
@media (min-width: 1200px) {
  .is-cabinet { --header-h: 104px; }
  .is-cabinet .header-row { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; }
  .is-cabinet .site-nav { order: 3; width: 100%; margin: 0 -12px; padding: 0 0 6px; overflow-x: auto; scrollbar-width: none; }
  .is-cabinet .me-name { max-width: 160px; }
}
.cab { padding: clamp(24px, 4vw, 40px) 0 clamp(56px, 8vw, 96px); }
.cab-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.cab-nav {
  position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 14px;
  padding: 14px 10px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line);
}
.cab-group { display: flex; flex-direction: column; gap: 2px; }
.cab-group-head { padding: 2px 12px 4px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.cab-nav a { padding: 9px 12px; border-radius: 10px; color: var(--soft); font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap; }
.cab-nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.cab-nav a:focus-visible { outline-offset: -2px; }
/* The page's own: lit as in the admin panel's sidebar, with a 3 px bar. */
.cab-nav a[aria-current="page"] { background: rgba(255, 213, 0, 0.12); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.cab-main {
  min-width: 0; padding: clamp(20px, 3.4vw, 36px); border-radius: 22px;
  background: var(--panel-strong); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 24px 60px rgba(4, 8, 20, 0.35);
}
.cab-purse { display: none; }
.cab-title { margin: 0 0 8px; font: 800 clamp(24px, 3vw, 32px)/1.15 var(--display); }
.cab-lead { max-width: 64ch; margin-bottom: 22px; color: var(--muted); font-size: 15px; }
.cab-title + .cab-error, .cab-title + .acc-panel, .cab-title + .prof-top, .cab-title + .cab-off, .cab-title + .acc-ban { margin-top: 16px; }
.cab-notice { margin-bottom: 18px; }
.cab-error { margin-bottom: 18px; }
.cab-ban { margin-bottom: 18px; }
.cab-off { display: grid; gap: 10px; max-width: 64ch; padding: 18px 20px; border-radius: 16px; background: rgba(255, 179, 71, 0.08); border: 1px solid rgba(255, 179, 71, 0.4); color: var(--soft); }
.danger { color: var(--danger); }
@media (max-width: 860px) {
  .head-balance { display: none; }
  .cab-purse { display: block; margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); color: var(--soft); font-size: 14px; }
  .cab-grid { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
  .cab { padding-top: 0; }
  .cab-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cab-nav {
    top: var(--header-h); z-index: 5; flex-direction: row; gap: 4px; margin: 0 -24px; padding: 8px 24px;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    border-radius: 0; border-width: 0 0 1px; background: rgba(8, 12, 24, 0.96);
  }
  .cab-nav::-webkit-scrollbar { display: none; }
  .cab-group { display: contents; }
  .cab-group-head { display: none; }
  .cab-nav a { flex: none; padding: 8px 12px; font-size: 14px; }
  .cab-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
  .cab-main { padding: 18px 16px; border-radius: 18px; }
}
@media (max-width: 480px) { .cab-nav { margin: 0 -16px; padding: 8px 16px; } }

/* «Поповнити сало»: the packs, your own amount, the box and the button. */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.pack {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); text-align: center; cursor: pointer;
}
.pack:hover { background: var(--surface-hover); }
.pack:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: rgba(255, 213, 0, 0.07); }
.pack:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pack-g { font: 800 18px/1.25 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pack-p { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topup-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; }
.topup-custom { display: grid; gap: 6px; color: var(--soft); font-size: 14px; font-weight: 600; }
.topup-input { display: inline-flex; align-items: center; gap: 8px; }
.topup-input input {
  width: 170px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 500 16px var(--body); font-variant-numeric: tabular-nums;
}
.topup-input input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.topup-total { padding-bottom: 10px; color: var(--soft); font-size: 16px; }
.topup-total b { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topup-note { margin-top: 8px; color: var(--faint); font-size: 13px; }
.topup-note [hidden] { display: none; }
.topup-consent { max-width: 66ch; margin-top: 20px; }
.topup-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; }
.topup-via { color: var(--faint); font-size: 13px; }
/* Off until the box is ticked: the browser won't send the form without it, site.js disables it. */
.topup-form:has(#topup-consent:not(:checked)) #topup-pay, #topup-pay:disabled { background: var(--chip); color: var(--faint); box-shadow: none; cursor: not-allowed; transform: none; }
.topup-form .card-test { margin-top: 16px; }
.cab-main .pay-fund { max-width: 70ch; margin-top: 24px; }
@media (max-width: 480px) {
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topup-pay .btn { width: 100%; }
}

/* «Магазин» and a purchase's confirmation. */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.prod { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
h2.prod-name { font: 700 17px/1.3 var(--body); letter-spacing: 0; }
.prod-term { color: var(--faint); font-size: 13px; font-weight: 600; }
.prod-desc { flex: 1; color: var(--muted); font-size: 14px; }
.prod-price { margin-top: 6px; color: var(--accent); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.prod-uah { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.prod-status { min-height: 20px; font-size: 13px; font-weight: 600; line-height: 20px; }
.prod-status.is-owned { color: var(--good); }
.prod-status.is-missing { color: var(--danger); }
.prod .btn { margin-top: 8px; }
.confirm-card { display: grid; gap: 6px; max-width: 560px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cab-title + .confirm-card { margin-top: 16px; }
.confirm-facts { display: grid; gap: 8px; margin: 10px 0 0; }
.confirm-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.confirm-facts dt { color: var(--muted); }
.confirm-facts dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.confirm-facts dd .muted { font-weight: 500; }
.confirm-form { display: grid; gap: 12px; max-width: 560px; margin-top: 18px; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.confirm-form .confirm-actions { margin-top: 4px; }

/* «Історія». */
.cab-filter { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, 0.08); }
.cab-filter a { padding: 6px 12px; border-radius: 8px; color: var(--soft); font-size: 14px; font-weight: 600; text-decoration: none; }
.cab-filter a:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.cab-filter a[aria-current="true"] { background: #fff; color: var(--on-accent); }
.hist-wrap { overflow-x: auto; }
.hist { width: 100%; border-collapse: collapse; font-size: 15px; }
.hist th { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hist td { padding: 11px 12px 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); vertical-align: top; }
.hist .num { padding-right: 0; padding-left: 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hist .plus { color: var(--good); font-weight: 700; }
.hist .minus { color: var(--danger); font-weight: 700; }
.hist-when { color: var(--muted); font-size: 14px; white-space: nowrap; }
.hist-at { display: none; }
@media (max-width: 560px) {
  .hist { font-size: 14px; }
  .hist th:first-child, .hist-when { display: none; }
  .hist-at { display: block; margin-top: 2px; color: var(--faint); font-size: 12px; }
  .hist .num { padding-left: 8px; }
}

/* «Гра»: the server picker, the parts of a page, its tables and small forms. */
.cab-server { margin-bottom: 14px; font-size: 14px; }
.cab-servers { margin-bottom: 14px; }
.cab-part + .cab-part { margin-top: 30px; }
.cab-lead + .cab-part, .cab-lead + .cab-error + .cab-part { margin-top: 4px; }
.game-h3 { margin: 18px 0 8px; color: var(--soft); font: 700 15px/1.3 var(--body); }
.game-table td { vertical-align: middle; }
/* A number column before a text one: room between them (the history's numbers end its rows). */
.game-table th.num + th, .game-table td.num + td { padding-left: 20px; }
.game-sub { display: block; margin-top: 3px; color: var(--faint); font-size: 13px; }
.game-state { display: block; color: var(--soft); font-size: 14px; white-space: nowrap; }
.game-state.is-closed { color: var(--faint); }
.game-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 8px 0 0; }
.game-table .game-inline { margin-top: 6px; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { color: var(--danger); }
.clan-tag-small { padding: 2px 6px; font-size: 11px; vertical-align: 1px; }
.game-parcel { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.game-parcel li { padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.game-form { max-width: 560px; }
.game-row { display: flex; flex-wrap: wrap; gap: 12px; }
.game-row > .reset-field { flex: 1 1 160px; }
.game-row > input { flex: 1 1 200px; min-width: 0; }
.game-row input, .game-amount {
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 500 16px var(--body); font-variant-numeric: tabular-nums;
}
.game-row input:focus-visible, .game-amount:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.game-days { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.game-days legend { margin-bottom: 6px; padding: 0; color: var(--soft); font-size: 14px; font-weight: 600; }
.game-day { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.game-day:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* A day is a pill of ours: its radio button lies over it, unseen (README «Interface rule»). */
.game-day { position: relative; }
.game-day input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.game-day:hover { background: var(--surface-hover); }
.game-day:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-check { display: flex; align-items: flex-start; gap: 10px; color: var(--soft); font-size: 14px; }
.game-check .tick { margin-top: 1px; }
.game-check .reset-hint { display: block; margin-top: 2px; }
.game-warn { margin-bottom: 16px; }
.game-buy { white-space: nowrap; }
.game-amount { width: 84px; padding: 7px 10px; font-size: 14px; }

/* Our own controls (README «Interface rule», `controls.css`): the suggestions' box in a row of fields. */
.game-row > .suggest { flex: 1 1 200px; }
/* Our dropdown's button (`controls.js`) looks like the site's fields; a select left to the browser (no script) too. */
.dropdown-button, .reset-field select {
  padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 16px var(--body);
}
.reset-field select { width: 100%; appearance: none; -webkit-appearance: none; padding-right: 34px; background: var(--select-arrow), var(--surface); }
.dropdown-button:hover { background: var(--surface-hover); }
.dropdown-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* A file field without the script: the browser's own, its button in ours. */
input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--chip); color: var(--text);
  font: 600 14px var(--body); cursor: pointer;
}
.game-online { padding: 2px 8px; border-radius: 999px; background: rgba(74, 222, 128, 0.14); color: var(--good); font-size: 12px; font-weight: 700; }
.game-rank { color: var(--soft); font-size: 14px; }
.game-rank.is-leader { color: var(--accent); font-weight: 700; }
.game-rank.is-elder { color: #8fb8ff; font-weight: 600; }
.game-actions { text-align: right; }
.game-actions .game-inline { margin: 2px 0 2px 6px; }
.game-confirm { display: inline-block; margin: 2px 0 2px 6px; text-align: left; vertical-align: top; }
.game-confirm summary { display: inline-flex; padding: 8px 12px; border-radius: 12px; background: var(--chip); color: var(--text); font-size: 13px; list-style: none; }
.game-confirm.is-danger summary { color: var(--danger); }
.game-confirm summary::-webkit-details-marker { display: none; }
.game-confirm[open] { display: block; max-width: 320px; margin-left: auto; }
.game-confirm .game-inline { margin: 0; }
.game-found { display: grid; gap: 6px; margin-top: 14px; }
.game-balance { margin: 0 0 6px; font: 800 22px/1.25 var(--display); font-variant-numeric: tabular-nums; }
.clan-own-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.clan-own-name { margin: 0; font: 800 clamp(20px, 2.6vw, 26px)/1.2 var(--display); overflow-wrap: anywhere; }
.clan-own .prof-links { margin-top: 8px; font-size: 14px; }
/* An absent leader's clan, offered to be taken over (roadmap 26): framed in the accent, as the overlay's card. */
.clan-takeover { padding: 16px 18px; border-radius: 16px; background: rgba(255, 213, 0, 0.05); border: 1px solid rgba(255, 213, 0, 0.45); }
.clan-takeover .acc-h2 { margin-top: 0; }
.clan-takeover .acc-sub { margin-bottom: 10px; }
/* «Клан»'s parts of roadmap 26: the row of its tabs, the vault's stacks and the ranks' rights, the куріні's
   cards, the level, the news beside the recruiting post and the applications. */
.hq-tabs { display: flex; gap: 2px; margin: 0 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.hq-tabs::-webkit-scrollbar { display: none; }
.hq-tabs a { flex: none; padding: 10px 14px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hq-tabs a:hover { color: var(--text); }
.hq-tabs a:focus-visible { outline-offset: -2px; }
.hq-tabs a[aria-current="true"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.hq-places { max-width: 420px; margin: 8px 0 4px; }
.hq-vault { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.hq-item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.hq-item-name { min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.hq-item-name .muted { display: block; font-size: 12px; font-weight: 400; }
.hq-item-count { flex: none; color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.hq-ench { color: #b9a2ff; }
.hq-rights { max-width: 560px; }
.hq-rights .hq-cell { padding-right: 0; padding-left: 8px; text-align: center; white-space: nowrap; }
.hq-rights td { vertical-align: middle; }
.hq-yes { color: var(--good); font-weight: 600; }
.hq-no { color: var(--faint); font-weight: 600; }
.hq-num { color: var(--soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.hq-flip-form { display: inline; }
.hq-flip {
  min-width: 52px; padding: 5px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  font: 600 14px/1.2 var(--body); font-variant-numeric: tabular-nums; cursor: pointer;
}
.hq-flip:hover { border-color: var(--accent); background: var(--surface-hover); }
.hq-flip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hq-flip.hq-num { color: var(--text); }
.hq-kurins { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 14px; }
.hq-kurin { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.hq-kurin.is-mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.hq-kurin h3 { margin: 2px 0 0; font: 700 16px/1.3 var(--body); overflow-wrap: anywhere; }
.hq-kurin-line { color: var(--muted); font-size: 14px; }
.hq-kurin-least { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.hq-pill { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.hq-pill.is-free { background: rgba(74, 222, 128, 0.15); color: var(--good); }
.hq-pill.is-taken { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.hq-pill.is-bids { background: rgba(255, 213, 0, 0.15); color: var(--accent); }
.hq-bid { margin-top: 6px; }
.hq-bid summary { list-style: none; }
.hq-bid summary::-webkit-details-marker { display: none; }
.hq-bid > div { margin-top: 10px; padding: 12px; border-radius: 12px; background: rgba(255, 213, 0, 0.06); border: 1px solid rgba(255, 213, 0, 0.3); }
.hq-bid .reset-form { gap: 10px; }
.hq-warn { color: var(--warn); }
.hq-short { margin: 8px 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.hq-own { display: flex; flex-wrap: wrap; align-items: start; gap: 12px 28px; margin: 12px 0 8px; }
.hq-own .cab-confirm { flex: 1 1 280px; }
.cab-confirm.is-calm summary { color: var(--accent); }
.cab-confirm.is-calm > div { background: rgba(255, 213, 0, 0.06); border-color: rgba(255, 213, 0, 0.3); }
.hq-level { display: flex; align-items: center; gap: 18px; }
.hq-level-number { flex: none; color: var(--accent); font: 800 44px/1 var(--display); font-variant-numeric: tabular-nums; }
.hq-level-text { flex: 1; display: grid; gap: 10px; min-width: 0; color: var(--soft); font-size: 15px; }
.hq-quests .task-head { flex-wrap: wrap; gap: 4px 16px; }
.hq-perks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.hq-perk { padding: 5px 10px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.hq-perk.is-on { border-color: rgba(74, 222, 128, 0.6); color: var(--good); }
.hq-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.hq-news { display: grid; gap: 12px; min-width: 0; }
.hq-news-head { margin-top: 12px; }
.hq-compose { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.hq-post-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 6px 12px; }
.hq-post-head .game-confirm { margin: 0; }
.hq-side { display: grid; gap: 14px; min-width: 0; }
.hq-side .clan-recruit { margin-top: 0; }
.hq-apps li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.hq-apps .game-inline { margin: 0; }
.hq-app-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 1080px) { .hq-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  /* The rights table has no date column for the history tables' phone rule to hide. */
  .hist.hq-rights th:first-child { display: table-cell; }
  .hq-rights .hq-cell { padding-left: 4px; }
}
@media (max-width: 480px) {
  .hq-tabs { margin: 0 -16px 18px; padding: 0 6px; }
  .hq-tabs a { padding: 10px 8px; font-size: 14px; }
  .hq-level-number { font-size: 36px; }
}
/* «Завдання»: a card for each of the day's three, its bar filling as it's done. */
.task-resets { margin-bottom: 14px; color: var(--faint); font-size: 14px; }
.task-list { display: grid; gap: 10px; }
.task-card { display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.task-card.is-done { border-color: rgba(74, 222, 128, 0.45); }
.task-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
h2.task-title, h3.task-title { margin: 0; font: 700 16px/1.35 var(--body); letter-spacing: 0; }
/* A task's tier beside its title (roadmap 55), and what a distinct one has counted under it. */
.task-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.task-tier { flex: none; padding: 1px 8px; border: 1px solid currentColor; border-radius: 7px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.task-tier.is-easy { color: var(--good); }
.task-tier.is-medium { color: var(--warn); }
.task-tier.is-hard { color: var(--danger); }
.task-counted { margin: -4px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.task-reward { flex: none; color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.task-bar { appearance: none; width: 100%; height: 8px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.task-bar::-webkit-progress-bar { background: rgba(255, 255, 255, 0.1); border-radius: 999px; }
.task-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.task-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.task-card.is-done .task-bar::-webkit-progress-value { background: var(--good); }
.task-card.is-done .task-bar::-moz-progress-bar { background: var(--good); }
.task-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.task-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.task-count .plus { color: var(--good); font-weight: 700; }
.task-extra { margin-top: 14px; }
.task-extra .task-bar { margin: 2px 0; }
.acc-note.game-note { margin-top: 24px; }
/* On a phone a row of the group's tables is a block of its own: what it is, then its numbers, each
   named by its column (`data-label`), then its buttons. */
@media (max-width: 560px) {
  .game-table, .game-table tbody, .game-table tr { display: block; }
  .game-table thead { display: none; }
  .game-table tr { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .game-table td, .game-table td.num + td { display: block; padding: 2px 0; border: 0; text-align: left; white-space: normal; }
  .game-table td.num { display: inline-block; padding: 4px 18px 0 0; }
  .game-table td[data-label]::before { content: attr(data-label) " "; color: var(--faint); font-size: 13px; font-weight: 400; }
  .game-actions { text-align: left; }
  .game-actions .game-inline, .game-confirm { margin: 6px 6px 0 0; }
  .game-confirm[open] { margin-left: 0; }
  .game-row > input, .game-row > .suggest { flex-basis: 100%; }
}

/* «Профіль». */
.prof-top { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: 8px 0 24px; }
.prof-top .face { flex: none; border-radius: 14px; background: var(--surface); }
@media (max-width: 480px) { .prof-top { gap: 14px; } .prof-top .face { width: 64px; height: 64px; border-radius: 10px; } }
.prof-who { display: grid; gap: 8px; flex: 1 1 260px; min-width: 0; }
.prof-name { font: 800 clamp(24px, 3.2vw, 30px)/1.15 var(--display); overflow-wrap: anywhere; }
.prof-uuid { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.prof-uuid code { color: var(--soft); font-size: 13px; overflow-wrap: anywhere; }
.prof-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; font-weight: 600; }
.prof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.prof-card { display: grid; align-content: start; gap: 10px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.prof-card .acc-h2 { margin: 0; }
.prof-card .prof-links { font-size: 14px; }
.prof-ranks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.prof-ranks li { display: flex; align-items: center; gap: 10px; }
.rank-dot { flex: none; }
.prof-balance { display: grid; gap: 8px; margin: 0; }
.prof-balance div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.prof-balance dt { color: var(--muted); }
.prof-balance dd { margin: 0; font: 800 20px/1.2 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* «Скін». */
.skin-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.skin-view { display: grid; justify-items: center; gap: 12px; padding: 22px 30px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.skin-figure { display: block; }
.skin-caption { font-size: 13px; text-align: center; }
.skin-forms { display: grid; gap: 22px; min-width: 0; }
.skin-form { display: grid; gap: 12px; max-width: 460px; }
.skin-form .acc-h2 { margin: 0; }
.skin-form .reset-field input.skin-file { padding: 9px 12px; font-size: 14px; }
.skin-models { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.skin-models legend { margin-bottom: 6px; padding: 0; color: var(--soft); font-size: 14px; font-weight: 600; }
.skin-model { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.skin-model:hover { background: var(--surface-hover); }
.skin-model:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.skin-model .tick { margin-top: 1px; }
.skin-model > span { display: grid; gap: 2px; font-size: 14px; }
.skin-model .muted { font-size: 13px; }
.skin-form .btn, .cab-confirm .btn { justify-self: start; }
.cab-confirm { max-width: 460px; }
.cab-confirm summary { color: var(--danger); font-size: 14px; font-weight: 600; cursor: pointer; }
.cab-confirm > div { display: grid; gap: 12px; margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 156, 138, 0.06); border: 1px solid rgba(255, 156, 138, 0.3); }
@media (max-width: 700px) { .skin-grid { grid-template-columns: minmax(0, 1fr); } .skin-view { justify-self: start; } }
@media (max-width: 400px) { .skin-models { grid-template-columns: 1fr; } }
/* The payment page, for its own player: back to the cabinet. */
.pay-cabinet { margin-top: 14px; font-weight: 600; }
.error-body { min-height: 100vh; }
.error-page { justify-content: center; padding: 24px 16px; }
.error-card { max-width: 440px; padding: 32px; border-radius: 20px; background: var(--panel-strong); border: 1px solid var(--line); }
.error-card h1 { font: 800 26px/1.2 var(--display); margin: 12px 0 10px; }
.error-card p { color: var(--muted); margin-bottom: 22px; }

/* Footer */
.site-footer { background: #0b0f1c; }
/* The page ends in the night steppe: a band of the landscape at its own aspect ratio. */
.footer-scene {
  width: 100%;
  aspect-ratio: 1100 / 210;
  min-height: 110px;
  max-height: 300px;
  background: #18265a url(steppe-night-horizon.svg) 88% 100% / cover no-repeat;
  image-rendering: pixelated;
}
.is-lost .footer-scene { display: none; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr; gap: 32px; padding-top: 36px; padding-bottom: 40px; font-size: 14px; }
.footer-grid .muted { margin-top: 10px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { color: var(--soft); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
.footer-legal { display: flex; flex-direction: column; gap: 8px; color: var(--faint); }
.footer-legal a { color: var(--soft); }
.footer-seller { color: var(--soft); }
.footer-bottom { padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Clans */
.clan-search { display: flex; gap: 8px; margin-bottom: 28px; }
.clan-search > .search-field { flex: 1; }
.clan-search-input {
  flex: 1; width: 100%; min-width: 0; padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 15px var(--body);
}
.clan-search-input::placeholder { color: var(--faint); }
.clan-server + .clan-server { margin-top: clamp(40px, 6vw, 64px); }
.clan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.clan-card {
  display: block; min-width: 0; padding: 18px 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text);
}
.clan-card:hover { background: var(--surface-hover); border-color: var(--accent); }
.clan-card h3 { font: 800 18px/1.2 var(--display); margin: 10px 0 6px; }
.clan-card p { color: var(--muted); font-size: 14px; }
.clan-tag {
  display: inline-block; padding: 4px 10px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line);
  font: 700 13px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}
.clan-head { margin: 28px 0 20px; }
.clan-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; margin-bottom: 24px; }
.clan-tile { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.clan-tile-value { font: 800 22px/1.2 var(--display); }
.clan-tile-label { margin-top: 4px; color: var(--muted); font-size: 14px; }
.clan-members { list-style: none; margin: 0; padding: 0; }
.clan-members li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.rank-badge { padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rank-badge.is-leader { background: var(--accent); color: var(--on-accent); }
.rank-badge.is-elder { background: var(--chip); color: var(--soft); }
.clan-note { margin-top: 24px; padding: 14px 18px; border-radius: 14px; background: var(--panel); color: var(--muted); font-size: 14px; }
.clan-card-recruiting { margin-top: 8px; color: var(--accent); font-size: 13px; font-weight: 600; }
/* A clan's banner beside its card (roadmap 26) */
.clan-card-banner {
  float: right; width: 28px; height: 56px; margin: 0 0 6px 14px; border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
/* A clan's page (roadmap 26): the banner strip, its numbers, the news and the members */
.clan-page { margin-top: 24px; border-radius: 18px; overflow: hidden; background: var(--panel-strong); border: 1px solid var(--line); }
.clan-banner { position: relative; height: 110px; background: linear-gradient(135deg, #2b5aa8, #7b3fb0); }
.clan-banner.is-hue-0 { background: linear-gradient(135deg, #2b5aa8, #7b3fb0); }
.clan-banner.is-hue-1 { background: linear-gradient(135deg, #1f6f5c, #2b5aa8); }
.clan-banner.is-hue-2 { background: linear-gradient(135deg, #8a3b2a, #b8862b); }
.clan-banner.is-hue-3 { background: linear-gradient(135deg, #4b2a8a, #a83b6f); }
.clan-banner.is-hue-4 { background: linear-gradient(135deg, #2a5c8a, #2a8a7a); }
.clan-banner.is-hue-5 { background: linear-gradient(135deg, #6f7a2a, #2a6f3b); }
.clan-banner.is-hue-6 { background: linear-gradient(135deg, #8a2a4b, #3b2a8a); }
.clan-banner.is-hue-7 { background: linear-gradient(135deg, #2a3b8a, #b8a12b); }
.clan-crest {
  position: absolute; left: 18px; bottom: -26px; display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 14px; background: #121a2b; border: 3px solid var(--navy);
  font: 600 18px/1 var(--display); color: var(--accent);
}
/* The clan's own banner in the crest's place: hung from a bar, down past the strip as the crest is */
.clan-flag { position: absolute; left: 22px; bottom: -26px; width: 56px; height: 120px; }
.clan-flag::before {
  content: ""; position: absolute; left: -6px; right: -6px; top: 0; height: 5px; border-radius: 3px;
  background: #6b4a2b; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.clan-flag img {
  position: absolute; left: 0; top: 5px; display: block; width: 56px; height: 112px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.clan-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding: 38px 18px 12px; }
.clan-top h2 { font: 600 20px/1.2 var(--display); margin: 0; }
.clan-leader { color: var(--muted); font-size: 14px; }
.clan-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0 18px 14px; color: var(--muted); font-size: 14px; }
.clan-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.clan-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; padding: 4px 18px 18px; }
@media (max-width: 680px) { .clan-cols { grid-template-columns: 1fr; } }
.clan-cols h3 { font: 600 15px/1.3 var(--display); margin: 0 0 10px; }
.clan-news { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.clan-news h3 { margin-bottom: 0; }
.clan-post { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
.clan-post-meta { color: var(--faint); font-size: 13px; }
.clan-post-body { margin-top: 6px; color: var(--soft); font-size: 15px; }
.clan-roster { min-width: 0; }
.clan-recruit { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(255, 213, 0, 0.5); color: var(--soft); font-size: 14px; overflow-wrap: anywhere; }
.clan-recruit-how { margin-top: 6px; color: var(--muted); }

/* Blueprints (/blueprints): the gallery's pills and cards, a blueprint's turntable */
.bp-banner .crumbs { width: fit-content; margin-bottom: 12px; padding: 6px 14px; border-radius: 10px; background: var(--panel); color: var(--muted); font-size: 14px; }
.bp-banner .crumbs a { color: var(--soft); }
.bp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.bp-pill {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--soft); font: 600 14px/1.2 var(--body); text-decoration: none;
}
.bp-pill:hover { color: var(--text); border-color: var(--accent); }
.bp-pill[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.bp-card {
  display: block; min-width: 0; padding: 10px 10px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text);
}
.bp-card:hover { background: var(--surface-hover); border-color: var(--accent); }
.bp-card h3 { font: 800 16px/1.25 var(--display); margin: 10px 4px 4px; overflow-wrap: anywhere; }
.bp-size { margin: 0 4px; color: var(--muted); font-size: 14px; }
.bp-price { color: var(--accent); font-weight: 800; }
.bp-card .bp-price { margin: 4px 4px 0; }
.bp-picture {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #5478ab 0%, #3a5683 70%);
}
.bp-picture img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bp-no-picture { position: absolute; inset: 30%; border-radius: 8px; border: 2px dashed rgba(255, 255, 255, 0.4); }
.bp-badge {
  position: absolute; top: 8px; left: 8px; max-width: calc(100% - 16px); padding: 4px 9px; border-radius: 8px;
  font: 700 12px/1.2 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bp-badge.is-ours { background: var(--accent); color: var(--on-accent); }
.bp-badge.is-player { background: rgba(7, 12, 29, 0.86); color: var(--text); }
.bp-note { margin-top: 28px; padding: 14px 18px; border-radius: 14px; background: var(--panel); color: var(--muted); font-size: 14px; }
.bp-detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .bp-detail { grid-template-columns: 1fr; } }
.bp-picture.is-big { cursor: grab; touch-action: pan-y; }
.bp-picture.is-big.is-dragging { cursor: grabbing; }
.bp-picture.is-big img { user-select: none; -webkit-user-drag: none; }
.bp-turn { display: grid; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.bp-slider { width: 100%; }
.bp-facts dl { display: grid; gap: 0; margin: 0 0 16px; }
.bp-facts dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.bp-facts dt { color: var(--muted); }
.bp-facts dd { margin: 0; text-align: right; font-weight: 600; }
.bp-facts .bp-note { margin-top: 16px; }
.bp-top { margin: 20px 0 0; max-width: 220px; }
.bp-top img { display: block; width: 100%; border-radius: 12px; background: radial-gradient(circle, #5478ab 0%, #3a5683 70%); }
.bp-top figcaption { margin-top: 6px; color: var(--faint); font-size: 13px; }

/* The world map (/map): the 3D map fills the screen under the header and the plot panel floats
   over it. Everything over the map is solid (a see-through button over a busy map reads badly):
   hover only lightens it. */
.map3d {
  --map-ctl: #111833; --map-ctl-hover: #1e2952; --map-panel: rgba(11, 16, 40, 0.95);
  --map-sold: #aab3cc; --map-resale: #ff9f43;
  position: relative; overflow: hidden; background: var(--navy-deep);
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 420px;
}
.map3d [hidden] { display: none !important; }
.map3d-canvas, .map3d-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map3d-canvas canvas { touch-action: none; outline: none; }
.map3d-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); max-width: 520px; margin: 0 auto; }
.map3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.map3d-label {
  position: absolute; left: 0; top: 0; padding: 2px 7px; border-radius: 7px; will-change: transform;
  background: rgba(7, 12, 29, 0.84); color: var(--text); font: 700 12px/1.25 var(--body); white-space: nowrap;
}
.map3d-label.is-sold { color: var(--map-sold); }
.map3d-label.is-selected { background: var(--accent); color: var(--on-accent); font-size: 13px; }
.map3d-label.is-warp { color: var(--good); }
.map3d-label.is-warp::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--good); vertical-align: 1px; }
.map3d-label.is-spawn { background: var(--good); color: #062012; }
.map3d-ctl {
  padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--soft); font: 600 14px/1.2 var(--body); cursor: pointer;
}
.map3d-ctl:hover { background: var(--map-ctl-hover); color: var(--text); }
.map3d-ctl.is-on { border-color: var(--accent); color: var(--accent); }
.map3d-worlds { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 6px; }
.map3d-zoom { position: absolute; top: 60px; right: 12px; z-index: 3; display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.map3d-zoom button { width: 38px; height: 38px; border: 0; background: var(--map-ctl); color: var(--text); font: 600 20px/1 var(--body); cursor: pointer; }
.map3d-zoom button + button { border-top: 1px solid var(--line); }
.map3d-zoom button:hover { background: var(--map-ctl-hover); color: var(--accent); }
.map3d-top { position: absolute; top: 148px; right: 12px; z-index: 3; }
.map3d-claims { position: absolute; top: 196px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; }
/* The 3D map's claims switch (`controls.css`'s `.switch`) at the new map's size. */
.map3d-claims .switch > i { width: 28px; height: 16px; }
.map3d-claims .switch > i::after { top: 2px; left: 2px; width: 12px; height: 12px; }
.map3d-claims .switch > input:checked + i::after { transform: translateX(12px); }
/* The new map's own controls (README «Interface rule»): a switch, a dropdown, free flight for staff. */
.map3d-switch-knob {
  position: relative; display: inline-block; width: 28px; height: 16px; border-radius: 999px;
  background: #2a3354; transition: background 0.15s;
}
.map3d-switch-knob::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--soft); transition: transform 0.15s;
}
.map3d-switch[aria-checked="true"] .map3d-switch-knob { background: var(--accent); }
.map3d-switch[aria-checked="true"] .map3d-switch-knob::after { transform: translateX(12px); background: var(--on-accent); }
.map3d-fly { position: absolute; top: 196px; right: 12px; z-index: 3; }
.map3d-fly[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.map3d-fly ~ .map3d-claims { top: 244px; }
.map3d-menu { position: relative; min-width: 0; }
.map3d-menu-button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0;
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--text); font: 500 14px var(--body); text-align: left; cursor: pointer;
}
.map3d-menu-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map3d-menu-button i { color: var(--muted); font-style: normal; }
.map3d-menu-button:hover, .map3d-menu-button[aria-expanded="true"] { background: var(--map-ctl-hover); }
.map3d-menu-list {
  position: absolute; z-index: 8; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  max-height: 260px; overflow-y: auto; border-radius: 10px; border: 1px solid var(--line);
  background: #0c1330; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.map3d-menu-list li { padding: 8px 10px; border-radius: 7px; color: var(--soft); font-size: 14px; cursor: pointer; outline: none; }
.map3d-menu-list li:hover, .map3d-menu-list li:focus { background: var(--map-ctl-hover); color: var(--text); }
.map3d-menu-list li[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.map3d-pick .map3d-menu, .map3d-pick .dropdown { flex: 1; }
/* Flying on a phone: a stick to move with (left), up and down (right). */
.map3d-stick {
  position: absolute; left: 24px; bottom: 96px; z-index: 5; width: 112px; height: 112px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(17, 24, 51, 0.7); touch-action: none;
}
.map3d-stick-knob {
  position: absolute; left: 36px; top: 36px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); opacity: 0.85; pointer-events: none;
}
.map3d-updown { position: absolute; right: 24px; bottom: 110px; z-index: 5; display: grid; gap: 8px; }
.map3d-updown button {
  width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--text); font-size: 16px; touch-action: none; cursor: pointer;
}
.map3d-legend {
  position: absolute; left: 384px; bottom: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px 14px;
  padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--map-ctl); color: var(--soft); font-size: 13px;
}
.map3d-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; border: 2px solid var(--accent); vertical-align: -1px; }
.map3d-swatch.is-resale { border-color: var(--map-resale); }
.map3d-swatch.is-sold { border-color: var(--map-sold); background: rgba(170, 179, 204, 0.25); }
.map3d-coords {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; padding: 5px 10px; border-radius: 8px; white-space: pre;
  border: 1px solid var(--line); background: var(--map-ctl); color: var(--soft); font: 13px var(--mono); font-variant-numeric: tabular-nums;
}
.map3d-toast {
  position: absolute; left: 50%; bottom: 64px; z-index: 6; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--map-ctl-hover); font-size: 14px;
}
/* The plot panel. */
.map3d-panel {
  position: absolute; top: 12px; left: 12px; bottom: 12px; z-index: 4; width: 360px;
  display: flex; flex-direction: column; padding: 12px;
  background: var(--map-panel); border: 1px solid var(--line); border-radius: 16px;
}
.map3d-panel-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.map3d-sheet { display: none; }
.map3d-pick { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.map3d-panel input[type="search"], .map3d-panel select, .map3d-panel .dropdown-button {
  width: 100%; min-width: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--text); font: 500 14px var(--body);
}
/* Our own dropdowns and search box in the panel (`controls.js`), in the map's look; a select left to the browser
   (without the script) gets the same arrow. */
.map3d-panel { --ctl-pop: #0c1330; --ctl-pop-edge: var(--line); --ctl-pop-radius: 10px; }
.map3d-panel input[type="search"] { padding-right: 36px; }
.map3d-panel select { appearance: none; -webkit-appearance: none; padding-right: 30px; background: var(--select-arrow), var(--map-ctl); }
.map3d-panel .dropdown-button:hover, .map3d-panel .dropdown.is-open .dropdown-button { background: var(--map-ctl-hover); }
.map3d-panel .dropdown-option { font-size: 14px; }
.map3d-panel input::placeholder { color: var(--faint); }
.map3d-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map3d-chips { display: flex; gap: 6px; }
.map3d-chip {
  flex: 1; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--muted); font: 600 13px var(--body); cursor: pointer;
}
.map3d-chip:hover { background: var(--map-ctl-hover); color: var(--text); }
.map3d-chip.is-on { border-color: var(--accent); color: var(--text); }
.map3d-list { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 6px; align-content: start; padding-right: 2px; }
.map3d-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline;
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--map-ctl);
  color: var(--text); font: 600 14px var(--body); text-align: left; cursor: pointer;
}
.map3d-row:hover { background: var(--map-ctl-hover); }
.map3d-row.is-selected { border-color: var(--accent); }
.map3d-row-meta { overflow: hidden; color: var(--muted); font-weight: 400; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.map3d-row-price { color: var(--accent); font-variant-numeric: tabular-nums; }
.map3d-row-price.is-sold { color: var(--map-sold); font-weight: 400; }
.map3d-list-empty { margin: 4px 2px; color: var(--muted); font-size: 14px; }
.map3d-card { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--accent); background: var(--map-ctl); }
.map3d-card-top { display: flex; align-items: center; gap: 10px; }
.map3d-card-id { font: 800 18px/1 var(--display); }
.map3d-status { padding: 3px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.map3d-status.is-sold { background: #39405c; color: var(--soft); }
.map3d-close {
  margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--map-ctl); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.map3d-close:hover { background: var(--map-ctl-hover); color: var(--text); }
.map3d-facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: 14px; }
.map3d-facts dt { color: var(--muted); }
.map3d-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.map3d-facts dd.is-price { color: var(--accent); font-weight: 700; }
.map3d-how, .map3d-where { margin: 0; color: var(--soft); font-size: 13px; }
.map3d-where { color: var(--faint); }
.map3d-note { margin: 0; color: var(--faint); font-size: 13px; }
/* A phone: the panel is a sheet at the bottom, closed until tapped. */
@media (max-width: 860px) {
  .map3d-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 62%; padding: 8px 10px; }
  .map3d-panel.is-closed .map3d-panel-body { display: none; }
  .map3d-sheet {
    display: flex; justify-content: space-between; align-items: center; width: 100%;
    padding: 6px 4px; border: 0; background: none; color: var(--text); font: 700 14px var(--body); cursor: pointer;
  }
  .map3d-legend { left: 12px; bottom: 70px; }
  .map3d-coords { display: none; }
  .map3d-worlds .map3d-ctl { padding: 7px 10px; font-size: 13px; }
}
