/* Темы макета game-viz: тёмная (по умолчанию) и светлая */

.mode-toggle,
.theme-toggle,
.viz-toolbar .theme-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--gv-toggle-bg, rgba(42, 34, 24, 0.9));
  border: 1px solid var(--gv-border-gold-20, rgba(212, 168, 75, 0.2));
}
.mode-toggle button,
.theme-toggle button {
  border: none;
  background: transparent;
  color: var(--gv-toggle-text, rgba(244, 228, 193, 0.72));
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mode-toggle button.active,
.theme-toggle button.active {
  background: var(--gv-toggle-active-bg, #7e57c2);
  color: var(--gv-toggle-active-text, #fff);
}

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --gv-page-bg: #1a1410;
  --gv-page-bg-gradient-1: rgba(212, 168, 75, 0.08);
  --gv-page-bg-gradient-2: rgba(155, 127, 212, 0.06);

  --gv-ink: #f4e4c1;
  --gv-ink-80: rgba(244, 228, 193, 0.88);
  --gv-ink-70: rgba(244, 228, 193, 0.78);
  --gv-ink-65: rgba(244, 228, 193, 0.72);
  --gv-ink-60: rgba(244, 228, 193, 0.66);
  --gv-ink-55: rgba(244, 228, 193, 0.6);
  --gv-ink-50: rgba(244, 228, 193, 0.54);
  --gv-ink-45: rgba(244, 228, 193, 0.48);
  --gv-ink-40: rgba(244, 228, 193, 0.42);
  --gv-ink-35: rgba(244, 228, 193, 0.36);

  --gv-gold: #d4a84b;
  --gv-gold-90: rgba(212, 168, 75, 0.9);
  --gv-gold-80: rgba(212, 168, 75, 0.8);
  --gv-mana: #9b7fd4;

  --gv-surface-30: rgba(0, 0, 0, 0.3);
  --gv-surface-40: rgba(0, 0, 0, 0.4);
  --gv-surface-50: rgba(0, 0, 0, 0.5);
  --gv-surface-60: rgba(0, 0, 0, 0.6);
  --gv-surface-85: rgba(0, 0, 0, 0.85);

  --gv-border-ink-20: rgba(244, 228, 193, 0.2);
  --gv-border-gold-10: rgba(212, 168, 75, 0.1);
  --gv-border-gold-15: rgba(212, 168, 75, 0.15);
  --gv-border-gold-20: rgba(212, 168, 75, 0.2);
  --gv-border-gold-25: rgba(212, 168, 75, 0.25);
  --gv-border-gold-30: rgba(212, 168, 75, 0.3);
  --gv-border-gold-35: rgba(212, 168, 75, 0.35);

  --gv-parchment-from: rgba(58, 48, 36, 0.95);
  --gv-parchment-to: rgba(42, 34, 24, 0.98);
  --gv-parchment-border: rgba(212, 168, 75, 0.35);
  --gv-parchment-inset: rgba(255, 235, 200, 0.08);
  --gv-parchment-shadow: rgba(0, 0, 0, 0.5);

  --gv-toolbar-bg: rgba(0, 0, 0, 0.85);
  --gv-toggle-bg: rgba(42, 34, 24, 0.9);
  --gv-toggle-text: rgba(244, 228, 193, 0.72);
  --gv-toggle-active-bg: #7e57c2;
  --gv-toggle-active-text: #fff;

  --gv-viewport-bg: #1a1410;
  --gv-viewport-border: rgba(212, 168, 75, 0.2);
  --gv-viewport-shadow: rgba(0, 0, 0, 0.55);

  --gv-mobile-nav-from: rgba(26, 20, 16, 0.98);
  --gv-mobile-nav-to: rgba(42, 34, 24, 1);
  --gv-portrait-from: rgba(42, 34, 24, 0.95);
  --gv-portrait-to: rgba(20, 16, 12, 1);
  --gv-portrait-icon: rgba(212, 168, 75, 0.55);

  --gv-hover-row: rgba(212, 168, 75, 0.08);
  --gv-select-bg: rgba(0, 0, 0, 0.5);
  --gv-input-bg: rgba(0, 0, 0, 0.4);
}

/* Светлая (без именованных палитр — milk/dust/forest задают свои переменные ниже) */
html[data-theme="light"]:not([data-palette="guild-milk"]):not([data-palette="guild-dust"]):not([data-palette="guild-forest"]) {
  color-scheme: light;
  --gv-page-bg: #e8e0d0;
  --gv-page-bg-gradient-1: rgba(212, 168, 75, 0.14);
  --gv-page-bg-gradient-2: rgba(126, 87, 194, 0.08);

  --gv-ink: #1a1208;
  --gv-ink-80: #2a2218;
  --gv-ink-70: #342a1e;
  --gv-ink-65: #3b3124;
  --gv-ink-60: #42382a;
  --gv-ink-55: #4a4030;
  --gv-ink-50: #524836;
  --gv-ink-45: #5a503c;
  --gv-ink-40: #645a46;
  --gv-ink-35: #6e6450;

  --gv-gold: #6b4a00;
  --gv-gold-90: #5c3f00;
  --gv-gold-80: #4d3500;
  --gv-mana: #5b21b6;

  --gv-surface-30: rgba(255, 255, 255, 0.72);
  --gv-surface-40: rgba(255, 255, 255, 0.82);
  --gv-surface-50: rgba(255, 255, 255, 0.88);
  --gv-surface-60: rgba(255, 255, 255, 0.92);
  --gv-surface-85: rgba(252, 248, 240, 0.98);

  --gv-border-ink-20: rgba(26, 18, 8, 0.16);
  --gv-border-gold-10: rgba(107, 74, 0, 0.14);
  --gv-border-gold-15: rgba(107, 74, 0, 0.2);
  --gv-border-gold-20: rgba(107, 74, 0, 0.26);
  --gv-border-gold-25: rgba(107, 74, 0, 0.32);
  --gv-border-gold-30: rgba(107, 74, 0, 0.38);
  --gv-border-gold-35: rgba(107, 74, 0, 0.44);

  --gv-parchment-from: #fffdf8;
  --gv-parchment-to: #f5eedc;
  --gv-parchment-border: rgba(107, 74, 0, 0.38);
  --gv-parchment-inset: rgba(255, 255, 255, 0.95);
  --gv-parchment-shadow: rgba(26, 18, 8, 0.1);

  --gv-toolbar-bg: rgba(252, 248, 240, 0.98);
  --gv-toggle-bg: rgba(255, 255, 255, 0.92);
  --gv-toggle-text: #4a4030;
  --gv-toggle-active-bg: #7e57c2;
  --gv-toggle-active-text: #fff;

  --gv-viewport-bg: #f3ede0;
  --gv-viewport-border: rgba(107, 74, 0, 0.28);
  --gv-viewport-shadow: rgba(26, 18, 8, 0.12);

  --gv-mobile-nav-from: #f5f0e4;
  --gv-mobile-nav-to: #ebe4d4;
  --gv-portrait-from: #fffdf8;
  --gv-portrait-to: #ebe2d0;
  --gv-portrait-icon: rgba(107, 74, 0, 0.55);

  --gv-hover-row: rgba(107, 74, 0, 0.1);
  --gv-select-bg: rgba(255, 255, 255, 0.92);
  --gv-input-bg: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] body,
html[data-theme="light"] .viewport-frame,
html[data-theme="light"] .mode-toolbar {
  color: var(--gv-ink);
}

html[data-theme="light"] code {
  color: var(--gv-ink-70);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color: var(--gv-ink) !important;
  background-color: var(--gv-input-bg) !important;
}

/* Tailwind-утилиты → переменные темы */
.text-ink { color: var(--gv-ink) !important; }
.text-ink\/80 { color: var(--gv-ink-80) !important; }
.text-ink\/70 { color: var(--gv-ink-70) !important; }
.text-ink\/65 { color: var(--gv-ink-65) !important; }
.text-ink\/60 { color: var(--gv-ink-60) !important; }
.text-ink\/55 { color: var(--gv-ink-55) !important; }
.text-ink\/50 { color: var(--gv-ink-50) !important; }
.text-ink\/45 { color: var(--gv-ink-45) !important; }
.text-ink\/40 { color: var(--gv-ink-40) !important; }
.text-gold { color: var(--gv-gold) !important; }
.text-gold\/90 { color: var(--gv-gold-90) !important; }
.text-gold\/80 { color: var(--gv-gold-80) !important; }
.text-mana { color: var(--gv-mana) !important; }

.bg-black\/30 { background-color: var(--gv-surface-30) !important; }
.bg-black\/40 { background-color: var(--gv-surface-40) !important; }
.bg-black\/50 { background-color: var(--gv-surface-50) !important; }
.bg-black\/60 { background-color: var(--gv-surface-60) !important; }
.hover\:bg-black\/60:hover { background-color: var(--gv-surface-60) !important; }

.border-ink\/20 { border-color: var(--gv-border-ink-20) !important; }
.border-gold\/10 { border-color: var(--gv-border-gold-10) !important; }
.border-gold\/15 { border-color: var(--gv-border-gold-15) !important; }
.border-gold\/20 { border-color: var(--gv-border-gold-20) !important; }
.border-gold\/25 { border-color: var(--gv-border-gold-25) !important; }
.border-gold\/30 { border-color: var(--gv-border-gold-30) !important; }
.border-gold\/35 { border-color: var(--gv-border-gold-35) !important; }

/* Карточки классов в светлой теме */
html[data-theme="light"] .bg-red-950\/40 { background-color: rgba(254, 242, 242, 0.95) !important; }
html[data-theme="light"] .border-red-600\/60 { border-color: rgba(185, 28, 28, 0.4) !important; }
html[data-theme="light"] .bg-purple-950\/40 { background-color: rgba(245, 243, 255, 0.98) !important; }
html[data-theme="light"] .border-purple-600\/60 { border-color: rgba(126, 34, 206, 0.4) !important; }
html[data-theme="light"] .bg-slate-900\/40 { background-color: rgba(241, 245, 249, 0.98) !important; }
html[data-theme="light"] .border-slate-500\/60 { border-color: rgba(71, 85, 105, 0.45) !important; }
html[data-theme="light"] .bg-amber-950\/30 { background-color: rgba(255, 251, 235, 0.98) !important; }
html[data-theme="light"] .border-amber-500\/60 { border-color: rgba(180, 83, 9, 0.4) !important; }
html[data-theme="light"] .bg-amber-900\/40 { background-color: rgba(255, 251, 235, 0.95) !important; }
html[data-theme="light"] .bg-purple-900\/40 { background-color: rgba(243, 232, 255, 0.95) !important; }
html[data-theme="light"] .text-slate-300 { color: #334155 !important; }
html[data-theme="light"] .text-red-400 { color: #b91c1c !important; }
html[data-theme="light"] .text-purple-400 { color: #7e22ce !important; }
html[data-theme="light"]:not([data-palette="guild-milk"]):not([data-palette="guild-dust"]):not([data-palette="guild-forest"]) .text-amber-300 { color: #b45309 !important; }

html[data-theme="light"] .boss-subtab,
html[data-theme="light"] .shop-item,
html[data-theme="light"] .campaign-action-btn,
html[data-theme="light"] .campaign-quick-btn {
  background: var(--gv-surface-40);
  color: var(--gv-ink-65);
}
html[data-theme="light"] .boss-subtab.active,
html[data-theme="light"] .shop-item-buy {
  color: var(--gv-ink);
}
html[data-theme="light"] .shop-item-buy {
  background: rgba(212, 168, 75, 0.22);
  border-color: var(--gv-border-gold-30);
}
html[data-theme="light"] .shop-item-buy:not(:disabled):hover {
  background: rgba(212, 168, 75, 0.34);
}

html[data-theme="light"] .chapter-banner q,
html[data-theme="light"] .verify-title,
html[data-theme="light"] .study-milestone-title,
html[data-theme="light"] .study-topic-name {
  color: var(--gv-ink-70);
}
html[data-theme="light"] .study-milestone-detail,
html[data-theme="light"] .study-topic-meta,
html[data-theme="light"] .boss-demo-note,
html[data-theme="light"] .campaign-cal-row .text-ink\/55 {
  color: var(--gv-ink-55);
}

html[data-theme="light"] .campaign-banner {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.95) 0%, rgba(250, 246, 238, 1) 100%);
}
html[data-theme="light"] .guild-master-card {
  background: linear-gradient(135deg, #fffdf8 0%, #f0e8d6 100%);
  box-shadow: 0 0 24px rgba(107, 74, 0, 0.1);
}
html[data-theme="light"] .cert-guild-summary {
  background: rgba(212, 168, 75, 0.12);
}
html[data-theme="light"] .boss-hp-stack,
html[data-theme="light"] .boss-shield-track,
html[data-theme="light"] .boss-rank-bar {
  background: rgba(26, 18, 8, 0.08);
}
html[data-theme="light"] .study-track-bar,
html[data-theme="light"] .campaign-prep-bar {
  background: var(--gv-surface-50) !important;
}

html[data-theme="light"]:not([data-palette="guild-milk"]):not([data-palette="guild-dust"]):not([data-palette="guild-forest"]) .text-amber-100 { color: #78350f !important; }
html[data-theme="light"]:not([data-palette="guild-milk"]):not([data-palette="guild-dust"]):not([data-palette="guild-forest"]) .text-amber-200 { color: #92400e !important; }

/* Акцент «ММ7» в баннере — цвет палитры, не общий amber light */
html[data-palette="guild-milk"] .guildhall-banner h1 .text-amber-200,
html[data-palette="guild-milk"] h1 span.text-amber-200,
html[data-palette="guild-dust"] .guildhall-banner h1 .text-amber-200,
html[data-palette="guild-dust"] h1 span.text-amber-200,
html[data-palette="guild-forest"] .guildhall-banner h1 .text-amber-200,
html[data-palette="guild-forest"] h1 span.text-amber-200 {
  color: var(--gv-gold) !important;
}

html[data-theme="light"] .profile-modal-head h2,
html[data-theme="light"] .profile-identity h3 {
  color: var(--gv-ink) !important;
}
html[data-theme="light"] .profile-modal-head p,
html[data-theme="light"] .profile-identity .profile-role,
html[data-theme="light"] .profile-meta-inline,
html[data-theme="light"] .profile-meta-inline .label,
html[data-theme="light"] .profile-stat-cell span {
  color: var(--gv-ink-55) !important;
}
html[data-theme="light"] .profile-meta-inline .value-gold,
html[data-theme="light"] .profile-stat-cell strong {
  color: var(--gv-gold) !important;
}
html[data-theme="light"] .profile-meta-inline .value-stat {
  color: #92400e !important;
}
html[data-theme="light"] .profile-stat-cell {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(107, 74, 0, 0.2) !important;
}
html[data-theme="light"] .profile-dl dt {
  color: var(--gv-ink-55) !important;
}
html[data-theme="light"] .profile-dl dd {
  color: var(--gv-gold) !important;
}
html[data-theme="light"] #game-viz-profile-modal .profile-modal__panel {
  color: var(--gv-ink);
}

html[data-theme="light"] .viz-toolbar a {
  color: var(--gv-ink-65);
}

.theme-toggle button[data-theme-opt="light"].active i {
  color: #d97706;
}
.theme-toggle button[data-theme-opt="dark"].active i {
  color: #c4b5fd;
}

/* Палитра guild-milk: 60% молочный голубой фон, 30% карточки, 10% акцент CTA */
html[data-palette="guild-milk"] {
  color-scheme: light;

  /* 60% — доминирующий фон */
  --gv-page-bg: #e4eef6;
  --gv-page-bg-gradient-1: rgba(184, 207, 226, 0.5);
  --gv-page-bg-gradient-2: rgba(143, 184, 210, 0.28);

  /* Текст: высокий контраст на молочном фоне */
  --gv-ink: #1a2d42;
  --gv-ink-80: #243548;
  --gv-ink-70: #2f4156;
  --gv-ink-65: #364a60;
  --gv-ink-60: #3d5268;
  --gv-ink-55: #455a70;
  --gv-ink-50: #4d6378;
  --gv-ink-45: #566c80;
  --gv-ink-40: #5f7588;
  --gv-ink-35: #687e90;

  /* 10% — акцент (CTA, золотые утилиты → бирюза) */
  --gv-gold: #0d6e7a;
  --gv-gold-90: #0c616c;
  --gv-gold-80: #0a545e;
  --gv-mana: #5b7fa8;

  /* 30% — вторичные поверхности */
  --gv-surface-30: rgba(255, 255, 255, 0.55);
  --gv-surface-40: rgba(255, 255, 255, 0.72);
  --gv-surface-50: rgba(248, 252, 255, 0.82);
  --gv-surface-60: rgba(240, 247, 252, 0.9);
  --gv-surface-85: rgba(232, 242, 250, 0.96);

  --gv-border-ink-20: rgba(26, 45, 66, 0.14);
  --gv-border-gold-10: rgba(13, 110, 122, 0.12);
  --gv-border-gold-15: rgba(13, 110, 122, 0.18);
  --gv-border-gold-20: rgba(13, 110, 122, 0.24);
  --gv-border-gold-25: rgba(13, 110, 122, 0.3);
  --gv-border-gold-30: rgba(13, 110, 122, 0.36);
  --gv-border-gold-35: rgba(13, 110, 122, 0.42);

  --gv-parchment-from: #f6fafc;
  --gv-parchment-to: #c5d8e8;
  --gv-parchment-border: rgba(91, 127, 168, 0.42);
  --gv-parchment-inset: rgba(255, 255, 255, 0.92);
  --gv-parchment-shadow: rgba(26, 45, 66, 0.1);

  --gv-toolbar-bg: rgba(232, 242, 250, 0.98);
  --gv-toggle-bg: rgba(255, 255, 255, 0.9);
  --gv-toggle-text: #455a70;
  --gv-toggle-active-bg: #0d6e7a;
  --gv-toggle-active-text: #fff;

  --gv-viewport-bg: #dfeaf4;
  --gv-viewport-border: rgba(91, 127, 168, 0.35);
  --gv-viewport-shadow: rgba(26, 45, 66, 0.1);

  --gv-mobile-nav-from: #e8f2f8;
  --gv-mobile-nav-to: #d4e4f0;
  --gv-portrait-from: #f6fafc;
  --gv-portrait-to: #c8dae8;
  --gv-portrait-icon: rgba(13, 110, 122, 0.55);

  --gv-hover-row: rgba(13, 110, 122, 0.08);
  --gv-select-bg: rgba(255, 255, 255, 0.92);
  --gv-input-bg: rgba(255, 255, 255, 0.94);
}

/* Палитра guild-dust: 60% пыльная роза, 30% карточки, 10% терракотовый акцент */
html[data-palette="guild-dust"] {
  color-scheme: light;

  --gv-page-bg: #f0e6e0;
  --gv-page-bg-gradient-1: rgba(196, 164, 147, 0.38);
  --gv-page-bg-gradient-2: rgba(180, 150, 130, 0.24);

  --gv-ink: #3d2c24;
  --gv-ink-80: #4a3830;
  --gv-ink-70: #57443a;
  --gv-ink-65: #5f4c42;
  --gv-ink-60: #655248;
  --gv-ink-55: #756258;
  --gv-ink-50: #857268;
  --gv-ink-45: #8f7c72;
  --gv-ink-40: #9a877c;
  --gv-ink-35: #a59388;

  --gv-gold: #7c4a2d;
  --gv-gold-90: #6e4028;
  --gv-gold-80: #603723;
  --gv-mana: #9a7b6a;

  --gv-surface-30: rgba(255, 252, 250, 0.55);
  --gv-surface-40: rgba(255, 252, 250, 0.78);
  --gv-surface-50: rgba(250, 245, 242, 0.88);
  --gv-surface-60: rgba(245, 238, 232, 0.92);
  --gv-surface-85: rgba(240, 230, 224, 0.98);

  --gv-border-ink-20: rgba(61, 44, 36, 0.14);
  --gv-border-gold-10: rgba(124, 74, 45, 0.12);
  --gv-border-gold-15: rgba(124, 74, 45, 0.18);
  --gv-border-gold-20: rgba(124, 74, 45, 0.24);
  --gv-border-gold-25: rgba(124, 74, 45, 0.28);
  --gv-border-gold-30: rgba(124, 74, 45, 0.36);
  --gv-border-gold-35: rgba(124, 74, 45, 0.42);

  --gv-parchment-from: #faf5f2;
  --gv-parchment-to: #c4a493;
  --gv-parchment-border: rgba(124, 74, 45, 0.34);
  --gv-parchment-inset: rgba(255, 252, 250, 0.92);
  --gv-parchment-shadow: rgba(61, 44, 36, 0.12);

  --gv-toolbar-bg: rgba(240, 230, 224, 0.98);
  --gv-toggle-bg: rgba(255, 252, 250, 0.9);
  --gv-toggle-text: #756258;
  --gv-toggle-active-bg: #7c4a2d;
  --gv-toggle-active-text: #fff;

  --gv-viewport-bg: #ebe0d8;
  --gv-viewport-border: rgba(124, 74, 45, 0.32);
  --gv-viewport-shadow: rgba(61, 44, 36, 0.1);

  --gv-mobile-nav-from: #ede4df;
  --gv-mobile-nav-to: #dcc9be;
  --gv-portrait-from: #faf5f2;
  --gv-portrait-to: #d4b8a8;
  --gv-portrait-icon: rgba(124, 74, 45, 0.55);

  --gv-hover-row: rgba(124, 74, 45, 0.08);
  --gv-select-bg: rgba(255, 252, 250, 0.92);
  --gv-input-bg: rgba(255, 252, 250, 0.94);
}

/* Палитра guild-forest: 60% лесной фон, 30% шалфейные карточки, 10% изумрудный акцент */
html[data-palette="guild-forest"] {
  color-scheme: light;

  --gv-page-bg: #edf3ed;
  --gv-page-bg-gradient-1: rgba(168, 196, 168, 0.42);
  --gv-page-bg-gradient-2: rgba(120, 160, 130, 0.26);

  --gv-ink: #1a2e24;
  --gv-ink-80: #223830;
  --gv-ink-70: #2a4236;
  --gv-ink-65: #324a3e;
  --gv-ink-60: #3d5248;
  --gv-ink-55: #4a6256;
  --gv-ink-50: #5a7266;
  --gv-ink-45: #647a6e;
  --gv-ink-40: #6e8478;
  --gv-ink-35: #788e82;

  --gv-gold: #1b6b4a;
  --gv-gold-90: #185f42;
  --gv-gold-80: #15533a;
  --gv-mana: #5b8a72;

  --gv-surface-30: rgba(255, 255, 255, 0.55);
  --gv-surface-40: rgba(255, 255, 255, 0.76);
  --gv-surface-50: rgba(244, 250, 244, 0.88);
  --gv-surface-60: rgba(232, 242, 232, 0.92);
  --gv-surface-85: rgba(237, 243, 237, 0.98);

  --gv-border-ink-20: rgba(26, 46, 36, 0.14);
  --gv-border-gold-10: rgba(27, 107, 74, 0.12);
  --gv-border-gold-15: rgba(27, 107, 74, 0.18);
  --gv-border-gold-20: rgba(27, 107, 74, 0.22);
  --gv-border-gold-25: rgba(27, 107, 74, 0.26);
  --gv-border-gold-30: rgba(27, 107, 74, 0.34);
  --gv-border-gold-35: rgba(27, 107, 74, 0.4);

  --gv-parchment-from: #f4faf4;
  --gv-parchment-to: #b8c9b0;
  --gv-parchment-border: rgba(27, 107, 74, 0.32);
  --gv-parchment-inset: rgba(255, 255, 255, 0.9);
  --gv-parchment-shadow: rgba(26, 46, 36, 0.1);

  --gv-toolbar-bg: rgba(237, 243, 237, 0.98);
  --gv-toggle-bg: rgba(255, 255, 255, 0.9);
  --gv-toggle-text: #4a6256;
  --gv-toggle-active-bg: #1b6b4a;
  --gv-toggle-active-text: #fff;

  --gv-viewport-bg: #e4ede4;
  --gv-viewport-border: rgba(27, 107, 74, 0.3);
  --gv-viewport-shadow: rgba(26, 46, 36, 0.1);

  --gv-mobile-nav-from: #e8f0e8;
  --gv-mobile-nav-to: #d4e4d4;
  --gv-portrait-from: #f4faf4;
  --gv-portrait-to: #b8c9b0;
  --gv-portrait-icon: rgba(27, 107, 74, 0.55);

  --gv-hover-row: rgba(27, 107, 74, 0.08);
  --gv-select-bg: rgba(255, 255, 255, 0.92);
  --gv-input-bg: rgba(255, 255, 255, 0.94);
}

html[data-palette="guild-milk"] body,
html[data-palette="guild-milk"] .viewport-frame,
html[data-palette="guild-milk"] .mode-toolbar,
html[data-palette="guild-dust"] body,
html[data-palette="guild-dust"] .viewport-frame,
html[data-palette="guild-dust"] .mode-toolbar,
html[data-palette="guild-forest"] body,
html[data-palette="guild-forest"] .viewport-frame,
html[data-palette="guild-forest"] .mode-toolbar {
  color: var(--gv-ink);
}

html[data-palette="guild-milk"] .gv-palette-swatch.active {
  border-color: var(--gv-gold);
  box-shadow: 0 0 0 2px rgba(13, 110, 122, 0.22);
}

html[data-palette="guild-dust"] .gv-palette-swatch.active {
  border-color: var(--gv-gold);
  box-shadow: 0 0 0 2px rgba(124, 74, 45, 0.22);
}

html[data-palette="guild-forest"] .gv-palette-swatch.active {
  border-color: var(--gv-gold);
  box-shadow: 0 0 0 2px rgba(27, 107, 74, 0.22);
}

html[data-palette="guild-milk"] .boss-subtab,
html[data-palette="guild-milk"] .shop-item,
html[data-palette="guild-milk"] .campaign-action-btn,
html[data-palette="guild-milk"] .campaign-quick-btn {
  background: var(--gv-surface-40);
  color: var(--gv-ink-65);
}

html[data-palette="guild-milk"] .boss-subtab.active,
html[data-palette="guild-milk"] .shop-item-buy {
  color: var(--gv-ink);
}

html[data-palette="guild-milk"] .shop-item-buy {
  background: rgba(13, 110, 122, 0.14);
  border-color: var(--gv-border-gold-30);
}

html[data-palette="guild-milk"] .shop-item-buy:not(:disabled):hover {
  background: rgba(13, 110, 122, 0.22);
}

html[data-palette="guild-milk"] #quest-status.text-emerald-400,
html[data-palette="guild-milk"] #shop-status.text-emerald-400,
html[data-palette="guild-milk"] #quest-board .text-emerald-400 {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"] .text-red-300,
html[data-palette="guild-milk"] #boss-name {
  color: #b91c1c !important;
}

/* --- game-viz: palette picker + boss dragon (stable-b10) --- */

.gv-palette-picker {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}


.gv-palette-swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.gv-palette-swatch__dot {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 1px 3px rgba(0, 0, 0, 0.35);
}

.gv-palette-swatch:hover {
  border-color: var(--gv-border-gold-30, rgba(212, 168, 75, 0.35));
}

.gv-palette-swatch.active {
  border-color: var(--gv-gold, #d4a84b);
  box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.25);
}

.gv-palette-swatch:focus-visible {
  outline: 2px solid var(--gv-mana, #9b7fd4);
  outline-offset: 2px;
}

html[data-theme="light"] .gv-palette-swatch__dot {
  box-shadow: inset 0 0 0 1px rgba(26, 18, 8, 0.12), 0 1px 2px rgba(26, 18, 8, 0.15);
}

/* Босс: не обрезать рога дракона */
#section-boss.section-scene,
html[data-mobile-ui] #section-boss.section-scene {
  overflow: visible !important;
}

#section-boss .boss-fight-card,
#section-boss .boss-layout,
#section-boss .boss-dragon-wrap {
  overflow: visible !important;
}

.boss-dragon-wrap {
  padding: 0.35rem 0.5rem 0;
}

.boss-dragon-svg {
  display: block;
  width: 6.25rem;
  height: auto;
  margin: 0 auto;
  color: #dc2626;
  overflow: visible;
}

@media (min-width: 640px) {
  .boss-dragon-svg {
    width: 7.25rem;
  }
}

/* guild-milk: контраст и согласованность (навигация, шапка, меню, босс) */

/* —— Шапка / навигация —— */
html[data-palette="guild-milk"] .mode-toolbar-nav-link,
html[data-palette="guild-milk"] .mode-toolbar [data-top-nav] {
  color: var(--gv-ink-70) !important;
  border-color: var(--gv-border-gold-25) !important;
  background: var(--gv-surface-50) !important;
}

html[data-palette="guild-milk"] .mode-toolbar [data-top-nav][aria-current="page"],
html[data-palette="guild-milk"] .mode-toolbar-nav-link[aria-current="page"] {
  color: var(--gv-gold) !important;
  border-color: var(--gv-border-gold-35) !important;
  background: rgba(13, 110, 122, 0.12) !important;
}

html[data-palette="guild-milk"] .mode-toolbar-sep {
  color: var(--gv-ink-40) !important;
}

html[data-palette="guild-milk"] .mode-toolbar-pill--gold {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: var(--gv-border-gold-25) !important;
  color: #8b5a14 !important;
}

html[data-palette="guild-milk"] .mode-toolbar-pill--gold .fa-coins {
  color: #b45309 !important;
}

html[data-palette="guild-milk"] .mode-toolbar-pill--mana {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(91, 127, 168, 0.35) !important;
  color: var(--gv-mana) !important;
}

html[data-palette="guild-milk"] .mode-toolbar [data-guild-mana-timer] {
  color: var(--gv-ink-50) !important;
}

html[data-palette="guild-milk"] .user-menu-trigger {
  background: var(--gv-surface-50) !important;
  border-color: var(--gv-border-gold-30) !important;
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"] .user-menu-trigger:hover {
  background: rgba(13, 110, 122, 0.1) !important;
}

html[data-palette="guild-milk"] .user-menu-trigger .text-gold {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-milk"] .user-menu-dropdown {
  background: var(--gv-surface-85) !important;
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: 0 12px 32px rgba(26, 45, 66, 0.14) !important;
}

html[data-palette="guild-milk"] .user-menu-dropdown__name {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"] .user-menu-dropdown__class {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-milk"] .user-menu-dropdown__meta {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"] .user-menu-dropdown__meta strong {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-milk"] .user-menu-dropdown__meta .user-menu-dropdown__stat {
  color: #8b5a14 !important;
}

html[data-palette="guild-milk"] .user-menu-dropdown__meta--xp strong {
  color: var(--gv-ink-70) !important;
}

html[data-palette="guild-milk"] .user-menu-dropdown__label {
  color: var(--gv-ink-45) !important;
}

html[data-palette="guild-milk"] .user-menu-item {
  background: var(--gv-surface-40) !important;
  border-color: var(--gv-border-ink-20) !important;
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"] .user-menu-item--danger {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
}

/* —— Баннер заголовка (30% вторичный, тёмный текст) —— */
html[data-palette="guild-milk"] .page-hero-header {
  background: linear-gradient(180deg, #dce8f2 0%, #c5d8e8 100%) !important;
  border-bottom-color: var(--gv-border-gold-20) !important;
}

html[data-palette="guild-milk"] .guildhall-banner {
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}

html[data-palette="guild-milk"] .guildhall-banner::before {
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 82% 22%, rgba(184, 207, 226, 0.45), transparent 40%),
    linear-gradient(180deg, #eef4f9 0%, #c5d8e8 100%) !important;
}

html[data-palette="guild-milk"] .guildhall-banner::after {
  background: linear-gradient(180deg, transparent, rgba(91, 127, 168, 0.08)) !important;
}

html[data-palette="guild-milk"] .page-hero-header .guildhall-banner h1,
html[data-palette="guild-milk"] .guildhall-banner h1 {
  color: var(--gv-ink) !important;
  text-shadow: none !important;
}

html[data-palette="guild-milk"] .page-hero-header .guildhall-banner p {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"] .text-gold {
  color: var(--gv-gold) !important;
}

/* —— Босс —— */
html[data-palette="guild-milk"] .boss-subtab {
  background: var(--gv-surface-40) !important;
  border-color: var(--gv-border-gold-25) !important;
  color: var(--gv-ink-65) !important;
}

html[data-palette="guild-milk"] .boss-subtab.active {
  background: rgba(13, 110, 122, 0.16) !important;
  border-color: var(--gv-border-gold-35) !important;
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"] #boss-name,
html[data-palette="guild-milk"] .boss-title-fantasy {
  color: #9f1239 !important;
  text-shadow: none !important;
}

html[data-palette="guild-milk"] #boss-status {
  color: var(--gv-ink-50) !important;
}

html[data-palette="guild-milk"] #boss-hp-text,
html[data-palette="guild-milk"] .text-red-300 {
  color: #b91c1c !important;
}

html[data-palette="guild-milk"] #boss-attack-btn,
html[data-palette="guild-dust"] #boss-attack-btn,
html[data-palette="guild-forest"] #boss-attack-btn {
  background: var(--gv-gold) !important;
  border-color: var(--gv-border-gold-35) !important;
  color: #fff !important;
}

html[data-palette="guild-milk"] #boss-attack-btn:hover {
  background: #0a5c66 !important;
}

html[data-palette="guild-dust"] #boss-attack-btn:hover {
  background: #6e4028 !important;
}

html[data-palette="guild-forest"] #boss-attack-btn:hover {
  background: #15533a !important;
}

html[data-palette="guild-milk"] #boss-month-btn,
html[data-palette="guild-milk"] #boss-defeat-btn,
html[data-palette="guild-dust"] #boss-month-btn,
html[data-palette="guild-dust"] #boss-defeat-btn,
html[data-palette="guild-forest"] #boss-month-btn,
html[data-palette="guild-forest"] #boss-defeat-btn {
  background: var(--gv-surface-50) !important;
  border-color: var(--gv-border-gold-25) !important;
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"] #boss-month-btn:hover,
html[data-palette="guild-milk"] #boss-defeat-btn:hover,
html[data-palette="guild-dust"] #boss-month-btn:hover,
html[data-palette="guild-dust"] #boss-defeat-btn:hover,
html[data-palette="guild-forest"] #boss-month-btn:hover,
html[data-palette="guild-forest"] #boss-defeat-btn:hover {
  background: var(--gv-surface-60) !important;
}

