/* ============================================================================
   SchoolBase 香港校本庫 — 清新現代設計系統
   風格：清新活力 · 現代教育 · 自然親和
   色系：翠綠 + 暖橙 + 乾淨白
   ============================================================================ */

/* === Design Tokens === */
:root {
    /* 主色 — 翠綠（成長 · 教育 · 活力） */
    --primary:        #0D9488;
    --primary-dark:   #0F766E;
    --primary-light:  #F0FDFA;
    --primary-hover:  #14B8A6;
    --primary-glow:   rgba(13, 148, 136, 0.12);

    /* 副色 — 暖橙（熱情 · 溫暖） */
    --accent:         #EA580C;
    --accent-dark:    #C2410C;
    --accent-light:   #FFF7ED;

    /* 功能色 */
    --success:        #16A34A;
    --success-light:  #F0FDF4;
    --warning:        #CA8A04;
    --warning-light:  #FEFCE8;
    --danger:         #DC2626;
    --danger-light:   #FEF2F2;
    --info:           #2563EB;
    --info-light:     #EFF6FF;

    /* Banding */
    --band1:          #16A34A;
    --band2:          #CA8A04;
    --band3:          #DC2626;
    --highlight:      #FFFBEB;

    /* 文字 */
    --text-primary:   #1E293B;
    --text-secondary: #475569;
    --text-muted:     #94A3B8;
    --text-light:     #ffffff;

    /* 背景 — 乾淨明亮 */
    --bg-white:       #FFFFFF;
    --bg-light:       #F8FAFC;
    --bg-section:     #F1F5F9;
    --bg-warm:        #FAFAF5;
    --bg-dark:        #0F172A;

    /* 邊框 */
    --border-color:   #E2E8F0;
    --border-light:   #F1F5F9;
    --border-accent:  #CBD5E1;

    /* 圓角 — 現代圓潤 */
    --radius-sm:      6px;
    --radius-md:      8px;
    --radius-lg:      12px;
    --radius-xl:      16px;
    --radius-full:    9999px;

    /* 陰影 — 柔和自然 */
    --shadow-xs:      0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md:      0 4px 8px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg:      0 8px 16px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.03);
    --shadow-xl:      0 12px 24px rgba(0,0,0,0.07);
    --shadow-hover:   0 8px 20px rgba(13, 148, 136, 0.12);

    /* 字型 */
    --font-sans:      "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
    --font-display:   "Noto Sans TC", "PingFang TC", system-ui, sans-serif;

    /* 容器 */
    --container-max:  1200px;
    --header-height:  64px;

    /* 排版比例 */
    --text-xs:    0.75rem;
    --text-sm:    0.875rem;
    --text-base:  1rem;
    --text-lg:    1.125rem;
    --text-xl:    1.25rem;
    --text-2xl:   1.5rem;
    --text-3xl:   1.875rem;
    --text-4xl:   2.25rem;

    /* 間距比例 */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-8:  32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* 動畫 */
    --duration-fast:  150ms;
    --duration-normal: 250ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--duration-fast) ease;
}
a:hover { color: var(--primary-hover); text-decoration: underline; }

/* === Skip Link（無障礙） === */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
    outline: none;
}

/* === Focus Visible（鍵盤導覽可見焦點） === */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* === Footer Links === */
.footer-links a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.85); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* 觸摸優化 */
button, a, .school-card, .category-card, .guide-card, .district-link,
.school-grid-card, .btn, .filter-btn, .pagination a {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: var(--primary);
    color: white;
}

/* === Container === */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================================
   HEADER — 穩重學術風格頂部導航
   ============================================================================ */
.site-header {
    background: linear-gradient(135deg, #0F766E 0%, #0D9488 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(13, 148, 136, 0.2);
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.site-logo:hover {
    text-decoration: none;
    color: white;
    opacity: 0.95;
}
.site-logo .logo-icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
}
.site-logo .logo-sub {
    font-size: 0.6rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    display: block;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1px;
}
.main-nav a {
    display: flex;
    align-items: center;
    padding: 8px 13px;
    font-size: 0.84rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
    text-decoration: none;
    white-space: nowrap;
}
.main-nav a:hover {
    background: rgba(255,255,255,0.12);
    color: white;
    text-decoration: none;
}
.main-nav a.active {
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 600;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 1.2rem;
    cursor: pointer;
    color: white;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

/* ============================================================================
   HERO — 學校書院風格首頁橫幅
   ============================================================================ */
.hero {
    background: var(--primary);
    background-image:
        linear-gradient(135deg, #0F766E 0%, #0D9488 40%, #14B8A6 100%);
    color: white;
    padding: 56px 0 68px;
    text-align: center;
    position: relative;
    border-bottom: none;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F59E0B, #EA580C, #F59E0B);
}

.hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    line-height: 1.3;
}
.hero .hero-subtitle {
    font-size: clamp(0.88rem, 1.8vw, 1.05rem);
    opacity: 0.8;
    margin-bottom: 32px;
    font-weight: 400;
}

/* Search */
.search-box {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 16px 56px 16px 24px;
    font-size: 0.95rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    outline: none;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: white;
    transition: border-color var(--duration-normal) ease;
}
.search-box input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.search-box input::placeholder {
    color: var(--text-muted);
}
.search-box button {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: 46px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background var(--duration-fast) ease;
}
.search-box button:hover {
    background: var(--primary-dark);
}

/* Quick links */
.hero-quick-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.hero-quick-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 18px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all var(--duration-normal) ease;
    text-decoration: none;
}
.hero-quick-links a:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
}

