/* Mriya cabinet — the Mriya II look of mriya.pw: parchment, gold frames, wine banners, Alegreya */
@font-face { font-family: Alegreya; src: url("../fonts/alegreya-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: Alegreya; src: url("../fonts/alegreya-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Alegreya; src: url("../fonts/alegreya-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: Alegreya; src: url("../fonts/alegreya-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Alegreya; src: url("../fonts/alegreya-cyrillic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: Alegreya; src: url("../fonts/alegreya-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Alegreya; src: url("../fonts/alegreya-cyrillic-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: Alegreya; src: url("../fonts/alegreya-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya SC"; src: url("../fonts/alegreya-sc-cyrillic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: "Alegreya SC"; src: url("../fonts/alegreya-sc-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --parch: #fbe8cb;
  --parch-hi: #fffaf0;
  --parch-lo: #f3dcae;
  --ink: #3a2306;
  --ink-2: #5f3d0d;
  --ink-3: #6b4716;
  --muted: #7a5a2e;
  --gold: #d9a03a;
  --gold-deep: #8a5a14;
  --wine: #8e1f22;
  --dusk: #1d1420;
  --royal: #2b56ad;
  --live: #3f9b2a;
  --line: rgba(160, 110, 40, 0.3);
  --dash: 1px dashed rgba(160, 110, 40, 0.42);
  --frame: linear-gradient(160deg, #f7dc96 0%, #b47c2a 38%, #f5d68e 58%, #93601a 100%);
  --card: linear-gradient(180deg, #fffaf0, #fcecd0);
  --display: Alegreya, Georgia, serif;
  --sc: "Alegreya SC", Alegreya, Georgia, serif;
  --text: Alegreya, Georgia, serif;
  --gutter: 16px;
  --tabbar: 64px;
  --top-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #c9974a var(--parch); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  color: var(--ink);
  background: var(--parch) url("../img/pattern.svg") 0 0 / 600px 600px;
  font: 17px/1.5 var(--text);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-deep); }
a:hover { color: var(--royal); }
img { display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; margin: 0; color: var(--ink-2); text-wrap: balance; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--royal); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
input[type=radio], input[type=checkbox] { accent-color: var(--gold-deep); }

/* gold frame card (like .frame on mriya.pw), with diamond corners */
.frame, .lots, .goods, .achs, .rank, .roster-row, .donate-form, .gate-form, .tier, .refbox, .goldbox, .chart, .stats, .chat-log, .buy, .bag-pick, .top-set, .mk-card, .mk-deal, .mk-how {
  border: 2px solid transparent;
  background: var(--card) padding-box, var(--frame) border-box;
  box-shadow: inset 0 0 0 3px rgba(255, 250, 240, 0.85), inset 0 0 0 4px rgba(180, 124, 42, 0.3), 0 10px 22px rgba(110, 70, 20, 0.14);
}
.gate-form, .tier, .goldbox, .refbox { position: relative; }
.gate-form::before, .gate-form::after, .tier::before, .tier::after, .goldbox::before, .goldbox::after, .refbox::before, .refbox::after {
  content: ""; position: absolute; z-index: 2; top: -6px; width: 12px; height: 12px;
  border: 1px solid #8a5a14; background: linear-gradient(135deg, #fff0bf, #c89231); transform: rotate(45deg); pointer-events: none;
}
.gate-form::before, .tier::before, .goldbox::before, .refbox::before { left: -6px; }
.gate-form::after, .tier::after, .goldbox::after, .refbox::after { right: -6px; }

/* ---------- top bar (the mriya.pw .nav) / tab bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: stretch;
  height: var(--top-h);
  padding: 0 max(var(--gutter), calc((100vw - 1240px) / 2));
  background: linear-gradient(#fff4e0, #f5d9ab);
  box-shadow: 0 2px 0 #c9974a, 0 8px 22px rgba(80, 50, 10, 0.2);
}
.bar-brand { display: flex; align-items: center; padding-right: 14px; }
.bar-brand img { width: auto; height: 46px; filter: drop-shadow(0 2px 3px rgba(60, 30, 0, 0.3)); }
.tabs { display: flex; align-items: stretch; flex: 1; min-width: 0; }
.tabs a {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 0 13px;
  border-left: 1px solid rgba(160, 110, 40, 0.24);
  color: var(--ink-3);
  font-family: var(--display); font-weight: 700; font-size: 16px;
  text-decoration: none;
  transition: background-color 160ms;
}
.tabs a:last-child { border-right: 1px solid rgba(160, 110, 40, 0.24); }
.tabs a:hover { color: #4a2c00; background: rgba(255, 214, 130, 0.35); }
.tabs a[aria-current] { color: #4a2c00; background: linear-gradient(#ffe8b8 0%, #ffcb66 55%, #c58f2a 100%); box-shadow: inset 0 -2px 0 rgba(120, 75, 10, 0.35); }
.tabs svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bar-out { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-left: 12px; }
.bar-login { color: var(--ink-3); font-weight: 700; font-size: 15px; text-decoration: none; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-login:hover { color: var(--royal); }
.bar-admin, .bar-out button {
  display: inline-flex; align-items: center; height: 40px; padding: 0 12px;
  border: 1px solid rgba(160, 110, 40, 0.5); border-radius: 9px;
  background: linear-gradient(#fff2d8, #f1cf94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--ink-3); font: 700 15px var(--sc); text-decoration: none; cursor: pointer;
}
.bar-admin:hover, .bar-out button:hover { color: var(--royal); }
.bar-admin[aria-current] { background: linear-gradient(#ffe3a1, #ffbf45 55%, #c08316); color: var(--ink); }
/* 8 tabs + admin + login do not fit the 1240px bar with icons: on a computer the tabs are text only (icons stay in the phone bar) */
@media (min-width: 761px) { .tabs svg { display: none; } }
@media (max-width: 1440px) and (min-width: 761px) { .tabs a { padding: 0 10px; font-size: 15px; } }
@media (max-width: 1180px) and (min-width: 761px) { .tabs a { padding: 0 8px; font-size: 14px; } .tabs .tab-heroes { display: none; } .bar-login { display: none; } }
@media (max-width: 960px) and (min-width: 761px) { .tabs a { padding: 0 6px; font-size: 13px; } .bar-brand { padding-right: 8px; } .bar-brand img { height: 34px; } }

.main { flex: 1; width: min(1040px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: 30px 0 48px; }

@media (max-width: 760px) {
  :root { --top-h: 56px; }
  .bar { padding: 0 10px; }
  .bar-brand img { height: 40px; }
  .bar-login { max-width: 90px; font-size: 14px; }
  .bar-admin, .bar-out button { height: 36px; padding: 0 9px; font-size: 14px; }
  .tabs {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding: 5px 4px env(safe-area-inset-bottom);
    background: linear-gradient(#fff4e0, #f5d9ab);
    box-shadow: 0 -2px 0 #c9974a, 0 -8px 22px rgba(80, 50, 10, 0.18);
  }
  .tabs .tab-heroes { display: none; }
  .tabs a { flex: 1; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 1px; border: 0; border-radius: 10px; font-size: 11px; line-height: 1.1; }
  .tabs a:last-child { border: 0; }
  .tabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabs svg { width: 22px; height: 22px; }
  .main { padding: 22px 0 calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
  .foot { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .is-guest .foot { padding-bottom: env(safe-area-inset-bottom); }
}

/* ---------- footer (the mriya.pw .foot) ---------- */
.foot { border-top: 2px solid #c9974a; background: var(--dusk); color: #e8d5b5; }
.foot-in { width: min(1040px, 100% - 2 * var(--gutter)); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding: 22px 0; }
.foot-id { display: flex; align-items: center; gap: 14px; }
.foot-id img { height: 44px; width: auto; }
.foot-id p { margin: 0; color: #a8916e; font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: #e8d5b5; text-decoration: none; font-size: 15px; }
.foot nav a:hover { color: #ffd77a; }

/* ---------- shared ---------- */
.page-title { font-size: 34px; margin-bottom: 18px; }
.note { padding: 13px 16px; border: var(--dash); border-color: rgba(160, 110, 40, 0.55); border-radius: 12px; background: rgba(255, 250, 238, 0.8); color: var(--ink-2); }
.note-bad { border: 1px solid #c0392b; background: #fdebe5; color: #7a1712; }
.note-good { border: 1px solid #5f9a3a; background: linear-gradient(#f1fae4, #e2f3cc); color: #2a4d10; }
.hint { color: var(--muted); font-size: 15px; max-width: 70ch; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border: 2px solid transparent; border-radius: 10px;
  background: linear-gradient(180deg, #fff7e8, #f5dcae) padding-box, var(--frame) border-box;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  color: #5a3608; font: 700 16px/1 var(--sc); letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { color: var(--royal); }
.btn-rye {
  border: 0; border-radius: 999px; padding: 0 22px;
  background: linear-gradient(#ffe3a1 0%, #ffbf45 55%, #a46c0c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -3px 0 rgba(110, 60, 0, 0.35), 0 0 0 2px #7a4c0c, 0 0 0 4px rgba(255, 220, 140, 0.55), 0 4px 12px rgba(0, 0, 0, 0.22);
  color: #4a2c00;
}
.btn-rye:hover { color: #3a2200; filter: brightness(1.07); }
.btn[disabled] { opacity: 0.5; cursor: progress; filter: none; }
input:not([type=hidden]):not([type=radio]):not([type=checkbox]):not([type=file]), select {
  min-height: 42px; padding: 0 12px;
  border: 1px solid rgba(160, 110, 40, 0.55); border-radius: 9px;
  background: #fffaf0; color: var(--ink);
  box-shadow: inset 0 1px 3px rgba(90, 55, 10, 0.12);
}
input::placeholder { color: #a3875e; }
input:focus, select:focus { border-color: var(--gold-deep); outline: none; box-shadow: 0 0 0 3px rgba(43, 86, 173, 0.22); }
input[type=file] { font-size: 15px; }
code { font-size: 0.95em; color: var(--wine); }

/* item names in the client's colours, darkened for parchment */
.q0, .q5, .q9 { color: var(--ink); } .q1 { color: #3a4cc4; } .q2 { color: #7f5400; } .q3 { color: #7f2ac2; }
.q4 { color: #a63f08; } .q6 { color: #626262; } .q7 { color: #096b47; } .q8 { color: #b8241a; }

/* ---------- login / register ---------- */
.is-guest .main { min-height: 100vh; display: grid; place-items: center; padding: 32px 0; }
.gate { width: min(420px, 100%); text-align: center; }
.gate-logo img { width: min(300px, 80%); height: auto; margin: 0 auto 6px; filter: drop-shadow(0 8px 14px rgba(80, 40, 0, 0.3)); }
.gate h1 { font-size: 34px; }
.gate-lead { color: var(--muted); margin: 6px 0 22px; }
.gate-form { display: grid; gap: 14px; text-align: left; padding: 24px 22px; border-radius: 16px; }
.gate-form label { display: grid; gap: 6px; color: var(--ink-2); font-weight: 700; font-size: 16px; }
.gate-form label small { font-weight: 400; color: var(--muted); }
.gate-form .btn { min-height: 48px; margin-top: 4px; font-size: 19px; }
.gate-form .note { margin: 0; }
.gate-foot { color: var(--muted); font-size: 15px; margin-top: 18px; }

/* ---------- portraits: 12 frames 128x128, frame = class ---------- */
.portrait { background: #e9cfa0 url("../img/portraits.jpg") no-repeat; background-size: 100% 1200%; }
.portrait.c0 { background-position: 0 0; } .portrait.c1 { background-position: 0 9.0909%; } .portrait.c2 { background-position: 0 18.1818%; }
.portrait.c3 { background-position: 0 27.2727%; } .portrait.c4 { background-position: 0 36.3636%; } .portrait.c5 { background-position: 0 45.4545%; }
.portrait.c6 { background-position: 0 54.5454%; } .portrait.c7 { background-position: 0 63.6363%; } .portrait.c8 { background-position: 0 72.7272%; }
.portrait.c9 { background-position: 0 81.8181%; } .portrait.c10 { background-position: 0 90.909%; } .portrait.c11 { background-position: 0 100%; }

/* ---------- hero card ---------- */
.hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; }
.hero-medal {
  position: relative; width: 132px; height: 132px; border-radius: 50%;
  box-shadow: 0 0 0 3px #fff4dc, 0 0 0 6px #b47c2a, 0 0 0 8px #f5d68e, 0 14px 28px rgba(80, 50, 10, 0.35);
}
.hero-lv {
  position: absolute; right: -14px; bottom: -8px;
  display: grid; place-items: center;
  min-width: 62px; height: 62px; padding: 0 8px; border-radius: 31px;
  background: radial-gradient(circle at 50% 35%, #fff6df, #efcf94);
  box-shadow: 0 0 0 2px #b47c2a, 0 0 0 5px #fff1d2, 0 0 0 6px rgba(180, 124, 42, 0.5), 0 6px 14px rgba(80, 50, 10, 0.25);
  font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; color: var(--gold-deep);
}
.hero-lv small { display: block; font: 700 10px var(--sc); color: var(--muted); letter-spacing: 0.04em; margin-bottom: -2px; }
.hero-name { font-size: clamp(32px, 6vw, 48px); font-weight: 800; color: var(--ink); word-break: break-word; }
.hero-cls { margin: 6px 0 0; color: var(--gold-deep); font-weight: 700; }
.hero-clan { margin: 2px 0 0; color: var(--muted); }
.hero-switch select { max-width: 200px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 4px 16px; border-radius: 999px;
  border: 1px solid #b47c2a; background: linear-gradient(#fff7e2, #f3d595);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 4px 10px rgba(80, 50, 10, 0.14);
  color: #5a3608; font-weight: 700; font-size: 16px; font-variant-numeric: lining-nums tabular-nums;
}
.chip span { color: var(--muted); font-weight: 400; }
.chip i, .state i { width: 9px; height: 9px; border-radius: 50%; background: #a0896a; }
.chip-on { border-color: #5f9a3a; background: linear-gradient(#ecf9da, #b4e48a); color: #2a4d10; }
.chip-on i, .state-on i { background: var(--live); box-shadow: 0 0 0 3px rgba(63, 155, 42, 0.25); }
.chip-cat i, .state-cat i { background: var(--gold); box-shadow: 0 0 0 3px rgba(217, 160, 58, 0.3); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 20px 0 0; padding: 4px; border-radius: 14px; }
.stats div { padding: 10px 14px; border-left: var(--dash); }
.stats div:nth-child(4n + 1) { border-left: 0; }
.stats div:nth-child(n + 5) { border-top: var(--dash); }
.stats dt { color: var(--muted); font: 700 14px var(--sc); letter-spacing: 0.04em; }
.stats dd { margin: 2px 0 0; color: #8a5a00; font-weight: 800; font-size: 22px; line-height: 1.2; font-variant-numeric: lining-nums tabular-nums; }
.pk-bad { color: var(--wine) !important; } .pk-warn { color: #a3306f !important; } .pk-calm { color: #8a5a00; }

/* divider: the gold rule with a diamond (the mriya.pw .chap__rule) */
.band { position: relative; height: 12px; margin: 30px 0 8px; background: linear-gradient(90deg, #c9974a, rgba(201, 151, 74, 0)) 18px 50% / calc(100% - 18px) 2px no-repeat; }
.band::before { content: ""; position: absolute; top: 1px; left: 0; width: 10px; height: 10px; border: 1px solid #8a5a14; background: linear-gradient(135deg, #fff0bf, #c89231); transform: rotate(45deg); }

.block { margin-top: 30px; }
.block h2 { font-size: 26px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.block h2 small { font-family: var(--text); font-weight: 400; font-size: 16px; color: var(--muted); }
.block h3 { font: 700 17px var(--sc); margin: 20px 0 10px; color: var(--muted); letter-spacing: 0.03em; }

.slot {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(138, 90, 20, 0.55); border-radius: 7px;
  background: radial-gradient(circle at 50% 40%, #6b4a2a, #3a2412);
  box-shadow: inset 0 0 0 1px rgba(255, 230, 170, 0.25), 0 1px 0 rgba(255, 255, 255, 0.6);
  cursor: pointer;
}
button.slot:hover { border-color: var(--gold-deep); box-shadow: 0 0 0 2px rgba(217, 160, 58, 0.55); }
.slot img { width: 32px; height: 32px; image-rendering: auto; }
.slot b {
  position: absolute; right: 2px; bottom: 0;
  font: 700 11px/1.2 system-ui, sans-serif; color: #fff;
  text-shadow: 0 0 2px #000, 0 0 3px #000;
}
.slot-empty { cursor: default; background: rgba(243, 220, 174, 0.7); border-color: rgba(160, 110, 40, 0.3); box-shadow: inset 0 1px 3px rgba(90, 55, 10, 0.15); }
.grid { display: grid; grid-template-columns: repeat(8, 44px); gap: 5px; }
.equip { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px 8px; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 40px; align-items: start; }
.equip-cell { display: grid; justify-items: center; gap: 4px; }
.equip-cell span { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.2; }

.tip {
  position: fixed; z-index: 40; max-width: min(320px, calc(100vw - 32px));
  padding: 10px 13px; border-radius: 10px;
  border: 2px solid transparent; background: var(--card) padding-box, var(--frame) border-box;
  box-shadow: 0 12px 28px rgba(60, 35, 5, 0.3);
}
.tip p { margin: 0; }
.tip-name { font-weight: 800; }
.tip-meta { color: var(--muted); font-size: 14px; }
/* the game's own tooltip look: dark glass, game colours */
.tip {
  background: linear-gradient(#1c160e, #0f0c08) padding-box, var(--frame) border-box;
  color: #fff; max-width: min(340px, calc(100vw - 32px));
  font: 500 14px/1.35 system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.tip-meta { color: #c9bda5; font-size: 13px; }
.tip .q0, .tip .q5, .tip .q9 { color: #ffffff; } .tip .q1 { color: #8080ff; } .tip .q2 { color: #ffdc50; } .tip .q3 { color: #aa32ff; }
.tip .q4 { color: #ff6000; } .tip .q6 { color: #b0b0b0; } .tip .q7 { color: #00ffae; } .tip .q8 { color: #ff3b3b; }
.tip-lines { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 1px; }
.tl-base { color: #ffffff; } .tl-req { color: #e8e2d4; } .tl-bad { color: #ff4d4d; }
.tl-add { color: #8080ff; } .tl-engr { color: #ffdc50; } .tl-stone { color: #80ffff; } .tl-maker { color: #6cfb4b; margin-top: 4px; }
.tl-add:first-of-type { margin-top: 2px; }
.slot-ref {
  position: absolute; left: 1px; top: -1px; font: 800 10px/1.2 system-ui, sans-serif; font-style: normal;
  color: #ffe36a; text-shadow: 0 0 2px #000, 0 0 3px #000;
}

@media (max-width: 760px) {
  .page-title { font-size: 29px; }
  .hero { grid-template-columns: auto 1fr; gap: 16px 20px; }
  .hero-medal { width: 104px; height: 104px; }
  .hero-lv { min-width: 52px; height: 52px; font-size: 23px; right: -12px; }
  .hero-switch { grid-column: 1 / -1; }
  .hero-switch select { max-width: none; width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(4n + 1) { border-left: var(--dash); }
  .stats div:nth-child(2n + 1) { border-left: 0; }
  .stats div:nth-child(n + 3) { border-top: var(--dash); }
  .grid { grid-template-columns: repeat(8, 40px); gap: 4px; }
  .slot { width: 40px; height: 40px; }
  .equip { grid-template-columns: repeat(4, 1fr); }
  .packs { grid-template-columns: 1fr; }
}

/* ---------- roster ---------- */
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.roster-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; }
.roster-row.is-sel { box-shadow: inset 0 0 0 3px rgba(255, 250, 240, 0.85), inset 0 0 0 4px rgba(180, 124, 42, 0.3), 0 0 0 3px rgba(217, 160, 58, 0.55), 0 10px 22px rgba(110, 70, 20, 0.14); }
.roster-face { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 2px #fff4dc, 0 0 0 4px #b47c2a; }
.roster-id { display: grid; gap: 1px; min-width: 0; }
.roster-id strong { font-size: 20px; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.roster-id span { color: var(--muted); font-size: 15px; }
.state { display: inline-flex; align-items: center; gap: 6px; }
.roster + .hint { margin-top: 16px; }

/* ---------- chat ---------- */
.chat { display: grid; gap: 12px; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.chat-head .page-title { margin: 0; }
.chat-filter { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 999px; background: linear-gradient(#f0d3a2, #e5c285); box-shadow: inset 0 1px 3px rgba(90, 55, 10, 0.35); }
.chat-filter button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: none; cursor: pointer; color: var(--ink-3); font: 700 15px var(--sc); }
.chat-filter button[aria-pressed=true] { background: linear-gradient(#ffe3a1, #ffbf45 55%, #c08316); color: var(--ink); box-shadow: 0 2px 6px rgba(90, 55, 10, 0.35); }
.chat-log {
  list-style: none; margin: 0; padding: 12px 14px;
  height: min(62vh, 640px); overflow-y: auto;
  border-radius: 14px;
  font-size: 16px; line-height: 1.45; overflow-wrap: anywhere;
}
.chat-log li { padding: 3px 0; }
.chat-log time { color: #9a7d55; font-size: 13px; margin-right: 6px; font-variant-numeric: lining-nums tabular-nums; }
.chat-log .who { font-weight: 800; color: var(--ink); }
.chat-log .day { text-align: center; color: var(--muted); font: 700 13px var(--sc); padding: 8px 0 4px; }
.ch { font: 700 12px var(--sc); margin-right: 6px; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; background: rgba(255, 255, 255, 0.5); }
.ch-1 { color: #8a5a00; } .ch-7 { color: #1d6aa5; } .ch-12, .ch-15 { color: #a63f08; } .ch-3 { color: #276b2b; } .ch-4 { color: #a3306f; }
.m-1 .txt { color: #4a2c00; } .m-7 .txt { color: #174f7a; } .m-3 .txt { color: #1f5522; } .m-4 .txt { color: #7f2457; } .m-12 .txt, .m-15 .txt { color: #7a3206; }
.m-web .who::after { content: " (сайт)"; font-weight: 400; color: #9a7d55; font-size: 0.8em; }
.chat-send { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-err { margin: 0; color: #b8241a; }
.chat-empty { color: var(--muted); }
@media (max-width: 760px) {
  .chat-log { height: calc(100vh - 340px); min-height: 260px; }
  .chat-send { grid-template-columns: 1fr auto; }
  .chat-send select { grid-column: 1 / -1; }
}

/* ---------- lists: shop lots, bonus goods, achievements (ledger rows) ---------- */
.shop-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.shop-head .page-title { margin: 0; }
.shop-wallet { margin: 0; color: var(--muted); }
.shop-wallet strong { color: var(--ink-2); }
.shop-wallet span { color: #8a5a00; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.shop-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 16px 0; }
.shop-tools input { min-width: 0; width: 100%; }
.shop-tools select { max-width: 42vw; }
.lots, .goods, .achs { list-style: none; margin: 0 0 8px; padding: 4px 12px; border-radius: 14px; }
.lot, .good, .ach { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 10px 2px; }
.ach { grid-template-columns: minmax(0, 1fr) auto auto; }
.lot + .lot, .good + .good, .ach + .ach { border-top: var(--dash); }
.lot .slot, .good .slot { cursor: default; }
.lot-id, .good-id, .ach-id { display: grid; gap: 1px; min-width: 0; }
.lot-id strong, .good-id strong, .ach-id strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.lot-id span, .good-id span, .ach-id span { color: var(--muted); font-size: 15px; }
.lot-price, .good-price { text-align: right; color: #8a5a00; font-weight: 800; font-size: 19px; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; line-height: 1.15; }
.lot-price small, .good-price small { display: block; font: 700 12px var(--sc); color: var(--muted); letter-spacing: 0.03em; }
@media (max-width: 560px) {
  .lot, .good { grid-template-columns: auto 1fr auto; }
  .lot .btn, .good .btn { grid-column: 2 / -1; justify-self: end; min-height: 38px; }
  .ach { grid-template-columns: minmax(0, 1fr) auto; }
  .ach .btn, .ach .ach-ok { grid-column: 1 / -1; justify-self: end; }
}
.buy { width: min(440px, calc(100vw - 32px)); padding: 0; border-radius: 16px; color: var(--ink); }
.buy::backdrop { background: rgba(40, 22, 4, 0.55); }
.buy-form { display: grid; gap: 12px; padding: 22px; }
.buy-form p { margin: 0; }
.buy-item { font-weight: 800; }
.buy-count { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.buy-count input { width: 110px; }
.buy-total { font-weight: 800; color: #8a5a00; }
.buy-msg:empty { display: none; }
.buy-msg.ok { color: #2a4d10; } .buy-msg.bad { color: #b8241a; }
.buy-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- donate ---------- */
.tier { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 18px 20px; border-radius: 16px; }
.tier p { margin: 0; }
.tier-name { font: 700 28px var(--sc); color: var(--wine); }
.tier-name small { font-family: var(--text); font-weight: 700; font-size: 15px; color: var(--ink-2); margin-left: 6px; }
.tier-sum { color: var(--muted); }
.tier-sum strong { color: var(--ink); }
.tier-next { display: grid; gap: 4px; min-width: min(280px, 100%); color: var(--muted); font-size: 15px; }
progress, meter { width: 100%; height: 10px; }
progress { appearance: none; border: 0; border-radius: 5px; background: #ecd3a3; overflow: hidden; box-shadow: inset 0 1px 2px rgba(90, 55, 10, 0.25); }
progress::-webkit-progress-bar { background: #ecd3a3; }
progress::-webkit-progress-value { background: linear-gradient(#ffd27a, #c58a22); border-radius: 5px; }
progress::-moz-progress-bar { background: linear-gradient(#ffd27a, #c58a22); border-radius: 5px; }
meter { appearance: none; border: 0; border-radius: 5px; background: #ecd3a3; box-shadow: inset 0 1px 2px rgba(90, 55, 10, 0.25); }
meter::-webkit-meter-bar { background: #ecd3a3; border: 0; border-radius: 5px; height: 10px; }
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value { background: linear-gradient(#ffd27a, #c58a22); border-radius: 5px; }
meter::-moz-meter-bar { background: linear-gradient(#ffd27a, #c58a22); border-radius: 5px; }
.donate-form { display: grid; gap: 14px; max-width: 560px; padding: 20px; border-radius: 16px; }
.donate-sum { display: grid; gap: 6px; font-weight: 700; color: var(--ink-2); }
.donate-sum input { font-size: 24px; font-weight: 800; }
.donate-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.donate-quick .btn { min-height: 36px; padding: 0 12px; }
.donate-ways { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.donate-ways legend { color: var(--muted); font: 700 14px var(--sc); margin-bottom: 6px; }
.donate-ways label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid rgba(160, 110, 40, 0.4); border-radius: 10px; background: #fffaf0; cursor: pointer; font-weight: 700; }
.donate-ways label:has(input:checked) { border-color: #b47c2a; background: linear-gradient(#fff7e2, #f6dda5); box-shadow: 0 0 0 2px rgba(217, 160, 58, 0.45); }
.donate-ways small { color: var(--muted); font-weight: 400; }
.donate-calc { margin: 0; font-size: 18px; color: var(--ink-2); font-weight: 700; }
.donate-calc b { color: #8a5a00; font-size: 24px; }
.donate-calc small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.donate-err, .promo-msg:empty { margin: 0; }
.donate-err { color: #b8241a; }
.donate-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; align-items: start; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: lining-nums tabular-nums; }
.tbl th { text-align: left; font: 700 14px var(--sc); color: var(--muted); letter-spacing: 0.03em; padding: 6px 8px; border-bottom: 2px solid rgba(160, 110, 40, 0.45); }
.tbl td { padding: 8px; border-bottom: var(--dash); }
.tbl tr.is-me td { color: var(--wine); font-weight: 800; }
.tbl tr.is-off td { opacity: 0.5; }
.tbl .btn { min-height: 32px; padding: 0 10px; font-size: 14px; }
.tbl small { color: var(--muted); }
.tbl .pos { color: #2e7d32; font-weight: 700; } .tbl .neg { color: #b8241a; font-weight: 700; }
.bars td:nth-child(2) { width: 60%; }
.promo-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; max-width: 520px; }
.promo-form input { text-transform: uppercase; letter-spacing: 0.04em; }
.promo-msg.ok { color: #2a4d10; } .promo-msg.bad { color: #b8241a; }
.pay-status.ok { border: 1px solid #5f9a3a; background: #eef8e0; color: #2a4d10; } .pay-status.bad { border: 1px solid #c0392b; background: #fdebe5; color: #7a1712; }

/* ---------- cabinet gold ---------- */
.goldbox { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 30px; align-items: start; margin-bottom: 24px; padding: 18px 20px; border-radius: 16px; }
.goldbox-sum { display: grid; gap: 2px; }
.goldbox-sum span { color: var(--muted); font: 700 14px var(--sc); letter-spacing: 0.03em; }
.goldbox-sum strong { font-size: 40px; font-weight: 800; line-height: 1.05; color: #8a5a00; font-variant-numeric: lining-nums tabular-nums; }
.goldbox-form { display: grid; gap: 6px; }
.goldbox-form label { color: var(--ink-2); font-weight: 700; }
.goldbox-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; max-width: 480px; }
.goldbox-form .hint { margin: 0; }
.goldbox-msg { margin: 0; font-weight: 700; } .goldbox-msg.ok { color: #2a4d10; } .goldbox-msg.bad { color: #b8241a; }
@media (max-width: 640px) {
  .goldbox { grid-template-columns: 1fr; }
  .goldbox-row { grid-template-columns: minmax(0, 1fr) auto; }
  .goldbox-row .btn-rye { grid-column: 1 / -1; }
}

/* ---------- ratings ---------- */
.rate-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.rate-head .page-title { margin: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 999px; background: linear-gradient(#f0d3a2, #e5c285); box-shadow: inset 0 1px 3px rgba(90, 55, 10, 0.35); }
.seg a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border-radius: 999px; color: var(--ink-3); text-decoration: none; font: 700 16px var(--sc); }
.seg a:hover { color: var(--ink); }
.seg a[aria-current] { background: linear-gradient(#ffe3a1, #ffbf45 55%, #c08316); color: var(--ink); box-shadow: 0 2px 6px rgba(90, 55, 10, 0.35); }
.rate-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--muted); }
.rank { list-style: none; margin: 0; padding: 6px 16px; border-radius: 16px; }
.rank-row { display: grid; grid-template-columns: 40px auto 1fr auto; align-items: center; gap: 12px; min-height: 58px; padding: 8px 0; }
.rank-row + .rank-row { border-top: var(--dash); }
.rank-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f1d9aa; color: #7a5326; font-weight: 800; font-size: 15px; justify-self: center; }
.top1 .rank-n { background: radial-gradient(circle at 40% 35%, #fff0bf, #e0a93c 60%, #9a6512); color: #4a2c00; box-shadow: 0 0 0 2px #fff2d0, 0 0 0 3px #b47c2a; width: 36px; height: 36px; font-size: 17px; }
.top2 .rank-n { background: radial-gradient(circle at 40% 35%, #ffffff, #c9c9c9 60%, #8a8a8a); color: #333; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #9c9c9c; }
.top3 .rank-n { background: radial-gradient(circle at 40% 35%, #ffe3c7, #c98a52 60%, #8a5426); color: #3a1d06; box-shadow: 0 0 0 2px #fff0e0, 0 0 0 3px #a86a32; }
.rank-face { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 0 2px #fff4dc, 0 0 0 3px #b47c2a; }
.rank-id { display: grid; min-width: 0; }
.rank-id strong { color: #4a2c00; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-id span { color: var(--muted); font-size: 15px; }
.rank-val { text-align: right; font-weight: 800; font-size: 24px; color: #8a5a00; font-variant-numeric: lining-nums tabular-nums; line-height: 1.1; }
.rank-val small { display: block; font: 700 12px var(--sc); color: var(--muted); }
.rank-row:has(.rank-face) { grid-template-columns: 40px auto 1fr auto; }
.rank-row:not(:has(.rank-face)) { grid-template-columns: 40px 1fr auto; }
.clan-ico { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; border-radius: 4px; box-shadow: 0 0 0 1px rgba(138, 90, 20, 0.6); }

/* ---------- admin ---------- */
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats-3 div:nth-child(4n + 1) { border-left: var(--dash); }
.stats-3 div:nth-child(3n + 1) { border-left: 0; }
.stats-3 div:nth-child(n + 4) { border-top: var(--dash); }
.stats-3 div:nth-child(-n + 3) { border-top: 0; }
.stats dd.sub { font-weight: 400; font-size: 14px; color: var(--muted); }
.admin-form { display: grid; gap: 14px; max-width: 660px; }
.admin-form label { display: grid; gap: 5px; color: var(--ink-2); font-weight: 700; font-size: 16px; }
.admin-form small { color: var(--muted); font-weight: 400; font-size: 14px; }
.admin-form .btn { justify-self: start; }
.admin-form h3 { margin: 10px 0 0; }
.bag-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 380px; overflow-y: auto; margin: 0; padding: 12px; border-radius: 14px; }
.bag-pick legend { color: var(--ink-2); font-weight: 700; padding: 0 6px; background: #fff7e6; border-radius: 6px; }
.bag-pick label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; font-size: 15px; font-weight: 700; }
.bag-pick label:has(input:checked) { background: linear-gradient(#fff2cf, #f6d995); box-shadow: 0 0 0 1px #c89231; }
.bag-pick img { width: 28px; height: 28px; border-radius: 4px; background: #3a2412; }
.top-set { display: grid; gap: 10px; margin: 0; padding: 14px; border-radius: 14px; }
.top-set legend { color: var(--ink-2); font-weight: 700; padding: 0 6px; background: #fff7e6; border-radius: 6px; }
.admin-inline { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; max-width: 780px; margin-bottom: 16px; }
.row-form { display: flex; gap: 6px; align-items: center; }
.row-form input:not([type=hidden]) { width: 80px; min-height: 32px; }
.row-acts form { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-form .check { display: flex; align-items: center; gap: 8px; }
.admin-form .check input { width: 18px; height: 18px; min-height: 0; }
@media (max-width: 760px) {
  .stats-3 { grid-template-columns: 1fr; }
  .stats-3 div { border-left: 0 !important; }
  .stats-3 div + div { border-top: var(--dash) !important; }
  .rank { padding: 4px 12px; }
  .rank-row { gap: 10px; }
  .admin-inline { grid-template-columns: 1fr; }
}

/* ---------- bonuses ---------- */
.seg-wide { border-radius: 16px; margin-bottom: 18px; }
.seg-wide a { border-radius: 12px; }
.wallet { margin: 0; color: var(--muted); }
.wallet strong { font-size: 30px; font-weight: 800; color: #8a5a00; font-variant-numeric: lining-nums tabular-nums; margin: 0 4px; }
.bonus-msg { margin: 0 0 16px; }
.ach progress { width: 100%; max-width: 320px; height: 7px; margin-top: 5px; }
.ach.is-ready { background: linear-gradient(90deg, rgba(255, 220, 140, 0.35), rgba(255, 220, 140, 0)); border-radius: 8px; }
.ach.is-done .ach-id strong { color: var(--muted); }
.ach.is-done progress::-webkit-progress-value { background: linear-gradient(#9fd47a, #3f9b2a); }
.ach.is-done progress::-moz-progress-bar { background: linear-gradient(#9fd47a, #3f9b2a); }
.ach-ok { color: #2e7d32; font: 700 15px var(--sc); white-space: nowrap; }
.tops { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tops li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tops .btn { min-width: 160px; }
.tops span { color: var(--muted); }
.refbox { padding: 18px 20px; border-radius: 16px; display: grid; gap: 10px; }
.refbox p { margin: 0; }
.refbox .promo-form input, [data-exchange] input { text-transform: none; letter-spacing: 0; }
.refbox .stats { margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ex-calc { margin: 6px 0 0; min-height: 1.2em; }
@media (max-width: 760px) {
  .seg-wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seg-wide a { justify-content: center; min-height: 36px; padding: 0 4px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .seg a { padding: 0 13px; font-size: 15px; }
}

/* ---------- services, clan ---------- */
.service p { margin: 0 0 8px; }
.name-form input { text-transform: none; letter-spacing: 0; }
.clan-head { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.clan-head .hint { margin: 2px 0 0; }
.clan-now { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--muted); }
.icon-form { display: grid; gap: 12px; max-width: 540px; }
.icon-form label { display: grid; gap: 6px; color: var(--ink-2); font-weight: 700; }
.icon-preview { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: 15px; }
.icon-preview img { image-rendering: pixelated; box-shadow: 0 0 0 1px rgba(138, 90, 20, 0.6); }

/* ---------- captcha ---------- */
.captcha { display: grid; grid-template-columns: auto auto; gap: 8px 10px; align-items: center; justify-content: start; }
.captcha img { border-radius: 8px; box-shadow: 0 0 0 2px #b47c2a; }
.captcha .btn { min-height: 36px; padding: 0 10px; font-size: 14px; margin: 0; }
.captcha label { grid-column: 1 / -1; }
.captcha input { text-transform: uppercase; letter-spacing: 0.2em; }

/* ---------- online chart ---------- */
.seg-small { margin-bottom: 16px; }
.seg-small a { min-height: 32px; padding: 0 14px; font-size: 15px; }
.online-stats { margin: 0 0 18px; }
.online-stats .sub { font-weight: 400; font-size: 13px; color: var(--muted); }
.chart { position: relative; margin: 0; padding: 14px 12px 8px; border-radius: 16px; }
.chart svg { display: block; width: 100%; height: auto; }
.ch-grid { stroke: rgba(160, 110, 40, 0.22); stroke-width: 1; }
.ch-tick { stroke: rgba(160, 110, 40, 0.45); stroke-width: 1; }
.ch-lbl { fill: #7a5a2e; font-size: 12px; font-family: var(--text); }
.ch-area { fill: rgba(217, 160, 58, 0.24); }
.ch-line { fill: none; stroke: #8a5a14; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot, .ch-hover { fill: #8a5a14; stroke: #fffaf0; stroke-width: 2; }
.ch-cross { stroke: rgba(90, 55, 10, 0.4); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-hit { fill: transparent; cursor: crosshair; }
@media (max-width: 600px) { .ch-lbl { font-size: 24px; } .ch-line { stroke-width: 3; } .chart { padding: 8px 4px 4px; } }
.ch-tip { position: absolute; top: 4px; left: 0; margin: 0; padding: 4px 9px; border: 1px solid #b47c2a; border-radius: 8px; background: #fffaf0; color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; pointer-events: none; font-variant-numeric: lining-nums tabular-nums; box-shadow: 0 4px 12px rgba(80, 50, 10, 0.2); }

/* ---------- admin: player card, journal, mail ---------- */
textarea {
  width: 100%; min-height: 96px; padding: 10px 12px; resize: vertical;
  border: 1px solid rgba(160, 110, 40, 0.55); border-radius: 9px;
  background: #fffaf0; color: var(--ink); font: inherit;
  box-shadow: inset 0 1px 3px rgba(90, 55, 10, 0.12);
}
textarea:focus { border-color: var(--gold-deep); outline: none; box-shadow: 0 0 0 3px rgba(43, 86, 173, 0.22); }
.player-search { max-width: 640px; margin-bottom: 18px; }
.player-search input { text-transform: none; letter-spacing: 0; }
.found .good { grid-template-columns: 1fr; }
.found a, .rank-id a, .roster-id a, .stats dd a { color: var(--gold-deep); text-decoration: none; }
.found a:hover, .rank-id a:hover, .roster-id a:hover, .stats dd a:hover { color: var(--royal); text-decoration: underline; }
.rank-id strong a { color: inherit; }
.card-head .stats { margin-top: 4px; }
.stats dd.small { font-size: 17px; }
.roster-id .hint { font-size: 14px; }
.ban-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.ban-tag { display: inline-block; padding: 2px 10px; border: 1px solid #c0392b; border-radius: 999px; background: #fdebe5; color: #7a1712; font-size: 14px; font-weight: 700; line-height: 1.4; }
.btn-small { min-height: 30px; padding: 0 10px; font-size: 14px; }
.log-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 18px; }
.log-filter label { display: grid; gap: 4px; color: var(--ink-2); font-weight: 700; font-size: 15px; }
.log-filter input, .log-filter select { width: 100%; min-width: 0; }
.log-filter .btn-row { grid-column: 1 / -1; }
.log-more { margin-top: 14px; }
.journal { font-size: 15px; }
.journal td { vertical-align: top; }
.journal td small { display: block; color: var(--muted); }
.journal a { color: var(--gold-deep); }
.j-detail { overflow-wrap: anywhere; }
.j-ban .j-detail, .j-grant .j-detail, .j-mail .j-detail, .j-admin .j-detail { color: var(--wine); }
.tpl-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); margin: 0 0 14px; }
.tpl-list .chip { min-height: 32px; padding: 2px 14px; font-size: 15px; text-decoration: none; }
@media (max-width: 760px) {
  .journal thead { display: none; }
  .journal tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 8px 0; border-bottom: var(--dash); }
  .journal td { padding: 1px 0; border: 0; }
  .journal td:nth-child(3) { text-align: right; font-weight: 700; }
  .journal .j-detail { grid-column: 1 / -1; }
  .journal td:nth-child(5) { grid-column: 1 / -1; font-size: 13px; }
}

/* game logs (admin): a dark console like the in-game chat, channel colours as in the client */
.glog-box { position: relative; }
.glog-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.glog-bar [data-pause] { margin-left: auto; }
.glog-live { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; color: var(--muted); }
.glog-live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #a0896a; }
.glog-live.on { color: #2a6a14; }
.glog-live.on::before { background: var(--live); box-shadow: 0 0 0 3px rgba(63, 155, 42, 0.25); animation: glogpulse 1.6s ease-in-out infinite; }
@keyframes glogpulse { 50% { box-shadow: 0 0 0 6px rgba(63, 155, 42, 0.05); } }
.glog-con {
  height: min(70vh, 720px); overflow-y: auto; padding: 6px 4px;
  border: 2px solid transparent; border-radius: 12px;
  background: linear-gradient(#101010, #101010) padding-box, var(--frame) border-box;
  color: #fff; font: 13px/1.45 Geneva, Arial, Helvetica, sans-serif; overflow-wrap: anywhere;
  scrollbar-color: #5a4a30 #101010;
}
.gl { margin: 0; padding: 2px 8px; border-radius: 3px; }
.gl:hover { background: #1c1c1c; }
.gl > * + * { margin-left: 5px; }
.gl-t { color: #90d090; font-weight: 700; }
.gl-ch { white-space: nowrap; }
.gl-n { color: inherit; font-weight: 700; text-decoration: none; }
a.gl-n:hover { text-decoration: underline; }
.gl-web { color: #c0c0c0; font-size: 12px; }
.gl-x { margin-left: 0 !important; }
.gl-empty { color: #c0c0c0; padding: 10px; }
/* chat channels */
.gc0 { color: #ffffff; } .gc1 { color: #ffe400; } .gc2 { color: #00ff00; } .gc3 { color: #00fffc; } .gc4 { color: #fa57ac; }
.gc6 { color: #ff7e00; } .gc7 { color: #ff742e; } .gc9 { color: #ff3600; } .gc10 { color: #9aa6ff; } .gc11 { color: #ec0d3c; }
.gc12 { color: #ff9b3e; } .gc13, .gc15 { color: #ffffff; }
/* item / action lines */
.gl-k { color: #c0c0c0; }
.gl-c { color: #ffff00; font-weight: 700; }
.gl-i { font-weight: 700; text-decoration: none; }
.gl-i:hover { text-decoration: underline; }
.gl-i img { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; border-radius: 2px; }
.gl-id { color: #888; }
.gl-m { color: #ffff00; }
.gl-e { color: #a0a0a0; }
.gk-trade { background: #001200; } .gk-trade .gl-k { color: #a0f0a0; }
.gk-mail .gl-k, .gk-sysmail .gl-k, .gk-getattach .gl-k, .gk-maildel .gl-k { color: #efb608; }
.gk-pshopbuy, .gk-pshopsell, .gk-stall { background: #001212; } .gk-pshopbuy .gl-k, .gk-pshopsell .gl-k, .gk-stall .gl-k { color: #00fffc; }
.gk-mall { background: #121200; } .gk-mall .gl-k { color: #ffe400; }
.gk-auction .gl-k { color: #ff9b3e; }
.gk-npcbuy .gl-k, .gk-npcsell .gl-k { color: #9aa6ff; }
.gk-craft .gl-k, .gk-decompose .gl-k, .gk-refine .gl-k, .gk-socket .gl-k { color: #bed293; }
.gk-expire .gl-k, .gk-destroy .gl-k { color: #ff7e00; }
.gk-kill { background: #1a0000; } .gk-kill .gl-k { color: #ff3600; font-weight: 700; }
.gk-trade:hover, .gk-pshopbuy:hover, .gk-pshopsell:hover, .gk-stall:hover, .gk-mall:hover, .gk-kill:hover { filter: brightness(1.6); }
/* quality colours of the client on a dark background */
.glog-con .q0, .glog-con .q5, .glog-con .q9 { color: #ffffff; } .glog-con .q1 { color: #8fa8ff; } .glog-con .q2 { color: #ffd75e; }
.glog-con .q3 { color: #d08bff; } .glog-con .q4 { color: #ff9a3c; } .glog-con .q6 { color: #a0a0a0; } .glog-con .q7 { color: #3ee8a0; } .glog-con .q8 { color: #ff5a4a; }
/* name menu */
.glog-menu {
  position: absolute; z-index: 30; display: grid; gap: 6px; min-width: 220px; padding: 10px 12px;
  border: 2px solid transparent; border-radius: 10px; background: var(--card) padding-box, var(--frame) border-box;
  box-shadow: 0 12px 28px rgba(60, 35, 5, 0.35);
}
.glog-menu-name { margin: 0; font-weight: 800; color: var(--ink); }
.glog-menu a { color: var(--gold-deep); font-weight: 700; text-decoration: none; cursor: pointer; }
.glog-menu a:hover { color: var(--royal); }
.glog-menu form { display: grid; gap: 6px; padding-top: 6px; border-top: var(--dash); }
.glog-menu select, .glog-menu input { min-height: 34px; width: 100%; }
@media (max-width: 760px) { .glog-con { height: calc(100vh - 300px); font-size: 13px; } }

/* ---------- clan page, clan icons in the rating ---------- */
.clan-hero { grid-template-columns: auto 1fr; }
.clan-badge {
  display: grid; place-items: center; width: 104px; height: 104px; border-radius: 22px;
  background: radial-gradient(circle at 50% 40%, #6b4a2a, #2e1c0e);
  box-shadow: 0 0 0 3px #fff4dc, 0 0 0 6px #b47c2a, 0 0 0 8px #f5d68e, 0 14px 28px rgba(80, 50, 10, 0.35);
}
.clan-badge img { width: 64px; height: 64px; image-rendering: pixelated; }
.clan-badge span { font: 800 52px/1 var(--display); color: #ffd77a; }
.clan-face { display: grid; place-items: center; border-radius: 9px !important; background: radial-gradient(circle at 50% 40%, #6b4a2a, #2e1c0e); color: #ffd77a; font-weight: 800; font-size: 20px; }
.clan-face img { width: 32px; height: 32px; image-rendering: pixelated; }
.rank-role { font-size: 14px; }
.rank-role.r2 { background: radial-gradient(circle at 40% 35%, #fff0bf, #e0a93c 60%, #9a6512); color: #4a2c00; }
.rank-role.r3 { background: radial-gradient(circle at 40% 35%, #ffffff, #c9c9c9 60%, #8a8a8a); color: #333; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- character market ---------- */
.mk-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 12px; align-items: end; margin: 4px 0 12px; }
.mk-filter label { display: grid; gap: 4px; color: var(--ink-2); font-weight: 700; font-size: 15px; }
.mk-filter input, .mk-filter select { width: 100%; min-width: 0; }
.mk-filter .mk-check { display: flex; align-items: center; gap: 8px; align-self: center; font-weight: 400; }
.mk-filter .btn-row { grid-column: 1 / -1; }
.mk-found { margin: 0 0 14px; }
.mk-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.mk-card { display: grid; gap: 12px; height: 100%; padding: 14px 16px 12px; border-radius: 16px; color: var(--ink); text-decoration: none; transition: transform 160ms, box-shadow 160ms; }
.mk-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 3px rgba(255, 250, 240, 0.85), inset 0 0 0 4px rgba(180, 124, 42, 0.3), 0 14px 28px rgba(110, 70, 20, 0.22); }
.mk-top { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.mk-face { position: relative; width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 2px #fff4dc, 0 0 0 4px #b47c2a, 0 6px 12px rgba(80, 50, 10, 0.25); }
.mk-lv {
  position: absolute; right: -8px; bottom: -6px; display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 5px; border-radius: 16px;
  background: radial-gradient(circle at 50% 35%, #fff6df, #efcf94); box-shadow: 0 0 0 2px #b47c2a, 0 3px 8px rgba(80, 50, 10, 0.25);
  font: 800 16px/1 var(--display); color: var(--gold-deep); font-variant-numeric: lining-nums tabular-nums;
}
.mk-id { display: grid; gap: 1px; min-width: 0; }
.mk-id strong { font-size: 22px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-id span { color: var(--muted); font-size: 15px; font-variant-numeric: lining-nums tabular-nums; }
.mk-id span:first-of-type { color: var(--gold-deep); font-weight: 700; }
.mk-icons { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; min-height: 36px; }
.mk-ic { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 40px; border: 1px solid rgba(138, 90, 20, 0.55); border-radius: 6px; background: radial-gradient(circle at 50% 40%, #6b4a2a, #3a2412); }
.mk-ic img { width: 88%; height: auto; max-width: 32px; }
.mk-none { grid-column: 1 / -1; }
.mk-ic i { position: absolute; left: 1px; top: -1px; font: 800 10px/1.2 system-ui, sans-serif; font-style: normal; color: #ffe36a; text-shadow: 0 0 2px #000, 0 0 3px #000; }
.mk-none { align-self: center; color: var(--muted); font-size: 14px; font-style: italic; }
.mk-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; padding: 8px 0 0; border-top: var(--dash); font-size: 14px; color: var(--muted); }
.mk-counts b { color: var(--ink-2); font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.mk-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding-top: 8px; border-top: var(--dash); color: var(--muted); }
.mk-price small { font: 700 13px var(--sc); letter-spacing: 0.04em; }
.mk-price strong { color: #8a5a00; font-size: 24px; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.mk-price em { margin-left: auto; font-style: normal; font: 700 13px var(--sc); color: var(--wine); }
.mk-pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; }
.mk-pages a { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border: 1px solid rgba(160, 110, 40, 0.5); border-radius: 9px; background: linear-gradient(#fff7e8, #f5dcae); color: var(--ink-3); font-weight: 700; text-decoration: none; }
.mk-pages a[aria-current] { background: linear-gradient(#ffe3a1, #ffbf45 55%, #c08316); color: var(--ink); }
.mk-back { margin: 0 0 14px; }
.mk-hero { grid-template-columns: auto 1fr minmax(220px, 280px); }
.mk-deal { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; }
.mk-deal form { margin: 0; }
.mk-deal .hint { margin: 0; font-size: 14px; }
.mk-deal-price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; color: var(--muted); }
.mk-deal-price small { width: 100%; font: 700 13px var(--sc); letter-spacing: 0.04em; }
.mk-deal-price strong { color: #8a5a00; font-size: 34px; line-height: 1; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.mk-buy { width: 100%; min-height: 48px; font-size: 19px; }
.mk-state { margin: 0; font-weight: 800; color: var(--ink-2); }
.mk-state-sold { color: var(--live); } .mk-state-withdrawn, .mk-state-failed { color: var(--muted); }
.mk-admin { justify-self: start; }
.mk-note { margin: 18px 0 0; padding: 12px 16px; border-left: 3px solid #c9974a; background: rgba(255, 250, 238, 0.7); border-radius: 0 10px 10px 0; color: var(--ink-2); font-style: italic; max-width: 70ch; }
.mk-note cite { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); font-style: normal; }
.mk-terms ul, .mk-how ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; max-width: 75ch; }
.mk-how { padding: 16px 20px 18px; border-radius: 16px; }
.mk-how h2 { margin-top: 0; }
.mk-sell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0 32px; align-items: start; }
.mk-sell textarea { width: 100%; resize: vertical; }
.chip-warn { border-color: #c48a1d; background: linear-gradient(#fff3cf, #ffd57a); }
.chip-warn a { color: #5a3608; }
.tbl-wrap { overflow-x: auto; }
@media (max-width: 860px) {
  .mk-hero { grid-template-columns: auto 1fr; }
  .mk-deal { grid-column: 1 / -1; }
  .mk-sell { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .mk-grid { grid-template-columns: 1fr; }
  .mk-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-filter label:first-child { grid-column: 1 / -1; }
}

/* ---------- character window numbers (from gs) ---------- */
.stats dd small { margin-left: 2px; color: var(--muted); font-size: 15px; font-weight: 700; }
.chars h2 small { font: 400 14px var(--text, inherit); color: var(--muted); letter-spacing: 0; }
.char-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 6px 4px; border-radius: 14px;
  background: linear-gradient(#fffaf0, #fbefd6) padding-box, var(--frame) border-box; border: 2px solid transparent; }
.char-col { padding: 8px 16px 10px; border-left: var(--dash); min-width: 0; }
.char-col:first-child { border-left: 0; }
.char-col h3 { margin: 0 0 6px; font: 700 15px var(--sc); letter-spacing: 0.05em; color: var(--wine); }
.char-col dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; }
.char-col dt { color: var(--ink-2); font-size: 15px; }
.char-col dd { margin: 0; text-align: right; font-weight: 800; color: #8a5a00; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.char-col dd.up { color: #1f8a2e; }
.char-col dd small { color: var(--muted); font-weight: 700; font-size: 13px; }
.char-res { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
@media (max-width: 1000px) { .char-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .char-col:nth-child(3) { border-left: 0; } .char-col:nth-child(n + 3) { border-top: var(--dash); } }
@media (max-width: 560px) { .char-grid { grid-template-columns: 1fr; } .char-col { border-left: 0; } .char-col + .char-col { border-top: var(--dash); } }

/* gold transfer between cabinet accounts */
.goldbox-id { margin: 0; color: var(--muted); font-weight: 700; }
.goldbox-id strong { color: var(--ink); font-size: 20px; font-variant-numeric: lining-nums tabular-nums; }
.xfer-form { max-width: 480px; }
.xfer-form small.pos { color: #2f6b1f; }
.xfer-form small.neg { color: #a12a2a; }

/* e-mail confirmation status on the account page */
.mail-ok { color: #2f6b1f; font-weight: 700; }
.mail-no { color: #a12a2a; font-weight: 700; }
.mail-verify { margin: 0 0 16px; }

/* «Безпека входу» (IP list), 22.11.2026 */
.iplock-state { margin: 0 0 6px; font-weight: 700; }
.iplock-state.is-on { color: #2c5112; }
.iplock-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.iplock-list li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 12px; border-radius: 999px; background: #f7ecd8; border: 1px solid #f0e0c4; }
.iplock-list small { color: var(--muted); }
.iplock-list form { margin: 0; }
.iplock-x { border: 0; background: none; padding: 0 6px; color: #8a5a20; font-size: 18px; line-height: 1; cursor: pointer; }
.iplock-x:hover { color: #b8241a; }
.iplock .promo-form.iplock-add { max-width: 460px; }
.iplock .iplock-add input { text-transform: none; letter-spacing: 0; }
.iplock-toggles { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 10px; }
.iplock-toggle { margin: 0; }

/* «Доступ до гри» (captcha → the game port filter), 22.11.2026 */
.access-form { display: grid; gap: 12px; max-width: 440px; margin: 12px 0; }
.access-form > .btn { justify-self: start; }
.access-row { margin: 0 0 12px; }
/* «Я не робот» (Turnstile / reCAPTCHA) */
.botcheck { min-height: 66px; }
