/* 1. Root Variables */
/* ٩(^ᗜ^ )و ´- ٩(^ᗜ^ )و ´- ٩(^ᗜ^ )و ´- ٩ */

:root {
    --bg-primary: #0d0a08;
    --bg-secondary: #16120e;
    --bg-map: #001830;
    --text-primary: #ffffff;
    --text-secondary: #9e9490;
    --accent: #3EB489;
    --accent-teal: #009E73;
    --border: #2e2824;
}

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* 2. Header */
/* ৻(  •̀ ᗜ •́  ৻) ৻(  •̀ ᗜ •́  ৻) ৻(  •̀ ᗜ •́  ৻) */

header {
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

header h1 {
    font-size: 1.4em;
    color: var(--accent);
    font-weight: 700;
}

header p {
    color: var(--text-secondary);
    font-size: 0.85em;
}


/* 3. Main Container */
/* ヾ( ˃ᴗ˂ )◞ • *✰ */

.el-psy-kongroo-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}


/* 4. Sidebar */
/* (๑•̀ㅁ•́๑)✧ */

.operation-strix {
    width: 314px;
    min-width: 314px;
    background: var(--bg-secondary);
    padding: 16px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}

.operation-strix h3 {
    color: var(--accent);
    font-size: 1em;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

.operation-strix label {
    display: block;
    font-size: 0.82em;
    color: var(--text-secondary);
    margin-top: 8px;
    margin-bottom: 4px;
}

.operation-strix input[type="number"],
.operation-strix input[type="date"] {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}


#apply-filters {
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
}

#apply-filters:hover {
    opacity: 0.85;
}

.filter-section,
.stats-section,
.toggle-section,
.legend-section {
    margin-bottom: 16px;
}

.stats-section p {
    line-height: 1.6;
}

.stats-total {
    font-size: 0.82em;
    color: var(--accent);
    font-weight: 600;
}

.stats-total span {
    font-weight: 400;
    color: var(--text-secondary);
}

.stats-divider {
    border-top: 1px solid var(--border);
    margin: 6px 0;
}

.stats-section-label {
    font-size: 0.68em;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stats-total-view {
    font-size: 0.82em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stats-total-view strong {
    color: var(--text-primary);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stats-table th {
    text-align: right;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 2px 4px;
    font-size: 0.9em;
    opacity: 0.7;
}

.stats-table th:first-child {
    text-align: left;
}

.stats-table td {
    text-align: right;
    padding: 2px 4px;
    color: var(--text-primary);
}

.stats-table td:first-child {
    text-align: left;
    color: var(--text-secondary);
}

.stats-row {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin: 3px 0;
    display: flex;
    gap: 4px;
    align-items: baseline;
}

.stats-row strong {
    color: var(--text-primary);
}

.stats-row span {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.stats-gap strong {
    color: var(--accent);
}


/* 5. Toggle Switches */
/* (づ ᴗ _ᴗ)づ♡ */

.toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.85em;
}

.toggle input[type="checkbox"] {
    accent-color: var(--accent);
}


/* 6. Map Area */
/* ✧｡٩(ˊᗜˋ )و✧*｡ */

.map-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

#divergence-meter {
    flex: 1;
    background: var(--bg-map);
    overflow: hidden;
}


/* 7. Time Slider */
/* ₍₍⚞(˶˃ ꒳ ˂˶)⚟⁾⁾ */

.para-raid {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.para-raid input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}

.para-raid span {
    font-size: 0.8em;
    color: var(--text-secondary);
    min-width: 100px;
}

#play-btn {
    padding: 4px 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82em;
}


/* 8. Detail Panel */
/* (ㅅ' ˘ ') */

.handler-one {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    padding: 16px;
    padding-top: 40px;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 50;
}

.handler-one.open {
    transform: translateX(0);
}

.handler-one h3 {
    color: var(--accent);
    font-size: 1em;
    margin-bottom: 10px;
}

.handler-one h4 {
    color: var(--text-primary);
    font-size: 0.95em;
    margin-bottom: 8px;
}

.handler-one p {
    font-size: 0.82em;
    color: var(--text-secondary);
    line-height: 1.6;
}

.coming-soon {
    color: var(--accent) !important;
    font-style: italic;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.4em;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-primary);
}


/* 9. Tooltip */
/* (*ᴗ͈ˬᴗ͈)ꕤ*.ﾟ */

#el-psy-kongroo {
    display: none;
    position: absolute;
    background: rgba(30, 34, 38, 0.97);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.8em;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 100;
    max-width: 300px;
    line-height: 1.5;
}


/* 10. Status Message */
/* ( ദ്ദി ˙ᗜ˙ ) */