/* ============================================================================
   SECTION TITLES
   ============================================================================ */
.section-title {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
}
.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.9rem;
    padding-left: 14px;
}

/* ============================================================================
   CATEGORY CARDS
   ============================================================================ */
.category-section {
    padding: 48px 0 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--duration-normal) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-top: 3px solid transparent;
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--primary);
    text-decoration: none;
}

.category-card .card-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    transition: all var(--duration-normal) ease;
}
.category-card:hover .card-icon {
    background: var(--primary);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}
.category-card .card-title {
    font-size: 1rem;
    font-weight: 600;
}
.category-card .card-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================================
   PAGE LAYOUT
   ============================================================================ */
.page-content {
    padding: 28px 0 56px;
    flex: 1;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb .sep { color: var(--text-muted); font-size: 0.7rem; }

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h1 {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--primary);
}
.result-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================================
   FILTER BAR
   ============================================================================ */
.filter-bar {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    box-shadow: var(--shadow-xs);
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}
.filter-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.filter-group select,
.filter-group input {
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-white);
    outline: none;
    transition: border-color var(--duration-fast) ease;
    appearance: none;
}
.filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0AEC0' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.filter-btn {
    padding: 9px 22px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background var(--duration-fast) ease;
    white-space: nowrap;
}
.filter-btn:hover {
    background: var(--primary-dark);
}
.filter-btn.secondary {
    background: var(--bg-section);
    color: var(--text-secondary);
}
.filter-btn.secondary:hover {
    background: var(--border-color);
}

/* ============================================================================
   SCHOOL CARDS
   ============================================================================ */
.school-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.school-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--duration-normal) ease;
    display: flex;
    gap: 24px;
    text-decoration: none;
    color: var(--text-primary);
    border-left: 4px solid transparent;
}
.school-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--primary);
    text-decoration: none;
}

.school-card-main {
    flex: 1;
    min-width: 0;
}
.school-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.school-card-name-en {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.school-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--bg-section);
    color: var(--text-secondary);
}
.tag.band1 { background: #dcfce7; color: #166534; font-weight: 700; border: 1.5px solid #86efac; }
.tag.band2 { background: #fef9c3; color: #854d0e; font-weight: 700; border: 1.5px solid #fde047; }
.tag.band3 { background: #fee2e2; color: #991b1b; font-weight: 700; border: 1.5px solid #fca5a5; }
.tag.dss   { background: #EBF4FF; color: #2B6CB0; }
.tag.govt  { background: #F0FFF4; color: #276749; }
.tag.aided { background: #FEFCBF; color: #975A16; }
.tag.intl  { background: var(--accent-light); color: var(--accent); }
.tag.pvt   { background: #FED7E2; color: #97266D; }

.school-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.83rem;
    color: var(--text-secondary);
}
.school-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.school-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    min-width: 120px;
}
.school-card-tuition { text-align: right; }
.school-card-tuition .label {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.school-card-tuition .amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}
.school-card-tuition .free {
    color: var(--success);
}

.btn-compare-add {
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    font-family: var(--font-sans);
}
.btn-compare-add:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.btn-compare-add.added {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================================================
   SCHOOL DETAIL
   ============================================================================ */
.school-detail-header {
    background: var(--primary-light);
    border-bottom: 3px solid var(--primary);
    padding: 32px 0;
    position: relative;
}
.detail-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 快速數據摘要列 */
.detail-quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}
.quick-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
}
.quick-stat-icon { font-size: 1.1rem; }
.quick-stat-label { color: var(--text-muted); }
.quick-stat-value { font-weight: 700; color: var(--text-primary); }
.school-detail-header h1 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.school-detail-header .name-en {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    padding: 32px 0 56px;
}
.detail-main { min-width: 0; }
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.info-card-header {
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-card-body { padding: 20px; }

.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--border-light); }
.info-table tr:last-child { border-bottom: none; }
.info-table th {
    text-align: left;
    padding: 10px 12px 10px 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    width: 90px;
    vertical-align: top;
}
.info-table td {
    padding: 10px 0;
    font-size: 0.88rem;
    font-weight: 500;
}

.school-description {
    line-height: 1.85;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* ============================================================================
   TUITION CHART
   ============================================================================ */
.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
    margin: 20px 0;
}

.tuition-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.tuition-table th,
.tuition-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
.tuition-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tuition-table tbody tr:hover {
    background: var(--primary-light);
}
.tuition-table .amount { font-weight: 700; color: var(--accent); }
.tuition-table .growth-up { color: var(--danger); font-size: 0.8rem; font-weight: 600; }
.tuition-table .growth-down { color: var(--success); font-size: 0.8rem; font-weight: 600; }

/* ============================================================================
   COMPARISON PAGE
   ============================================================================ */
.compare-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}
.compare-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.compare-table th,
.compare-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}
.compare-table thead th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    position: sticky;
    top: var(--header-height);
    z-index: 10;
}
.compare-table .row-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.82rem;
    background: var(--bg-light);
    width: 140px;
    white-space: nowrap;
}
.compare-table .school-name-cell {
    font-weight: 700;
    color: var(--primary);
    min-width: 170px;
}
.compare-table .highlight { background: var(--highlight); }
.compare-table .highlight-diff {
    background: var(--danger-light);
    position: relative;
}
.compare-table .highlight-diff::after {
    content: '⚠ 差異大';
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.65rem;
    color: var(--danger);
    font-weight: 700;
}

