/* ============================================================
   YOUR DESTINY v3.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Noto+Serif:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --gold: #d4af37;
  --gold-light: #f4d03f;
  --gold-dark: #aa8c2c;
  --gold-glow: rgba(212, 175, 55, 0.4);
  --glass-bg: rgba(20, 12, 35, 0.72);
  --glass-border: rgba(212, 175, 55, 0.18);
  --text-primary: #f0e6d2;
  --text-secondary: #b8a88a;
  --text-muted: #7a6e5a;
  --danger: #c0392b;
  --success: #27ae60;
  --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-crimson {
  --bg-gradient: linear-gradient(180deg, #3a0f0f 0%, #1a0505 40%, #0d0202 100%);
  --bg-solid: #1a0505;
  --accent: #8b2635;
}
.theme-purple {
  --bg-gradient: linear-gradient(180deg, #1f0f3a 0%, #1a0a2e 40%, #0d0518 100%);
  --bg-solid: #1a0a2e;
  --accent: #5a268b;
}
.theme-emerald {
  --bg-gradient: linear-gradient(180deg, #0f2a0f 0%, #0a1a0a 40%, #050d05 100%);
  --bg-solid: #0a1a0a;
  --accent: #2d6a27;
}
.theme-amber {
  --bg-gradient: linear-gradient(180deg, #2a1f0a 0%, #1a1405 40%, #0d0a02 100%);
  --bg-solid: #1a1405;
  --accent: #b8860b;
}
.theme-sapphire {
  --bg-gradient: linear-gradient(180deg, #0f1f3a 0%, #0a1525 40%, #050a12 100%);
  --bg-solid: #0a1525;
  --accent: #264e8b;
}
.theme-gold {
  --bg-gradient: linear-gradient(180deg, #2a1f0a 0%, #1a1405 40%, #0d0a02 100%);
  --bg-solid: #1a1405;
  --accent: #d4af37;
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Noto Serif', Georgia, serif;
  background: var(--bg-solid);
  color: var(--text-primary);
}

#app-container {
  width: 100%; height: 100%;
  position: fixed; inset: 0;
  background: var(--bg-gradient);
  display: none;
  flex-direction: column;
}
#app-container.active { display: flex; }

#particles-canvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ===== INTRO ===== */
#intro-screen {
  position: fixed; inset: 0;
  z-index: 10000;
  background: linear-gradient(to bottom, #0a0618, #1a0f2e, #0d0508);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-fog {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(180,160,120,0.06), transparent);
  animation: fogRise 4s ease-out forwards;
}

@keyframes fogRise {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.castle-container {
  position: relative;
  width: 200px;
  height: 260px;
  margin-bottom: 36px;
  animation: castleAppear 3.5s ease-out forwards;
}

@keyframes castleAppear {
  0% { opacity: 0; transform: scale(0.55) translateY(40px); }
  40% { opacity: 1; transform: scale(1.05) translateY(-5px); }
  60% { transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.castle-base {
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 170px; height: 110px;
  background: #080510;
  border-radius: 3px 3px 0 0;
}
.castle-tower-left,
.castle-tower-right {
  position: absolute; bottom: 95px;
  width: 46px; height: 95px;
  background: #080510;
  border-radius: 3px 3px 0 0;
}
.castle-tower-left { left: 18px; }
.castle-tower-right { right: 18px; }
.castle-tower-center {
  position: absolute; bottom: 115px; left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 110px;
  background: #080510;
  border-radius: 3px 3px 0 0;
}
.castle-roof-left,
.castle-roof-right {
  position: absolute; bottom: 190px;
  width: 0; height: 0;
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  border-bottom: 48px solid #080510;
}
.castle-roof-left { left: 13px; }
.castle-roof-right { right: 13px; }
.castle-roof-center {
  position: absolute; bottom: 225px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 32px solid transparent;
  border-right: 32px solid transparent;
  border-bottom: 56px solid #080510;
}

.castle-window {
  position: absolute;
  background: var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold), 0 0 28px rgba(212,175,55,0.35);
  animation: windowPulse 2.2s ease-in-out infinite alternate;
}
.win1 { width: 11px; height: 15px; bottom: 130px; left: 32px; animation-delay: 0s; }
.win2 { width: 9px; height: 13px; bottom: 150px; right: 36px; animation-delay: 0.6s; }
.win3 { width: 13px; height: 17px; bottom: 170px; left: 50%; transform: translateX(-50%); animation-delay: 1.1s; }
.win4 { width: 9px; height: 11px; bottom: 70px; left: 55px; animation-delay: 0.3s; }
.win5 { width: 9px; height: 11px; bottom: 70px; right: 55px; animation-delay: 0.9s; }

@keyframes windowPulse {
  from { opacity: 0.5; box-shadow: 0 0 8px var(--gold); }
  to { opacity: 1; box-shadow: 0 0 22px var(--gold-light), 0 0 45px rgba(244,208,63,0.25); }
}

.intro-logo {
  font-family: 'Cinzel', serif;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.25;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(180deg, #fff8dc 0%, var(--gold) 45%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 12px rgba(212,175,55,0.45));
  animation: logoShine 3s ease-in-out infinite;
}

.intro-subtitle {
  margin-top: 14px;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  opacity: 0;
  animation: fadeIn 1.2s ease-out 1.8s forwards;
}

@keyframes logoShine {
  0%, 100% { filter: drop-shadow(0 2px 12px rgba(212,175,55,0.45)); }
  50% { filter: drop-shadow(0 2px 24px rgba(244,208,63,0.7)); }
}

/* ===== HEADER ===== */
.app-header {
  position: relative; z-index: 10;
  padding: 18px 16px 8px;
  text-align: center;
  flex-shrink: 0;
}

.app-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff8dc 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(212,175,55,0.35));
}

.app-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-top: 6px;
  opacity: 0.85;
}

.title-separator {
  width: 70%;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
  position: relative;
  opacity: 0.6;
}

.title-separator::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  box-shadow: 0 0 12px var(--gold-glow);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  position: relative; z-index: 5;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 110px;
  scrollbar-width: none;
}
.main-content::-webkit-scrollbar { display: none; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 8px; right: 8px;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px 20px 28px 28px;
  padding: 8px 4px 22px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(212,175,55,0.08);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  border: 1px solid transparent;
  min-width: 52px;
}

.nav-item.active {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 0 16px rgba(212,175,55,0.12), inset 0 0 10px rgba(212,175,55,0.04);
}

.nav-item:active { transform: scale(0.93); }

.nav-icon {
  width: 22px; height: 22px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  font-family: 'Noto Serif', serif;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  animation: fadeIn 0.5s ease-out;
}
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}
.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  opacity: 0.3;
  letter-spacing: 0.2em;
}

/* ===== CARDS ===== */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}
.card:active { transform: scale(0.97); }

/* ===== SETTINGS ===== */
.settings-group { margin-bottom: 14px; }

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.settings-item:active { transform: scale(0.97); }
.settings-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.settings-icon {
  width: 20px; height: 20px;
  stroke: var(--gold);
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}
.settings-label {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: 'Noto Serif', serif;
}
.settings-value {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Language selector */
.lang-selector {
  display: flex;
  gap: 8px;
}
.lang-btn {
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #1a0a00;
  border-color: var(--gold);
  font-weight: 700;
}
.lang-btn:active { transform: scale(0.95); }

/* Toggle */
.toggle-switch {
  width: 48px; height: 26px;
  background: rgba(255,255,255,0.08);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.toggle-switch.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212,175,55,0.2);
}
.toggle-knob {
  width: 20px; height: 20px;
  background: #e8e0d0;
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.toggle-switch.active .toggle-knob {
  left: 24px;
  background: linear-gradient(135deg, #fff8dc, var(--gold-light));
}

/* Theme colors */
.theme-colors {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 8px 0;
  justify-content: center;
}
.color-option {
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: relative;
}
.color-option::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: var(--transition);
}
.color-option.active {
  border-color: var(--gold);
  box-shadow: 0 0 14px var(--gold-glow);
  transform: scale(1.1);
}
.color-option.active::after {
  border-color: rgba(212,175,55,0.3);
}
.color-option:active { transform: scale(0.9); }

/* Promo */
.promo-input-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}
.promo-input {
  flex: 1;
  padding: 12px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  font-family: 'Noto Serif', serif;
}
.promo-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212,175,55,0.15);
}
.promo-input::placeholder { color: var(--text-muted); }
.promo-btn {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: 12px;
  color: #1a0a00;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.04em;
}
.promo-btn:active { transform: scale(0.95); }

.promo-status {
  margin-top: 10px;
  font-size: 0.82rem;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  width: 100%;
}
.promo-status.success {
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.25);
}
.promo-status.error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.2);
}

/* ===== OVERLAY CLOSE X ===== */
.overlay-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,175,55,0.25);
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
}
.overlay-close-x:active { transform: scale(0.9); background: rgba(212,175,55,0.15); }

/* ===== FATE DILEMMAS ===== */
.fate-overlay {
  position: fixed; inset: 0;
  z-index: 500;
  background: rgba(3, 3, 10, 0.94);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.fate-overlay.active { opacity: 1; }

.fate-container {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.fate-counter {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  opacity: 0.7;
}

.fate-question {
  font-family: 'Noto Serif', serif;
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 28px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.fate-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.fate-btn {
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.03));
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 16px;
  padding: 18px 20px;
  color: var(--text-primary);
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Serif', serif;
  position: relative;
  overflow: hidden;
}

.fate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,175,55,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.fate-btn:hover::before,
.fate-btn:active::before { opacity: 1; }

.fate-btn:active {
  transform: scale(0.97);
  border-color: var(--gold);
}

.fate-result { animation: fadeIn 0.6s ease; }

.fate-stats { margin-bottom: 20px; }

.fate-stat-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.fate-stat-bar:first-child .fate-stat-fill {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.fate-stat-bar:last-child .fate-stat-fill {
  background: linear-gradient(90deg, #c0392b, #e74c3c);
}

.fate-stat-fill {
  height: 8px;
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  flex: 1;
  box-shadow: 0 0 10px rgba(212,175,55,0.2);
}

.fate-stat-label {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold);
  min-width: 50px;
  text-align: right;
}

.fate-analysis {
  font-family: 'Noto Serif', serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(212,175,55,0.05);
  border-radius: 14px;
  border: 1px solid rgba(212,175,55,0.1);
}

.fate-next {
  background: transparent;
  border: none;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 12px 24px;
  position: relative;
  transition: var(--transition);
}

.fate-next::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.fate-next:active { transform: scale(0.95); }

.fate-final { animation: fadeIn 1s ease; }

.fate-final-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}

.fate-final-text {
  font-family: 'Noto Serif', serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.fate-tg-block {
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.fate-tg-block p {
  font-family: 'Noto Serif', serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.fate-tg-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #1a0a00;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 14px;
  text-decoration: none;
  transition: var(--transition);
}

.fate-tg-btn:active { transform: scale(0.95); }

/* Gold particles */
.gold-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--gold-light);
  border-radius: 50%;
  pointer-events: none;
  animation: goldExplode 1.5s ease-out forwards;
  box-shadow: 0 0 10px var(--gold), 0 0 20px rgba(212,175,55,0.5);
}

@keyframes goldExplode {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; }
}

