.legendary-tool {
    display: grid;
    gap: 18px;
    overflow-wrap: anywhere;
}

.legendary-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 390px);
    gap: 18px;
    align-items: stretch;
}

.legendary-hero-copy,
.legendary-sprite-card,
.legendary-panel,
.legendary-card,
.legendary-trouble-grid article {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(19, 41, 32, .96), rgba(9, 19, 16, .98));
    box-shadow: var(--shadow);
}

.legendary-hero-copy,
.legendary-panel,
.legendary-card > div,
.legendary-trouble-grid article {
    padding: 18px;
}

.legendary-hero-copy h2,
.legendary-section-heading h2,
.legendary-fast h2,
.legendary-progress h2,
.legendary-safety h2 {
    margin: 0;
    color: #fff;
    line-height: 1.12;
}

.legendary-hero-copy h2 {
    max-width: 940px;
    font-size: clamp(28px, 5vw, 46px);
}

.legendary-lede,
.legendary-panel p,
.legendary-card p,
.legendary-check span,
.legendary-trouble-grid p,
.legendary-route-list span,
.legendary-safety li {
    color: #d8e7df;
}

.legendary-lede {
    max-width: 940px;
    font-size: 17px;
}

.legendary-answer-strip,
.legendary-links,
.legendary-table-tools,
.legendary-filter-buttons,
.legendary-controls,
.legendary-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.legendary-answer-strip span,
.legendary-links a,
.legendary-filter-buttons button,
.legendary-controls button,
.legendary-progress button {
    border: 1px solid rgba(226, 180, 67, .42);
    border-radius: 6px;
    background: rgba(226, 180, 67, .11);
    color: #f5d882;
}

.legendary-answer-strip span {
    padding: 7px 10px;
    font-weight: 850;
}

.legendary-sprite-card {
    display: grid;
    place-items: center;
    margin: 0;
    overflow: hidden;
}

.legendary-sprite-row {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 28px 10px 14px;
}

.legendary-sprite-row img {
    width: min(18%, 84px);
    image-rendering: pixelated;
}

.legendary-sprite-card figcaption {
    align-self: end;
    width: 100%;
    padding: 10px 12px;
    border-top: 1px solid var(--line);
    color: #b8c9c1;
    font-size: 13px;
}

.legendary-links {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 16, 13, .72);
}

.legendary-links a,
.legendary-filter-buttons button,
.legendary-controls button,
.legendary-progress button {
    min-height: 36px;
    padding: 7px 10px;
    font-weight: 800;
    cursor: pointer;
}

.legendary-links a:hover,
.legendary-filter-buttons button:hover,
.legendary-filter-buttons button.is-active,
.legendary-controls button:hover,
.legendary-controls button.is-active,
.legendary-progress button:hover {
    background: var(--gold);
    color: #08100d;
}

.legendary-fast {
    display: grid;
    grid-template-columns: minmax(190px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    border-color: rgba(226, 180, 67, .46);
    background: linear-gradient(135deg, rgba(226, 180, 67, .16), rgba(9, 19, 16, .98));
}

.legendary-section-heading {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

.legendary-table-tools {
    justify-content: space-between;
    margin-bottom: 12px;
}

.legendary-table-tools label {
    display: grid;
    gap: 6px;
    min-width: min(100%, 390px);
    color: #d8e7df;
    font-weight: 800;
}

.legendary-table-tools input {
    min-height: 40px;
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: #091410;
    color: #fff;
    padding: 8px 10px;
}

.legendary-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.legendary-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.legendary-table th,
.legendary-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.legendary-table th {
    color: #fff;
    background: rgba(226, 180, 67, .1);
}

.legendary-table td {
    color: #d8e7df;
}

.legendary-table td span {
    display: block;
    margin-top: 3px;
    color: #9fb1a8;
    font-size: 13px;
}

.legendary-table tr[hidden],
.legendary-card[hidden],
.legendary-trouble-grid article[hidden] {
    display: none;
}

.legendary-card-grid,
.legendary-check-grid,
.legendary-trouble-grid {
    display: grid;
    gap: 12px;
}

.legendary-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.legendary-card {
    overflow: hidden;
}

.legendary-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: #07100d;
    image-rendering: pixelated;
    border-bottom: 1px solid var(--line);
}

.legendary-card h3,
.legendary-trouble-grid h3 {
    margin: 0;
    color: #fff;
    line-height: 1.18;
}

.legendary-card a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    margin-top: 8px;
    padding: 6px 9px;
    border: 1px solid rgba(101, 168, 255, .42);
    border-radius: 6px;
    color: #bcd8ff;
    font-weight: 850;
}

.legendary-card a:hover {
    background: rgba(101, 168, 255, .18);
    color: #fff;
}

.legendary-route-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
}

.legendary-route-list li {
    padding-left: 4px;
}

.legendary-route-list strong,
.legendary-progress strong {
    color: #fff;
}

.legendary-route-list span {
    display: block;
    margin-top: 3px;
}

.legendary-progress {
    justify-content: space-between;
    margin-bottom: 12px;
}

.legendary-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legendary-check {
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 16, 13, .5);
}

.legendary-check input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 1px;
    accent-color: var(--gold);
}

.legendary-trouble-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.legendary-trouble-grid article {
    box-shadow: none;
}

.legendary-safety {
    display: grid;
    grid-template-columns: minmax(190px, 300px) minmax(0, 1fr);
    gap: 16px;
    border-color: rgba(225, 83, 83, .42);
    background: linear-gradient(135deg, rgba(225, 83, 83, .14), rgba(9, 19, 16, .98));
}

.legendary-safety ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 1100px) {
    .legendary-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .legendary-hero,
    .legendary-fast,
    .legendary-safety,
    .legendary-trouble-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .legendary-hero-copy,
    .legendary-panel,
    .legendary-card > div,
    .legendary-trouble-grid article {
        padding: 14px;
    }

    .legendary-hero-copy h2 {
        font-size: 30px;
    }

    .legendary-card-grid,
    .legendary-check-grid {
        grid-template-columns: 1fr;
    }

    .legendary-links a,
    .legendary-filter-buttons button,
    .legendary-controls button,
    .legendary-progress button {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }
}