#status-message {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 34, 38, 0.97);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.85em;
    color: var(--accent);
    z-index: 100;
    white-space: nowrap;
}


/* 11. Legend */
/* (づ> v <)づ♡ */

.legend-section h4 {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 8px;
    margin-bottom: 4px;
}


/* 12. Filter Legends */
/* ヾ( ˃ᴗ˂ )◞ • *✰ */

.mag-filter-legend,
.depth-filter-legend {
    margin: 4px 0;
}

.filter-hint {
    font-size: 0.75em;
    color: var(--accent);
    margin-top: 2px;
    min-height: 14px;
}

.mag-btn-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.mag-btn {
    flex: 1;
    min-width: 28px;
    padding: 5px 2px;
    background: var(--bg-primary);
    border: 1px solid #2c3236;
    border-radius: 4px;
    color: #6a7074;
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.mag-btn-active {
    background: rgba(62, 180, 137, 0.12);
    border-color: rgba(62, 180, 137, 0.4);
    color: var(--text-secondary);
}

.mag-btn-selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.mag-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.mag-btn-inrange {
    background: rgba(62, 180, 137, 0.06);
    border-color: rgba(62, 180, 137, 0.25);
    color: #6a7074;
}

.depth-btn-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.depth-btn {
    width: 100%;
    padding: 5px 8px;
    background: var(--bg-primary);
    border: 1px solid #2c3236;
    border-radius: 4px;
    color: #6a7074;
    font-size: 0.78em;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.depth-btn-selected {
    background: rgba(255, 255, 255, 0.05);
}

.depth-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.date-preset-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.date-range-display {
    font-size: 0.8em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 8px;
    border: 1px solid #2c3236;
    border-radius: 4px;
    background: var(--bg-primary);
    transition: border-color 0.1s, color 0.1s;
}

.date-range-display:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.date-range-inputs {
    margin-top: 6px;
}

.date-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.date-input-row input[type="date"] {
    flex: 1;
    min-width: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 5px 6px;
    border-radius: 4px;
    font-size: 0.78em;
}

.date-input-row span {
    color: var(--text-secondary);
    font-size: 0.85em;
    flex-shrink: 0;
}

.date-preset-btn {
    flex: 1;
    padding: 4px 2px;
    background: var(--bg-primary);
    border: 1px solid #2c3236;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.date-preset-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.date-preset-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}


/* 13. Layer Tab Strip */
/* ₍₍⚞(˶˃ ꒳ ˂˶)⚟⁾⁾ */

.layer-tab-section {
    margin-bottom: 16px;
}

.layer-tab-section h3 {
    color: var(--accent);
    font-size: 1em;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

.layer-tab-strip {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.layer-tab {
    flex: 1;
    padding: 6px 4px;
    background: var(--bg-primary);
    border: 1px solid #2c3236;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.78em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.layer-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.layer-tab-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.layer-toggle-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.layer-info-icon {
    display: inline-block;
    font-size: 0.85em;
    opacity: 0.65;
    cursor: help;
    vertical-align: middle;
    margin-left: 2px;
    pointer-events: none;
}

.layer-tab-row2 {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.layer-tab-toggle {
    flex: 1;
    padding: 6px 4px;
    background: var(--bg-primary);
    border: 1px solid #2c3236;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.78em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.layer-tab-toggle:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.layer-tab-toggle-active {
    background: rgba(0, 158, 115, 0.15);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}


/* 14. Gap Analysis */
/* (｡•̀ ⤙ •́ ｡ꐦ) !!! */

.gap-section {
    margin-bottom: 16px;
}

.gap-section h3 {
    color: var(--accent);
    font-size: 1em;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.threshold-control input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}

.threshold-control span {
    font-size: 0.82em;
    color: var(--text-secondary);
    min-width: 28px;
}

#gap-histogram {
    margin-top: 8px;
}

#gap-histogram svg {
    display: block;
}

#gap-summary {
    margin-top: 4px;
}

#gap-summary p {
    font-size: 0.78em;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* 15. Gap Legend Bar */

.legend-bar-container {
    margin-top: 4px;
}

#gap-legend-canvas {
    width: 100%;
    height: 16px;
    border-radius: 2px;
    display: block;
}

.legend-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7em;
    color: var(--text-secondary);
    margin-top: 2px;
}

.legend-note {
    font-size: 0.7em;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 4px;
}


/* 16. Gap Indicator (detail panel) */

.gap-indicator {
    background: var(--bg-primary);
    border-radius: 4px;
    padding: 8px;
    margin: 6px 0;
}

.gap-explanation {
    font-style: italic;
    font-size: 0.78em !important;
}

.gap-bar-mini {
    position: relative;
    height: 8px;
    background: linear-gradient(to right, #2166ac, #f7f7f7, #b2182b);
    border-radius: 4px;
    margin-top: 6px;
}

.gap-bar-fill {
    position: absolute;
    width: 6px;
    height: 14px;
    top: -3px;
    border-radius: 3px;
    border: 1px solid #fff;
    transform: translateX(-3px);
}


/* 17. Gap Dot (tooltip) */

.gap-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #fff;
    vertical-align: middle;
}


/* 18. Quake Dots */
/* (｡•̀ ⤙ •́ ｡ꐦ) !!! */

.quake-dot {
    cursor: pointer;
    transition: fill-opacity 0.15s;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.25));
}

