/* CyberPaws Official Site — Cyberpunk × Blockchain × Wuxia */

:root {
    --bg-deep: #06080f;
    --bg-panel: rgba(12, 18, 32, 0.82);
    --bg-card: rgba(16, 24, 42, 0.9);
    --border: rgba(0, 240, 255, 0.18);
    --border-bright: rgba(0, 240, 255, 0.45);
    --text: #e8edf7;
    --text-dim: #8b9cb8;
    --cyan: #00f0ff;
    --magenta: #ff2d95;
    --gold: #f0c040;
    --green: #3ddc84;
    --red: #ff4d6d;
    --nav-w: 240px;
    --header-h: 68px;
    --ui-font-scale: 1.2;
    --font-sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    --font-ui: var(--font-sans);
    --font-mono: var(--font-sans);
    --el-earth: #c9a66b;
    --el-metal: #f0c040;
    --el-wood: #3ddc84;
    --el-water: #4db8ff;
    --el-fire: #ff4d6d;
    --r-white: #b8c0cc;
    --r-green: #3ddc84;
    --r-blue: #4db8ff;
    --r-purple: #b06aff;
    --r-gold: #f0c040;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 24px);
    font-size: calc(16px * var(--ui-font-scale));
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.35) rgba(6, 8, 15, 0.6);
}

html::-webkit-scrollbar {
    width: 10px;
}

html::-webkit-scrollbar-track {
    background: rgba(6, 8, 15, 0.85);
}

html::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.28);
    border: 2px solid rgba(6, 8, 15, 0.85);
    border-radius: 5px;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.45);
}

body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg-deep);
    min-height: 100vh;
    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.dim { color: var(--text-dim); }

/* Background effects */
.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.35;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(6, 8, 15, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-chain {
    font-size: 1.4rem;
    color: var(--cyan);
    filter: drop-shadow(0 0 8px var(--cyan));
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.35));
}

.brand-title {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.brand-sub {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(255, 45, 149, 0.2));
    border-color: var(--border-bright);
    color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.4), rgba(255, 45, 149, 0.35));
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-dim);
}

.btn-ghost:hover {
    border-color: var(--magenta);
    color: var(--magenta);
}

/* Layout */
.layout {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--nav-w) 1fr;
    gap: 0;
    padding: 0 24px 48px;
}

/* Side nav — JX-style */
.side-nav {
    position: sticky;
    top: calc(var(--header-h) + 8px);
    align-self: start;
    display: flex;
    flex-direction: column;
    padding: 4px 0 12px;
    max-height: none;
    overflow: visible;
}

.side-nav__avatar-wrap {
    flex-shrink: 0;
    padding: 0 4px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.side-nav__avatar {
    display: block;
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid var(--border-bright);
    background: var(--bg-card);
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.08);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    transform: none;
}

.side-nav__menu {
    flex: 1;
    min-height: 0;
    padding-top: 8px;
}

.nav-label {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--magenta);
    letter-spacing: 0.16em;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 2px solid var(--magenta);
}

.side-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-nav a {
    display: block;
    padding: 9px 14px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1.12rem;
    font-weight: 500;
    line-height: 1.35;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.side-nav a:hover,
.side-nav a.active {
    color: var(--cyan);
    border-left-color: var(--cyan);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.08), transparent);
}

/* NFT nav — text-only breathing glow; left line only when active */
@keyframes nav-nft-breathe {
    0%, 100% {
        color: #8a7a55;
        text-shadow:
            0 0 2px rgba(255, 200, 80, 0.25),
            0 0 6px rgba(255, 180, 40, 0.15);
    }
    50% {
        color: #ffd978;
        text-shadow:
            0 0 4px rgba(255, 230, 140, 0.9),
            0 0 10px rgba(255, 200, 80, 0.65),
            0 0 18px rgba(255, 170, 40, 0.4);
    }
}

.side-nav a[data-nav="nft"],
.float-dock__panel a[data-nav="nft"] {
    color: #8a7a55;
    font-weight: 500;
    letter-spacing: normal;
    border-left-color: transparent;
    background: transparent;
    box-shadow: none;
    animation: nav-nft-breathe 2.4s ease-in-out infinite;
    transition: border-left-color 0.35s ease, background 0.35s ease, font-weight 0.35s ease;
}

.side-nav a[data-nav="nft"]:hover,
.float-dock__panel a[data-nav="nft"]:hover {
    background: transparent;
    border-left-color: transparent;
    box-shadow: none;
}

.side-nav a[data-nav="nft"].active,
.float-dock__panel a[data-nav="nft"].active {
    color: #ffd978;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-left-color: #ffd978;
    background: transparent;
    box-shadow: none;
    animation: nav-nft-breathe 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .side-nav a[data-nav="nft"],
    .float-dock__panel a[data-nav="nft"],
    .side-nav a[data-nav="nft"].active,
    .float-dock__panel a[data-nav="nft"].active {
        animation: none;
        color: #ffd978;
        text-shadow:
            0 0 4px rgba(255, 210, 100, 0.7),
            0 0 10px rgba(255, 180, 40, 0.35);
        background: transparent;
        box-shadow: none;
    }
}

.nav-footer {
    margin-top: 16px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.62rem;
    border-top: 1px solid var(--border);
}

/* Content panels */
.content {
    min-width: 0;
    padding: 8px 0 20px 32px;
}

.panel {
    margin-bottom: 32px;
    padding: 28px 32px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, transparent 50%, var(--cyan) 50%);
    opacity: 0.5;
}

.section-head {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.section-head h2 {
    margin: 0 0 8px;
    font-family: var(--font-ui);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.04em;
}

.section-desc {
    margin: 0;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.5;
}

.section-desc--flow {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-desc--flow .section-desc__line {
    display: block;
    white-space: nowrap;
}

@media (min-width: 901px) {
    .section-desc--flow {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0 0.35em;
    }

    .section-desc--flow .section-desc__line {
        display: inline;
    }
}

.sub-title {
    margin: 28px 0 16px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
    font-family: var(--font-ui);
}

.sub-title--tight {
    margin: 18px 0 10px;
    font-size: 1.05rem;
}

.section-desc--tight {
    margin: -4px 0 12px;
    font-size: 0.88rem;
}

#gear-quality .section-head {
    margin-bottom: 16px;
    padding-bottom: 12px;
}

#gear-quality .info-banner {
    margin-top: 14px;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 52%);
    gap: 28px;
    align-items: center;
    overflow: hidden;
    min-height: 360px;
}

.hero-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0, 240, 255, 0.12), transparent 70%);
    pointer-events: none;
}

.eyebrow {
    font-size: 0.7rem;
    color: var(--magenta);
    letter-spacing: 0.14em;
    margin: 0 0 12px;
    white-space: nowrap;
}