/* ============================================================================
   SCHOOL GRID
   ============================================================================ */
.popular-section { padding: 44px 0 48px; }

.school-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.school-grid-card {
    display: block;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--duration-normal) ease;
    border-left: 3px solid transparent;
}
.school-grid-card:hover {
    border-left-color: var(--primary);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}
.school-grid-card .grid-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--primary);
    margin-bottom: 2px;
}
.school-grid-card .grid-name-en {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.school-grid-card .grid-info {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* ============================================================================
   DISTRICTS
   ============================================================================ */
.district-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}
.district-link {
    display: block;
    padding: 12px 14px;
    text-align: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--duration-normal) ease;
    text-decoration: none;
}
.district-link:hover {
    border-color: var(--primary);
    color: white;
    background: var(--primary);
    text-decoration: none;
}
.district-link .count {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ============================================================================
   GUIDES
   ============================================================================ */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.guide-card {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 24px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}
.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d7c66, #f0a500);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.guide-card:hover {
    box-shadow: 0 8px 30px rgba(13, 124, 102, 0.12);
    border-left-color: #0d7c66;
    transform: translateY(-3px);
    text-decoration: none;
    color: #1a1a2e;
}
.guide-card:hover::before {
    opacity: 1;
}
.guide-card .guide-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #f0faf7, #e6f7f2);
    border-radius: 14px;
}
.guide-card .guide-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0d7c66;
    margin-bottom: 8px;
    line-height: 1.4;
}
.guide-card .guide-desc {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.7;
}

/* ============================================================================
   COMPARISON FLOATING BAR
   ============================================================================ */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 14px 0;
    z-index: 900;
    transform: translateY(100%);
    transition: transform var(--duration-normal) ease;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
}
.compare-bar.active { transform: translateY(0); }

.compare-bar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.compare-bar-schools {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
}
.compare-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.15);
}
.compare-bar-item .remove {
    cursor: pointer;
    opacity: 0.5;
    font-size: 1rem;
}
.compare-bar-item .remove:hover { opacity: 1; }

/* 對比搜尋結果項 */
.compare-search-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    transition: background var(--duration-fast) ease;
}
.compare-search-item:hover { background: var(--primary-light); }
.compare-search-item.added { cursor: default; opacity: 0.7; }

.compare-bar-btn {
    padding: 10px 28px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--duration-fast) ease;
    font-family: var(--font-sans);
    white-space: nowrap;
}
.compare-bar-btn:hover {
    background: var(--accent-dark);
}

/* ============================================================================
   PAGINATION
   ============================================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--duration-fast) ease;
}
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    text-decoration: none;
}
.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
}
.pagination .disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.6);
    padding: 48px 0 28px;
    margin-top: auto;
    border-top: 3px solid var(--primary);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.footer-brand .footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}
.footer-brand p { font-size: 0.83rem; line-height: 1.75; }

.footer-section h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.footer-section a {
    display: block;
    padding: 4px 0;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}
.footer-section a:hover { color: white; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all var(--duration-fast) ease;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary-light);
    text-decoration: none;
}
.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover {
    background: var(--accent-dark);
    color: white;
    text-decoration: none;
}
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ============================================================================
   ALERTS
   ============================================================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.88rem;
    line-height: 1.6;
    border-left: 4px solid;
}
.alert-info    { background: var(--info-light); color: #2C5282; border-color: #2B6CB0; }
.alert-success { background: var(--success-light); color: #276749; border-color: #2D7D46; }
.alert-warning { background: var(--warning-light); color: #975A16; border-color: #B8860B; }
.alert-danger  { background: var(--danger-light); color: #9B2C2C; border-color: #C53030; }

/* ============================================================================
   EMPTY STATE
   ============================================================================ */
.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1rem; color: var(--text-secondary); }

/* ============================================================================
   AUTOCOMPLETE
   ============================================================================ */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}
.autocomplete-dropdown.show { display: block; }

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--duration-fast) ease;
}
.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--primary-light);
}
.autocomplete-item:last-child { border-bottom: none; }

