.page-with-left-sidebar {
    align-items: stretch;
    text-align: left;
}

.set-effects-page {
    width: 100%;
    max-width: none;
    gap: 1.5rem;
    margin: 2rem 0;
}

main.page-with-left-sidebar .set-hero,
#hero.set-hero {
    background:
        linear-gradient(135deg, rgba(73, 24, 10, 0.66), rgba(180, 79, 24, 0.36)),
        url("../images/set-effects/zak.png");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    border: 2px solid rgba(77, 112, 168, 0.45);
    box-shadow: 0 18px 45px rgba(19, 37, 72, 0.28);
    min-height: 360px;
}

.set-hero-copy {
    position: relative;
    z-index: 1;
    text-align: left;
    max-width: 760px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-kicker img {
    width: 20px;
    height: 20px;
}

.set-hero .section-title {
    text-align: left;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.25rem);
    color: #ffffff;
    text-shadow:
        0 3px 16px rgba(9, 18, 37, 0.45),
        0 1px 0 rgba(9, 18, 37, 0.35);
}

.set-hero-subtitle {
    color: rgba(241, 246, 255, 0.96);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 60ch;
    text-shadow: 0 2px 10px rgba(9, 18, 37, 0.35);
}

.set-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.set-hero-panel {
    position: relative;
    z-index: 1;
    min-width: 310px;
    max-width: 360px;
    padding: 1.5rem;
    border-radius: 18px;
    background: rgba(12, 25, 57, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(5px);
}

.set-hero-panel-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffe7a8;
}

.set-hero-panel-header img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.set-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.set-hero-stat {
    padding: 0.9rem 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    text-align: center;
}

.set-hero-stat-value {
    display: block;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 900;
}

.set-hero-stat-label {
    display: block;
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.set-hero-callout {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    color: #fef3c7;
    background: rgba(242, 159, 5, 0.18);
    border: 1px solid rgba(242, 159, 5, 0.28);
    line-height: 1.5;
    font-size: 0.95rem;
}

#hero.set-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(41, 16, 12, 0.7), rgba(41, 16, 12, 0.2) 38%, rgba(41, 16, 12, 0.42)),
        linear-gradient(180deg, rgba(255, 228, 184, 0.06), rgba(61, 19, 10, 0.22)),
        radial-gradient(circle at top right, rgba(255, 172, 64, 0.3), transparent 28%);
    pointer-events: none;
}

#hero.set-hero .guides-header,
#hero.set-hero .guides-header p,
#hero.set-hero .guides-header .section-title,
#hero.set-hero .hero-kicker,
#hero.set-hero .set-hero-subtitle {
    position: relative;
    z-index: 1;
}

.set-toolbar {
    justify-content: stretch;
    gap: 1.25rem;
}

.set-toolbar-row {
    width: 100%;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.set-search-field {
    position: relative;
    flex: 1 1 320px;
}

.set-search-field i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.set-search-field .search-input {
    width: 100%;
    padding-left: 2.75rem;
}

.set-quick-filters {
    width: 100%;
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.set-pill {
    border: 1px solid rgba(74, 144, 226, 0.22);
    background: rgba(74, 144, 226, 0.08);
    color: var(--secondary-color);
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.set-pill:hover,
.set-pill.is-active {
    transform: translateY(-1px);
    border-color: rgba(242, 159, 5, 0.4);
    background: rgba(242, 159, 5, 0.16);
    color: #a35c00;
}

.set-results-shell {
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 15px 40px rgba(21, 34, 66, 0.15);
    border: 1px solid rgba(17, 24, 39, 0.06);
}

.set-results-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.set-results-kicker {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary-color);
    font-size: 0.8rem;
    font-weight: 800;
}

.set-results-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

@media (min-width: 1201px) {
    .page-with-left-sidebar .set-effects-page {
        padding-right: 1rem;
    }
}

.set-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 18px;
    border: 2px solid rgba(189, 195, 199, 0.45);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.96)),
        url("../images/paper_texture.png");
    background-size: cover;
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    min-height: 100%;
}

.set-card:hover {
    transform: translateY(-4px);
    border-color: rgba(242, 159, 5, 0.42);
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.13);
}

.set-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.16), transparent 45%, rgba(74, 144, 226, 0.1));
    pointer-events: none;
}

.set-card-top,
.set-card-items,
.set-card-preview,
.set-card-footer {
    position: relative;
    z-index: 1;
}

.set-card-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.set-card-title {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.35;
    color: #1f2937;
}

.set-card-subtitle {
    margin-top: 0.3rem;
    color: #607080;
    font-size: 0.88rem;
}