.hero-title {
    margin: 0 0 16px;
    font-size: 2.15rem;
    font-weight: 900;
    line-height: 1.3;
    background: linear-gradient(90deg, #fff, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    margin: 0 0 24px;
    max-width: 640px;
    color: var(--text-dim);
}

.hero-lead strong {
    color: var(--gold);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.hero-play {
    margin-top: 4px;
}

.stat-chip {
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
    min-width: 80px;
}

.stat-chip span {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
}

.stat-chip small {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.hero-chain {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.6;
}

.hero-roster {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: center;
}

/* Hero theme video */
.hero-video {
    position: relative;
    min-width: 0;
}

.hero-video__frame {
    position: relative;
    border: 1px solid var(--border-bright);
    background: var(--bg-card);
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    box-shadow: 0 0 32px rgba(0, 240, 255, 0.08);
}

.hero-video__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 320px;
    object-fit: cover;
    background: #06080f;
}

.hero-video__play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(6, 8, 15, 0.42);
    color: var(--cyan);
    cursor: pointer;
    transition: opacity 0.25s, background 0.25s;
}

.hero-video__play:hover {
    background: rgba(0, 240, 255, 0.12);
    color: #fff;
}

.hero-video__play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    padding-left: 4px;
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.25);
}

.hero-video__play-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-video.is-playing .hero-video__play {
    opacity: 0;
    pointer-events: none;
}

.hero-video.is-ended .hero-video__play {
    opacity: 1;
    pointer-events: auto;
}

.chain-block {
    width: 48px;
    height: 32px;
    border: 1px solid var(--cyan);
    background: rgba(0, 240, 255, 0.08);
    animation: pulse-block 3s ease-in-out infinite;
}

.chain-link {
    width: 2px;
    height: 16px;
    background: var(--magenta);
}

.chain-block:nth-child(3) { animation-delay: 0.5s; }
.chain-block:nth-child(5) { animation-delay: 1s; }

@keyframes pulse-block {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 240, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.5); }
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.feature-card {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: var(--border-bright);
}

.feature-card h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--cyan);
}

.feature-card p {
    margin: 12px 0 0;
    font-size: 0.88rem;
    color: var(--text-dim);
}

/* 五侠择一 */
.feature-cats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-cat {
    flex: 1 1 72px;
    min-width: 64px;
    max-width: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.feature-cat__portrait {
    width: 52px;
    height: 52px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--cat-color) 45%, transparent));
}

.feature-cat__element {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cat-color);
    line-height: 1;
}

.feature-cat__name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cat-color);
    line-height: 1.2;
}

/* 六栏装备 — 单行正方形虚线框，仅图标 */
.feature-equip-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 12px 0;
}

.feature-equip-slot {
    min-width: 0;
}

.feature-equip-slot__frame {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 1;
    max-width: 52px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 1px dashed rgba(180, 210, 255, 0.42);
    border-radius: 8px;
    background: rgba(8, 14, 28, 0.65);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.feature-equip-slot__frame img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    object-fit: contain;
    image-rendering: pixelated;
    opacity: 0.95;
}

/* 远征奖励图标 — 背包方格 */
.feature-battle-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    padding: 4px 0 8px;
}

.feature-battle-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 56px;
}

.feature-battle-icon .bp-slot {
    width: 52px;
    height: 52px;
}

#intro-detail .feature-battle-icon .bp-slot.bp-slot--filled {
    border: 1px solid rgba(255, 255, 255, 0.82);
    background: rgba(8, 14, 28, 0.35);
    box-shadow: none;
}

#intro-detail .feature-battle-icon .bp-slot.bp-slot--filled::before,
#intro-detail .feature-battle-icon .bp-slot.bp-slot--filled::after {
    display: none;
}

.feature-battle-icon span {
    font-size: 0.62rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.15;
    white-space: nowrap;
}

/* 品质进阶 — 背包方格（与游戏背包同款） */
.quality-progression {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px;
    padding: 8px 0;
}

.quality-step-arrow {
    color: var(--text-dim);
    font-size: 1rem;
    opacity: 0.7;
    user-select: none;
}

.quality-progression .bp-slot {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.quality-frame__text {
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.quality-frame__text.rarity-white { color: #9aa8b8; }
.quality-frame__text.rarity-green { color: #3ecf6e; }
.quality-frame__text.rarity-blue { color: #4db8ff; }
.quality-frame__text.rarity-purple { color: #d8a8ff; }
.quality-frame__text.rarity-gold { color: #ffd878; }

/* —— 背包格子样式（摘自 backpack.css，供资料站介绍区） —— */
#intro-detail .bp-slot {
    position: relative;
    aspect-ratio: 1;
    border: none;
    padding: 0;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

#intro-detail .bp-slot--filled {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.5));
}

#intro-detail .bp-slot__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72%;
    height: 72%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

#intro-detail .bp-item-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

#intro-detail .bp-quality--white.bp-slot--filled {
    border: 2px solid #9aa8b8;
    box-shadow: inset 0 0 8px rgba(180, 190, 200, 0.15);
}

#intro-detail .bp-quality--green.bp-slot--filled {
    border: 2px solid #3ecf6e;
    box-shadow: inset 0 0 10px rgba(62, 207, 110, 0.2), 0 0 8px rgba(62, 207, 110, 0.15);
}

#intro-detail .bp-quality--blue.bp-slot--filled {
    border: 2px solid #4db8ff;
    box-shadow: inset 0 0 12px rgba(77, 184, 255, 0.22), 0 0 10px rgba(77, 184, 255, 0.12);
}

#intro-detail .bp-quality--purple.bp-slot--filled {
    border: none;
    overflow: hidden;
    isolation: isolate;
    background: transparent;
    box-shadow: 0 0 10px rgba(168, 96, 255, 0.28), 0 0 16px rgba(140, 72, 220, 0.2);
}

#intro-detail .bp-quality--purple.bp-slot--filled::before {
    content: '';
    position: absolute;
    inset: -120%;
    background: conic-gradient(
        from 0deg,
        #1a0a2e 0deg, #6b2fa8 24deg, #c07bff 42deg, #e8c8ff 52deg,
        #a855f7 62deg, #7c3aed 78deg, #1a0a2e 100deg, #1a0a2e 180deg,
        #6b2fa8 204deg, #c07bff 222deg, #e8c8ff 232deg, #a855f7 242deg,
        #7c3aed 258deg, #1a0a2e 280deg, #1a0a2e 360deg
    );
    animation: bp-rarity-border-spin 2.6s linear infinite;
    z-index: 0;
}

#intro-detail .bp-quality--purple.bp-slot--filled::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 4px;
    background:
        radial-gradient(ellipse at 50% 18%, rgba(192, 123, 255, 0.14), transparent 58%),
        radial-gradient(ellipse at 50% 100%, rgba(12, 4, 24, 0.55), rgba(6, 2, 14, 0.9));
    box-shadow: inset 0 0 14px rgba(168, 96, 255, 0.16);
    z-index: 1;
    pointer-events: none;
}

#intro-detail .bp-quality--gold.bp-slot--filled {
    border: none;
    overflow: hidden;
    isolation: isolate;
    background: transparent;
    box-shadow: 0 0 12px rgba(255, 196, 64, 0.38), 0 0 20px rgba(255, 170, 40, 0.28);
}

