body {
    background: aliceblue;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

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

h1 {
    text-align: center;
    font-size: 1.3rem;
    color: #333;
    margin: 8px 0 4px 0;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    max-height: 380px;
}

canvas {
    width: 100% !important;
    max-height: 380px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    margin-top: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-group label {
    font-size: 0.82rem;
    white-space: nowrap;
    color: #444;
}

.control-group input[type="range"] {
    width: 130px;
}

.control-group .value {
    font-weight: bold;
    font-size: 0.82rem;
    min-width: 36px;
    color: #3F51B5;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-group label {
    font-size: 0.82rem;
    color: #444;
    cursor: pointer;
}

.result-box {
    margin-top: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #333;
}

.result-box .threat-year {
    font-weight: bold;
    color: #d32f2f;
}

.result-box .safe {
    font-weight: bold;
    color: #388e3c;
}