html[data-palette="guild-milk"] #boss-hp-bar {
  background: rgba(26, 45, 66, 0.1) !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
}

html[data-palette="guild-milk"] .boss-dragon-svg {
  color: #c2410c !important;
}

html[data-palette="guild-milk"] h2.text-gold,
html[data-palette="guild-milk"] .mobile-page > h2 {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"] .mobile-page > p.text-ink\/70,
html[data-palette="guild-milk"] .font-sans.text-ink\/70 {
  color: var(--gv-ink-60) !important;
}


/* guild-milk: сцены и мобильная шапка (без коричневых подложек) */

html[data-palette="guild-milk"] .section-scene {
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: 0 4px 20px rgba(91, 127, 168, 0.12) !important;
}

html[data-palette="guild-milk"] .section-scene::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(197, 216, 232, 0.25) 100%
  ) !important;
}

html[data-palette="guild-milk"] .scene-guildhall::before,
html[data-palette="guild-milk"] #section-home.scene-guildhall::before {
  background-image: linear-gradient(
    165deg,
    #eef4f9 0%,
    #dce8f2 45%,
    #c5d8e8 100%
  ) !important;
  filter: none !important;
}

html[data-palette="guild-milk"] .scene-quests::before {
  background-image: linear-gradient(
    105deg,
    #e8f2f8 0%,
    #d4e4f0 50%,
    #c5d8e8 100%
  ) !important;
}

