﻿body.weapon-tier-page {
    padding-bottom: 40px;
}

.weapon-tier-container {
    max-width: 1120px;
}

.tier-hero {
    padding: 76px 0 20px;
}

.tier-hero-copy {
    display: grid;
    gap: 0;
    justify-items: center;
    text-align: center;
}

.tier-kicker {
    color: var(--accent-primary);
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.tier-page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.3;
    color: var(--text-primary);
    font-weight: 800;
    margin: 0;
}

.tier-title-break {
    display: none;
}

.tier-page-lead {
    color: var(--text-secondary);
    max-width: 980px;
    margin-top: 14px;
    text-align: left;
    display: grid;
    gap: 10px;
}

.tier-page-lead p {
    margin: 0;
}

.tier-main {
    display: grid;
    gap: 18px;
}

.tier-table-card,
.tier-note-card {
    overflow: hidden;
    margin-bottom: 0;
}

.tier-detail-section {
    margin-bottom: 0;
}

.tier-table-card,
.tier-detail-section,
.tier-note-card {
    scroll-margin-top: 92px;
}

.tier-table-header {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 16px;
}

.tier-table-heading {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: left;
}

.tier-detail-header {
    display: grid;
    justify-items: center;
    align-items: start;
    gap: 8px;
    text-align: center;
    margin-bottom: 16px;
}