#intro-detail .bp-quality--gold.bp-slot--filled::before {
    content: '';
    position: absolute;
    inset: -120%;
    background: conic-gradient(
        from 0deg,
        #3d2800 0deg, #c8860a 20deg, #ffd54a 38deg, #fff0a8 48deg,
        #ffb300 58deg, #e69500 72deg, #3d2800 92deg, #3d2800 180deg,
        #c8860a 200deg, #ffd54a 218deg, #fff0a8 228deg, #ffb300 238deg,
        #e69500 252deg, #3d2800 272deg, #3d2800 360deg
    );
    animation: bp-rarity-border-spin 2.4s linear infinite;
    z-index: 0;
}

#intro-detail .bp-quality--gold.bp-slot--filled::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 4px;
    background:
        radial-gradient(ellipse at 50% 18%, rgba(255, 210, 80, 0.2), transparent 58%),
        radial-gradient(ellipse at 50% 100%, rgba(28, 16, 0, 0.5), rgba(10, 6, 0, 0.92));
    box-shadow: inset 0 0 14px rgba(255, 196, 64, 0.22);
    z-index: 1;
    pointer-events: none;
}

#intro-detail .bp-quality--purple.bp-slot--filled .bp-slot__icon,
#intro-detail .bp-quality--gold.bp-slot--filled .bp-slot__icon,
#intro-detail .bp-quality--purple.bp-slot--filled .quality-frame__text,
#intro-detail .bp-quality--gold.bp-slot--filled .quality-frame__text {
    position: relative;
    z-index: 2;
}

@keyframes bp-rarity-border-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #intro-detail .bp-quality--gold.bp-slot--filled::before,
    #intro-detail .bp-quality--purple.bp-slot--filled::before {
        animation: none;
        inset: 0;
    }
}

.feature-card--quality p {
    margin-top: 8px;
}

.info-banner {
    margin-top: 20px;
    padding: 14px 18px;
    background: rgba(0, 240, 255, 0.05);
    border-left: 3px solid var(--cyan);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-banner .mono {
    color: var(--cyan);
    font-size: 0.7rem;
    white-space: nowrap;
    padding-top: 2px;
}

.info-banner p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.55;
    min-width: 0;
    flex: 1 1 auto;
}

.info-banner a {
    color: var(--cyan);
    text-decoration: none;
}

.info-banner a:hover {
    text-decoration: underline;
}

.boss-banner {
    border-left-color: var(--magenta);
    background: rgba(255, 45, 149, 0.05);
}

.boss-banner .mono { color: var(--magenta); }

