.header .wrapper { max-width: 1400px; gap: 24px; }
.header .logo { margin-right: 0; }
.header .search { flex: 1 1 350px; min-width: 0; margin: 0; transition: background-color .2s, box-shadow .2s; }
.header .search input { width: 100%; min-width: 0; }
.header .search a { width: 28px; min-height: 24px; }
.header .user { margin-left: 0; }
.home-container { width: min(100% - 40px, 1360px); margin: 0 auto; }
.home-banner { padding: 48px 0; margin-bottom: 32px; background: linear-gradient(135deg, #667eea, #764ba2); }
.banner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.direction-panel, .intro-panel { min-width: 0; padding: 28px; border-radius: 12px; }
.direction-panel { background: rgba(255,255,255,.1); color: #fff; }
.direction-panel h2 { margin-bottom: 20px; font-size: 26px; }
.direction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; }
.direction-grid a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 8px; background: rgba(255,255,255,.2); color: #fff; text-decoration: none; }
.intro-panel { background: #fff; }
.intro-panel h2 { font-size: 22px; margin-bottom: 16px; }
.intro-panel p { color: #666; line-height: 1.9; }
.intro-panel > a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; color: #667eea; }
.home-content { padding-bottom: 32px; }
.category-panel { margin-bottom: 28px; }
.category-panel h2, #notes-title { margin-bottom: 20px; font-size: 22px; }
#category-filters { display: flex; gap: 10px; flex-wrap: wrap; }
#category-filters .tag-filter { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border-radius: 24px; background: #f0f0f0; color: #666; text-decoration: none; font-size: 14px; }
#category-filters .active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
#course-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px; list-style: none; padding: 0; scroll-margin-top: 95px; }
.notes-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.notes-pagination button { min-height: 44px; min-width: 44px; }
.pagination-summary { flex-basis: 100%; text-align: center; font-size: 14px; color: #666; overflow-wrap: anywhere; }
.home-footer { margin-top: 32px; padding: 40px 0 28px; background: #2c3e50; color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-grid p { margin-top: 12px; color: rgba(255,255,255,.75); line-height: 1.9; }
.footer-grid h2 { font-size: 18px; }
.footer-brand { font-size: 26px; font-weight: 700; color: #fff; text-decoration: none; }
.footer-legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); text-align: center; color: rgba(255,255,255,.75); font-size: 13px; overflow-wrap: anywhere; }
.footer-legal p + p { margin-top: 8px; }
.footer-legal a { color: inherit; text-decoration: none; }
.police-record { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.police-record img { flex-shrink: 0; }
.note-card { min-width: 0; overflow-wrap: anywhere; background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.note-card > a { display: flex; flex-direction: column; height: 100%; padding: 24px; box-sizing: border-box; color: #333; text-decoration: none; }
.note-card a:focus-visible, .note-sidebar a:focus-visible { outline: 3px solid #667eea; outline-offset: 4px; }
.note-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); }
.note-card-category, .note-kicker { color: #667eea; font-size: 13px; }
.note-card h4 { margin: 12px 0; font-size: 19px; line-height: 1.6; }
.note-card p { margin-bottom: 20px; color: #666; font-size: 14px; line-height: 1.9; }
.note-card-read { margin-top: auto; color: #667eea; font-size: 14px; }
.notes-empty { grid-column: 1 / -1; padding: 32px; background: #fff; text-align: center; }
.detail-wrapper { max-width: 1200px; margin: 30px auto; padding: 0 20px; }
.note-back { display: inline-block; margin-bottom: 20px; color: #667eea; }
.detail-main { display: flex; gap: 28px; align-items: flex-start; }
.detail-card { background: #fff; border-radius: 12px; padding: 32px; box-shadow: 0 2px 12px rgba(0,0,0,.06); box-sizing: border-box; }
.note-article { flex: 1; min-width: 0; }
.note-article h1 { font-size: 30px; line-height: 1.5; margin: 12px 0 18px; color: #293348; overflow-wrap: anywhere; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 12px; color: #666; font-size: 13px; }
.detail-meta span { padding: 4px 12px; background: #f5f6fa; border-radius: 12px; }
.note-intro { margin-top: 20px; padding-bottom: 24px; border-bottom: 1px solid #eee; color: #666; line-height: 1.9; }
.note-article section { scroll-margin-top: 110px; margin-top: 32px; }
.note-article section h2 { margin-bottom: 16px; font-size: 22px; color: #293348; }
.note-article section p { margin: 12px 0; line-height: 2; color: #444; overflow-wrap: anywhere; }
.note-article pre { margin: 20px 0; padding: 20px; background: #202838; color: #eef2ff; border-radius: 8px; overflow-x: auto; }
.note-article code { white-space: pre; font-family: Consolas, monospace; font-size: 14px; line-height: 1.8; }
.note-sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 100px; padding: 24px; }
.note-sidebar h2 { font-size: 18px; margin-bottom: 16px; }
.note-sidebar ol { padding-left: 20px; }
.note-sidebar li { margin: 14px 0; }
.note-sidebar a { color: #667eea; line-height: 1.6; }
.note-sidebar p { margin-top: 24px; color: #777; font-size: 13px; line-height: 1.8; }
@media (max-width: 900px) {
    body { padding-top: 0; }
    body .site-construction-toast { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); padding: 10px 12px; gap: 8px; }
    body .site-construction-toast__close { width: 44px; height: 44px; }
    .header { position: relative; height: auto; }
    .header .wrapper { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 16px; height: auto; min-height: 70px; padding: 12px 20px; }
    .header .logo h1 { line-height: 44px; }
    .header .logo a { font-size: 22px; }
    .header .nav { order: initial; width: auto; margin: 0; }
    .header .nav ul { height: 44px; gap: 12px; }
    .header .search { order: initial; grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; min-width: 0; min-height: 44px; margin: 0; padding: 6px 14px; }
    .header .search a { width: 32px; height: 32px; }
    .header .user { grid-column: 3; grid-row: 1; gap: 0; }
    .header .user span { font-size: 12px; }
    .note-sidebar { top: 20px; width: 210px; }
    .detail-card { padding: 24px; }
    #course-list, .note-article section { scroll-margin-top: 20px; }
}
@media (max-width: 768px) {
    .banner-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .home-banner { padding: 24px 0; margin-bottom: 24px; }
    .direction-panel, .intro-panel { padding: 22px; }
    .detail-main { flex-direction: column; }
    .note-sidebar { position: static; width: 100%; order: -1; }
    .detail-card { padding: 22px; }
    .note-article { width: 100%; }
    .note-article h1 { font-size: 24px; }
    .note-sidebar ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
    .note-sidebar li { margin: 0; }
    .note-sidebar a { display: inline-block; padding: 8px 0; }
    .note-sidebar p { margin-top: 12px; }
}
@media (max-width: 480px) {
    .header .wrapper { padding: 10px 16px; gap: 6px 12px; }
    .home-container { width: calc(100% - 32px); }
    .direction-panel, .intro-panel, .category-panel, .note-card > a { padding: 20px; }
    .direction-panel h2 { font-size: 23px; }
    .direction-grid { gap: 8px; }
    .direction-grid a { padding: 10px; font-size: 14px; }
    #course-list { gap: 16px; }
    .detail-wrapper { margin: 20px auto; padding: 0 16px; }
    .detail-card { padding: 20px; }
    .note-article h1 { font-size: 22px; }
    .note-article section h2 { font-size: 20px; }
    .note-article pre { padding: 14px; }
    .note-article code { font-size: 13px; }
    .home-footer { margin-top: 16px; padding-top: 28px; }
}
