/* ==========================================================================
   Лендинг Crypto Tower — дневная тема.
   Подключается после style.css и работает только при html[data-theme="day"].
   Ночная/золотой час остаётся доступна: /?theme=night.
   Принцип: та же сетка и типографика, бумажная основа + бронза вместо
   неонового золота, чтобы текст читался на светлом.
   ========================================================================== */

html[data-theme='day'] {
  --bg: #f4eee2;
  --bg-deep: #efe6d6;
  --panel: #fbf7ee;
  --panel2: #f6f0e4;
  --gold: #8b6110;
  --gold-bright: #6f4c0a;
  --gold-deep: #c2913a;
  --text: #1b160f;
  --muted: #5f5647;
  --border: rgba(27, 22, 15, 0.14);
  --glass: rgba(27, 22, 15, 0.04);
}

html[data-theme='day'] body {
  background: var(--bg);
}

html[data-theme='day'] body::before {
  background:
    radial-gradient(1000px 480px at 50% -160px, rgba(246, 196, 69, 0.24), transparent 66%),
    radial-gradient(760px 520px at 100% 26%, rgba(110, 155, 209, 0.12), transparent 72%),
    radial-gradient(760px 520px at 0% 76%, rgba(139, 97, 16, 0.07), transparent 72%);
}

/* ---------- шапка ---------- */
html[data-theme='day'] .top {
  background: rgba(246, 240, 229, 0.9);
  border-bottom-color: var(--border);
}

html[data-theme='day'] .brand {
  color: #8b6110;
}

html[data-theme='day'] .theme-toggle {
  color: #6f6555;
  border-color: rgba(139, 97, 16, 0.3);
  background: rgba(255, 255, 255, 0.5);
}

html[data-theme='day'] .theme-toggle:hover {
  color: #8b6110;
  border-color: rgba(139, 97, 16, 0.55);
}

html[data-theme='day'] .theme-toggle[data-mode='day'] {
  color: #8b6110;
  border-color: rgba(139, 97, 16, 0.5);
}

html[data-theme='day'] .theme-toggle[data-mode='night'] {
  color: #3f5b8f;
  border-color: rgba(63, 91, 143, 0.4);
}

html[data-theme='day'] .main-nav a {
  color: #5f5647;
}

html[data-theme='day'] .main-nav a:hover {
  color: #8b6110;
  background: rgba(139, 97, 16, 0.08);
}

html[data-theme='day'] .lang-btn {
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--border);
  color: #4b4234;
}

html[data-theme='day'] .lang-menu {
  background: #fbf7ee;
  border-color: var(--border);
  box-shadow: 0 18px 40px rgba(27, 22, 15, 0.14);
}

html[data-theme='day'] .lang-menu li:hover {
  background: rgba(139, 97, 16, 0.1);
  color: #8b6110;
}

html[data-theme='day'] .nav-toggle {
  color: #4b4234;
  border-color: var(--border);
}

/* ---------- герой ---------- */
html[data-theme='day'] .hero {
  background: radial-gradient(1000px 460px at 50% -10%, rgba(246, 196, 69, 0.28), transparent 64%);
}

html[data-theme='day'] .hero-title,
html[data-theme='day'] .hero-phase {
  color: #17120c;
}

html[data-theme='day'] .hero-phase .gold {
  color: #8b6110;
}

html[data-theme='day'] .hero-phase .cube {
  background: linear-gradient(135deg, #e2b45c, #a9791c 60%, #7d560e);
  box-shadow: 0 0 0.32em rgba(139, 97, 16, 0.45);
}

html[data-theme='day'] .hero-sub {
  color: #4b4234;
}

html[data-theme='day'] .live {
  color: #8b6110;
}

/* ---------- кнопки ---------- */
html[data-theme='day'] .btn {
  background: linear-gradient(135deg, #f7d996, #e6b95c 55%, #cf9f37);
  color: #1c1509;
  box-shadow: 0 8px 22px -10px rgba(139, 97, 16, 0.7);
}

html[data-theme='day'] .btn:hover {
  box-shadow: 0 12px 28px -10px rgba(139, 97, 16, 0.8);
  filter: brightness(1.03);
}

html[data-theme='day'] .btn.ghost {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(139, 97, 16, 0.5);
  color: #8b6110;
}

html[data-theme='day'] .btn.ghost:hover {
  background: rgba(139, 97, 16, 0.08);
  box-shadow: 0 8px 22px -12px rgba(139, 97, 16, 0.6);
}

html[data-theme='day'] .btn.pulse {
  animation: day-btn-pulse 3.2s ease-in-out infinite;
}

@keyframes day-btn-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 97, 16, 0.3);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(139, 97, 16, 0);
  }
}