html[data-palette="guild-milk"] .scene-quests::after {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.25),
    rgba(197, 216, 232, 0.15) 60%,
    transparent
  ) !important;
}

html[data-palette="guild-milk"] .scene-boss::before {
  background-image: linear-gradient(
    180deg,
    #eef4f9 0%,
    #e0ecf6 40%,
    #d4e4f0 100%
  ) !important;
  filter: none !important;
}

html[data-palette="guild-milk"] .scene-achievements::before,
html[data-palette="guild-milk"] .scene-shop::before {
  background-image: linear-gradient(
    180deg,
    #eef4f9 0%,
    #c5d8e8 100%
  ) !important;
  filter: none !important;
}

html[data-palette="guild-milk"] #section-quests.section-scene {
  border-color: var(--gv-border-gold-30) !important;
  box-shadow: 0 4px 18px rgba(91, 127, 168, 0.14) !important;
}

html[data-palette="guild-milk"] header.page-hero-header {
  background: linear-gradient(180deg, #dce8f2 0%, #c5d8e8 100%) !important;
}

html[data-palette="guild-milk"] .mobile-chrome {
  background: var(--gv-surface-60) !important;
  border-color: var(--gv-border-gold-20) !important;
}

html[data-palette="guild-milk"] .mobile-chrome #mobile-page-title,
html[data-palette="guild-milk"] .mobile-chrome .text-gold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"] .mobile-chrome .text-\[10px\] {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"] .mobile-chrome .bg-amber-900\/40 {
  background: rgba(255, 255, 255, 0.82) !important;
  color: #8b5a14 !important;
  border: 1px solid var(--gv-border-gold-20);
}

