/* Первая тема движка: оформление не определяет состояние игры. */
.theme-fantasy {
    --theme-bg: #14130f;
    --theme-panel: #181610;
    --theme-panel-inner: #242015;
    --theme-text: #eee3c9;
    --theme-muted: #b7ad99;
    --theme-accent: #d3b476;
    --theme-accent-hover: #efd39a;
    --theme-button-text: #19150f;
    --theme-border: #51432c;
    --theme-display-font: Georgia, "Times New Roman", serif;
    color: var(--theme-text);
    background: linear-gradient(rgba(9,12,12,.73), rgba(11,12,10,.88)), url('/assets/img/themes/fantasy/city.webp') center / cover fixed no-repeat, var(--theme-bg);
    display: flex;
    flex-direction: column;
}
.theme-fantasy > header.bg-white { background: rgba(15,14,11,.94) !important; border-color: var(--theme-border) !important; }
.theme-fantasy > main { flex: 1 0 auto; }
.theme-fantasy > footer.text-secondary { color: var(--theme-muted) !important; }
.theme-fantasy a:not(.btn):not(.game-button) { color: var(--theme-accent); }
.theme-fantasy a:not(.btn):not(.game-button):hover { color: var(--theme-accent-hover); }
.theme-fantasy .brand, .theme-fantasy h1, .theme-fantasy h2 { font-family: var(--theme-display-font); }
.theme-fantasy .brand { font-weight: 700; }
.theme-fantasy .panel { background: var(--theme-panel); border: 1px solid var(--theme-border); border-radius: 6px; box-shadow: 0 16px 50px #0005, inset 0 0 0 3px #ffffff04; }
.theme-fantasy .auth-panel { width: min(100%, 34rem); margin: clamp(12px, 5vh, 60px) auto; padding: clamp(18px, 4vw, 36px); }
.theme-fantasy .auth-panel h1 { font-size: clamp(1.45rem, 3.5vw, 2rem); text-align: center; color: var(--theme-accent); margin-bottom: 20px; }
.theme-fantasy .theme-emblem { display: block; width: 104px; height: auto; margin: 0 auto 14px; object-fit: contain; }
.theme-fantasy .welcome-panel { text-align: center; }
.theme-fantasy .theme-description, .theme-fantasy .theme-development { color: var(--theme-muted); }
.theme-fantasy .theme-development { font-size: .85rem; }
.theme-fantasy .theme-action { display: block; width: 100%; margin-top: 20px; }
.theme-fantasy .theme-secondary-link { display: inline-block; margin-top: 16px; }
.theme-fantasy .btn-primary { --bs-btn-bg: var(--theme-accent); --bs-btn-color: var(--theme-button-text); --bs-btn-border-color: var(--theme-accent); --bs-btn-hover-bg: var(--theme-accent-hover); --bs-btn-hover-color: var(--theme-button-text); --bs-btn-hover-border-color: var(--theme-accent-hover); --bs-btn-active-bg: var(--theme-accent-hover); --bs-btn-active-color: var(--theme-button-text); --bs-btn-disabled-bg: var(--theme-border); --bs-btn-disabled-color: var(--theme-text); --bs-btn-disabled-border-color: var(--theme-border); }
.theme-fantasy .btn-outline-secondary, .theme-fantasy .btn-outline-primary { --bs-btn-color: var(--theme-accent); --bs-btn-border-color: var(--theme-border); --bs-btn-hover-color: var(--theme-button-text); --bs-btn-hover-bg: var(--theme-accent); --bs-btn-hover-border-color: var(--theme-accent); --bs-btn-active-bg: var(--theme-accent); --bs-btn-active-color: var(--theme-button-text); --bs-btn-disabled-color: var(--theme-muted); --bs-btn-disabled-border-color: var(--theme-border); }
.theme-fantasy .form-control { color: var(--theme-text); background: var(--theme-panel-inner); border-color: var(--theme-border); }
.theme-fantasy .form-control:focus { color: var(--theme-text); background: var(--theme-panel-inner); border-color: var(--theme-accent); box-shadow: 0 0 0 .2rem #d3b47626; }
.theme-fantasy :is(a, button, input):focus-visible { outline: 2px solid var(--theme-accent); outline-offset: 3px; }
@media (max-width: 575px) { .theme-fantasy { background-attachment: scroll; } .theme-fantasy .auth-panel { margin-top: 8px; } }

/* Лобби: золотые акценты из CSS визуального референса. */
.theme-fantasy .game-shell { --game-bg: #10191a; --game-panel: #11191a; --game-text: #f3ead6; --game-muted: #a9a18c; --game-accent: #ffe2a0; --game-border: #42443c; --game-button-text: #19150f; }
.theme-fantasy .game-shell .game-button { background: linear-gradient(#c9992f,#87602b); color: #fff1d2; border: 1px solid #c6a06a; }

/* Игровой мир: цветовые значения исходного CSS, адаптированные к своим компонентам. */
.theme-fantasy .game-world { --game-bg:#0b0e0a; --game-panel:#1b1e15; --game-border:#8a7047; --game-accent:#ffe2a0; }
.theme-fantasy .game-world .world-nav {background:linear-gradient(#1b1e15,#0b0e0a);border-top-color:#8a7047;}
.theme-fantasy .game-world .world-service {border-color:#dcae5e33;}

/* Круглая печать службы и активная навигация: цвета/градиенты из R2Web HAR. */
.theme-fantasy .game-world .world-service {background:radial-gradient(circle at 18%,#c8974714,#0000 28%),linear-gradient(145deg,#141712f7,#070907fa);border-color:#d5a95d2b;box-shadow:inset 0 1px #fff1d206,0 5px 16px #0000002e;}
.theme-fantasy .game-world .world-service-icon {color:#d1a75f;background:radial-gradient(circle,#9b66252e,#070907db);border-color:#e2b5655c;box-shadow:inset 0 0 12px #0000007a;}
.theme-fantasy .game-world .world-service-icon .world-icon {color:inherit;}
.theme-fantasy .game-world .world-service strong {color:#e7d9c0;}
.theme-fantasy .game-world .world-service small {color:#9c957f;}
.theme-fantasy .game-world .world-nav button[aria-current='page'] {color:#f0d39b;background:radial-gradient(at 50% 0,#cfa04f2b,#0000 66%);box-shadow:none;}
.theme-fantasy .game-world .world-nav button[aria-current='page']::before {content:"";position:absolute;top:0;left:13%;right:13%;height:2px;background:linear-gradient(90deg,#0000,#e0b363,#0000);box-shadow:0 0 15px #ddaa506b;pointer-events:none;}
.theme-fantasy .game-world .world-nav button[aria-current='page'] .world-icon {color:#e1b968;filter:drop-shadow(0 0 7px #e1ae5461);}
.theme-fantasy .game-world .world-nav button[aria-current='page'] .world-nav-sigil {filter:drop-shadow(0 0 8px #d2a45547);}
@media (hover:hover) {.theme-fantasy .game-world button.world-service:hover {border-color:#e3b56378;background:radial-gradient(circle at 18%,#d39e4926,#0000 30%),#10130f;}.theme-fantasy .game-world button.world-service:hover .world-service-icon {box-shadow:inset 0 0 15px #d69f431f,0 0 16px #cb95381f;}}

/* Модалка конфликта управления: палитра upgrade-chooser/risk-actions оригинала. */
.theme-fantasy {--theme-control-bg:linear-gradient(#211a10,#120e08);--theme-control-border:#c9992f99;--theme-control-title:#ffe2a0;--theme-control-muted:#a9a18c;--theme-control-kicker:#8fd08f;--theme-control-button:#241b0f;--theme-control-button-border:#6b5124;--theme-control-button-text:#ffeec2;--theme-control-danger:linear-gradient(#7a2a1a,#4a160c);--theme-control-danger-border:#b8452f;}
/* Золотистые полосы прокрутки по цветам исходной темы R2Web. Админка не затрагивается. */
.theme-fantasy {--theme-battle-button-top:#946332;--theme-battle-button-bottom:#332417;--theme-battle-hp-top:#b4483e;--theme-battle-hp-bottom:#762923;--theme-battle-mp-top:#4b83c9;--theme-battle-mp-bottom:#233963;--theme-battle-xp-top:#c9a762;--theme-battle-xp-bottom:#81643b;scrollbar-color:#946432 #040604;scrollbar-width:thin;}
.theme-fantasy * {scrollbar-color:#946432 #040604;scrollbar-width:thin;}
.theme-fantasy ::-webkit-scrollbar {width:7px;height:7px;}
.theme-fantasy ::-webkit-scrollbar-track {background:#040604c7;}
.theme-fantasy ::-webkit-scrollbar-thumb {background:linear-gradient(#b17c3e,#654622);border:1px solid #080a07;}
html:has(body.theme-fantasy) {scrollbar-color:#946432 #040604;scrollbar-width:thin;}
html:has(body.theme-fantasy)::-webkit-scrollbar {width:7px;height:7px;}
html:has(body.theme-fantasy)::-webkit-scrollbar-track {background:#040604c7;}
html:has(body.theme-fantasy)::-webkit-scrollbar-thumb {background:linear-gradient(#b17c3e,#654622);border:1px solid #080a07;}