/* ---------- секции ---------- */
html[data-theme='day'] .section.dark {
  background: linear-gradient(180deg, rgba(228, 216, 196, 0.6), rgba(238, 229, 213, 0.9));
  border-block: 1px solid var(--border);
}

html[data-theme='day'] h2 {
  color: #8b6110;
}

html[data-theme='day'] .muted,
html[data-theme='day'] .small {
  color: #5f5647;
}

/* ---------- «Живой мир» ---------- */
html[data-theme='day'] #scene-box {
  background: #cfe3f3;
  box-shadow: 0 26px 60px rgba(27, 22, 15, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

html[data-theme='day'] #world::before {
  /* Днём тёмный кадр города не нужен: мягкое небо вместо него. */
  background:
    radial-gradient(900px 420px at 50% -40px, rgba(255, 236, 190, 0.9), transparent 62%),
    linear-gradient(180deg, #dfeaf4 0%, #eef0e6 62%, #efe7d6 100%);
  filter: none;
}

html[data-theme='day'] #world::after {
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    rgba(244, 238, 226, 0.18) 16%,
    rgba(244, 238, 226, 0.22) 84%,
    var(--bg) 100%
  );
}

html[data-theme='day'] #scene-loader {
  background: rgba(246, 241, 230, 0.94);
}

html[data-theme='day'] .loader-title {
  color: #8b6110;
}

html[data-theme='day'] .loader-text {
  color: #4b4234;
}

html[data-theme='day'] .loader-track {
  background: #e2d6bd;
}

html[data-theme='day'] .loader-bar {
  background: linear-gradient(90deg, #b8872a, #e0b156);
}

html[data-theme='day'] #scene-loader.failed .loader-text {
  color: #a53b2a;
}

html[data-theme='day'] #scene-hint {
  left: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 6px;
  color: #2f2a22;
  background: rgba(255, 252, 244, 0.78);
  box-shadow: 0 2px 8px rgba(27, 22, 15, 0.12);
  text-shadow: none;
}

html[data-theme='day'] #scene-phase {
  color: #8b6110;
  border-color: rgba(139, 97, 16, 0.4);
  background: rgba(252, 248, 238, 0.82);
}

/* ---------- «Вселенная» ---------- */
html[data-theme='day'] #universe {
  background:
    radial-gradient(1100px 520px at 50% 0%, rgba(246, 196, 69, 0.18), transparent 64%),
    linear-gradient(180deg, #f6f0e3 0%, #f1e8d7 52%, #f6f0e3 100%);
}

html[data-theme='day'] .universe-lattice {
  background-image:
    linear-gradient(0deg, rgba(139, 97, 16, 0.12) 1px, transparent 1px),
    linear-gradient(60deg, rgba(139, 97, 16, 0.1) 1px, transparent 1px),
    linear-gradient(120deg, rgba(58, 106, 160, 0.08) 1px, transparent 1px);
  opacity: 0.5;
}

html[data-theme='day'] .universe-haze {
  background:
    radial-gradient(460px 300px at 16% 86%, rgba(246, 196, 69, 0.3), transparent 70%),
    radial-gradient(520px 340px at 86% 18%, rgba(226, 180, 92, 0.24), transparent 72%),
    radial-gradient(620px 420px at 56% 112%, rgba(246, 196, 69, 0.16), transparent 74%);
}

html[data-theme='day'] .universe-icosahedron {
  stroke: rgba(139, 97, 16, 0.55);
  opacity: 0.2;
}

html[data-theme='day'] .tag {
  border-color: rgba(139, 97, 16, 0.45);
  color: #8b6110;
  background: rgba(255, 255, 255, 0.35);
}

html[data-theme='day'] .universe-title {
  background: linear-gradient(135deg, #a97a1e, #7d560e 48%, #5f400a 84%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

html[data-theme='day'] .universe-logline {
  color: #4b4234;
}

html[data-theme='day'] .universe-card {
  background:
    radial-gradient(240px 160px at 86% -12%, var(--accent-soft), transparent 70%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.82), rgba(250, 245, 235, 0.6));
  box-shadow: 0 14px 32px rgba(27, 22, 15, 0.1);
}

html[data-theme='day'] .universe-card:hover {
  box-shadow: 0 20px 40px rgba(27, 22, 15, 0.14), 0 0 26px var(--accent-soft);
}

html[data-theme='day'] .universe-card--void {
  --accent: #2f6fb0;
  --accent-soft: rgba(47, 111, 176, 0.12);
  --accent-border: rgba(47, 111, 176, 0.4);
}

html[data-theme='day'] .universe-card--lux {
  --accent: #9a6c12;
  --accent-soft: rgba(154, 108, 18, 0.12);
  --accent-border: rgba(154, 108, 18, 0.4);
}

html[data-theme='day'] .universe-card--role {
  --accent: #8b6110;
  --accent-soft: rgba(139, 97, 16, 0.1);
  --accent-border: rgba(139, 97, 16, 0.36);
}

html[data-theme='day'] .universe-card-title {
  color: #17120c;
}

html[data-theme='day'] .universe-card-text {
  color: #554c3e;
}

html[data-theme='day'] .universe-icon {
  box-shadow: none;
}

/* ---------- текстовые блоки ---------- */
html[data-theme='day'] .about h3,
html[data-theme='day'] .card h3,
html[data-theme='day'] .rm-item h3,
html[data-theme='day'] .rules b {
  color: #17120c;
}

html[data-theme='day'] .about p,
html[data-theme='day'] .about-list li,
html[data-theme='day'] .rules li,
html[data-theme='day'] .download-sub,
html[data-theme='day'] .rm-item p,
html[data-theme='day'] .apk-note {
  color: #4b4234;
}

html[data-theme='day'] .rules li:hover {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--border);
}