html[data-palette="guild-milk"] .mobile-chrome .bg-purple-900\/40 {
  background: rgba(255, 255, 255, 0.82) !important;
  color: var(--gv-mana) !important;
  border: 1px solid rgba(91, 127, 168, 0.28) !important;
}

html[data-palette="guild-milk"] .mobile-bottom-nav button {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"][data-page-scope="boss"] .mobile-bottom-nav [data-page="boss"],
html[data-palette="guild-milk"][data-page-scope="home"] .mobile-bottom-nav [data-page="home"],
html[data-palette="guild-milk"][data-page-scope="quests"] .mobile-bottom-nav [data-page="quests"],
html[data-palette="guild-milk"][data-page-scope="achievements"] .mobile-bottom-nav [data-page="achievements"],
html[data-palette="guild-milk"][data-page-scope="shop"] .mobile-bottom-nav [data-page="shop"] {
  color: var(--gv-gold) !important;
  background: rgba(13, 110, 122, 0.14) !important;
}


/* guild-milk + мобильная вёрстка (карточки, квесты, магазин, ачивки) */

html[data-palette="guild-milk"][data-mobile-ui] #section-achievements.section-scene,
html[data-palette="guild-milk"][data-mobile-ui] #section-quests.section-scene,
html[data-palette="guild-milk"][data-mobile-ui] #section-shop.section-scene,
html[data-palette="guild-milk"][data-mobile-ui] #section-boss.section-scene,
html[data-palette="guild-milk"][data-mobile-ui] #section-home.section-scene {
  border-color: var(--gv-border-gold-25) !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card,
html[data-palette="guild-milk"][data-mobile-ui] .shop-item,
html[data-palette="guild-milk"][data-mobile-ui] #section-home > .parchment-card {
  border-color: var(--gv-border-gold-25) !important;
  border-left-color: var(--gv-gold) !important;
  box-shadow: 0 4px 14px rgba(91, 127, 168, 0.12) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .font-semibold.text-gold,
html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-gold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-ink\/60 {
  color: var(--gv-ink-60) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-ink\/50 {
  color: var(--gv-ink-50) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-emerald-400 {
  color: #047857 !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-amber-600 {
  color: #b45309 !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-yellow-500 {
  color: #a16207 !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-gray-400 {
  color: var(--gv-ink-40) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-amber-300\/90,
html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .fa-coins.text-amber-300\/90 {
  color: #b45309 !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #section-achievements > h2.text-gold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #quest-board .parchment-card h3,
html[data-palette="guild-milk"][data-mobile-ui] #quest-board .parchment-card .text-gold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #quest-board .parchment-card p:not(.text-amber-300),
html[data-palette="guild-milk"][data-mobile-ui] #quest-board .parchment-card .text-ink\/60,
html[data-palette="guild-milk"][data-mobile-ui] #quest-board .parchment-card .text-ink\/50 {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] .shop-item .text-gold,
html[data-palette="guild-milk"][data-mobile-ui] .shop-item .font-semibold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] .shop-item .text-ink\/60,
html[data-palette="guild-milk"][data-mobile-ui] .shop-item .text-ink\/50 {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] .mobile-bottom-nav {
  background: linear-gradient(
    180deg,
    var(--gv-mobile-nav-from),
    var(--gv-mobile-nav-to)
  ) !important;
  border-top-color: var(--gv-border-gold-20) !important;
}

html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="home"] .mobile-bottom-nav [data-page="home"],
html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="quests"] .mobile-bottom-nav [data-page="quests"],
html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="boss"] .mobile-bottom-nav [data-page="boss"],
html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="achievements"] .mobile-bottom-nav [data-page="achievements"],
html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="shop"] .mobile-bottom-nav [data-page="shop"] {
  color: var(--gv-gold) !important;
  background: rgba(13, 110, 122, 0.14) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #app-viewport.viewport-mobile {
  background-color: var(--gv-page-bg) !important;
}


