/* v0.44: экран выбора героя и новости. Грузится после theme.css, берёт его токены. Без inline-стилей: размеры и цвета - классами. */
.cs-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; width: min(1280px, 96vw); margin: 4px auto 34px; align-items: start; }
.cs-wrap .chars-box { width: auto; margin: 0; }
.cs-show { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 20px; margin: 14px 0 16px; }

/* сцена: свет цвета класса, пол, столб света сверху */
.cs-stage { --glow: 216, 166, 74; position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 340px; overflow: hidden; border: 1px solid var(--trim); border-radius: 4px;
  background: radial-gradient(ellipse 80% 60% at 50% 48%, rgba(var(--glow), 0.30), transparent 72%), linear-gradient(#1b1510, #0b0907);
  box-shadow: inset 0 0 0 1px #000, inset 0 0 40px rgba(0, 0, 0, 0.7); }
.cs-stage.cls-warrior { --glow: 224, 96, 64; } .cs-stage.cls-ranger { --glow: 120, 190, 80; } .cs-stage.cls-mage { --glow: 110, 140, 240; }
.cs-stage::before { content: ''; position: absolute; top: 0; left: 50%; width: 70%; height: 82%; transform: translateX(-50%); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
  background: linear-gradient(rgba(var(--glow), 0.28), transparent); opacity: 0.8; animation: csBeam 5s ease-in-out infinite; pointer-events: none; }
.cs-floor { position: absolute; left: 50%; bottom: 12px; width: 76%; height: 46px; transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--glow), 0.55), rgba(var(--glow), 0.12) 60%, transparent 75%); border: 1px solid rgba(var(--glow), 0.35); animation: csFloor 3.6s ease-in-out infinite; }
.cs-hero { position: relative; display: block; max-width: 100%; height: auto; image-rendering: pixelated; margin-bottom: 14px; }
@keyframes csBeam { 50% { opacity: 0.45; } }
@keyframes csFloor { 50% { opacity: 0.65; transform: translateX(-50%) scale(1.05); } }

