/* SYNAPS Light Mode Force Override */
:root {
  color-scheme: light !important;
}

/* 壁紙: html要素に設定 */
html {
  background: url(/images/bg-wallpaper.jpg) right bottom/cover fixed #fafbfe !important;
}

/* サブページ: bodyを白い帯にする（中央に白背景カラム） */
body:not(.main-page) {
  background: #fff !important;
  color: #2d3748 !important;
  max-width: 640px !important;
  margin: 0 auto !important;
  min-height: 100vh;
}

/* メインページ: bodyは透明（各ページのコンテナが白背景を持つ） */
body.main-page {
  background: transparent !important;
  color: #2d3748 !important;
}

header, .header, [class*="header"] {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
header h1, .header h1 {
  color: #1e293b !important;
}
header .subtitle, header .back {
  color: #6366f1 !important;
}
.back, .back-link, a.back {
  color: #6366f1 !important;
}
/* Cards & Containers */
.card, [class*="card"], .quiz-card, .game-card, .item, .option, .choice,
.result-card, .score-card, .stats-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}
.card-name, .card-title, [class*="card"] h2, [class*="card"] h3 {
  color: #1e293b !important;
}
.card-desc, .card-detail, .card-description, [class*="desc"] {
  color: #64748b !important;
}
/* Controls & Filters */
.controls, .filter-bar, .toolbar {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
.filter-btn {
  border-color: #cbd5e1 !important;
  color: #64748b !important;
  background: transparent !important;
}
.filter-btn:hover, .filter-btn.active {
  border-color: #6366f1 !important;
  color: #6366f1 !important;
  background: rgba(99,102,241,0.08) !important;
}
.search-box, input[type="text"], input[type="search"], input[type="number"], select, textarea {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}
.search-box::placeholder, input::placeholder {
  color: #94a3b8 !important;
}
/* Stats */
.stats-bar, .stats, .score-section {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}
.stats-bar span, .stat-value {
  color: #6366f1 !important;
}
/* Sections */
.cat-section, .section, .category, .panel {
  color: #2d3748 !important;
}
.section-title, .cat-title, .category-title, h2, h3 {
  color: #1e293b !important;
}
/* Buttons */
.btn, button:not(.filter-btn):not(#hamburgerBtn):not([style*="position:fixed"]) {
  color: #2d3748 !important;
}
.btn-primary, .start-btn, .submit-btn, [class*="primary"] {
  background: #6366f1 !important;
  color: #ffffff !important;
}
/* Badges */
.badge, [class*="badge"] {
  color: inherit !important;
}
/* Tables */
table, th, td {
  border-color: #e2e8f0 !important;
}
th {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}
td {
  background: #ffffff !important;
  color: #2d3748 !important;
}
/* Modal & Overlay */
.modal, .popup, .dialog, .overlay-content {
  background: #ffffff !important;
  color: #2d3748 !important;
}
/* Misc text colors */
.text-muted, .hint, .description, .info, small, .note {
  color: #94a3b8 !important;
}
/* Links */
a:not(.back):not(.back-link):not([class*="btn"]):not([class*="card"]):not([class*="nav"]) {
  color: #6366f1 !important;
}
/* Remove dark media query effects */
@media (prefers-color-scheme: dark) {
  body:not(.main-page) { background: #fff !important; color: #2d3748 !important; }
  body.main-page { background: transparent !important; color: #2d3748 !important; }
}
