:root {
    --bg-deep: #061419;
    --bg-ocean:
        radial-gradient(circle at 42% 18%, rgba(31, 75, 78, 0.74) 0%, rgba(8, 38, 45, 0.78) 30%, rgba(4, 18, 24, 0.95) 64%, #01080c 100%),
        linear-gradient(180deg, #0d252b 0%, #041117 100%);
    --surface: rgba(0, 18, 23, 0.82);
    --surface-strong: rgba(1, 10, 14, 0.94);
    --glass-bg: rgba(0, 32, 38, 0.58);
    --glass-border: rgba(101, 232, 216, 0.18);
    --accent-glow: #65e8d8;
    --text-primary: #e0fbfc;
    --text-secondary: #9fc9c0;
    --text-muted: #6f918d;
    --accent-atomic: #39ff14;
    --accent-shadow: #bc13fe;
    --accent-electric: #00d2ff;
    --accent-bone: #aeb8b7;
    --sidebar-width: 260px;
}

.layout {
    display: flex;
    min-height: 100vh;
}

body {
    margin: 0;
    background: var(--bg-ocean);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-primary);
    overflow-x: hidden;
}

[hidden] {
    display: none !important;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(3, 15, 20, 0.78);
    backdrop-filter: blur(18px);
    border-right: 1px solid var(--glass-border);
    padding: 34px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 34px;
    z-index: 1000;
    overflow: hidden;
}

.sidebar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 68%;
    background:
        linear-gradient(180deg, rgba(3, 15, 20, 0) 0%, rgba(3, 15, 20, 0.04) 28%, rgba(3, 15, 20, 0.36) 100%),
        url("../images/ui/sidebar-shark-bg.png") 50% bottom / cover no-repeat;
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(3, 15, 20, 0.72) 0%, rgba(3, 15, 20, 0.22) 46%, rgba(3, 15, 20, 0.46) 100%),
        linear-gradient(90deg, rgba(3, 15, 20, 0.82) 0%, rgba(3, 15, 20, 0.34) 55%, rgba(3, 15, 20, 0.72) 100%);
    pointer-events: none;
    z-index: 0;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 90;
}

.sidebar-backdrop.hidden {
    display: none;
}

.sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    opacity: 0;
    visibility: hidden;
}

.main-sidebar-toggle,
.main-sidebar-close {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 15, 20, 0.85);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 200;
    box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

.main-sidebar-close {
    left: var(--sidebar-width);
}

.main-sidebar-close-inner {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 15, 20, 0.85);
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 110;
}

@media (min-width: 901px) {
    .main-sidebar-toggle,
    .main-sidebar-close {
        display: none;
    }
}