/* Elements */
.element-cycle {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.cycle-svg {
    width: 100%;
    max-width: 280px;
}

.cycle-ring {
    fill: none;
    stroke: var(--border);
    stroke-width: 1;
}

.cycle-pentagon {
    fill: none;
    stroke: rgba(0, 240, 255, 0.2);
    stroke-width: 1;
    stroke-dasharray: 6 4;
}

.cycle-node { stroke-width: 2; fill: var(--bg-card); }
.cycle-node.el-metal { stroke: var(--el-metal); }
.cycle-node.el-wood { stroke: var(--el-wood); }
.cycle-node.el-earth { stroke: var(--el-earth); }
.cycle-node.el-water { stroke: var(--el-water); }
.cycle-node.el-fire { stroke: var(--el-fire); }

.cycle-text {
    fill: var(--text);
    font-size: 18px;
    font-family: var(--font-ui);
    font-weight: 700;
}

.rule-box {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.rule-box h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.chain-text {
    color: var(--gold);
    font-size: 0.85rem;
    margin: 0 0 8px;
}

.rule-box p:last-child {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 2px;
    font-family: var(--font-mono);
}

.tag-danger {
    background: rgba(255, 77, 109, 0.15);
    color: var(--red);
    border: 1px solid rgba(255, 77, 109, 0.3);
}

.tag-safe {
    background: rgba(61, 220, 132, 0.12);
    color: var(--green);
    border: 1px solid rgba(61, 220, 132, 0.3);
}

.element-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.element-card {
    padding: 16px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid;
}

.element-portrait {
    margin: 0 auto 10px;
    width: 80px;
    height: 106px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.element-cards--text .element-symbol {
    font-size: 2.8rem;
    margin-bottom: 8px;
}

.element-cards--text .element-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.element-card.el-earth { border-top-color: var(--el-earth); }
.element-card.el-metal { border-top-color: var(--el-metal); }
.element-card.el-wood { border-top-color: var(--el-wood); }
.element-card.el-water { border-top-color: var(--el-water); }
.element-card.el-fire { border-top-color: var(--el-fire); }

.element-symbol {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.element-card.el-earth .element-symbol { color: var(--el-earth); }
.element-card.el-metal .element-symbol { color: var(--el-metal); }
.element-card.el-wood .element-symbol { color: var(--el-wood); }
.element-card.el-water .element-symbol { color: var(--el-water); }
.element-card.el-fire .element-symbol { color: var(--el-fire); }

.element-card h3 {
    margin: 0;
    font-size: 0.9rem;
}

.element-trait {
    margin: 4px 0 12px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.element-meta {
    margin: 0;
    font-size: 0.75rem;
}

.element-meta div {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-top: 1px solid var(--border);
}

.element-meta dt { color: var(--text-dim); margin: 0; }
.element-meta dd { margin: 0; color: var(--cyan); }

.element-skills {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.element-skills img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    image-rendering: pixelated;
}

/* Characters */
.char-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.char-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.char-tab:hover { border-color: var(--border-bright); color: var(--text); }

.char-tab.active {
    color: #fff;
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.char-tab.el-earth.active { border-color: var(--el-earth); box-shadow: 0 0 16px rgba(201, 166, 107, 0.3); }
.char-tab.el-metal.active { border-color: var(--el-metal); }
.char-tab.el-wood.active { border-color: var(--el-wood); }
.char-tab.el-water.active { border-color: var(--el-water); }
.char-tab.el-fire.active { border-color: var(--el-fire); }

.char-panel {
    display: none;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.char-panel.active { display: block; }

.char-panel.el-earth { border-left: 3px solid var(--el-earth); }
.char-panel.el-metal { border-left: 3px solid var(--el-metal); }
.char-panel.el-wood { border-left: 3px solid var(--el-wood); }
.char-panel.el-water { border-left: 3px solid var(--el-water); }
.char-panel.el-fire { border-left: 3px solid var(--el-fire); }

.char-panel__layout {
    display: flex;
    gap: 22px;
    align-items: stretch;
}

.char-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.char-body {
    flex-shrink: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.char-skills {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.char-skills__title {
    margin: 0 0 4px;
    font-size: 0.75rem;
    color: var(--text);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.skill-list--compact {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-height: 0;
}

.skill-list--compact .skill-item {
    grid-template-columns: 32px 1fr;
    gap: 5px;
    padding: 4px 6px;
    align-items: center;
    height: 100%;
    min-height: 0;
}

.skill-list--compact .skill-icon {
    width: 32px;
    height: 32px;
}

.skill-list--compact .skill-head {
    margin-bottom: 2px;
    gap: 4px;
}

.skill-list--compact .skill-head h4 {
    font-size: 0.75rem;
}

.skill-list--compact .skill-info p {
    font-size: 0.68rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-visual {
    position: relative;
    width: 300px;
    max-width: 100%;
    flex: 0 0 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.char-avatar {
    position: relative;
    width: 300px;
    max-width: 100%;
    height: 534px;
    flex: none;
    padding: 0;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0, 240, 255, 0.1), rgba(255, 45, 149, 0.08));
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.char-stage-tabs {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: nowrap;
}

.char-main-portrait,
.char-main-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.char-main-video {
    background: #000;
}

.char-main-portrait[hidden],
.char-main-video[hidden] {
    display: none;
}

.char-stage-btn {
    flex: 1;
    min-width: 0;
    padding: 5px 3px;
    border: 1px solid var(--border);
    background: var(--bg-deep);
    color: var(--text-dim);
    font-size: 0.72rem;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.char-stage-btn:hover,
.char-stage-btn.is-active {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
}

.char-stage-btn--video {
    flex: 1.2;
    border-color: rgba(255, 45, 149, 0.45);
    color: var(--magenta);
    font-family: var(--font-ui);
    letter-spacing: 0.04em;
}

.char-stage-btn--video:hover:not(:disabled),
.char-stage-btn--video.is-playing {
    border-color: var(--magenta);
    color: #fff;
    background: rgba(255, 45, 149, 0.16);
    box-shadow: 0 0 12px rgba(255, 45, 149, 0.25);
}

.char-stage-btn--video:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.char-video-hint {
    margin: 6px 0 0;
    padding: 6px 8px;
    border: 1px solid rgba(255, 45, 149, 0.35);
    background: rgba(255, 45, 149, 0.08);
    color: var(--magenta);
    font-size: 0.72rem;
    text-align: center;
}

.char-video-hint[hidden] {
    display: none;
}

.char-eyebrow {
    margin: 0 0 3px;
    font-size: 0.68rem;
    color: var(--magenta);
    letter-spacing: 0.06em;
}

.char-badge {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    font-size: 0.65rem;
    background: rgba(6, 8, 15, 0.88);
    border: 1px solid var(--border);
    white-space: nowrap;
    z-index: 1;
}

.char-body h3 {
    margin: 0 0 2px;
    font-size: 1.05rem;
    font-weight: 700;
}

.char-en {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 400;
}

.char-title {
    margin: 0;
    font-size: 0.78rem;
    color: var(--gold);
}

.char-school {
    margin: 2px 0 2px;
    font-size: 0.75rem;
    color: var(--magenta);
}

.char-subtitle {
    margin: 0 0 2px;
    font-size: 0.72rem;
    color: var(--cyan);
    opacity: 0.9;
}

.char-desc {
    margin: 0 0 4px;
    font-size: 0.78rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.char-stats-note {
    margin: 0;
    font-size: 0.58rem;
}

.char-stats--mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin: 0;
}

.char-stats--mini.char-stats {
    flex: none;
}

.char-stat {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    padding: 5px 3px;
    text-align: center;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--cyan);
    white-space: nowrap;
}

/* Skills */
.skill-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.skill-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.skill-tab:hover { border-color: var(--border-bright); color: var(--text); }

.skill-tab.active {
    color: #fff;
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.skill-tab.el-earth.active { border-color: var(--el-earth); box-shadow: 0 0 16px rgba(201, 166, 107, 0.3); }
.skill-tab.el-metal.active { border-color: var(--el-metal); }
.skill-tab.el-wood.active { border-color: var(--el-wood); }
.skill-tab.el-water.active { border-color: var(--el-water); }
.skill-tab.el-fire.active { border-color: var(--el-fire); }

.skill-tab img {
    display: none;
}

.skill-header {
    display: block;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--cyan);
    background: rgba(0, 240, 255, 0.05);
}

.skill-header h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.skill-header p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.skill-header.el-earth { border-color: var(--el-earth); background: rgba(201, 166, 107, 0.08); }
.skill-header.el-metal { border-color: var(--el-metal); background: rgba(240, 192, 64, 0.08); }
.skill-header.el-wood { border-color: var(--el-wood); background: rgba(61, 220, 132, 0.08); }
.skill-header.el-water { border-color: var(--el-water); background: rgba(77, 184, 255, 0.08); }
.skill-header.el-fire { border-color: var(--el-fire); background: rgba(255, 77, 109, 0.08); }

.skill-panel { display: none; }
.skill-panel.active { display: block; }

.skill-list { display: flex; flex-direction: column; gap: 12px; }

.skill-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 18px;
    align-items: start;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.skill-icon {
    width: 88px;
    height: 88px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.skill-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.skill-head h4 {
    margin: 0;
    font-size: 1rem;
}

.skill-type {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--magenta);
    padding: 2px 8px;
    border: 1px solid var(--border);
}

.skill-passive .skill-type {
    color: var(--gold);
    border-color: rgba(240, 192, 64, 0.35);
}

.skill-info p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-dim);
}

.skill-passive {
    border-color: rgba(240, 192, 64, 0.3);
    background: rgba(240, 192, 64, 0.04);
}

.skill-type {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--magenta);
    text-align: center;
}

.skill-passive .skill-type { color: var(--gold); }

.skill-info h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
}

.skill-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.skill-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--cyan);
    text-align: right;
}

/* Monsters */
.level-legend {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.level-legend--compact {
    grid-template-columns: repeat(3, 1fr);
}

.level-legend--compact .legend-item strong {
    margin-bottom: 4px;
}

.level-legend--compact .legend-item span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-item--blue strong { color: #4db8ff; }
.legend-item--boss strong { color: var(--gold); }

.legend-item {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.8rem;
}

.legend-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--cyan);
}

.legend-item span {
    display: block;
    color: var(--text-dim);
    margin-top: 2px;
}

.tier-title {
    margin: 0 0 12px;
    font-family: var(--font-ui);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gold);
}

.monster-tier { margin-bottom: 28px; }

.monster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.monster-grid--lg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.monster-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.monster-card--lg {
    container-type: inline-size;
    container-name: monster-card;
    --monster-art-w: clamp(150px, 42cqi, 220px);
    display: flex;
    align-items: flex-start;
    padding: 0;
    overflow: hidden;
    border-left: 4px solid var(--cyan);
}

.monster-card__left {
    position: relative;
    flex: 0 0 var(--monster-art-w);
    width: var(--monster-art-w);
}

.monster-card__sizer {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    visibility: hidden;
    pointer-events: none;
}

.monster-card--boss {
    border-left-color: var(--gold);
}

.monster-art {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: #080e16;
    cursor: zoom-in;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.monster-card--lg .monster-art {
    position: absolute;
    inset: 0;
    height: 100%;
    border-right: 1px solid var(--border);
}

.monster-card:not(.monster-card--lg) .monster-art {
    aspect-ratio: 3 / 4;
    border-right: 1px solid var(--border);
}

.monster-art:hover {
    box-shadow: inset 0 0 24px rgba(0, 240, 255, 0.08);
}

.monster-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    padding: 6px;
    box-sizing: border-box;
    display: block;
}

.monster-card--lg .monster-body {
    flex: 1 1 auto;
    min-width: 0;
    height: calc(var(--monster-art-w) * 4 / 3);
    max-height: calc(var(--monster-art-w) * 4 / 3);
    overflow: hidden;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
}

@supports not (height: 1cqi) {
    .monster-card--lg {
        --monster-art-w: 200px;
    }
}

.monster-body-footer {
    flex-shrink: 0;
    margin-top: auto;
}

.monster-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    flex-shrink: 0;
}

.monster-head h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.monster-skill-block {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.monster-skill-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    min-width: 0;
    font-size: 0.72rem;
    line-height: 1.35;
}

.monster-skill-type {
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 0.66rem;
    font-family: var(--font-mono);
    padding: 1px 6px;
    border: 1px solid var(--border);
}

.monster-skill-row--active .monster-skill-type {
    color: var(--magenta);
}

.monster-skill-row--passive .monster-skill-type {
    color: var(--gold);
    border-color: rgba(240, 192, 64, 0.35);
}

.monster-skill-name {
    flex: 1;
    min-width: 0;
    color: var(--text-dim);
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.monster-card.el-earth { border-left-color: var(--el-earth); }
.monster-card.el-metal { border-left-color: var(--el-metal); }
.monster-card.el-wood { border-left-color: var(--el-wood); }
.monster-card.el-water { border-left-color: var(--el-water); }
.monster-card.el-fire { border-left-color: var(--el-fire); }

.monster-card--boss.el-earth,
.monster-card--boss.el-metal,
.monster-card--boss.el-wood,
.monster-card--boss.el-water,
.monster-card--boss.el-fire {
    border-left-color: var(--gold);
}

.monster-portrait {
    width: 88px;
    height: 88px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0a1018;
}

.monster-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.monster-body h4 {
    margin: 0 0 6px;
    font-size: 0.92rem;
}

.monster-lv {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-dim);
    flex-shrink: 0;
}

.monster-intro {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--text-dim);
    overflow: hidden;
}

.monster-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin: 0 0 6px;
}

.monster-stats span {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    padding: 5px 3px;
    text-align: center;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--cyan);
}