.set-card-badges,
.set-card-focuses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.set-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.set-badge.level {
    background: rgba(74, 144, 226, 0.12);
    border-color: rgba(74, 144, 226, 0.18);
    color: #2e6eb7;
}

.set-badge.pieces {
    background: rgba(242, 159, 5, 0.15);
    border-color: rgba(242, 159, 5, 0.22);
    color: #9f5c00;
}

.set-badge.archetype {
    background: rgba(140, 182, 61, 0.14);
    border-color: rgba(140, 182, 61, 0.2);
    color: #5a7e1a;
}

.set-badge.focus {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(17, 24, 39, 0.08);
    color: #51606d;
}

.set-card-items {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.set-item-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 244, 255, 0.95));
    display: grid;
    place-items: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.set-item-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.set-card-preview {
    display: grid;
    gap: 0.55rem;
    background: rgba(17, 24, 39, 0.04);
    border-radius: 14px;
    padding: 0.9rem;
}

.set-card-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: #58677a;
    font-size: 0.86rem;
    font-weight: 700;
}

.set-card-summary strong {
    color: #24344b;
}

.set-preview-line {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.5;
}

.set-preview-count {
    min-width: 3rem;
    font-weight: 800;
    color: #c66e00;
}

.set-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: auto;
}

.set-card-items-label {
    color: #6b7280;
    font-size: 0.85rem;
}

.set-card-open {
    border: none;
    background: #1f5aa6;
    color: white;
    font-weight: 800;
    border-radius: 12px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.set-card-open:hover {
    transform: translateY(-1px);
    background: #174786;
}

.set-empty {
    grid-column: 1 / -1;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.set-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.set-modal-content {
    max-width: 960px;
    min-height: 0;
    max-height: 88vh;
    padding-top: 2.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.set-modal-shell {
    display: grid;
    gap: 1.25rem;
    padding-right: 0.35rem;
}

.set-modal-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
}

.set-modal-summary,
.set-modal-sidepanel,
.set-modal-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 255, 0.95));
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 18px;
    padding: 1.15rem;
}

.set-modal-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #16233f;
    margin-bottom: 0.6rem;
}

.set-modal-subtitle {
    color: #5f6f80;
    line-height: 1.6;
}

.set-modal-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.set-modal-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.04);
}

.set-modal-item img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.set-modal-item-name {
    font-weight: 800;
    color: #1f2937;
}

.set-modal-item-alt {
    font-size: 0.78rem;
    color: #607080;
    margin-top: 0.2rem;
}

.set-modal-item-note {
    font-size: 0.82rem;
    color: #607080;
    margin-top: 0.2rem;
}

.set-modal-sidepanel {
    display: grid;
    gap: 0.9rem;
    align-content: start;
}

.set-modal-side-title,
.set-modal-section h3 {
    font-size: 0.86rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1f5aa6;
    margin-bottom: 0.55rem;
}

.set-modal-side-value {
    font-size: 1.15rem;
    font-weight: 900;
    color: #16233f;
}

.set-effect-ladder {
    display: grid;
    gap: 0.85rem;
}

.set-effect-step {
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.04);
    padding: 1rem;
}

.set-effect-step-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.set-effect-step-count {
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(242, 159, 5, 0.15);
    color: #9f5c00;
    font-weight: 800;
}

.set-effect-step ul {
    list-style: none;
    display: grid;
    gap: 0.45rem;
    color: #334155;
}

.set-effect-step li {
    padding-left: 1rem;
    position: relative;
}

.set-effect-step li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f29f05;
}

.set-flavor-lines {
    display: grid;
    gap: 0.65rem;
}

.set-flavor-line {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(140, 182, 61, 0.12);
    border: 1px solid rgba(140, 182, 61, 0.2);
    color: #335215;
}

@media (max-width: 900px) {
    .set-hero {
        flex-direction: column;
        padding: 2rem;
    }

    .set-hero .section-title {
        text-align: center;
    }

    .set-hero-copy {
        text-align: center;
    }

    .set-hero-subtitle {
        margin: 0 auto;
    }

    .set-hero-actions {
        justify-content: center;
    }

    .set-modal-hero {
        grid-template-columns: 1fr;
    }

    .set-modal-content {
        max-height: 92vh;
        width: calc(100% - 24px);
    }
}

@media (max-width: 640px) {
    .set-grid {
        grid-template-columns: 1fr;
    }

    .set-hero-panel {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .set-hero-stats {
        grid-template-columns: 1fr;
    }

    .set-modal-items {
        grid-template-columns: 1fr;
    }
}