.ac-level-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.66rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}
.ac-level-badge.kindergarten { background: #F97316; }
.ac-level-badge.primary      { background: #0891B2; }
.ac-level-badge.secondary    { background: #0D9488; }
.ac-level-badge.international { background: #8B5CF6; }
.ac-level-badge.special       { background: #EC4899; }

.ac-info { flex: 1; min-width: 0; }
.ac-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-name-en {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-footer {
    padding: 10px 18px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    border-top: 1px solid var(--border-color);
    cursor: pointer;
}
.autocomplete-footer:hover {
    background: var(--primary-light);
}

/* ============================================================================
   LEAFLET MAP
   ============================================================================ */
.custom-marker { background: none !important; border: none !important; }
.leaflet-popup-content { font-family: var(--font-sans) !important; font-size: 0.88rem; }
.leaflet-popup-content-wrapper { border-radius: var(--radius-lg) !important; }

#schoolMap {
    touch-action: pan-x pan-y;
    -webkit-touch-callout: none;
}

/* ============================================================================
   SECTION BACKGROUNDS
   ============================================================================ */
.section-alt {
    background: var(--bg-section);
    padding: 48px 0;
}
.section-white {
    background: var(--bg-white);
    padding: 48px 0;
}

/* ============================================================================
   REGION HEADINGS (Districts)
   ============================================================================ */
.region-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 24px 0 12px;
    padding-left: 2px;
}

/* ============================================================================
   TOOLS GRID (Home page)
   ============================================================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.tool-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    border: 1.5px solid #e0ede9;
    border-radius: 16px;
    padding: 26px 28px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(13, 124, 102, 0.04);
}
.tool-card:hover {
    border-color: #0d7c66;
    box-shadow: 0 8px 30px rgba(13, 124, 102, 0.14);
    transform: translateY(-4px);
    text-decoration: none;
    color: #1a1a2e;
}
.tool-icon {
    font-size: 1.8rem;
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e6f7f2 0%, #d0f0e6 100%);
    border-radius: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.tool-card:hover .tool-icon {
    background: linear-gradient(135deg, #0d7c66 0%, #0a6b58 100%);
    border-radius: 50%;
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 4px 14px rgba(13, 124, 102, 0.3);
}
.tool-content {
    flex: 1;
    min-width: 0;
}
.tool-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0d7c66;
    margin-bottom: 4px;
    line-height: 1.4;
}
.tool-desc {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ============================================================================
   SCROLL ANIMATIONS
   ============================================================================ */
.category-card,
.school-grid-card,
.guide-card,
.tool-card,
.info-card {
    animation: fadeInUp 0.4s ease-out both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   UTILITY
   ============================================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

/* ============================================================================
   MOBILE BOTTOM TAB BAR（手機底部導航列）
   ============================================================================ */
.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}
.mobile-tab-bar-inner {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
}
.mobile-tab-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    padding: 8px 4px 6px;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--duration-fast) ease;
    -webkit-tap-highlight-color: transparent;
}
.mobile-tab-bar a .tab-icon {
    font-size: 1.25rem;
    line-height: 1;
}
.mobile-tab-bar a.active {
    color: var(--primary);
    font-weight: 700;
}
.mobile-tab-bar a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* ============================================================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================================================ */
@media (max-width: 1024px) {
    .detail-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .school-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .tools-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .guide-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* ============================================================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    /* -- 底部導航列顯示 -- */
    .mobile-tab-bar { display: block; }
    body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

    /* -- Header 精簡 -- */
    .header-inner { padding: 0 14px; }
    .site-logo { font-size: 1.05rem; gap: 8px; }
    .site-logo .logo-icon { width: 32px; height: 32px; font-size: 1.3rem; }
    .site-logo .logo-sub { font-size: 0.5rem; }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        font-size: 1.3rem;
    }
    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, #0F766E 0%, #0D9488 100%);
        flex-direction: column;
        padding: 10px 14px 20px;
        overflow-y: auto;
        gap: 3px;
        z-index: 999;
    }
    .main-nav.open { display: flex; }
    .main-nav a {
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 0.92rem;
        text-align: left;
        background: rgba(255,255,255,0.06);
    }
    .main-nav a:hover,
    .main-nav a.active {
        background: rgba(255,255,255,0.15);
    }

    /* -- Hero 手機版 -- */
    .hero {
        padding: 32px 0 40px;
    }
    .hero h1 { font-size: 1.35rem; margin-bottom: 6px; }
    .hero .hero-subtitle { font-size: 0.82rem; margin-bottom: 24px; }
    .search-box input {
        padding: 14px 48px 14px 16px;
        font-size: 0.9rem;
    }
    .search-box button { width: 40px; }

    .hero-quick-links {
        gap: 6px;
        margin-top: 18px;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 16px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .hero-quick-links::-webkit-scrollbar { display: none; }
    .hero-quick-links a {
        padding: 6px 14px;
        font-size: 0.76rem;
        flex-shrink: 0;
    }

    /* -- Section 間距 -- */
    .category-section { padding: 32px 0 28px; }
    .popular-section { padding: 32px 0 36px; }

    .section-title {
        font-size: 1.1rem;
        padding-left: 12px;
    }
    .section-subtitle {
        font-size: 0.82rem;
        margin-bottom: 20px;
        padding-left: 12px;
    }

    /* -- 工具格子 -- */
    .tools-grid { grid-template-columns: 1fr; gap: 12px; }
    .tool-card { padding: 18px 20px; gap: 16px; flex-direction: row; }
    .tool-icon { width: 50px; height: 50px; min-width: 50px; font-size: 1.5rem; border-radius: 14px; }
    .tool-title { font-size: 0.95rem; }
    .tool-desc { font-size: 0.82rem; }

    /* -- 分類卡片：橫向滑動 -- */
    .category-grid {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .category-grid::-webkit-scrollbar { display: none; }
    .category-card {
        min-width: 120px;
        flex-shrink: 0;
        padding: 20px 16px;
    }
    .category-card .card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
    .category-card .card-title { font-size: 0.88rem; }
    .category-card .card-count { font-size: 0.72rem; }

    /* -- 學校列表 -- */
    .school-grid { grid-template-columns: 1fr; gap: 10px; }
    .school-grid-card { padding: 16px; }
    .school-grid-card .grid-name { font-size: 0.88rem; }

    /* -- 學校卡片 -- */
    .school-card {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
        border-left-width: 3px;
    }
    .school-card-name { font-size: 1rem; }
    .school-card-name-en { font-size: 0.75rem; margin-bottom: 6px; }
    .school-card-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: unset;
    }
    .school-card-tuition .amount { font-size: 1.05rem; }

    /* -- 篩選欄（手機版優化） -- */
    .filter-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        padding: 14px;
        gap: 8px 10px;
        align-items: stretch;
        border-radius: 14px;
    }
    .filter-bar > input[type="hidden"] {
        display: none;
    }
    .filter-group {
        min-width: 0 !important;
        flex: unset !important;
        width: 100%;
    }
    /* 搜尋框佔滿整行 */
    .filter-group[style*="flex"],
    .filter-group:first-of-type {
        grid-column: 1 / -1;
    }
    .filter-group label {
        font-size: 0.72rem;
        margin-bottom: 2px;
        text-align: left;
        display: block;
    }
    .filter-group select,
    .filter-group input[type="text"] {
        padding: 10px 12px;
        font-size: 0.88rem;
        width: 100%;
        border-radius: 8px;
        background-color: var(--bg-section, #f8f9fa);
    }
    .filter-btn {
        text-align: center;
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 0.9rem;
        font-weight: 600;
    }
    .filter-btn.secondary {
        padding: 10px 16px;
        font-size: 0.88rem;
        border-radius: 10px;
    }

    /* -- 學校詳情 -- */
    .school-detail-header { padding: 20px 0; }
    .school-detail-header h1 { font-size: 1.2rem; }
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 0 40px;
    }
    .info-card-header { padding: 12px 16px; font-size: 0.85rem; }
    .info-card-body { padding: 14px; }
    .chart-container { height: 220px; }

    /* -- 地區格子 -- */
    .district-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .district-link { padding: 10px 8px; font-size: 0.8rem; }

    /* -- 指南卡片 -- */
    .guide-grid { grid-template-columns: 1fr; gap: 12px; }
    .guide-card { padding: 20px 18px; }
    .guide-card .guide-icon { font-size: 1.6rem; margin-bottom: 10px; width: 44px; height: 44px; border-radius: 12px; }
    .guide-card .guide-title { font-size: 0.95rem; }
    .guide-card .guide-desc { font-size: 0.82rem; }

    /* -- 頁面佈局 -- */
    .page-content { padding: 20px 0 36px; }
    .page-header h1 { font-size: 1.15rem; }
    .breadcrumb { font-size: 0.78rem; margin-bottom: 14px; }

    /* -- 分頁 -- */
    .pagination { gap: 3px; margin-top: 24px; }
    .pagination a, .pagination span {
        min-width: 34px;
        height: 34px;
        font-size: 0.82rem;
        padding: 0 8px;
    }

    /* -- 對比浮動條 -- */
    .compare-bar {
        bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }
    .compare-bar-inner { flex-direction: column; gap: 10px; }
    .compare-bar-schools { gap: 6px; }
    .compare-bar-item { font-size: 0.78rem; padding: 5px 10px; }

    /* -- 頁尾 -- */
    .site-footer { padding: 36px 0 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .footer-brand .footer-logo { font-size: 1rem; }
    .footer-brand p { font-size: 0.78rem; }
    .footer-section h4 { font-size: 0.78rem; margin-bottom: 10px; }
    .footer-section a { font-size: 0.78rem; }
    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        font-size: 0.72rem;
        text-align: center;
    }

    /* -- Alert -- */
    .alert { padding: 12px 14px; font-size: 0.82rem; }

    /* -- Empty State -- */
    .empty-state { padding: 40px 16px; }
    .empty-state .icon { font-size: 2.5rem; }
    .empty-state p { font-size: 0.9rem; }

    /* -- 容器 -- */
    .container { padding: 0 14px; }
}