@media (max-width: 900px) {
    .sidebar {
        box-shadow: 0 12px 30px rgba(0,0,0,0.45);
        border-right: 1px solid rgba(0, 255, 255, 0.2);
        transform: translateX(calc(-1 * var(--sidebar-width)));
        opacity: 0;
        visibility: hidden;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    body:not(.sidebar-collapsed) .sidebar {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .main-sidebar-close-inner {
        display: flex;
    }

    body.sidebar-collapsed .main-sidebar-toggle {
        display: flex;
    }

    body.sidebar-collapsed .main-sidebar-close {
        display: none;
    }

    body:not(.sidebar-collapsed) .main-sidebar-toggle {
        display: none;
    }

    body:not(.sidebar-collapsed) .main-sidebar-close {
        display: flex;
    }

    body.sidebar-collapsed .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
        opacity: 0;
        visibility: hidden;
    }

    body.sidebar-collapsed .main {
        margin-left: 0;
        width: 100%;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-height: 42px;
    padding-left: 14px;
}

.logo img {
    height: 40px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo span {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(180deg, #ffffff 0%, #88aaaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    border: 1px solid transparent;
}

.menu-item:hover {
    background: rgba(0, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(0, 255, 255, 0.2);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
    transform: translateX(2px);
}

.menu-item.active {
    background: rgba(69, 214, 205, 0.13);
    border-color: rgba(101, 232, 216, 0.38);
    color: var(--text-primary);
}

.menu-item img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.filter-toggle-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 15, 20, 0.85);
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

.filter-toggle-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.filter-popover {
    position: fixed;
    top: 72px;
    right: 16px;
    width: min(360px, 90vw);
    background: rgba(0, 15, 20, 0.94);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 16px 28px rgba(0,0,0,0.45);
    z-index: 210;
}

.filter-popover.hidden {
    display: none;
}

@media (min-width: 901px) {
    .filter-popover,
    .filter-popover.hidden {
        position: static;
        top: auto;
        right: auto;
        width: auto;
        display: block;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        z-index: auto;
    }

    #filters {
        width: 100%;
        max-width: 100%;
    }
}

.equipment-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.equipment-kicker {
    margin: 0 0 8px;
    color: var(--accent-glow);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.equipment-hero h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1;
}

.equipment-lead {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.equipment-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.equipment-search {
    position: relative;
    display: flex;
    align-items: center;
}

.equipment-search span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.equipment-search input {
    width: min(320px, 42vw);
    height: 44px;
    border: 1px solid rgba(101, 232, 216, 0.18);
    border-radius: 8px;
    background: rgba(0, 14, 18, 0.72);
    color: var(--text-primary);
    font: inherit;
    outline: none;
    padding: 0 14px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.26);
}

.equipment-search input::placeholder {
    color: var(--text-muted);
}

.equipment-search input:focus {
    border-color: rgba(101, 232, 216, 0.58);
    box-shadow: 0 0 0 3px rgba(101, 232, 216, 0.12);
}

.equipment-count,
.equipment-sort-btn {
    min-height: 44px;
    border: 1px solid rgba(101, 232, 216, 0.16);
    border-radius: 8px;
    background: rgba(0, 24, 29, 0.56);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.equipment-sort-btn {
    min-width: 128px;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.equipment-sort-btn::after {
    content: "⌄";
    margin-left: 12px;
    color: var(--accent-glow);
    font-size: 16px;
    line-height: 1;
}

.equipment-sort-btn:hover {
    border-color: rgba(101, 232, 216, 0.44);
    background: rgba(101, 232, 216, 0.12);
}

.equipment-filter-panel {
    margin-bottom: 24px;
}

#filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    width: 100%;
    padding: 0 0 20px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(101, 232, 216, 0.16);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    overflow: visible;
    padding: 0;
}

.filter-row + .filter-row {
    border-top: 0;
}

.filter-row::-webkit-scrollbar {
    height: 6px;
}

.filter-row::-webkit-scrollbar-thumb {
    background: rgba(101, 232, 216, 0.38);
    border-radius: 999px;
}

.filter-row-label {
    position: static;
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.filter-tab {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(101, 232, 216, 0.16);
    border-radius: 6px;
    background: rgba(0, 18, 23, 0.52);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-tab:last-child {
    border-right: 1px solid rgba(101, 232, 216, 0.16);
}

.filter-tab::after {
    display: none;
}

.filter-tab:hover,
.filter-tab.active {
    background: rgba(101, 232, 216, 0.12);
    border-color: rgba(101, 232, 216, 0.5);
    color: var(--text-primary);
}

.filter-tab.active::after {
    opacity: 0;
}

.filter-tab img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(101, 232, 216, 0.14));
}

.filter-tab-grid {
    width: 18px;
    height: 18px;
    display: grid;
    grid-template-columns: repeat(2, 5px);
    grid-template-rows: repeat(2, 5px);
    gap: 3px;
}

.filter-tab-grid::before,
.filter-tab-grid::after,
.filter-tab-grid span {
    content: "";
}

.filter-tab-grid,
.filter-tab-grid::before,
.filter-tab-grid::after {
    background:
        linear-gradient(var(--text-secondary), var(--text-secondary)) 0 0 / 5px 5px no-repeat,
        linear-gradient(var(--text-secondary), var(--text-secondary)) 8px 0 / 5px 5px no-repeat,
        linear-gradient(var(--text-secondary), var(--text-secondary)) 0 8px / 5px 5px no-repeat,
        linear-gradient(var(--text-secondary), var(--text-secondary)) 8px 8px / 5px 5px no-repeat;
}

.filter-tab.active .filter-tab-grid,
.filter-tab:hover .filter-tab-grid {
    background:
        linear-gradient(var(--text-primary), var(--text-primary)) 0 0 / 5px 5px no-repeat,
        linear-gradient(var(--text-primary), var(--text-primary)) 8px 0 / 5px 5px no-repeat,
        linear-gradient(var(--text-primary), var(--text-primary)) 0 8px / 5px 5px no-repeat,
        linear-gradient(var(--text-primary), var(--text-primary)) 8px 8px / 5px 5px no-repeat;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 20px;
}

.equipment-card {
    position: relative;
    --card-accent: var(--accent-glow);
    --card-accent-soft: rgba(101, 232, 216, 0.12);
    --card-accent-panel: rgba(49, 99, 90, 0.42);
    min-width: 0;
    min-height: 216px;
    background: linear-gradient(180deg, rgba(0, 9, 12, 0.96) 0%, rgba(0, 0, 0, 0.98) 100%);
    border: 1px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.equipment-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--card-accent) 15%, transparent), transparent 42%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.equipment-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--card-accent) 70%, white 6%);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 22px var(--card-accent-soft);
}