/* подробности */
.cs-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cs-name { margin: 0; font: 700 26px/1.1 var(--serif); color: var(--gold); overflow-wrap: anywhere; }
.cs-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; color: var(--dim); font-size: 13px; }
.cs-guild { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.cs-power { text-align: right; padding: 4px 12px; border-left: 3px solid var(--gold); background: var(--inset); }
.cs-power small, .cs-kv small, .cs-wait small, .cs-arena small { display: block; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.cs-power b { font: 700 22px var(--serif); color: var(--ember); }
.cs-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cs-kv { padding: 6px 10px; background: var(--inset); border: 1px solid var(--line); border-radius: 3px; min-width: 0; }
.cs-kv b { display: block; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.cs-sec h4 { margin: 0 0 6px; font: 600 12px var(--serif); text-transform: uppercase; letter-spacing: 0.08em; color: var(--trim-hi); }
.cs-gear { display: flex; flex-wrap: wrap; gap: 6px; }
.gt { position: relative; display: grid; place-items: center; width: 46px; height: 46px; background: radial-gradient(circle at 50% 35%, #3a2d21, #130f0b); border: 2px solid #4c3d2e; border-radius: 3px; }
.gt.empty { opacity: 0.4; border-style: dashed; color: var(--faint); }
.gt-en { position: absolute; right: 1px; bottom: 0; font: 700 10px sans-serif; color: var(--gold); text-shadow: 0 0 2px #000, 0 0 2px #000; }
.cs-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cs-bar { height: 10px; background: var(--inset); border: 1px solid #000; border-radius: 2px; overflow: hidden; }
.cs-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a3a, var(--gold)); }
.cs-pass-t { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 12.5px; }
.cs-waits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cs-wait { display: flex; align-items: baseline; gap: 6px; padding: 6px 10px; background: var(--inset); border: 1px solid var(--line); border-radius: 3px; opacity: 0.65; }
.cs-wait b { font: 700 18px var(--serif); color: var(--faint); }
.cs-wait.has { opacity: 1; border-color: var(--gold2); } .cs-wait.has b { color: var(--gold); }
.cs-arena { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 13px; }
.cs-arena small { margin-right: -6px; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.cs-play { flex: 1 1 180px; }
.btn.danger-ghost { background: transparent; border-color: #6b2a2c; color: #e0867f; } .btn.danger-ghost:hover { background: rgba(168, 36, 42, 0.18); border-color: var(--blood); }

/* карточки героев */
.cs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 10px; }
.cs-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-align: left; cursor: pointer; color: var(--text); background: linear-gradient(#211a14, #120e0b); border: 1px solid #5a4528; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6); }
.cs-card:hover { border-color: var(--trim-hi); }
.cs-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 16px rgba(216, 166, 74, 0.25); }
.cs-card.new { justify-content: center; flex-direction: column; gap: 2px; min-height: 100px; border-style: dashed; color: var(--dim); background: rgba(14, 11, 8, 0.6); }
.cs-card.new:hover { color: var(--gold); }
.cs-port { flex: none; display: grid; place-items: end center; width: 64px; height: 76px; background: radial-gradient(ellipse 60% 14% at 50% 94%, rgba(216, 166, 74, 0.35), transparent 70%), radial-gradient(circle at 50% 40%, rgba(144, 114, 84, 0.3), transparent 65%); }
.cs-port canvas { display: block; image-rendering: pixelated; }
.cs-ct { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cs-cl { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12px; color: var(--dim); }
.cs-pw { color: var(--ember); }
.cs-cg { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.cs-cz, .cs-cs { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-ov { position: fixed; inset: 0; z-index: 5200; display: grid; place-items: center; padding: 14px; background: rgba(5, 4, 6, 0.82); }
.cs-dlg { display: flex; flex-direction: column; gap: 10px; width: min(420px, 100%); padding: 20px; background: var(--win-bg); border: 1px solid var(--blood); border-radius: 4px; }
.cs-dlg h3 { margin: 0; font-family: var(--serif); color: #e0867f; } .cs-dlg p { margin: 0; font-size: 13px; }
.cs-dlg .row { justify-content: flex-end; gap: 8px; }

/* новости */
.cs-news { min-width: 0; padding: 14px; background: linear-gradient(180deg, rgba(27, 21, 16, 0.97), rgba(16, 12, 9, 0.97)); border: 1px solid #050403; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(138, 106, 58, 0.25); }
.cs-news .nw-list { max-height: calc(100vh - 150px); overflow: auto; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #5d4c3b transparent; }
.home-news { width: min(1180px, 94vw); margin: 0 auto 30px; }
.home-news .nw-col { padding: 14px; background: rgba(16, 12, 9, 0.88); border: 1px solid #050403; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(138, 106, 58, 0.25); }
.home-news .nw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.nw-h { margin: 0 0 10px; font: 700 18px var(--serif); color: var(--gold); }
.nw-list { display: flex; flex-direction: column; gap: 10px; }
.nw-card { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer; color: var(--text); background: linear-gradient(#211a14, #120e0b); border: 1px solid #5a4528; border-radius: 4px; }
.nw-card:hover { border-color: var(--trim-hi); }
.nw-card.pin { border-color: var(--gold2); } .nw-card.fresh { box-shadow: 0 0 0 1px rgba(224, 120, 43, 0.6); }
.nw-cover { position: relative; overflow: hidden; background: repeating-linear-gradient(135deg, #1d1712 0 10px, #17120d 10px 20px); }
.nw-cover.sm { height: 118px; } .nw-cover.lg { height: clamp(150px, 32vw, 280px); }
.nw-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nw-cover.none::after { content: '◆'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: rgba(138, 106, 58, 0.45); }
.nw-cover.none.sm { height: 56px; } .nw-cover.none.sm::after { font-size: 22px; }
.nw-body { display: flex; flex-direction: column; gap: 4px; padding: 9px 11px 11px; }
.nw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11.5px; color: var(--faint); }
.nw-tag { padding: 0 7px; border-radius: 8px; background: #3a2c1e; color: #e2c283; font-weight: 700; }
.nw-pin { color: var(--gold); } .nw-new { padding: 0 6px; border-radius: 8px; background: var(--ember); color: #1b1006; font-weight: 700; }
.nw-title { font: 700 15px/1.25 var(--serif); color: var(--text); overflow-wrap: anywhere; }
.nw-ex { font-size: 12.5px; line-height: 1.4; color: var(--dim); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-more { align-self: center; margin-top: 10px; } .nw-empty { padding: 18px; text-align: center; color: var(--dim); }
.nw-btn { position: relative; } .nw-badge { display: inline-block; min-width: 16px; margin-left: 6px; padding: 0 4px; border-radius: 8px; background: var(--ember); color: #1b1006; font-size: 11px; font-weight: 800; text-align: center; }
.nw-badge.hidden { display: none; }
.nw-lock { overflow: hidden; }
.nw-ov { position: fixed; inset: 0; z-index: 5100; display: grid; place-items: center; padding: 12px; background: rgba(5, 4, 6, 0.82); }
.nw-win { position: relative; width: min(760px, 100%); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; background: var(--win-bg); border: 1px solid var(--trim); border-radius: 4px; box-shadow: 0 20px 60px #000, inset 0 0 0 1px #000; }
.nw-x { position: sticky; top: 8px; float: right; z-index: 2; width: 34px; height: 34px; margin: 8px 8px -42px 0; border-radius: 50%; cursor: pointer; color: var(--text); background: rgba(10, 8, 6, 0.85); border: 1px solid var(--trim); }
.nw-art-in { padding: 16px 20px 22px; } .nw-art-in h2 { margin: 6px 0 12px; font: 700 26px/1.2 var(--serif); color: var(--gold); overflow-wrap: anywhere; }
.nw-text { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.nw-text p { margin: 0 0 0.85em; } .nw-text h3 { margin: 1.1em 0 0.4em; font: 700 18px var(--serif); color: var(--trim-hi); }
.nw-text ul, .nw-text ol { margin: 0 0 0.85em; padding-left: 1.4em; } .nw-text hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.nw-link { color: var(--ember); text-decoration: underline; text-underline-offset: 2px; } .nw-link:hover { color: var(--gold); }

@media (max-width: 1020px) { .cs-wrap { grid-template-columns: minmax(0, 1fr); } .cs-news .nw-list { max-height: none; } .cs-news .nw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }
@media (max-width: 760px) {
  .cs-main { display: flex; flex-direction: column; gap: 10px; }
  .cs-cards { order: 1; grid-auto-flow: column; grid-auto-columns: minmax(214px, 78%); grid-template-columns: none; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .cs-show { order: 2; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 4px 0 0; } .cs-stage { min-height: 250px; }
  .cs-head { order: 0; } .cs-actions { order: 1; margin-top: 0; } .cs-info > :not(.cs-head):not(.cs-actions) { order: 2; } .cs-meta .cs-kv:last-child { grid-column: 1 / -1; }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-stats, .cs-waits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-name { font-size: 22px; } .cs-actions .btn { flex: 1 1 140px; }
  .nw-art-in { padding: 12px 14px 18px; } .nw-art-in h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .cs-stage::before, .cs-floor { animation: none; } }