/* guild-milk + mobile */
html[data-palette="guild-milk"][data-mobile-ui] #section-achievements.section-scene,
html[data-palette="guild-milk"][data-mobile-ui] #section-quests.section-scene,
html[data-palette="guild-milk"][data-mobile-ui] #section-shop.section-scene,
html[data-palette="guild-milk"][data-mobile-ui] #section-boss.section-scene,
html[data-palette="guild-milk"][data-mobile-ui] #section-home.section-scene {
  border-color: var(--gv-border-gold-25) !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card,
html[data-palette="guild-milk"][data-mobile-ui] .shop-item,
html[data-palette="guild-milk"][data-mobile-ui] #section-home > .parchment-card {
  border-color: var(--gv-border-gold-25) !important;
  border-left-color: var(--gv-gold) !important;
  box-shadow: 0 4px 14px rgba(91, 127, 168, 0.12) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .font-semibold.text-gold,
html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-gold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-ink\/60 {
  color: var(--gv-ink-60) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-ink\/50 {
  color: var(--gv-ink-50) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-emerald-400 {
  color: #047857 !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-amber-600 {
  color: #b45309 !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-yellow-500 {
  color: #a16207 !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #achievements-mobile .achievement-m-card .text-gray-400 {
  color: var(--gv-ink-40) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #section-achievements > h2.text-gold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #quest-board .parchment-card .text-gold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #quest-board .parchment-card .text-ink\/60,
html[data-palette="guild-milk"][data-mobile-ui] #quest-board .parchment-card .text-ink\/50 {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] .shop-item .text-gold,
html[data-palette="guild-milk"][data-mobile-ui] .shop-item .font-semibold {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] .shop-item .text-ink\/60,
html[data-palette="guild-milk"][data-mobile-ui] .shop-item .text-ink\/50 {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] .mobile-bottom-nav {
  background: linear-gradient(180deg, var(--gv-mobile-nav-from), var(--gv-mobile-nav-to)) !important;
  border-top-color: var(--gv-border-gold-20) !important;
}

html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="achievements"] .mobile-bottom-nav [data-page="achievements"],
html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="home"] .mobile-bottom-nav [data-page="home"],
html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="quests"] .mobile-bottom-nav [data-page="quests"],
html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="boss"] .mobile-bottom-nav [data-page="boss"],
html[data-palette="guild-milk"][data-mobile-ui][data-page-scope="shop"] .mobile-bottom-nav [data-page="shop"] {
  color: var(--gv-gold) !important;
  background: rgba(13, 110, 122, 0.14) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #app-viewport.viewport-mobile {
  background-color: var(--gv-page-bg) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] .mobile-chrome p.text-\[10px\] {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-milk"][data-mobile-ui] #section-home > h2.text-gold,
html[data-palette="guild-milk"][data-mobile-ui] #section-home .parchment-card,
html[data-palette="guild-milk"][data-mobile-ui] #section-home .parchment-card p,
html[data-palette="guild-milk"][data-mobile-ui] #section-home .text-ink\/90 {
  color: var(--gv-ink) !important;
}