.monster-skills {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.table-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    image-rendering: pixelated;
    vertical-align: middle;
}

.thumb-cell {
    width: 48px;
    padding: 6px !important;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: rgba(0, 240, 255, 0.06);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.04);
}

.name-cell {
    font-weight: 600;
    white-space: nowrap;
}

.el-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.72rem;
    border: 1px solid;
    border-radius: 2px;
}

.el-tag.el-earth { color: var(--el-earth); border-color: var(--el-earth); }
.el-tag.el-metal { color: var(--el-metal); border-color: var(--el-metal); }
.el-tag.el-wood { color: var(--el-wood); border-color: var(--el-wood); }
.el-tag.el-water { color: var(--el-water); border-color: var(--el-water); }
.el-tag.el-fire { color: var(--el-fire); border-color: var(--el-fire); }

/* Rarity cards — 上三下二 */
.rarity-cards-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.rarity-cards-grid .rarity-card:nth-child(1) { grid-column: 1 / 3; }
.rarity-cards-grid .rarity-card:nth-child(2) { grid-column: 3 / 5; }
.rarity-cards-grid .rarity-card:nth-child(3) { grid-column: 5 / 7; }
.rarity-cards-grid .rarity-card:nth-child(4) { grid-column: 2 / 4; }
.rarity-cards-grid .rarity-card:nth-child(5) { grid-column: 4 / 6; }

.rarity-card .rarity-char {
    font-size: 1rem;
    margin-right: 2px;
}

.rarity-card--compact {
    padding: 10px 10px 8px;
}

.rarity-card--compact .rarity-card__head {
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 4px;
}

.rarity-card--compact .rarity-card__head h3 {
    font-size: 0.82rem;
    line-height: 1.25;
}

.rarity-card--compact .item-req {
    margin-top: 0;
    font-size: 0.62rem;
}

.rarity-meta--compact {
    font-size: 0.68rem;
}

.rarity-meta--compact div {
    grid-template-columns: 36px 1fr;
    gap: 4px;
    padding: 3px 0;
}

.rarity-meta--compact dt {
    font-size: 0.64rem;
}

.rarity-meta--compact dd {
    line-height: 1.35;
}

#gear-quality .tier-table {
    font-size: 0.76rem;
    table-layout: fixed;
}

#gear-quality .tier-table th,
#gear-quality .tier-table td {
    padding: 6px 10px;
    vertical-align: top;
}

#gear-quality .tier-table th:nth-child(1),
#gear-quality .tier-table td:nth-child(1) {
    width: 12%;
}

#gear-quality .tier-table th:nth-child(2),
#gear-quality .tier-table td:nth-child(2) {
    width: 18%;
    white-space: nowrap;
}

#gear-quality .tier-table th:nth-child(3),
#gear-quality .tier-table td:nth-child(3) {
    width: 22%;
    white-space: nowrap;
}

#gear-quality .tier-table th:nth-child(4),
#gear-quality .tier-table td:nth-child(4) {
    width: 48%;
    line-height: 1.45;
    word-break: keep-all;
}

/* Weapon quality strip */
.weapon-quality-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.weapon-quality-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 52px;
    margin: 0;
    padding: 6px 8px;
    border-top: 2px solid;
    background: rgba(0, 0, 0, 0.15);
}

.weapon-quality-chip img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    image-rendering: pixelated;
}

