/* 全站色系：所有頁面的顏色都從這裡的變數來，要換色只改這一份。
   各頁 <style> 裡只寫 var(--primary) 這類變數，不要再寫死色碼。 */
:root {
    /* 官網配色（2026-11 使用者要求配合首頁照片＋加入黃色）：照片裡西裝的灰藍、明亮辦公室的冷灰白，重點色用黃色 */
    --brand-navy: #22384f;
    --brand-navy-100: #d3dde8;
    --brand-bg: #f3f5f8;
    --brand-gold: #f5c330;
    --brand-gold-50: #fff6d6;
    --brand-gold-ink: #8a6500;
    --brand-ai: #4cb4ff;          /* 官網 AI 圖樣的發光藍（招生區的晶片、線路） */
    --brand-ink: #1a1a1a;         /* 官網頁首品牌字（驅勢英日韓／英文名）的黑色（使用者要求） */
    /* 主色：紫色學院風。按鈕、連結、標題橫幅、選取狀態 */
    --primary: #4a2d7f;
    --primary-600: #38205f;
    --primary-300: #b7a3db;
    --primary-50: #f1ecf8;
    --primary-100: #e3d9f2;
    /* 深色：同色系的深色，只用在標題字、返回鈕這類小地方，做出深淺層次（不要拿來塗大面積） */
    --deep: #2e1a52;
    /* 標題橫幅：淺紫平塗、不用漸層，深紫字 */
    --hero: var(--primary-50);
    --hero-ink: var(--deep);

    /* 文字與底色 */
    --ink: #231f2e;
    --ink-2: #4c4757;
    --muted: #6e6879;
    --muted-2: #9c96a6;
    --line: #e5e1ec;
    --line-strong: #c9c2d4;
    --bg: #f5f3f8;
    --surface-2: #f3f0f6;

    /* 狀態色：對／錯／提醒／收藏 */
    --ok: #1f8a4c;     --ok-ink: #176b3a;   --ok-300: #9fd5b4;  --ok-50: #e3f4ea;
    --bad: #c23b2e;    --bad-ink: #93281e;  --bad-300: #f0a49b; --bad-50: #fbe6e3;
    --warn: #c46a12;   --warn-ink: #8a4a0c; --warn-300: #f2c48f; --warn-50: #fdf1e2;
    --star: #f2b705;   --star-ink: #a87d00; --star-50: #fff8e0;

    /* 層次：不用模糊陰影，改用實線外框疊出層次（box-shadow 的 0 0 0 1px 等於不佔版面的邊框） */
    --edge: 0 0 0 1px var(--line);                                             /* 一般卡片 */
    --edge-raised: 0 0 0 1px var(--primary-300), 4px 4px 0 var(--primary-100); /* 滑過、被選取 */
    --edge-hero: 0 0 0 1px var(--primary-300), 6px 6px 0 var(--primary-100);   /* 標題橫幅 */
    --edge-pop: 0 0 0 1px var(--line-strong), 5px 5px 0 var(--primary-100);    /* 浮動面板、提示 */

    /* 中文字型沒有韓文字，韓文會自動改用後面的韓文字型（Windows 的 Malgun Gothic、Mac/iPhone 的 Apple SD Gothic Neo） */
    --font: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", Arial, "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
/* 多益（TOEIC）：藍色。只覆寫主色與帶紫調的中性色，狀態色（對／錯／提醒／收藏）沿用。
   樣板的 <html data-exam="…"> 由 exams.py 決定；新增考試照這個格式加一組 */
:root[data-exam="toeic"] {
    --primary: #1d4ed8;
    --primary-600: #1e3a8a;
    --primary-300: #9db8ec;
    --primary-50: #eaf1fd;
    --primary-100: #d4e2fa;
    --deep: #172a52;
    --ink: #1c2433;
    --ink-2: #434c5e;
    --muted: #667085;
    --muted-2: #98a2b3;
    --line: #e0e6ef;
    --line-strong: #c2cddc;
    --bg: #f3f6fb;
    --surface-2: #eef2f8;
}
/* 英文零基礎（BASIC）：暖橘色，給剛起步的學生活潑一點 */
:root[data-exam="basic"] {
    --primary: #c2410c;
    --primary-600: #9a3412;
    --primary-300: #f4b48a;
    --primary-50: #fff1e8;
    --primary-100: #fde0cc;
    --deep: #5a3a28;
    --ink: #2a211c;
    --ink-2: #54473f;
    --muted: #7a6b62;
    --muted-2: #a8998f;
    --line: #eee3da;
    --line-strong: #d8c6b8;
    --bg: #fbf6f2;
    --surface-2: #f7efe8;
}
/* 一般英文（GENERAL）：青綠色 */
:root[data-exam="general"] {
    --primary: #0f766e;
    --primary-600: #115e59;
    --primary-300: #8fd0c7;
    --primary-50: #e7f6f4;
    --primary-100: #cdeee9;
    --deep: #163f3b;
    --ink: #18272a;
    --ink-2: #3f5254;
    --muted: #627476;
    --muted-2: #95a5a6;
    --line: #dde9e8;
    --line-strong: #bfd3d1;
    --bg: #f2f8f7;
    --surface-2: #eaf3f2;
}
/* 韓檢（TOPIK）：莓果紅 */
:root[data-exam="topik"] {
    --primary: #9d174d;
    --primary-600: #831843;
    --primary-300: #f0a5c4;
    --primary-50: #fdedf3;
    --primary-100: #fad5e3;
    --deep: #4a1529;
    --ink: #2a1c22;
    --ink-2: #554049;
    --muted: #7a6670;
    --muted-2: #a8959e;
    --line: #eee0e6;
    --line-strong: #d9c3cd;
    --bg: #fbf5f7;
    --surface-2: #f7edf1;
}
/* 日檢（JLPT）：抹茶綠（偏黃的綠，和一般英文的青綠分得開） */
:root[data-exam="jlpt"] {
    --primary: #4d7c0f;
    --primary-600: #3f6212;
    --primary-300: #b9d48e;
    --primary-50: #f2f7e9;
    --primary-100: #e1edcc;
    --deep: #2f4214;
    --ink: #1f241a;
    --ink-2: #464d3e;
    --muted: #6b7262;
    --muted-2: #9ca394;
    --line: #e3e8da;
    --line-strong: #c7d0b9;
    --bg: #f6f8f2;
    --surface-2: #eff3e8;
}
/* 日文字（lang="ja"）用日文字型：同一個漢字，中文字型和日文字型的寫法不一樣（例如「骨」「直」） */
:lang(ja) { font-family: "Yu Gothic UI", "Yu Gothic", "Meiryo", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", var(--font); }
/* 考試選擇頁的卡片：各自顯示自己考試的主色（不受整頁色系影響） */
.exam-tone-ielts { --tone: #4a2d7f; --tone-50: #f1ecf8; --tone-300: #b7a3db; --tone-100: #e3d9f2; --tone-deep: #2e1a52; }
.exam-tone-toeic { --tone: #1d4ed8; --tone-50: #eaf1fd; --tone-300: #9db8ec; --tone-100: #d4e2fa; --tone-deep: #172a52; }
.exam-tone-basic { --tone: #c2410c; --tone-50: #fff1e8; --tone-300: #f4b48a; --tone-100: #fde0cc; --tone-deep: #5a3a28; }
.exam-tone-general { --tone: #0f766e; --tone-50: #e7f6f4; --tone-300: #8fd0c7; --tone-100: #cdeee9; --tone-deep: #163f3b; }
.exam-tone-topik { --tone: #9d174d; --tone-50: #fdedf3; --tone-300: #f0a5c4; --tone-100: #fad5e3; --tone-deep: #4a1529; }
.exam-tone-jlpt { --tone: #4d7c0f; --tone-50: #f2f7e9; --tone-300: #b9d48e; --tone-100: #e1edcc; --tone-deep: #2f4214; }
.exam-tone-toefl { --tone: #b45309; --tone-50: #fef5e7; --tone-300: #f3c47e; --tone-100: #fde6c4; --tone-deep: #4d2a07; }
/* 官網的 LINE 按鈕：LINE 官方綠 */
:root { --line-green: #06c755; }

body { font-family: var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--primary); }
::selection { background: var(--primary-50); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 線條圖示（static/icons.svg）：取代 emoji，大小跟著文字、顏色跟著文字 */
.ui-ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: none; stroke: currentColor;
         stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button .ui-ic, a .ui-ic { pointer-events: none; }
/* 卡片上的大圖示用主色 */
.menu-icon, .theme-icon, .skill .icon { color: var(--primary); }

/* 深淺層次：只把「標題字」換成同色系深色，底色與按鈕維持原本的主色。
   加 :root 提高優先順序，蓋過各頁 <style> 裡的 color: var(--ink) */
:root .menu-title, :root .theme-title, :root .skill .name, :root .pick, :root .dex-title,
:root .panel h2, :root .header h1 { color: var(--deep); }
:root .exam-card .exam-name .nm { color: var(--tone-deep, var(--deep)); }