/* guild-forest: навигация, шапка, меню */
html[data-palette="guild-forest"] .mode-toolbar-nav-link,
html[data-palette="guild-forest"] .mode-toolbar [data-top-nav] {
  color: var(--gv-ink-70) !important;
  border-color: var(--gv-border-gold-25) !important;
  background: var(--gv-surface-50) !important;
}

html[data-palette="guild-forest"] .mode-toolbar [data-top-nav][aria-current="page"],
html[data-palette="guild-forest"] .mode-toolbar-nav-link[aria-current="page"] {
  color: var(--gv-gold) !important;
  border-color: var(--gv-border-gold-35) !important;
  background: rgba(27, 107, 74, 0.12) !important;
}

html[data-palette="guild-forest"] .mode-toolbar-sep {
  color: var(--gv-ink-40) !important;
}

html[data-palette="guild-forest"] .mode-toolbar-pill--gold {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: var(--gv-border-gold-25) !important;
  color: #14532d !important;
}

html[data-palette="guild-forest"] .mode-toolbar-pill--gold .fa-coins {
  color: #166534 !important;
}

html[data-palette="guild-forest"] .mode-toolbar-pill--mana {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(91, 138, 114, 0.35) !important;
  color: var(--gv-mana) !important;
}

html[data-palette="guild-forest"] .user-menu-trigger {
  background: var(--gv-surface-50) !important;
  border-color: var(--gv-border-gold-30) !important;
  color: var(--gv-ink) !important;
}

