.lastz-tank-calc {
    max-width: 1380px;
    margin: 20px auto 45px;
    padding: 122px 12px 0;
    color: #f5f5f5;
}

/* Compact non-nav-breaking header */
.lastz-tank-head {
    position: fixed;
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 56px);
    max-width: 1380px;
    z-index: 9999;

    padding: 9px 10px;
    margin: 0;
    border-radius: 14px;
    background:
        radial-gradient(circle at 8% 30%, rgba(255, 193, 7, .1), transparent 28%),
        linear-gradient(135deg, rgba(12,12,12,.96), rgba(25,16,4,.96));
    border: 1px solid rgba(255, 193, 7, .32);
    box-shadow: 0 8px 22px rgba(0,0,0,.38);
    backdrop-filter: blur(10px);
}

.lastz-tank-head {
    transition: all .25s ease;
}

.lastz-tank-head.is-scrolled {
    top: 90px;
    padding: 6px 8px;
}

.lastz-tank-head.is-scrolled .tank-milestones {
    display: none;
}

.lastz-tank-head.is-scrolled .lastz-kicker {
    display: none;
}

.lastz-tank-head.is-scrolled h1 {
    font-size: .85rem;
}

.lastz-tank-title-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 7px;
}

.lastz-kicker {
    display: block;
    margin-bottom: 2px;
    color: #ffc107;
    font-size: .6rem;
    line-height: 1;
    letter-spacing: .08em;
    font-weight: 900;
    text-transform: uppercase;
}

.lastz-tank-title-row h1 {
    margin: 0;
    font-size: .95rem;
    line-height: 1.05;
    font-weight: 900;
}

.tank-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
}