.equipment-card:hover::before {
    opacity: 1;
}

.equipment-img-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: radial-gradient(circle at center, var(--card-accent-panel), rgba(20, 54, 50, 0.42) 56%, rgba(4, 13, 14, 0.76) 100%);
    border: 1px solid color-mix(in srgb, var(--card-accent) 68%, transparent);
    box-shadow: inset 0 0 20px var(--card-accent-soft), 0 0 12px rgba(101, 232, 216, 0.06);
    box-sizing: border-box;
}

.equipment-img {
    max-width: 86%;
    max-height: 86%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.2));
}

.equipment-name {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    text-align: center;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-wrap: anywhere;
}

.equipment-meta {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
    min-width: 0;
}

.equipment-chip {
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--card-accent) 52%, transparent);
    border-radius: 4px;
    color: color-mix(in srgb, var(--card-accent) 82%, white 18%);
    background: rgba(0, 18, 23, 0.48);
    font-size: 10px;
    line-height: 1;
    padding: 5px 10px;
    overflow-wrap: anywhere;
}

.equipment-element-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--card-accent);
    box-shadow: 0 0 10px var(--card-accent);
    flex: 0 0 auto;
}

.equipment-empty {
    margin: 40px 0;
    color: var(--text-secondary);
    text-align: center;
}

.equipment-empty.hidden {
    display: none;
}

.main {
    margin-left: var(--sidebar-width);
    padding: 48px clamp(26px, 4vw, 64px);
    width: calc(100% - var(--sidebar-width));
    box-sizing: border-box;
}

/* Detail Page Specific Styling */
.equipment-back-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 26px;
    color: var(--accent-glow);
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, transform 0.2s ease;
}

.equipment-back-link:hover {
    color: var(--text-primary);
    transform: translateX(-3px);
}

.equipment-top {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(28px, 4vw, 48px);
    align-items: flex-start;
    margin-bottom: 28px;
}

.equipment-left {
    min-width: 0;
}

.equipment-image-frame {
    position: relative;
    aspect-ratio: 1;
    width: min(280px, 100%);
    display: grid;
    place-items: center;
}

#equipment-splash {
    position: relative;
    z-index: 1;
    width: 84%;
    height: 84%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(224, 251, 252, 0.22));
}

.equipment-right h1 {
    font-family: var(--font-heading);
    font-size: clamp(34px, 4vw, 52px);
    margin: 0 0 14px;
    line-height: 1;
    letter-spacing: 0;
}

.equipment-right p {
    margin: 0;
}

.detail-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-chip-row p {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(101, 232, 216, 0.42);
    border-radius: 6px;
    background: rgba(0, 28, 36, 0.58);
    color: var(--accent-glow);
    padding: 0 14px;
    font-size: 14px;
    font-weight: 800;
}

#detail-age {
    border-color: rgba(255, 153, 0, 0.76);
    color: #ff9900;
}

.detail-obtain {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
    margin-bottom: 8px;
}

#detail-description {
    margin: 8px 0 28px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    max-width: 820px;
}

/* Highlight variable numbers in abilities */
.highlight {
    color: #ff9900;
    font-weight: bold;
}