html[data-palette="guild-forest"] .user-menu-trigger:hover {
  background: rgba(27, 107, 74, 0.1) !important;
}

html[data-palette="guild-forest"] .user-menu-trigger .text-gold {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown {
  background: var(--gv-surface-85) !important;
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: 0 12px 32px rgba(26, 46, 36, 0.14) !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown__head {
  border-bottom-color: var(--gv-border-gold-20) !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown__name {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown__class {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown__meta {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown__meta strong {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown__meta .user-menu-dropdown__stat {
  color: #14532d !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown__meta--xp strong {
  color: var(--gv-ink-70) !important;
}

html[data-palette="guild-forest"] .user-menu-dropdown__label {
  color: var(--gv-ink-45) !important;
}

html[data-palette="guild-forest"] .user-menu-item {
  background: var(--gv-surface-40) !important;
  border-color: var(--gv-border-ink-20) !important;
  color: var(--gv-ink) !important;
}

html[data-palette="guild-forest"] .user-menu-item:hover {
  background: rgba(27, 107, 74, 0.1) !important;
}

html[data-palette="guild-forest"] .user-menu-item--danger {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
}

html[data-palette="guild-forest"] .text-gold {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-forest"] .page-hero-header {
  background: linear-gradient(180deg, #dce8dc 0%, #b8c9b0 100%) !important;
  border-bottom-color: var(--gv-border-gold-20) !important;
}

html[data-palette="guild-forest"] .guildhall-banner {
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}

html[data-palette="guild-forest"] .guildhall-banner::before {
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 82% 22%, rgba(168, 196, 168, 0.45), transparent 40%),
    linear-gradient(180deg, #eef6ee 0%, #b8c9b0 100%) !important;
}

html[data-palette="guild-forest"] .guildhall-banner::after {
  background: linear-gradient(180deg, transparent, rgba(27, 107, 74, 0.08)) !important;
}

html[data-palette="guild-forest"] .page-hero-header .guildhall-banner h1,
html[data-palette="guild-forest"] .guildhall-banner h1 {
  color: var(--gv-ink) !important;
  text-shadow: none !important;
}

html[data-palette="guild-forest"] .page-hero-header .guildhall-banner p {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-forest"] header.page-hero-header {
  background: linear-gradient(180deg, #dce8dc 0%, #b8c9b0 100%) !important;
}

html[data-palette="guild-forest"] .boss-subtab,
html[data-palette="guild-forest"] .shop-item,
html[data-palette="guild-forest"] .campaign-action-btn,
html[data-palette="guild-forest"] .campaign-quick-btn {
  background: var(--gv-surface-40);
  color: var(--gv-ink-65);
}

html[data-palette="guild-forest"] .shop-item-buy {
  background: rgba(27, 107, 74, 0.14);
  border-color: var(--gv-border-gold-30);
  color: var(--gv-ink);
}

html[data-palette="guild-forest"] .shop-item-buy:not(:disabled):hover {
  background: rgba(27, 107, 74, 0.22);
}

html[data-palette="guild-forest"] #quest-status.text-emerald-400,
html[data-palette="guild-forest"] #shop-status.text-emerald-400,
html[data-palette="guild-forest"] #quest-board .text-emerald-400 {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-forest"] h2.text-gold,
html[data-palette="guild-forest"] .mobile-page > h2 {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-forest"] .section-scene {
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: 0 4px 20px rgba(27, 107, 74, 0.12) !important;
}

html[data-palette="guild-forest"] .scene-guildhall::before,
html[data-palette="guild-forest"] #section-home.scene-guildhall::before,
html[data-palette="guild-forest"] .scene-quests::before,
html[data-palette="guild-forest"] .scene-boss::before,
html[data-palette="guild-forest"] .scene-achievements::before,
html[data-palette="guild-forest"] .scene-shop::before {
  background-image: linear-gradient(180deg, #f4faf4 0%, #b8c9b0 100%) !important;
  filter: none !important;
}

html[data-palette="guild-forest"] .section-scene::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.38) 0%,
    rgba(168, 196, 168, 0.2) 100%
  ) !important;
}

html[data-palette="guild-forest"][data-mobile-ui] #app-viewport.viewport-mobile {
  background-color: var(--gv-page-bg) !important;
}

html[data-palette="guild-forest"][data-mobile-ui] .mobile-bottom-nav {
  background: linear-gradient(180deg, var(--gv-mobile-nav-from), var(--gv-mobile-nav-to)) !important;
  border-top-color: var(--gv-border-gold-20) !important;
}

/* guild-dust: навигация, баннер, меню профиля */
html[data-palette="guild-dust"] .mode-toolbar-nav-link,
html[data-palette="guild-dust"] .mode-toolbar [data-top-nav] {
  color: var(--gv-ink-70) !important;
  border-color: var(--gv-border-gold-25) !important;
  background: var(--gv-surface-50) !important;
}

html[data-palette="guild-dust"] .mode-toolbar [data-top-nav][aria-current="page"],
html[data-palette="guild-dust"] .mode-toolbar-nav-link[aria-current="page"] {
  color: var(--gv-gold) !important;
  border-color: var(--gv-border-gold-35) !important;
  background: rgba(124, 74, 45, 0.12) !important;
}

html[data-palette="guild-dust"] .mode-toolbar-sep {
  color: var(--gv-ink-40) !important;
}

html[data-palette="guild-dust"] .mode-toolbar-pill--gold {
  background: rgba(255, 252, 250, 0.75) !important;
  border-color: var(--gv-border-gold-25) !important;
  color: #6b3f26 !important;
}

html[data-palette="guild-dust"] .mode-toolbar-pill--gold .fa-coins {
  color: #7c4a2d !important;
}

html[data-palette="guild-dust"] .mode-toolbar-pill--mana {
  background: rgba(255, 252, 250, 0.75) !important;
  border-color: rgba(154, 123, 106, 0.35) !important;
  color: var(--gv-mana) !important;
}

html[data-palette="guild-dust"] .user-menu-trigger {
  background: var(--gv-surface-50) !important;
  border-color: var(--gv-border-gold-30) !important;
  color: var(--gv-ink) !important;
}

html[data-palette="guild-dust"] .user-menu-trigger:hover {
  background: rgba(124, 74, 45, 0.1) !important;
}

html[data-palette="guild-dust"] .user-menu-trigger .text-gold {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown {
  background: var(--gv-surface-85) !important;
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: 0 12px 32px rgba(61, 44, 36, 0.14) !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown__head {
  border-bottom-color: var(--gv-border-gold-20) !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown__name {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown__class {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown__meta {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown__meta strong {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown__meta .user-menu-dropdown__stat {
  color: #7c4a2d !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown__meta--xp strong {
  color: var(--gv-ink-70) !important;
}

html[data-palette="guild-dust"] .user-menu-dropdown__label {
  color: var(--gv-ink-45) !important;
}

html[data-palette="guild-dust"] .user-menu-item {
  background: var(--gv-surface-40) !important;
  border-color: var(--gv-border-ink-20) !important;
  color: var(--gv-ink) !important;
}

html[data-palette="guild-dust"] .user-menu-item:hover {
  background: rgba(124, 74, 45, 0.1) !important;
}

html[data-palette="guild-dust"] .user-menu-item--danger {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
}

html[data-palette="guild-dust"] .page-hero-header,
html[data-palette="guild-dust"] header.page-hero-header {
  background: linear-gradient(180deg, #ede4df 0%, #c4a493 100%) !important;
  border-bottom-color: var(--gv-border-gold-20) !important;
}

html[data-palette="guild-dust"] .guildhall-banner {
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}

html[data-palette="guild-dust"] .guildhall-banner::before {
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 82% 22%, rgba(196, 164, 147, 0.45), transparent 40%),
    linear-gradient(180deg, #faf5f2 0%, #c4a493 100%) !important;
}

html[data-palette="guild-dust"] .guildhall-banner::after {
  background: linear-gradient(180deg, transparent, rgba(124, 74, 45, 0.08)) !important;
}

html[data-palette="guild-dust"] .page-hero-header .guildhall-banner h1,
html[data-palette="guild-dust"] .guildhall-banner h1 {
  color: var(--gv-ink) !important;
  text-shadow: none !important;
}

html[data-palette="guild-dust"] .page-hero-header .guildhall-banner p {
  color: var(--gv-ink-55) !important;
}

html[data-palette="guild-dust"] .text-gold {
  color: var(--gv-gold) !important;
}

html[data-palette="guild-dust"] h2.text-gold,
html[data-palette="guild-dust"] .mobile-page > h2 {
  color: var(--gv-ink) !important;
}

html[data-palette="guild-dust"] .section-scene {
  border-color: var(--gv-border-gold-25) !important;
  box-shadow: 0 4px 20px rgba(124, 74, 45, 0.12) !important;
}

html[data-palette="guild-dust"] .scene-guildhall::before,
html[data-palette="guild-dust"] #section-home.scene-guildhall::before,
html[data-palette="guild-dust"] .scene-quests::before,
html[data-palette="guild-dust"] .scene-boss::before,
html[data-palette="guild-dust"] .scene-achievements::before,
html[data-palette="guild-dust"] .scene-shop::before {
  background-image: linear-gradient(180deg, #faf5f2 0%, #c4a493 100%) !important;
  filter: none !important;
}

html[data-palette="guild-dust"] .section-scene::after {
  background: linear-gradient(
    180deg,
    rgba(255, 252, 250, 0.4) 0%,
    rgba(196, 164, 147, 0.22) 100%
  ) !important;
}

html[data-palette="guild-dust"][data-mobile-ui] #app-viewport.viewport-mobile {
  background-color: var(--gv-page-bg) !important;
}

html[data-palette="guild-dust"][data-mobile-ui] .mobile-bottom-nav {
  background: linear-gradient(180deg, var(--gv-mobile-nav-from), var(--gv-mobile-nav-to)) !important;
  border-top-color: var(--gv-border-gold-20) !important;
}

/* Светлые палитры: +XP, монеты и звёзды наград (квесты / ачивки / магазин) */
html[data-palette="guild-milk"] .text-amber-300,
html[data-palette="guild-milk"] .text-amber-300\/90,
html[data-palette="guild-milk"] .fa-coins.text-amber-300\/90 {
  color: #b45309 !important;
}

html[data-palette="guild-milk"] .text-amber-400,
html[data-palette="guild-milk"] .text-amber-400\/85,
html[data-palette="guild-milk"] .text-amber-600,
html[data-palette="guild-milk"] .text-yellow-500 {
  color: #d97706 !important;
}

html[data-palette="guild-dust"] .text-amber-300,
html[data-palette="guild-dust"] .text-amber-300\/90,
html[data-palette="guild-dust"] .fa-coins.text-amber-300\/90 {
  color: #7c4a2d !important;
}

html[data-palette="guild-dust"] .text-amber-400,
html[data-palette="guild-dust"] .text-amber-400\/85,
html[data-palette="guild-dust"] .text-amber-600,
html[data-palette="guild-dust"] .text-yellow-500 {
  color: #92400e !important;
}

html[data-palette="guild-forest"] .text-amber-300,
html[data-palette="guild-forest"] .text-amber-300\/90,
html[data-palette="guild-forest"] .fa-coins.text-amber-300\/90 {
  color: #14532d !important;
}

html[data-palette="guild-forest"] .text-amber-400,
html[data-palette="guild-forest"] .text-amber-400\/85,
html[data-palette="guild-forest"] .text-amber-600,
html[data-palette="guild-forest"] .text-yellow-500 {
  color: #166534 !important;
}
