/* 數學學習單共用配色：深海軍藍為主、金黃是唯一的暖色點綴；綠色只留給「答對」
   用在 Tailwind 版型的學習單（header.sticky + #q-nav-container），放在 Tailwind 之後、蓋過原本的靛紫色 */

body {
  background-color: #eef4ff !important;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.07) 1px, transparent 1px) !important;
  background-size: 32px 32px !important;
}

/* 頂部列 */
body > header.sticky {
  background: radial-gradient(ellipse 60% 140% at 50% 0%, rgba(37, 99, 235, 0.45), transparent 70%),
              linear-gradient(180deg, #0d1b3d, #0a1530) !important;
  border-bottom: 2px solid rgba(96, 165, 250, 0.45);
  box-shadow: 0 4px 16px rgba(7, 15, 36, 0.35) !important;
}
body > header.sticky h1 { color: #f7faff !important; }
body > header.sticky .bg-indigo-950\/80,
body > header.sticky .bg-black\/25 { background: rgba(7, 15, 36, 0.7) !important; }
body > header.sticky .border-indigo-700\/50,
body > header.sticky .border-white\/20 { border-color: rgba(96, 165, 250, 0.4) !important; }
body > header.sticky .bg-indigo-700,
body > header.sticky .bg-white\/30 { background: rgba(96, 165, 250, 0.4) !important; }
body > header.sticky .text-indigo-300,
body > header.sticky .text-white\/70 { color: #a9bde0 !important; }
body > header.sticky .text-amber-400,
body > header.sticky .text-amber-300 { color: #fbbf24 !important; }
body > header.sticky #timer-display { color: #93c5fd !important; }

/* 題號頁籤 */
#q-nav-container .bg-amber-400 {
  background: #fbbf24 !important;
  color: #0d1b3d !important;
  --tw-ring-color: rgba(251, 191, 36, 0.45) !important;
}
#q-nav-container .bg-indigo-700\/60,
#q-nav-container .bg-white\/15,
#q-nav-container .bg-violet-700\/60 {
  background: rgba(37, 99, 235, 0.35) !important;
  color: #dbeafe !important;
}
#q-nav-container .bg-indigo-700\/60:hover,
#q-nav-container .bg-white\/15:hover,
#q-nav-container .bg-violet-700\/60:hover { background: rgba(37, 99, 235, 0.6) !important; }

/* 題目卡：上緣一條藍線，像目錄的研究所卡片 */
body > main > section:first-child > div:first-child { border-top: 5px solid #2563eb !important; }

/* 手機：標題太長就省略，不要把整頁撐寬 */
@media (max-width: 640px) {
  body > header.sticky > div > div:first-child { flex-shrink: 1 !important; min-width: 0; }
  body > header.sticky h1 { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* ===== 2026-11-17 配色統一（2-1、2-2、2-3 步步練共用） ===== */
/* 做完的題號：藍底金黃打勾（不用綠色） */
html body #q-nav-container .bg-emerald-600\/80 { background: #2563eb !important; color: #fff !important; }
html body #q-nav-container .bg-emerald-600\/80:hover { background: #1d4ed8 !important; }
html body #q-nav-container .text-emerald-200 { color: #fde68a !important; }

/* 左上兩個小標籤：同一組藍色 */
html body #q-stage { background: #eef2ff !important; color: #1e3a8a !important; border-color: #c7d2fe !important; }
html body #q-category { background: #fff !important; color: #1e3a8a !important; border-color: #c7d2fe !important; }

/* 題目看板：跟頂部列同色的深藍外框；裝飾 emoji 拿掉 */
html body .board { background: linear-gradient(160deg, #1e3a8a 0%, #172554 100%) !important; border-color: #0b1530 !important; }
html body .board-screen { background: #0b1633 !important; border-color: #060d22 !important; }
html body .board .text-3xl { display: none !important; }
html body .star-icon:not(.got) { background: rgba(255, 255, 255, 0.08) !important; border-color: rgba(147, 197, 253, 0.45) !important; color: #93c5fd !important; }

/* 通關密語：白底藍框，解開的字卡才是金黃 */
html body main div:has(> #secret-word) { background: #fff !important; border-color: #c7d2fe !important; }
html body main div:has(> #secret-word) > .text-amber-700 { color: #1e3a8a !important; }
html body .secret-char:not(.got) { border-color: #93c5fd !important; color: #93c5fd !important; }
html body .secret-char.got { border-color: #f59e0b !important; background: #fde68a !important; color: #78350f !important; }