.section-material-tier {
    margin-bottom: 40px;
    padding: 24px 28px 26px;
    background: rgba(0, 30, 40, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    width: 100%;
    box-sizing: border-box;
}

.material-panel-title {
    margin: 0 0 18px;
    color: var(--accent-glow);
    font-family: var(--font-heading);
    font-size: 22px;
    line-height: 1;
}

.material-tabs {
    display: flex;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(101, 232, 216, 0.14);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.material-tab {
    min-height: 40px;
    padding: 0 22px;
    border: 0;
    border-right: 1px solid rgba(101, 232, 216, 0.14);
    background: rgba(0, 18, 23, 0.46);
    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.material-tab:last-child {
    border-right: 0;
}

.material-tab:hover,
.material-tab.active {
    background: rgba(0, 42, 52, 0.68);
    color: var(--accent-glow);
}

.material-box-wrapper {
    border-top: 1px solid rgba(101, 232, 216, 0.14);
    min-height: 58px;
}

.material-container {
    padding-top: 18px;
}

.material-container[hidden] {
    display: none;
}

.material-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.mat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 128px;
    min-height: 42px;
    padding: 0 14px;
    background: rgba(0, 13, 17, 0.48);
    border: 1px solid rgba(101, 232, 216, 0.13);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mat-item:hover {
    border-color: var(--accent-glow);
    background: rgba(0, 255, 255, 0.05);
}

.mat-item img {
    width: 26px;
    height: 26px;
    margin-bottom: 0;
    object-fit: contain;
}

.mat-item span {
    font-size: 13px;
    font-weight: 700;
}

.material-empty {
    margin: 0;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
}

.tier-control {
    width: min(520px, 100%);
    display: grid;
    grid-template-columns: auto auto minmax(180px, 1fr);
    align-items: center;
    column-gap: 26px;
    row-gap: 8px;
    margin-bottom: 22px;
}

.tier-control h3 {
    font-family: var(--font-heading);
    margin: 0;
    font-size: 16px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.tier-slider {
    width: 100%;
    margin: 0;
    accent-color: var(--accent-glow);
}

.tier-label {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--accent-glow);
    white-space: nowrap;
}

.tier-heading {
    display: contents;
}

.tier-steps {
    grid-column: 3;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin-top: -2px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.tier-steps span {
    position: relative;
}

.tier-steps span.active {
    color: var(--accent-glow);
}

.section-effects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.section-effects section,
#section-ability {
    flex: 1;
    background: rgba(0, 30, 40, 0.4);
    backdrop-filter: blur(10px);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-sizing: border-box;
}

#section-ability {
    margin-top: 24px;
}

.section-effects h2,
#section-ability h2 {
    font-family: var(--font-heading);
    margin: 0 0 18px;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-glow);
    border-bottom: 1px solid rgba(101, 232, 216, 0.12);
    padding-bottom: 12px;
}

.section-effects p,
#section-ability p {
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 16px;
    margin: 0;
}

.effect-summary {
    margin-top: 28px;
}

.effect-summary[hidden] {
    display: none;
}

.effect-summary h3 {
    margin: 0 0 12px;
    color: var(--accent-glow);
    font-family: var(--font-heading);
    font-size: 17px;
}

.effect-summary table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid rgba(101, 232, 216, 0.14);
}