.weapon-quality-chip figcaption {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.weapon-quality-chip.rarity-white { border-top-color: var(--r-white); color: var(--r-white); }
.weapon-quality-chip.rarity-green { border-top-color: var(--r-green); color: var(--r-green); }
.weapon-quality-chip.rarity-blue { border-top-color: var(--r-blue); color: var(--r-blue); }
.weapon-quality-chip.rarity-purple { border-top-color: var(--r-purple); color: var(--r-purple); }
.weapon-quality-chip.rarity-gold { border-top-color: var(--r-gold); color: var(--r-gold); }

.item-grid--weapons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.item-grid--catalog {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.item-grid--gold {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.item-grid--gold-armor {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.item-card--gold {
    background: linear-gradient(180deg, rgba(240, 192, 64, 0.1) 0%, var(--bg-card) 40%);
    box-shadow: 0 0 16px rgba(240, 192, 64, 0.08);
}

.gold-showcase {
    margin-top: 8px;
}

.item-card--compact {
    padding: 10px 12px;
}

.item-icon-wrap--sm {
    height: 72px;
    margin-bottom: 8px;
}

.item-icon-wrap--sm .item-icon {
    width: 64px;
    height: 64px;
}

.item-card--compact h4 {
    font-size: 0.82rem;
    margin: 4px 0 2px;
}

.item-card--compact .item-desc {
    font-size: 0.72rem;
    line-height: 1.4;
}

.item-card--compact .item-type {
    font-size: 0.6rem;
}

/* Items */
.rarity-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.rarity-pill {
    padding: 8px 14px;
    font-size: 0.8rem;
    border: 1px solid;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rarity-pill small {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    opacity: 0.8;
}

.rarity-white { color: var(--r-white); border-color: var(--r-white); background: rgba(184, 192, 204, 0.06); }
.rarity-green { color: var(--r-green); border-color: var(--r-green); background: rgba(61, 220, 132, 0.06); }
.rarity-blue { color: var(--r-blue); border-color: var(--r-blue); background: rgba(77, 184, 255, 0.06); }
.rarity-purple { color: var(--r-purple); border-color: var(--r-purple); background: rgba(176, 106, 255, 0.06); }
.rarity-gold { color: var(--r-gold); border-color: var(--r-gold); background: rgba(240, 192, 64, 0.08); }

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

.item-grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.item-card {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid;
    position: relative;
}

.item-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    margin-bottom: 10px;
}

.item-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.item-card.rarity-white { border-top-color: var(--r-white); }
.item-card.rarity-green { border-top-color: var(--r-green); }
.item-card.rarity-blue { border-top-color: var(--r-blue); }
.item-card.rarity-purple { border-top-color: var(--r-purple); }
.item-card.rarity-gold { border-top-color: var(--r-gold); }

.item-type {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.item-card h4 {
    margin: 6px 0 4px;
    font-size: 0.95rem;
}

.item-stats {
    margin: 0 0 8px;
    font-size: 0.8rem;
    color: var(--cyan);
}

.item-desc {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-dim);
}

.item-req {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--gold);
}

.affix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.affix-col {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.affix-col h4 {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: var(--cyan);
}

.affix-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.affix-col li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
}

.affix-col li:last-child { border-bottom: none; }

.affix-name { font-weight: 600; grid-column: 1; }
.affix-type {
    font-size: 0.7rem;
    color: var(--magenta);
    grid-column: 2;
    grid-row: 1;
}
.affix-desc {
    grid-column: 1 / -1;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.fusion-box {
    margin-top: 24px;
    padding: 18px;
    border: 1px dashed var(--border-bright);
    background: rgba(0, 240, 255, 0.03);
}

.fusion-box h4 {
    margin: 0 0 8px;
    color: var(--gold);
    font-family: var(--font-mono);
}

.fusion-box p {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.fusion-box p:last-child { margin-bottom: 0; }

.resonance-box {
    border-style: solid;
    border-color: rgba(240, 192, 64, 0.35);
    background: rgba(240, 192, 64, 0.04);
}

.resonance-box h4 { color: var(--gold); }

/* Equipment layout */
.equip-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.equip-layout__figure {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 10px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    align-content: center;
}

.equip-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid var(--border);
    text-align: center;
}

.equip-slot img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: pixelated;
}

.equip-slot strong {
    font-size: 0.82rem;
}

.equip-slot span {
    font-size: 0.65rem;
    color: var(--cyan);
}

.equip-slot--helmet { grid-column: 2; grid-row: 1; }
.equip-slot--weapon { grid-column: 1; grid-row: 2; }
.equip-slot--armor { grid-column: 2; grid-row: 2; }
.equip-slot--gloves { grid-column: 3; grid-row: 2; }
.equip-slot--shoes { grid-column: 2; grid-row: 3; }
.equip-slot--amulet { grid-column: 2; grid-row: 4; }

.equip-slot-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.equip-slot-card {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.equip-slot-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.equip-slot-card__head img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    object-fit: contain;
    image-rendering: pixelated;
}

.equip-slot-card h3 {
    margin: 0;
    font-size: 0.95rem;
}

.equip-slot-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-dim);
}

.equip-hidden {
    margin-top: 8px !important;
    font-size: 0.78rem !important;
}

.equip-hidden .mono {
    color: var(--magenta);
    margin-right: 4px;
}

/* Weapon tabs */
.weapon-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.weapon-tabs--grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.weapon-tabs--grid .weapon-tab {
    text-align: center;
    padding: 10px 6px;
    font-size: 0.85rem;
    line-height: 1.25;
}

.weapon-tab {
    padding: 8px 14px;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.weapon-tab:hover {
    border-color: var(--border-bright);
    color: var(--text);
}

.weapon-tab.active {
    color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.weapon-panel {
    display: none;
}

.weapon-panel.active {
    display: block;
}

.weapon-intro {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: var(--text-dim);
    padding: 12px 16px;
    border-left: 3px solid var(--gold);
    background: rgba(240, 192, 64, 0.04);
}

/* Armor tabs */
.armor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.armor-tabs--grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.armor-tabs--grid .armor-tab {
    text-align: center;
    padding: 10px 6px;
    font-size: 0.85rem;
    line-height: 1.25;
}

.armor-tab {
    padding: 8px 14px;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.armor-tab:hover {
    border-color: var(--border-bright);
    color: var(--text);
}

.armor-tab.active {
    color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.armor-panel {
    display: none;
}

.armor-panel.active {
    display: block;
}

.armor-intro {
    margin: 0 0 16px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Gameplay flow */
.gameplay-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
}

.gameplay-step {
    display: grid;
    grid-template-columns: 48px 64px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.gameplay-step__body {
    min-width: 0;
}

.gameplay-step__num {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--magenta);
}

.gameplay-step__icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.gameplay-step h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--cyan);
}

.gameplay-step p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.gameplay-arrow {
    text-align: center;
    color: var(--border-bright);
    font-size: 1.2rem;
    padding: 4px 0;
}

/* Rarity detail cards */
.rarity-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.rarity-card {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid;
}

.rarity-card.rarity-white { border-top-color: var(--r-white); }
.rarity-card.rarity-green { border-top-color: var(--r-green); }
.rarity-card.rarity-blue { border-top-color: var(--r-blue); }
.rarity-card.rarity-purple { border-top-color: var(--r-purple); }
.rarity-card.rarity-gold { border-top-color: var(--r-gold); }

.rarity-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.rarity-card__head h3 {
    margin: 0;
    font-size: 0.95rem;
}

.rarity-meta {
    margin: 0;
    font-size: 0.78rem;
}

.rarity-meta div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid var(--border);
}

.rarity-meta dt {
    margin: 0;
    color: var(--text-dim);
}

.rarity-meta dd {
    margin: 0;
    color: var(--text);
}

.rarity-note {
    margin: 12px 0 0;
    font-size: 0.78rem;
    color: var(--text-dim);
    font-style: italic;
}

.tier-table .name-cell {
    color: var(--gold);
}

/* Floating dock — mobile nav + back to top */
.float-dock {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.float-dock__panel,
.float-dock__actions,
.float-dock__btn {
    pointer-events: auto;
}

.float-dock__panel {
    width: min(220px, calc(100vw - 28px));
    overflow: visible;
    padding: 10px 0 8px;
    background: rgba(8, 14, 28, 0.96);
    border: 1px solid var(--border-bright);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(0, 240, 255, 0.08);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.float-dock__panel[hidden] {
    display: none;
}

.float-dock__label {
    padding: 0 14px 8px;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--magenta);
    letter-spacing: 0.14em;
    border-left: 2px solid var(--magenta);
    margin: 0 12px 8px;
}

.float-dock__panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.float-dock__panel a {
    display: block;
    padding: 8px 16px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.35;
    border-left: 2px solid transparent;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.float-dock__panel a:hover,
.float-dock__panel a.active {
    color: var(--cyan);
    border-left-color: var(--cyan);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1), transparent);
}

.float-dock__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.float-dock__locale--desktop {
    display: none;
}

.float-dock__locale-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    text-decoration: none;
    letter-spacing: 0.06em;
}

.float-dock__btn {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-bright);
    background: rgba(8, 14, 28, 0.94);
    color: var(--cyan);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}

