/* ==========================================================================
   MU Code — «Кузня» (29.11.2026). Стиль логотипа MU Code Forge.
   Подключается последним и перекрывает site.css / mucode.css / home.css / studio.css.

   Палитра снята с логотипа (docs/brand/assets-needed.md): чернота #0e0a0f,
   кованое железо, угли #6c3018 → #e0601c → #ffb040, бронза рукояти #c08a48.
   Имена токенов исторические: --sapphire = главное действие (угли),
   --ice = акцентный текст и ссылки (горячее золото углей).
   Кнопки и плашки — пиксельные 9-slice из docs/brand/source/ui.
   ========================================================================== */

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --night: #0e0a0f; --night-2: #17131b; --abyss: #070509;
  --sapphire: #c4501c; --sapphire-hi: #e0601c; --sapphire-deep: #6c3018;
  --sky-c: #c08a48; --ice: #f2a33a; --ice-bright: #ffd28a;
  --frost: #e6e1e8; --frost-2: #b3aab8;
  --steel: #505060; --steel-2: #707080; --steel-3: #b0b0b8;
  --blue: #f2a33a; --blue-deep: #fff6ec; --blue-soft: #8e8696;
  --heading: #f3eef5; --text: #d9d3dc; --muted: #9a90a0;
  --sky: #0e0a0f; --sky-deep: #070509; --plate: #17131b; --plate-warm: #1c1720;
  --gold: #c4501c; --gold-deep: #6c3018; --ink-gold: #f2a33a;
  --line: rgba(176, 170, 184, 0.16); --line-soft: rgba(176, 170, 184, 0.08);
  --shadow-plate: 6px 6px 0 #000; --shadow-md: 5px 5px 0 #000; --shadow-sm: 3px 3px 0 #000; --shadow-lg: 8px 8px 0 #000;
}
body { background: #0e0a0f; color: var(--text); }
::selection { background: #c4501c; color: #fff; }
:focus-visible { outline: 2px solid #ffb040; outline-offset: 3px; }
a { color: #f2a33a; }
a:hover { color: #ffd28a; }

/* --- Подложки страниц: сцены владельца, приглушённые ------------------- */
.is-game::before, .is-studio::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; image-rendering: pixelated;
}
.is-game::before {
  background:
    linear-gradient(180deg, rgba(14, 10, 15, 0.94) 0%, rgba(14, 10, 15, 0.86) 60%, rgba(14, 10, 15, 0.72) 100%),
    url("../img/forge/game-desktop.png") center bottom / cover no-repeat;
}
.is-studio::before {
  background:
    linear-gradient(180deg, rgba(14, 10, 15, 0.95), rgba(14, 10, 15, 0.9)),
    url("../img/forge/studio.png") center / cover no-repeat;
}
.is-game.page-home::before, .is-studio.page-studio::before { display: none; }

/* --- Переключатель «Играть · Студия» ------------------------------------- */
.switchbar { background: #070509; border-bottom-color: rgba(176, 170, 184, 0.22); }
.switchbar__tab { color: #b3aab8; }
.switchbar__tab:hover { color: #fff; background: rgba(196, 80, 28, 0.12); }
.switchbar__tab.is-on { color: #fff; background: #17131b; box-shadow: inset 0 -2px 0 #e0601c; }
.switchbar__dot { background: #505060; }
.switchbar__tab.is-on .switchbar__dot { background: #ffb040; box-shadow: 0 0 0 2px #6c3018; }
.switchbar__hint { color: #8e8696; }
.switchbar .lang__list { background: #17131b; border-color: #505060; }
.switchbar .lang__item:hover, .switchbar .lang__item.is-active { background: #c4501c; color: #fff; }
.switchbar .lang__button:hover { border-color: #f2a33a; }

/* --- Шапка ---------------------------------------------------------------- */
.masthead, :root[data-theme="frost"] .masthead {
  background: #120e14 url("../img/forge/metal-tile-256.png");
  background-blend-mode: multiply;
  border-bottom: 0; backdrop-filter: none;
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 16px; pointer-events: none;
  background: url("../img/forge/divider.png") center / auto 16px repeat-x; image-rendering: pixelated;
}
.masthead.is-stuck { box-shadow: 0 8px 0 rgba(0, 0, 0, 0.45); }
.masthead__inner { height: 70px; }
.brand__logo { display: block; width: 233px; height: 48px; image-rendering: pixelated; }
.brand__word, .brand__tag { display: none; }
.nav a, .navdrop__toggle, :root[data-theme="frost"] .nav a { color: #e6e1e8; }
.nav a:hover, .nav a[aria-current="page"], .navdrop__toggle:hover, .navdrop.is-open .navdrop__toggle, .navdrop__toggle.is-current,
:root[data-theme="dark"] .nav a:hover, :root[data-theme="dark"] .nav a[aria-current="page"] {
  background: rgba(196, 80, 28, 0.18); color: #fff; box-shadow: inset 0 -2px 0 #e0601c;
}
.navdrop__menu, .acct__menu, .lang__list, :root[data-theme="dark"] .lang__list {
  background: #17131b; border: 2px solid #505060; box-shadow: 6px 6px 0 #000;
}
.navdrop__menu a:hover, .navdrop__menu a[aria-current="page"],
.umenu__list a:hover, .umenu__out:hover, .umenu__help:hover { background: rgba(196, 80, 28, 0.22); box-shadow: none; }
.navdrop__title { color: #f3eef5; }
.navdrop__desc { color: #9a90a0; }
.navdrop__icon { color: #f2a33a; }
.navdrop__icon img { display: block; width: 32px; height: 32px; image-rendering: pixelated; }
.navdrop__icon:has(img) { width: 32px; height: 32px; background: none; border: 0; }

/* --- Кнопки: кованые 9-slice ---------------------------------------------- */
.btn, .btn-primary, button.btn, .mlink--accent, .acct__submit, .reg__submit, .vip-plan__buy, .mbtn--gold, .mc-btn,
.masthead .mlink.mlink--accent, :root[data-theme="dark"] .masthead .mlink.mlink--accent, :root[data-theme="frost"] .masthead .mlink.mlink--accent,
:root[data-theme="dark"] .btn, :root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .acct__submit, :root[data-theme="dark"] .vip-plan__buy,
:root[data-theme="dark"] .mlink--accent, :root[data-theme="dark"] .btn--gold, :root[data-theme="dark"] .page-login .form-horizontal .btn,
:root[data-theme="dark"] .page-register .form-horizontal .btn, :root[data-theme="dark"] .page-forgotpassword .form-horizontal .btn,
.studio .mc-btn {
  color: #fff6ec; background: transparent; box-shadow: none; filter: none;
  border: 16px solid transparent; border-image: url("../img/forge/button-primary-normal.png") 8 fill / 16px / 0 stretch;
  border-radius: 0; image-rendering: pixelated; padding: 0 12px; text-shadow: 0 2px 0 #3a1608; transition: none;
}
.btn:hover, .btn-primary:hover, .mlink--accent:hover, .acct__submit:hover, .reg__submit:hover, .vip-plan__buy:not(:disabled):hover, .mc-btn:hover,
.masthead .mlink.mlink--accent:hover, .studio .mc-btn:hover,
:root[data-theme="dark"] .btn:not(.btn--ghost):not(.btn-default):not(.btn-xs):not(:disabled):hover,
:root[data-theme="dark"] .mlink.mlink--accent:hover, :root[data-theme="dark"] .acct__submit:hover, :root[data-theme="dark"] .reg__submit:hover {
  color: #fff; background: transparent; box-shadow: none; border-image-source: url("../img/forge/button-primary-hover.png");
}
.btn:active, .btn-primary:active, .mlink--accent:active, .acct__submit:active, .reg__submit:active, .mc-btn:active, .studio .mc-btn:active {
  transform: translateY(2px); box-shadow: none; border-image-source: url("../img/forge/button-primary-pressed.png");
}
.btn-default, .btn--ghost, .btn-xs, .mlink, .mc-btn--ghost, .studio .st-ghost, .studio .mc-btn--ghost,
:root[data-theme="dark"] .btn-default, :root[data-theme="dark"] .btn--ghost, :root[data-theme="dark"] .btn-xs, :root[data-theme="dark"] .mlink {
  color: #e6e1e8; background: transparent; box-shadow: none;
  border: 16px solid transparent; border-image: url("../img/forge/button-secondary-normal.png") 8 fill / 16px / 0 stretch;
  border-radius: 0; image-rendering: pixelated; padding: 0 10px; text-shadow: 0 2px 0 #000;
}
.btn-default:hover, .btn--ghost:hover, .btn-xs:hover, .mlink:hover, .mc-btn--ghost:hover, .studio .st-ghost:hover,
:root[data-theme="dark"] .btn-default:hover, :root[data-theme="dark"] .btn--ghost:hover, :root[data-theme="dark"] .mlink:hover {
  color: #fff; background: transparent; border-image-source: url("../img/forge/button-secondary-hover.png");
}
.btn-default:active, .btn--ghost:active, .mlink:active, .mc-btn--ghost:active {
  transform: translateY(2px); border-image-source: url("../img/forge/button-secondary-pressed.png");
}
.mc-btn { min-height: 62px; font-size: 18px; }
.mlink, .masthead .mlink, .masthead .mlink.mlink--accent { height: 48px; font-size: 15px; }

/* --- Плашки: кованая рамка 9-slice поверх тёмного металла ----------------- */
.panel, .plate, .reg, .vip-plan, .pay, .dl-group, .rec, .sched, .top__list,
:root[data-theme="dark"] .panel, :root[data-theme="dark"] .plate, :root[data-theme="dark"] .reg {
  background: #17131b url("../img/forge/metal-tile-256.png"); background-blend-mode: multiply;
  background-clip: padding-box; box-shadow: none; border-radius: 0;
  border: 16px solid transparent; border-image: url("../img/forge/panel-9slice.png") 16 / 16px / 0 stretch;
  image-rendering: pixelated;
}
.rec::before { display: none; }
.reg__side, :root[data-theme="dark"] .reg__side { background: rgba(7, 5, 9, 0.55); }
.panel-heading, .plate__head { border-bottom-color: rgba(176, 170, 184, 0.18); }

/* --- Поля ввода ------------------------------------------------------------ */
.form-control, input.form-control, select.form-control, textarea.form-control, .rf__input, .acct__field input,
:root[data-theme="dark"] .form-control, :root[data-theme="dark"] .rf__input, :root[data-theme="dark"] .acct__field input {
  background: #070509; color: #fff6ec; border: 2px solid #505060; border-radius: 0;
}
.form-control:focus, .rf__input:focus, .acct__field input:focus,
:root[data-theme="dark"] .form-control:focus, :root[data-theme="dark"] .rf__input:focus {
  background: #070509; border-color: #e0601c; box-shadow: 0 0 0 2px #6c3018;
}

/* --- Заголовки, таблицы ---------------------------------------------------- */
.page-title { color: #f3eef5; }
.page-title::after, :root[data-theme="dark"] .page-title::after { background: #e0601c; box-shadow: 4px 4px 0 #6c3018; }
.table thead th, .rankings-table tr:first-child td, .general-table-ui tr:first-child td,
:root[data-theme="dark"] .table thead th, :root[data-theme="dark"] .rankings-table tr:first-child td { background: #070509; color: #b3aab8; }

/* --- Подвал ---------------------------------------------------------------- */
.footer, :root[data-theme="dark"] .footer { background: #0b080c url("../img/forge/metal-tile-256.png"); background-blend-mode: multiply; border-top: 0; }
.footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 16px;
  background: url("../img/forge/divider.png") center / auto 16px repeat-x; image-rendering: pixelated;
}
.footer__brand img { display: block; width: 233px; height: 48px; image-rendering: pixelated; margin-bottom: 12px; }
.footer__h { color: #8e8696; }
.footer__col a { color: #e6e1e8; }
.footer__col a:hover { color: #ffb040; }
.footer__meta, :root[data-theme="dark"] .footer__meta { border-top-color: rgba(176, 170, 184, 0.2); color: #8e8696; }

/* --- Мелочи ---------------------------------------------------------------- */
.umenu__purse { background: #070509; border-color: #6c3018; }
.umenu__purse-fig { color: #ffb040; }
.umenu__avatar { background: #c4501c; }
.mc-tag { color: #f2a33a; }
.mc-ico { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; }
.top__face, .rankings-table img, .pp-class img { image-rendering: pixelated; }
.live-dot { background: #ffb040; box-shadow: 0 0 0 3px rgba(255, 176, 64, 0.25); }

@media (max-width: 860px) {
  .nav, :root[data-theme="dark"] .nav, :root[data-theme="frost"] .nav { background: #17131b; border-bottom: 2px solid #000; }
  .nav-toggle { border-color: #707080; background: transparent; }
  .nav-toggle span, :root[data-theme="frost"] .nav-toggle span { background: #e6e1e8; }
}
@media (max-width: 520px) { .brand__logo { width: 175px; height: 36px; } }
@media (prefers-reduced-motion: reduce) { .embers { display: none; } }

/* --- Главная: сцена «крепость над кузней», логотип, искры ---------------- */
.page-home .hero { border-bottom: 0; }
.page-home .hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 16px; z-index: 2;
  background: url("../img/forge/divider.png") center / auto 16px repeat-x; image-rendering: pixelated;
}
.hero__sky { background: url("../img/forge/game-desktop.png") center bottom / cover no-repeat; image-rendering: pixelated; }
.hero__sky::after { background: radial-gradient(ellipse 58% 52% at 50% 42%, rgba(10, 7, 11, 0.78), rgba(10, 7, 11, 0.25) 70%, rgba(10, 7, 11, 0.05)); }
@media (max-width: 760px) { .hero__sky { background-image: url("../img/forge/game-mobile.png"); background-position: center; } }
.hero__logo { width: min(760px, 94vw); height: auto; image-rendering: pixelated; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.55)); }
.hero__kicker { color: #f2a33a; }
.hero__lead { color: #e6e1e8; text-shadow: 0 2px 0 #000; }
.hero__chips li { background: rgba(7, 5, 9, 0.82); border: 2px solid #505060; color: #b3aab8; }
.hero__chips b { color: #ffd28a; }
.launch__label { color: #f3eef5; text-shadow: 0 2px 0 #000; }
.launch__label b { color: #ffb040; }
.launch__clock div {
  background: #17131b url("../img/forge/metal-tile-256.png"); background-blend-mode: multiply; background-clip: padding-box;
  border: 16px solid transparent; border-image: url("../img/forge/panel-9slice.png") 16 / 16px / 0 stretch;
  box-shadow: none; padding: 2px 4px 0; min-width: 96px; image-rendering: pixelated;
}
.launch__clock b { color: #ffb040; text-shadow: 0 3px 0 #6c3018; }
.launch__clock span { color: #b3aab8; }
.rec__fig { color: #ffd28a; }
.rec dt { color: #b3aab8; }
.sched__t { color: #f2a33a; }
.facts li::before { background: #e0601c; box-shadow: 2px 2px 0 #6c3018; }
.top__fig { color: #ffd28a; }
.top__row:first-child .top__pos { color: #ffb040; }

/* Искры: спрайт 8 кадров 64×64, несколько штук поднимаются от углей. */
.embers { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.embers i {
  position: absolute; bottom: 4%; width: 64px; height: 64px; image-rendering: pixelated; opacity: 0.9;
  background: url("../img/forge/embers-8x64.png") 0 0 / 512px 64px no-repeat;
  animation: mc-embers 1s steps(8) infinite, mc-rise 7s linear infinite;
}
.embers i:nth-child(1) { left: 8%; animation-delay: 0s, -1s; }
.embers i:nth-child(2) { left: 18%; animation-delay: -0.3s, -4s; transform: scale(1.5); }
.embers i:nth-child(3) { left: 74%; animation-delay: -0.6s, -2.5s; }
.embers i:nth-child(4) { left: 86%; animation-delay: -0.2s, -5.5s; transform: scale(2); }
.embers i:nth-child(5) { left: 47%; animation-delay: -0.8s, -3.2s; opacity: 0.5; }
@keyframes mc-embers { to { background-position: -512px 0; } }
@keyframes mc-rise { 0% { translate: 0 0; opacity: 0; } 15% { opacity: 0.9; } 100% { translate: 0 -55vh; opacity: 0; } }
.hero__inner { position: relative; z-index: 1; }

/* Полоса студии на главной — мастерская. */
.studio-band { background: #120e14 url("../img/forge/studio.png") center 40% / cover no-repeat; border: 0; image-rendering: pixelated; position: relative; }
.studio-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 7, 11, 0.94) 0%, rgba(10, 7, 11, 0.8) 55%, rgba(10, 7, 11, 0.35) 100%); }
.studio-band::after { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 16px; background: url("../img/forge/divider.png") center / auto 16px repeat-x; }
.studio-band__inner { position: relative; z-index: 1; }
.studio-band__tag { color: #f2a33a; }
.studio-band__title { color: #f3eef5; }
.studio-band__text { color: #d9d3dc; }
.studio-band__btn { border-color: transparent; box-shadow: none; }

/* --- Студия в «Кузне»: мастерская вместо светлой темы ---------------------- */
.page-studio { background: #0e0a0f; }
.page-studio .shell__main--full { background: #0e0a0f; }
.studio { --ink: #f3eef5; --ink-2: #d9d3dc; --muted-s: #9a90a0; --edge: #000; color: #d9d3dc; }
.st-kicker { color: #f2a33a; }
.st-title, .st-hero__title { color: #f3eef5; text-shadow: 0 3px 0 #000; }
.st-lead, .st-hero__lead { color: #d9d3dc; }
.st-hero {
  position: relative; max-width: none; margin: 0; padding: 88px max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter))) 72px;
  background: url("../img/forge/studio.png") center / cover no-repeat; image-rendering: pixelated;
}
.st-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 7, 11, 0.95) 0%, rgba(10, 7, 11, 0.82) 48%, rgba(10, 7, 11, 0.45) 100%); }
.st-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 16px; background: url("../img/forge/divider.png") center / auto 16px repeat-x; z-index: 2; }
.st-hero > * { position: relative; z-index: 1; }
.st-code { background: rgba(7, 5, 9, 0.92); border: 16px solid transparent; border-image: url("../img/forge/panel-9slice.png") 16 / 16px / 0 stretch; box-shadow: none; }
.st-code__bar { background: #070509; border-bottom: 2px solid #6c3018; color: #8e8696; }
.st-code__bar span { background: #505060; } .st-code__bar span:first-child { background: #e0601c; }
.st-code__bar b { color: #b3aab8; }
.st-code pre { color: #e6e1e8; }
.st-code .c { color: #7d7486; } .st-code .k { color: #f2a33a; } .st-code .n { color: #ffd28a; }
.st-card, .st-log li, .st-sys li, .st-steps li, .st-faq details, .st-form, .st-live {
  background: #17131b url("../img/forge/metal-tile-256.png"); background-blend-mode: multiply; background-clip: padding-box;
  border: 16px solid transparent; border-image: url("../img/forge/panel-9slice.png") 16 / 16px / 0 stretch;
  box-shadow: none; image-rendering: pixelated;
}
.st-card { padding: 14px 14px 12px; }
.st-card__ico { width: 48px; height: 48px; background: none; box-shadow: none; }
.st-card__ico img { width: 48px; height: 48px; image-rendering: pixelated; }
.st-card__title, .st-steps b, .st-faq summary, .st-sys__name, .st-log b, .st-channels a { color: #f3eef5; }
.st-card__text, .st-log p, .st-steps p, .st-faq details p { color: #d9d3dc; }
.st-log__tag { background: #070509; color: #f2a33a; border-color: #6c3018; }
.st-sys li::before { background: #e0601c; }
.st-sys__meta { color: #9a90a0; }
.st-steps li::before { color: #ffb040; text-shadow: 0 2px 0 #6c3018; }
.st-faq summary::after { color: #ffb040; }
.st-live { color: #e6e1e8; }
.st-live::after { background: url("../img/forge/game-desktop.png") center bottom / cover; opacity: 0.5; }
.st-live__label { color: #f2a33a; } .st-live__go { color: #ffd28a; }
.st-channels svg { color: #f2a33a; }
.st-form label > span { color: #9a90a0; }
.st-form input, .st-form select, .st-form textarea { background: #070509; color: #fff6ec; border: 2px solid #505060; }
.st-form input:focus, .st-form select:focus, .st-form textarea:focus { background: #070509; border-color: #e0601c; box-shadow: 0 0 0 2px #6c3018; }
.st-form__done-title { color: #ffb040; }
.st-form__err { background: #2a0d0a; border-color: #c4501c; color: #ffd2c4; }

@media (max-width: 640px) {
  .launch__clock { display: flex; width: 100%; gap: 6px; }
  .launch__clock div { flex: 1 1 0; min-width: 0; border-width: 10px; border-image-width: 10px; padding: 0; }
  .launch__clock b { font-size: 26px; }
  .launch__clock span { font-size: 10px; letter-spacing: 0.04em; }
  .mc-btn { min-height: 56px; font-size: 17px; }
}

/* --- Шрифт: читаемый Golos Text вместо пиксельного (29.11) ----------------- */
h1, h2, h3, h4, .page-title, .sec__title, .st-title, .st-hero__title, .studio-band__title,
.nav a, .navdrop__toggle, .navdrop__title, .btn, .mc-btn, .mlink, .acct__submit, .reg__submit,
.rec__fig, .launch__clock b, .launch__label, .top__fig, .top__pos, .st-card__title, .st-steps b, .st-faq summary,
.st-live__fig, .sec__more, .umenu__purse-fig, .st-channels a, .st-form__done-title {
  font-family: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h1, h2, .page-title, .sec__title, .st-title, .st-hero__title, .studio-band__title { font-weight: 800; letter-spacing: -0.01em; }
.nav a, .navdrop__toggle { font-weight: 600; font-size: 15px; letter-spacing: 0; }
.btn, .mc-btn, .mlink, .acct__submit, .reg__submit { font-weight: 700; letter-spacing: 0.01em; }
.rec__fig, .launch__clock b, .top__fig, .st-live__fig { font-weight: 800; letter-spacing: -0.02em; }
.navdrop__title, .st-card__title, .st-steps b, .st-faq summary { font-weight: 700; }
