        :root {
            --header-bg: #1a1f2e;
            --header-text: #ffffff;
            --bg-primary: #ffffff;
            --bg-secondary: #f8f9fa;
            --bg-card: #ffffff;
            --text-primary: #1a202c;
            --text-secondary: #4a5568;
            --text-muted: #718096;
            --accent-teal: #2b6cb0;
            --accent-coral: #996060;
            --accent-warm: #c05621;
            --accent-green: #2f855a;
            --border: #e2e8f0;
            --shadow: 0 1px 3px rgba(0,0,0,0.08);
            --manza: #c05621;
            --sesoko: #2b6cb0;
            --ogasawara: #2f855a;
            --kushimoto: #805ad5;
            --amami: #d53f8c;
            --kerama: #0891b2;
            --sekisei: #e53e3e;
            --hot-color: #dc2626;
            --cold-color: #0891b2;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
            background: var(--bg-secondary);
            color: var(--text-primary);
            line-height: 1.6;
            min-height: 100vh;
        }

        body.ja {
            font-family: 'Noto Sans JP', 'DM Sans', sans-serif;
        }

        header {
            background: var(--header-bg);
            color: var(--header-text);
            padding: 0.75rem 2rem;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-weight: 600;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
            color: inherit;
        }

        .logo-icon {
            overflow: hidden;
            width: 28px;
            height: 28px;
            background: linear-gradient(135deg, #5b9a94 0%, #2b6cb0 100%);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
        }

        .header-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .lang-switch {
            font-size: 0.8rem;
            display: flex;
            gap: 0.25rem;
        }

        .lang-switch button {
            background: none;
            border: none;
            color: rgba(255,255,255,0.6);
            cursor: pointer;
            font-size: 0.8rem;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .lang-switch button:hover { color: rgba(255,255,255,0.9); }
        .lang-switch button.active { color: #ffffff; background: rgba(255,255,255,0.15); }

        main {
            max-width: 900px;
            margin: 0 auto;
            padding: 2.5rem 2rem;
        }

        .breadcrumb {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
        }

        .breadcrumb a {
            color: var(--accent-teal);
            text-decoration: none;
        }

        .breadcrumb a:hover { text-decoration: underline; }

        .page-header {
            margin-bottom: 2.5rem;
        }

        .page-header h1 {
            font-size: 1.75rem;
            font-weight: 600;
            letter-spacing: -0.02em;
            margin-bottom: 0.75rem;
        }

        body.ja .page-header h1 {
            font-size: 1.5rem;
            letter-spacing: 0;
        }

        .page-header .lead {
            font-size: 1rem;
            color: var(--text-secondary);
            line-height: 1.8;
            max-width: 720px;
        }

        body.ja .page-header .lead {
            line-height: 2;
        }

        .card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: var(--shadow);
        }

        .card-title {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--border);
        }

        /* Summary cards */
        .summary-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        @media (max-width: 640px) {
            .summary-grid { grid-template-columns: 1fr; }
        }

        .summary-card {
            padding: 1.5rem;
            border-radius: 8px;
            text-align: center;
        }

        .summary-card.hot {
            background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
            border: 1px solid #fca5a5;
        }

        .summary-card.cold {
            background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
            border: 1px solid #67e8f9;
        }

        .summary-card .icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .summary-card .label {
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
        }

        .summary-card.hot .label { color: var(--hot-color); }
        .summary-card.cold .label { color: var(--cold-color); }

        .summary-card .sites {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
        }

        .summary-card .site-item {
            text-align: center;
        }

        .summary-card .site-name {
            font-size: 0.65rem;
            color: var(--text-muted);
            margin-bottom: 0.25rem;
        }

        .summary-card .site-value {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1.5rem;
            font-weight: 600;
        }

        .summary-card.hot .site-value { color: var(--hot-color); }
        .summary-card.cold .site-value { color: var(--cold-color); }

        .period-note {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 0.75rem;
            padding-top: 0.5rem;
            border-top: 1px dashed var(--border);
        }

        .period-note.ongoing {
            color: var(--cold-color);
            font-weight: 500;
        }


        .summary-card .site-unit {
            font-size: 0.7rem;
            color: var(--text-muted);
        }

        .content-section {
            margin-bottom: 2rem;
        }

        .content-section h2 {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }

        .content-section h3 {
            font-size: 0.95rem;
            font-weight: 600;
            margin: 1.5rem 0 0.75rem;
        }

        .content-section h3.hot { color: var(--hot-color); }
        .content-section h3.cold { color: var(--cold-color); }

        .content-section p {
            color: var(--text-secondary);
            line-height: 1.9;
            margin-bottom: 1rem;
        }

        body.ja .content-section p {
            line-height: 2.1;
        }

        .chart-container {
            height: 280px;
            position: relative;
        }

        .chart-legend {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin-top: 1rem;
            flex-wrap: wrap;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        .legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        /* Threshold table */
        .threshold-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.8rem;
            margin-top: 1rem;
        }

        .threshold-table th, .threshold-table td {
            padding: 0.6rem 0.75rem;
            text-align: left;
            border-bottom: 1px solid var(--border);
        }

        .threshold-table th {
            font-weight: 600;
            color: var(--text-primary);
            background: var(--bg-secondary);
        }

        .threshold-table td {
            color: var(--text-secondary);
        }

        .source-info {
            font-size: 0.75rem;
            color: var(--text-muted);
            padding: 1rem;
            background: var(--bg-secondary);
            border-radius: 6px;
            margin-top: 1rem;
        }

        .source-info a {
            color: var(--accent-teal);
            text-decoration: none;
        }

        .source-info a:hover { text-decoration: underline; }

        /* Highlight box */
        .highlight-box {
            padding: 1rem 1.25rem;
            border-radius: 6px;
            margin: 1rem 0;
            font-size: 0.85rem;
        }

        .highlight-box.cold-note {
            background: #ecfeff;
            border-left: 4px solid var(--cold-color);
        }

        .highlight-box.cold-note strong {
            color: var(--cold-color);
        }

        footer {
            max-width: 900px;
            margin: 0 auto;
            padding: 2rem;
            text-align: center;
            font-size: 0.75rem;
            color: var(--text-muted);
            border-top: 1px solid var(--border);
        }

        footer a {
            color: var(--accent-teal);
            text-decoration: none;
        }

        [data-lang="ja"] { display: none; }
        body.ja [data-lang="en"] { display: none; }
        body.ja [data-lang="ja"] { display: inline; }
    
        /* Hero Section */
        .hero-section {
            background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url("../images/bg-extreme.webp");
            color: white;
            padding: 2.5rem 2rem;
            border-radius: 12px;
            margin-bottom: 2.5rem;
            background-size: cover;
            background-position: center;
        }
        .hero-main { text-align: center; margin-bottom: 1.5rem; }
        .hero-icon { font-size: 3.5rem; margin-bottom: 0.75rem; }
        .hero-tagline {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }
        body.ja .hero-tagline { font-size: 1.3rem; }
        .hero-subtitle {
            font-size: 1rem;
            opacity: 0.9;
            margin-bottom: 1rem;
        }
        .hero-stats-row {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin-top: 1.5rem;
            flex-wrap: wrap;
        }
        .hero-stat-card {
            flex: 1;
            max-width: 220px;
            background: rgba(255,255,255,0.15);
            border-radius: 8px;
            padding: 1rem 1.5rem;
            text-align: center;
        }
        .hero-stat-card .number {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1.75rem;
            font-weight: 600;
            display: block;
        }
        .hero-stat-card .label {
            font-size: 0.85rem;
            opacity: 0.9;
            margin-top: 0.25rem;
        }

        /* Story box */
        .story-box {
            background: #fffbeb;
            border: 1px solid #fde68a;
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 2rem;
        }
        .story-box .story-lead {
            font-size: 1.1rem;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 1rem;
            line-height: 1.7;
        }
        .story-box p {
            font-size: 0.95rem;
            color: var(--text-secondary);
            margin-bottom: 1rem;
            line-height: 1.9;
        }
        .story-box p:last-child { margin-bottom: 0; }

        /* Mechanism grid */
        .mechanism-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        @media (max-width: 640px) {
            .mechanism-grid { grid-template-columns: 1fr; }
        }
        .mechanism-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 1.5rem;
            box-shadow: var(--shadow);
        }
        .mechanism-card.hot-stress { border-left: 4px solid var(--hot-color); background: #fff5f5; }
        .mechanism-card.cold-stress { border-left: 4px solid var(--cold-color); background: #ecfeff; }
        .mechanism-card h3 {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .mechanism-card.hot-stress h3 { color: var(--hot-color); }
        .mechanism-card.cold-stress h3 { color: var(--cold-color); }
        .mechanism-card ul { list-style: none; }
        .mechanism-card li {
            padding: 0.5rem 0;
            font-size: 0.9rem;
            color: var(--text-secondary);
            border-bottom: 1px dashed var(--border);
        }
        .mechanism-card li:last-child { border-bottom: none; }

        /* Tolerance diagram */
        .tolerance-section { margin-bottom: 2rem; }
        .tolerance-section h2 {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }
        .tolerance-diagram-container {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 1.5rem;
            box-shadow: var(--shadow);
        }

        /* Ogasawara vulnerability */
        .ogasawara-highlight {
            background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
            border: 1px solid #67e8f9;
            border-left: 4px solid var(--cold-color);
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 2rem;
        }
        .ogasawara-highlight h3 {
            color: var(--cold-color);
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
        }
        .ogasawara-highlight p {
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.9;
        }

        /* References section */
        .references-section { margin-top: 2rem; }
        .references-section h2 {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            color: var(--text-primary);
        }
        .ref-category { margin-bottom: 1.5rem; }
        .ref-category h3 {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--accent-teal);
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border);
        }
        .ref-list { list-style: none; }
        .ref-list li {
            font-size: 0.8rem;
            color: var(--text-secondary);
            padding: 0.5rem 0;
            line-height: 1.6;
        }
        .ref-list a {
            color: var(--accent-teal);
            text-decoration: none;
        }
        .ref-list a:hover { text-decoration: underline; }


/* Mobile-optimized background images */
@media (max-width: 768px) {
    .hero-section {
        background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url("../images/bg-extreme-mobile.webp") !important;
        background-size: cover !important;
        background-position: center !important;
    }
}

/* Mobile: wrap site items for cards with many sites */
@media (max-width: 640px) {
    .summary-card .sites {
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
    }
    
    .summary-card .site-item {
        min-width: 60px;
    }
    
    .summary-card .site-value {
        font-size: 1.3rem;
    }
    
    .summary-card .site-name {
        font-size: 0.6rem;
    }
}

/* Mobile: stack chart grid */
@media (max-width: 768px) {
    .chart-grid {
        grid-template-columns: 1fr !important;
    }
}
