/* mc.akulichev.com in the Akulichev Launcher design system: dark violet, Unbounded headings, Onest text.
   Mobile first: a bottom tab bar on phones, a left rail like the launcher's from 900px. */
@font-face { font-family: Onest; font-weight: 400; font-display: swap; src: url(fonts/onest-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-weight: 400; font-display: swap; src: url(fonts/onest-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Onest; font-weight: 500; font-display: swap; src: url(fonts/onest-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-weight: 500; font-display: swap; src: url(fonts/onest-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Onest; font-weight: 600; font-display: swap; src: url(fonts/onest-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-weight: 600; font-display: swap; src: url(fonts/onest-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Unbounded; font-weight: 500; font-display: swap; src: url(fonts/unbounded-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; font-weight: 500; font-display: swap; src: url(fonts/unbounded-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Unbounded; font-weight: 700; font-display: swap; src: url(fonts/unbounded-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; font-weight: 700; font-display: swap; src: url(fonts/unbounded-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }

:root {
  --bg: #0E0C14; --bar: #0B0910; --rail: #13101B; --surface: #1A1724; --surface-2: #221E2E; --sunken: #13101B;
  --line: #2E2940; --line-2: #3A3450; --line-soft: #1F1B2B;
  --text: #EEEAF6; --text-2: #CFC8E0; --muted: #A7A0BA; --faint: #8A83A0;
  --accent: #7C3AED; --accent-text: #B79CFF; --accent-soft: #2A2142; --accent-tag: #C9B5FF;
  --ok: #4ADE80; --warn: #FBBF24; --bad-bg: #3A1B26; --bad: #F4A3B4;
  --display: Unbounded, sans-serif; --mono: 'JetBrains Mono', monospace;
  --tabbar: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.5 Onest, system-ui, sans-serif; }
a { color: var(--accent-tag); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
code { font-family: var(--mono); font-size: .92em; color: var(--text-2); background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.boot { padding: 40px 16px; color: var(--muted); text-align: center; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* frame: header (phones), rail (desktop), content, tab bar (phones) */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; background: rgba(11, 9, 16, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-size: 15px; font-weight: 500; }
.brand svg { flex-shrink: 0; }
.top .grow { flex: 1; }
.acc-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 13px; }
.acc-btn.plain { padding: 0 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 30px; border-radius: 18px; }
main { padding: 16px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(7, 1fr); height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(11, 9, 16, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line-soft); }
.tabbar a, .rail a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11px; }
.tabbar a[aria-current="page"], .rail a[aria-current="page"] { color: var(--accent-text); }
.rail { display: none; }
@media (min-width: 900px) {
  .top { display: none; }
  .tabbar { display: none; }
  .rail { position: fixed; top: 0; bottom: 0; left: 0; width: 88px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 8px; background: var(--rail); border-right: 1px solid var(--line-soft); z-index: 10; }
  .rail .logo { display: grid; place-items: center; height: 48px; margin-bottom: 10px; }
  .rail a { height: 58px; border-radius: 12px; font-size: 12px; }
  .rail a:hover { background: var(--surface); color: var(--text); }
  .rail a[aria-current="page"] { background: var(--accent-soft); }
  .rail .grow { flex: 1; }
  .shell { margin-left: 88px; }
  main { padding: 28px 36px 48px; gap: 22px; }
}

/* basics, as in the launcher */
.h1 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 500; }
.h2 { margin: 0; font-family: var(--display); font-size: 14px; font-weight: 500; color: var(--text-2); }
.card { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.section { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: #5B5274; }
.btn.primary { border: 0; background: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: #6D28D9; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.small { height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.input { height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunken); color: var(--text); min-width: 0; }
.input:focus { border-color: var(--accent-text); outline: none; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #4A4458; flex-shrink: 0; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 12px; font-weight: 500; background: var(--accent-soft); color: var(--accent-tag); }
.badge.event { background: #1E3A2A; color: #86EFAC; } .badge.update { background: #1C2A40; color: #9CC0FF; } .badge.fix { background: #2B2A22; color: #FCD97A; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .h1 { flex: 1; }
.empty { color: var(--muted); font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; padding: 10px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 14px; }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.note { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* home: hero with the approved screenshots */
.hero { position: relative; overflow: hidden; border-radius: 18px; min-height: 300px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: flex-end; }
.hero .shots, .hero .shots figure { position: absolute; inset: 0; margin: 0; }
.hero figure { opacity: 0; transition: opacity 1.2s ease; }
.hero figure.on { opacity: 1; }
.hero img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.06) translateX(-1%); } to { transform: scale(1.12) translateX(1%); } }
@media (prefers-reduced-motion: reduce) { .hero img { animation: none; } .hero figure { transition: none; } }
.hero figcaption { position: absolute; right: 12px; top: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(11, 9, 16, .7); font-size: 12px; color: var(--text-2); }
.hero .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 12, 20, 0) 30%, rgba(14, 12, 20, .92) 100%); }
.hero .inner { position: relative; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 6vw, 44px); line-height: 1.1; }
.hero p { margin: 0; color: var(--text-2); max-width: 560px; }
@media (min-width: 900px) { .hero { min-height: 380px; } .hero .inner { padding: 32px; } }

.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-servers { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (min-width: 980px) { .grid-servers { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.server { display: flex; flex-direction: column; gap: 12px; }
.server .name { font-family: var(--display); font-size: 17px; font-weight: 500; }
.server .state { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.server > .small { flex: 1; }
.addr { display: flex; gap: 8px; }
.addr .ip { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 12px; height: 42px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 16px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 13px; }
.person .avatar { width: 24px; height: 24px; font-size: 11px; }

.bar { height: 10px; border-radius: 5px; background: var(--sunken); border: 1px solid var(--line-soft); overflow: hidden; }
.bar > div { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-text)); }
.ch-title { font-family: var(--display); font-size: 17px; }
.pts { display: grid; grid-template-columns: 1fr; gap: 6px 22px; }
@media (min-width: 560px) { .pts { grid-template-columns: 1fr 1fr; } }
.pt { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.pt a { color: var(--text); text-decoration: none; } .pt a:hover { color: var(--accent-tag); }
.more { color: var(--accent-text); text-decoration: none; font-size: 13px; }

/* news */
.news-item { display: flex; flex-direction: column; gap: 8px; }
.news-item h2 { margin: 0; font-size: 17px; font-weight: 600; }
.news-item ul { margin: 0; padding-left: 20px; color: var(--text-2); }

/* statistics */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table.stats { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.stats th, table.stats td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
table.stats th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-weight: 500; font-size: 12px; }
table.stats th button { border: 0; background: none; color: inherit; padding: 0; font: inherit; }
table.stats th button[aria-pressed="true"] { color: var(--accent-text); }
table.stats td:first-child, table.stats th:first-child { text-align: left; color: var(--faint); width: 28px; }
table.stats td.who, table.stats th.who { text-align: left; }
table.stats td.who a { color: var(--text); text-decoration: none; font-weight: 500; } table.stats td.who a:hover { color: var(--accent-tag); }
table.stats tr:last-child td { border-bottom: 0; }

/* together */
.call { display: flex; flex-direction: column; gap: 10px; }
.call-title { font-weight: 600; font-size: 16px; }
.ans { font-weight: 500; } .ans.yes { color: var(--ok); } .ans.maybe { color: var(--warn); } .ans.no { color: var(--muted); }

/* map and chat */
.map-frame { width: 100%; height: calc(100vh - 56px - var(--tabbar) - 150px); min-height: 360px; border: 1px solid var(--line); border-radius: 14px; background: #0b0910; }
@media (min-width: 900px) { .map-frame { height: calc(100vh - 170px); } }
.chat-list { height: calc(100vh - 56px - var(--tabbar) - 210px); min-height: 280px; overflow-y: auto; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 900px) { .chat-list { height: calc(100vh - 230px); } }
.line { display: flex; gap: 10px; line-height: 1.45; overflow-wrap: anywhere; font-size: 14px; }
.line .time { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; flex-shrink: 0; padding-top: 2px; }
.line .sys { color: var(--muted); font-style: italic; }
.line .via { color: var(--accent-text); font-size: 12px; }
.line.mention { background: var(--accent-soft); border-radius: 6px; margin: 0 -6px; padding: 2px 6px; }
.line a { text-decoration: none; font-weight: 600; }
.chat-send { display: flex; gap: 10px; }
.chat-send .input { flex: 1; }

/* profile */
.prof-head { display: flex; align-items: center; gap: 16px; }
.prof-head .who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prof-head .nick { font-family: var(--display); font-size: 24px; font-weight: 500; overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.tile .v { font-family: var(--display); font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tile .k { font-size: 12px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { padding: 8px 10px; font-size: 13px; color: var(--text-2); }

/* how to join, features */
ol.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); }
ol.steps b { color: var(--text); }
details.manual summary { cursor: pointer; color: var(--accent-tag); font-weight: 500; }
details.manual[open] summary { margin-bottom: 12px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.feature { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.feature b { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 14px; font-weight: 500; color: var(--accent-tag); }
.feature span { color: var(--text-2); font-size: 14px; }
footer { padding: 6px 0 0; color: var(--faint); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--faint); }

/* dialog */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(5, 4, 9, .72); display: flex; align-items: flex-end; justify-content: center; }
.dialog { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; padding: 20px; border-radius: 18px 18px 0 0; background: var(--surface); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 600px) { .overlay { align-items: center; } .dialog { border-radius: 16px; } }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld .input { width: 100%; }
.error-text { color: var(--bad); font-size: 13px; }

/* account: the skin's front view */
.skin { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.skin-stage { width: 128px; height: 256px; padding: 0; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); display: grid; place-items: center; flex-shrink: 0; }
.skin-stage canvas { width: 96px; height: 192px; image-rendering: pixelated; }
.acc-btn[aria-current="page"] { border-color: var(--accent-text); }

/* villages */
.vgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card.village { display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; }
.card.village:hover { border-color: var(--line-2); background: var(--surface-2); }
.card.village .row { display: flex; align-items: center; gap: 8px; }
.card.village .name { flex: 1; font-family: var(--display); font-size: 16px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.vstats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.vstats b { color: var(--text); font-weight: 600; }
.vmap { width: 100%; max-height: 360px; display: block; background: var(--sunken); border-radius: 10px; }
.vchart { width: 100%; height: 80px; display: block; }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) { .tiles.two { grid-template-columns: 1fr; } }
.vgoods { display: grid; gap: 6px; }
.vgoods .bar { height: 6px; }
table.vtable td, table.vtable th { text-align: left; white-space: normal; min-width: 90px; }
table.vtable td.who { white-space: nowrap; }
.vchron { display: flex; flex-direction: column; gap: 4px; }
.vchron .time { min-width: 64px; }
table.vtable td:first-child, table.vtable th:first-child { width: auto; color: var(--text); font-weight: 500; }

/* 2026-10-19: keep the address row at the bottom of every server card */
.server .addr { margin-top: auto; }
.addr .btn.icon { width: 42px; height: 42px; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center; }

/* admin panel: tiles of the servers, the chosen server in two columns */
.adm { display: flex; flex-direction: column; gap: 16px; }
.adm .tabs { align-self: flex-start; }
.adm-live { display: inline-flex; flex-wrap: nowrap; white-space: nowrap; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-live.off { color: var(--bad); }
.adm-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.adm-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; transition: border-color .15s, background .15s; }
.adm-tile:hover { border-color: var(--line-2); background: var(--surface-2); }
.adm-tile[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.adm-tile .nm { font-family: var(--display); font-size: 14px; font-weight: 500; }
.adm-tile .st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.adm-tile .nums { display: flex; gap: 14px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-tile small { color: var(--muted); font-size: 11px; }
.dot.sleep { background: #6B7FD7; }
.adm-detail { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .adm-detail { grid-template-columns: 1fr 1fr; } }
.adm-detail .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row-sb { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { background: var(--sunken); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric .big { font-family: var(--display); font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.metric .big small { font-size: 13px; color: var(--muted); }
.meter { display: flex; flex-direction: column; gap: 6px; }
.bar.thin { height: 6px; border-radius: 3px; }
.bar.thin > div, .bar.thin > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-text)); }
.bar.thin > .hot { background: linear-gradient(90deg, #D97706, var(--warn)); }
.btn.danger { color: #ff9b9b; }
.btn.danger-solid { border: 0; background: #B42346; color: #fff; }
.btn .spin, .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.switch-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; margin: 0 -10px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; }
.switch-row:hover { background: var(--surface-2); }
.sw-text { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.sw { position: relative; width: 38px; height: 22px; flex-shrink: 0; border-radius: 11px; background: var(--line-2); transition: background .15s; }
.sw > span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch-row[aria-checked="true"] .sw { background: var(--accent); }
.switch-row[aria-checked="true"] .sw > span { transform: translateX(16px); }
.sw.busy { opacity: .6; }
.idle { gap: 8px; }
.idle label { flex: 1; min-width: 140px; }
.num { display: inline-flex; align-items: center; gap: 6px; }
.num .input { width: 76px; text-align: right; }
.grow { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 4px 0 12px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.chip button { height: 24px; min-width: 24px; border: 0; border-radius: 12px; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 6px; }
.chip button:hover { background: var(--line); color: var(--text); }
.chip.armed { border-color: #B42346; }
.chip.armed button { background: #B42346; color: #fff; font-size: 12px; }
.adm-player { display: flex; align-items: center; gap: 10px; }
.adm-player .pl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.adm-player select { width: auto; max-width: 180px; }
.pt-bar { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.pt-bar .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.adm-shots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.adm-shot { display: flex; flex-direction: column; gap: 8px; }
.adm-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; background: var(--sunken); }
.jst { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.jst.done { background: #1E3A2A; color: #86EFAC; } .jst.failed { background: var(--bad-bg); color: var(--bad); }
.jst.running, .jst.queued { background: #2B2A22; color: #FCD97A; }
table.journal td, table.journal th { text-align: left; }
table.journal td.msg { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
table.journal td:first-child, table.journal th:first-child { width: auto; color: var(--muted); }
.tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
/* phones: eight sections do not fit with labels; only the current one keeps its label */
@media (max-width: 520px) {
  .tabbar a:not([aria-current="page"]) span { display: none; }
  .tabbar a span { font-size: 10px; white-space: nowrap; }
}
/* the account button in the rail: like the other rail items, avatar over a short nick */
.rail .acc-btn { flex-direction: column; justify-content: center; gap: 4px; width: 100%; height: auto; min-height: 64px; padding: 8px 4px; border-radius: 12px; border: 0; background: none; color: var(--muted); font-size: 11px; }
.rail .acc-btn:hover { background: var(--surface); color: var(--text); }
.rail .acc-btn[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.rail .acc-btn .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail .acc-btn.plain { min-height: 44px; border: 1px solid var(--line); color: var(--text); font-size: 12px; }
.acc-btn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* scrollbars and native controls in the dark theme; segmented rows wrap instead of scrolling */
:root { color-scheme: dark; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #5B5274; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }
.seg { scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.adm .seg { flex-wrap: wrap; overflow: visible; }
.dialog .seg { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; align-self: stretch; }
.dialog .seg button { width: 100%; }