.lastz-btn,
.tank-mod-actions button {
    border: 0;
    border-radius: 8px;
    padding: 6px 9px;
    background: #ffc107;
    color: #111;
    font-size: .72rem;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.lastz-btn-muted,
.tank-mod-actions button {
    background: rgba(37,37,37,.92);
    color: #f5f5f5;
    border: 1px solid rgba(255,255,255,.14);
}

.tank-save-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(255,255,255,.12);
    color: #ffc107;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

/* Header stats */
.tank-summary-grid {
    display: grid;
    grid-template-columns: 115px 1fr 1fr 1.35fr;
    gap: 6px;
    margin-bottom: 6px;
}

.tank-summary-card {
    min-width: 0;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(0,0,0,.58);
    border: 1px solid rgba(255,255,255,.09);
}

.tank-summary-card span {
    display: block;
    color: #aaa;
    font-size: .6rem;
    line-height: 1.05;
}

.tank-summary-card strong {
    display: block;
    margin-top: 2px;
    color: #ffc107;
    font-size: .82rem;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tank-progress-shell {
    height: 5px;
    background: #151515;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
}

#tankProgressBar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ffc107, #ff7b00);
    transition: width .25s ease;
}

/* Milestones */
.tank-milestones {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin: 6px 0 0;
}

.tank-milestone {
    padding: 4px 7px;
    border-radius: 7px;
    background: rgba(0,0,0,.48);
    border: 1px solid rgba(255,255,255,.07);
}

.tank-milestone.is-done {
    border-color: rgba(255,193,7,.65);
    box-shadow: 0 0 12px rgba(255,193,7,.1);
}

.tank-milestone strong {
    display: inline;
    font-weight: 900;
}

.tank-milestone span {
    display: block;
    color: #bdbdbd;
    font-size: .62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-bar {
    height: 4px;
    background: #222;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
}

.mini-bar span {
    display: block;
    height: 100%;
    background: #ffc107;
}

/* Tree */
.tank-tree-wrap {
    position: relative;
    padding: 40px 10px 10px;
    border-radius: 18px;
    overflow: hidden;
}

.tank-path-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.tank-path-lines path {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    opacity: .82;
}

.tank-path-lines .line-complete {
    stroke: rgba(0, 185, 190, 0);
    filter: drop-shadow(0 0 5px rgba(0,185,190,.35));
}

.tank-path-lines .line-active {
    stroke: rgba(255, 193, 7, 0);
    stroke-dasharray: 10 8;
    filter: drop-shadow(0 0 6px rgba(255,193,7,.35));
}

.tank-path-lines .line-locked {
    stroke: rgba(90, 90, 90, 0);
    stroke-dasharray: 8 10;
}

/* Cards */
.tank-mod-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 30px 44px;
    padding: 4px;
}

.tank-mod-card {
    position: relative;
    min-height: 170px;
    background: rgba(17,17,17,.95);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 11px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.tank-mod-card.is-active {
    border-color: rgba(255,193,7,.95);
    box-shadow:
        0 0 0 1px rgba(255,193,7,.22),
        0 0 22px rgba(255,193,7,.15);
}

.tank-mod-card.is-complete {
    border-color: rgba(33, 150, 243, .9);
    box-shadow:
        0 0 0 1px rgba(33,150,243,.25),
        0 0 22px rgba(33,150,243,.15);
}

.tank-mod-card.is-locked {
    opacity: .48;
    filter: grayscale(.35);
}

.tank-mod-card.is-locked input,
.tank-mod-card.is-locked button {
    cursor: not-allowed;
}

.tank-mod-top {
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.tank-node-icon {
    flex: 0 0 31px;
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: rgba(160, 35, 28, .86);
    border: 1px solid rgba(255, 99, 71, .7);
    font-size: .88rem;
}

.tank-mod-top span:not(.tank-node-icon) {
    display: block;
    color: #ffc107;
    font-size: .7rem;
    line-height: 1.05;
    font-weight: 900;
}

.tank-mod-top strong {
    display: block;
    max-width: 150px;
    font-size: .9rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tank-mod-card p {
    min-height: 18px;
    margin: 8px 0 9px;
    color: #ddd;
    font-size: .76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tank-mod-meta {
    color: #ddd;
    font-size: .72rem;
    margin-bottom: 7px;
    text-align: center;
}

.tank-mod-meta span {
    display: block;
}

.tank-mod-card input[type="range"] {
    width: 100%;
    accent-color: #ffc107;
}

.tank-mod-actions {
    display: flex;
    gap: 6px;
    margin-top: 7px;
}

.tank-mod-actions button {
    flex: 1;
    padding: 6px 7px;
    font-size: .74rem;
}

.tank-mod-cost {
    margin-top: 8px;
    color: #ffc107;
    font-weight: 900;
    font-size: .76rem;
    text-align: center;
}

.tank-mod-cost small {
    color: #999;
    font-weight: 700;
}

.tank-lock-note {
    position: absolute;
    inset: auto 9px 9px;
    padding: 6px 8px;
    border-radius: 8px;
    text-align: center;
    background: rgba(0,0,0,.72);
    border: 1px solid rgba(255,255,255,.1);
    color: #ddd;
    font-size: .7rem;
    font-weight: 800;
}

.tank-milestone {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tank-milestone-progress {
    display: block;
    color: #bdbdbd;
    font-size: .62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tank-milestone-progress strong {
    color: #ffc107;
    font-weight: 800;
}

/* Tablet */
@media (max-width: 1199px) {
    .tank-mod-grid {
        grid-template-columns: repeat(4, minmax(170px, 1fr));
        gap: 26px 32px;
    }
}

/* Mobile/tablet: static compact header so it does not eat the screen */
@media (max-width: 991px) {
    .lastz-tank-calc {
        margin-top: 12px;
        padding: 0 10px;
    }

    .lastz-tank-head {
        position: static;
        width: auto;
        max-width: none;
        transform: none;
        padding: 9px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .lastz-tank-title-row {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-bottom: 7px;
    }

    .lastz-tank-title-row h1 {
        font-size: .95rem;
    }

    .tank-toolbar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        width: 100%;
    }

    .lastz-btn,
    .tank-save-status {
        justify-content: center;
        text-align: center;
        padding: 6px 5px;
        font-size: .68rem;
    }

    .tank-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .tank-summary-card {
        padding: 6px 7px;
    }

    .tank-milestones {
        grid-template-columns: repeat(5, minmax(52px, 1fr));
        gap: 5px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .tank-milestone {
        min-width: 52px;
        padding: 4px 5px;
    }

    .tank-milestone span {
        font-size: .58rem;
    }

    .tank-tree-wrap {
        padding: 8px;
        overflow: visible;
    }

    .tank-mod-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .tank-path-lines {
        display: none;
    }

    .tank-mod-card {
        min-height: 0;
        padding: 10px;
    }
}

/* Phone */
@media (max-width: 575px) {
    .lastz-tank-calc {
        padding: 0 8px;
    }

    .lastz-tank-head {
        padding: 8px;
    }

    .tank-toolbar {
        grid-template-columns: repeat(2, 1fr);
    }

    .tank-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tank-summary-card span {
        font-size: .56rem;
    }

    .tank-summary-card strong {
        font-size: .78rem;
    }

    .tank-milestones {
        display: none;
    }

    .tank-progress-shell {
        height: 5px;
    }

    .tank-mod-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tank-mod-card {
        border-radius: 11px;
        padding: 10px;
    }

    .tank-mod-top strong {
        max-width: none;
    }

    .tank-mod-actions button {
        padding: 7px;
    }
}