.quake-dot:hover {
    fill-opacity: 1 !important;
    stroke-width: 1.5 !important;
}


/* 19. Hexbin Layer */
/* ヾ( ˃ᴗ˂ )◞ • *✰ */

.hex-bin {
    cursor: pointer;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 0.5;
    transition: fill-opacity 0.15s;
}

.hex-bin:hover {
    fill-opacity: 0.95 !important;
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 1;
}



.zoom-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    background: rgba(30, 34, 38, 0.90);
    border: 1px solid var(--accent);
    border-radius: 4px;
    overflow: hidden;
    z-index: 10;
}

.zoom-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 1.1em;
    width: 32px;
    height: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}

.zoom-btn + .zoom-btn {
    border-top: 1px solid var(--accent);
}

.zoom-btn:hover {
    background: rgba(62, 180, 137, 0.15);
}


/* 21. Map Legend Card (bottom-left) */

.map-legend {
    position: absolute;
    bottom: 52px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(30, 34, 38, 0.88);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 7px 10px;
    z-index: 10;
    pointer-events: none;
    min-width: 160px;
}

.map-legend-mode {
    font-size: 0.70em;
    color: var(--accent);
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    white-space: nowrap;
}

.map-legend-ramp {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.map-legend-ramp canvas {
    width: 100%;
    height: 10px;
    display: block;
    border-radius: 2px;
}

.map-legend-ramp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.62em;
    color: var(--text-secondary);
}

.legend-combined-note {
    width: 100%;
    text-align: center;
    font-style: italic;
    opacity: 0.8;
    margin-top: 1px;
}

.map-legend-divider {
    height: 1px;
    background: var(--border);
    margin: 1px 0;
}

.map-legend-scale {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.scale-bar-line {
    height: 3px;
    background: var(--accent);
    border-left: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
}

.scale-bar-label {
    font-size: 0.62em;
    color: var(--text-secondary);
}


/* 22. Header Link */

.header-link {
    margin-left: auto;
    font-size: 0.8em;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 4px 10px;
}

.header-link:hover {
    background: var(--accent);
    color: #fff;
}


/* 23. Team Modal */

.team-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 36px 40px;
    position: relative;
    max-width: 620px;
    width: 90%;
}

.team-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.team-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.team-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.team-modal-header h2 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.team-modal-header p {
    font-size: 0.78em;
    color: var(--text-secondary);
    margin: 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 16px;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.team-name {
    font-size: 0.90em;
    font-weight: 600;
    color: var(--text-primary);
}

.team-role {
    font-size: 0.72em;
    color: var(--accent);
    line-height: 1.3;
}

.team-subtitle {
    font-size: 0.68em;
    color: var(--text-secondary);
    line-height: 1.3;
}


/* 24. Error */

.error-msg {
    color: var(--text-primary);
    padding: 20px;
    text-align: center;
}

.error-msg strong {
    color: var(--accent);
}


/* 24. Panel Toggle */

.panel-tab-strip {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.panel-tab {
    flex: 1;
    padding: 7px 4px;
    background: var(--bg-primary);
    border: 1px solid #2c3236;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.panel-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.panel-tab-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}


/* 25. Zones Panel */

#panel-zones h3 {
    color: var(--accent);
    font-size: 1em;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

.zones-subtitle {
    font-size: 0.78em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.zone-chip-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-bottom: 12px;
}

.zone-chip {
    padding: 3px 7px;
    background: var(--bg-primary);
    border: 1px solid #2c3236;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.74em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.zone-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.zone-chip-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.zone-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.zone-card:hover {
    background: rgba(62, 180, 137, 0.08);
}

.zone-card:last-child {
    border-bottom: none;
}

.zone-card-active {
    background: rgba(62, 180, 137, 0.10);
    border-left: 3px solid var(--accent);
    padding-left: 7px;
}

.zone-card-body {
    flex: 1;
    min-width: 0;
}

.zone-card-name {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text-primary);
}

.zone-card-subtitle {
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

.zone-card-info {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1em;
    cursor: pointer;
    padding: 4px 2px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.1s, color 0.1s;
}

.zone-card-info:hover {
    opacity: 1;
    color: var(--accent);
}

.zone-type-label {
    display: inline-block;
    font-size: 0.72em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent-teal);
    margin-bottom: 8px;
}

.zone-description {
    font-size: 0.83em;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 14px;
}

.zone-learn-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.82em;
    color: var(--accent-teal);
    text-decoration: none;
    opacity: 0.85;
}

.zone-learn-more:hover {
    opacity: 1;
    text-decoration: underline;
}

.zone-section-label {
    font-size: 0.72em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
    margin: 14px 0 8px;
}

.zone-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 4px;
}