.effect-summary th,
.effect-summary td {
    padding: 11px 16px;
    border: 1px solid rgba(101, 232, 216, 0.12);
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

.effect-summary th {
    width: 58%;
    color: var(--text-primary);
    font-weight: 700;
}

.effect-summary td {
    color: #ff9900;
    font-weight: 800;
}

/* Custom coloring for elements if needed */
[data-element="atomic"] {
    --glow: var(--accent-atomic);
    --card-accent: var(--accent-atomic);
    --card-accent-soft: rgba(57, 255, 20, 0.18);
    --card-accent-panel: rgba(42, 120, 48, 0.5);
}

[data-element="shadow"] {
    --glow: var(--accent-shadow);
    --card-accent: #9d5eea;
    --card-accent-soft: rgba(157, 94, 234, 0.18);
    --card-accent-panel: rgba(74, 48, 103, 0.54);
}

[data-element="bioelectric"] {
    --glow: var(--accent-electric);
    --card-accent: #00c8df;
    --card-accent-soft: rgba(0, 200, 223, 0.18);
    --card-accent-panel: rgba(16, 96, 108, 0.54);
}

[data-element="bone"] {
    --glow: var(--accent-bone);
    --card-accent: #aeb8b7;
    --card-accent-soft: rgba(174, 184, 183, 0.16);
    --card-accent-panel: rgba(96, 104, 101, 0.52);
}

[data-element="none"] {
    --glow: var(--accent-glow);
    --card-accent: #65e8d8;
    --card-accent-soft: rgba(101, 232, 216, 0.14);
    --card-accent-panel: rgba(49, 99, 90, 0.42);
}

[data-slot="organ"] {
    --glow: #ffffff;
    --card-accent: #ffffff;
    --card-accent-soft: rgba(255, 255, 255, 0.16);
    --card-accent-panel: rgba(168, 180, 180, 0.42);
}

.equipment-card[data-element]:hover {
    border-color: var(--glow);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 22px rgba(101, 232, 216, 0.12);
}

@media (max-width: 900px) {
    .main {
        padding: 28px;
    }

    .equipment-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        margin-top: 48px;
    }

    .equipment-toolbar {
        justify-content: flex-start;
    }

    .equipment-search {
        flex: 1 1 100%;
    }

    .equipment-search input {
        width: 100%;
    }

    .equipment-filter-panel {
        margin-bottom: 22px;
    }

    .filter-popover,
    .filter-popover.hidden {
        position: static;
        top: auto;
        right: auto;
        width: auto;
        display: block;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        z-index: auto;
    }

    #filters {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 0;
    }

    .filter-tab {
        flex-basis: auto;
        min-width: 0;
        min-height: 34px;
        padding: 0 11px;
        gap: 8px;
        font-size: 13px;
    }

    .filter-tab img {
        width: 22px;
        height: 22px;
    }

    .filter-row-label {
        flex-basis: auto;
        min-height: 34px;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
        gap: 16px;
    }

    .equipment-card {
        min-height: 214px;
    }

    .equipment-top {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 24px;
    }

    .equipment-image-frame {
        width: min(260px, 100%);
    }

    #equipment-splash {
        width: 84%;
        height: 84%;
    }

    .equipment-right h1 {
        font-size: 32px;
        text-align: left;
    }

    .equipment-right p {
        font-size: 16px;
    }

    #detail-description {
        font-size: 16px;
        line-height: 1.6;
        max-width: 100%;
        text-align: left;
    }

    .section-material-tier {
        padding: 22px;
    }

    .material-tabs {
        width: 100%;
    }

    .material-tab {
        flex: 1 1 0;
        padding: 0 12px;
    }

    .tier-control {
        width: 100%;
        grid-template-columns: auto auto minmax(140px, 1fr);
    }

    .tier-label {
        font-size: 20px;
    }

    .section-effects {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .section-effects section,
    #section-ability {
        padding: 22px;
    }
}

@media (max-width: 600px) {
    .main {
        padding: 20px;
    }

    .equipment-hero h1 {
        font-size: 34px;
    }

    .equipment-lead {
        font-size: 14px;
    }

    .equipment-count,
    .equipment-sort-btn {
        min-height: 40px;
    }

    .equipment-sort-btn {
        min-width: 116px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: calc(100vw - 40px);
    }

    .equipment-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        align-items: center;
        column-gap: 14px;
        min-height: 136px;
        padding: 10px;
        width: 100%;
    }

    .equipment-name {
        font-size: 12px;
        min-height: 0;
        text-align: left;
        justify-content: flex-start;
    }

    .equipment-chip {
        font-size: 9px;
        padding: 4px 6px;
    }

    .equipment-img-wrapper {
        grid-row: 1 / span 2;
        margin-bottom: 0;
    }

    .equipment-meta {
        justify-content: flex-start;
        margin-top: 8px;
    }

    #equipment-splash {
        width: 84%;
        height: 84%;
    }

    .equipment-right h1 {
        font-size: 26px;
    }

    .equipment-right p {
        font-size: 14px;
    }

    #detail-description {
        font-size: 15px;
    }

    .mat-item {
        min-width: 0;
        width: 100%;
        min-height: 42px;
        height: auto;
        border-radius: 6px;
    }

    .mat-item img {
        width: 26px;
        height: 26px;
    }

    .section-effects h2,
    #section-ability h2 {
        font-size: 16px;
    }

    .section-effects p,
    #section-ability p {
        font-size: 15px;
    }
}
