body {
    font-family: Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}
h1 { margin-bottom: 4px; }
.subtitle { color: #666; margin-bottom: 16px; font-size: 14px; }
.subtitle a { color: #1565c0; }
details.about {
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f0f8ff;
}
details.about summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}
details.about .about-body {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
}
details.about ul { margin: 4px 0 8px 20px; font-size: 13px; }
details.about li { margin: 2px 0; }
#loadStatus {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
    background: #e3f2fd;
    color: #1565c0;
}
#loadStatus.success { background: #e8f5e9; color: #2e7d32; }
#loadStatus.error { background: #ffebee; color: #c62828; }
#projConfig {
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fafafa;
}
.proj-config-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.proj-config-group { flex: 1; min-width: 200px; }
.proj-config-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}
.crs-search-wrap { position: relative; }
.crs-search-row { display: flex; gap: 4px; }
.crs-search-row input { flex: 1; padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; }
.crs-browse-btn {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    margin: 0;
}
.crs-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.crs-dropdown-item {
    padding: 6px 8px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.crs-dropdown-item:hover, .crs-dropdown-item.active { background: #e3f2fd; }
.crs-dropdown-item .crs-code { font-weight: 600; margin-right: 6px; }
.crs-dropdown-item .crs-name { color: #666; }
.crs-chip {
    display: none;
    margin-top: 4px;
    padding: 4px 8px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 12px;
}
.crs-chip .crs-chip-code { font-weight: 600; }
.crs-chip .crs-chip-name { color: #666; margin-left: 4px; }
.origin-inputs {
    display: flex;
    gap: 6px;
    align-items: center;
}
.origin-inputs input {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}
.origin-inputs button { margin: 0; padding: 6px 12px; font-size: 13px; }
section {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
section h2 { margin-top: 0; margin-bottom: 8px; font-size: 18px; }
button {
    padding: 8px 16px;
    margin: 3px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 13px;
}
button:hover { background: #e8e8e8; }
button:disabled { background: #eee; cursor: not-allowed; color: #999; }
select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 280px;
}
select:disabled { background: #f5f5f5; cursor: not-allowed; }
#replInput {
    width: 100%;
    height: 280px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
#replOutput {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    background: #f4f4f4;
    padding: 12px;
    border-radius: 3px;
    max-height: 350px;
    overflow-y: auto;
    margin-top: 8px;
    font-size: 13px;
}
.repl-line { margin: 3px 0; }
.repl-input { color: #0066cc; }
.repl-output { color: #000; }
.repl-error { color: red; }
.repl-hint { color: #666; font-style: italic; margin-top: 8px; }
.button-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
    flex-wrap: wrap;
}
#visualizationSection {
    display: none;
    margin-top: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}
#visualizationToolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}
#visualizationLegend {
    display: flex;
    gap: 16px;
    font-size: 13px;
    flex-wrap: wrap;
}
#visualizationButtons {
    display: flex;
    gap: 4px;
}
#visualizationButtons button {
    padding: 3px 10px;
    font-size: 12px;
    margin: 0;
}
#visualizationButtons button.active {
    background: #1565c0;
    color: #fff;
    border-color: #1565c0;
}
.visualization-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.visualization-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.15);
}
#visualizationMap {
    width: 100%;
    height: 400px;
}
#visualizationMap svg {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}
.visualization-info {
    padding: 4px 12px;
    font-size: 11px;
    color: #888;
    background: #fafafa;
    border-top: 1px solid #eee;
}
#visualizationTooltip {
    display: none;
    position: absolute;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
    white-space: pre;
    z-index: 10;
    max-width: 300px;
}