.zone-stat-item {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.zone-stat-label {
    font-size: 0.68em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.zone-stat-value {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text-primary);
}

.zone-notable-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zone-notable-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82em;
}

.zone-notable-list li:last-child {
    border-bottom: none;
}

.zone-notable-year {
    color: var(--text-secondary);
    font-size: 0.9em;
    flex-shrink: 0;
    width: 34px;
}

.zone-notable-name {
    flex: 1;
    color: var(--text-primary);
}

.zone-notable-mag {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--accent);
}


/* 27. Cluster Starburst */

.cluster-starburst-layer {
    pointer-events: none;
}

@keyframes cluster-ms-pulse {
    0%   { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0;   transform: scale(2.8); }
}

.starburst-pulse {
    animation: cluster-ms-pulse 1.6s ease-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

.starburst-label {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}


/* 28. Cluster Panel */

#panel-clusters h3 {
    color: var(--accent);
    font-size: 1em;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

.cluster-controls-label {
    font-size: 0.68em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cluster-map-controls {
    margin-bottom: 4px;
    transition: opacity 0.2s;
}

.cluster-controls-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.cluster-panel-divider {
    border-top: 1px solid var(--border);
    margin: 14px 0 12px;
}

.cluster-limit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.78em;
    color: var(--text-secondary);
}

.cluster-limit-btn {
    padding: 3px 9px;
    background: var(--bg-primary);
    border: 1px solid #2c3236;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.cluster-limit-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.cluster-limit-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.cluster-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.cluster-card:hover {
    background: rgba(240, 228, 66, 0.06);
}

.cluster-card:last-child {
    border-bottom: none;
}

.cluster-card-active {
    background: rgba(240, 228, 66, 0.08);
    border-left: 3px solid #F0E442;
    padding-left: 5px;
}

.cluster-rank {
    flex-shrink: 0;
    width: 26px;
    font-size: 0.72em;
    font-weight: 700;
    color: var(--text-secondary);
    padding-top: 2px;
    text-align: right;
}

.cluster-card-active .cluster-rank {
    color: #F0E442;
}

.cluster-card-body {
    flex: 1;
    min-width: 0;
}

.cluster-card-place {
    font-size: 0.82em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.cluster-card-meta {
    font-size: 0.72em;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.cluster-bar-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
}

.cluster-bar-fill {
    height: 100%;
    background: #F0E442;
    opacity: 0.55;
    border-radius: 2px;
    min-width: 2px;
}


/* 30. Cluster Detail Panel Elements */

.cluster-ms-callout {
    background: rgba(240, 228, 66, 0.07);
    border: 1px solid rgba(240, 228, 66, 0.25);
    border-radius: 5px;
    padding: 10px 12px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cluster-ms-mag {
    font-size: 1.5em;
    font-weight: 700;
    color: #F0E442;
    line-height: 1;
}

.cluster-ms-meta {
    font-size: 0.78em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.cluster-omori-label {
    font-size: 0.82em;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0;
}

#cluster-omori {
    margin: 4px 0 6px;
}

#cluster-omori svg {
    display: block;
    overflow: visible;
}

.cluster-cap-note {
    font-size: 0.78em !important;
    color: var(--text-secondary) !important;
    font-style: italic;
    padding: 2px 4px 4px !important;
    opacity: 0.75;
}

.cluster-omori-note {
    font-size: 0.70em !important;
    color: var(--text-secondary) !important;
    font-style: italic;
    margin-top: 2px !important;
    line-height: 1.4 !important;
}

.cluster-legend-row {
    margin-bottom: 4px;
}

.cluster-legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.68em;
    color: var(--text-secondary);
    margin-top: 3px;
}


/* 32. Mobile */
/* ヾ( ˃ᴗ˂ )◞ • *✰ */

@media (max-width: 768px) {
    .el-psy-kongroo-container {
        flex-direction: column;
    }

    .operation-strix {
        width: 100%;
        min-width: unset;
        max-height: 35vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .handler-one {
        width: 100%;
    }
}
