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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f5f7fa;
    color: #1e4b69;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px;
}

h1 {
    text-align: center;
    color: #1e4b69;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.88rem;
    margin-bottom: 20px;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 600;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.feature-dot { background: #3b82f6; }
.tech-dot { background: #f59e0b; }

.legend-line {
    width: 20px;
    height: 0;
    border-top: 2px dashed #ef4444;
}

.roadmap-wrapper {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}

.quarter-headers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    margin-left: 70px;
}

.quarter-header {
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e4b69;
    padding: 8px;
    background: #f0f4f8;
    border-radius: 8px;
}

.track-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    writing-mode: horizontal-tb;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 6px;
}

.feature-label { background: #dbeafe; color: #2563eb; }
.tech-label { background: #fef3c7; color: #d97706; }

.track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-left: 70px;
    margin-bottom: 12px;
}

.quarter-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.roadmap-item {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    line-height: 1.3;
}

.roadmap-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 5;
}

.feature-item {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.tech-item {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.dependency-canvas-wrapper {
    position: relative;
    height: 40px;
    margin-left: 70px;
    margin-bottom: 4px;
}

.dependency-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.dependency-svg line {
    pointer-events: stroke;
    cursor: help;
}

.detail-panel {
    display: none;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #1e4b69;
    padding: 18px 40px 18px 18px;
    margin-top: 16px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.detail-panel.visible {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-panel h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.detail-panel .detail-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.detail-meta .badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.detail-panel .detail-desc {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.6;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #9ca3af;
    cursor: pointer;
}

.close-btn:hover {
    color: #1e4b69;
}

.tooltip {
    display: none;
    position: fixed;
    background: #1e293b;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    max-width: 280px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .track,
    .quarter-headers {
        margin-left: 0;
    }

    .dependency-canvas-wrapper {
        margin-left: 0;
    }

    .roadmap-item {
        padding: 8px;
        font-size: 0.72rem;
    }

    .quarter-header {
        font-size: 0.8rem;
        padding: 6px;
    }
}