.float-dock__btn:hover {
    background: rgba(0, 240, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    color: #fff;
}

.float-dock__btn--top {
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    width: 44px;
}

.float-dock__btn--menu[aria-expanded="true"] {
    border-color: var(--magenta);
    color: var(--magenta);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.site-footer__title {
    margin: 0 0 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

.site-footer__meta {
    margin: 0 0 8px;
    font-size: 0.68rem;
}

.site-footer__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.site-footer__actions .btn {
    margin-top: 0;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 20px;
    margin-top: 20px;
}

.site-footer__links a {
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--cyan);
    text-decoration: none;
}

.site-footer__links a:hover {
    text-decoration: underline;
}

.site-footer__credit {
    margin: 16px 0 0;
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.06em;
}

.site-footer__contract {
    margin: 12px auto 0;
    padding-top: 12px;
    max-width: 300px;
    border-top: 1px solid var(--border);
    line-height: 1.35;
}

.site-footer__contract-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.58rem;
    color: var(--text-dim);
    letter-spacing: 0.03em;
}

.site-footer__contract-addr {
    display: inline-block;
    font-size: 9px;
    line-height: 1.4;
    letter-spacing: 0;
    color: var(--cyan);
    text-decoration: none;
    word-break: break-all;
    opacity: 0.88;
}

.site-footer__contract-addr.mono {
    font-size: 9px;
    letter-spacing: 0;
}

.site-footer__contract-addr:hover {
    text-decoration: underline;
    opacity: 1;
}

.site-footer__logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 22px;
}

.site-footer__logo-link {
    display: inline-flex;
    line-height: 0;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
}

.site-footer__logo-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.site-footer__logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.hidden {
    display: none;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(2, 6, 14, 0.88);
    cursor: pointer;
}

.lightbox__panel {
    position: relative;
    z-index: 1;
    max-width: min(520px, 92vw);
    width: 100%;
    padding: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border-bright);
    box-shadow: 0 0 48px rgba(0, 240, 255, 0.2);
}

.lightbox__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: rgba(6, 8, 15, 0.9);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.lightbox__caption {
    margin: 12px 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Responsive */
@media (max-width: 1100px) {
    .element-cards { grid-template-columns: repeat(3, 1fr); }
    .level-legend--compact {
        grid-template-columns: 1fr;
    }

    .level-legend { grid-template-columns: repeat(2, 1fr); }
    .rarity-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
        padding: 0 16px 32px;
    }

    .side-nav {
        position: static;
        height: auto;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
        margin-bottom: 8px;
    }

    .side-nav__avatar-wrap {
        width: min(64.8vw, 216px);
        margin: 0 auto 20px;
        padding: 0 0 16px;
    }

    .side-nav__avatar {
        max-width: none;
    }

    .side-nav__menu {
        padding-top: 12px;
    }

    .side-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .side-nav a {
        padding: 6px 10px;
        border: 1px solid var(--border);
        border-left: 1px solid var(--border);
        font-size: 0.95rem;
        max-width: 100%;
    }

    .nav-footer { display: none; }

    .side-nav__menu {
        display: none;
    }

    .side-nav {
        padding-bottom: 4px;
        margin-bottom: 4px;
        border-bottom: none;
    }

    body {
        padding-bottom: 80px;
    }

    .float-dock__panel,
    .float-dock__btn--menu {
        display: block;
    }

    .content { padding-left: 0; }

    /* NFT embed: keep content column full-bleed and balanced vs float-dock */
    .site--nft .layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .content--nft {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 48px;
    }

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

    .hero-video__media {
        max-height: 220px;
    }

    .feature-grid { grid-template-columns: 1fr; }

    .feature-cats {
        justify-content: center;
    }

    .feature-cat {
        flex: 0 1 calc(20% - 6px);
        min-width: 58px;
    }

    .feature-equip-grid {
        max-width: 300px;
        gap: 4px;
    }

    .feature-battle-icons {
        gap: 8px 10px;
    }

    .quality-progression .bp-slot,
    .feature-battle-icon .bp-slot {
        width: 46px;
        height: 46px;
    }

    .quality-frame__text {
        font-size: 1rem;
    }

    .quality-step-arrow {
        font-size: 0.85rem;
    }

    .element-cycle { grid-template-columns: 1fr; }

    .element-cards { grid-template-columns: repeat(2, 1fr); }

    .affix-grid { grid-template-columns: 1fr; }

    .equip-layout { grid-template-columns: 1fr; }

    .equip-slot-details { grid-template-columns: 1fr; }

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

    .rarity-cards-grid .rarity-card:nth-child(n) {
        grid-column: auto;
    }

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

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

    .item-grid--weapons,
    .item-grid--catalog,
    .item-grid--gold,
    .item-grid--gold-armor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gameplay-step {
        grid-template-columns: 40px 48px minmax(0, 1fr);
        gap: 12px;
    }
}