/* ============================================================================
   RESPONSIVE — SMALL PHONE (≤480px)
   ============================================================================ */
@media (max-width: 480px) {
    .hero { padding: 24px 0 32px; }
    .hero h1 { font-size: 1.2rem; }
    .hero .hero-subtitle { font-size: 0.78rem; margin-bottom: 18px; }
    .search-box input { padding: 12px 44px 12px 14px; font-size: 0.88rem; }
    .search-box button { width: 36px; font-size: 1rem; }

    .category-card { min-width: 105px; padding: 16px 12px; }
    .category-card .card-icon { width: 38px; height: 38px; font-size: 1.3rem; }
    .category-card .card-title { font-size: 0.82rem; }

    .school-card { padding: 14px; }
    .school-card-name { font-size: 0.92rem; }
    .tag { font-size: 0.68rem; padding: 2px 7px; }

    .district-grid { grid-template-columns: repeat(3, 1fr); }
    .district-link { padding: 8px 4px; font-size: 0.75rem; }

    .container { padding: 0 12px; }

    /* 對比表格 */
    .compare-table th, .compare-table td { padding: 10px 12px; font-size: 0.8rem; }
    .tuition-table th, .tuition-table td { padding: 8px 10px; font-size: 0.8rem; }
}

/* ============================================================================
   DARK MODE — 手動切換 + 系統偏好自動偵測
   ============================================================================ */