html[data-theme='day'] .rules li::before,
html[data-theme='day'] .about-list li::before {
  color: #8b6110;
}

html[data-theme='day'] .about-list li {
  background: rgba(255, 255, 255, 0.45);
}

html[data-theme='day'] .card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.4));
  box-shadow: 0 16px 40px rgba(27, 22, 15, 0.1);
}

html[data-theme='day'] .chip {
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--border);
}

html[data-theme='day'] .chip b {
  color: #8b6110;
}

html[data-theme='day'] th {
  color: #6f6555;
}

html[data-theme='day'] td,
html[data-theme='day'] th {
  border-bottom-color: var(--border);
}

/* ---------- роудмап ---------- */
html[data-theme='day'] .rm-item {
  border-left-color: rgba(27, 22, 15, 0.18);
}

html[data-theme='day'] .rm-item::before {
  background: #9a9182;
  box-shadow: 0 0 0 4px rgba(27, 22, 15, 0.06);
}

html[data-theme='day'] .rm-item.done .rm-status {
  color: #1f7a4c;
  border-color: rgba(31, 122, 76, 0.4);
}

html[data-theme='day'] .rm-item.progress .rm-status {
  color: #8b6110;
  border-color: rgba(139, 97, 16, 0.4);
}

html[data-theme='day'] .rm-status {
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--border);
  color: #5f5647;
}

html[data-theme='day'] .rm-bar {
  background: #e3d8c3;
}

html[data-theme='day'] .rm-bar-fill {
  background: linear-gradient(90deg, #b8872a, #e0b156);
}

html[data-theme='day'] .rm-pct b {
  color: #8b6110;
}

/* ---------- скачать ---------- */
html[data-theme='day'] .store-btn {
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--border);
  color: #4b4234;
}

html[data-theme='day'] .store-btn svg {
  color: #8b6110;
}

html[data-theme='day'] .store-btn .soon {
  color: #8b6110;
  border-color: rgba(139, 97, 16, 0.4);
}

html[data-theme='day'] .store-btn.apk {
  border-color: rgba(139, 97, 16, 0.5);
  background: linear-gradient(160deg, rgba(246, 196, 69, 0.26), rgba(246, 196, 69, 0.08));
}

html[data-theme='day'] .store-btn.apk:hover {
  border-color: #8b6110;
  box-shadow: 0 10px 26px -12px rgba(139, 97, 16, 0.6);
}

/* ---------- формы ---------- */
html[data-theme='day'] .subscribe input[type='email'],
html[data-theme='day'] .feedback-form input,
html[data-theme='day'] .feedback-form textarea {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border);
  color: #1b160f;
}

html[data-theme='day'] input::placeholder,
html[data-theme='day'] textarea::placeholder {
  color: #8a8172;
}

html[data-theme='day'] input:focus-visible,
html[data-theme='day'] textarea:focus-visible {
  border-color: #8b6110;
  box-shadow: 0 0 0 3px rgba(139, 97, 16, 0.14);
}

html[data-theme='day'] .form-status.ok {
  color: #1f7a4c;
}

html[data-theme='day'] .form-status.err {
  color: #a53b2a;
}

/* ---------- подвал ---------- */
html[data-theme='day'] footer {
  border-top-color: var(--border);
  color: #5f5647;
}

html[data-theme='day'] footer a:hover {
  color: #8b6110;
}

/* ---------- мелочи ---------- */
html[data-theme='day'] .key-medal {
  color: #1a1300;
}

html[data-theme='day'] #keys .key-item {
  border-bottom-color: var(--border);
}

html[data-theme='day'] .reveal {
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ---------- лор / сериал-книга (страница /lore/ и блок на главной) ---------- */
html[data-theme='day'] .lore-section::before {
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(246, 196, 69, 0.22), transparent 62%),
    radial-gradient(760px 380px at 88% 18%, rgba(12, 106, 96, 0.08), transparent 66%);
}

