* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    width: 100%;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #212529;
}
main { display: block; width: 100%; height: 100%; }
#wrap {
    width: 100%;
    min-height: 100%;
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#title {
    font-size: 18px;
    color: #0d47a1;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 600;
}
#controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}
.ctl-label { font-size: 13px; color: #455a64; font-weight: 600; margin-right: 4px; }
.pathbtn {
    font-size: 13px;
    padding: 4px 10px;
    border: 1px solid #90a4ae;
    border-radius: 14px;
    background: #eceff1;
    color: #263238;
    cursor: pointer;
}
.pathbtn:hover { background: #cfd8dc; }
.pathbtn.active { background: #1565c0; color: #fff; border-color: #0d47a1; }
#diagram { width: 100%; display: flex; justify-content: center; }
#diagram svg { max-width: 100%; max-height: 500px; height: auto; }
.band, .attack { cursor: pointer; }
.band rect { transition: filter 0.15s; }
.band:hover rect { filter: brightness(1.1); }
.attack path, .attack circle { transition: opacity 0.15s; }
.attack:hover path { stroke-width: 6; }
#tip {
    margin: 10px auto 0;
    max-width: 760px;
    min-height: 56px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
}