/* ===== LABYRINTH ===== */
.labyrinth-overlay {
  position: fixed; inset: 0;
  z-index: 500;
  background: rgba(3, 3, 10, 0.94);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  overflow-y: auto;
}
.labyrinth-overlay.active { opacity: 1; }

.labyrinth-container {
  width: 100%;
  max-width: 400px;
  text-align: center;
  padding: 20px 0;
}

.labyrinth-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}

.labyrinth-intro p {
  font-family: 'Noto Serif', serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.labyrinth-rules {
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
  text-align: left;
}

.labyrinth-rules p {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.labyrinth-rules p:last-child { margin-bottom: 0; }

.labyrinth-enter-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: 16px;
  color: #1a0a00;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.labyrinth-enter-btn:active { transform: scale(0.95); }

.labyrinth-counter {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.labyrinth-riddle {
  font-family: 'Noto Serif', serif;
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(212,175,55,0.05);
  border-radius: 16px;
  border: 1px solid rgba(212,175,55,0.1);
}

.labyrinth-hints {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.labyrinth-hint-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: rgba(212,175,55,0.1);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.labyrinth-hint-btn.used {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}

.labyrinth-hint-btn:active { transform: scale(0.9); }

.labyrinth-hint-text {
  font-family: 'Noto Serif', serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 14px;
  background: rgba(212,175,55,0.05);
  border-radius: 12px;
  border-left: 3px solid var(--gold);
  display: none;
  text-align: left;
}

.labyrinth-answer-btn {
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.03));
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: 'Noto Serif', serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
}

.labyrinth-answer-btn:active { transform: scale(0.95); }

.labyrinth-answer { animation: fadeIn 0.5s ease; }

.labyrinth-answer-text {
  font-family: 'Noto Serif', serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(46, 204, 113, 0.05);
  border-radius: 14px;
  border: 1px solid rgba(46, 204, 113, 0.15);
  text-align: left;
}

.labyrinth-next-btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: 14px;
  color: #1a0a00;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.labyrinth-next-btn:active { transform: scale(0.95); }

.labyrinth-confirm-overlay {
  position: fixed; inset: 0;
  z-index: 600;
  background: rgba(3, 3, 10, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.labyrinth-confirm-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.labyrinth-confirm-box p {
  font-family: 'Noto Serif', serif;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.labyrinth-confirm-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.labyrinth-confirm-btns button {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  font-family: 'Noto Serif', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.labyrinth-confirm-btns button:first-child {
  background: var(--glass-bg);
  color: var(--text-primary);
}

.labyrinth-confirm-btns button:last-child {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #1a0a00;
  font-weight: 700;
}

.labyrinth-confirm-btns button:active { transform: scale(0.95); }

.labyrinth-final-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.labyrinth-final-text {
  font-family: 'Noto Serif', serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.labyrinth-tg-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #1a0a00;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 14px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: var(--transition);
}

.labyrinth-tg-btn:active { transform: scale(0.95); }

/* ===== TRUE DESTINY ===== */
.destiny-overlay {
  position: fixed; inset: 0;
  z-index: 500;
  background: rgba(3, 3, 10, 0.94);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  overflow-y: auto;
}
.destiny-overlay.active { opacity: 1; }

.destiny-container {
  width: 100%;
  max-width: 400px;
  text-align: center;
  padding: 20px 0;
}

.destiny-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.destiny-intro p {
  font-family: 'Noto Serif', serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.destiny-start-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: 16px;
  color: #1a0a00;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 16px;
}

.destiny-start-btn:active { transform: scale(0.95); }

.destiny-counter {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.destiny-question {
  font-family: 'Noto Serif', serif;
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.destiny-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.destiny-option {
  background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(212,175,55,0.02));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 14px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Serif', serif;
  animation: slideUp 0.4s ease-out backwards;
}

.destiny-option:active {
  transform: scale(0.97);
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
}

.destiny-result { animation: fadeIn 1s ease; }

.destiny-result-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.destiny-result-desc {
  font-family: 'Noto Serif', serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.destiny-traits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.destiny-trait {
  padding: 6px 14px;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.destiny-scores { margin-bottom: 24px; }

.destiny-score-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.destiny-score-bar span {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 120px;
  text-align: left;
}

.destiny-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.destiny-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 3px;
  transition: width 1s ease;
}

.destiny-tg-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #1a0a00;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 14px;
  text-decoration: none;
  margin-bottom: 12px;
  transition: var(--transition);
}

.destiny-tg-btn:active { transform: scale(0.95); }

.destiny-restart {
  display: block;
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 14px;
  color: var(--text-secondary);
  font-family: 'Noto Serif', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.destiny-restart:active { transform: scale(0.95); }

/* ===== WISDOM ===== */
.wisdom-overlay {
  position: fixed; inset: 0;
  z-index: 500;
  background: rgba(3, 3, 10, 0.94);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.wisdom-overlay.active { opacity: 1; }

.wisdom-container {
  width: 100%;
  max-width: 360px;
  text-align: center;
  padding: 30px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.wisdom-quote {
  font-family: 'Noto Serif', serif;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 24px;
  font-style: italic;
}

.wisdom-close-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: 12px;
  color: #1a0a00;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.wisdom-close-btn:active { transform: scale(0.95); }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

.toast-message {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 10, 35, 0.92);
  border: 1px solid rgba(212,175,55,0.25);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 14px;
  z-index: 10000;
  font-size: 0.88rem;
  backdrop-filter: blur(14px);
  animation: slideUp 0.35s ease;
  font-family: 'Noto Serif', serif;
  max-width: 85vw;
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-height: 720px) {
  .center-display { min-height: 46vh; }
}

@media (min-width: 430px) {
  .app-title { font-size: 1.8rem; }
}

/* ============================================================
   YOUR DESTINY — visual update
   ============================================================ */
.theme-kaleidoscope {
  --bg-gradient: linear-gradient(135deg,#160b24 0%,#081426 35%,#0a2118 62%,#2b1906 82%,#25080f 100%);
  --bg-solid: #0d0917;
  --accent: #8c5cc8;
}
.theme-kaleidoscope #app-container::before {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -1;
  background: conic-gradient(from 0deg, rgba(123,63,179,.18), rgba(38,78,139,.18), rgba(45,106,39,.18), rgba(184,134,11,.18), rgba(139,38,53,.18), rgba(123,63,179,.18));
  filter: blur(55px) saturate(125%);
  animation: kaleidoscopeFlow 18s linear infinite;
  pointer-events: none;
}
@keyframes kaleidoscopeFlow { to { transform: rotate(360deg) scale(1.08); } }

/* ===== Animated splash intro ===== */
#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050207;
  opacity: 1;
  perspective: 1200px;
}
.splash-cover-image {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.025);
  filter: brightness(.92) saturate(1.08) contrast(1.04);
  animation: splashImageLife 3s cubic-bezier(.16,.7,.2,1) forwards;
  will-change: transform, filter;
}
.splash-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, transparent 30%, rgba(0,0,0,.12) 58%, rgba(0,0,0,.62) 100%),
    linear-gradient(180deg, rgba(0,0,0,.18), transparent 24%, transparent 74%, rgba(0,0,0,.3));
  pointer-events: none;
}
.splash-shimmer {
  position: absolute;
  top: -20%;
  left: -60%;
  width: 34%;
  height: 140%;
  transform: rotate(17deg);
  background: linear-gradient(90deg, transparent, rgba(255,241,191,.12), rgba(255,214,92,.34), rgba(255,241,191,.08), transparent);
  filter: blur(10px);
  mix-blend-mode: screen;
  animation: splashShimmer 2.7s ease-in-out .15s forwards;
  pointer-events: none;
}
.splash-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(74vw, 520px);
  height: min(74vw, 520px);
  transform: translate(-50%, -50%) scale(.82);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,190,55,.12) 0%, rgba(255,167,35,.05) 34%, transparent 68%);
  filter: blur(10px);
  animation: splashGlow 3s ease-in-out forwards;
  pointer-events: none;
}
.splash-stars,
.splash-stars::before,
.splash-stars::after {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
}
.splash-stars {
  opacity: .8;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,224,125,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 34%, rgba(255,219,96,.8) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 14%, rgba(255,225,128,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 29%, rgba(255,205,70,.8) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 68%, rgba(255,224,119,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 18% 79%, rgba(255,205,70,.72) 0 1px, transparent 2px),
    radial-gradient(circle at 53% 86%, rgba(255,225,128,.8) 0 1px, transparent 2px),
    radial-gradient(circle at 92% 88%, rgba(255,205,70,.72) 0 1px, transparent 2px);
  animation: splashStars 1.4s ease-in-out infinite alternate;
}
.splash-stars::before {
  background:
    radial-gradient(circle at 40% 17%, rgba(255,235,165,.9) 0 1.5px, transparent 4px),
    radial-gradient(circle at 86% 43%, rgba(255,228,133,.85) 0 1.5px, transparent 4px),
    radial-gradient(circle at 8% 55%, rgba(255,219,92,.8) 0 1.2px, transparent 4px),
    radial-gradient(circle at 61% 75%, rgba(255,232,149,.88) 0 1.4px, transparent 4px);
  animation: splashStars 1.9s ease-in-out .25s infinite alternate-reverse;
}
.splash-stars::after {
  background: linear-gradient(110deg, transparent 35%, rgba(255,219,104,.13) 48%, rgba(255,241,182,.28) 50%, rgba(255,219,104,.1) 52%, transparent 65%);
  transform: translateX(-120%);
  animation: splashSweep 2.4s ease-in-out .35s forwards;
}
@keyframes splashImageLife {
  0% { transform: scale(1.045); filter: brightness(.72) saturate(.95) contrast(1.02); }
  18% { transform: scale(1.03); filter: brightness(.9) saturate(1.04) contrast(1.03); }
  60% { transform: scale(1.065); filter: brightness(.99) saturate(1.1) contrast(1.05); }
  100% { transform: scale(1.095); filter: brightness(1.03) saturate(1.12) contrast(1.06); }
}
@keyframes splashShimmer {
  0% { transform: translateX(0) rotate(17deg); opacity: 0; }
  18% { opacity: .25; }
  58% { opacity: .75; }
  100% { transform: translateX(430%) rotate(17deg); opacity: 0; }
}
@keyframes splashGlow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.72); }
  30% { opacity: .75; transform: translate(-50%, -50%) scale(.92); }
  65% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: .45; transform: translate(-50%, -50%) scale(1.2); }
}
@keyframes splashStars {
  from { opacity: .35; transform: scale(.99); }
  to { opacity: .9; transform: scale(1.015); }
}
@keyframes splashSweep {
  0% { transform: translateX(-120%); opacity: 0; }
  22% { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .splash-cover-image, .splash-shimmer, .splash-glow, .splash-stars, .splash-stars::before, .splash-stars::after { animation: none !important; }
}

/* ===== Rich wisdom card ===== */
.wisdom-container {
  position: relative;
  max-width: 390px;
  padding: 34px 28px 26px;
  background: linear-gradient(145deg,rgba(39,24,60,.94),rgba(12,8,23,.96));
  border: 1px solid rgba(212,175,55,.32);
  box-shadow: 0 25px 90px rgba(0,0,0,.65), inset 0 0 40px rgba(212,175,55,.035);
}
.wisdom-symbol { color: var(--gold-light); font-size: 1rem; opacity: .85; }
.wisdom-heading { margin-top: 8px; font: 700 1.1rem 'Cinzel',serif; letter-spacing: .18em; color: var(--gold); text-transform: uppercase; }
.wisdom-divider { margin: 18px 0 14px; height: 1px; background: linear-gradient(90deg,transparent,var(--gold),transparent); position: relative; }
.wisdom-divider span { position:absolute; left:50%; top:-8px; transform:translateX(-50%); background:#1b102a; padding:0 10px; color:var(--gold-light); }
.wisdom-label { font: 600 .58rem 'Cinzel',serif; letter-spacing:.22em; color:var(--text-muted); margin-bottom:16px; }
.wisdom-quote { font-size: 1.08rem; line-height: 1.9; margin-bottom: 13px; }
.wisdom-footer-mark { color:var(--text-muted); font:italic .7rem 'Noto Serif',serif; margin-bottom:22px; }
.wisdom-close-btn { min-width: 145px; }

/* ===== Author / support cards ===== */
.author-card {
  width:min(92vw,390px); padding:34px 24px 26px; text-align:center;
  background:linear-gradient(145deg,rgba(39,24,60,.96),rgba(11,7,20,.98));
  border:1px solid rgba(212,175,55,.3); border-radius:24px;
  box-shadow:0 25px 90px rgba(0,0,0,.65);
}
.author-emblem { font-size:1.8rem; color:var(--gold-light); margin-bottom:10px; text-shadow:0 0 20px rgba(244,208,63,.35); }
.author-title { font:700 1.25rem 'Cinzel',serif; color:var(--gold); letter-spacing:.12em; }
.author-subtitle { margin:14px 0 22px; color:var(--text-secondary); font:.9rem/1.7 'Noto Serif',serif; }
.wallet-card { padding:16px; border:1px solid var(--glass-border); border-radius:16px; background:rgba(0,0,0,.2); }
.wallet-label { color:var(--gold); font:600 .7rem 'Cinzel',serif; letter-spacing:.16em; text-transform:uppercase; margin-bottom:9px; }
.wallet-address { font:.72rem/1.5 monospace; color:var(--text-secondary); word-break:break-all; }
.wallet-copy-btn { margin-top:13px; padding:10px 18px; border:1px solid rgba(212,175,55,.3); border-radius:11px; background:rgba(212,175,55,.08); color:var(--gold); font:600 .75rem 'Cinzel',serif; }
.author-info-list { text-align:left; margin:18px 0 22px; padding:15px; border:1px solid var(--glass-border); border-radius:15px; color:var(--text-secondary); font:.82rem/2 'Noto Serif',serif; }

/* ===== Legal ===== */
.legal-card { max-width:430px !important; width:min(94vw,430px); }
.legal-text { max-height:65vh; overflow:auto; padding-right:7px; text-align:left; color:var(--text-secondary); font:.78rem/1.72 'Noto Serif',serif; }
.legal-text p { margin:0 0 14px; }
.legal-text b { color:var(--gold); }
.info-card { max-width:390px !important; }

.destiny-result-minimal { max-width:400px !important; }
.destiny-result-kicker { color:var(--text-muted); font:600 .62rem 'Cinzel',serif; letter-spacing:.2em; text-transform:uppercase; margin-bottom:12px; }
.destiny-result-minimal .destiny-result-title { font-size:2rem; margin-bottom:18px; }
.destiny-result-minimal .destiny-result-desc { font-size:1rem; line-height:1.85; margin-bottom:28px; }
.destiny-result-minimal .destiny-restart { margin-top:0; }

/* Hint confirmation */
#labyrinth-hint-confirm { z-index: 900; }

@media (max-width:380px) {
  .theme-colors { gap:7px; }
  .color-option { width:38px; height:38px; }
}


/* ===== Final multilingual / final-card polish ===== */
.lang-selector { flex-wrap: wrap; justify-content: flex-end; max-width: 230px; row-gap: 6px; }
.lang-btn { min-width: 42px; padding: 6px 9px; }
.author-channel-btn, .fate-channel-btn {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:44px; padding:11px 18px; margin-top:12px;
  border-radius:13px; text-decoration:none;
  background:linear-gradient(135deg,var(--gold-dark),var(--gold));
  color:#1a0a00; font:700 .78rem 'Cinzel',serif; letter-spacing:.08em;
  border:1px solid rgba(244,208,63,.55); box-shadow:0 8px 25px rgba(212,175,55,.18);
}
.author-legal-text { margin:18px 0 4px; padding:14px; border:1px solid rgba(212,175,55,.15); border-radius:14px; background:rgba(0,0,0,.18); color:var(--text-muted); text-align:left; font:.72rem/1.65 'Noto Serif',serif; }
.final-channel-note { margin:18px auto 4px; max-width:340px; color:var(--text-secondary); font:.78rem/1.65 'Noto Serif',serif; text-align:center; }
.final-actions { display:flex; flex-direction:column; align-items:stretch; gap:2px; margin-top:10px; }
.final-actions .fate-next, .final-actions .labyrinth-next-btn, .final-actions .destiny-restart { width:100%; margin-top:0; }
.about-card { max-width:410px !important; }
.about-lead { margin:4px 0 16px; color:var(--text-primary); font:600 1rem/1.65 'Noto Serif',serif; text-align:left; }
.about-body { color:var(--text-secondary); font:.88rem/1.75 'Noto Serif',serif; text-align:left; }
.about-feature-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin:20px 0 8px; }
.about-feature-grid > div { padding:11px 10px; border:1px solid var(--glass-border); border-radius:12px; background:rgba(255,255,255,.025); color:var(--gold); font:.72rem/1.45 'Cinzel',serif; }

/* Kaleidoscope is a sequential colour journey: purple → blue → crimson → emerald → amber → purple. */
.theme-kaleidoscope { --bg-solid:#0d0917; --accent:#7b3fb3; }
.theme-kaleidoscope #app-container::before {
  content:''; position:fixed; inset:-30%; z-index:0; pointer-events:none;
  background:linear-gradient(125deg,#6f3aa8 0%,#264e8b 22%,#9b2f43 43%,#2d7b45 65%,#c18a19 83%,#6f3aa8 100%);
  background-size:300% 300%; filter:blur(60px) saturate(125%); opacity:.28;
  animation:kaleidoscopeSequential 22s ease-in-out infinite;
}
@keyframes kaleidoscopeSequential {
  0% { background-position:0% 50%; transform:rotate(0deg) scale(1); }
  20% { background-position:55% 50%; transform:rotate(4deg) scale(1.03); }
  40% { background-position:100% 50%; transform:rotate(-3deg) scale(1.05); }
  60% { background-position:45% 50%; transform:rotate(3deg) scale(1.03); }
  80% { background-position:0% 50%; transform:rotate(-2deg) scale(1.05); }
  100% { background-position:0% 50%; transform:rotate(0deg) scale(1); }
}
@media (max-width:380px) {
  .lang-selector { max-width:200px; gap:5px; }
  .lang-btn { min-width:39px; padding:5px 7px; font-size:.68rem; }
  .about-feature-grid { grid-template-columns:1fr; }
}

#app-container > * { position:relative; z-index:1; }

/* ===== POLISHED SETTINGS / LANGUAGE ===== */
.language-setting {
  display:block;
  padding:16px;
}
.language-setting > .settings-item-left {
  margin-bottom:14px;
}
.language-caption {
  display:block;
  margin-top:3px;
  color:var(--text-muted);
  font:500 .62rem/1.3 'Noto Serif',serif;
  letter-spacing:.02em;
}
.lang-selector {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  width:100%;
}
.lang-btn {
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:9px 12px;
  border-radius:14px;
  border:1px solid rgba(212,175,55,.13);
  background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.018));
  color:var(--text-secondary);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
.lang-btn span { font:600 .78rem 'Noto Serif',serif; }
.lang-btn small { color:var(--text-muted); font:700 .58rem 'Cinzel',serif; letter-spacing:.08em; }
.lang-btn.active {
  background:linear-gradient(145deg,rgba(212,175,55,.28),rgba(120,66,177,.2));
  border-color:rgba(244,208,63,.72);
  color:#fff7df;
  box-shadow:0 0 20px rgba(212,175,55,.12),inset 0 0 18px rgba(212,175,55,.05);
}
.lang-btn.active small { color:var(--gold-light); }

/* ===== POLISHED THEME PALETTE ===== */
.theme-colors { gap:10px; padding:10px 2px 4px; }
.color-option {
  width:48px; height:48px; padding:0; border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(145deg,var(--swatch),rgba(0,0,0,.5));
  box-shadow:0 8px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12);
  overflow:visible;
}
.color-option span {
  position:absolute; inset:5px; border-radius:12px;
  background:radial-gradient(circle at 35% 28%,rgba(255,255,255,.32),transparent 28%),linear-gradient(145deg,var(--swatch),rgba(0,0,0,.42));
}
.color-option small {
  position:absolute; right:-4px; bottom:-5px; width:18px; height:18px; display:grid; place-items:center;
  border-radius:50%; background:#120b1c; color:var(--gold-light); border:1px solid rgba(212,175,55,.35);
  font:700 .52rem 'Cinzel',serif;
}
.color-option.active { transform:translateY(-2px) scale(1.08); border-color:var(--gold-light); box-shadow:0 0 0 3px rgba(212,175,55,.08),0 0 24px rgba(212,175,55,.24); }
.color-option.theme-kaleidoscope span { background:linear-gradient(135deg,#7b3fb3,#315fa8,#a9324c,#2f8a55,#d29a24); }

/* ===== FULL-SCREEN KALEIDOSCOPE ===== */
body.theme-kaleidoscope { background:#0c0714; }
.theme-kaleidoscope #app-container::before {
  content:''; position:fixed; inset:0; z-index:-2; opacity:.94;
  background:#30145a;
  filter:saturate(1.2);
  animation:kaleidoscopeSolid 22s cubic-bezier(.72,0,.28,1) infinite;
}
.theme-kaleidoscope #app-container::after {
  content:''; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(circle at 50% 42%,rgba(255,255,255,.055),transparent 34%),linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.28));
}
@keyframes kaleidoscopeSolid {
  0%,16%{background:#5c2a91;}
  20%,36%{background:#1d4f98;}
  40%,56%{background:#9b2944;}
  60%,76%{background:#267346;}
  80%,96%{background:#b47716;}
  100%{background:#5c2a91;}
}

/* ===== TIME CAPSULE ===== */
.time-capsule-card {
  width:min(92vw,390px); position:relative; overflow:hidden; text-align:center;
  padding:34px 26px 28px; border-radius:28px;
  background:linear-gradient(145deg,rgba(38,21,60,.98),rgba(9,6,17,.98));
  border:1px solid rgba(212,175,55,.32);
  box-shadow:0 30px 100px rgba(0,0,0,.7),inset 0 0 55px rgba(212,175,55,.035);
}
.time-capsule-card::before { content:''; position:absolute; inset:10px; border:1px solid rgba(212,175,55,.09); border-radius:21px; pointer-events:none; }
.capsule-orbit { width:54px;height:54px;margin:0 auto 14px;border-radius:50%;display:grid;place-items:center;color:var(--gold-light);font-size:1.15rem;border:1px solid rgba(212,175,55,.4);box-shadow:0 0 30px rgba(212,175,55,.12);animation:capsulePulse 3s ease-in-out infinite; }
.capsule-kicker { color:var(--text-muted);font:600 .6rem 'Cinzel',serif;letter-spacing:.22em;text-transform:uppercase; }
.capsule-title { margin-top:7px;color:var(--gold);font:700 1.18rem 'Cinzel',serif;letter-spacing:.08em; }
.capsule-date { margin:22px 0 17px;color:#fff4cf;font:700 1.05rem/1.55 'Noto Serif',serif;text-shadow:0 0 18px rgba(244,208,63,.16); }
.capsule-divider { width:72%;height:1px;margin:0 auto 17px;background:linear-gradient(90deg,transparent,var(--gold),transparent); }
.capsule-text { color:var(--text-secondary);font:.86rem/1.75 'Noto Serif',serif;margin-bottom:23px; }
@keyframes capsulePulse { 50%{transform:scale(1.05);box-shadow:0 0 34px rgba(212,175,55,.22)} }

/* ===== POLISHED WISDOM ===== */
.wisdom-container { box-shadow:0 30px 100px rgba(0,0,0,.72),inset 0 0 50px rgba(212,175,55,.04); }
.wisdom-container::before,.wisdom-container::after { content:'✦';position:absolute;color:rgba(212,175,55,.25);font-size:.65rem; }
.wisdom-container::before{left:15px;top:15px}.wisdom-container::after{right:15px;bottom:15px}
.wisdom-quote { font-size:1.12rem;line-height:1.95;min-height:110px;display:flex;align-items:center;justify-content:center; }
.wisdom-close-btn { width:100%;margin-top:4px;background:linear-gradient(145deg,rgba(212,175,55,.18),rgba(212,175,55,.04));border:1px solid rgba(212,175,55,.38);color:var(--gold-light); }

/* ===== POLISHED MINI-SECTIONS ===== */
.about-card,.author-card,.fate-container,.labyrinth-container,.destiny-container { filter:drop-shadow(0 22px 60px rgba(0,0,0,.35)); }
.settings-item:hover { border-color:rgba(212,175,55,.22); box-shadow:0 10px 30px rgba(0,0,0,.16); }
.fate-question,.labyrinth-riddle,.destiny-question { text-wrap:balance; }
.fate-counter,.labyrinth-counter,.destiny-counter { padding:7px 12px;border:1px solid rgba(212,175,55,.14);border-radius:999px;display:inline-block;background:rgba(212,175,55,.035); }
.fate-btn,.destiny-option,.labyrinth-riddle { box-shadow:0 12px 30px rgba(0,0,0,.18); }
.destiny-result-rich .destiny-result-symbol { color:var(--gold-light);font-size:1.4rem;margin-bottom:8px;text-shadow:0 0 24px rgba(244,208,63,.3); }
.final-channel-note { margin:4px 0 18px;padding:13px 15px;border:1px solid rgba(212,175,55,.12);border-radius:14px;background:rgba(212,175,55,.035); }

@media(max-width:380px){
  .lang-selector{grid-template-columns:1fr 1fr}.lang-btn{padding:8px 9px}.lang-btn span{font-size:.7rem}.color-option{width:43px;height:43px}
}

/* Featured settings rows inspired by the reference layout, adapted to Your Destiny. */
.setting-feature { min-height:58px; position:relative; overflow:hidden; }
.setting-feature::after { content:'✦'; position:absolute; right:16px; top:50%; transform:translateY(-50%); color:rgba(212,175,55,.2); font-size:1.2rem; pointer-events:none; }
.setting-feature .settings-icon { width:21px;height:21px; }
.rate-item { background:linear-gradient(135deg,rgba(118,64,171,.18),rgba(20,12,31,.58)); }
.schedule-item { background:linear-gradient(135deg,rgba(45,122,84,.12),rgba(20,12,31,.58)); }
.support-item { background:linear-gradient(135deg,rgba(185,133,29,.14),rgba(20,12,31,.58)); }
.author-item { background:linear-gradient(135deg,rgba(155,47,67,.12),rgba(20,12,31,.58)); }
.setting-feature:active { transform:scale(.985); }

/* ===== FINAL POLISH: restrained, editorial controls ===== */
.language-setting, .theme-setting { cursor:pointer; }
.language-current, #theme-name { color:var(--gold-light); font-family:'Cinzel',serif; font-weight:600; max-width:48%; text-align:right; }
.language-picker-panel, .theme-picker-panel {
  display:none; padding:12px; border-top:1px solid rgba(212,175,55,.12); background:rgba(8,5,18,.55);
}
.language-picker-panel.open, .theme-picker-panel.open { display:grid; animation:panelReveal .22s ease both; }
.language-picker-panel { grid-template-columns:1fr 1fr; gap:8px; }
.theme-picker-panel { grid-template-columns:1fr; }
@keyframes panelReveal { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:none} }
.lang-btn {
  min-height:44px; padding:9px 12px; border:1px solid rgba(212,175,55,.16); border-radius:13px;
  background:rgba(255,255,255,.025); color:var(--text-secondary); display:flex; align-items:center; justify-content:space-between;
  font-family:'Noto Serif',serif; cursor:pointer; transition:.22s ease;
}
.lang-btn span { font-size:.82rem; }
.lang-btn small { color:var(--text-muted); font:700 .58rem 'Cinzel',serif; letter-spacing:.12em; }
.lang-btn.active { border-color:rgba(212,175,55,.62); color:var(--gold-light); background:rgba(212,175,55,.07); box-shadow:0 0 20px rgba(212,175,55,.08); }
.lang-btn.active small { color:var(--gold-light); }
.theme-colors { gap:14px; padding:10px 2px 6px; justify-content:flex-start; }
.color-option { width:46px; height:46px; border-radius:50%; border:1px solid rgba(255,255,255,.12); background:transparent; box-shadow:inset 0 0 0 4px rgba(8,5,18,.75), 0 5px 18px rgba(0,0,0,.3); }
.color-option span { display:block; width:100%; height:100%; border-radius:50%; background:var(--swatch); }
.color-option small { display:none !important; }
.color-option::after { display:none; }
.color-option.active { transform:scale(1.08); border-color:var(--gold-light); box-shadow:inset 0 0 0 3px rgba(8,5,18,.75),0 0 0 2px rgba(212,175,55,.18),0 0 25px rgba(212,175,55,.22); }
.color-option.theme-purple span{background:#6f3aa8}.color-option.theme-sapphire span{background:#264e8b}.color-option.theme-crimson span{background:#9b2f43}.color-option.theme-emerald span{background:#2d7b45}.color-option.theme-amber span{background:#c18a19}.color-option.theme-kaleidoscope span{background:linear-gradient(135deg,#6f3aa8,#264e8b,#9b2f43,#2d7b45,#c18a19)}

/* Solid, sequential Kaleidoscope: one full-screen colour at a time. */
body.theme-kaleidoscope #app-container { background:transparent; }
body.theme-kaleidoscope #app-container::before {
  content:''; position:fixed; inset:0; z-index:-2; opacity:1; filter:none; background:#6f3aa8;
  animation:kaleidoscopeSolidStrict 28s ease-in-out infinite;
}
body.theme-kaleidoscope #app-container::after { background:linear-gradient(180deg,rgba(0,0,0,.06),rgba(0,0,0,.28)); }
@keyframes kaleidoscopeSolidStrict {
  0%, 16% { background:#6f3aa8; }
  24% { background:#264e8b; }
  40% { background:#264e8b; }
  48% { background:#9b2f43; }
  64% { background:#9b2f43; }
  72% { background:#2d7b45; }
  88% { background:#2d7b45; }
  96% { background:#c18a19; }
  100% { background:#6f3aa8; }
}

/* Remove decorative diamonds/stars from section cards. */
.setting-feature::after { content:none !important; }
.about-feature-grid { display:none; }

/* Time Capsule — past tense, large golden date/time, no symbols. */
.time-capsule-card { padding:38px 26px 30px; }
.capsule-orbit, .capsule-kicker { display:none !important; }
.capsule-title { margin-top:0; font-size:1.12rem; color:var(--text-primary); letter-spacing:.12em; }
.capsule-date { margin:24px 0 4px; color:var(--gold-light); font:700 clamp(1.45rem,6vw,2rem)/1.25 'Cinzel',serif; text-shadow:0 0 25px rgba(244,208,63,.2); }
.capsule-time { color:#fff4cf; font:600 1.15rem/1.3 'Cinzel',serif; letter-spacing:.12em; margin-bottom:18px; }
.capsule-divider { width:65%; margin-bottom:18px; }
.capsule-text { font-size:.9rem; line-height:1.8; margin-bottom:0; }

/* Support Author — three clearly separated payment blocks. */
.support-card { max-height:86vh; overflow:auto; }
.support-copy { text-align:left; line-height:1.8; }
.support-payment-grid { display:grid; gap:10px; margin:20px 0 14px; }
.payment-block { border:1px solid rgba(212,175,55,.25); border-radius:15px; padding:14px 15px; background:rgba(255,255,255,.018); display:flex; justify-content:space-between; gap:18px; align-items:center; }
.payment-block span { color:var(--text-secondary); font-size:.82rem; }
.payment-block strong { color:var(--gold-light); font-weight:700; text-align:right; font-family:'Cinzel',serif; font-size:.83rem; overflow-wrap:anywhere; }
.payment-address { align-items:flex-start; }
.payment-address strong { max-width:62%; line-height:1.5; }
.support-copy-btn { width:100%; margin-top:2px; }

/* Rating modal. */
.rating-card { width:min(92vw,390px); padding:30px 24px 24px; border-radius:24px; background:linear-gradient(145deg,rgba(32,17,52,.98),rgba(10,6,18,.99)); border:1px solid rgba(212,175,55,.28); box-shadow:0 30px 90px rgba(0,0,0,.72); text-align:center; }
.rating-title { color:var(--gold-light); font:700 1.12rem 'Cinzel',serif; letter-spacing:.08em; }
.rating-stars { display:flex; justify-content:center; gap:7px; margin:22px 0 15px; }
.rating-star { border:0; background:none; color:rgba(212,175,55,.22); font-size:2.15rem; line-height:1; cursor:pointer; padding:2px; transition:transform .16s ease,color .16s ease,text-shadow .16s ease; }
.rating-star.selected { color:var(--gold-light); text-shadow:0 0 18px rgba(244,208,63,.34); }
.rating-star:active { transform:scale(.9); }
.rating-thanks { color:var(--text-primary); font:600 .88rem 'Cinzel',serif; margin:4px 0 13px; }
.rating-text { color:var(--text-secondary); font:.86rem/1.75 'Noto Serif',serif; min-height:118px; display:flex; align-items:center; justify-content:center; }
.rating-channel-btn { display:block; width:100%; text-decoration:none; text-align:center; margin-top:16px; }

/* Author submission legal flow. */
.legal-author-card, .legal-confirm-card { max-height:84vh; overflow:auto; }
.author-legal-text { max-height:47vh; overflow:auto; text-align:left; line-height:1.72; padding:16px; border:1px solid rgba(212,175,55,.14); border-radius:15px; background:rgba(255,255,255,.018); }
.legal-author-card .author-channel-btn, .legal-confirm-card .author-channel-btn { display:block; width:100%; margin-top:16px; text-align:center; }

/* Wisdom — clean card, only close X + Next action. */
.wisdom-container { position:relative; }
.wisdom-symbol, .wisdom-divider, .wisdom-label, .wisdom-footer-mark { display:none !important; }
.wisdom-heading { margin:0 0 20px; color:var(--gold-light); font:700 1.15rem 'Cinzel',serif; letter-spacing:.1em; }
.wisdom-quote { min-height:150px; margin:0 0 20px; font-size:1.08rem; line-height:1.9; }
.wisdom-close-btn { margin-top:0; }

/* About — no Telegram CTA. */
.about-note { margin-top:20px; padding:15px 16px; border-left:2px solid var(--gold); color:var(--gold-light); font:italic .9rem/1.75 'Noto Serif',serif; text-align:left; background:rgba(212,175,55,.035); border-radius:0 12px 12px 0; }

@media(max-width:430px){
  .language-current,#theme-name{max-width:44%;font-size:.72rem}
  .payment-block{align-items:flex-start;flex-direction:column;gap:5px}.payment-address strong{max-width:100%;text-align:left}
  .rating-stars{gap:2px}.rating-star{font-size:1.95rem}
}


/* ===== USER VISUAL PASS ===== */
.language-setting { cursor:pointer; }
.language-caption { display:none !important; }
.language-picker-panel { position:fixed; z-index:5000; left:50%; top:50%; transform:translate(-50%,-50%); width:min(88vw,390px); max-height:min(76vh,620px); overflow:auto; padding:20px; border:1px solid rgba(212,175,55,.38); border-radius:24px; background:linear-gradient(145deg,rgba(28,13,48,.99),rgba(8,5,18,.99)); box-shadow:0 35px 120px rgba(0,0,0,.78); grid-template-columns:1fr 1fr; gap:10px; }
.language-picker-panel.open { display:grid; animation:modalIn .22s ease both; }
.language-picker-panel::before { content:'LANGUAGE'; grid-column:1/-1; color:var(--gold-light); font:700 1.15rem 'Cinzel',serif; letter-spacing:.13em; padding:0 2px 8px; }
.language-picker-panel::after { content:''; position:fixed; z-index:-1; inset:-100vh; background:rgba(0,0,0,.58); backdrop-filter:blur(7px); }
.lang-btn { min-height:54px; padding:11px 13px; border-radius:15px; background:rgba(255,255,255,.025); }
.lang-btn span { font-size:.9rem; }
.theme-setting { cursor:default !important; }
.theme-picker-panel { display:block !important; padding:12px 15px 16px; border-top:1px solid rgba(212,175,55,.12); }
.theme-colors { display:grid !important; grid-template-columns:repeat(6,1fr); gap:12px; align-items:center; justify-content:stretch; }
.color-option { width:48px; height:48px; justify-self:center; position:relative; border:1px solid rgba(255,255,255,.12); background:rgba(8,5,18,.65); box-shadow:inset 0 0 0 3px rgba(8,5,18,.72),0 8px 24px rgba(0,0,0,.32); }
.color-option span { box-shadow:inset 0 1px 2px rgba(255,255,255,.16), inset 0 -8px 18px rgba(0,0,0,.2); }
.color-option.active { border-color:var(--gold-light); box-shadow:inset 0 0 0 3px rgba(8,5,18,.72),0 0 0 2px rgba(244,208,63,.28),0 0 28px rgba(244,208,63,.18); }
.color-option.theme-kaleidoscope span { background:conic-gradient(from 210deg,#6f3aa8 0deg,#6f3aa8 72deg,#264e8b 72deg,#264e8b 144deg,#9b2f43 144deg,#9b2f43 216deg,#2d7b45 216deg,#2d7b45 288deg,#c18a19 288deg,#c18a19 360deg); }
@media(max-width:430px){.theme-colors{grid-template-columns:repeat(3,1fr);gap:14px}.color-option{width:52px;height:52px}}

/* Compact rating before selection; expands only after a rating is chosen. */
.rating-card.compact { width:min(88vw,360px); padding:24px 20px 20px; }
.rating-card.compact .rating-stars { margin:18px 0 4px; }
.rating-card.compact .rating-star { font-size:2.7rem; }
.rating-feedback[hidden] { display:none; }
.rating-card.has-rating { width:min(92vw,410px); padding:30px 24px 26px; }
.rating-card.has-rating .rating-star { font-size:2.55rem; }
.rating-stars { gap:4px; }
.rating-star { color:rgba(244,208,63,.18); -webkit-text-stroke:1px rgba(244,208,63,.38); font-family:Georgia,serif; }
.rating-star.selected { color:var(--gold-light); -webkit-text-stroke:0; }
.rating-text { min-height:0; margin-top:8px; }
.rating-channel-btn { padding:14px 18px; border-radius:14px; color:#1a0e00; background:linear-gradient(180deg,#fff0a8,#e1a915); box-shadow:0 12px 28px rgba(212,175,55,.2); font:700 .8rem 'Cinzel',serif; letter-spacing:.06em; }

/* Full-reading legal author screen. */
.legal-author-card,.legal-confirm-card { width:min(94vw,720px) !important; max-height:88vh; padding:28px 24px 24px; }
.author-legal-text { max-height:58vh; font-size:.9rem; line-height:1.9; padding:20px; }

/* Story schedule: editorial card, no decorative diamonds. */
.schedule-card { width:min(92vw,430px); max-height:84vh; overflow:auto; padding:34px 24px 28px; border:1px solid rgba(212,175,55,.32); border-radius:24px; background:linear-gradient(145deg,rgba(25,12,43,.98),rgba(8,5,18,.99)); box-shadow:0 30px 100px rgba(0,0,0,.75); text-align:center; }
.schedule-title { color:var(--gold-light); font:700 1.55rem 'Cinzel',serif; letter-spacing:.05em; }
.schedule-lead { margin-top:16px; color:var(--text-primary); font:italic 1rem/1.8 'Noto Serif',serif; }
.schedule-divider { width:70%; height:1px; margin:22px auto; background:linear-gradient(90deg,transparent,var(--gold),transparent); }
.schedule-entry { display:flex; gap:16px; text-align:left; padding:18px; border:1px solid rgba(212,175,55,.18); border-radius:17px; background:rgba(255,255,255,.018); }
.schedule-icon { flex:0 0 46px; height:46px; display:grid; place-items:center; border:1px solid rgba(212,175,55,.38); border-radius:14px; color:var(--gold-light); font-size:1.5rem; }
.schedule-entry strong { color:var(--gold-light); font:700 .95rem 'Cinzel',serif; }
.schedule-entry p { margin:8px 0 0; color:var(--text-secondary); font:.84rem/1.75 'Noto Serif',serif; }
.schedule-note { margin-top:18px; color:var(--text-muted); font:.78rem/1.7 'Noto Serif',serif; }

/* Prevent the page from flashing/rebuilding between questions. */
.fate-overlay,.labyrinth-overlay,.destiny-overlay { will-change:opacity; }
.fate-overlay > .fate-container,.labyrinth-overlay > .labyrinth-container,.destiny-overlay > .destiny-container { animation:none !important; }
@keyframes modalIn { from{opacity:0;transform:translate(-50%,-48%) scale(.985)} to{opacity:1;transform:translate(-50%,-50%) scale(1)} }

/* ===== FINAL USER PASS ===== */
.language-picker-panel::before{content:attr(data-title)!important}
.language-picker-panel::after{pointer-events:none!important;background:rgba(0,0,0,.46)!important;backdrop-filter:blur(4px)!important}
.lang-backdrop{position:fixed;inset:0;z-index:4999;background:rgba(0,0,0,.42);backdrop-filter:blur(3px)}
.language-picker-panel{z-index:5000}

/* Theme swatches: darker, restrained, no labels/numbers. */
.color-option{filter:saturate(.78) brightness(.72)}
.color-option.active{filter:saturate(.9) brightness(.8)}
.color-option.theme-purple span{background:#35205f}.color-option.theme-sapphire span{background:#182e58}.color-option.theme-crimson span{background:#5a1832}.color-option.theme-emerald span{background:#174d3b}.color-option.theme-amber span{background:#5a4112}
.color-option.theme-kaleidoscope span{background:conic-gradient(from 210deg,#35205f 0 72deg,#182e58 72deg 144deg,#5a1832 144deg 216deg,#174d3b 216deg 288deg,#5a4112 288deg 360deg)}
body.theme-kaleidoscope #app-container::before{animation:kaleidoscopeSolidStrict 32s ease-in-out infinite;background:#35205f}
@keyframes kaleidoscopeSolidStrict{0%,16%{background:#35205f}24%,40%{background:#182e58}48%,64%{background:#5a1832}72%,88%{background:#174d3b}96%{background:#5a4112}100%{background:#35205f}}

/* No decorative diamonds/symbols in feature sections. */
.setting-feature::after,.wisdom-symbol,.wisdom-divider,.wisdom-label,.wisdom-footer-mark,.destiny-result-symbol{display:none!important;content:none!important}
.schedule-icon{display:none!important}.schedule-entry{display:block}

/* These four sections are full-screen reading pages, not centered pop-up cards. */
.fate-overlay:has(.rating-card),.fate-overlay:has(.schedule-card),.fate-overlay:has(.support-card),.fate-overlay:has(.legal-author-card),.fate-overlay:has(.legal-confirm-card){padding:0;align-items:stretch;justify-content:stretch;background:linear-gradient(180deg,rgba(5,3,12,.99),rgba(19,8,30,.99));backdrop-filter:none}
.fate-overlay:has(.rating-card) .rating-card,.fate-overlay:has(.schedule-card) .schedule-card,.fate-overlay:has(.support-card) .support-card,.fate-overlay:has(.legal-author-card) .legal-author-card,.fate-overlay:has(.legal-confirm-card) .legal-confirm-card{width:100%!important;max-width:none!important;height:100%!important;max-height:none!important;min-height:100%;border:0;border-radius:0;box-shadow:none;background:transparent;overflow-y:auto;padding:88px 24px 42px;display:flex;flex-direction:column;justify-content:center}
.fate-overlay:has(.rating-card) .rating-card .rating-title,.fate-overlay:has(.schedule-card) .schedule-card .schedule-title,.fate-overlay:has(.support-card) .support-card .author-title,.fate-overlay:has(.legal-author-card) .legal-author-card .author-title,.fate-overlay:has(.legal-confirm-card) .legal-confirm-card .author-title{font-size:clamp(1.45rem,6vw,2rem)}
.fate-overlay:has(.legal-author-card) .author-legal-text,.fate-overlay:has(.legal-confirm-card) .author-legal-text{max-height:none;flex:0 1 auto;overflow:auto;padding:22px;line-height:1.9}
.fate-overlay:has(.schedule-card) .schedule-card{justify-content:flex-start;padding-top:100px}.fate-overlay:has(.schedule-card) .schedule-entry{margin-top:10px}.fate-overlay:has(.support-card) .support-card{justify-content:flex-start;padding-top:100px}.fate-overlay:has(.legal-author-card) .legal-author-card,.fate-overlay:has(.legal-confirm-card) .legal-confirm-card{justify-content:flex-start;padding-top:100px}
.fate-overlay:has(.rating-card) .rating-card{justify-content:flex-start;padding-top:105px}.fate-overlay:has(.rating-card) .rating-stars{margin:24px 0}.fate-overlay:has(.rating-card) .rating-star{font-size:3rem}

/* Author controls are refined, less saturated gold. */
.author-channel-btn,.wallet-copy-btn{background:linear-gradient(180deg,rgba(212,175,55,.16),rgba(212,175,55,.07))!important;border:1px solid rgba(212,175,55,.48)!important;color:var(--gold-light)!important;box-shadow:0 10px 26px rgba(0,0,0,.24)!important;border-radius:14px!important;font-family:'Cinzel',serif!important}
.community-wrap{padding:0 2px}.community-btn{display:block;width:100%;padding:14px 18px;border:1px solid rgba(212,175,55,.55);border-radius:14px;background:transparent;color:var(--gold);font:600 .88rem 'Cinzel',serif;text-align:center;text-decoration:none;letter-spacing:.06em}
.reset-test-wrap{padding:0 2px}.reset-all-btn{width:100%;padding:11px;border:1px solid rgba(192,57,43,.32);border-radius:12px;background:transparent;color:#b8796e;font:600 .76rem 'Noto Serif',serif}

/* Legal pages get a little more breathing room vertically. */
.legal-card{max-height:94vh!important;padding-top:56px!important;padding-bottom:50px!important}.legal-text{max-height:76vh!important;overflow-y:auto!important;padding-bottom:28px}

@media(max-width:430px){.fate-overlay:has(.rating-card) .rating-card,.fate-overlay:has(.schedule-card) .schedule-card,.fate-overlay:has(.support-card) .support-card,.fate-overlay:has(.legal-author-card) .legal-author-card,.fate-overlay:has(.legal-confirm-card) .legal-confirm-card{padding-left:18px;padding-right:18px}.fate-overlay:has(.rating-card) .rating-star{font-size:2.65rem}}
.wisdom-heading{display:none!important}
body.theme-kaleidoscope #app-container::after{background:transparent!important}


/* ===== FINAL USER REQUEST PASS 2026-08-21 ===== */
/* Language row: one-line label + current language. */
.language-setting{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:58px!important;cursor:pointer!important;}
.language-setting .settings-item-left{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important;}
.language-setting .settings-label{white-space:nowrap!important;}
.language-current{margin-left:auto!important;white-space:nowrap!important;text-align:right!important;max-width:none!important;font-size:.84rem!important;}
/* Dedicated dim layer: panel stays crisp, outside is only slightly darkened. */
#lang-backdrop{position:fixed!important;inset:0!important;z-index:4999!important;background:rgba(0,0,0,.30)!important;backdrop-filter:none!important;}
.language-picker-panel{z-index:5000!important;}
.language-picker-panel::before{display:none!important;}
.language-picker-panel::after{display:none!important;}
.language-panel-title{grid-column:1/-1;color:var(--gold-light);font:700 1.15rem 'Cinzel',serif;letter-spacing:.12em;padding:0 2px 6px;}
/* Theme is one coherent settings block. */
.theme-picker-panel{display:block!important;border-top:0!important;padding:8px 14px 14px!important;background:transparent!important;}
.theme-colors{display:flex!important;flex-wrap:nowrap!important;gap:12px!important;justify-content:space-between!important;align-items:center!important;width:100%!important;}
.color-option{flex:1 1 0!important;width:auto!important;max-width:58px!important;height:48px!important;border-radius:50%!important;background:rgba(7,4,16,.7)!important;border:1px solid rgba(255,255,255,.12)!important;box-shadow:inset 0 0 0 3px rgba(5,3,12,.78),0 7px 18px rgba(0,0,0,.28)!important;}
.color-option span{filter:saturate(.72) brightness(.72)!important;}
.color-option.active{border-color:var(--gold-light)!important;box-shadow:inset 0 0 0 3px rgba(5,3,12,.78),0 0 0 2px rgba(244,208,63,.22),0 0 20px rgba(244,208,63,.12)!important;transform:scale(1.04)!important;}
.theme-picker-panel .theme-kaleidoscope{display:none!important;}
/* Premium status. */
#vip-status{font-weight:600!important;}
#vip-status.premium-status{color:var(--gold-light)!important;}
/* Promo action stays inside its block. */
.promo-input-group{display:flex!important;gap:8px!important;align-items:center!important;}
.promo-btn{flex:0 0 auto!important;width:auto!important;min-width:96px!important;padding:10px 12px!important;font-size:.68rem!important;white-space:nowrap!important;}
#promo-hint{line-height:1.55!important;}
#promo-hint a{color:var(--gold-light)!important;text-decoration:none!important;font-weight:600!important;}
/* Time capsule one-line date and time. */
#first-visit-date{white-space:nowrap!important;font-size:.72rem!important;letter-spacing:0!important;max-width:62%!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.time-capsule-card{width:min(92vw,560px)!important;max-height:86vh!important;overflow:auto!important;text-align:center!important;}
.capsule-text{margin:18px auto 22px!important;max-width:520px!important;}
.capsule-date{white-space:nowrap!important;font-size:clamp(1.15rem,5vw,1.75rem)!important;margin:10px 0 4px!important;}
.capsule-time{white-space:nowrap!important;color:var(--gold-light)!important;font-size:1rem!important;margin-bottom:0!important;}
/* Full-screen content for the four requested settings pages. */
.fate-overlay{padding:0!important;}
.fate-overlay>.schedule-card,.fate-overlay>.author-card,.fate-overlay>.rating-card{width:100%!important;max-width:none!important;min-height:100vh!important;max-height:none!important;border:0!important;border-radius:0!important;background:linear-gradient(180deg,rgba(12,7,23,.98),rgba(5,3,12,.99))!important;box-shadow:none!important;overflow:auto!important;padding:82px 24px 42px!important;}
.schedule-card,.support-card,.legal-author-card,.legal-confirm-card{display:flex!important;flex-direction:column!important;justify-content:center!important;}
.schedule-title{font-size:clamp(1.35rem,5vw,2rem)!important;}
.schedule-entry,.schedule-icon{display:none!important;}
.schedule-lead{max-width:700px!important;margin:24px auto!important;font-size:1rem!important;line-height:1.95!important;}
.schedule-note{max-width:700px!important;margin:22px auto 0!important;font-size:.88rem!important;}
/* Remove special colors from those four menu rows. */
.schedule-item,.support-item,.author-item,.rate-item{background:transparent!important;}
/* Rating: lower content, framed rounded stars. */
.rating-card{justify-content:center!important;}
.rating-title{margin-top:24px!important;}
.rating-stars{margin:34px auto 18px!important;gap:8px!important;}
.rating-star{width:48px!important;height:48px!important;border:1px solid rgba(212,175,55,.32)!important;border-radius:14px!important;background:rgba(255,255,255,.025)!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:2rem!important;padding:0!important;}
.rating-star.selected{background:rgba(212,175,55,.09)!important;border-color:rgba(244,208,63,.75)!important;}
.rating-feedback{max-width:650px!important;margin:0 auto!important;}
.rating-text{max-width:650px!important;margin:10px auto!important;line-height:1.85!important;}
.rating-channel-btn{max-width:420px!important;margin:20px auto 0!important;}
/* Author reading view. */
.legal-author-card,.legal-confirm-card{justify-content:flex-start!important;padding-top:84px!important;}
.legal-author-card .author-title,.legal-confirm-card .author-title{font-size:clamp(1.35rem,5vw,2rem)!important;text-align:left!important;}
.legal-author-card .author-subtitle{font-size:1rem!important;line-height:1.75!important;text-align:left!important;max-width:760px!important;margin:12px 0 20px!important;}
.author-legal-text{border:0!important;background:transparent!important;padding:0!important;max-height:none!important;overflow:visible!important;font-size:.94rem!important;line-height:1.95!important;max-width:820px!important;}
.author-channel-btn{background:linear-gradient(180deg,#d7bb62,#9d7620)!important;color:#1a1206!important;border:1px solid rgba(244,208,63,.45)!important;box-shadow:0 10px 25px rgba(212,175,55,.12)!important;border-radius:14px!important;padding:13px 18px!important;}
.author-back-check{position:absolute!important;top:16px!important;left:16px!important;width:40px!important;height:40px!important;border-radius:50%!important;background:rgba(255,255,255,.05)!important;border:1px solid rgba(212,175,55,.3)!important;color:var(--gold-light)!important;font-size:1.2rem!important;z-index:12!important;}
/* Labyrinth: stable viewport, counter/riddle never gets squeezed by hints. */
.labyrinth-overlay{padding:0!important;overflow-y:auto!important;}
.labyrinth-container{width:min(92vw,720px)!important;max-height:calc(100vh - 70px)!important;overflow-y:auto!important;padding:76px 22px 38px!important;margin:auto!important;}
.labyrinth-counter{margin-bottom:28px!important;padding-top:8px!important;}
.labyrinth-riddle{margin-bottom:24px!important;max-height:none!important;overflow:visible!important;line-height:1.8!important;}
.labyrinth-hints{margin-top:18px!important;}
.labyrinth-hint-text{min-height:0!important;margin-top:14px!important;}
/* Wisdom stays in-place, no decorative diamonds. */
.wisdom-container::before,.wisdom-container::after{display:none!important;}
/* Legal text breathing room. */
.legal-card{max-height:calc(100vh - 34px)!important;margin-top:8px!important;margin-bottom:8px!important;padding-top:62px!important;padding-bottom:50px!important;}
@media(max-width:600px){
  .theme-colors{gap:7px!important;}
  .color-option{height:43px!important;max-width:48px!important;}
  .language-picker-panel{width:min(90vw,390px)!important;}
  .language-picker-panel.open{grid-template-columns:1fr 1fr!important;}
  .rating-star{width:44px!important;height:44px!important;font-size:1.8rem!important;}
  #first-visit-date{font-size:.64rem!important;max-width:58%!important;}
}


/* ===== FINAL PRECISION VISUAL OVERRIDES 2026-08-22 ===== */
.language-setting{align-items:center!important;min-height:58px!important;}
.language-setting .settings-item-left{align-items:center!important;}
.language-setting .settings-item-left>div{display:flex!important;align-items:center!important;}
.language-setting .settings-label,.language-current{line-height:1.2!important;white-space:nowrap!important;}
.language-current{display:block!important;margin-left:auto!important;align-self:center!important;}
#lang-backdrop{background:rgba(0,0,0,.24)!important;backdrop-filter:none!important;}
.language-picker-panel{z-index:5000!important;}

/* Theme: five dark circular emerald-like swatches, no shadow behind each circle. */
.theme-setting{align-items:center!important;}
.theme-setting .settings-item-left{flex:1 1 auto!important;min-width:0!important;}
.theme-setting .settings-value{white-space:nowrap!important;text-align:right!important;}
.theme-picker-panel{display:block!important;padding:8px 14px 16px!important;border-top:0!important;}
.theme-colors{display:flex!important;flex-wrap:nowrap!important;justify-content:space-between!important;gap:10px!important;width:100%!important;}
.color-option,.color-option:hover,.color-option:active{flex:0 0 42px!important;width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;min-height:42px!important;max-height:42px!important;aspect-ratio:1/1!important;border-radius:50%!important;padding:0!important;background:transparent!important;box-shadow:none!important;filter:none!important;transform:none!important;overflow:visible!important;}
.color-option::after{display:none!important;}
.color-option span{position:absolute!important;inset:0!important;width:42px!important;height:42px!important;border-radius:50%!important;box-shadow:none!important;filter:brightness(.62) saturate(.78)!important;border:1px solid rgba(255,255,255,.10)!important;}
.color-option.active{border:1px solid var(--gold-light)!important;box-shadow:0 0 0 2px rgba(212,175,55,.18)!important;}
.color-option.active span{filter:brightness(.68) saturate(.82)!important;}
.theme-picker-panel .theme-kaleidoscope{display:none!important;}

/* Promo / Premium */
.promo-btn{min-width:86px!important;padding:8px 10px!important;font-size:.64rem!important;}
#promo-hint a{color:var(--gold-light)!important;font-weight:600!important;text-decoration:none!important;}
#vip-status.premium-status{color:var(--gold-light)!important;}
#vip-status{font-weight:600!important;}

/* Capsule setting row hides the date entirely. */
#first-visit-date{display:none!important;}
.time-capsule-card{width:min(92vw,560px)!important;text-align:center!important;}
.capsule-text{max-width:520px!important;margin:16px auto!important;line-height:1.75!important;}
.capsule-date{font-family:'Cinzel',serif!important;font-weight:700!important;color:var(--gold-light)!important;font-size:clamp(1.25rem,5.4vw,1.9rem)!important;white-space:nowrap!important;margin:8px auto 2px!important;}
.capsule-time{font-family:'Cinzel',serif!important;font-weight:700!important;color:var(--gold-light)!important;font-size:clamp(1rem,4vw,1.2rem)!important;white-space:nowrap!important;margin-bottom:10px!important;}
.capsule-after{margin-top:14px!important;}

/* Four ordinary settings rows: same visual treatment as the rest. */
.schedule-item,.support-item,.author-item,.rate-item{background:transparent!important;border-color:var(--border-color)!important;box-shadow:none!important;}

/* Rating: a single elegant outline around the star group. */
.rating-stars{border:1px solid rgba(212,175,55,.34)!important;border-radius:18px!important;padding:7px 10px!important;gap:2px!important;width:max-content!important;max-width:100%!important;margin:30px auto 20px!important;background:rgba(255,255,255,.018)!important;}
.rating-star{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;width:56px!important;height:58px!important;font-size:3.05rem!important;line-height:1!important;color:rgba(255,255,255,.22)!important;}
.rating-star.selected{background:transparent!important;border:0!important;color:var(--gold-light)!important;text-shadow:0 0 14px rgba(244,208,63,.22)!important;}
.rating-card.compact .rating-stars{margin-top:26px!important;}
.rating-card.compact .rating-star{font-size:3.05rem!important;}

/* Full-screen author pages, with comfortable reading width. */
.legal-author-card,.legal-confirm-card{width:100%!important;max-width:none!important;min-height:100vh!important;padding:96px 8vw 44px!important;}
.author-intro-card{justify-content:center!important;text-align:center!important;}
.author-intro-card .author-subtitle{max-width:720px!important;margin:18px auto 28px!important;text-align:center!important;line-height:1.9!important;font-size:1.04rem!important;}
.author-legal-text{max-width:820px!important;margin:18px auto 28px!important;padding:0!important;border:0!important;background:transparent!important;line-height:1.95!important;font-size:1rem!important;}
.author-channel-btn{align-self:center!important;max-width:440px!important;width:100%!important;background:linear-gradient(180deg,#b89a4b,#8f6d21)!important;color:#171008!important;border:1px solid rgba(244,208,63,.42)!important;box-shadow:0 8px 24px rgba(0,0,0,.18)!important;border-radius:12px!important;}
.author-back-check{position:fixed!important;top:max(14px,env(safe-area-inset-top))!important;left:16px!important;width:40px!important;height:40px!important;border-radius:50%!important;background:rgba(255,255,255,.035)!important;border:1px solid rgba(212,175,55,.28)!important;color:var(--gold-light)!important;font-size:1.35rem!important;z-index:10001!important;}

/* Schedule: title -> lead above gold divider -> future entries -> note pinned visually at bottom. */
.schedule-card{justify-content:flex-start!important;text-align:center!important;}
.schedule-title{margin-bottom:16px!important;}
.schedule-lead{margin:0 auto 20px!important;max-width:760px!important;line-height:1.85!important;}
.schedule-divider{width:min(620px,82vw)!important;height:1px!important;background:linear-gradient(90deg,transparent,var(--gold),transparent)!important;margin:4px auto 22px!important;}
.schedule-note{margin-top:auto!important;padding-top:26px!important;max-width:760px!important;line-height:1.7!important;}

/* About page: no old quote/lead; comfortable side margins. */
.about-card-final{max-width:900px!important;padding-left:10vw!important;padding-right:10vw!important;}
.about-card-final .about-body{line-height:1.95!important;font-size:1rem!important;text-align:left!important;}

/* Wisdom: ornate frame without extra diamonds. */
.wisdom-frame{position:relative!important;border:1px solid rgba(212,175,55,.38)!important;border-radius:22px!important;padding:42px 26px!important;background:linear-gradient(145deg,rgba(28,13,48,.55),rgba(8,5,18,.42))!important;}
.wisdom-frame::before,.wisdom-frame::after{content:''!important;position:absolute!important;width:34px!important;height:34px!important;border-color:rgba(212,175,55,.65)!important;border-style:solid!important;pointer-events:none!important;}
.wisdom-frame::before{top:10px!important;left:10px!important;border-width:1px 0 0 1px!important;border-radius:8px 0 0 0!important;}
.wisdom-frame::after{right:10px!important;bottom:10px!important;border-width:0 1px 1px 0!important;border-radius:0 0 8px 0!important;}
.wisdom-quote{line-height:1.9!important;font-size:1.08rem!important;}
.wisdom-next-btn{margin-top:20px!important;}

/* Stable close button: fixed to viewport corner, never moves when content scrolls. */
.overlay-close-x{position:fixed!important;top:max(14px,env(safe-area-inset-top))!important;right:16px!important;z-index:10000!important;}
.fate-overlay,.labyrinth-overlay,.destiny-overlay{overflow-y:auto!important;}

/* Labyrinth counter has breathing room; hints never push the close button. */
.labyrinth-container{padding-top:88px!important;}
.labyrinth-counter{margin-bottom:30px!important;padding-top:4px!important;}
.labyrinth-riddle{margin-bottom:26px!important;line-height:1.85!important;}
.labyrinth-hints{margin-top:20px!important;}

/* Chronicles: extra side breathing room and readable result blocks. */
.fate-container{padding-left:1cm!important;padding-right:1cm!important;max-width:820px!important;}
.fate-mini-block{margin:12px 0!important;padding:13px 14px!important;border-left:1px solid rgba(212,175,55,.28)!important;background:rgba(255,255,255,.02)!important;border-radius:10px!important;line-height:1.65!important;}
.fate-mini-block strong{display:block!important;color:var(--gold-light)!important;margin-bottom:5px!important;}
.fate-stat-label{font-variant-numeric:tabular-nums!important;}

@media(max-width:600px){
  .theme-colors{gap:7px!important;justify-content:space-between!important;}
  .color-option,.color-option span{width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important;}
  .rating-star{width:50px!important;height:52px!important;font-size:2.75rem!important;}
  .legal-author-card,.legal-confirm-card{padding-left:7vw!important;padding-right:7vw!important;}
  .about-card-final{padding-left:1cm!important;padding-right:1cm!important;}
  .fate-container{padding-left:1cm!important;padding-right:1cm!important;}
}
/* Keep every fixed close control clear of the first line of content. */
.fate-overlay>.fate-container,.destiny-overlay>.destiny-container,.wisdom-overlay>.wisdom-container{padding-top:88px!important;}

/* ===== ONLY THE REQUESTED FINAL TWEAKS 2026-08-23 ===== */
/* Language: one compact row; icon, label and selected value share the same vertical center. */
.language-setting{
  display:flex!important;align-items:center!important;min-height:54px!important;height:54px!important;
  padding-top:0!important;padding-bottom:0!important;
}
.language-setting .settings-item-left{display:flex!important;align-items:center!important;height:100%!important;gap:10px!important;min-width:0!important;}
.language-setting .settings-icon{flex:0 0 22px!important;width:22px!important;height:22px!important;display:block!important;}
.language-setting .settings-label,.language-setting .language-current{line-height:1!important;white-space:nowrap!important;}
.language-setting .language-current{margin-left:auto!important;align-self:center!important;max-width:52%!important;overflow:hidden!important;text-overflow:ellipsis!important;}
/* Keep the picker bright while only the page behind it is dimmed. */
#lang-backdrop{z-index:4999!important;background:rgba(0,0,0,.28)!important;backdrop-filter:none!important;}
.language-picker-panel{z-index:5000!important;opacity:1!important;filter:none!important;}

/* Rating: rounded star shapes using rounded SVG joins. */
.rating-star{border-radius:16px!important;display:grid!important;place-items:center!important;}
.rating-star svg{width:100%!important;height:100%!important;display:block!important;overflow:visible!important;}
.rating-star svg path{fill:currentColor!important;stroke:currentColor!important;stroke-width:1.1!important;stroke-linejoin:round!important;stroke-linecap:round!important;}

/* Author legal screen: fixed controls remain visible while the text scrolls; page content rises from below. */
.fate-overlay:has(.legal-author-card),.fate-overlay:has(.legal-confirm-card){overflow:hidden!important;}
.fate-overlay:has(.legal-author-card) .legal-author-card,.fate-overlay:has(.legal-confirm-card) .legal-confirm-card{overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;animation:authorRise .28s ease-out both!important;}
.fate-overlay:has(.legal-author-card) .overlay-close-x,.fate-overlay:has(.legal-confirm-card) .overlay-close-x,.fate-overlay:has(.legal-author-card) .author-back-check,.fate-overlay:has(.legal-confirm-card) .author-back-check{position:fixed!important;z-index:10020!important;top:max(14px,env(safe-area-inset-top))!important;bottom:auto!important;}
@keyframes authorRise{from{transform:translateY(42px);opacity:.92}to{transform:translateY(0);opacity:1}}

/* Wisdom: compact, not a large popup. */
.wisdom-container{max-width:340px!important;padding:24px 20px 20px!important;border-radius:20px!important;}
.wisdom-quote{min-height:78px!important;font-size:1rem!important;line-height:1.75!important;margin-bottom:10px!important;}
.wisdom-close-btn{margin-top:8px!important;padding:11px 14px!important;}

/* Chronicles: percentage labels and fills stay aligned; result text is intentionally short. */
.fate-stat-label{font-variant-numeric:tabular-nums!important;white-space:nowrap!important;}
.fate-stat-fill{transition:width .35s ease!important;}
.fate-analysis{line-height:1.65!important;margin-top:14px!important;}

/* Do not introduce any extra special styling for the four settings rows. */
.rate-item,.schedule-item,.support-item,.author-item{background:transparent!important;border-color:var(--border-color)!important;box-shadow:none!important;}

/* ===== REQUESTED FINAL FIXES ===== */
/* Language picker: the page dims, while the picker itself stays fully crisp and interactive. */
.lang-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:4999!important;
  background:rgba(0,0,0,.34)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  cursor:pointer!important;
}
.language-picker-panel{
  z-index:5000!important;
  opacity:1!important;
  filter:none!important;
  pointer-events:auto!important;
}
.language-picker-panel::after{display:none!important;content:none!important;}

/* Author legal pages: controls belong to the viewport, not to the scrolling text. */
.fate-overlay:has(.legal-author-card),
.fate-overlay:has(.legal-confirm-card){overflow:hidden!important;}
.fate-overlay:has(.legal-author-card) .overlay-close-x,
.fate-overlay:has(.legal-confirm-card) .overlay-close-x,
.fate-overlay:has(.legal-author-card) .author-back-check,
.fate-overlay:has(.legal-confirm-card) .author-back-check{
  position:fixed!important;
  top:max(14px,env(safe-area-inset-top))!important;
  bottom:auto!important;
  z-index:10050!important;
  visibility:visible!important;
  opacity:1!important;
}
.fate-overlay:has(.legal-author-card) .overlay-close-x,
.fate-overlay:has(.legal-confirm-card) .overlay-close-x{right:16px!important;}
.fate-overlay:has(.legal-author-card) .author-back-check,
.fate-overlay:has(.legal-confirm-card) .author-back-check{left:16px!important;}
.fate-overlay:has(.legal-author-card) .legal-author-card,
.fate-overlay:has(.legal-confirm-card) .legal-confirm-card{
  padding-top:calc(86px + env(safe-area-inset-top))!important;
  padding-bottom:42px!important;
  min-height:100vh!important;
  box-sizing:border-box!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Wisdom: remove the unnecessary empty area above the quote. */
.wisdom-overlay .wisdom-container{
  padding-top:42px!important;
  padding-bottom:18px!important;
}
.wisdom-overlay .wisdom-heading{margin-top:0!important;}

/* The four settings rows use the same restrained border treatment as every other row. */
.settings-item.rate-item,
.settings-item.schedule-item,
.settings-item.support-item,
.settings-item.author-item{
  border-color:var(--glass-border)!important;
  box-shadow:none!important;
}

/* Final requested language-row alignment: planet icon + label sit slightly lower. */
.language-setting .settings-item-left{transform:translateY(3px)!important;}
/* Language picker is a standalone bright panel; never dim the page behind it. */
.lang-backdrop{display:none!important;}
.language-picker-panel::after{display:none!important;content:none!important;}
/* Wisdom: trim the empty top area further without changing the content. */
.wisdom-overlay .wisdom-container{padding-top:30px!important;}
/* Author legal controls stay pinned to the viewport while the legal text scrolls. */
.fate-overlay:has(.legal-author-card) .overlay-close-x,
.fate-overlay:has(.legal-confirm-card) .overlay-close-x,
.fate-overlay:has(.legal-author-card) .author-back-check,
.fate-overlay:has(.legal-confirm-card) .author-back-check{position:fixed!important;top:max(14px,env(safe-area-inset-top))!important;bottom:auto!important;z-index:10050!important;}

/* v4.1.4 */
.language-setting .settings-item-left{transform:translateY(6.9px)!important;}
.fate-short-analysis{padding:12px 2px;font-size:.94rem;line-height:1.55;color:var(--text-main);}


/* v4.1.7 — immediate interactions: no artificial waits between game states. */
.fate-overlay,.labyrinth-overlay,.destiny-overlay,.wisdom-overlay{transition:none!important;}
.fate-overlay .fate-container,.labyrinth-overlay .labyrinth-container,.destiny-overlay .destiny-container,.wisdom-overlay .wisdom-container{animation:none!important;transition:none!important;}
.fate-overlay .fate-stat-fill,.fate-overlay .fate-progress-fill,.labyrinth-overlay .fate-stat-fill,.destiny-overlay .fate-stat-fill{transition:none!important;}

/* ===== v4.1.9 requested precision/performance pass ===== */
/* Language row: move planet icon + "Language" label 0.2mm (~0.76px) upward. */
.language-setting .settings-item-left{transform:translateY(8.04px)!important;}

/* No decorative ornaments around Wisdom of Fate. */
.wisdom-container::before,.wisdom-container::after{display:none!important;content:none!important;}

/* Interaction-first rendering: no transition/animation waits on game overlays. */
.fate-overlay,.labyrinth-overlay,.destiny-overlay,.wisdom-overlay,
.fate-overlay *,.labyrinth-overlay *,.destiny-overlay *,.wisdom-overlay *{
  transition-duration:0s!important;
  animation-duration:0s!important;
  animation-delay:0s!important;
}

/* Legal pages: titles stay inside the reading area with comfortable top spacing. */
.legal-card .fate-final-title{margin-top:0!important;padding-top:4px!important;}

/* Reset-progress test control removed from the UI. */
.reset-test-wrap,.reset-all-btn{display:none!important;}

/* v4.1.10 — instant UI: content is already bundled, so interactions never wait. */
.yd-instant .fate-overlay,
.yd-instant .labyrinth-overlay,
.yd-instant .destiny-overlay,
.yd-instant .wisdom-overlay,
.yd-instant .fate-overlay *,
.yd-instant .labyrinth-overlay *,
.yd-instant .destiny-overlay *,
.yd-instant .wisdom-overlay *{
  transition-duration:0s!important;
  animation-duration:0s!important;
  animation-delay:0s!important;
}

/* Legal title sits lower inside the reading area, while the page itself remains scrollable. */
.legal-card .fate-final-title{padding-top:75.6px!important;margin-top:0!important;}

/* User-requested legal header/text position: 3cm upward */
.fate-overlay:has(.legal-card) .legal-card .fate-final-title, .fate-overlay:has(.legal-card) .legal-card .legal-text { position:relative; top:-113.4px; }
@media (max-height:700px){ .fate-overlay:has(.legal-card) .legal-card .fate-final-title, .fate-overlay:has(.legal-card) .legal-card .legal-text { top:-84px; } }





/* Landscape is allowed */
html, body { transform: none; }

/* v4.1.23 micro-adjustments */
.settings-language-row .settings-icon, .settings-language-row .settings-label { transform: translateY(-0.1mm); }
.legal-overlay .fate-final-title, .legal-overlay .legal-body { transform: translateY(-30mm); }