html[data-theme='day'] .lore-law {
  border-color: rgba(139, 97, 16, 0.28);
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme='day'] .lore-law:hover {
  border-color: rgba(139, 97, 16, 0.5);
}

html[data-theme='day'] .lore-law h3,
html[data-theme='day'] .lore-subtitle,
html[data-theme='day'] .lore-char h4 {
  color: #17120c;
}

html[data-theme='day'] .lore-law p,
html[data-theme='day'] .lore-tome li,
html[data-theme='day'] .lore-char p,
html[data-theme='day'] .lore-quotes cite,
html[data-theme='day'] .lore-lead {
  color: #5a5142;
}

html[data-theme='day'] .lore-quotes blockquote {
  background: rgba(246, 196, 69, 0.16);
  border-left-color: #8b6110;
}

html[data-theme='day'] .lore-quotes p {
  color: #6f4c0a;
}

html[data-theme='day'] .lore-quotes blockquote.cyan {
  border-left-color: #0c6a60;
  background: rgba(12, 106, 96, 0.08);
}

html[data-theme='day'] .lore-quotes blockquote.cyan p {
  color: #0a534b;
}

html[data-theme='day'] .lore-tome {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.28));
}

html[data-theme='day'] .lore-tome-num {
  -webkit-text-stroke: 1px rgba(139, 97, 16, 0.6);
}

html[data-theme='day'] .lore-tome li::before {
  border-color: rgba(139, 97, 16, 0.65);
}

html[data-theme='day'] .lore-status {
  color: #8b6110;
  border-color: rgba(139, 97, 16, 0.45);
}

html[data-theme='day'] .lore-char {
  background: rgba(255, 255, 255, 0.5);
}

html[data-theme='day'] .lore-role.void {
  color: #a53b2a;
}

html[data-theme='day'] .lore-signal {
  color: #6f4c0a;
}

html[data-theme='day'] .lore-signal span:nth-child(even) {
  color: #0c6a60;
}

html[data-theme='day'] .lore-chip {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(139, 97, 16, 0.28);
}

html[data-theme='day'] .lore-chip:hover {
  border-color: rgba(139, 97, 16, 0.55);
  color: #8b6110;
}

/* ---------- блок закрытого теста в роудмапе ---------- */
html[data-theme='day'] .rm-test {
  border-color: rgba(139, 97, 16, 0.35);
  background: linear-gradient(140deg, rgba(246, 196, 69, 0.2), rgba(12, 106, 96, 0.07));
}

html[data-theme='day'] .rm-test-badge {
  color: #1c1509;
}

html[data-theme='day'] .rm-test h3 {
  color: #17120c;
}

html[data-theme='day'] .rm-test p,
html[data-theme='day'] .rm-test-live,
html[data-theme='day'] .rm-test-note {
  color: #554c3e;
}

html[data-theme='day'] .rm-test-form input[type='email'] {
  background: rgba(255, 255, 255, 0.72);
  color: #1b160f;
}

html[data-theme='day'] .rm-test-status {
  color: #1f7a4c;
}

html[data-theme='day'] .rm-test-share a {
  color: #8b6110;
  border-bottom-color: rgba(139, 97, 16, 0.4);
}

/* ---------- страница заявки /access/ ---------- */
html[data-theme='day'] .access-body {
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(246, 196, 69, 0.3), transparent 66%),
    radial-gradient(720px 440px at 82% 26%, rgba(12, 106, 96, 0.08), transparent 70%),
    var(--bg);
}

html[data-theme='day'] .access-card {
  border-color: rgba(139, 97, 16, 0.32);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(250, 245, 235, 0.6));
  box-shadow: 0 22px 60px rgba(27, 22, 15, 0.14);
}

html[data-theme='day'] .access-logo {
  filter: none;
}

html[data-theme='day'] .access-card h1 {
  color: #8b6110;
}

html[data-theme='day'] .access-card > p,
html[data-theme='day'] .access-note,
html[data-theme='day'] .access-back,
html[data-theme='day'] .access-foot {
  color: #554c3e;
}

html[data-theme='day'] .access-form input[type='email'] {
  background: rgba(255, 255, 255, 0.8);
  color: #1b160f;
}

html[data-theme='day'] .access-status.ok {
  color: #1f7a4c;
}

html[data-theme='day'] .access-status.err {
  color: #a53b2a;
}

html[data-theme='day'] .access-back:hover,
html[data-theme='day'] .access-foot a:hover {
  color: #8b6110;
}

/* ---------- политика конфиденциальности ---------- */
html[data-theme='day'] .privacy-body h2 {
  color: #8b6110;
}

html[data-theme='day'] .privacy-body a {
  color: #8b6110;
}