@media (min-width: 901px) {
    .float-dock__panel,
    .float-dock__btn--menu {
        display: none !important;
    }

    .float-dock__locale--desktop {
        display: inline-flex;
    }

    .float-dock__actions {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 600px) {
    html {
        overflow-x: hidden;
        max-width: 100%;
    }

    body {
        overflow-x: hidden;
        max-width: 100%;
    }

    .layout {
        padding-left: 10px;
        padding-right: 10px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .site--nft .layout {
        padding-left: 10px;
        padding-right: 10px;
    }

    .content--nft {
        padding-bottom: 72px;
        overflow-x: visible;
    }

    .content,
    .side-nav,
    .panel,
    .site-header {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Avoid clipping NFT glow/badge asymmetrically inside panels */
    .content--nft,
    .content--nft .panel,
    .content--nft .nft-showcase,
    .content--nft .nft-hero {
        overflow-x: visible;
    }

    .header-inner { padding: 0 10px; }
    .brand-title { font-size: 1.1rem; }
    .brand-sub { display: none; }
    .panel { padding: 20px 14px; }
    .rarity-cards-grid { grid-template-columns: 1fr; }

    .hero-title {
        font-size: 1.45rem;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .hero-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .section-head {
        text-align: center;
    }

    .section-head .section-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .side-nav__avatar-wrap {
        width: min(84.6vw, 342px);
        margin-left: auto;
        margin-right: auto;
    }

    .eyebrow {
        font-size: clamp(0.5rem, 2.8vw, 0.65rem);
        letter-spacing: 0.06em;
    }

    .side-nav__avatar {
        max-width: none;
    }

    .side-nav ul {
        justify-content: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .feature-card {
        text-align: center;
    }

    .feature-cats {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 4px;
        width: 100%;
    }

    .feature-cat {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }

    .feature-cat__portrait {
        width: 100%;
        max-width: 48px;
        height: auto;
        aspect-ratio: 1;
    }

    .feature-cat__element {
        font-size: 0.82rem;
    }

    .feature-cat__name {
        font-size: 0.62rem;
    }

    .feature-equip-grid {
        max-width: 280px;
        gap: 4px;
    }

    .feature-equip-slot__frame {
        max-width: 44px;
        padding: 3px;
    }

    .feature-equip-slot__frame img {
        width: 36px;
        height: 36px;
    }

    .feature-card--quality .quality-progression {
        display: grid;
        grid-template-columns: repeat(5, auto);
        grid-template-rows: auto auto;
        justify-content: center;
        justify-items: center;
        gap: 8px 6px;
    }

    .feature-card--quality .quality-progression > :nth-child(1) { grid-row: 1; grid-column: 1; }
    .feature-card--quality .quality-progression > :nth-child(2) { grid-row: 1; grid-column: 2; }
    .feature-card--quality .quality-progression > :nth-child(3) { grid-row: 1; grid-column: 3; }
    .feature-card--quality .quality-progression > :nth-child(4) { grid-row: 1; grid-column: 4; }
    .feature-card--quality .quality-progression > :nth-child(5) { grid-row: 1; grid-column: 5; }
    .feature-card--quality .quality-progression > :nth-child(6) { display: none; }
    .feature-card--quality .quality-progression > :nth-child(7) { grid-row: 2; grid-column: 2; }
    .feature-card--quality .quality-progression > :nth-child(8) { grid-row: 2; grid-column: 3; }
    .feature-card--quality .quality-progression > :nth-child(9) { grid-row: 2; grid-column: 4; }

    .element-cycle {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cycle-diagram {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .cycle-svg {
        max-width: min(280px, 88vw);
        margin: 0 auto;
    }

    .cycle-rules {
        width: 100%;
    }

    .rule-box {
        text-align: center;
    }

    .char-panel__layout {
        flex-direction: column;
    }

    .char-visual {
        flex: none;
        width: 100%;
        min-height: 0;
    }

    .char-main {
        min-height: 0;
    }

    .char-skills {
        flex: none;
    }

    .skill-list--compact {
        flex: none;
        grid-template-rows: none;
    }

    .skill-list--compact .skill-item {
        height: auto;
    }

    .char-avatar {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 300 / 534;
    }

    .skill-list--compact {
        grid-template-columns: 1fr;
    }

    .monster-grid--lg {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .monster-card--lg {
        container-type: normal;
        flex-direction: column;
        align-items: stretch;
    }

    .monster-card__left {
        width: min(56vw, 200px);
        margin: 0 auto;
        flex: none;
    }

    .monster-card--lg .monster-body {
        width: 100%;
        height: auto;
        max-height: none;
        min-height: 0;
        overflow: visible;
        padding: 12px 4px 14px;
    }

    .monster-body-footer {
        margin-top: 8px;
    }

    .monster-intro {
        flex: 0 0 auto;
        font-size: 0.78rem;
        line-height: 1.5;
        overflow: visible;
        display: block;
    }

    .monster-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .skill-item {
        grid-template-columns: 72px 1fr;
    }

    .skill-icon {
        width: 72px;
        height: 72px;
    }

    .section-desc--flow {
        align-items: center;
        text-align: center;
    }

    .section-desc--flow .section-desc__line {
        font-size: clamp(0.62rem, 2.85vw, 0.82rem);
        letter-spacing: -0.01em;
    }

    .gameplay-step {
        grid-template-columns: 32px 44px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .gameplay-step p {
        font-size: 0.78rem;
    }

    #gear-quality .tier-table {
        font-size: 0.64rem;
    }

    #gear-quality .tier-table th,
    #gear-quality .tier-table td {
        padding: 5px 4px;
    }

    .info-banner {
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px;
    }

    .info-banner p {
        font-size: 0.8rem;
        word-break: keep-all;
    }

    .element-cards { grid-template-columns: 1fr; }
    .level-legend { grid-template-columns: 1fr; }
}

/* English — longer copy, slightly tighter type & flexible labels */
html[lang^="en"] {
    --site-en-scale: 0.94;
}

html[lang^="en"] .char-desc,
html[lang^="en"] .monster-intro,
html[lang^="en"] .skill-info p {
    line-height: 1.45;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

html[lang^="en"] .monster-head h4 {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

html[lang^="en"] .monster-intro {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    line-height: 1.4;
}

html[lang^="en"] .char-desc,
html[lang^="en"] .skill-list--compact .skill-info p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

html[lang^="en"] .char-subtitle {
    white-space: nowrap;
    overflow: hidden;
}

html[lang^="en"] .monster-skill-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.3;
}

html[lang^="en"] .monster-skill-row {
    align-items: center;
}

html[lang^="en"] .brand-sub,
html[lang^="en"] .section-desc,
html[lang^="en"] .hero-lead,
html[lang^="en"] .item-desc,
html[lang^="en"] .feature-card p,
html[lang^="en"] .gameplay-step p,
html[lang^="en"] .info-banner p,
html[lang^="en"] .fusion-box p,
html[lang^="en"] .rule-box p {
    font-size: calc(1em * var(--site-en-scale));
    line-height: 1.55;
    word-break: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
}

html[lang^="en"] .side-nav a,
html[lang^="en"] .float-dock__panel a {
    font-size: 0.95rem;
    line-height: 1.35;
    white-space: normal;
}

html[lang^="en"] .weapon-tab,
html[lang^="en"] .armor-tab,
html[lang^="en"] .char-tab {
    font-size: 0.72rem;
    line-height: 1.25;
    white-space: normal;
    min-height: 2.6em;
    padding: 8px 6px;
}

html[lang^="en"] .monster-skill-type {
    flex-shrink: 0;
    min-width: 3.2em;
}

html[lang^="en"] .rarity-meta--compact dd,
html[lang^="en"] .element-meta dd {
    text-align: right;
    white-space: normal;
}

html[lang^="en"] .char-title {
    white-space: normal;
}

html[lang^="en"] .btn-play-entry {
    font-size: 0.78rem;
    padding: 10px 12px;
    white-space: normal;
    text-align: center;
    max-width: 11rem;
}

html[lang^="en"] .header-actions .btn-play-entry {
    max-width: 9.5rem;
}

html[lang^="en"] .level-legend--compact .legend-item span {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
}

html[lang^="en"] .item-card h4 {
    font-size: 0.88rem;
    line-height: 1.25;
}

html[lang^="en"] .sub-title {
    line-height: 1.3;
}