/* 系統偏好自動深色（僅在用戶未手動切換時生效） */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]):not([data-theme="dark"]) {
        --primary:        #2DD4BF;
        --primary-dark:   #14B8A6;
        --primary-light:  rgba(45, 212, 191, 0.08);
        --primary-hover:  #5EEAD4;
        --primary-glow:   rgba(45, 212, 191, 0.15);
        --text-primary:   #E2E8F0;
        --text-secondary: #94A3B8;
        --text-muted:     #64748B;
        --bg-white:       #1E293B;
        --bg-light:       #0F172A;
        --bg-section:     #1E293B;
        --bg-dark:        #020617;
        --border-color:   #334155;
        --border-light:   #1E293B;
    }
}

/* 手動深色模式 */
html[data-theme="dark"] {
    --primary:        #2DD4BF;
    --primary-dark:   #14B8A6;
    --primary-light:  rgba(45, 212, 191, 0.08);
    --primary-hover:  #5EEAD4;
    --primary-glow:   rgba(45, 212, 191, 0.15);

    --accent:         #FB923C;
    --accent-light:   rgba(251, 146, 60, 0.1);

    --text-primary:   #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted:     #64748B;

    --bg-white:       #1E293B;
    --bg-light:       #0F172A;
    --bg-section:     #1E293B;
    --bg-dark:        #020617;

    --border-color:   #334155;
    --border-light:   #1E293B;

    --shadow-xs:      0 1px 2px rgba(0,0,0,0.25);
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:      0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg:      0 10px 15px rgba(0,0,0,0.35);
    --shadow-xl:      0 20px 25px rgba(0,0,0,0.4);
    --shadow-hover:   0 8px 20px rgba(45, 212, 191, 0.1);

    --success-light:  rgba(22, 163, 74, 0.15);
    --warning-light:  rgba(202, 138, 4, 0.15);
    --danger-light:   rgba(220, 38, 38, 0.15);
    --info-light:     rgba(37, 99, 235, 0.15);
    --highlight:      rgba(202, 138, 4, 0.15);
}
html[data-theme="dark"] .site-header {
    background: #020617;
    box-shadow: 0 1px 0 rgba(45, 212, 191, 0.1);
}
html[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #020617 0%, #0F172A 40%, #134E4A 100%);
}
html[data-theme="dark"] .hero::after {
    background: linear-gradient(90deg, #2DD4BF, #FB923C, #2DD4BF);
}
html[data-theme="dark"] .school-detail-header {
    background: #1E293B;
    border-bottom-color: var(--primary);
}
html[data-theme="dark"] .info-card-header {
    background: #334155;
}
html[data-theme="dark"] .filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .mobile-tab-bar {
    background: #020617;
    border-top-color: #1E293B;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .mobile-tab-bar a { color: #64748B; }
html[data-theme="dark"] .mobile-tab-bar a.active { color: var(--primary); }

html[data-theme="dark"] .auth-banner {
    background: linear-gradient(160deg, #020617 0%, #0F172A 40%, #134E4A 100%);
}
html[data-theme="dark"] .auth-card {
    background: #1E293B;
    border-color: #334155;
}

/* ============================================================================
   NAV AUTH ELEMENTS
   ============================================================================ */
.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    margin: 0 6px;
}

.nav-auth-link {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 8px 13px;
    text-decoration: none !important;
}
.nav-auth-link:hover {
    color: white !important;
}

.nav-auth-btn {
    background: rgba(255,255,255,0.15) !important;
    color: white !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 16px !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid rgba(255,255,255,0.25);
    text-decoration: none !important;
}
.nav-auth-btn:hover {
    background: rgba(255,255,255,0.25) !important;
}

.nav-user-menu {
    position: relative;
}
.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 5px 12px 5px 5px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 500;
    transition: background var(--duration-fast) ease;
}
.nav-user-btn:hover {
    background: rgba(255,255,255,0.18);
}
.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
}
.nav-user-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 1100;
    padding: 6px 0;
}
.nav-user-menu.open .nav-user-dropdown {
    display: block;
}
.nav-user-dropdown a {
    display: block;
    padding: 9px 16px;
    font-size: 0.84rem;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    transition: background var(--duration-fast) ease;
}
.nav-user-dropdown a:hover {
    background: var(--primary-light);
}
.nav-user-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* ============================================================================
   AUTH PAGES (Login / Register) — 左右分欄設計
   ============================================================================ */

