* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: sans-serif; background: #fff; color: #333; font-size: 15px; }

.header { background: #2d3436; color: #fff; padding: 12px 16px; margin: 0; display: flex; justify-content: space-between; align-items: center; }
.header-title { font-size: 20px; font-weight: bold; color: #fff; margin: 0; }

/* Language toggle */
.lang-toggle { display: flex; gap: 0; border: 1px solid #666; border-radius: 4px; overflow: hidden; }
.lang-btn { background: transparent; color: #aaa; border: none; padding: 4px 10px; font-size: 13px; font-weight: bold; cursor: pointer; transition: background .15s, color .15s; text-decoration: none; display: inline-block; }
.lang-btn:first-child { border-right: 1px solid #666; }
.lang-btn.active { background: #fff; color: #2d3436; }
.lang-btn:hover:not(.active) { background: #444; color: #fff; }

.filters { padding: 8px 16px; border-bottom: 1px solid #ddd; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 4px; margin-right: 12px; flex-wrap: wrap; }
.filter-group > label:first-child { font-size: 14px; font-weight: bold; color: #666; white-space: nowrap; }
.filter-chk { padding: 2px 6px; border: 1px solid #ccc; border-radius: 3px; background: #fff; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 2px; user-select: none; white-space: nowrap; }
.filter-chk:hover { background: #f0f0f0; }
.filter-chk input { accent-color: #555; }
.search-box { padding: 4px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px; width: 180px; }
.count { font-size: 14px; color: #666; margin-left: auto; white-space: nowrap; }

/* Maker filter colors */
.maker-honda input { accent-color: #c00; }
.maker-kawasaki input { accent-color: #00843D; }
.maker-yamaha input { accent-color: #0050a0; }
.maker-suzuki input { accent-color: #003399; }

.table-wrap { overflow: auto; padding: 0 8px 8px 0; max-height: calc(100vh - 160px); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { background: #f5f5f5; border-bottom: 1px solid #ddd; border-right: 1px solid #ddd; padding: 6px 4px; text-align: center; font-size: 11px; white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; z-index: 2; }
th:first-child { position: sticky; left: 0; z-index: 3; }
th:hover { background: #e8e8e8; }
th.sort-asc::after { content: ' \25B2'; color: #e74c3c; }
th.sort-desc::after { content: ' \25BC'; color: #e74c3c; }
td { border-bottom: 1px solid #ddd; border-right: 1px solid #ddd; padding: 4px; text-align: center; white-space: nowrap; font-size: 13px; }
td:first-child { text-align: left; font-weight: bold; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 160px; }
td:first-child a { color: #333; text-decoration: none; }
td:first-child a:hover { text-decoration: underline; }
tr:nth-child(even) td { background: #fafafa; }
tr:nth-child(even) td:first-child { background: #fafafa; }
tr:hover td { background: #f5f5f0; }
tr:hover td:first-child { background: #f5f5f0; }
.empty { color: #ccc; }
.price { font-weight: bold; }

/* Maker badge */
.maker-tag { display: inline-block; width: 16px; height: 16px; border-radius: 3px; text-align: center; color: #fff; font-size: 10px; font-weight: bold; line-height: 16px; margin-right: 4px; vertical-align: middle; }
.mt-honda { background: #c00; }
.mt-kawasaki { background: #00843D; }
.mt-yamaha { background: #0050a0; }
.mt-suzuki { background: #003399; }

/* Maker-specific link hover & price colors */
tr[data-maker="Honda"] td:first-child a:hover { color: #c00; }
tr[data-maker="Kawasaki"] td:first-child a:hover { color: #00843D; }
tr[data-maker="Yamaha"] td:first-child a:hover { color: #0050a0; }
tr[data-maker="Suzuki"] td:first-child a:hover { color: #003399; }
tr[data-maker="Honda"] .price { color: #c00; }
tr[data-maker="Kawasaki"] .price { color: #00843D; }
tr[data-maker="Yamaha"] .price { color: #0050a0; }
tr[data-maker="Suzuki"] .price { color: #003399; }

/* Loading */
.loading { text-align: center; padding: 40px; color: #999; font-size: 16px; }

/* ===== Footer ===== */
.info-footer { border-top: 3px solid #2d3436; margin-top: 8px; }

/* Section toggle */
.info-section { border-bottom: 1px solid #e0e0e0; }
.info-heading {
    display: flex; align-items: center; gap: 6px;
    padding: 12px 20px; margin: 0;
    font-size: 16px; font-weight: bold; color: #2d3436;
    cursor: pointer; user-select: none;
    background: #f8f9fa; transition: background .15s;
}
.info-heading:hover { background: #eef0f2; }
.toggle-icon { font-size: 12px; color: #888; transition: transform .2s; display: inline-block; }
.info-heading.collapsed .toggle-icon { transform: rotate(-90deg); }
.info-body { padding: 0 20px 16px; }
.info-body.hidden { display: none; }

/* Data Guide Grid */
.data-guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.guide-item { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; background: #f8f9fa; border-radius: 4px; border-left: 3px solid #2d3436; }
.guide-label { font-weight: bold; font-size: 14px; color: #2d3436; }
.guide-desc { font-size: 13px; color: #666; line-height: 1.5; }

/* Aid Legend */
.aid-group { margin-bottom: 12px; }
.aid-group-title { font-size: 15px; font-weight: bold; color: #444; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 6px; }
.aid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px; }
.aid-item { display: flex; align-items: baseline; gap: 8px; padding: 3px 8px; font-size: 14px; }
.aid-abbr { font-weight: bold; color: #2d3436; min-width: 56px; font-family: 'Consolas', 'Monaco', monospace; font-size: 14px; }
.aid-full { color: #555; font-size: 13px; }
.aid-note { font-size: 13px; color: #999; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eee; }

/* Maker group accent */
.aid-honda .aid-abbr { color: #c00; }
.aid-kawasaki .aid-abbr { color: #00843D; }
.aid-yamaha .aid-abbr { color: #0050a0; }
.aid-suzuki .aid-abbr { color: #003399; }

/* Category Grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.cat-card { padding: 10px 12px; background: #f8f9fa; border-radius: 6px; border: 1px solid #e8e8e8; transition: box-shadow .15s; }
.cat-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.cat-name { font-size: 15px; font-weight: bold; color: #2d3436; margin-bottom: 4px; }
.cat-desc { font-size: 13px; color: #666; line-height: 1.5; }

/* Footer bottom */
.footer-bottom { background: #2d3436; color: #aaa; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #ccc; text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-copy { font-size: 13px; }

/* Legal pages */
.legal-page { max-width: 800px; margin: 0 auto; padding: 32px 20px; }
.legal-page h1 { font-size: 24px; color: #2d3436; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 3px solid #2d3436; }
.legal-page h2 { font-size: 18px; color: #2d3436; margin: 24px 0 8px; padding-left: 10px; border-left: 3px solid #2d3436; }
.legal-page p { font-size: 15px; color: #555; line-height: 1.8; margin-bottom: 8px; }
.legal-page ul { font-size: 15px; color: #555; line-height: 1.8; margin: 4px 0 8px 20px; }
.legal-page .legal-date { font-size: 14px; color: #999; margin-top: 24px; text-align: right; }
.legal-page .back-link { display: inline-block; margin-bottom: 16px; color: #0050a0; text-decoration: none; font-size: 15px; }
.legal-page .back-link:hover { text-decoration: underline; }

/* Mobile: car name column peek */
@media (max-width: 768px) {
    th:first-child, td:first-child { left: 0; max-width: 160px; overflow: hidden; }
    td:first-child { white-space: normal; font-size: 9px; line-height: 1.3; padding-left: 24px; }
    td:first-child::first-line { font-size: 13px; }
    td:first-child .maker-tag { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); }
}
