:root {
  --gold: #d9b56b;
  --gold-dim: #9c7d45;
  --ink: #ece3d0;
  --muted: #a99c84;
  --panel: rgba(14, 11, 8, 0.74);
  --line: rgba(217, 181, 107, 0.38);
  --hp: #b8322a;
  --hp-hi: #e0574a;
  --xp: #c9a14a;
  --red: #ff5a4a;
  --purple: #c77dff;
  --title: 'Forum', 'Georgia', serif;
  --text: 'PT Sans', 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0907; color: var(--ink); font-family: var(--text); font-size: 14px; }
canvas#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font-family: inherit; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,230,180,.06); backdrop-filter: blur(3px); }

/* ---------- Экраны ---------- */
.screen { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
#login { background: radial-gradient(ellipse at 50% 40%, rgba(10,8,6,.15), rgba(10,8,6,.82) 75%); }
.login-wrap { width: min(860px, 100%); }
.brand { text-align: center; margin-bottom: 22px; text-shadow: 0 2px 18px rgba(0,0,0,.9); }
.brand-kicker { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); opacity: .85; }
.brand h1 { font-family: var(--title); font-weight: 400; font-size: clamp(46px, 9vw, 86px); line-height: 1; margin: 8px 0 10px; color: #f3e6c8; letter-spacing: .02em; }
.brand-sub { margin: 0; color: #d6c9ae; font-size: 16px; }
.login-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
@media (max-width: 720px) { .login-grid { grid-template-columns: 1fr; } }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.form input { background: rgba(0,0,0,.45); border: 1px solid rgba(217,181,107,.3); color: var(--ink); border-radius: 4px; padding: 10px 12px; font-size: 16px; font-family: var(--text); outline: none; min-width: 0; }
.form input:focus { border-color: var(--gold); }
.form h4 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 19px; color: #e8d6ae; }
.form.inline { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.form.inline input { flex: 1 1 140px; padding: 8px 10px; font-size: 14px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid rgba(217,181,107,.25); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-family: var(--title); font-size: 19px; padding: 6px 12px 8px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: #f0dfb8; border-bottom-color: var(--gold); }
.tab:focus-visible, .btn-ghost:focus-visible, .btn-main:focus-visible, .cls:focus-visible, .hero-add:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.auth { padding: 16px 20px 20px; }
.auth .only-up { display: none; }
.auth.up .only-up { display: flex; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.row-btns .btn-main { margin: 0; font-size: 18px; padding: 8px 16px; }

/* ---------- Личный кабинет ---------- */
.cab { padding: 16px 18px 18px; min-width: 0; max-height: calc(100vh - 220px); overflow: auto; scrollbar-width: thin; }
@media (max-width: 720px) { .cab { max-height: none; } }
.cab-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cab-kicker { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.cab-email { font-size: 15px; color: #e8dcc2; word-break: break-all; }
.cab-tabs { margin-bottom: 8px; }
.cab-tabs .tab { font-size: 17px; padding: 6px 10px 8px; }
.cab-msg { min-height: 20px; font-size: 14px; margin-bottom: 6px; }
.cab-ok { color: #9fd99a; }
.hero-list { display: flex; flex-direction: column; gap: 8px; }
.hero-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: rgba(0,0,0,.32); border: 1px solid rgba(217,181,107,.2); border-radius: 5px; }
.hero-card.online { border-color: rgba(120,200,120,.45); }
.hero-ic { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(217,181,107,.45); color: #f0dfb8; background: radial-gradient(circle at 40% 35%, rgba(217,181,107,.25), rgba(0,0,0,.4)); }
.hero-ic svg { width: 24px; height: 24px; }
.hero-ic.warrior { color: #f0b4a0; } .hero-ic.archer { color: #b8e0a4; } .hero-ic.healer { color: #fff0b0; }
.hero-body { min-width: 0; }
.hero-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hero-name { font-family: var(--title); font-weight: 400; font-size: 21px; color: #f3e6c8; }
.hero-lvl { font-size: 13px; color: var(--muted); }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #1d3b22; color: #b8e6bf; }
.tag.seal { background: #6b5214; color: #ffe69a; }
.hero-xp { height: 6px; margin: 6px 0 5px; }
.hero-meta { font-size: 12px; color: var(--muted); }
.hero-card .play { margin: 0; font-size: 18px; padding: 8px 16px; }
@media (max-width: 460px) { .hero-card { grid-template-columns: 36px 1fr; } .hero-ic { width: 36px; height: 36px; } .hero-card .play { grid-column: 1 / -1; } }
.hero-add { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed rgba(217,181,107,.4); border-radius: 5px; background: none; color: #e8d6ae; cursor: pointer; font-family: var(--title); font-size: 19px; text-align: left; }
.hero-add:hover { border-color: var(--gold); background: rgba(217,181,107,.06); }
.hero-add .plus { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--gold-dim); display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; }
.hero-add small { margin-left: auto; font-family: var(--text); font-size: 12px; color: var(--muted); }
.new-hero { margin-top: 12px; padding: 14px; border: 1px solid rgba(217,181,107,.25); border-radius: 5px; background: rgba(0,0,0,.25); }
.claim { margin-top: 14px; font-size: 13px; color: var(--muted); }
.claim summary { cursor: pointer; }
.claim summary:hover { color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 12px; background: rgba(0,0,0,.32); border: 1px solid rgba(217,181,107,.18); border-radius: 5px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--title); font-weight: 400; font-size: 26px; color: #ffd98a; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.stat-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.stat-table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; padding: 4px 6px; border-bottom: 1px solid rgba(217,181,107,.25); }
.stat-table td { padding: 6px; border-bottom: 1px solid rgba(217,181,107,.1); font-variant-numeric: tabular-nums; }
.shop-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.crystals { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.crystals b { font-family: var(--title); font-weight: 400; font-size: 22px; color: #bfe3ff; }
.shop-note { font-size: 12px; color: var(--muted); }
.gem { display: inline-block; width: 11px; height: 11px; background: linear-gradient(135deg, #bfe3ff, #5a8fd0); transform: rotate(45deg); border-radius: 2px; box-shadow: 0 0 6px rgba(140,190,255,.6); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.shop-item { padding: 12px; background: rgba(0,0,0,.32); border: 1px solid rgba(217,181,107,.2); border-radius: 5px; display: flex; flex-direction: column; gap: 6px; }
.shop-item b { font-family: var(--title); font-weight: 400; font-size: 18px; color: #f0dfb8; }
.shop-item p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; flex: 1; }
.shop-ic { width: 40px; height: 40px; color: #e9cf8f; }
.shop-ic svg { width: 100%; height: 100%; }
.price { display: flex; align-items: center; gap: 7px; font-size: 16px; color: #bfe3ff; font-variant-numeric: tabular-nums; }
.shop-item .btn-ghost:disabled { opacity: .55; cursor: default; }
.acc-line { font-size: 14px; color: var(--muted); margin-bottom: 6px; word-break: break-all; }
.acc-line b { color: var(--ink); font-weight: 400; }
#emailForm, #passForm { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(217,181,107,.15); }
#emailForm .btn-ghost, #passForm .btn-ghost { align-self: flex-start; }
.top-list { margin: 6px 0 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 5px; color: var(--muted); }
.top-list li { font-size: 13px; }
.top-list li b { color: #e6d2a8; margin-right: 6px; }
.top-list li span { color: var(--muted); font-size: 12px; }
.top-list li.seal b { color: #ffd34d; }
.top-list .empty { list-style: none; margin-left: -22px; }
.cab-btn { width: 100%; margin-bottom: 8px; background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.3); color: #e8d6ae; font-size: 12px; padding: 5px 2px; border-radius: 3px; cursor: pointer; }
.cab-btn:hover { border-color: var(--gold); }
.cls-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.cls-title span { text-transform: none; letter-spacing: 0; opacity: .7; }
.cls-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .cls-list { grid-template-columns: 1fr; } }
.cls { text-align: left; background: rgba(0,0,0,.35); border: 1px solid rgba(217,181,107,.22); border-radius: 5px; color: var(--ink); padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, background .15s; }
.cls b { font-family: var(--title); font-weight: 400; font-size: 19px; color: #f0dfb8; }
.cls span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.cls:hover { border-color: rgba(217,181,107,.55); }
.cls.on { border-color: var(--gold); background: rgba(217,181,107,.12); box-shadow: inset 0 0 0 1px rgba(217,181,107,.35); }
.btn-main { margin-top: 4px; background: linear-gradient(#c79a4c, #8d6527); border: 1px solid #e6c47e; color: #1d1307; font-family: var(--title); font-size: 21px; padding: 10px; border-radius: 4px; cursor: pointer; letter-spacing: .03em; }
.btn-main:hover { filter: brightness(1.1); }
.btn-main:disabled { filter: grayscale(.7) brightness(.7); cursor: wait; }
.login-err { color: var(--red); min-height: 18px; font-size: 14px; }
.login-note { font-size: 12px; color: var(--muted); }
.grave { padding: 18px; display: flex; flex-direction: column; min-height: 0; }
.grave h3 { font-family: var(--title); font-weight: 400; font-size: 24px; margin: 0 0 4px; color: #e8d6ae; }
.world-state { margin-top: auto; padding-top: 12px; font-size: 13px; color: #d6c9ae; border-top: 1px solid rgba(217,181,107,.18); }

/* павший лежит и видит мир: красная виньетка по краям, окошко с кнопкой — ниже середины, клики мимо него проходят в игру */
#death { background: radial-gradient(ellipse at center, rgba(70,6,6,0) 35%, rgba(60,4,4,.55) 80%, rgba(0,0,0,.8)); animation: fadein 1.6s ease;
  pointer-events: none; align-items: flex-end; padding-bottom: 18vh; z-index: 15; }
.death-box { text-align: center; max-width: 460px; pointer-events: auto; background: rgba(14,8,6,.82); border: 1px solid rgba(224,74,58,.45);
  border-radius: 6px; padding: 14px 22px 18px; box-shadow: 0 8px 40px rgba(0,0,0,.6); }
.death-title { font-family: var(--title); font-size: clamp(34px, 7vw, 52px); color: #e04a3a; text-shadow: 0 0 30px rgba(200,30,20,.6); letter-spacing: .04em; }
.death-text { color: #dccfb6; font-size: 15px; line-height: 1.55; margin: 6px 0 14px; }
.death-text small { color: #a89a80; font-size: 13px; }
#deathHome { min-width: 220px; font-size: 18px; padding: 8px 18px; }
.death-text b { color: #fff; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Подписи над головами ---------- */
#labels, #floaters { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); text-align: center; white-space: nowrap; will-change: transform; }
.lbl .n { font-size: 13px; font-weight: 700; color: #f2f2f2; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.lbl .n small { font-weight: 400; opacity: .8; margin-left: 4px; }
.lbl.mob .n { color: #e8e2d4; font-weight: 400; }
.lbl.mob.hard .n { color: #ff9f6a; }
.lbl.mob.easy .n { color: #9fc79a; }
.lbl.boss .n { color: #e7a8ff; font-size: 16px; }
.lbl.guard .n { color: #9fc4ff; font-weight: 400; }
.lbl.pk .n { color: var(--red); }
.lbl.flag .n { color: var(--purple); }
.lbl.seal .n { color: #ffd34d; text-shadow: 0 0 6px rgba(255,190,40,.8), 0 1px 2px #000; }
.lbl.self .n { color: #bfe3ff; }
.lbl .hb { width: 54px; height: 4px; background: rgba(0,0,0,.65); margin: 2px auto 0; border-radius: 2px; overflow: hidden; display: none; }
.lbl .hb i { display: block; height: 100%; background: var(--hp-hi); }
.lbl.showhp .hb { display: block; }
.lbl.boss .hb { width: 120px; height: 6px; }
.lbl.sel .n { text-decoration: underline; text-decoration-color: rgba(255,220,140,.8); text-underline-offset: 3px; }

.fl { position: absolute; left: 0; top: 0; font-weight: 700; font-size: 18px; text-shadow: 0 0 3px #000, 0 2px 3px #000; transform: translate(-50%, -50%); white-space: nowrap; }
.fl.dmg { color: #fff; }
.fl.dmg.me { color: #ff6b5a; }
.fl.crit { color: #ffd34d; font-size: 24px; }
.fl.heal { color: #7dff9a; }
.fl.info { color: #ffd34d; font-family: var(--title); font-size: 26px; font-weight: 400; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud .panel, #hud input, #hud .bar-skills { pointer-events: auto; }
.me { position: absolute; left: 12px; top: 12px; width: 260px; padding: 10px 12px; }
.me-name { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--title); font-size: 20px; margin-bottom: 6px; color: #f0dfb8; }
.me-lvl, .tg-lvl { font-family: var(--text); font-size: 12px; color: var(--muted); }
.bar { position: relative; height: 16px; background: rgba(0,0,0,.55); border: 1px solid rgba(0,0,0,.6); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; transition: width .15s; }
.bar.hp i { background: linear-gradient(var(--hp-hi), var(--hp)); }
.bar.xp { height: 14px; }
.bar.xp i { background: linear-gradient(#e6c06a, #9c7a2f); }
.bar em { position: absolute; inset: 0; font-style: normal; font-size: 11px; line-height: 16px; text-align: center; text-shadow: 0 1px 2px #000; }
.bar.xp em { line-height: 14px; font-size: 10.5px; }
.me-status { margin-top: 6px; font-size: 12px; min-height: 0; }
.me-status span { display: inline-block; padding: 1px 6px; border-radius: 3px; margin-right: 4px; font-size: 11px; }
.st-pk { background: #6d1a14; color: #ffb4a8; }
.st-flag { background: #4a2466; color: #e8c8ff; }
.st-seal { background: #6b5214; color: #ffe69a; }
.st-safe { background: #1d3b22; color: #b8e6bf; }

.target { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 300px; padding: 8px 12px; }
.tg-name { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 700; }

.world { position: absolute; right: 62px; top: 12px; width: 136px; padding: 6px 8px 8px; text-align: center; }
/* задания — отдельной панелью под радаром (можно перетащить) */
.qpanel { position: absolute; right: 62px; top: 196px; width: 220px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.qpanel:not(:has(.qtrack:not(.hidden))) { display: none; }
.qpanel .qtrack { width: 100%; margin: 0; box-shadow: 0 4px 14px rgba(0,0,0,.45); background: rgba(24, 18, 8, .82); }
.qpanel .qtrack.story { background: rgba(14, 22, 34, .85); }
/* столбец круглых кнопок справа от мини-карты (рейтинг и т.п.) */
.side-col { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; pointer-events: auto; }
.side-col > .drag-grip { display: none; }                  /* кубок тянут за саму кнопку */
#ratingBtn { cursor: pointer; }
.side-col.dragging #ratingBtn { cursor: grabbing; }
.cup-hide { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: rgba(14, 11, 8, .92); color: #e9cf8f; font-size: 13px; line-height: 15px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.side-col:hover .cup-hide, .cup-hide:focus-visible { opacity: 1; }
.cup-hide:hover { color: #fff0c8; border-color: var(--gold); }
/* умения: есть что изучить — кнопка горит красным, в углу число */
#skillsBtn { position: relative; }
#skillsBtn.has-new { border-color: #d8432f; color: #ffb4a3; box-shadow: 0 0 0 2px rgba(216, 67, 47, .45), 0 0 14px rgba(216, 67, 47, .55); }
.floor { font-family: var(--title); font-size: 13px; color: #e8d6ae; white-space: nowrap; }
.timer { font-variant-numeric: tabular-nums; font-size: 15px; color: #ffcf6e; margin: 1px 0; letter-spacing: .02em; white-space: nowrap; }
.timer.danger { color: var(--red); }
.online { font-size: 11px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snd { display: flex; gap: 4px; margin-bottom: 8px; }
.snd button { flex: 1; background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.3); color: #d6c9ae; font-size: 11px; padding: 4px 2px; border-radius: 3px; cursor: pointer; }
.snd button:hover { border-color: var(--gold); }
#minimap { width: 118px; height: 118px; border-radius: 50%; border: 1px solid var(--line); background: #1a2414; display: block; margin: 0 auto; }

.chat { position: absolute; left: 12px; bottom: 30px; width: min(420px, calc(100vw - 24px)); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.syswin { position: absolute; left: 12px; bottom: 260px; width: min(420px, calc(100vw - 24px)); padding: 4px 8px 6px; display: flex; flex-direction: column; gap: 2px; pointer-events: auto; }
.sys-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: move; user-select: none; }
.sys-head span { flex: 1; }
.sys-toggle { width: 22px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: rgba(0,0,0,.35); color: #e9cf8f; font-size: 11px; line-height: 1; cursor: pointer; transition: transform .15s; }
.syswin.collapsed .sys-toggle { transform: rotate(-90deg); }
.sys-log { height: 92px; overflow-y: auto; font-size: 12.5px; line-height: 1.35; padding-right: 4px; scrollbar-width: thin; }
.syswin.collapsed .sys-log { display: none; }
.syswin.collapsed { width: auto; min-width: 140px; }
/* размер интерфейса (Настройки → Графика): всё, кроме самой сцены и подписей над героями */
body > *:not(#view):not(#labels):not(#floaters):not(#cinema):not(script) { zoom: var(--uiz, 1); }
.chat-log { height: 180px; overflow-y: auto; font-size: 13px; line-height: 1.4; padding-right: 4px; scrollbar-width: thin; }
.chat-log div { word-wrap: break-word; }
.chat-log .n { color: #bfe3ff; font-weight: 700; }
.chat-log .n.pk { color: var(--red); }
.chat-log .n.seal { color: #ffd34d; }
.chat-log .sys { color: #b9ad94; }
.chat-log .sys.gold { color: #ffd34d; }
.chat-log .sys.warn { color: #ff9f6a; }
.chat-log .sys.death { color: #ff6b5a; }
.chat-log .sys.err { color: #d98a80; font-style: italic; }
#chatInput { background: rgba(0,0,0,.45); border: 1px solid rgba(217,181,107,.25); color: var(--ink); border-radius: 3px; padding: 6px 8px; font-family: var(--text); font-size: 13px; outline: none; }
#chatInput:focus { border-color: var(--gold); }

.bar-skills { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; }
.sk { position: relative; width: 62px; height: 62px; background: linear-gradient(#2a2118, #15100b); border: 1px solid var(--gold-dim); border-radius: 6px; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 4px; color: var(--ink); overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.sk:hover { border-color: var(--gold); }
.sk .ic { position: absolute; inset: 6px 6px 18px; display: flex; align-items: center; justify-content: center; }
.sk .ic svg { width: 30px; height: 30px; }
.sk .nm { font-size: 9.5px; line-height: 1.1; text-align: center; color: #d8ccb2; position: relative; }
.sk .key { position: absolute; left: 4px; top: 2px; font-size: 11px; color: var(--gold); font-weight: 700; }
.sk .cd { position: absolute; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; transform-origin: bottom; }
.sk.flash { animation: flash .25s; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px #ffd34d; } 100% { box-shadow: 0 4px 12px rgba(0,0,0,.5); } }

/* правый нижний угол: подсказка и меню */
.corner { position: absolute; right: 12px; bottom: 30px; display: flex; gap: 6px; align-items: flex-end; pointer-events: auto; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: #e9cf8f; cursor: pointer; font-family: var(--title); font-size: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.round-btn svg { width: 20px; height: 20px; }
.round-btn:hover { border-color: var(--gold); color: #fff0c8; }
.round-btn:focus-visible, .qs:focus-visible, .ctab:focus-visible, .pop button:focus-visible, .keybtn:focus-visible, .pal:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pop { position: absolute; right: 0; bottom: 50px; background: rgba(14, 11, 8, .92); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 26px rgba(0,0,0,.55); }
.help { width: min(360px, calc(100vw - 24px)); padding: 10px 14px; font-size: 12.5px; color: #cfc3aa; line-height: 1.6; }
.help b { color: var(--gold); display: block; margin: 4px 0 2px; font-family: var(--title); font-weight: 400; font-size: 16px; }
.help b:first-child { margin-top: 0; }
.help .c-g { color: #ff6a5a; } .help .c-w { color: #ff8fd0; }
.menu { min-width: 200px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.menu button { background: none; border: 0; border-radius: 4px; color: var(--ink); text-align: left; padding: 9px 12px; font-size: 14px; cursor: pointer; }
.menu button:hover { background: rgba(217,181,107,.14); }
.menu button.danger { color: #ff9f8a; border-top: 1px solid rgba(217,181,107,.15); border-radius: 0 0 4px 4px; }

/* чат: вкладки, каналы */
.chat-tabs { display: flex; gap: 2px; margin: -2px 0 0; }
.ctab { position: relative; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 2px 10px 4px; font-size: 13px; cursor: pointer; }
.ctab.on { color: #f0dfb8; border-bottom-color: var(--gold); }
.ctab .dot { display: none; position: absolute; right: 2px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: #ff5a4a; }
.ctab.new .dot { display: block; }
.chat-log .n { cursor: pointer; }
.chat-log .n:hover { text-decoration: underline; }
.chat-log .ch-g { color: #ff6a5a; }
.chat-log .ch-g .n { color: #ff8a7a; }
.chat-log .ch-w, .chat-log .ch-wo { color: #ff8fd0; }
.chat-log .ch-w .n, .chat-log .ch-wo .n { color: #ffb0e0; }

/* текст над головой */
.lbl .bub { display: none; max-width: 220px; white-space: normal; margin: 0 auto 4px; padding: 4px 8px; background: rgba(250, 244, 230, .94); color: #2a1e10; font-size: 12.5px; line-height: 1.3; border-radius: 8px; position: relative; text-align: center; width: max-content; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.lbl .bub::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: rgba(250, 244, 230, .94); }
.lbl.talking .bub { display: block; }

/* панель быстрого доступа */
.quickbar { --slot: 44px; --half: calc((9 * (var(--slot) + 3px) + 11px) / 2); position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); margin-left: max(0px, calc(446px + var(--half) - 50vw)); display: flex; flex-direction: column; gap: 3px; pointer-events: auto; }
.qb-row { display: flex; gap: 3px; padding: 3px; background: rgba(10, 8, 6, .55); border: 1px solid rgba(217,181,107,.25); border-radius: 5px; }
.qs { position: relative; width: var(--slot); height: var(--slot); padding: 0; background: linear-gradient(#2a2118, #15100b); border: 1px solid var(--gold-dim); border-radius: 4px; cursor: pointer; color: #e9cf8f; overflow: hidden; }
.qs:hover { border-color: var(--gold); }
.qs.empty { background: rgba(0,0,0,.35); border-color: rgba(217,181,107,.18); cursor: default; }
.qs .ic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.qs .ic svg { width: 58%; height: 58%; }
.qs .key { position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 700; color: var(--gold); text-shadow: 0 1px 2px #000; pointer-events: none; }
.quickbar.nolabels .qs .key { display: none; }
.qs .cd { position: absolute; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: center; justify-content: center; font-size: calc(var(--slot) * .36); font-weight: 700; color: #fff; transform-origin: bottom; pointer-events: none; }
.qs.flash { animation: flash .25s; }
.center-msg { position: absolute; left: 50%; top: 26%; transform: translateX(-50%); font-family: var(--title); font-size: clamp(26px, 4vw, 40px); color: #ffd98a; text-shadow: 0 0 24px rgba(0,0,0,.9), 0 2px 4px #000; text-align: center; opacity: 0; transition: opacity .6s; white-space: nowrap; }
.center-msg.on { opacity: 1; }

@media (max-height: 720px) { .sys-log { height: 58px; } .syswin { width: min(340px, calc(100vw - 24px)); } }
@media (max-width: 900px) {
  .target { top: 120px; }
}
@media (max-width: 760px) {
  .quickbar { --slot: 34px !important; left: auto; right: 104px; transform: none; margin-left: 0; }
  .chat { width: min(300px, calc(100vw - 24px)); }
  .chat-log { height: 110px; }
}

/* ---------- Настройки ---------- */
#settings { z-index: 40; background: rgba(8, 6, 4, .62); }
.settings-box { width: min(520px, 100%); max-height: calc(100vh - 32px); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.set-tabs { margin-bottom: 0; }
.set-page { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 56vh; padding-right: 4px; scrollbar-width: thin; }
.set-reset { align-self: flex-start; }
.set-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.seg.seg3 { grid-template-columns: repeat(3, auto); }
.seg3 button { font-family: var(--text); font-size: 13px; padding: 6px 10px; }
.set-sub { font-size: 13px; color: var(--ink); }
.set-sub span { color: var(--muted); }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.pal { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(0,0,0,.35); border: 1px solid rgba(217,181,107,.25); border-radius: 4px; color: var(--ink); font-size: 13px; cursor: grab; text-align: left; }
.pal:hover { border-color: var(--gold); }
.pal .ic { width: 26px; height: 26px; flex: none; color: #e9cf8f; }
.pal .ic svg { width: 100%; height: 100%; }
.keylist { display: flex; flex-direction: column; gap: 3px; }
.keyhead { font-family: var(--title); font-size: 16px; color: #e8d6ae; margin-top: 8px; }
.keyrow { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 2px 0; border-bottom: 1px solid rgba(217,181,107,.08); }
.keybtn { min-width: 110px; background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.3); color: #f0dfb8; border-radius: 4px; padding: 4px 10px; font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.keybtn:hover { border-color: var(--gold); }
.keybtn.wait { border-color: var(--gold); background: rgba(217,181,107,.18); }
.set-msg { margin-right: auto; align-self: center; font-size: 13px; color: #9fd99a; }
.cab-head-btns { display: flex; gap: 8px; align-items: center; }
.back-game { margin: 0; font-size: 17px; padding: 6px 16px; }
.settings-box h2 { margin: 0 0 4px; font-family: var(--title); font-weight: 400; font-size: 28px; color: #f0dfb8; }
.vol-row { display: grid; grid-template-columns: 1fr 52px; grid-template-areas: "lbl out" "rng rng"; gap: 4px 10px; align-items: center; }
.vol-row label { grid-area: lbl; font-size: 15px; color: var(--ink); }
.vol-row label span, .mute-row span { color: var(--muted); font-size: 12px; margin-left: 4px; }
.vol-row output { grid-area: out; text-align: right; font-variant-numeric: tabular-nums; color: var(--gold); font-size: 15px; }
.vol-row input[type=range] { grid-area: rng; width: 100%; accent-color: #c9a14a; height: 28px; cursor: pointer; }
.mute-row { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; padding: 6px 0; }
.mute-row input { width: 18px; height: 18px; accent-color: #c9a14a; }
.set-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.set-actions .btn-main { margin: 0; padding: 8px 22px; font-size: 19px; }
.btn-ghost { background: transparent; border: 1px solid rgba(217,181,107,.4); color: #d6c9ae; border-radius: 4px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.btn-ghost:hover { border-color: var(--gold); color: var(--ink); }
.gear-btn { position: fixed; top: 14px; right: 14px; z-index: 25; width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: #e9cf8f; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gear-btn svg { width: 24px; height: 24px; }
.gear-btn:hover { border-color: var(--gold); }
body.in-game .gear-btn { display: none; }

/* ---------- Создание героя ---------- */
.creator { z-index: 21; align-items: flex-start; background: radial-gradient(ellipse at 50% 45%, rgba(40,30,18,.55), rgba(8,6,4,.96) 70%); }
.cr-wrap { width: min(1180px, 100%); margin: auto; display: flex; flex-direction: column; gap: 12px; }
.cr-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.cr-head h2 { margin: 0; font-family: var(--title); font-weight: 400; font-size: clamp(28px, 4vw, 40px); color: #f3e6c8; text-shadow: 0 2px 14px #000; }
.cr-head .btn-ghost { justify-self: start; }
.cr-grid { display: grid; grid-template-columns: 300px 1fr 300px; gap: 12px; align-items: stretch; }
.cr-side { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cr-side h3 { margin: 6px 0 0; font-family: var(--title); font-weight: 400; font-size: 19px; color: #e8d6ae; }
.cr-side h3:first-child { margin-top: 0; }
.cr-races { display: flex; flex-direction: column; gap: 6px; }
.cr-race { text-align: left; background: rgba(0,0,0,.35); border: 1px solid rgba(217,181,107,.2); border-radius: 5px; color: var(--ink); padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.cr-race b { font-family: var(--title); font-weight: 400; font-size: 18px; color: #f0dfb8; }
.cr-race span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.cr-race:hover { border-color: rgba(217,181,107,.55); }
.cr-race.on { border-color: var(--gold); background: rgba(217,181,107,.12); box-shadow: inset 3px 0 0 var(--gold); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button { background: rgba(0,0,0,.35); border: 1px solid rgba(217,181,107,.25); color: var(--ink); border-radius: 4px; padding: 9px 6px; cursor: pointer; font-family: var(--title); font-size: 17px; }
.seg button small { font-family: var(--text); font-size: 11px; color: var(--muted); margin-left: 3px; }
.seg button:hover:not(:disabled) { border-color: rgba(217,181,107,.6); }
.seg button.on { border-color: var(--gold); background: rgba(217,181,107,.16); color: #fff2d0; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.cr-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.cr-center { position: relative; min-height: 460px; display: flex; flex-direction: column; align-items: center; }
.cr-title { font-family: var(--title); font-size: 26px; color: #f0dfb8; text-shadow: 0 2px 10px #000; }
#crView { flex: 1; width: 100%; min-height: 400px; cursor: grab; touch-action: none; }
#crView:active { cursor: grabbing; }
.cr-hint { font-size: 12px; color: var(--muted); }
.cr-step { display: grid; grid-template-columns: 92px 30px 1fr 30px; align-items: center; gap: 6px; font-size: 13px; }
.cr-step > span { color: var(--muted); }
.cr-step button { height: 30px; background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.3); color: #f0dfb8; border-radius: 4px; cursor: pointer; font-size: 18px; line-height: 1; }
.cr-step button:hover { border-color: var(--gold); }
.cr-step b { font-weight: 400; text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.cr-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); display: inline-block; }
.cr-random { margin-top: 2px; }
.cr-stats { display: flex; flex-direction: column; gap: 4px; }
.cr-stat { display: grid; grid-template-columns: 38px 1fr 26px; align-items: center; gap: 8px; font-size: 12px; }
.cr-stat span { color: var(--muted); }
.cr-stat i { height: 7px; background: rgba(0,0,0,.5); border-radius: 3px; overflow: hidden; }
.cr-stat em { display: block; height: 100%; background: linear-gradient(90deg, #9c7a2f, #e6c06a); }
.cr-stat b { text-align: right; font-weight: 400; font-variant-numeric: tabular-nums; color: #f0dfb8; }
.cr-prof { margin: 0; padding-left: 18px; font-size: 13px; color: #dccfb6; display: flex; flex-direction: column; gap: 3px; }
.cr-bottom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 12px; padding: 12px 16px; }
.cr-bottom label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cr-bottom input { background: rgba(0,0,0,.45); border: 1px solid rgba(217,181,107,.3); color: var(--ink); border-radius: 4px; padding: 10px 12px; font-size: 16px; font-family: var(--text); outline: none; min-width: 0; }
.cr-bottom input:focus { border-color: var(--gold); }
.cr-bottom .btn-main { margin: 0; padding: 9px 22px; }
.cr-bottom .login-err { grid-column: 1 / -1; min-height: 0; }
.cr-race:focus-visible, .seg button:focus-visible, .cr-step button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 1000px) {
  .cr-grid { grid-template-columns: 1fr 1fr; }
  .cr-center { grid-column: 1 / -1; grid-row: 1; min-height: 340px; }
  #crView { min-height: 300px; }
}
@media (max-width: 640px) {
  .cr-grid { grid-template-columns: 1fr; }
  .cr-head { grid-template-columns: auto 1fr; }
  .cr-head-pad { display: none; }
  .cr-bottom { grid-template-columns: 1fr; }
}

/* перезагрузка после обновления */
.update-note { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 60; padding: 10px 18px; background: rgba(14, 11, 8, .94); border: 1px solid var(--gold); border-radius: 6px; color: #f0dfb8; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.6); }

/* CP и MP */
.bar.cp { height: 14px; }
.bar.cp i { background: linear-gradient(#f2c95a, #a87a1e); }
.bar.cp em { line-height: 14px; font-size: 10.5px; }
.bar.mp i { background: linear-gradient(#5a9ae8, #234f9a); }
.qs.nomp .ic { opacity: .35; filter: grayscale(.6); }
.qs.nomp { border-color: #2c4a7a; }

/* панель группы */
#party { position: absolute; left: 12px; top: 168px; width: 200px; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
#partyList { display: flex; flex-direction: column; gap: 5px; }
.party-title { font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 0 4px 3px; border-bottom: 1px solid rgba(217,181,107,.18); user-select: none; }
.pm { padding: 4px 6px; border-radius: 4px; cursor: pointer; border: 1px solid transparent; }
.pm:hover { background: rgba(217,181,107,.08); }
.pm.sel { border-color: rgba(255,211,77,.6); }
.pm.dead { opacity: .5; }
.pm-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 2px; }
.pm-top b { color: #b8e8b0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-top span { color: var(--muted); }
.pm .bar { height: 5px; margin-top: 2px; border: 0; }
#party:empty { display: none; }
.chat-log .sys.party { color: #8fe08a; }

/* приглашение в группу */
.pinvite { position: absolute; left: 50%; top: 90px; transform: translateX(-50%); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; pointer-events: auto; }
.pinvite .btn-main { margin: 0; font-size: 17px; padding: 6px 16px; }

/* окно «Действия» */
.actions { width: 260px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.actions > b { font-family: var(--title); font-weight: 400; font-size: 17px; color: #e8d6ae; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.act-grid button, .act-sub button { background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.28); color: var(--ink); border-radius: 4px; padding: 7px 6px; font-size: 13px; cursor: pointer; }
.act-grid button:hover, .act-sub button:hover { border-color: var(--gold); }
.act-grid .danger { grid-column: 1 / -1; color: #ff9f8a; }
.act-sub { display: flex; flex-direction: column; gap: 4px; }
.act-title { font-size: 12px; color: var(--muted); }
.act-invite { display: flex; gap: 6px; }
.act-invite input { flex: 1; min-width: 0; background: rgba(0,0,0,.45); border: 1px solid rgba(217,181,107,.3); color: var(--ink); border-radius: 4px; padding: 6px 8px; font-size: 14px; outline: none; }
.act-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.chat-log .ch-p { color: #8fe08a; }
.chat-log .ch-p .n { color: #b0f0a8; }
.help .c-p { color: #8fe08a; }
.lbl.party .n { color: #a8f0a0; }

/* карта мира */
#worldmap { z-index: 35; background: rgba(8, 6, 4, .7); }
.wm-box { width: min(1000px, 100%); height: min(860px, calc(100vh - 32px)); display: flex; flex-direction: column; padding: 12px 14px; gap: 8px; }
.wm-head { display: flex; align-items: center; gap: 12px; }
.wm-head h2 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 26px; color: #f0dfb8; }
.wm-where { flex: 1; font-size: 14px; color: #d6c9ae; }
.wm-view { position: relative; flex: 1; overflow: hidden; border-radius: 4px; background: #9fc3d0; cursor: grab; touch-action: none; }
.wm-view:active { cursor: grabbing; }
.wm-view img { position: absolute; left: 0; top: 0; user-select: none; pointer-events: none; transition: opacity .25s; }
.wm-view canvas { position: absolute; inset: 0; pointer-events: none; }
/* карта: рамка с тенью по краю, кнопки приближения */
.wm-view::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px rgba(10, 8, 4, .55), inset 0 0 0 1px rgba(217,181,107,.35); border-radius: 4px; }
.wm-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.wm-zoom button { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line); background: rgba(14, 11, 8, .85); color: #f0dfb8; font-size: 18px; line-height: 1; cursor: pointer; }
.wm-zoom button:hover { border-color: var(--gold); color: #fff; }
.wm-note { font-size: 12px; color: var(--muted); }
/* телепорт */
.tpmenu { position: absolute; right: 220px; top: 50%; transform: translateY(-50%); width: 260px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.tpmenu > b { font-family: var(--title); font-weight: 400; font-size: 19px; color: #e8d6ae; }
.tp-list { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; }
.tp-item { text-align: left; background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.28); color: var(--ink); border-radius: 4px; padding: 6px 9px; cursor: pointer; display: flex; flex-direction: column; }
.tp-item b { font-weight: 700; font-size: 14px; color: #f0dfb8; }
.tp-item span { font-size: 12px; color: var(--muted); }
.tp-item:hover:not(:disabled) { border-color: var(--gold); }
.tp-item.here { opacity: .55; cursor: default; }
@media (max-width: 760px) { .tpmenu { right: 12px; top: 220px; transform: none; } }

/* ---------- Снаряжение и сумка ---------- */
.inv { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 12; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 12px 14px; gap: 10px; pointer-events: auto; overflow: auto; }
.inv-head { display: flex; align-items: center; gap: 12px; }
.inv-head h2 { margin: 0; flex: 1; font-family: var(--title); font-weight: 400; font-size: 24px; color: #f0dfb8; }
.inv-adena { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: #f0dfb8; }
.inv-adena svg { width: 18px; height: 18px; }
.inv-body { display: grid; grid-template-columns: 250px 1fr; gap: 14px; }
@media (max-width: 680px) { .inv-body { grid-template-columns: 1fr; } }
.paperdoll { display: grid; grid-template-columns: repeat(4, 52px); grid-auto-rows: 52px; gap: 6px; justify-content: center;
  grid-template-areas: "ear1 helmet ear2 neck" "weapon top shield ring1" "gloves bottom boots ring2" ". cloak . ."; }
.islot { position: relative; border: 1px solid rgba(217,181,107,.28); background: rgba(0,0,0,.45); border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: #6f6352; }
.islot:hover { border-color: var(--gold); }
.islot.empty .ic { opacity: .35; }
.islot .ic { width: 80%; height: 80%; display: flex; }
.islot .ic svg { width: 100%; height: 100%; }
.islot .cnt { position: absolute; right: 3px; bottom: 1px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; }
.islot .enc { position: absolute; left: 3px; top: 1px; font-size: 11px; font-weight: 700; color: #ffe08a; text-shadow: 0 1px 2px #000; }
.islot .gr { position: absolute; right: 3px; top: 1px; font-size: 10px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.islot.sel { outline: 2px solid var(--gold); outline-offset: 1px; }
.islot.ench-target { box-shadow: 0 0 0 2px #7fc1ff inset; }
.islot.drag-over { border-color: #7fc1ff; background: rgba(127,193,255,.12); }
/* ступень вещи: средняя, высокая, редкая, легендарная, бессмертная */
.islot.tier1 { box-shadow: inset 0 0 8px rgba(143, 208, 106, .28); }
.islot.tier2 { box-shadow: inset 0 0 9px rgba(90, 168, 255, .32); }
.islot.tier3 { box-shadow: inset 0 0 10px rgba(194, 123, 255, .4); border-color: rgba(194, 123, 255, .5); }
.islot.tier4 { box-shadow: inset 0 0 11px rgba(255, 165, 58, .45); border-color: rgba(255, 165, 58, .6); }
.islot.tier5 { box-shadow: inset 0 0 12px rgba(255, 90, 110, .5); border-color: rgba(255, 90, 110, .7); }
.inv-stats { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; color: #d6c9ae; }
.inv-stats b { color: #f0dfb8; font-weight: 600; text-align: right; }
.inv-sets { margin-top: 8px; font-size: 12px; color: #ffd34d; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, 46px); grid-auto-rows: 46px; gap: 4px; align-content: start; min-height: 200px; }
.inv-foot { display: flex; gap: 12px; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.inv-hint { opacity: .9; }
body.enchanting, body.enchanting .islot { cursor: crosshair; }
.itip { position: fixed; z-index: 40; max-width: 290px; padding: 8px 10px; background: rgba(10,8,6,.96); border: 1px solid var(--line); border-radius: 4px; font-size: 13px; color: #d6c9ae; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.itip .t-name { font-weight: 700; font-size: 14px; }
.itip .t-sub { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.itip .t-row { display: flex; justify-content: space-between; gap: 12px; }
.itip .t-set { color: #ffd34d; margin-top: 4px; font-size: 12px; }
.itip .t-bad { color: var(--red); margin-top: 4px; }
.itip .t-price { color: var(--muted); margin-top: 4px; font-size: 12px; }
.confirm { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 45; width: min(360px, calc(100vw - 32px)); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; pointer-events: auto; }
.cf-row { display: flex; justify-content: flex-end; gap: 8px; }
.confirm .btn-main { margin: 0; font-size: 15px; padding: 7px 16px; }
.chat-log .sys.loot { color: #b9e39b; }

/* ---------- Жители городов ---------- */
.lbl.npc .n { color: #ffe9a8; }
.lbl.npc .npc-hint { font-size: 11px; color: #d6c9ae; text-shadow: 0 1px 2px #000; }
.npcwin { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 12; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 12px 14px; gap: 8px; pointer-events: auto; }
.nw-head { display: flex; align-items: center; gap: 12px; }
.nw-head h2 { margin: 0; flex: 1; font-family: var(--title); font-weight: 400; font-size: 22px; color: #f0dfb8; }
.nw-tabs { display: flex; gap: 4px; }
.nw-tabs .ctab { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.nw-tabs .ctab.on { border-color: var(--line); color: var(--ink); }
.nw-body { overflow: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.nw-filter { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nw-filter .btn-ghost { padding: 4px 9px; font-size: 13px; }
.nw-filter .btn-ghost.on { border-color: var(--gold); color: var(--ink); background: rgba(217,181,107,.12); }
.nw-grade { background: rgba(0,0,0,.45); color: var(--ink); border: 1px solid rgba(217,181,107,.3); border-radius: 4px; padding: 4px 6px; font-family: inherit; }
.nw-list { display: flex; flex-direction: column; gap: 3px; overflow: auto; max-height: 52vh; }
.nw-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 4px; }
.nw-row:hover { background: rgba(255,255,255,.04); }
.nw-row .islot { width: 40px; height: 40px; flex: none; cursor: default; }
.nw-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.nw-name b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-name small { color: var(--muted); font-size: 12px; }
.nw-right { display: flex; align-items: center; gap: 6px; }
.nw-right .btn-ghost { padding: 5px 10px; font-size: 13px; }
.nw-right .btn-ghost:disabled, .nw-adena .btn-ghost:disabled { opacity: .45; cursor: default; }
.nw-price { color: #f0dfb8; font-size: 13px; min-width: 70px; text-align: right; }
.nw-qty { width: 64px; background: rgba(0,0,0,.45); border: 1px solid rgba(217,181,107,.3); color: var(--ink); border-radius: 4px; padding: 4px 6px; font-family: inherit; }
.nw-empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }
.m-ok { color: #9fd98a; } .m-no { color: #e08a7a; }
.nw-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nw-col > b { display: block; font-weight: 600; color: #e8d6ae; margin-bottom: 4px; font-size: 13px; }
.nw-grid { grid-template-columns: repeat(auto-fill, 40px); grid-auto-rows: 40px; max-height: 40vh; overflow: auto; min-height: 80px; }
.nw-adena { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: #d6c9ae; }
.nw-adena .btn-ghost { padding: 5px 10px; font-size: 13px; }
@media (max-width: 680px) { .nw-cols { grid-template-columns: 1fr; } }

/* ---------- Обмен ---------- */
.tradewin { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 13; width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; padding: 12px 14px; gap: 10px; pointer-events: auto; }
.tr-qty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; width: min(320px, calc(100% - 24px)); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: rgba(14, 11, 8, .97); border: 1px solid var(--gold); border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.tr-qty b { color: #f0dfb8; } .tr-qty span { font-size: 13px; color: var(--muted); }
.tr-qty-row { display: flex; gap: 8px; align-items: center; }
.tr-qty-row input[type=range] { flex: 1; } .tr-qty-row input[type=number] { width: 80px; } .tr-qty-row button { flex: 1; }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-side { border: 1px solid rgba(217,181,107,.22); border-radius: 4px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.tr-side.ready { border-color: #8fe08a; box-shadow: inset 0 0 12px rgba(143,224,138,.12); }
.tr-side > b, .tr-bag > b { font-weight: 600; color: #e8d6ae; font-size: 13px; }
.tr-ok { color: #8fe08a; font-weight: 400; }
.tr-ad { font-size: 13px; color: #f0dfb8; }
.tr-bag { display: flex; flex-direction: column; gap: 6px; }
.tr-flex { flex: 1; }
.tradewin .btn-main { margin: 0; font-size: 16px; padding: 6px 18px; }
@media (max-width: 560px) { .tr-cols { grid-template-columns: 1fr; } }

/* ---------- Перетаскивание панелей ---------- */
.drag-grip { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; cursor: move; opacity: 0; transition: opacity .15s; z-index: 2; border-radius: 3px;
  background: radial-gradient(circle, var(--gold) 1.2px, transparent 1.5px) 0 0 / 5px 5px; pointer-events: auto; }
.is-draggable:hover > .drag-grip, .is-draggable.dragging > .drag-grip { opacity: .75; }
.drag-handle { cursor: move; }
.is-draggable.dragging { opacity: .92; user-select: none; }
.quickbar.is-draggable { padding-right: 18px; }

.islot.auto { box-shadow: inset 0 0 0 2px #8fe08a, 0 0 10px rgba(143,224,138,.45); }
.fl.miss { color: #b9c4d0; font-style: italic; font-size: 15px; }

/* ---------- Окно персонажа ---------- */
.charwin { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 12; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; padding: 12px 14px; gap: 8px; pointer-events: auto; }
.ch-sub { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.ch-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .ch-cols { grid-template-columns: 1fr; } }
.charwin h3 { margin: 6px 0 6px; font-family: var(--title); font-weight: 400; font-size: 18px; color: #e8d6ae; }
.ch-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ch-stat { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 8px; padding: 6px 8px; border: 1px solid rgba(217,181,107,.22); border-radius: 4px; background: rgba(0,0,0,.25); }
.ch-stat span { color: var(--gold); font-weight: 700; font-size: 13px; }
.ch-stat b { font-size: 20px; color: #f3e6c8; text-align: right; font-weight: 600; }
.ch-stat small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.ch-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 2px; border-bottom: 1px solid rgba(217,181,107,.08); font-size: 14px; color: #d6c9ae; cursor: help; }
.ch-row b { color: #f0dfb8; font-weight: 600; }

/* ---------- Панель цели ---------- */
.target { pointer-events: auto; }
.tg-sub { font-size: 12px; color: var(--muted); margin: -2px 0 4px; min-height: 0; }
.tg-sub:empty { display: none; }
.tg-acts { display: flex; gap: 6px; margin-top: 6px; }
.tg-acts:empty { display: none; }
.tg-btn { width: 32px; height: 32px; padding: 5px; border-radius: 4px; border: 1px solid rgba(217,181,107,.35); background: rgba(0,0,0,.4); color: #e8d6ae; cursor: pointer; }
.tg-btn:hover { border-color: var(--gold); color: #fff; }
.tg-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tg-btn svg { width: 100%; height: 100%; display: block; }
.tg-drop { margin-top: 8px; border-top: 1px solid rgba(217,181,107,.2); padding-top: 6px; font-size: 12.5px; max-height: 260px; overflow: auto; }
.tg-drop-h { font-weight: 700; color: #e8d6ae; margin-bottom: 4px; }
.tg-drop-r { display: grid; grid-template-columns: 1fr auto 44px; gap: 8px; padding: 2px 0; color: #d6c9ae; }
.tg-drop-r b { color: #f0dfb8; font-weight: 600; }
.tg-drop-r em { font-style: normal; text-align: right; color: #9fd98a; }
.tg-drop-n { color: var(--muted); margin-top: 4px; font-size: 11.5px; }
.me { cursor: pointer; }

/* полоса каста над панелью умений */
.castbar { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); width: min(300px, 70vw); height: 18px; background: rgba(10, 8, 6, .75); border: 1px solid var(--gold-dim); border-radius: 4px; overflow: hidden; pointer-events: none; }
.castbar .cb-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #8a6a2a, #e8c46a); }
.castbar.magic .cb-fill { background: linear-gradient(90deg, #2c4f8a, #8fc8ff); }
.castbar span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 16px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.castbar.hidden { display: none; }

/* вещь на земле: подпись над ней */
.drop-lbl { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; pointer-events: auto; cursor: pointer; will-change: transform; padding: 2px 6px; background: rgba(10, 8, 6, .55); border: 1px solid rgba(217,181,107,.35); border-radius: 4px; }
.drop-lbl span { display: block; font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.drop-lbl small { display: block; font-size: 10px; color: #cfc8b8; opacity: .8; }
.drop-lbl:hover { border-color: var(--gold); }

/* окно заточки (как «Модификация предмета» в L2) */
.enchwin { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 14; width: 300px; max-width: calc(100vw - 32px); padding: 0 0 12px; pointer-events: auto; display: flex; flex-direction: column; }
.enchwin.hidden { display: none; }
.ew-title { text-align: center; padding: 9px 12px; font-size: 14px; color: #e9dcc0; border-bottom: 1px solid var(--line); cursor: move; }
.ew-body { margin: 10px 12px 0; padding: 10px 10px 12px; border: 1px solid rgba(217,181,107,.22); border-radius: 4px; background: rgba(0,0,0,.25); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ew-warn { font-size: 12.5px; color: #e9cf8f; text-align: center; min-height: 16px; }
.ew-warn.danger { color: #ffcf5a; font-weight: 600; }
.ew-row { display: flex; gap: 22px; margin-top: 4px; }
.ew-slot { position: relative; width: 50px; height: 50px; border: 1px solid rgba(217,181,107,.45); background: rgba(0,0,0,.55); border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.ew-slot .ic { width: 80%; height: 80%; display: flex; }
.ew-slot .ic svg { width: 100%; height: 100%; }
.ew-slot .cnt { position: absolute; right: 3px; bottom: 1px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; }
.ew-slot .enc { position: absolute; left: 3px; top: 1px; font-size: 11px; font-weight: 700; color: #ffe08a; text-shadow: 0 1px 2px #000; }
#ewItem { cursor: pointer; }
#ewItem.empty { border-style: dashed; }
.ew-arrow { color: var(--gold); font-size: 13px; line-height: 1; }
.ew-res { border-color: var(--gold); }
.ew-res.ok { box-shadow: 0 0 12px rgba(143,224,138,.6); border-color: #8fe08a; }
.ew-res.fail { box-shadow: 0 0 12px rgba(255,90,74,.5); border-color: #ff5a4a; }
.ew-broken { color: #ff5a4a; font-size: 26px; font-weight: 700; }
.ew-info { font-size: 12.5px; color: #d6c9ae; text-align: center; line-height: 1.45; min-height: 36px; }
.ew-ok { color: #8fe08a; font-weight: 700; }
.ew-bad { color: #ff5a4a; font-weight: 700; }
.ew-bar { margin: 12px 12px 0; height: 7px; border-radius: 3px; background: rgba(0,0,0,.5); border: 1px solid rgba(217,181,107,.25); overflow: hidden; }
.ew-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8a6a2a, #e8c46a); }
.ew-btns { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.ew-btns button { min-width: 96px; }
.ew-btns button:disabled { opacity: .45; cursor: default; }
.ew-go { background: linear-gradient(#5a4326, #3a2a17); border: 1px solid rgba(230,196,126,.7); color: #f3e2bb; border-radius: 4px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.ew-go:hover:not(:disabled) { filter: brightness(1.15); }
/* умения монстров */
.fl.mskill { color: #ffb35a; font-size: 15px; font-weight: 700; font-style: italic; }
.fl.drain { color: #8fb0ff; font-size: 14px; }
.tg-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tg-chip { font-size: 11px; padding: 1px 6px; border-radius: 3px; border: 1px solid rgba(217,181,107,.3); background: rgba(0,0,0,.35); color: #d6c9ae; cursor: help; }
.tg-chip.armor { color: #b8d4ff; border-color: rgba(143,184,255,.5); }
.tg-chip.ward { color: #e0b8ff; border-color: rgba(192,123,255,.5); }
.tg-chip.passive { color: #9fe0a0; }
.tg-chip.active { color: #ffb35a; }
.fl.overhit { color: #ffd34d; font-size: 18px; font-weight: 800; text-shadow: 0 0 8px rgba(255,180,40,.8), 0 1px 2px #000; }
.hp-hidden > i, .hp-hidden > #tgHp { visibility: hidden; }
.drop-lbl.theirs { opacity: .6; }
.drop-lbl.theirs small { color: #ff9a8a; }
/* почта у хранителя склада */
.mail-in, .mail-new { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mail-row { border: 1px solid rgba(217,181,107,.22); border-radius: 4px; padding: 6px 8px; background: rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 4px; }
.mail-row.unread { border-color: rgba(255,211,77,.6); }
.mail-head { display: flex; justify-content: space-between; font-size: 12px; }
.mail-from { color: #e9cf8f; font-weight: 700; }
.mail-date { color: #9a8f7a; }
.mail-text { font-size: 13px; color: #e6dcc6; white-space: pre-wrap; word-break: break-word; }
.mail-att { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.mail-att .islot { width: 36px; height: 36px; }
.mail-adena { color: #e8c46a; font-size: 12.5px; }
.mail-lbl, .mail-hint { font-size: 12px; color: #b9ad94; }
.mail-hint { font-style: italic; }
.mail-acts { display: flex; justify-content: flex-end; }
.mail-to, .mail-textarea { background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.35); border-radius: 4px; color: #f0e6cf; padding: 6px 8px; font: inherit; font-size: 13px; }
.mail-textarea { min-height: 54px; resize: vertical; }
.mail-bag { max-height: 140px; overflow: auto; }
.mail-send { align-self: flex-end; }
/* «Что нового» на главной и во вкладке кабинета */
.news-h { margin-top: 14px; }
.news { display: flex; flex-direction: column; gap: 8px; }
#newsShort { max-height: 300px; overflow: auto; }
#newsShort.open { max-height: 60vh; }
.news-full { max-height: 60vh; overflow: auto; padding-right: 4px; }
.news-item { border-left: 2px solid rgba(217,181,107,.4); padding: 2px 0 2px 8px; }
.news-date { font-size: 11px; color: #9a8f7a; }
.news-title { font-size: 13.5px; color: #f0e2c2; font-weight: 600; line-height: 1.3; }
.news-list { margin: 4px 0 0 16px; padding: 0; font-size: 12.5px; color: #d6c9ae; line-height: 1.4; }
.news-list li { margin: 2px 0; }
.news-empty { font-size: 12.5px; color: #9a8f7a; }
.news-more { align-self: flex-start; font-size: 12.5px; padding: 4px 10px; }

/* ячейка зарядов над панелью умений */
.shot-cell { position: absolute; width: 32px; height: 32px; padding: 0; border: 1px solid #5a5040; border-radius: 4px; background: rgba(20, 18, 14, 0.82); cursor: pointer; pointer-events: auto; z-index: 5; }
.shot-cell.hidden { display: none; }
.shot-cell .ic { position: absolute; inset: 3px; display: block; }
.shot-cell .ic svg { width: 100%; height: 100%; }
.shot-cell .n { position: absolute; right: 1px; bottom: 0; font: 600 10px/1 system-ui, sans-serif; color: #f2e6c8; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.shot-cell.on { border-color: #ffd36a; box-shadow: 0 0 6px 1px rgba(255, 200, 80, 0.75), inset 0 0 6px rgba(255, 200, 80, 0.45); }
.shot-cell.none .ic { opacity: 0.35; }
.shot-cell.none .n { color: #ff8a7a; }
.shot-cell:hover { border-color: #a89870; }

/* эффекты героя: значки под полосками и окно с подробностями */
.me-buffs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; cursor: pointer; min-height: 0; }
.me-buffs:empty { display: none; }
.bf { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; font-size: 13px; line-height: 1; border: 1px solid #6a5a3a; background: rgba(30, 26, 18, 0.85); color: #f0dfb8; flex: none; }
.bf.good { border-color: #8a7a4a; }
.bf.bad { border-color: #8a3a32; color: #ff9a8a; }
.bf-seal { color: #ffd36a; border-color: #c9a040; box-shadow: 0 0 5px rgba(255, 200, 80, 0.5); }
.bf-shot { color: #9ad0ff; }
.bf-set { color: #b8e090; }
.fxwin { position: absolute; left: 12px; top: 200px; width: 280px; padding: 10px 12px; pointer-events: auto; display: flex; flex-direction: column; gap: 8px; }
.fxwin.hidden { display: none; }
.fxwin-head { display: flex; align-items: center; justify-content: space-between; }
.fxwin-head b { font-family: var(--title); font-weight: 400; font-size: 19px; color: #e8d6ae; }
.fxwin-head .x { background: none; border: 0; color: #d6c9ae; font-size: 20px; cursor: pointer; padding: 0 4px; }
.fx-list { display: flex; flex-direction: column; gap: 8px; }
.fx-row { display: flex; gap: 8px; align-items: flex-start; }
.fx-row .bf { width: 26px; height: 26px; font-size: 16px; }
.fx-row b { display: block; color: #f0dfb8; font-weight: 600; font-size: 14px; }
.fx-row small { display: block; color: #cfc2a6; font-size: 12px; line-height: 1.35; }
.fx-row small.pos { color: #a8e090; }
.fx-row small.neg { color: #ff9a8a; }
.tr-have { color: #d8c48a; font-size: 13px; margin-left: 8px; white-space: nowrap; }
.tr-ad.has { color: #ffd36a; font-weight: 600; }

/* почта: конверт справа внизу — с цифрой и мигает, пока есть новые письма */
.mail-btn { position: relative; }
.mail-badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d8432f; color: #fff; font: 700 11px/17px var(--ui, sans-serif); text-align: center; box-shadow: 0 0 0 2px rgba(0,0,0,.5); }
.mail-btn.has-mail { color: #ffe08a; border-color: var(--gold); animation: mailBlink 1.2s ease-in-out infinite; }
@keyframes mailBlink { 0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,.45), 0 0 0 0 rgba(255,214,110,0); } 50% { box-shadow: 0 4px 14px rgba(0,0,0,.45), 0 0 14px 4px rgba(255,214,110,.55); } }
.mailwin { left: auto; right: 16px; }

/* полоса опыта вдоль всего низа экрана */
.xpline { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: rgba(8,6,4,.82); border-top: 1px solid rgba(217,181,107,.35); pointer-events: auto; overflow: hidden; z-index: 3; }
.xpline > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(#e6c06a, #9c7a2f); opacity: .85; transition: width .4s ease; }
.xpline > i::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0,0,0,.35) calc(10% - 1px) 10%); }
.xp-l, .xp-r { position: absolute; top: 0; line-height: 18px; font-size: 12px; color: #f3e6c4; text-shadow: 0 1px 2px #000, 0 0 3px #000; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp-l { left: 10px; }
.xp-r { right: 10px; display: flex; align-items: center; gap: 4px; }
.xp-r svg { width: 13px; height: 13px; }
.xp-r b { color: #ffe08a; font-weight: 700; }

/* Gear Score в окне персонажа */
.ch-gs { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.ch-gs b { color: #ffd77a; font-size: 16px; margin-left: 4px; font-variant-numeric: tabular-nums; }
/* рейтинг */
.ratingwin { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); }
.rt-me { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.rt-me b { color: #ffd77a; }
.rt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rt-table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; padding: 4px 6px; border-bottom: 1px solid rgba(217,181,107,.25); }
.rt-table td { padding: 4px 6px; border-bottom: 1px solid rgba(217,181,107,.08); font-variant-numeric: tabular-nums; }
.rt-table .num { text-align: right; }
.rt-table .rt-cls { color: var(--muted); font-size: 12px; }
.rt-table .pl { width: 28px; color: var(--muted); }
.rt-table .pl.top1 { color: #ffd34d; font-weight: 700; } .rt-table .pl.top2 { color: #d8dde4; font-weight: 700; } .rt-table .pl.top3 { color: #d8995a; font-weight: 700; }
.rt-table tr.rt-mine td { background: rgba(217,181,107,.12); color: #fff0c8; }
.rt-on { color: #7fe08a; font-size: 10px; }

/* счётчик кадров (Настройки → Графика) */
.fps-meter { position: fixed; top: 6px; left: 50%; transform: translateX(-50%); z-index: 40; pointer-events: none; font: 12px/1 var(--text); color: #d8f0c0; background: rgba(0,0,0,.45); padding: 4px 8px; border-radius: 4px; }

/* силы героя (дневная норма опыта) */
.fat-btn { position: relative; }
.fat-dot { position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: #6fcf5a; box-shadow: 0 0 0 2px rgba(0,0,0,.55); }
.fat-btn.st2 .fat-dot { background: #e8b13a; }
.fat-btn.st3 .fat-dot { background: #d8432f; }
.fatpop { width: min(320px, calc(100vw - 24px)); padding: 12px 14px; font-size: 12.5px; color: #cfc3aa; line-height: 1.5; }
.fatpop > b { font-family: var(--title); font-size: 17px; color: #f0dcae; font-weight: normal; }
.fat-state { margin: 4px 0 8px; font-weight: 600; color: #8fe08a; }
.fat-state.st2 { color: #f0c15a; }
.fat-state.st3 { color: #ff8a70; }
.fat-row { display: flex; justify-content: space-between; margin-top: 4px; }
.fat-row b { color: #f3e7c8; }
.fat-bar { height: 6px; background: rgba(0,0,0,.45); border-radius: 3px; overflow: hidden; margin: 3px 0 4px; }
.fat-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5fae4a, #9ee07a); }
.fat-bar.half i { background: linear-gradient(90deg, #c38f2a, #f0c15a); }
.fat-note { margin-top: 8px; font-size: 11.5px; color: #a99d86; }
.xp-fat { margin-left: 6px; font-weight: 700; }
.xp-fat.st2 { color: #f0c15a; }
.xp-fat.st3 { color: #ff8a70; }

/* почта: сколько штук из стопки, отправленные */
.mail-q { display: inline-flex; align-items: center; gap: 4px; }
.mail-q .nw-qty { width: 64px; }
.mail-sent { margin-top: 10px; }

/* ---------- Окно умений (K) ---------- */
.skillwin { left: auto; right: 16px; top: 50%; transform: translateY(-50%); width: min(500px, calc(100vw - 32px)); }
.sk-class { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.sk-class b { font-family: var(--title); font-weight: 400; font-size: 18px; color: #f0dfb8; }
.sk-chain { font-size: 12px; }
.sk-next { font-size: 12px; color: #c9b48a; }
.sk-next.ready { color: #ffd34d; }
.sk-body { height: 38vh; }   /* постоянная высота: окно не прыгает при смене вкладки */
.sk-group h4 { margin: 2px 0 6px; font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.sk-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-tile { position: relative; width: 46px; height: 46px; padding: 6px; border-radius: 5px; border: 1px solid rgba(217,181,107,.35); cursor: pointer;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--tint) 55%, #1a140c) 0%, #15110b 85%); color: #f6ead0; }
.sk-tile svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 1px #0009); }
.sk-tile:hover { border-color: var(--gold); }
.sk-tile.sel { border-color: #ffd34d; box-shadow: 0 0 0 1px #ffd34d, 0 0 8px rgba(255,211,77,.35); }
.sk-tile.off { filter: grayscale(.85) brightness(.6); }
.sk-tile.off.sel { filter: grayscale(.5) brightness(.8); }
.sk-lv { position: absolute; right: 2px; bottom: 1px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; font-variant-numeric: tabular-nums; }
.sk-lock { position: absolute; left: 0; right: 0; bottom: 1px; font-size: 10px; color: #f0dfb8; text-align: center; text-shadow: 0 0 3px #000; }
.sk-up { position: absolute; left: 2px; top: 0; font-size: 10px; color: #7dff7a; text-shadow: 0 0 3px #000; }
.sk-info { height: clamp(150px, 30vh, 250px); flex: none; overflow-y: auto; border-top: 1px solid rgba(217,181,107,.18); padding-top: 6px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.sk-title b { font-family: var(--title); font-weight: 400; font-size: 17px; color: #f0dfb8; }
.sk-title small { color: var(--muted); }
.sk-text { color: #d8ccb2; }
.sk-now { color: #e8dcc0; }
.sk-nextlv { color: #a8e08a; }
.sk-params { color: var(--muted); font-size: 12px; }
.sk-req { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.sk-req .ok { color: #8fe07a; }
.sk-req .no { color: #ff8a7a; }
.sk-max { color: #ffd34d; font-size: 12px; }
.sk-hint { color: var(--muted); font-size: 12px; }
.sk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.sk-learn { margin: 0; font-size: 16px; padding: 6px 14px; }
.sk-learn:disabled { opacity: .45; cursor: default; filter: grayscale(.6); }
/* эффекты умений: значок со временем */
.bf.sk { width: 22px; height: 22px; padding: 2px; position: relative; color: #f6ead0; }
.bf.sk svg { width: 100%; height: 100%; }
.bf.sk i { position: absolute; right: -2px; bottom: -3px; font-style: normal; font-size: 9px; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.tg-effs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.tg-effs:empty { display: none; }
/* питомец */
.petbar { position: fixed; left: 16px; z-index: 6; padding: 6px 8px; min-width: 170px; pointer-events: auto; font-size: 12px; }
.petbar .pb-name { color: #b8e090; font-family: var(--title); font-size: 15px; margin-bottom: 3px; }
.petbar .bar { height: 8px; }
.petbar .pb-btns { display: flex; gap: 4px; margin-top: 4px; }
.petbar .pb-btns button { flex: 1; background: rgba(30,26,18,.8); border: 1px solid var(--line); color: var(--ink); border-radius: 3px; padding: 2px 4px; font-size: 12px; cursor: pointer; }
.petbar .pb-btns button.on { border-color: var(--gold); color: #ffd98a; }
.lbl.pet .n { color: #b8e090; }
.qs.sk .ic { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--tint) 45%, transparent) 0%, transparent 75%); border-radius: 4px; }
.fl.pskill { color: #ffe6a8; font-size: 14px; font-weight: 700; font-style: italic; }
.fl.effb { color: #d88cff; font-size: 13px; font-weight: 700; }
.fl.effg { color: #a8f08a; font-size: 13px; font-weight: 700; }

/* задания на профессию */
.qtrack { display: flex; flex-direction: column; gap: 2px; width: 168px; margin: 8px auto 0; padding: 6px 8px; text-align: left; background: rgba(40, 30, 10, .55); border: 1px solid var(--gold-dim); border-radius: 4px; color: var(--ink); font: inherit; cursor: pointer; }
.qtrack b { font-size: 12px; color: #ffd98a; }
.qtrack span { font-size: 12px; line-height: 1.3; color: #e8dcc0; }
.qtrack:hover { border-color: var(--gold); }
.qtrack.hidden { display: none; }
.lbl.qlbl .qmark { display: none; font-family: var(--title); font-size: 26px; line-height: 22px; color: #ffd34d; text-shadow: 0 0 6px #000, 0 1px 2px #000; }
.lbl.qlbl.has-mark .qmark { display: block; }
.qdlg { width: min(460px, calc(100vw - 32px)); }
.qd-body { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.qd-body p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.qd-q { font-family: var(--title); font-size: 18px; color: #ffd98a; }
.qd-foot { display: flex; justify-content: flex-end; gap: 8px; }
.qd-foot .btn-main { margin: 0; font-size: 17px; padding: 7px 18px; }
.qd-profs { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.qd-profs > small { color: #b8ab90; }
.qd-prof { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.qd-prof:not(:disabled):hover { border-color: var(--gold); background: rgba(217, 181, 107, .12); }
.qd-prof:disabled { cursor: default; }
.qd-prof b { color: #f0dfb8; font-size: 15px; }
.qd-prof small { color: #b8ab90; }
.qjournal { width: min(420px, calc(100vw - 32px)); }
.qj-from { color: #b8ab90; }
.qj-steps, .qj-avail { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #a89c84; }
.qj-steps li.done { text-decoration: line-through; opacity: .65; }
.qj-steps li.now { color: #ffe7a0; font-weight: 700; }
.qj-avail { color: var(--ink); }
.qj-drop { align-self: flex-start; }

/* почта на полоске опыта, слева от адены */
.xp-adena { display: flex; align-items: center; gap: 4px; }
.xp-mail { position: relative; width: 22px; height: 18px; padding: 0; margin-right: 8px; background: none; border: none; color: #e9cf8f; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.xp-mail svg { width: 16px; height: 16px; }
.xp-mail:hover { color: #ffe08a; }
.xp-mail .mail-badge { top: -2px; right: -8px; min-width: 14px; height: 14px; font-size: 10px; line-height: 14px; }
.xp-mail.has-mail { animation: mailBlink 1.2s ease-in-out infinite; }

/* эффекты над головой: кружки с секундами */
.lbl .efx { display: flex; justify-content: center; gap: 3px; margin-bottom: 3px; }
.lbl .efx:empty { display: none; }
.ofx { position: relative; width: 22px; height: 22px; border-radius: 50%; padding: 3px; box-sizing: border-box; background: rgba(20, 16, 10, .85); border: 2px solid #7fa860; color: #f6ead0; box-shadow: 0 0 4px rgba(0,0,0,.7); }
.ofx.bad { border-color: #d0503e; color: #ffd0c4; }
.ofx svg { width: 100%; height: 100%; display: block; }
.ofx i { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font-style: normal; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 1px 1px #000; }
.lbl .efx .ofx { margin-bottom: 7px; }
/* свои эффекты — тоже кружками, крупнее */
.me-buffs .bf.sk { border-radius: 50%; width: 26px; height: 26px; padding: 3px; }
.me-buffs .bf.sk.bad { border-color: #d0503e; }
.me-buffs .bf.sk i { right: auto; left: 50%; transform: translateX(-50%); bottom: -10px; font-size: 10px; }

/* будущие умения и этапы */
.sk-group.future h4 { color: #a89c84; }
.sk-group.future h4 small { font-weight: 400; opacity: .8; margin-left: 4px; }
.sk-tile.future { filter: grayscale(.85) brightness(.7); }
.sk-tile.future .sk-lock { font-size: 9px; }
.sk-stages { margin-top: 6px; font-size: 12px; }
.sk-stages summary { cursor: pointer; color: #e9cf8f; }
.sk-stages table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.sk-stages td { padding: 2px 4px; border-top: 1px solid rgba(217,181,107,.15); color: #cfc3a8; vertical-align: top; }
.sk-stages td:first-child { color: #ffe08a; width: 22px; }
.sk-stages td:nth-child(2), .sk-stages td:nth-child(3) { white-space: nowrap; }
.sk-stages tr.got td { color: #9fd08a; }

.xpline { cursor: pointer; }

/* инвентарь в духе L2: тёмные плотные ячейки, вкладки, корзина, адена снизу */
.inv { width: min(820px, calc(100vw - 32px)); background: linear-gradient(rgba(22,18,13,.97), rgba(12,10,8,.97)); }
.inv-head h2 small { font-family: var(--ui, sans-serif); font-size: 14px; color: #b8ab90; margin-left: 6px; }
.inv-x { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--line); background: rgba(0,0,0,.4); color: #e9cf8f; font-size: 20px; line-height: 1; cursor: pointer; }
.inv-x:hover { border-color: var(--gold); color: #ffe08a; }
.inv-body { grid-template-columns: 246px 1fr; }
.inv-left { background: rgba(0,0,0,.35); border: 1px solid rgba(217,181,107,.18); border-radius: 4px; padding: 10px 6px; }
.paperdoll { grid-template-columns: repeat(3, 56px); grid-auto-rows: 56px; gap: 10px 18px;
  grid-template-areas: "ear1 helmet ear2" "neck top ring1" "weapon bottom shield" "gloves boots ring2" ". cloak ."; }
.paperdoll .islot { background: radial-gradient(rgba(60,48,30,.55), rgba(0,0,0,.6)); border-color: rgba(217,181,107,.35); }
.inv-tabs { display: flex; gap: 2px; border-bottom: 1px solid rgba(217,181,107,.3); margin-bottom: 6px; flex-wrap: wrap; }
.inv-tab { padding: 5px 10px; border: 1px solid rgba(217,181,107,.25); border-bottom: none; border-radius: 4px 4px 0 0; background: rgba(0,0,0,.35); color: #b8ab90; font: inherit; font-size: 13px; cursor: pointer; }
.inv-tab small { color: #8a7e66; }
.inv-tab.on { background: linear-gradient(#5a4526, #2c2114); color: #ffe7b0; border-color: var(--gold-dim); }
.inv-grid { grid-template-columns: repeat(auto-fill, 44px); grid-auto-rows: 44px; gap: 2px; padding: 6px; background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.18); border-radius: 3px; max-height: 360px; overflow-y: auto; }
.inv-grid .islot { border-radius: 2px; background: linear-gradient(rgba(40,34,26,.9), rgba(16,13,10,.95)); border-color: rgba(120,100,70,.5); }
.inv-grid .islot.empty { background: rgba(10,8,6,.6); border-color: rgba(80,66,46,.35); }
.inv-foot { align-items: center; justify-content: flex-start; }
.inv-tool { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(#3a2e1e, #1c160e); color: #e9cf8f; font-size: 17px; cursor: pointer; }
.inv-tool:hover, .inv-tool.on { border-color: var(--gold); color: #ffe08a; }
.inv-trash.drag-over { border-color: #d8432f; background: rgba(216,67,47,.25); }
.inv-foot .inv-hint { flex: 1; }
.inv-foot .inv-adena { padding: 4px 10px; border: 1px solid rgba(217,181,107,.3); border-radius: 4px; background: rgba(0,0,0,.45); font-size: 16px; }
.inv-foot .inv-adena b { color: #ffe08a; }

.wm-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 2px 0; font-size: 12px; color: #d6c9ae; }
.wm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wm-legend i { display: inline-block; width: 10px; height: 10px; }

/* ---------- сюжет: строка главы, подсветка кнопок, журнал ---------- */
.qtrack.story { cursor: pointer; background: rgba(20, 30, 44, .62); border-color: #5b7fa8; }
.qtrack.story b { color: #9fd0ff; }
.qtrack.story small { font-size: 11px; line-height: 1.3; color: var(--muted); }
.qt-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.qt-btn { font: inherit; font-size: 12px; padding: 3px 8px; border-radius: 3px; border: 1px solid var(--gold-dim); background: rgba(60, 45, 15, .85); color: #ffe2a0; cursor: pointer; }
.qt-btn.main { background: #7a5a18; border-color: var(--gold); color: #fff3d0; }
.qt-btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.qt-btn:hover { border-color: var(--gold); }
.hl-pulse { animation: hlPulse 1.3s ease-in-out infinite; position: relative; z-index: 5; }
@keyframes hlPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 211, 77, .0); } 50% { box-shadow: 0 0 0 4px rgba(255, 211, 77, .85), 0 0 18px 4px rgba(255, 211, 77, .55); } }
@media (prefers-reduced-motion: reduce) { .hl-pulse { animation: none; box-shadow: 0 0 0 3px rgba(255, 211, 77, .9); } }
.qj-chapters { margin: 0; padding-left: 20px; font-size: 14px; }
.qj-chapters li { color: var(--muted); }
.qj-chapters li.done { color: #8fbf7a; }
.qj-chapters li.now { color: #ffd98a; font-weight: bold; }
.qj-chapters small { color: var(--muted); font-weight: normal; }
.qj-scenes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qj-scenes small { color: var(--muted); width: 100%; }
.qj-scene { font-size: 13px; padding: 4px 10px; }
.qj-hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.lbl.comp .n { color: #9fd0ff; }

/* ---------- сюжетные сцены (client/scenes.js) ---------- */
body.cinema > :not(#view):not(#cinema) { visibility: hidden !important; }
#cinema { position: fixed; inset: 0; z-index: 900; pointer-events: auto; cursor: default; }
#cinema .cn-bar { position: absolute; left: 0; right: 0; height: 13vh; background: #000; }
#cinema .cn-bar.top { top: 0; } #cinema .cn-bar.bot { bottom: 0; }
#cinema .cn-fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
#cinema .cn-html { position: absolute; inset: 0; display: none; background: #050608; }
#cinema .cn-html.on { display: block; }
#cinema .cn-sub { position: absolute; left: 50%; bottom: 1.2vh; height: 10.6vh; display: flex; flex-direction: column; justify-content: center; transform: translateX(-50%); width: min(820px, calc(100vw - 32px)); text-align: center;
  font-size: clamp(14px, 2vw, 20px); line-height: 1.3; color: #f4ecd8; text-shadow: 0 2px 4px #000, 0 0 12px #000; z-index: 2; }
#cinema .cn-sub b { display: block; font-family: var(--title); font-size: .8em; font-weight: normal; color: #9fd0ff; letter-spacing: .04em; }
#cinema .cn-skip { position: absolute; right: 20px; top: 3.5vh; z-index: 3; font: inherit; font-size: 14px; padding: 6px 14px; color: #ddd; background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 3px; cursor: pointer; }
#cinema .cn-skip:hover { color: #fff; border-color: #fff; }
/* «реальные» кадры: новостная студия, шлем, загрузка */
.cn-real { position: absolute; inset: 13vh 0; overflow: hidden; animation: cnZoom 7s ease-out both; }
@keyframes cnZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.cn-real.news { background: radial-gradient(ellipse at 70% 40%, #1d3a5c 0%, #0b1626 55%, #05080d 100%); }
.cn-real.news::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 80px); }
.nw-logo { position: absolute; left: 4vw; top: 4vh; font-family: var(--title); font-size: clamp(14px, 1.6vw, 20px); color: #d8e6f5; letter-spacing: .12em; text-transform: uppercase; padding: 6px 12px; background: #b3261e; }
.nw-big { position: absolute; left: 4vw; top: 30%; font-family: var(--title); font-size: clamp(34px, 6vw, 84px); color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.nw-live { position: absolute; right: 4vw; top: 4.4vh; color: #ff5a4a; font-size: 14px; letter-spacing: .1em; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.nw-lower { position: absolute; left: 4vw; right: 4vw; bottom: 9vh; display: flex; align-items: stretch; font-size: clamp(14px, 1.6vw, 20px); }
.nw-lower b { background: #b3261e; color: #fff; padding: 8px 14px; font-weight: normal; text-transform: uppercase; letter-spacing: .06em; }
.nw-lower span { background: rgba(240, 240, 240, .92); color: #111; padding: 8px 14px; flex: 1; }
.nw-tick { position: absolute; left: 0; right: 0; bottom: 3vh; background: rgba(0,0,0,.6); color: #cfd8e3; font-size: 13px; white-space: nowrap; overflow: hidden; padding: 4px 0; }
.nw-tick span { display: inline-block; padding-left: 100%; animation: tick 18s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }
.cn-real.stats .st-row { position: absolute; left: 4vw; right: 4vw; top: 22%; display: flex; justify-content: space-around; gap: 2vw; text-align: center; }
.st-row div { display: flex; flex-direction: column; animation: rise .9s ease-out both; }
.st-row div:nth-child(2) { animation-delay: .5s; } .st-row div:nth-child(3) { animation-delay: 1s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.st-row b { font-family: var(--title); font-size: clamp(40px, 7vw, 96px); font-weight: normal; color: #fff; }
.st-row .dead b { color: #ff6b5e; } .st-row .in b { color: #9fd0ff; }
.st-row span { color: #c8d4e0; font-size: clamp(14px, 1.6vw, 20px); text-transform: uppercase; letter-spacing: .1em; }
.cn-real.helmet { background: radial-gradient(ellipse at 50% 60%, #26313e 0%, #0d1117 60%, #050608 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; }
.cn-real.helmet svg { width: min(46vw, 420px); filter: drop-shadow(0 0 24px rgba(111, 211, 255, .35)); }
.hl-cap { color: #6fd3ff; font-family: monospace; font-size: clamp(13px, 1.4vw, 17px); letter-spacing: .08em; }
.cn-real.boot { background: #000; display: flex; flex-direction: column; justify-content: center; padding-left: 14vw; font-family: monospace; font-size: clamp(16px, 2vw, 26px); color: #8fd0a0; animation: none; }
.cn-real.boot p { margin: .3em 0; opacity: 0; animation: bootIn .2s linear var(--d) forwards; }
.cn-real.boot p b { color: #59ff9a; font-weight: normal; }
.cn-real.boot p.exit b { color: #fff; text-shadow: 0 0 10px #59ff9a; }
@keyframes bootIn { to { opacity: 1; } }
.cn-real.title { background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fadeInSlow 2.2s ease-out both; }
@keyframes fadeInSlow { from { opacity: 0; } }
.tt-big { font-family: var(--title); font-size: clamp(40px, 7vw, 92px); color: #f0e2bd; letter-spacing: .06em; }
.tt-sub { font-family: var(--title); font-size: clamp(18px, 2.6vw, 32px); color: #9fd0ff; letter-spacing: .3em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .cn-real, .st-row div, .nw-tick span, .nw-live, .cn-real.title { animation: none; } .cn-real.boot p { animation-duration: 0s; } }

/* опыт за монстра над героем */
.fl.xp { color: #b9a3ff; font-size: 15px; }
/* группа: ассист и следование — маленькие кнопки справа от участника */
.pm { display: flex; gap: 4px; align-items: stretch; }
.pm-main { flex: 1; min-width: 0; }
.pm-btns { display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.pm-b { width: 20px; height: 18px; padding: 0; font-size: 12px; line-height: 16px; border-radius: 3px; border: 1px solid var(--line); background: rgba(30, 24, 14, .8); color: #e8dcc0; cursor: pointer; }
.pm-b:hover { border-color: var(--gold); color: #fff; }
.pm-b.on { background: #6a4f18; border-color: var(--gold); color: #fff3d0; }
.chat-log .sys.exp { color: #b9a3ff; }

/* ---------- Клан ---------- */
.xp-clan { position: absolute; left: 4px; top: 0; height: 18px; display: flex; align-items: center; gap: 3px; padding: 0 6px 0 2px; background: none; border: 0; border-right: 1px solid rgba(217,181,107,.3); color: #e9cf8f; cursor: pointer; font-size: 12px; z-index: 1; text-shadow: 0 1px 2px #000; }
.xp-clan svg { width: 15px; height: 15px; }
.xp-clan:hover { color: #fff3cf; }
.xp-l { left: 64px; }
.lbl .n .crest, .crest { width: 24px; height: 12px; image-rendering: pixelated; vertical-align: -1px; margin-right: 4px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0,0,0,.6); display: inline-block; }
.crest-none { background: repeating-linear-gradient(45deg, rgba(217,181,107,.15) 0 3px, transparent 3px 6px); }
.crest-none.big { width: 96px; height: 48px; display: block; border: 1px dashed rgba(217,181,107,.35); }
.lbl .n .war { font-style: normal; color: #ff6a5a; margin-right: 3px; text-shadow: 0 0 4px #000; }
.chat .ctab.hidden { display: none; }
.msg.ch-c .n { color: #8fe0ff; }
.msg.ch-c { color: #c9f0ff; }
.sys.clan { color: #8fe0ff; }
.clanwin, .clansearch { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 13; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; pointer-events: auto; max-height: calc(100vh - 24px); background: linear-gradient(rgba(26,20,14,.96), rgba(12,9,6,.96)); }
.clanwin { width: min(980px, calc(100vw - 24px)); height: min(640px, calc(100vh - 24px)); }
.clansearch { width: min(760px, calc(100vw - 24px)); }
.clanwin .nw-head h2, .clansearch .nw-head h2 { text-align: center; }
.clanwin .x, .clansearch .x { background: none; border: 0; color: #d6c9ae; font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px; }
.cl-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px 1fr; gap: 10px; }
.cl-side { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 12px; border: 1px solid rgba(217,181,107,.22); border-radius: 4px; background: radial-gradient(circle at 50% 18%, rgba(217,181,107,.12), transparent 60%), rgba(0,0,0,.3); overflow: auto; }
.cl-lvl { font-family: var(--title); font-size: 22px; color: #f0c860; }
.cl-name { font-family: var(--title); font-size: 22px; color: #f4e6c8; word-break: break-all; text-align: center; }
.cl-crest { background: rgba(0,0,0,.35); border: 1px solid rgba(217,181,107,.3); border-radius: 3px; padding: 4px; cursor: default; }
.cl-crest.can { cursor: pointer; } .cl-crest.can:hover { border-color: var(--gold); }
.cl-crest img { width: 96px; height: 48px; image-rendering: pixelated; display: block; }
.cl-leader { display: flex; align-items: center; gap: 6px; font-family: var(--title); font-size: 20px; color: #f0c860; padding: 2px 12px; border-top: 1px solid rgba(217,181,107,.25); border-bottom: 1px solid rgba(217,181,107,.25); }
.cl-leader svg { width: 26px; height: 26px; }
.cl-dl { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 4px 0; font-size: 13px; }
.cl-dl dt { color: var(--muted); } .cl-dl dd { margin: 0; color: #e8c97a; text-align: right; }
.cl-notice { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.cl-notice textarea { width: 100%; min-height: 84px; resize: vertical; background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.25); color: var(--ink); border-radius: 3px; padding: 6px; font: 13px var(--text); }
.cl-notice .btn-ghost, .cl-side > .btn-ghost { padding: 5px 10px; font-size: 13px; align-self: stretch; }
.btn-ghost.danger { border-color: rgba(255,90,74,.45); color: #ffb3a6; }
.cl-warn { color: #ffb3a6; font-size: 13px; text-align: center; }
.cl-right { display: flex; flex-direction: column; min-height: 0; gap: 6px; }
.cl-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.cl-tab { background: linear-gradient(rgba(60,46,30,.7), rgba(20,15,10,.8)); border: 1px solid rgba(217,181,107,.25); color: #cbbd9f; padding: 8px; cursor: pointer; font-size: 14px; border-radius: 3px 3px 0 0; }
.cl-tab.on { background: linear-gradient(rgba(120,92,52,.8), rgba(52,38,22,.85)); color: #fff1cf; border-color: rgba(217,181,107,.6); }
.cl-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-stab { background: rgba(0,0,0,.35); border: 1px solid rgba(217,181,107,.25); color: #cbbd9f; padding: 5px 12px; cursor: pointer; font-size: 13px; border-radius: 3px; }
.cl-stab.on { border-color: var(--gold); color: #fff1cf; background: rgba(217,181,107,.14); }
.cl-count { margin-left: auto; color: #e8c97a; font-size: 13px; }
.cl-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.cl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cl-table th { position: sticky; top: 0; background: linear-gradient(rgba(70,54,34,.95), rgba(40,30,18,.95)); color: #e8d6ae; font-weight: 400; padding: 5px 8px; text-align: left; border-bottom: 1px solid rgba(217,181,107,.35); }
.cl-table td { padding: 6px 8px; border-bottom: 1px solid rgba(217,181,107,.08); font-variant-numeric: tabular-nums; }
.cl-table td small { display: block; color: var(--muted); font-size: 11px; }
.cl-table .num { text-align: right; } .cl-table .act { text-align: center; width: 1%; white-space: nowrap; }
.cl-table tr.off td { color: #8a8070; } .cl-table tr.off td b { color: #9d927e; font-weight: 400; }
.cl-table tr.mine td { background: rgba(217,181,107,.1); }
.cl-table .btn-ghost { padding: 4px 9px; font-size: 12px; }
.cl-gear { background: none; border: 1px solid transparent; color: #e8c97a; font-size: 16px; cursor: pointer; border-radius: 3px; padding: 0 6px; }
.cl-gear:hover { border-color: rgba(217,181,107,.5); }
.cl-role { font-size: 12px; padding: 1px 6px; border-radius: 3px; border: 1px solid rgba(217,181,107,.3); color: #d6c9ae; }
.cl-role.r-leader { color: #f0c860; border-color: rgba(240,200,96,.6); } .cl-role.r-deputy { color: #ffd9a0; } .cl-role.r-pl { color: #a8f0a0; border-color: rgba(168,240,160,.4); }
.cl-war { font-size: 12px; color: #d6c9ae; } .cl-war.on { color: #ff6a5a; font-weight: 700; } .cl-war.them { color: #ffb070; }
.cl-note { color: var(--muted); font-size: 12px; line-height: 1.4; }
.cl-row { display: flex; gap: 8px; }
.cl-row .btn-main, .cl-mrow .btn-main, .cl-card .btn-main, .cs-foot .btn-main, .cl-app .btn-main, .cs-table .btn-main { font-size: 15px; padding: 5px 12px; margin: 0; }
.cl-daily { padding: 8px 10px; border: 1px solid rgba(217,181,107,.25); border-radius: 4px; background: rgba(0,0,0,.3); font-size: 13px; }
.cl-daily span { color: #f0c860; font-weight: 700; } .cl-daily.done { border-color: rgba(168,240,160,.45); } .cl-daily em { color: #a8f0a0; font-style: normal; }
.cl-don { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cl-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid rgba(217,181,107,.35); border-radius: 4px; background: linear-gradient(rgba(70,52,30,.55), rgba(18,13,8,.75)); }
.cl-card.t2 { background: linear-gradient(rgba(36,52,92,.6), rgba(12,14,26,.8)); border-color: rgba(140,170,255,.4); }
.cl-card h3 { margin: 0; text-align: center; font-family: var(--title); font-weight: 400; font-size: 21px; color: #f6e7c4; }
.cl-left { font-size: 12px; color: var(--muted); }
.cl-pic { height: 76px; background-repeat: no-repeat; background-position: center; background-size: contain; }
.cl-pic.p0 { background-image: radial-gradient(ellipse 36% 22% at 50% 78%, #8a6526 0 60%, transparent 62%), radial-gradient(circle at 42% 58%, #f3cd6a 0 9%, transparent 10%), radial-gradient(circle at 56% 52%, #e9bb4c 0 9%, transparent 10%), radial-gradient(circle at 50% 66%, #ffd877 0 10%, transparent 11%); }
.cl-pic.p1 { background-image: radial-gradient(ellipse 30% 34% at 50% 60%, #7b4d24 0 70%, transparent 72%), radial-gradient(circle at 50% 34%, #ffd877 0 12%, transparent 13%), radial-gradient(circle at 40% 40%, #e9bb4c 0 7%, transparent 8%), radial-gradient(circle at 60% 40%, #f3cd6a 0 7%, transparent 8%); }
.cl-pic.p2 { background-image: linear-gradient(transparent 40%, #6d3a17 40% 90%, transparent 90%), radial-gradient(ellipse 40% 22% at 50% 40%, #ffd877 0 70%, transparent 72%); background-size: 70% 100%, 100% 100%; }
.cl-rw-t { font-size: 12px; color: #e8d6ae; border-top: 1px solid rgba(217,181,107,.2); padding-top: 4px; }
.cl-rw { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.cl-rw li { display: flex; justify-content: space-between; gap: 6px; } .cl-rw span { color: #d6c9ae; } .cl-rw b { color: #f0c860; }
.cl-price { display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: #f4e6c8; border-top: 1px solid rgba(217,181,107,.2); padding-top: 4px; }
.cl-price small { color: #7fc4ff; } .cl-price small.short { color: #ff8a7a; }
.cl-card .btn-main:disabled { cursor: not-allowed; }
.cl-skills { display: flex; flex-direction: column; gap: 4px; }
.cl-skill { display: grid; grid-template-columns: 34px 1fr 1fr; align-items: center; gap: 10px; padding: 5px 8px; border-bottom: 1px solid rgba(217,181,107,.1); opacity: .5; font-size: 13px; }
.cl-skill.on { opacity: 1; }
.cl-skill b { display: block; color: #f4e6c8; font-weight: 600; } .cl-skill small { color: var(--muted); font-size: 11px; }
.cl-skill span { color: #d6c9ae; }
.cl-sk-ic { width: 32px; height: 32px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; color: #2a1a06; background: linear-gradient(#f0c860, #9c7a2f); border: 1px solid #ffe7a0; }
.cl-skill:not(.on) .cl-sk-ic { background: #3a3228; color: #8a8070; border-color: #5a5040; }
.cl-exp { position: relative; height: 18px; border: 1px solid rgba(217,181,107,.35); background: rgba(0,0,0,.5); border-radius: 2px; overflow: hidden; }
.cl-exp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#7a5cff, #3b2a9a); transition: width .4s; }
.cl-exp span { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 16px; color: #f4ecff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.cl-foot, .cs-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cl-foot .btn-ghost, .cs-foot .btn-ghost { padding: 6px 14px; font-size: 13px; }
.cl-badge { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: #c0392b; color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
.cs-sp { flex: 1; }
.cl-modal { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 2; border-radius: 6px; }
.cl-mbox { width: min(420px, 92%); max-height: 90%; overflow: auto; background: linear-gradient(rgba(40,30,20,.98), rgba(16,12,8,.98)); border: 1px solid var(--line); border-radius: 5px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.cl-mbox h3 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 20px; color: #f0dfb8; }
.cl-mbox p { margin: 0; line-height: 1.4; }
.cl-mbox input[type=text], .cl-mbox select, .cs-filter input, .cs-filter select { background: rgba(0,0,0,.45); color: var(--ink); border: 1px solid rgba(217,181,107,.35); border-radius: 3px; padding: 6px 8px; font: 14px var(--text); }
.cl-mrow { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cl-mlist { display: flex; flex-direction: column; gap: 4px; }
.cl-mlist .btn-ghost { text-align: left; }
.cl-fld { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.cl-apps { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow: auto; }
.cl-app { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(217,181,107,.1); }
.cl-app > div { flex: 1; } .cl-app small { display: block; color: var(--muted); font-size: 11px; }
.cl-app .btn-ghost { padding: 4px 9px; font-size: 12px; }
.cr-now { display: flex; justify-content: center; } .cr-now img { width: 96px; height: 48px; image-rendering: pixelated; border: 1px solid rgba(217,181,107,.35); }
.cr-file { cursor: pointer; padding: 6px 12px; font-size: 13px; }
.cr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; justify-items: center; }
.cr-grid button { background: none; border: 1px solid transparent; padding: 3px; cursor: pointer; border-radius: 3px; }
.cr-grid button:hover { border-color: var(--gold); }
.cr-grid img { width: 48px; height: 24px; image-rendering: pixelated; display: block; }
.cs-filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: #e8d6ae; }
.cs-filter input { flex: 1; min-width: 120px; }
.cs-filter .btn-ghost { padding: 6px 14px; }
.cs-table-wrap { overflow: auto; min-height: 200px; max-height: 52vh; border: 1px solid rgba(217,181,107,.2); border-radius: 3px; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cs-table th { position: sticky; top: 0; background: linear-gradient(rgba(70,54,34,.95), rgba(40,30,18,.95)); color: #e8d6ae; font-weight: 400; padding: 6px 8px; text-align: left; border-bottom: 1px solid rgba(217,181,107,.35); }
.cs-table td { padding: 5px 8px; border-bottom: 1px solid rgba(217,181,107,.08); white-space: nowrap; }
.cs-table .num { text-align: right; } .cs-table .act { text-align: right; }
.cs-table tr.mine td { background: rgba(217,181,107,.1); }
.cs-table .btn-ghost { padding: 4px 9px; font-size: 12px; }
.cs-mine { color: #f0c860; font-size: 12px; } .cs-full { color: var(--muted); font-size: 12px; }
.cs-pages { display: flex; justify-content: center; gap: 4px; }
.cs-pages button { background: none; border: 1px solid rgba(217,181,107,.25); color: #d6c9ae; min-width: 26px; padding: 2px 6px; cursor: pointer; border-radius: 3px; }
.cs-pages button.on { border-color: var(--gold); color: #fff1cf; }
@media (max-width: 760px) { .cl-main { grid-template-columns: 1fr; } .cl-don { grid-template-columns: 1fr; } .clanwin { height: calc(100vh - 24px); } }
/* грейд вещи — рамкой ячейки (цвет ячейки задаётся грейдом) */
.islot[style*="color"] { border-color: color-mix(in srgb, currentColor 75%, transparent); }
.lbl .n .aggr { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: #ff9b8a; text-shadow: 0 1px 2px #000; }

/* ---------- рыбалка ---------- */
.fish-prompt { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 9px 16px; background: rgba(12, 30, 40, .88); border: 1px solid #4fb6d8; border-radius: 22px; color: #dff4ff; font: 600 15px system-ui, sans-serif; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.fish-prompt:hover:not(:disabled) { background: rgba(20, 52, 68, .95); }
.fish-prompt:disabled { border-color: #5a6a72; color: #a8b6bd; cursor: default; }
.fish-prompt span { width: 20px; height: 20px; color: #6fd0f0; display: inline-flex; }
.fish-prompt kbd, .fw-btns kbd { font: 700 12px system-ui, sans-serif; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 4px; padding: 1px 6px; }
.fish-win { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 5; width: 340px; padding: 10px 12px 12px; background: rgba(10, 22, 30, .93); border: 1px solid #3f89a6; border-radius: 8px; color: #e6f3f8; font: 14px system-ui, sans-serif; box-shadow: 0 8px 26px rgba(0,0,0,.6); }
.fw-head { display: flex; align-items: center; gap: 8px; }
.fw-head b { font-family: var(--title); font-size: 18px; font-weight: 400; color: #f0e2c0; }
.fw-ico { width: 20px; height: 20px; color: #6fd0f0; display: inline-flex; }
.fw-lvl { margin-left: auto; font-size: 12px; color: #9fd0e6; }
.fw-x { background: none; border: 0; color: #9fb4c0; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.fw-x:hover { color: #fff; }
.fw-state { margin: 8px 0 6px; min-height: 20px; text-align: center; font-weight: 700; font-size: 15px; color: #bcd6e2; }
.fish-win.pull .fw-state { color: #ff9a7a; }
.fish-win.rest .fw-state { color: #8fe0a8; }
.fw-bar { position: relative; height: 14px; background: rgba(255,255,255,.08); border-radius: 7px; overflow: hidden; margin-bottom: 5px; }
.fw-bar i { display: block; height: 100%; width: 100%; transition: width .2s; }
.fw-bar.hp i { background: linear-gradient(#58c2e8, #2b7fa8); }
.fw-bar.tm { height: 5px; } .fw-bar.tm i { background: #e0b24a; transition: none; }
.fw-bar span { position: absolute; inset: 0; text-align: center; font-size: 10px; line-height: 14px; color: #fff; text-shadow: 0 1px 2px #000; }
.fw-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.fw-btns button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.2); border-radius: 6px; color: #e6f3f8; font: 700 15px system-ui, sans-serif; cursor: pointer; }
.fw-btns button small { font-weight: 400; font-size: 11px; color: #9fb4c0; }
.fw-btns button:disabled { opacity: .45; cursor: default; }
.fish-win.pull #fwPump { border-color: #ff9a7a; background: rgba(255, 120, 80, .22); }
.fish-win.rest #fwReel { border-color: #8fe0a8; background: rgba(90, 200, 130, .2); }
.fw-xp { position: relative; height: 12px; margin-top: 9px; background: rgba(255,255,255,.07); border-radius: 6px; overflow: hidden; }
.fw-xp i { display: block; height: 100%; background: #3f89a6; }
.fw-xp span { position: absolute; inset: 0; text-align: center; font-size: 10px; line-height: 12px; color: #dfeef5; }
.fish-win.good { animation: fwGood .3s; } .fish-win.bad { animation: fwBad .3s; } .fish-win.bite { animation: fwBite .5s; }
@keyframes fwGood { 50% { box-shadow: 0 0 0 3px rgba(110, 220, 150, .7); } }
@keyframes fwBad { 25% { transform: translateX(calc(-50% - 5px)); } 75% { transform: translateX(calc(-50% + 5px)); } 50% { box-shadow: 0 0 0 3px rgba(255, 110, 90, .7); } }
@keyframes fwBite { 30% { transform: translateX(-50%) scale(1.05); } }
body.cinema .fish-prompt, body.cinema .fish-win { display: none; }
@media (prefers-reduced-motion: reduce) { .fish-win.good, .fish-win.bad, .fish-win.bite { animation: none; } }
.qtrack.fish-q { margin-top: 6px; border-color: #3f89a6; }
.qtrack.fish-q b { color: #8fd8f2; }
.qtrack.fish-q small { font-size: 11px; line-height: 1.3; color: #a9bcc4; }
.ch-bar { position: relative; height: 14px; margin: 4px 0 6px; background: rgba(255,255,255,.07); border-radius: 7px; overflow: hidden; }
.ch-bar i { display: block; height: 100%; background: linear-gradient(#58c2e8, #2b7fa8); }
.ch-bar span { position: absolute; inset: 0; text-align: center; font-size: 10px; line-height: 14px; color: #fff; text-shadow: 0 1px 2px #000; }

/* ---------- фракции ---------- */
.facwin { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(900px, calc(100vw - 32px)); }
.side-col #factionBtn { position: relative; }
.fac-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #c8402f; color: #fff; font: 700 11px/17px system-ui, sans-serif; text-align: center; }
.fac-top { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 8px 12px; border: 1px solid rgba(217,181,107,.22); border-radius: 4px; background: rgba(0,0,0,.3); }
.fac-topcell { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #9a8f7a; }
.fac-topcell b { font-size: 14px; color: #e8dcc0; font-weight: 600; }
.fac-topcell b.ok { color: #8fd06a; } .fac-topcell b.gold { color: #ffd34d; }
.fac-body { display: flex; flex-direction: column; gap: 8px; }
.fac-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid rgba(217,181,107,.2); border-left: 3px solid transparent; border-radius: 4px; background: rgba(0,0,0,.28); }
.fac-row.on { border-color: rgba(217,181,107,.55); border-left-color: var(--fc); background: rgba(40,30,14,.42); }
.fac-crest { flex: 0 0 76px; height: 76px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(217,181,107,.25); border-radius: 4px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.07), rgba(0,0,0,.4)); color: var(--fc); }
.fac-crest svg { width: 54px; height: 54px; }
.fac-info { flex: 0 0 168px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.fac-info h3 { margin: 0; font-family: var(--title); font-size: 17px; color: #f0e2bd; font-weight: 400; }
.fac-pick { padding: 4px 18px; font-size: 13px; }
.fac-on { padding: 4px 12px; border: 1px solid var(--fc); border-radius: 12px; font-size: 12px; color: var(--fc); }
.fac-exp { font-size: 13px; color: #9a8f7a; } .fac-exp b { color: #ffd98a; font-weight: 600; } .fac-exp em { color: #8fd06a; font-style: normal; }
.fac-got { font-size: 12px; color: #857b68; }
.fac-track { flex: 1 1 auto; min-width: 0; position: relative; padding-left: 12px; border-left: 1px solid rgba(217,181,107,.15); }
.fac-nodes { display: flex; position: relative; }
.fac-node { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.fac-slot { width: 42px; height: 42px; color: #cdbf9f; cursor: default; }
.fac-node.can .fac-slot { cursor: pointer; border-color: #ffd34d; box-shadow: 0 0 10px rgba(255,211,77,.55); animation: facPulse 1.4s ease-in-out infinite; }
.fac-node.got .fac-slot { opacity: .55; }
.fac-check { position: absolute; right: -6px; top: -6px; width: 16px; height: 16px; border-radius: 50%; background: #4f9a3c; color: #fff; font: 700 11px/16px system-ui, sans-serif; text-align: center; }
.fac-line { position: absolute; left: 12px; right: 0; top: 52px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.12); }
.fac-line i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #a57f3c, #ffd98a); }
.fac-dot { position: relative; width: 9px; height: 9px; transform: rotate(45deg); background: #2a241b; border: 1px solid #7d705a; }
.fac-node.got .fac-dot, .fac-node.can .fac-dot { background: #ffd98a; border-color: #ffd98a; }
.fac-at { font-size: 11px; color: #857b68; white-space: nowrap; }
.fac-node.got .fac-at { color: #8fd06a; } .fac-node.can .fac-at { color: #ffd34d; font-weight: 600; }
.fac-motto { margin-top: 6px; font-size: 12px; color: #857b68; font-style: italic; }
@keyframes facPulse { 50% { box-shadow: 0 0 16px rgba(255,211,77,.9); } }
@media (max-width: 760px) { .fac-row { flex-wrap: wrap; } .fac-track { flex-basis: 100%; border-left: 0; padding-left: 0; } .fac-line { left: 0; } }
@media (prefers-reduced-motion: reduce) { .fac-node.can .fac-slot { animation: none; } }

/* ---------- что нового (после обновления) ---------- */
.whatsnew { position: fixed; left: 12px; top: 132px; z-index: 11; width: min(340px, calc(100vw - 24px)); max-height: min(46vh, 420px); display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; pointer-events: auto; border-color: rgba(255,211,77,.6); background: rgba(14, 11, 8, .9); }
body:not(.in-game) .whatsnew { display: none; }
.wn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wn-head b { font-family: var(--title); font-size: 16px; font-weight: 400; color: #ffd98a; }
.wn-min { background: none; border: 0; color: #e9cf8f; font-size: 14px; cursor: pointer; padding: 2px 6px; }
.wn-body { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.wn-name { font-size: 14px; font-weight: 600; color: #f0e2bd; }
.wn-date { font-size: 11px; color: #857b68; }
.wn-item ul { margin: 4px 0 0; padding-left: 16px; font-size: 13px; line-height: 1.4; color: #d6c9ae; }
.wn-item li + li { margin-top: 3px; }
.wn-foot { display: flex; justify-content: flex-end; }
.wn-foot .btn-ghost { padding: 5px 16px; font-size: 13px; }
.whatsnew.min .wn-body, .whatsnew.min .wn-foot { display: none; }
.whatsnew.min { width: auto; }

/* ---------- сайт в виде лаунчера: наши цвета (тёмное дерево и золото) ---------- */
#login.site { --s-bg: #0d0b08; --s-panel: #17130e; --s-panel2: #1e1912; --s-line: rgba(217,181,107,.16); --s-line2: rgba(217,181,107,.32);
  background: var(--s-bg); padding: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; overflow: hidden; }
.site-nav { flex: 0 0 auto; display: flex; align-items: center; gap: 6px 22px; padding: 0 76px 0 22px; height: 56px; background: #110e0a; border-bottom: 1px solid var(--s-line); }
.site-menu { display: flex; gap: 2px; }
.site-menu button { position: relative; background: none; border: 0; color: #b9ad94; font-size: 15px; padding: 8px 12px; cursor: pointer; border-radius: 4px; }
.site-menu button:hover { color: #f0dfb8; background: rgba(217,181,107,.06); }
.site-menu button.on { color: #f0dfb8; }
.site-menu button.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -9px; height: 2px; background: var(--gold); }
.site-social { display: flex; gap: 4px; flex: 1 1 auto; }
.site-social a { display: inline-flex; align-items: center; gap: 7px; color: #b9ad94; text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 4px; }
.site-social a:hover { color: #f0dfb8; background: rgba(217,181,107,.06); }
.site-social svg { width: 16px; height: 16px; }
.site-acc { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px 0 5px; border: 1px solid var(--s-line2); background: var(--s-panel2); color: #f0dfb8; border-radius: 4px; cursor: pointer; font-family: var(--title); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.site-acc:hover, .site-acc.on { border-color: var(--gold); }
.site-acc .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(160deg, #e6c07a, #8a6a34); color: #2a1e0e; display: flex; align-items: center; justify-content: center; }
.site-acc .av svg { width: 17px; height: 17px; }
.site-menu button:focus-visible, .site-acc:focus-visible, .site-social a:focus-visible, .hm-link:focus-visible, .nc:focus-visible, .sb-play:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.site-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4a3d28 transparent; }
.site-page { padding: 24px 28px 28px; display: flex; justify-content: center; }
.site-page-wiki { padding: 0; height: 100%; }
/* главная */
.hm { width: min(1280px, 100%); display: flex; flex-direction: column; gap: 18px; }
.hm-banner { position: relative; min-height: 250px; border-radius: 4px; overflow: hidden; border: 1px solid var(--s-line); background: #1a140d url(/textures/site/banner.jpg) center 40% / cover no-repeat; display: flex; align-items: center; }
.hm-banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,11,8,.94) 0%, rgba(13,11,8,.78) 34%, rgba(13,11,8,.15) 70%, rgba(13,11,8,0) 100%); }
.hm-b-text { position: relative; padding: 30px 34px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hm-status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid rgba(143,208,106,.55); background: rgba(40,60,26,.45); color: #a6e07e; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; border-radius: 3px; }
.hm-status i { width: 8px; height: 8px; border-radius: 50%; background: #8fd06a; box-shadow: 0 0 8px #8fd06a; }
.hm-status.off { border-color: rgba(255,138,122,.5); background: rgba(70,24,18,.45); color: #ff9c8c; } .hm-status.off i { background: #ff7a6a; box-shadow: none; }
.hm-banner h1 { margin: 8px 0 0; font-family: var(--title); font-weight: 400; font-size: clamp(38px, 5vw, 58px); line-height: 1; color: #f3e6c8; text-shadow: 0 2px 16px rgba(0,0,0,.7); }
.hm-sub { margin: 0 0 14px; color: #d6c9ae; font-size: 15px; }
.hm-facts { display: flex; flex-wrap: wrap; }
.hm-facts > div { display: flex; flex-direction: column; gap: 4px; padding: 0 22px; border-left: 1px solid rgba(217,181,107,.22); }
.hm-facts > div:first-child { padding-left: 0; border-left: 0; }
.hm-facts span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #9a8f7a; }
.hm-facts b { font-size: 15px; color: #f0e2c2; font-weight: 700; }
.hm-up { font-family: var(--title); font-size: 22px !important; font-weight: 400 !important; letter-spacing: .02em; }
.hm-up small { font-family: var(--text); font-size: 11px; color: #9a8f7a; margin: 0 6px 0 2px; }
.hm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.hm-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nc { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--s-line); background: var(--s-panel); border-radius: 4px; overflow: hidden; cursor: pointer; color: inherit; transition: border-color .15s, transform .15s; }
.nc:hover { border-color: var(--gold); transform: translateY(-2px); }
.nc-pic { position: relative; height: 150px; background: #1a140d center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.nc-pic::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(23,19,14,.25), rgba(23,19,14,.85) 80%); }
.nc-ic { position: relative; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #ffd98a; background: radial-gradient(circle, rgba(60,44,18,.85), rgba(23,19,14,.6)); border: 1px solid rgba(217,181,107,.5); box-shadow: 0 0 24px rgba(255,200,100,.25); }
.nc-ic svg { width: 32px; height: 32px; }
.nc-meta { display: flex; justify-content: space-between; padding: 10px 14px 0; font-size: 12px; color: #c9a14a; } .nc-meta span + span { color: #857b68; }
.nc b { padding: 3px 14px 14px; font-size: 16px; font-weight: 600; color: #f0e2c2; line-height: 1.3; }
.hm-side { display: flex; flex-direction: column; padding: 14px 16px 16px; border: 1px solid var(--s-line); background: var(--s-panel); border-radius: 4px; }
.hm-side-h { font-size: 12px; color: #857b68; margin: 14px 0 6px; } .hm-side-h:first-child { margin-top: 0; }
.hm-link { display: flex; align-items: center; gap: 12px; padding: 11px 2px; background: none; border: 0; border-bottom: 1px solid var(--s-line); color: #e8dcc0; font-size: 15px; cursor: pointer; text-align: left; }
.hm-link:hover { color: #ffd98a; } .hm-link svg { width: 18px; height: 18px; color: #c9b98f; } .hm-link span { flex: 1; } .hm-link em { font-style: normal; color: #857b68; font-size: 18px; }
.hm-social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
a.hm-soc { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1px solid var(--s-line2); color: #e8dcc0; text-decoration: none; border-radius: 3px; font-size: 14px; }
a.hm-soc:hover { border-color: var(--gold); color: #ffd98a; } a.hm-soc svg { width: 16px; height: 16px; }
.hm-muted { color: #857b68; font-size: 13px; }
.hm-side .top-list { margin: 0; } .hm-side .world-state { margin: 10px 0 0; padding-top: 10px; }
.hm-acc { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; padding: 12px; }
.hm-acc svg { width: 18px; height: 18px; }
/* аккаунт */
.acc-wrap { width: min(640px, 100%); }
.acc-wrap .auth, .acc-wrap .cab { background: var(--s-panel); border-color: var(--s-line2); max-height: none; }
/* нижняя полоса */
.site-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 22px; padding: 10px 14px 10px 22px; background: #110e0a; border-top: 1px solid var(--s-line); }
.sb-server, .sb-ver { display: flex; flex-direction: column; gap: 3px; }
.sb-server { padding-right: 22px; border-right: 1px solid var(--s-line); }
.sb-server span, .sb-ver span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #857b68; }
.sb-server b, .sb-ver b { font-size: 15px; color: #f0e2c2; display: flex; align-items: center; gap: 7px; }
.sb-dot { width: 8px; height: 8px; border-radius: 50%; background: #8fd06a; box-shadow: 0 0 6px #8fd06a; } .sb-dot.off { background: #ff7a6a; box-shadow: none; }
.sb-state { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sb-state b { font-size: 15px; color: #f0e2c2; }
.sb-state span { font-size: 12px; color: #857b68; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-line { height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; } .sb-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a57f3c, #e6c07a); transition: width .5s; }
.sb-play { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 220px; height: 54px; padding: 0 28px; border: 0; border-radius: 3px; background: linear-gradient(180deg, #ecca85, #c9a050); color: #2a1e0e; font-family: var(--title); font-size: 22px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; box-shadow: 0 0 0 1px rgba(255,230,170,.35) inset, 0 6px 18px rgba(0,0,0,.4); }
.sb-play:hover { filter: brightness(1.08); } .sb-play svg { width: 18px; height: 18px; }
/* о сервере, обновления, магазин */
.site-wrap { width: min(900px, 100%); padding: 24px 28px 28px; background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 4px; }
.site-wrap.wide { width: min(1180px, 100%); }
.site-h { margin: 0 0 12px; font-family: var(--title); font-weight: 400; font-size: 32px; color: #f0e2bd; }
.site-wrap h3 { margin: 22px 0 8px; font-family: var(--title); font-weight: 400; font-size: 22px; color: #e8d6ae; }
.ab-lead { margin: 0 0 16px; font-size: 16px; line-height: 1.55; color: #e0d4b8; }
.ab-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.ab-fact { padding: 12px 14px; border: 1px solid var(--s-line); border-radius: 3px; background: var(--s-panel2); display: flex; flex-direction: column; gap: 2px; }
.ab-fact b { font-family: var(--title); font-weight: 400; font-size: 28px; color: #ffd98a; } .ab-fact span { font-size: 12px; color: #9a8f7a; }
.ab-list { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.55; color: #d6c9ae; } .ab-list li + li { margin-top: 6px; } .ab-list b { color: #f0e2c2; }
.ab-social { display: flex; flex-wrap: wrap; gap: 8px; } .ab-social a { padding: 10px 16px; }
.nf { padding: 14px 0 14px 16px; border-left: 2px solid rgba(217,181,107,.35); margin-bottom: 6px; transition: background .4s; }
.nf.hl { background: rgba(217,181,107,.1); }
.nf-date { font-size: 12px; color: #9a8f7a; } .nf h3 { margin: 2px 0 6px !important; font-size: 20px !important; }
.nf ul { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.5; color: #d6c9ae; } .nf li + li { margin-top: 4px; }
#newsFull { max-height: none; }
@media (max-width: 980px) { .hm-grid { grid-template-columns: 1fr; } .site-social span { display: none; } }
@media (max-width: 680px) { .hm-news { grid-template-columns: 1fr; } .site-nav { height: auto; flex-wrap: wrap; padding: 8px 64px 8px 12px; } .site-page { padding: 14px; }
  .hm-facts > div { padding: 0 12px 8px 0; border: 0; } .sb-ver, .sb-server { display: none; } .sb-play { min-width: 0; padding: 0 18px; font-size: 18px; } }
/* магазин внешнего вида */
.shop-top .site-h { margin: 0; }
.shop-note a.shop-donate { color: #ffd98a; font-weight: 600; margin-left: 4px; }
.shop-note { font-size: 13.5px; line-height: 1.5; color: #b9ad94; margin-bottom: 6px; }
.shop-hero { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: #e0d4b8; }
.shop-hero select { background: rgba(0,0,0,.5); color: #f0e2c2; border: 1px solid rgba(217,181,107,.4); border-radius: 4px; padding: 4px 8px; font-size: 14px; }
.shop-msg { min-height: 20px; font-size: 14px; } .shop-msg.ok { color: #8fd06a; } .shop-msg.bad { color: #ff8a7a; }
.shop-h { margin: 18px 0 2px !important; }
.shop-hint { font-size: 12.5px; color: #9a8f7a; margin-bottom: 8px; }
.shop-pic { width: 64px; height: 64px; align-self: center; }
.shop-pic svg { width: 100%; height: 100%; }
.shop-item.has { border-color: rgba(143,208,106,.4); }
.shop-item.on { border-color: #ffd34d; background: rgba(60,44,14,.4); }
.shop-item .price { font-size: 14px; color: #ffd98a; display: flex; align-items: center; gap: 6px; }
.shop-item.has .price { color: #8fd06a; }
.shop-sure { padding: 8px 10px; font-size: 14px; margin: 0; }
.lbl .n .ct { display: block; font-style: normal; font-weight: 600; font-size: 11px; letter-spacing: .04em; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
/* ---------- вики: база знаний ---------- */
.wiki { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr); width: 100%; height: 100%; min-height: 0; }
.wk-side { border-right: 1px solid var(--s-line); background: #110e0a; overflow-y: auto; padding: 18px 0; scrollbar-width: thin; }
.wk-side-h { padding: 0 22px 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #857b68; }
.wk-nav { display: flex; flex-direction: column; }
.wk-n { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid transparent; color: #d6c9ae; font-size: 15px; padding: 9px 18px 9px 22px; cursor: pointer; }
.wk-n i { font-style: normal; font-size: 10px; color: #857b68; } .wk-n em { margin-left: auto; font-style: normal; color: #857b68; font-size: 17px; transition: transform .15s; } .wk-n em.open { transform: rotate(90deg); }
.wk-n:hover { color: #ffd98a; background: rgba(217,181,107,.05); }
.wk-n.on { color: #ffd98a; border-left-color: var(--gold); background: rgba(217,181,107,.08); } .wk-n.in { color: #f0e2c2; }
.wk-n.top { margin-bottom: 8px; }
.wk-nsub { display: flex; flex-direction: column; padding: 2px 0 6px; } .wk-n.sub { padding: 6px 18px 6px 46px; font-size: 14px; color: #b9ad94; }
.wk-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wk-search { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 16px 32px; border-bottom: 1px solid var(--s-line); }
.wk-search span { position: absolute; margin-left: 14px; color: #857b68; font-size: 18px; pointer-events: none; }
.wk-search input { flex: 0 1 620px; min-width: 0; height: 42px; padding: 0 14px 0 38px; background: var(--s-panel); border: 1px solid var(--s-line2); color: #f0e2c2; border-radius: 3px; font-size: 15px; font-family: var(--text); outline: none; }
.wk-search input:focus { border-color: var(--gold); }
.wk-search button { height: 42px; padding: 0 30px; border: 0; border-radius: 3px; background: linear-gradient(180deg, #ecca85, #c9a050); color: #2a1e0e; font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.wk-scrollarea { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 32px 32px; scrollbar-width: thin; scrollbar-color: #4a3d28 transparent; }
.wk-crumbs { font-size: 13px; color: #857b68; margin-bottom: 8px; } .wk-crumbs a { color: #b9ad94; text-decoration: none; } .wk-crumbs a:hover { color: #ffd98a; } .wk-crumbs i { font-style: normal; margin: 0 8px; } .wk-crumbs span { color: #e0d4b8; }
.wk-body { max-width: 1100px; font-size: 15px; line-height: 1.55; color: #d6c9ae; }
.wk-body h1 { margin: 0 0 10px; font-family: var(--title); font-weight: 400; font-size: 34px; color: #f3e6c8; }
.wk-body h2 { margin: 24px 0 8px; font-family: var(--title); font-weight: 400; font-size: 25px; color: #e8d6ae; }
.wk-body h3 { margin: 18px 0 6px; font-family: var(--title); font-weight: 400; font-size: 20px; color: #e8d6ae; }
.wk-body p { margin: 6px 0 12px; } .wk-body b { color: #f0e2c2; } .wk-body a { color: #ffd98a; }
.wk-muted { color: #9a8f7a; font-weight: 400; font-size: .92em; }
.wk-scroll { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--s-line); border-radius: 3px; background: var(--s-panel); }
.wk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wk-table th { text-align: left; padding: 9px 12px; color: #9a8f7a; font-weight: 600; font-size: 12px; letter-spacing: .04em; border-bottom: 1px solid var(--s-line2); white-space: nowrap; background: var(--s-panel2); }
.wk-table td { padding: 7px 12px; border-bottom: 1px solid rgba(217,181,107,.08); vertical-align: top; }
.wk-table tr:last-child td { border-bottom: 0; } .wk-table tbody tr:hover td { background: rgba(217,181,107,.04); }
.wk-table.num td:not(:first-child), .wk-table.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.wk-steps { margin: 6px 0 12px; padding-left: 22px; } .wk-steps li + li { margin-top: 6px; }
/* плитки */
.wk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 12px 0 8px; }
.wk-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--s-line); background: var(--s-panel); border-radius: 3px; overflow: hidden; cursor: pointer; color: inherit; transition: border-color .15s, transform .15s; }
.wk-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.wk-card-pic { position: relative; height: 128px; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 60%, #3a2c18, #17130e 75%) center / cover no-repeat; border-bottom: 1px solid var(--s-line); }
.wk-card-pic[data-tint] { background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--tint) 40%, #17130e), #17130e 78%); }
.wk-card-ic { width: 66px; height: 66px; color: #c9a14a; opacity: .9; } .wk-card-ic svg { width: 100%; height: 100%; }
.wk-card-sk { width: 58px; height: 58px; padding: 10px; border-radius: 6px; color: #fff4dc; background: color-mix(in srgb, var(--tint, #8a7a5a) 70%, #000); border: 1px solid rgba(255,230,170,.45); box-shadow: 0 0 22px color-mix(in srgb, var(--tint, #8a7a5a) 55%, transparent); }
.wk-card-sk svg { width: 100%; height: 100%; }
.wk-card-b { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 16px; }
.wk-card-b span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #c9a14a; font-weight: 700; }
.wk-card-b b { font-size: 17px; color: #f0e2c2; } .wk-card-b small { font-size: 12.5px; color: #857b68; line-height: 1.35; }
.wk-hero { height: 190px; border-radius: 3px; border: 1px solid var(--s-line); background: #17130e center / cover no-repeat; display: flex; align-items: flex-end; margin-bottom: 12px; overflow: hidden; }
.wk-hero > div { width: 100%; padding: 40px 20px 14px; background: linear-gradient(0deg, rgba(13,11,8,.92), rgba(13,11,8,0)); }
.wk-hero h1 { margin: 0 !important; } .wk-hero span { color: #c9a14a; font-size: 14px; }
/* умения профессии: сетка иконок с подсказкой */
.wk-skbox { padding: 6px 18px 14px; border: 1px solid var(--s-line); border-radius: 3px; background: var(--s-panel); margin: 10px 0; }
.wk-skhint { font-size: 12.5px; color: #857b68; margin: 8px 0 0; }
.wk-skbox h3 { padding-bottom: 6px; border-bottom: 1px solid var(--s-line); }
.wk-sks { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-sk { width: 46px; height: 46px; padding: 8px; border-radius: 4px; cursor: help; color: #fff4dc; background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 85%, #fff 0%), color-mix(in srgb, var(--tint) 55%, #000)); border: 1px solid rgba(0,0,0,.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.wk-sk.own { box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 0 0 2px #e6c07a; }
.wk-sk svg { width: 100%; height: 100%; } .wk-sk:hover, .wk-sk:focus-visible { outline: 2px solid #ffd98a; outline-offset: 1px; }
.wk-tip { position: absolute; z-index: 5; width: 290px; padding: 12px 14px; background: rgba(28,23,17,.98); border: 1px solid var(--s-line2); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.6); font-size: 13px; color: #d6c9ae; pointer-events: none; }
.wt-h { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 8px; border-bottom: 1px solid var(--s-line); }
.wt-h svg { flex: 0 0 34px; width: 34px; height: 34px; padding: 5px; border-radius: 4px; background: #3a2c18; color: #ffe6b0; }
.wt-h b { color: #f3e6c8; font-size: 15px; } .wt-h em { font-style: normal; color: #9fb4ff; font-size: 12px; } .wt-h small { display: block; color: #857b68; font-size: 11.5px; }
.wt-rows { padding: 8px 0; border-bottom: 1px solid var(--s-line); display: flex; flex-direction: column; gap: 2px; }
.wt-rows span { color: #9a8f7a; } .wt-rows b { color: #f0e2c2; font-weight: 600; } .wt-rows b.mp { color: #8fb8ff; } .wt-rows b.cast { color: #8fd06a; } .wt-rows b.cd { color: #ffd98a; } .wt-rows b.rng { color: #ffb070; }
.wt-desc { padding-top: 8px; color: #e8dcc0; line-height: 1.45; } .wt-desc span { color: #c9b98f; }
.wt-forms { padding-top: 6px; color: #857b68; font-size: 12px; }
/* результаты поиска */
.wk-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.wk-res { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 14px; border: 1px solid var(--s-line); background: var(--s-panel); border-radius: 3px; color: inherit; cursor: pointer; }
.wk-res:hover { border-color: var(--gold); } .wk-res span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #c9a14a; } .wk-res b { font-size: 15px; color: #f0e2c2; }
.wk-card:focus-visible, .wk-res:focus-visible, .wk-n:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
@media (max-width: 820px) { .wiki { grid-template-columns: 1fr; height: auto; } .wk-side { border-right: 0; border-bottom: 1px solid var(--s-line); max-height: 240px; } .wk-search, .wk-scrollarea { padding-left: 14px; padding-right: 14px; } }

/* панель быстрого доступа: ряды и замок слева, своё перетаскивание */
.qb-rows { display: flex; flex-direction: column; gap: 3px; }
.qb-side { position: absolute; right: calc(100% + 4px); bottom: 0; display: flex; flex-direction: column; gap: 3px; }
.qb-side button { width: 20px; height: 20px; padding: 0; display: flex; align-items: center; justify-content: center; background: rgba(10, 8, 6, .7); border: 1px solid rgba(217,181,107,.3); border-radius: 3px; color: #e9cf8f; font-size: 9px; line-height: 1; cursor: pointer; }
.qb-side button:hover:not(:disabled) { border-color: var(--gold); color: #fff0c8; }
.qb-side button:disabled { opacity: .35; cursor: default; }
.qb-side button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.qb-side .qb-lock svg { width: 13px; height: 13px; } .qb-side .qb-lock.on { color: #ffd34d; border-color: rgba(255,211,77,.55); }
.qb-ghost { position: fixed; left: 0; top: 0; z-index: 1000; width: 40px; height: 40px; padding: 7px; pointer-events: none; border: 1px solid var(--gold); border-radius: 4px; background: linear-gradient(#2a2118, #15100b); color: #e9cf8f; opacity: .9; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.qb-ghost svg { width: 100%; height: 100%; }
.qs.drop { border-color: #ffd34d; box-shadow: 0 0 10px rgba(255,211,77,.6); }
body.qb-dragging, body.qb-dragging * { cursor: grabbing !important; }
.sk-tile.gen svg { width: 60%; height: 60%; }
.qs .qn { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000; pointer-events: none; }
.qs.none .ic { opacity: .35; } .qs.none .qn { color: #ff8a7a; }
.shop-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.shop-item .shop-pic:has(img) { width: 96px; height: 96px; }
.site-admin { color: #ffd98a; font-size: 14px; text-decoration: none; padding: 6px 10px; border: 1px dashed rgba(217,181,107,.5); border-radius: 4px; }
.site-admin:hover { border-style: solid; }

/* ---------- ГМ ---------- */
.gm-btn { font: 700 12px/1 system-ui, sans-serif; letter-spacing: .04em; color: #9a8f7a; border-style: dashed; }
.gm-btn.on { color: #ffd34d; border-style: solid; border-color: #ffd34d; }
.gm-tag { font-size: 10px; padding: 0 4px; border-radius: 3px; background: #ffd34d; color: #2a1e0e; font-weight: 700; vertical-align: 1px; }
.gm-bar { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255,211,77,.4); }
.gm-bar button, .gm-acts button { background: rgba(0,0,0,.4); border: 1px solid rgba(217,181,107,.4); color: #e9cf8f; border-radius: 3px; padding: 3px 7px; font-size: 11.5px; cursor: pointer; }
.gm-bar button:hover, .gm-acts button:hover { border-color: var(--gold); color: #fff0c8; }
.gm-bar button.danger, .gm-acts button.danger { border-color: #c8402f; color: #ff9c8c; }
.gmwin { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 32px)); }
.gm-top { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13px; color: #d6c9ae; }
.gm-top label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; } .gm-top span { color: #ffd98a; }
.gm-row { display: flex; gap: 6px; } .gm-row input { flex: 1 1 auto; min-width: 0; background: rgba(0,0,0,.45); border: 1px solid rgba(217,181,107,.3); color: var(--ink); border-radius: 4px; padding: 6px 10px; font-size: 13px; }
.gm-row input[type=number] { flex: 0 0 64px; } .gm-row .btn-ghost { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.gm-list { max-height: 38vh; } .gm-list tr { cursor: pointer; } .gm-acts { white-space: nowrap; text-align: right; } .gm-acts button { margin-left: 3px; }
.gm-look { font-size: 12.5px; line-height: 1.45; color: #d6c9ae; padding: 8px 10px; border: 1px solid rgba(217,181,107,.25); border-radius: 4px; background: rgba(0,0,0,.3); max-height: 24vh; overflow: auto; }
.gm-look b { color: #ffd98a; } .gm-look i { color: #9a8f7a; } .gm-look .btn-ghost { padding: 2px 8px; font-size: 12px; float: right; }
.gm-ask { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 40; width: min(440px, calc(100vw - 32px)); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; background: rgba(14, 11, 8, .96); }
.gm-ask b { color: #f0e2bd; font-size: 15px; } .gm-ask span { color: #9a8f7a; font-size: 12.5px; }
.gm-ask input { background: rgba(0,0,0,.5); border: 1px solid rgba(217,181,107,.4); color: var(--ink); border-radius: 4px; padding: 8px 10px; font-size: 14px; }
.gm-ask div { display: flex; gap: 8px; justify-content: flex-end; } .gm-ask .btn-main { margin: 0; padding: 6px 18px; font-size: 14px; }
.fatpop.nolimit .fat-row, .fatpop.nolimit .fat-bar, .fatpop.nolimit .fat-note:not(:last-child) { display: none; }

/* тест производительности в настройках графики */
.bench-out { margin: 6px 0 0; padding: 8px 10px; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; user-select: text; background: rgba(0, 0, 0, .28); border: 1px solid rgba(214, 170, 90, .25); border-radius: 6px; color: #e8dcc0; }
.bench-out:empty { display: none; }

/* находки сюжета в журнале заданий */
.qj-memos { margin: 8px 0 2px; }
.qj-memos details { margin: 4px 0; border-left: 2px solid rgba(255, 213, 128, .45); padding-left: 8px; }
.qj-memos summary { cursor: pointer; color: #ffd580; }
.qj-memos p { margin: 4px 0 6px; font-size: 13px; line-height: 1.45; opacity: .9; }
/* журнал беты в сцене */
.cn-real.boot.log p b { color: #6fd3ff; }
.cn-real.boot.log p.bad b { color: #ff6a5a; text-shadow: 0 0 10px rgba(255, 106, 90, .6); }

/* ---------- всемирный рынок ---------- */
.mktwin { width: min(680px, calc(100vw - 32px)); }
.mk-filter { display: flex; gap: 6px; }
.mk-search { flex: 1; min-width: 0; background: rgba(0,0,0,.45); border: 1px solid rgba(217,181,107,.3); color: var(--ink); border-radius: 4px; padding: 6px 8px; font: inherit; font-size: 14px; }
.mk-kind { background: rgba(0,0,0,.45); border: 1px solid rgba(217,181,107,.3); color: var(--ink); border-radius: 4px; padding: 5px 6px; font: inherit; font-size: 14px; }
.mk-price { white-space: nowrap; color: #ffd98a; font-size: 14px; }
.mk-price small { color: var(--muted); font-size: 11px; }
.mk-form { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid rgba(217,181,107,.2); border-radius: 5px; background: rgba(0,0,0,.22); }
.mk-form > b, .mk-h { font-size: 13px; color: #e9cf8f; font-weight: 600; }
.mk-h { margin-top: 6px; }
.mk-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mk-line > b { font-size: 14px; }
.mk-line .btn-main { padding: 5px 14px; font-size: 14px; }
.mk-got { font-size: 12px; color: var(--muted); }
.mk-sug { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-opt { font: inherit; font-size: 13px; padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(217,181,107,.3); background: rgba(0,0,0,.4); cursor: pointer; }
.mk-opt:hover { border-color: var(--gold); }
.mk-bag { display: grid; grid-template-columns: repeat(auto-fill, 40px); gap: 4px; max-height: 136px; overflow: auto; }
.mk-bag .islot { width: 40px; height: 40px; }
.mk-bag .islot.sel { outline: 2px solid var(--gold); }

.rt-bonus { font-size: 12px; line-height: 1.4; color: #d6c9ae; padding: 6px 8px; border: 1px solid rgba(217,181,107,.2); border-radius: 4px; background: rgba(0,0,0,.2); }
.rt-bonus b { color: #ffd98a; font-weight: 600; }

.nw-worn { color: #8fd18a; font-weight: 600; }
.nw-row.worn .islot { box-shadow: inset 0 0 0 1px #8fd18a; }

.pm.away { opacity: .6; cursor: default; }
.pm.away .pm-top span { color: #e0b070; }

/* плащи у торговца */
.cloak-coins { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 6px; border: 1px solid rgba(159,232,255,.3); border-radius: 4px; background: rgba(20,40,50,.4); color: #cfeeff; font-size: 13px; }
.cloak-coins b { color: #9fe8ff; font-size: 15px; }
.cloak-h { margin: 10px 0 4px; color: #e9cf8f; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.nw-chance { color: #9fe8ff; font-variant-numeric: tabular-nums; }
.nw-chance.low { color: #ff9a7a; }

/* задания подземелий и задания дня */
.qtrack.task-side { border-color: #5aa0a8; }
.qtrack.task-side b { color: #9fe8ff; }
.qtrack.task-day { border-color: #8a7a4a; padding-top: 4px; padding-bottom: 4px; }
.qtrack.task-day.ready { border-color: #ffd56a; box-shadow: 0 0 10px rgba(255,213,106,.35); }
.qtrack .tk-ready { font-size: 11px; color: #ffd56a; }
.taskwin { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); }
.tk-list { display: flex; flex-direction: column; gap: 6px; }
.tk-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid rgba(217,181,107,.22); border-radius: 4px; background: rgba(0,0,0,.3); }
.tk-row.ok { border-color: rgba(255,213,106,.6); }
.tk-row.got { opacity: .6; }
.tk-row.lock { opacity: .75; }
.tk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tk-main b { color: #ffd98a; font-size: 14px; }
.tk-main b i { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.tk-main span { font-size: 13px; line-height: 1.35; color: #e8dcc0; }
.tk-main small { font-size: 12px; color: #a9c8a0; }
.tk-bar { position: relative; height: 14px; border-radius: 3px; background: rgba(0,0,0,.5); border: 1px solid rgba(217,181,107,.25); overflow: hidden; }
.tk-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #8a6a2a, #d9b56b); }
.tk-bar em { position: absolute; inset: 0; text-align: center; font-style: normal; font-size: 11px; line-height: 13px; color: #fff; text-shadow: 0 1px 2px #000; }
.tk-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tk-row.ok .tk-state { color: #ffd56a; }
.tk-steps { margin: 2px 0 2px 18px; padding: 0; font-size: 13px; color: #cfc4a8; }
.tk-steps li.done { color: #7f9a78; text-decoration: line-through; }
.tk-steps li.cur { color: #fff; }
.tk-bonus { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px dashed rgba(159,232,255,.4); border-radius: 4px; background: rgba(20,40,50,.35); }
.tk-bonus b { color: #9fe8ff; font-size: 13px; }
.tk-bonus span { font-size: 13px; color: #d8e8ee; }
.tk-bonus.got { opacity: .6; }

/* виньетка: лёгкое затемнение по краям кадра (слой поверх игры, под интерфейсом) */
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, rgba(0,0,0,0) 52%, rgba(6,4,10,.2) 78%, rgba(4,2,8,.5) 100%); }
.vignette.hidden { display: none; }

/* коллекции */
.colwin { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 32px)); }
.col-sum { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; margin-bottom: 6px; border: 1px solid rgba(217,181,107,.3); border-radius: 4px; background: rgba(40,30,12,.45); }
.col-sum b { color: #ffd98a; font-size: 14px; } .col-sum span { font-size: 12px; color: #d8cfb8; }
.colwin .ctab small { opacity: .7; margin-left: 3px; }
.col-card { padding: 8px 10px; margin-bottom: 6px; border: 1px solid rgba(217,181,107,.22); border-radius: 4px; background: rgba(0,0,0,.3); }
.col-card.done { border-color: rgba(140,200,120,.55); background: rgba(30,50,24,.35); }
.col-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.col-head b { color: #ffd98a; font-size: 14px; } .col-bonus { font-size: 12px; color: #a9c8a0; } .col-head i { margin-left: auto; font-style: normal; font-size: 12px; color: #8fd47a; }
.col-cells { display: flex; flex-wrap: wrap; gap: 6px; }
.col-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 84px; padding: 5px 3px; border: 1px solid rgba(217,181,107,.2); border-radius: 4px; background: rgba(0,0,0,.35); color: #cfc4a8; font: inherit; cursor: pointer; }
.col-cell.can { border-color: #ffd56a; box-shadow: 0 0 8px rgba(255,213,106,.3); }
.col-cell.full { opacity: .65; cursor: default; border-color: rgba(140,200,120,.5); }
.col-ic { width: 34px; height: 34px; } .col-n { font-size: 12px; color: #fff; font-variant-numeric: tabular-nums; } .col-cell.full .col-n { color: #8fd47a; }
.col-nm { font-size: 10px; line-height: 1.15; text-align: center; color: #a89f8a; max-height: 2.3em; overflow: hidden; }
.col-pick { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; background: rgba(0,0,0,.3); border: 1px solid rgba(217,181,107,.25); border-radius: 4px; } .col-pick:hover { border-color: #ffd56a; } .col-back { margin-top: 8px; }

/* вкладки карты: остров и подземелья */
.wm-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.wm-tabs .ctab { font-size: 13px; padding: 4px 10px; }
#worldmap.dungeon #wmImg { visibility: hidden; }
#worldmap.dungeon .wm-legend:not(.wm-legend-d) { display: none; }
#worldmap:not(.dungeon) .wm-legend-d { display: none; }

/* проверка присутствия */
.chk { position: fixed; z-index: 60; width: 300px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border: 2px solid #ffd56a; box-shadow: 0 0 24px rgba(255,213,106,.45); }
.chk b { color: #ffd98a; font-size: 16px; } .chk span { font-size: 15px; color: #fff; } .chk u { color: #ffd56a; text-decoration: none; font-weight: 700; }
.chk-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chk-btns button { height: 46px; font-size: 24px; line-height: 1; border: 1px solid rgba(217,181,107,.5); border-radius: 4px; background: rgba(0,0,0,.45); color: #f3ead4; cursor: pointer; }
.chk-btns button:hover { border-color: #ffd56a; background: rgba(217,181,107,.2); }
.chk small { font-size: 12px; color: #cfc4a8; } .chk small.chk-warn { color: #ff9a7a; }

/* выбор языка */
.lang-ask { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(6,4,2,.82); }
.lang-card { display: flex; flex-direction: column; gap: 14px; padding: 22px 26px; border: 1px solid #d9b56b; border-radius: 8px; background: #17120c; text-align: center; }
.lang-card b { color: #f0dfb8; font-size: 17px; }
.lang-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-btns button { padding: 12px 22px; font: inherit; font-size: 16px; border: 1px solid rgba(217,181,107,.5); border-radius: 6px; background: rgba(0,0,0,.4); color: #f3ead4; cursor: pointer; }
.lang-btns button:hover { border-color: #ffd56a; background: rgba(217,181,107,.2); }
.lang-row { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 14px; color: #d6c9ae; }
.lang-row select { padding: 5px 8px; font: inherit; border: 1px solid rgba(217,181,107,.4); border-radius: 4px; background: rgba(0,0,0,.5); color: #f3ead4; }

/* ---- ивенты: кнопка, окно записи, приглашение, счёт боя */
.ev-btn.on { border-color: var(--gold); color: #fff0c8; box-shadow: 0 0 0 2px rgba(233, 207, 143, .25), 0 0 14px rgba(233, 207, 143, .45); }
.evwin { max-height: calc(100vh - 150px); overflow-y: auto; position: absolute; right: 64px; top: 110px; width: min(420px, calc(100vw - 32px)); padding: 12px 14px; pointer-events: auto; z-index: 30; }
.evwin-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--title); font-size: 19px; color: #e9cf8f; margin-bottom: 8px; }
.ev-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ev-info { flex: 1; min-width: 0; }
.ev-name { font-size: 16px; color: #fff0c8; }
.ev-desc { font-size: 13px; opacity: .8; margin: 3px 0 5px; line-height: 1.35; }
.ev-when { font-size: 13px; color: #a8f0a0; }
.ev-when:empty { display: none; }
.ev-time { font-size: 13px; opacity: .9; }
.ev-time b { margin-left: 5px; color: #e9cf8f; font-variant-numeric: tabular-nums; }
.ev-act { margin: 0; font-size: 15px; padding: 6px 12px; white-space: nowrap; }
.evwin-note { font-size: 12px; opacity: .7; border-top: 1px solid var(--line); padding-top: 8px; line-height: 1.35; }
.evinvite { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); width: min(380px, calc(100vw - 32px)); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; text-align: center; pointer-events: auto; z-index: 40; border-color: var(--gold); }
.evinvite-title { font-family: var(--title); font-size: 21px; color: #e9cf8f; }
.evinvite-text { font-size: 15px; line-height: 1.35; }
.evinvite-left { font-size: 13px; opacity: .75; font-variant-numeric: tabular-nums; }
.evinvite .row-btns { justify-content: center; }
.evinvite .btn-main { margin: 0; font-size: 17px; padding: 6px 16px; }
.evbar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 7px 14px; font-size: 16px; pointer-events: auto; z-index: 20; white-space: nowrap; }
.evbar .ev-s { font-size: 22px; font-variant-numeric: tabular-nums; min-width: 1.2em; text-align: center; color: #fff; }
.ev-blue { color: #8ccbff; } .ev-red { color: #ff8f80; }
.evbar.mine-blue .ev-blue, .evbar.mine-red .ev-red { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ev-clock { margin-left: 8px; color: #e9cf8f; font-variant-numeric: tabular-nums; }
.evbar.prep .ev-clock { color: #a8f0a0; }
.ev-sub { font-size: 13px; opacity: .7; font-variant-numeric: tabular-nums; }
.ev-quit { margin-left: 6px; background: none; border: 1px solid var(--line); color: inherit; opacity: .7; border-radius: 6px; font: inherit; font-size: 12px; padding: 3px 8px; cursor: pointer; }
.ev-quit:hover { opacity: 1; border-color: var(--red); }
.lbl.evally .n { color: #8ccbff; }
.lbl.evfoe .n { color: #ff8f80; }
@media (max-width: 720px) { .evbar { top: 4px; gap: 6px; padding: 5px 9px; font-size: 14px; } .evbar .ev-s { font-size: 18px; } .evwin { right: 8px; top: 120px; } }
.ev-boss { color: #e9cf8f; }

/* ---- предстарт: блок на главной, заметка в кабинете, ссылка для друзей */
.hm-pre { display: flex; gap: 28px; align-items: center; margin: 14px 0 0; padding: 20px 24px; border: 1px solid rgba(217,181,107,.45); border-radius: 4px; background: linear-gradient(120deg, rgba(60,42,16,.55), rgba(20,16,11,.9)); }
.hm-pre-l { flex: 0 0 auto; text-align: center; min-width: 250px; }
.hm-pre-k { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #d9b56b; }
.hm-pre-date { font-family: var(--title); font-size: 26px; color: #f3e6c8; margin: 4px 0 10px; }
.hm-pre-clock { display: flex; gap: 10px; justify-content: center; }
.hm-pre-clock span { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 8px 6px; border: 1px solid rgba(217,181,107,.25); border-radius: 4px; background: rgba(0,0,0,.35); }
.hm-pre-clock b { font-size: 26px; color: #fff0c8; font-variant-numeric: tabular-nums; line-height: 1; }
.hm-pre-clock small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #9a8f7a; margin-top: 4px; }
.hm-pre-r { flex: 1; min-width: 0; }
.hm-pre-r p { margin: 0 0 8px; font-size: 15px; line-height: 1.45; color: #e6dcc6; }
.hm-pre-r .hm-pre-ref { color: #d9b56b; font-size: 14px; }
.hm-pre-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.hm-pre-btns .btn-main, .hm-pre-btns .btn-ghost { margin: 0; width: auto; padding: 9px 18px; font-size: 16px; }
.pre-note { border: 1px solid rgba(217,181,107,.4); border-radius: 4px; padding: 14px 16px; margin-bottom: 12px; background: rgba(60,42,16,.3); }
.pre-note b { font-size: 17px; color: #f3e6c8; }
.pre-note p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.ref-h { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ref-row { display: flex; gap: 8px; margin-bottom: 14px; }
.ref-row input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 9px 10px; border-radius: 4px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--ink); }
.ref-row .btn-main { margin: 0; width: auto; padding: 8px 16px; font-size: 15px; white-space: nowrap; }
.ref-rules { margin: 14px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.ref-rules b { color: #e9cf8f; }
.ref-by { margin-top: 10px; font-size: 13px; color: #a8f0a0; }
@media (max-width: 760px) { .hm-pre { flex-direction: column; align-items: stretch; padding: 16px; gap: 14px; } .hm-pre-l { min-width: 0; } .ref-row { flex-direction: column; } }