/* 分欄容器 */
.auth-split {
    display: flex;
    flex: 1;
    min-height: calc(100vh - var(--header-height));
    background: var(--bg-light);
}

/* 左側裝飾面板 */
.auth-banner {
    flex: 0 0 440px;
    background: linear-gradient(160deg, #0F766E 0%, #0D9488 35%, #14B8A6 70%, #2DD4BF 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
    position: relative;
    overflow: hidden;
}
.auth-banner::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 65%);
    border-radius: 50%;
    animation: float-slow 8s ease-in-out infinite;
}
.auth-banner::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 65%);
    border-radius: 50%;
    animation: float-slow 10s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.auth-banner-content {
    position: relative;
    z-index: 1;
}

.auth-banner-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce-in 0.6s ease-out;
}

@keyframes bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.auth-banner-content h2 {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.auth-banner-content p {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 36px;
    line-height: 1.6;
}

.auth-banner-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    opacity: 0.92;
    transition: transform var(--duration-normal) ease;
}
.auth-feature-item:hover {
    transform: translateX(4px);
}
.auth-feature-icon {
    font-size: 1.05rem;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

/* 左側統計數字 (登入頁) */
.auth-banner-stats {
    display: flex;
    gap: 28px;
    margin-top: 12px;
}
.auth-stat {
    text-align: center;
    padding: 16px 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    min-width: 90px;
}
.auth-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}
.auth-stat-label {
    font-size: 0.76rem;
    opacity: 0.75;
    margin-top: 2px;
}

/* 右側表單面板 */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 56px;
    background: var(--bg-light);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    animation: card-appear 0.4s ease-out;
}

@keyframes card-appear {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header {
    margin-bottom: 30px;
}
.auth-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.auth-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 表單行 — 兩列 */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* 帶圖標的輸入框 */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 13px;
    font-size: 0.92rem;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    transition: opacity var(--duration-fast) ease;
}
.input-icon-wrapper input:focus ~ .input-icon,
.input-icon-wrapper input:focus + .input-icon {
    opacity: 0.8;
}
.input-icon-wrapper input {
    padding-left: 42px !important;
}
.input-icon-wrapper .password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px 8px;
    opacity: 0.35;
    transition: opacity var(--duration-fast) ease;
    z-index: 1;
}
.input-icon-wrapper .password-toggle:hover {
    opacity: 0.8;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    padding: 13px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.93rem;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-light);
    outline: none;
    transition: all var(--duration-normal) ease;
    width: 100%;
}
.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: white;
}
.form-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}
.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.password-wrapper {
    position: relative;
}
.password-wrapper input {
    padding-right: 44px !important;
}
.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px 8px;
    opacity: 0.35;
    transition: opacity var(--duration-fast) ease;
}
.password-toggle:hover {
    opacity: 0.8;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
}
.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.checkbox-label a {
    color: var(--primary);
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 1rem;
}
.btn-lg {
    padding: 15px 28px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    gap: 8px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
    transition: all var(--duration-normal) ease;
}
.btn-lg:hover {
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
    transform: translateY(-1px);
}
.btn-arrow {
    transition: transform var(--duration-normal) ease;
    font-size: 1.15rem;
}
.btn-lg:hover .btn-arrow {
    transform: translateX(4px);
}

/* 分隔線 */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 8px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}
.auth-link {
    color: var(--primary) !important;
    font-weight: 700;
    text-decoration: none !important;
    transition: color var(--duration-fast) ease;
}
.auth-link:hover {
    color: var(--primary-hover) !important;
    text-decoration: underline !important;
}

/* ============================================================================
   PROFILE PAGE
   ============================================================================ */
.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 8px 0 40px;
}
.profile-sidebar {}
.profile-main { min-width: 0; }