.tier-detail-heading {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.tier-table-kicker,
.tier-detail-section-kicker {
    color: var(--accent-primary);
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.tier-table-scroll {
    overflow-x: auto;
}

.tier-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.tier-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    height: 1px;
}

.tier-row:last-child {
    border-bottom: none;
}

.tier-cell {
    width: 112px;
    padding: 0;
    vertical-align: middle;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.weapon-cell {
    padding: 10px 18px 10px 14px;
}

.tier-rank-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #0b0f16;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.tier-rank-ss {
    background: linear-gradient(180deg, #ff6c6c 0%, #ff4747 100%);
}

.tier-rank-s {
    background: linear-gradient(180deg, #ff8484 0%, #ff6a6a 100%);
}

.tier-rank-a {
    background: linear-gradient(180deg, #ffcc86 0%, #ffb25c 100%);
}

.tier-rank-b {
    background: linear-gradient(180deg, #ffe08a 0%, #ffd45f 100%);
}

.tier-rank-c {
    background: linear-gradient(180deg, #fdf47a 0%, #f7ed59 100%);
}

.tier-weapon-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
}

.tier-weapon-btn {
    position: relative;
    width: 92px;
    aspect-ratio: 1 / 1;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 10px;
    background: rgba(16, 18, 24, 0.98);
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px;
    cursor: pointer;
    overflow: hidden;
    display: block;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 10px 18px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.tier-weapon-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.95);
    background: rgba(26, 30, 38, 1);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 12px 24px rgba(0, 0, 0, 0.3);
}

.tier-weapon-btn.change {
    background: linear-gradient(180deg, rgba(108, 122, 255, 0.22), rgba(81, 92, 214, 0.18));
    border-color: rgba(152, 165, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(152, 165, 255, 0.18), 0 10px 18px rgba(40, 48, 100, 0.24);
}

.tier-weapon-btn.change:hover {
    border-color: rgba(191, 199, 255, 0.82);
    background: linear-gradient(180deg, rgba(120, 134, 255, 0.32), rgba(92, 104, 224, 0.24));
    box-shadow: 0 0 0 1px rgba(191, 199, 255, 0.24), 0 12px 24px rgba(46, 54, 118, 0.3);
}

.tier-weapon-btn:focus-visible,
.tier-return-btn:focus-visible {
    outline: 2px solid rgba(163, 230, 53, 0.9);
    outline-offset: 3px;
}

.tier-weapon-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    object-fit: contain;
    transform: translate(-50%, -62%);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.38));
}

.weapon-style {
    position: absolute;
    right: 7px;
    bottom: 6px;
    max-width: calc(100% - 8px);
    text-align: right;
    font-size: 0.68rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--text-secondary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.tier-note-card {
    display: grid;
    gap: 12px;
}

.tier-detail-section {
    margin-bottom: 0;
    display: grid;
    gap: 18px;
}

.tier-detail-grid {
    display: grid;
    gap: 28px;
}

.tier-detail-item {
    display: grid;
    gap: 18px;
    padding-top: 28px;
    scroll-margin-top: 92px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(12, 14, 20, 0.98), rgba(7, 8, 12, 0.98));
}

.tier-detail-item+.tier-detail-item {
    margin-top: 4px;
}

.tier-detail-item-title-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.tier-detail-item-text-wrap {
    display: grid;
    gap: 0;
    min-width: 0;
}

.tier-detail-item-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    min-width: 64px;
    padding: 0;
    border-radius: 0;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #0b0f16;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    margin: 0;
    flex: 0 0 auto;
}

.tier-detail-item-rank.tier-rank-ss {
    background: linear-gradient(180deg, #ff6c6c 0%, #ff4747 100%);
}

.tier-detail-item-rank.tier-rank-s {
    background: linear-gradient(180deg, #ff8484 0%, #ff6a6a 100%);
}

.tier-detail-item-rank.tier-rank-a {
    background: linear-gradient(180deg, #ffcc86 0%, #ffb25c 100%);
}

.tier-detail-item-rank.tier-rank-b {
    background: linear-gradient(180deg, #ffe08a 0%, #ffd45f 100%);
}

.tier-detail-item-rank.tier-rank-c {
    background: linear-gradient(180deg, #fdf47a 0%, #f7ed59 100%);
}

.tier-detail-item-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    text-align: left;
}

.tier-detail-item-title-weapon,
.tier-detail-item-title-style {
    white-space: nowrap;
}

.tier-detail-item-title-separator {
    white-space: pre;
}

.tier-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 20px;
    align-items: stretch;
}

.tier-detail-header {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.tier-detail-layout .tier-point-grid {
    grid-template-rows: repeat(2, minmax(0, 1fr));
    height: 100%;
}

.tier-return-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(163, 230, 53, 0.35);
    background: rgba(163, 230, 53, 0.12);
    color: #d9f99d;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.tier-return-btn:hover {
    border-color: rgba(163, 230, 53, 0.55);
    background: rgba(163, 230, 53, 0.18);
}

.tier-return-btn--fixed {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 3500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.42);
    color: #dbeafe;
}

.tier-return-btn--fixed.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.tier-table-title,
.tier-detail-section-title,
.tier-note-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.tier-note-body {
    display: grid;
    gap: 10px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.tier-fallback {
    padding: 16px;
    color: var(--text-secondary);
}

.tier-chart-wrap {
    height: 420px;
    min-height: 320px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 0;
    padding: 12px;
}

.tier-point-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 14px;
    height: 100%;
}

.tier-point-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    height: 100%;
}

.tier-point-card--positive {
    border: 0;
}

.tier-point-card--negative {
    border: 0;
}

.tier-point-title {
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: start;
}

.tier-point-card--positive .tier-point-title {
    color: #bef264;
}

.tier-point-card--negative .tier-point-title {
    color: #fb7185;
}

.tier-point-title::before {
    font-size: 1rem;
    line-height: 1;
    font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

.tier-point-card--positive .tier-point-title::before {
    content: "👍";
}

.tier-point-card--negative .tier-point-title::before {
    content: "👎";
}

.tier-point-text {
    color: var(--text-primary);
    line-height: 1.75;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.tier-weapon-icon {
    width: 38px;
    height: 38px;
}

@media (max-width: 720px) {
    .tier-hero {
        padding-top: 78px;
    }

    .tier-page-title {
        font-size: clamp(1.55rem, 6vw, 2.1rem);
    }

    .tier-page-lead {
        max-width: none;
    }

    .tier-title-break {
        display: inline;
    }

    .tier-table-scroll {
        overflow: visible;
    }

    .tier-table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }

    .tier-rank-badge {
        inset: 0;
        width: 100%;
        height: 100%;
        min-height: 0;
        font-size: 0.98rem;
    }

    .tier-cell {
        width: 48px;
    }

    .weapon-cell {
        padding: 8px 0 8px 8px;
    }

    .tier-weapon-list {
        gap: 5px;
    }

    .tier-weapon-btn {
        width: 76px;
    }

    .tier-detail-header {
        justify-items: center;
        align-items: start;
    }

    .tier-detail-heading {
        justify-items: center;
        text-align: center;
    }

    .tier-detail-item-rank {
        width: 56px;
        height: 56px;
        min-width: 56px;
        font-size: 1.15rem;
    }

    .tier-detail-layout {
        grid-template-columns: 1fr;
    }

    .tier-point-grid {
        display: flex;
        flex-direction: column;
        grid-template-rows: none;
        height: auto;
    }

    .tier-point-card {
        height: auto;
    }

    .tier-chart-wrap {
        height: 300px;
        min-height: 260px;
    }

    .tier-cell {
        width: 48px;
    }

    .tier-rank-badge {
        font-size: 0.86rem;
    }

    .tier-weapon-icon {
        width: 32px;
        height: 32px;
    }

    .tier-detail-item-title {
        font-size: 1rem;
        line-height: 1.3;
    }

    .tier-detail-item-title-weapon,
    .tier-detail-item-title-style {
        display: block;
        white-space: normal;
    }

    .tier-detail-item-title-separator {
        display: none;
    }

    .tier-detail-item-title-wrap {
        gap: 10px;
        align-items: center;
        justify-content: flex-start;
    }

    .weapon-style {
        font-size: 0.62rem;
        right: 5px;
        bottom: 4px;
    }

    .tier-return-btn--fixed {
        right: 12px;
        bottom: 12px;
    }
}