.profile-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    position: sticky;
    top: calc(var(--header-height) + 16px);
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 12px;
}
.profile-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}
.profile-role {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.profile-meta {
    text-align: left;
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
}
.profile-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.82rem;
}
.profile-meta-item .label {
    color: var(--text-muted);
    font-weight: 500;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Favorites & Reviews in profile */
.favorites-list, .reviews-list {
    display: flex;
    flex-direction: column;
}
.favorite-item, .review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.favorite-item:last-child, .review-item:last-child {
    border-bottom: none;
}
.favorite-name, .review-school {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}
.favorite-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}
.favorite-date, .review-date {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.review-info { flex: 1; min-width: 0; }
.review-rating {
    font-size: 0.82rem;
    margin: 2px 0;
}
.review-comment {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.review-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.review-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}
.status-approved { background: var(--success-light); color: var(--success); }
.status-pending  { background: var(--warning-light); color: var(--warning); }
.status-rejected { background: var(--danger-light); color: var(--danger); }

/* Responsive for auth/profile */
@media (max-width: 960px) {
    .auth-split {
        flex-direction: column;
        min-height: auto;
    }
    .auth-banner {
        flex: none;
        padding: 40px 28px;
        text-align: center;
    }
    .auth-banner-content h2 { font-size: 1.5rem; }
    .auth-banner-content p { margin-bottom: 24px; font-size: 0.9rem; }
    .auth-banner-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .auth-feature-item { font-size: 0.82rem; text-align: left; }
    .auth-feature-icon { width: 32px; height: 32px; font-size: 0.9rem; }
    .auth-banner-stats { gap: 16px; justify-content: center; }
    .auth-stat { padding: 12px 16px; min-width: 80px; }
    .auth-stat-number { font-size: 1.4rem; }
    .auth-form-panel {
        padding: 28px 20px;
    }
    .auth-card {
        padding: 32px 24px;
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 4px 0 24px;
    }
    .profile-card {
        position: static;
        padding: 20px;
    }
    .profile-avatar { width: 56px; height: 56px; font-size: 1.4rem; }
    .profile-name { font-size: 1rem; }

    .auth-banner {
        padding: 32px 20px;
        text-align: center;
    }
    .auth-banner-icon { font-size: 2.5rem; margin-bottom: 10px; }
    .auth-banner-content h2 { font-size: 1.2rem; }
    .auth-banner-content p { font-size: 0.84rem; margin-bottom: 16px; }
    .auth-banner-features { display: none; }
    .auth-banner-stats { gap: 12px; justify-content: center; }
    .auth-stat { padding: 10px 14px; min-width: 72px; border-radius: 10px; }
    .auth-stat-number { font-size: 1.2rem; }
    .auth-stat-label { font-size: 0.68rem; }

    .auth-form-panel { padding: 20px 14px; }
    .auth-card {
        padding: 26px 20px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
    .auth-header { margin-bottom: 22px; }
    .auth-header h1 { font-size: 1.3rem; }
    .auth-header p { font-size: 0.82rem; }
    .auth-form { gap: 16px; }
    .form-row-2 { grid-template-columns: 1fr; gap: 14px; }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="tel"] {
        padding: 13px 14px;
        font-size: 16px; /* 防止 iOS 自動放大 */
    }
    .input-icon-wrapper input {
        padding-left: 40px !important;
    }
    .btn-block { padding: 14px 24px; font-size: 0.95rem; }
    .btn-lg { box-shadow: 0 2px 6px rgba(13, 148, 136, 0.2); }

    .nav-divider {
        display: block;
        width: 100%;
        height: 1px;
        background: rgba(255,255,255,0.12);
        margin: 8px 0;
    }
    .nav-user-menu {
        width: 100%;
        background: rgba(255,255,255,0.08);
        border-radius: 12px;
        padding: 4px;
    }
    .nav-user-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        border-radius: 10px;
    }
    .nav-user-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
    }
    .nav-user-name {
        max-width: 150px;
        font-size: 0.95rem;
    }
    .nav-user-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        margin-top: 2px;
        border-radius: 8px;
    }
    .nav-user-dropdown a {
        color: rgba(255,255,255,0.85) !important;
        padding: 11px 14px;
        border-radius: 8px;
        font-size: 0.88rem;
    }
    .nav-user-dropdown a:hover {
        background: rgba(255,255,255,0.1) !important;
    }
    .nav-user-divider {
        margin: 2px 12px;
        background: rgba(255,255,255,0.1);
    }
    .nav-auth-link, .nav-auth-btn {
        display: block;
        padding: 13px 16px !important;
        text-align: left;
        font-size: 0.92rem !important;
        border-radius: 10px;
    }
    .nav-auth-btn {
        margin-top: 6px !important;
        text-align: center !important;
        background: rgba(255,255,255,0.2) !important;
        border: none !important;
    }
    /* 手機導航深色模式切換按鈕 */
    .main-nav #themeToggle {
        align-self: center;
        margin-top: 8px;
        width: 44px;
        height: 44px;
        border-radius: 50% !important;
        background: rgba(255,255,255,0.1) !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
    }

    .favorite-item, .review-item { padding: 10px 0; }
    .favorite-name, .review-school { font-size: 0.85rem; }
    .info-card { margin-bottom: 0; }
}

/* ============================================================================
   PRINT
   ============================================================================ */
@media print {
    .site-header, .site-footer, .compare-bar,
    .filter-bar, .hero, .btn-compare-add,
    .menu-toggle, .main-nav, #themeToggle,
    .autocomplete-dropdown { display: none !important; }

    body { font-size: 11pt; color: #000; background: white; }
    .container { max-width: 100%; padding: 0; }

    .school-card, .info-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
    a { color: #000; text-decoration: none; }
}
