:root {
    color-scheme: light;
    --bg: #f4f6fa;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --text: #111827;
    --muted: #667085;
    --line: #d9e2ec;
    --line-soft: #edf1f5;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --blue: #2563eb;
    --blue-soft: #eff6ff;
    --green-soft: #ecfdf3;
    --amber: #b45309;
    --amber-soft: #fff7ed;
    --danger: #b42318;
    --shadow: 0 18px 48px rgba(16, 24, 40, 0.10);
}

/* Public portal framework */
.portal-site {
    background:
        radial-gradient(circle at 12% 8%, rgba(125, 211, 252, 0.42), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(253, 186, 116, 0.34), transparent 28%),
        linear-gradient(180deg, #fffdf7 0%, #effaf7 46%, #eef6ff 100%);
    color: #172033;
}

.portal-nav {
    max-width: none;
}

.portal-main {
    margin: 0 auto;
    max-width: 1180px;
    padding: 34px 22px 72px;
}

.portal-hero {
    align-items: center;
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    min-height: 520px;
}

.refined-hero {
    gap: 44px;
}

.portal-hero-copy h1,
.portal-page-head h1 {
    color: #14213d;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    margin: 14px 0 18px;
}

.portal-hero-copy p,
.portal-page-head p {
    color: #486178;
    font-size: 18px;
    line-height: 1.85;
    margin: 0;
    max-width: 680px;
}

.hero-search {
    align-items: center;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 999px;
    box-shadow: 0 18px 42px rgba(45, 64, 89, 0.12);
    display: flex;
    gap: 10px;
    margin-top: 26px;
    max-width: 680px;
    padding: 8px;
}

.hero-search input {
    background: transparent;
    border: 0;
    color: #172033;
    flex: 1;
    font-size: 16px;
    min-width: 0;
    outline: 0;
    padding: 12px 14px;
}

.hero-search button {
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
    padding: 13px 20px;
}

.hero-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-quick-links a,
.filter-chip-row a {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #25556b;
    font-size: 14px;
    font-weight: 800;
    padding: 9px 13px;
}

.hero-quick-links a:hover,
.filter-chip-row a:hover {
    background: #ffffff;
    border-color: rgba(20, 184, 166, 0.45);
    text-decoration: none;
}

.portal-showcase {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(240, 253, 250, 0.84));
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(45, 64, 89, 0.16);
    min-height: 420px;
    overflow: hidden;
    padding: 24px;
    position: relative;
}

.portal-showcase img {
    display: block;
    height: auto;
    margin: 10px auto 0;
    max-width: 100%;
    width: 420px;
}

.showcase-stat {
    background: #ffffff;
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: 18px;
    bottom: 22px;
    box-shadow: 0 18px 42px rgba(45, 64, 89, 0.12);
    left: 22px;
    padding: 16px 18px;
    position: absolute;
}

.showcase-stat span,
.showcase-stat small {
    color: #64748b;
    display: block;
    font-size: 13px;
    font-weight: 800;
}

.showcase-stat strong {
    color: #0f766e;
    display: block;
    font-size: 34px;
    line-height: 1;
    margin: 5px 0;
}

.portal-orbit {
    display: grid;
    gap: 16px;
}

.orbit-card,
.portal-card,
.portal-panel,
.metric-card,
.portal-empty {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 22px 60px rgba(45, 64, 89, 0.12);
}

.orbit-card {
    border-radius: 20px;
    padding: 22px;
}

.orbit-card.primary {
    background: linear-gradient(135deg, #ffffff 0%, #e0f7ff 48%, #fff7d6 100%);
    transform: translateX(-22px);
}

.orbit-card span,
.portal-card span,
.metric-card span {
    color: #0f766e;
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.orbit-card strong {
    color: #172033;
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
}

.orbit-card small,
.metric-card small {
    color: #64748b;
    font-size: 14px;
}

.portal-section {
    margin-top: 54px;
}

.portal-section.compact {
    margin-top: 28px;
}

.portal-grid {
    display: grid;
    gap: 18px;
}

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

.three-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-card {
    border-radius: 18px;
    color: #172033;
    display: flex;
    flex-direction: column;
    min-height: 230px;
    padding: 22px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-card {
    overflow: hidden;
    position: relative;
}

.category-card::after {
    background: rgba(255, 255, 255, 0.58);
    border-radius: 999px;
    content: "";
    height: 74px;
    position: absolute;
    right: -24px;
    top: -22px;
    width: 74px;
}

.portal-card:hover {
    box-shadow: 0 26px 68px rgba(45, 64, 89, 0.18);
    text-decoration: none;
    transform: translateY(-4px);
}

.portal-card h2,
.portal-card h3,
.portal-panel h2 {
    color: #172033;
    font-size: 22px;
    line-height: 1.2;
    margin: 0 0 12px;
}

.portal-card p,
.portal-panel p,
.portal-empty p {
    color: #5b6f83;
    line-height: 1.7;
    margin: 0;
}

.portal-card strong {
    color: #0f766e;
    display: block;
    margin-top: auto;
}

.portal-card > a {
    font-weight: 800;
    margin-top: auto;
}

.portal-card.small {
    min-height: 160px;
}

.accent-mint {
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}

.accent-coral {
    background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
}

.accent-amber {
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.accent-blue {
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.accent-violet {
    background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%);
}

.portal-band {
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(224, 247, 255, 0.88));
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 22px;
    display: flex;
    gap: 28px;
    justify-content: space-between;
    margin-top: 56px;
    padding: 30px;
}

.portal-band h2 {
    color: #14213d;
    margin: 0 0 10px;
}

.portal-band p {
    color: #52677d;
    line-height: 1.75;
    margin: 0;
    max-width: 780px;
}

.portal-band a,
.portal-search button {
    background: #14b8a6;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    padding: 13px 20px;
}

.portal-page-head {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 253, 250, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 26px;
    box-shadow: 0 22px 58px rgba(45, 64, 89, 0.11);
    padding: 34px;
}

.wiki-head {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.88) 40%, rgba(255, 255, 255, 0.1) 76%),
        linear-gradient(180deg, rgba(15, 118, 110, 0) 54%, rgba(15, 23, 42, 0.24) 100%),
        url("fairy-wiki-hero-v2.webp");
    background-position: center;
    background-size: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 24px 68px rgba(26, 64, 92, 0.18);
    min-height: 440px;
    overflow: hidden;
    padding: 48px;
    position: relative;
}

.wiki-head::after {
    background: linear-gradient(90deg, #ffd166, #ff7aa2, #38bdf8, #5ee0a8);
    bottom: 0;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
}

.wiki-head .game-kicker {
    background: #fff3bf;
    border: 2px solid #ffd166;
    border-radius: 999px;
    color: #805200;
    display: inline-flex;
    padding: 8px 13px;
}

.wiki-head h1 {
    color: #10233f;
    max-width: 560px;
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
}

.wiki-head p:not(.game-kicker) {
    color: #23445f;
    font-weight: 750;
    max-width: 650px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.wiki-head .portal-search {
    max-width: 650px;
}

.wiki-head .portal-search input {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: 0 14px 30px rgba(26, 64, 92, 0.12);
}

.wiki-head .filter-chip-row {
    max-width: 720px;
}

.wiki-head .filter-chip-row a {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: 0 12px 26px rgba(26, 64, 92, 0.1);
}

.knowledge-page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    max-width: 780px;
}

.knowledge-page-nav a {
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(125, 166, 190, 0.34);
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(26, 64, 92, 0.1);
    color: #17324d;
    display: inline-flex;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    text-decoration: none;
}

.knowledge-page-nav a span {
    color: #0f766e;
    font-size: 11px;
    font-weight: 950;
}

.knowledge-page-nav a strong {
    color: inherit;
    font-size: 14px;
    font-weight: 950;
}

.knowledge-page-nav a:hover {
    background: #ffffff;
    border-color: rgba(20, 184, 166, 0.46);
}

.knowledge-page-nav a.active {
    background: linear-gradient(135deg, #ffffff, #e0fbff);
    border-color: rgba(20, 184, 166, 0.62);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.18);
    color: #075985;
}

.knowledge-page-nav a.active span {
    color: #b45309;
}

.portal-page-head h1 {
    font-size: clamp(38px, 6vw, 66px);
}

.portal-search {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    max-width: 720px;
}

.filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.portal-search input {
    background: #ffffff;
    border: 1px solid #dbe7ef;
    border-radius: 999px;
    color: #172033;
    flex: 1;
    font-size: 16px;
    min-width: 0;
    padding: 14px 18px;
}

.card-meta {
    align-items: baseline;
    display: flex;
    gap: 8px;
    margin: auto 0 14px;
}

.card-meta strong {
    color: #0f766e;
    font-size: 34px;
    margin: 0;
}

.card-meta small {
    color: #64748b;
}

.category-count {
    align-items: baseline;
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.category-count strong {
    color: #0f766e;
    font-size: 42px;
}

.category-count span {
    color: #64748b;
}

.split-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
}

.portal-panel {
    border-radius: 20px;
    padding: 26px;
}

.portal-panel.soft {
    background: rgba(240, 253, 250, 0.78);
}

.step-list {
    color: #334155;
    display: grid;
    gap: 12px;
    line-height: 1.7;
    margin: 18px 0 0;
    padding-left: 22px;
}

.metric-row {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
}

.metric-card {
    border-radius: 18px;
    padding: 24px;
}

.metric-card strong {
    color: #172033;
    display: block;
    font-size: 32px;
    margin-bottom: 6px;
}

.roadmap-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
}

.source-note {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 18px;
    display: flex;
    gap: 16px;
    margin-top: 28px;
    padding: 18px 20px;
}

.source-note strong {
    color: #0f766e;
    flex: 0 0 auto;
}

.source-note p {
    color: #52677d;
    line-height: 1.6;
    margin: 0;
}

.market-switcher {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 24px;
}

.market-switcher a {
    background: rgba(255, 255, 255, 0.82);
    border: 2px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(45, 64, 89, 0.1);
    color: #172033;
    padding: 18px 20px;
    text-decoration: none;
}

.market-switcher a span {
    color: #0f766e;
    display: block;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
    margin-bottom: 7px;
}

.market-switcher a strong {
    display: block;
    font-size: 24px;
}

.market-switcher a.active {
    background: linear-gradient(135deg, #ffffff 0%, #e6fff7 100%);
    border-color: #14b8a6;
}

.data-shell {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(45, 64, 89, 0.12);
    margin-top: 24px;
    overflow: hidden;
}

.data-toolbar {
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.data-subhead {
    align-items: center;
    background: rgba(240, 253, 250, 0.62);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    color: #52677d;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 800;
    gap: 8px 16px;
    justify-content: space-between;
    padding: 8px 16px;
}

.data-toolbar h2 {
    color: #172033;
    margin: 0;
}

.silver-search {
    align-items: center;
    display: flex;
    gap: 6px;
    min-width: min(420px, 100%);
}

.silver-search input {
    background: #ffffff;
    border: 1px solid #dbe7ef;
    border-radius: 999px;
    color: #172033;
    flex: 1;
    font-size: 13px;
    min-width: 0;
    padding: 8px 11px;
}

.silver-search button {
    background: #14b8a6;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    flex: 0 0 auto;
    font-weight: 900;
    padding: 8px 12px;
}

.category-filter {
    background: rgba(240, 253, 250, 0.58);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 9px 16px;
}

.category-filter a {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    gap: 6px;
    padding: 6px 10px;
    text-decoration: none;
}

.category-filter a.active {
    background: #14b8a6;
    border-color: #14b8a6;
    color: #ffffff;
}

.category-filter strong {
    background: rgba(15, 118, 110, 0.1);
    border-radius: 999px;
    font-size: 11px;
    min-width: 22px;
    padding: 2px 6px;
    text-align: center;
}

.category-filter a.active strong {
    background: rgba(255, 255, 255, 0.22);
}

.toolbar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-controls button {
    background: #eef6ff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #1d4ed8;
    cursor: default;
    font-weight: 900;
    padding: 9px 13px;
}

.preview-table-wrap {
    overflow-x: auto;
}

.preview-table {
    border-collapse: collapse;
    min-width: 680px;
    width: 100%;
}

.preview-table th,
.preview-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    color: #334155;
    font-size: 13px;
    line-height: 1.35;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.preview-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    padding-bottom: 7px;
    padding-top: 7px;
    text-transform: uppercase;
}

.silver-items-table {
    min-width: 980px;
}

.silver-items-table td strong {
    color: #172033;
    display: block;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.silver-items-table td small {
    color: #64748b;
    display: block;
    font-size: 11px;
    line-height: 1.25;
    margin-top: 3px;
}

.silver-item-main {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    min-width: 150px;
}

.silver-item-icon {
    align-items: center;
    background: linear-gradient(180deg, #ffffff, #eefaf7);
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(26, 64, 92, 0.1);
    display: inline-flex;
    flex: 0 0 auto;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.silver-item-icon img {
    display: block;
    height: 30px;
    image-rendering: auto;
    object-fit: contain;
    width: 30px;
}

.silver-item-copy {
    display: block;
    min-width: 0;
}

.category-badge {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #1d4ed8;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    margin-top: 4px;
    padding: 2px 6px;
}

.price-cell {
    color: #b45309 !important;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.attr-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 320px;
}

.attr-chip {
    align-items: baseline;
    background: #eefcf8;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 999px;
    color: #0f766e;
    display: inline-flex;
    font-size: 11px;
    font-weight: 850;
    gap: 3px;
    line-height: 1;
    padding: 4px 6px;
    white-space: nowrap;
}

.attr-chip b {
    color: #164e63;
    font-weight: 950;
}

.muted-cell {
    color: #94a3b8;
}

.table-empty {
    padding: 22px 0;
    text-align: center;
}

.table-empty strong {
    color: #172033;
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.table-empty p {
    color: #64748b;
    margin: 0;
}

.silver-card-list {
    display: none;
}

.stats-head {
    background:
        linear-gradient(110deg, rgba(255, 255, 255, 0.94) 0%, rgba(240, 253, 250, 0.78) 58%, rgba(255, 251, 235, 0.9) 100%),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.22), transparent 34%);
}

.stats-shell,
.stats-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    box-shadow: 0 20px 54px rgba(45, 64, 89, 0.11);
}

.stats-shell {
    margin-top: 24px;
    padding: 18px;
}

.stats-toolbar,
.stats-panel-head {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.stats-toolbar h2,
.stats-panel-head h2 {
    color: #172033;
    margin: 0;
}

.stats-range {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    display: inline-flex;
    gap: 4px;
    padding: 4px;
}

.stats-range a {
    border-radius: 999px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
    padding: 7px 11px;
    text-decoration: none;
}

.stats-range a.active {
    background: #14b8a6;
    color: #ffffff;
}

.stats-card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.stats-metric {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 16px;
}

.stats-metric span,
.stats-metric small,
.stats-bar-row small,
.stats-device-list small,
.stats-ref-list small {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.stats-metric strong {
    color: #0f766e;
    display: block;
    font-size: 34px;
    font-weight: 950;
    line-height: 1;
    margin: 8px 0;
}

.stats-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    margin-top: 18px;
}

.stats-panel {
    padding: 18px;
}

.stats-panel.wide {
    min-width: 0;
}

.stats-bars,
.stats-device-list,
.stats-ref-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.stats-bar-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 52px minmax(0, 1fr) 54px 58px;
}

.stats-bar-row span {
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.stats-bar-row strong {
    color: #172033;
    font-size: 14px;
    text-align: right;
}

.stats-bar-track,
.stats-mini-bar {
    background: #e2e8f0;
    border-radius: 999px;
    display: block;
    height: 10px;
    overflow: hidden;
}

.stats-bar-track i,
.stats-mini-bar i,
.stats-device-list i {
    background: linear-gradient(90deg, #14b8a6, #f59e0b);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 3px;
}

.stats-device-list div {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr auto;
    padding: 10px 12px;
}

.stats-device-list span {
    color: #172033;
    font-weight: 950;
    text-transform: capitalize;
}

.stats-device-list strong {
    color: #0f766e;
}

.stats-device-list i {
    grid-column: 1 / -1;
    height: 7px;
}

.stats-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
}

.stats-table {
    border-collapse: collapse;
    min-width: 520px;
    width: 100%;
}

.stats-table th,
.stats-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    color: #334155;
    font-size: 13px;
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.stats-table th {
    color: #64748b;
    font-size: 12px;
    font-weight: 950;
}

.stats-table a,
.stats-ref-list a {
    color: #0f766e;
    font-weight: 850;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.stats-mini-bar {
    height: 6px;
    margin-top: 7px;
    max-width: 260px;
}

.stats-ref-list div {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
}

.stats-ref-list strong {
    color: #b45309;
    font-size: 18px;
}

.stats-latest {
    margin-top: 18px;
}

.stats-empty {
    color: #64748b;
    font-weight: 850;
    margin: 0;
}

.pagination-bar {
    align-items: center;
    background: rgba(248, 250, 252, 0.86);
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    gap: 7px;
    justify-content: flex-end;
    padding: 10px 16px;
}

.pagination-bar a,
.pagination-bar .disabled,
.pagination-bar .page-status {
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    padding: 6px 10px;
}

.pagination-bar a {
    background: #14b8a6;
    color: #ffffff;
    text-decoration: none;
}

.pagination-bar .disabled {
    background: #e2e8f0;
    color: #94a3b8;
}

.pagination-bar .page-status {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #334155;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    padding: 6px 10px;
}

.status-pill.pending {
    background: #fff7ed;
    color: #b45309;
}

.status-pill.ready {
    background: #ecfdf5;
    color: #047857;
}

.portal-empty {
    border-radius: 18px;
    grid-column: 1 / -1;
    padding: 28px;
}

.portal-empty h2 {
    margin-top: 0;
}

@media (max-width: 1040px) {
    .portal-hero,
    .split-layout,
    .roadmap-grid,
    .market-switcher {
        grid-template-columns: 1fr;
    }

    .data-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .orbit-card.primary {
        transform: none;
    }
}

@media (max-width: 720px) {
    .portal-main {
        padding: 22px 14px 54px;
    }

    .portal-hero {
        min-height: 0;
    }

    .portal-hero-copy h1,
    .portal-page-head h1 {
        font-size: 38px;
    }

    .portal-hero-copy p,
    .portal-page-head p {
        font-size: 16px;
    }

    .portal-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-nav nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .five-grid,
    .three-grid,
    .metric-row {
        grid-template-columns: 1fr;
    }

    .portal-band,
    .portal-search,
    .hero-search,
    .data-toolbar,
    .source-note {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-page-head,
    .portal-panel,
    .portal-band {
        padding: 22px;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, #eef3f8 0, #f8fafc 280px, #f4f6fa 100%);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 14px max(24px, calc((100vw - 1120px) / 2));
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    gap: 12px;
}

.brand:hover,
.nav-actions a:hover {
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: #111827;
    border-radius: 8px;
    color: #ffffff;
    display: inline-flex;
    font-size: 18px;
    font-weight: 900;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.brand strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
}

.brand small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.nav-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.nav-actions a,
.logout-button {
    border-radius: 8px;
    color: #344054;
    font-size: 14px;
    min-height: 38px;
    padding: 9px 12px;
}

.nav-actions a:first-child {
    background: #e7f6f3;
    color: var(--primary-dark);
    font-weight: 800;
}

.admin-link {
    border: 1px solid transparent;
}

.admin-link:hover,
.logout-button:hover {
    background: #ffffff;
    border-color: var(--line);
}

.user-chip {
    background: #f2f4f7;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #344054;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 11px;
}

.logout-form {
    margin: 0;
}

.logout-button {
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: none;
    cursor: pointer;
    font: inherit;
}

.page {
    margin: 0 auto;
    max-width: 1120px;
    padding: 32px 24px 52px;
}

.eyebrow {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0 0 8px;
}

h1,
h2 {
    letter-spacing: 0;
    margin: 0;
}

h1 {
    font-size: 38px;
    line-height: 1.15;
}

h2 {
    font-size: 20px;
    line-height: 1.25;
}

.summary-copy {
    color: var(--muted);
    line-height: 1.7;
    margin: 10px 0 0;
}

.auth-page {
    align-items: center;
    display: grid;
    min-height: calc(100vh - 70px);
}

.login-shell {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    margin: 0 auto;
    max-width: 820px;
    overflow: hidden;
    width: 100%;
}

.password-shell {
    max-width: 860px;
}

.single-panel {
    margin: 0 auto;
    max-width: 460px;
    width: 100%;
}

.login-aside {
    background:
        linear-gradient(135deg, #0f766e 0%, #111827 100%);
    color: #ffffff;
    min-height: 430px;
    padding: 38px;
}

.login-aside .eyebrow {
    color: #a7f3d0;
}

.login-aside h1 {
    font-size: 34px;
}

.login-aside p {
    color: #d1fae5;
    line-height: 1.8;
    margin: 14px 0 0;
}

.login-meter {
    display: grid;
    gap: 10px;
    margin-top: 52px;
}

.login-meter span {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    height: 9px;
}

.login-meter span:nth-child(1) {
    width: 85%;
}

.login-meter span:nth-child(2) {
    width: 62%;
}

.login-meter span:nth-child(3) {
    width: 38%;
}

.login-panel {
    padding: 38px;
}

.login-panel form {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

.login-panel label,
.stack-form label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    gap: 7px;
}

.form-error,
.message-error {
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 8px;
    color: var(--danger);
    font-size: 14px;
    line-height: 1.6;
    padding: 10px 12px;
}

.errorlist {
    color: var(--danger);
    font-size: 13px;
    line-height: 1.5;
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
}

.done-actions {
    margin: 24px 0 0;
}

.primary-link {
    align-items: center;
    background: var(--primary);
    border-radius: 8px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 900;
    min-height: 44px;
    padding: 0 18px;
}

.primary-link:hover {
    background: var(--primary-dark);
    color: #ffffff;
    text-decoration: none;
}

input,
select,
button {
    border-radius: 8px;
    font: inherit;
}

input,
select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text);
    min-height: 46px;
    outline: none;
    padding: 10px 12px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
    width: 100%;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

button {
    background: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 12px 22px rgba(15, 118, 110, 0.20);
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
    min-height: 46px;
    padding: 0 20px;
}

button:hover {
    background: var(--primary-dark);
}

.dashboard-head {
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 360px;
    margin-bottom: 18px;
    overflow: hidden;
    padding: 30px;
}

.head-copy p:last-child {
    color: #475467;
    font-size: 16px;
    line-height: 1.8;
    margin: 12px 0 0;
}

.stat-grid {
    display: grid;
    gap: 10px;
}

.head-stat {
    background: #111827;
    border-radius: 8px;
    color: #ffffff;
    display: grid;
    min-height: 94px;
    padding: 16px;
}

.head-stat span,
.head-stat small {
    color: #cbd5e1;
    font-size: 13px;
}

.head-stat strong {
    align-self: center;
    font-size: 34px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.message {
    border-radius: 8px;
    font-weight: 800;
    line-height: 1.6;
    padding: 12px 14px;
}

.message-success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.message-info {
    background: #eff8ff;
    border: 1px solid #b2ddff;
    color: #175cd3;
}

.workbench {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.tool-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-height: 390px;
    padding: 24px;
    position: relative;
}

.tool-card::before {
    border-radius: 8px 8px 0 0;
    content: "";
    height: 5px;
    left: -1px;
    position: absolute;
    right: -1px;
    top: -1px;
}

.tool-card-create::before {
    background: var(--primary);
}

.tool-card-query::before {
    background: var(--blue);
}

.tool-heading {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
}

.tool-heading p {
    color: var(--muted);
    line-height: 1.6;
    margin: 7px 0 0;
}

.step {
    align-items: center;
    background: #e7f6f3;
    border: 1px solid #bfddd7;
    border-radius: 8px;
    color: var(--primary-dark);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 48px;
}

.tool-card-query .step {
    background: var(--blue-soft);
    border-color: #c7d7fe;
    color: #1d4ed8;
}

.stack-form {
    display: grid;
    gap: 16px;
}

.stack-form button {
    justify-self: start;
    margin-top: 2px;
}

.inline-filter {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1fr) 150px 150px 220px auto;
    padding: 18px;
}

.inline-filter label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    gap: 7px;
}

.query-panel {
    margin-bottom: 18px;
}

.data-detail,
.admin-data-grid {
    margin-bottom: 18px;
}

.admin-data-grid {
    align-items: start;
}

.admin-data-grid .table-wrap {
    min-width: 0;
}

.admin-data-grid table {
    min-width: 620px;
}

.result-band {
    border-radius: 8px;
    margin-top: 20px;
    padding: 18px;
}

.result-label {
    display: block;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 8px;
}

.result-band strong {
    display: block;
    font-size: 24px;
    line-height: 1.35;
}

.result-band p {
    line-height: 1.7;
    margin: 8px 0 0;
}

.result-active {
    background: var(--green-soft);
    border: 1px solid #abefc6;
    color: #067647;
}

.result-inactive {
    background: var(--amber-soft);
    border: 1px solid #fed7aa;
    color: #c2410c;
}

.result-waiting {
    background: var(--panel-soft);
    border: 1px dashed #cbd5e1;
    color: var(--muted);
}

.table-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.table-title {
    align-items: center;
    background: var(--panel-soft);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 18px;
}

.table-title span {
    color: var(--muted);
    font-size: 13px;
}

.collapsible-table > summary.table-title {
    cursor: pointer;
    list-style: none;
}

.collapsible-table > summary.table-title::-webkit-details-marker {
    display: none;
}

.collapsible-table > summary.table-title::after {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #344054;
    content: "收起";
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 10px;
}

.collapsible-table:not([open]) > summary.table-title {
    border-bottom: 0;
}

.collapsible-table:not([open]) > summary.table-title::after {
    content: "展开";
}

table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 940px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: 15px 16px;
    text-align: left;
    white-space: nowrap;
}

th {
    background: #fbfdff;
    color: #344054;
    font-size: 13px;
    font-weight: 900;
}

tbody tr:hover {
    background: #f8fbfb;
}

tr:last-child td {
    border-bottom: 0;
}

.record-code {
    background: #e7f6f3;
    border: 1px solid #cce7e3;
    border-radius: 999px;
    color: var(--primary-dark);
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    padding: 7px 10px;
}

.record-code-muted {
    background: #f2f4f7;
    border-color: var(--line);
    color: #667085;
}

.code-request-form,
.inline-action-form {
    display: inline-flex;
    margin: 0;
}

.inline-action-form + .inline-action-form {
    margin-left: 8px;
}

.code-request-form button,
.inline-action-form button {
    background: #e7f6f3;
    border: 1px solid #cce7e3;
    border-radius: 999px;
    box-shadow: none;
    color: var(--primary-dark);
    font-size: 13px;
    min-height: 34px;
    padding: 7px 10px;
}

.inline-action-form button {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    padding-inline: 16px;
}

.inline-action-form button.danger-action {
    background: #ffffff;
    border-color: #fecdca;
    color: var(--danger);
}

.code-request-form button:hover,
.inline-action-form button:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.inline-action-form button.danger-action:hover {
    background: #fef3f2;
    color: var(--danger);
}

.status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    padding: 7px 10px;
}

.status-active {
    background: var(--green-soft);
    color: #067647;
}

.status-pending {
    background: #fef0c7;
    color: var(--amber);
}

.status-closed {
    background: #eaecf0;
    color: #475467;
}

.empty {
    color: var(--muted);
    padding: 42px 16px;
    text-align: center;
}

.back-link {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #344054;
    display: inline-flex;
    font-weight: 800;
    margin-bottom: 18px;
    min-height: 38px;
    padding: 0 13px;
}

.detail {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-title {
    align-items: start;
    background: var(--panel-soft);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 26px;
}

.status-update-form {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: 180px auto;
    min-width: 300px;
}

.status-update-form label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    gap: 7px;
}

.status-update-form button {
    min-height: 42px;
    padding-inline: 18px;
    white-space: nowrap;
}

dl {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 22px 26px 26px;
}

dt {
    color: var(--muted);
    display: block;
    font-size: 13px;
}

dl div {
    border-right: 1px solid var(--line-soft);
    padding: 4px 18px 4px 0;
}

dl div + div {
    padding-left: 18px;
}

dl div:last-child {
    border-right: 0;
}

dd {
    font-size: 18px;
    font-weight: 900;
    margin: 7px 0 0;
}

.note {
    border-top: 1px solid var(--line);
    padding: 24px 26px 28px;
}

.note p {
    color: #344054;
    line-height: 1.8;
    margin: 0;
}

@media (max-width: 820px) {
    .topbar,
    .dashboard-head,
    .detail-title {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        gap: 12px;
    }

    .status-update-form {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .nav-actions {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .dashboard-head,
    .workbench,
    .inline-filter,
    .login-shell,
    dl {
        grid-template-columns: 1fr;
    }

    .login-aside {
        min-height: auto;
    }

    .head-copy h1,
    .login-aside h1 {
        font-size: 32px;
    }

    .table-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    dl div,
    dl div + div {
        border-bottom: 1px solid var(--line-soft);
        border-right: 0;
        padding: 14px 0;
    }

    dl div:last-child {
        border-bottom: 0;
    }
}

.game-site {
    background:
        radial-gradient(circle at 18% 8%, rgba(253, 224, 71, 0.28), transparent 26%),
        radial-gradient(circle at 86% 12%, rgba(96, 165, 250, 0.22), transparent 30%),
        linear-gradient(180deg, #fff7ed 0%, #f0fdf4 42%, #eff6ff 100%);
    color: #182033;
}

.game-nav {
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(15, 118, 110, 0.16);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-between;
    padding: 18px max(24px, calc((100vw - 1120px) / 2));
    position: sticky;
    top: 0;
    z-index: 10;
}

.game-brand {
    align-items: center;
    color: #102033;
    display: inline-flex;
    gap: 10px;
}

.game-brand:hover,
.game-nav a:hover {
    text-decoration: none;
}

.game-brand span {
    align-items: center;
    background: linear-gradient(135deg, #facc15, #34d399);
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(52, 211, 153, 0.28);
    color: #102033;
    display: inline-flex;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 46px;
}

.game-brand strong {
    font-size: 18px;
}

.game-nav nav {
    display: flex;
    gap: 8px;
}

.game-nav nav a {
    border: 1px solid transparent;
    border-radius: 8px;
    color: #334155;
    font-weight: 800;
    padding: 9px 12px;
}

.game-nav nav a:hover {
    background: #ffffff;
    border-color: rgba(15, 118, 110, 0.18);
    color: #0f766e;
}

.game-site main {
    margin: 0 auto;
    max-width: 1120px;
    padding: 34px 24px 64px;
}

.game-hero {
    align-items: center;
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    min-height: calc(100vh - 150px);
}

.game-kicker {
    color: #0f766e;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0 0 12px;
}

.game-hero h1 {
    color: #111827;
    font-size: 54px;
    line-height: 1.06;
    margin: 0;
    max-width: 660px;
}

.game-hero-copy > p:not(.game-kicker) {
    color: #475569;
    font-size: 18px;
    line-height: 1.9;
    margin: 22px 0 0;
    max-width: 620px;
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.game-actions a {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-weight: 900;
    min-height: 46px;
    padding: 0 18px;
}

.game-actions a:first-child {
    background: #0f766e;
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.22);
    color: #ffffff;
}

.game-actions a:last-child {
    background: #ffffff;
    border: 1px solid rgba(15, 118, 110, 0.18);
    color: #0f766e;
}

.game-hero-art {
    position: relative;
}

.game-hero-art img {
    display: block;
    filter: drop-shadow(0 26px 46px rgba(15, 23, 42, 0.16));
    width: 100%;
}

.game-strip {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 6px 0 44px;
}

.game-strip div,
.guide-card,
.archive-panel {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: 8px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.game-strip div {
    padding: 18px;
}

.game-strip span,
.guide-card span,
.archive-stats span {
    color: #0f766e;
    display: block;
    font-size: 13px;
    font-weight: 900;
}

.game-strip strong {
    color: #111827;
    display: block;
    line-height: 1.5;
    margin-top: 8px;
}

.game-section {
    margin-bottom: 44px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2,
.archive-panel h2 {
    color: #111827;
    font-size: 30px;
}

.guide-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card {
    padding: 22px;
}

.guide-card h3 {
    color: #111827;
    font-size: 22px;
    margin: 12px 0 0;
}

.guide-card p,
.archive-panel p {
    color: #475569;
    line-height: 1.75;
    margin: 12px 0 0;
}

.archive-panel {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) 160px;
    padding: 26px;
}

.archive-stats {
    background: linear-gradient(135deg, #facc15, #34d399);
    border-radius: 8px;
    color: #102033;
    padding: 18px;
    text-align: center;
}

.archive-stats strong {
    display: block;
    font-size: 46px;
    line-height: 1;
}

.archive-stats span {
    color: #134e4a;
    margin-top: 8px;
}

@media (max-width: 860px) {
    .game-nav,
    .game-hero,
    .archive-panel {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .game-nav {
        flex-direction: column;
        gap: 12px;
    }

    .game-hero {
        min-height: auto;
        padding-top: 18px;
    }

    .game-hero h1 {
        font-size: 38px;
    }

    .game-strip,
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

/* Public homepage visual refresh: bright cartoon RPG knowledge site */
.portal-site {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.72) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.62) 1px, transparent 1px),
        linear-gradient(135deg, #fff8dc 0%, #e7fff2 34%, #e8f5ff 68%, #fff1f6 100%);
    background-size: 38px 38px, 38px 38px, auto;
}

.portal-nav {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 3px solid #ffd166;
    box-shadow: 0 12px 34px rgba(31, 72, 107, 0.1);
    padding: 14px max(22px, calc((100vw - 1180px) / 2));
    position: sticky;
    top: 0;
    z-index: 20;
}

.portal-nav .game-brand {
    align-items: center;
    display: inline-flex;
    gap: 10px;
}

.portal-nav .game-brand span {
    background: linear-gradient(135deg, #ffe45e, #67e8a5);
    border: 2px solid #0f766e;
    border-radius: 10px;
    color: #053b44;
    font-weight: 950;
    line-height: 1;
    padding: 7px 8px;
}

.portal-nav .game-brand strong {
    color: #10233f;
    font-size: 18px;
}

.portal-nav nav a {
    border-radius: 999px;
    color: #17324d;
    font-weight: 900;
    padding: 9px 14px;
}

.portal-nav nav a:hover {
    background: #e0f7ff;
    color: #075985;
    text-decoration: none;
}

.site-announcement {
    align-items: center;
    background: linear-gradient(90deg, #0ea5e9, #14b8a6 45%, #f59e0b);
    border: 3px solid #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(31, 72, 107, 0.13);
    color: #ffffff;
    display: flex;
    gap: 14px;
    justify-content: center;
    margin: 4px 0 24px;
    padding: 12px 18px;
    text-align: center;
}

.site-announcement span,
.site-announcement small {
    font-weight: 850;
}

.site-announcement strong {
    font-size: 20px;
}

.storybook-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(234, 255, 246, 0.9)),
        linear-gradient(90deg, rgba(255, 209, 102, 0.22), rgba(56, 189, 248, 0.2));
    border: 3px solid #ffffff;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(31, 72, 107, 0.14);
    min-height: 560px;
    padding: 44px;
    position: relative;
}

.storybook-hero::before {
    background: linear-gradient(90deg, #ffd166, #ff8fab, #38bdf8, #6ee7b7);
    border-radius: 999px;
    content: "";
    height: 8px;
    left: 34px;
    position: absolute;
    right: 34px;
    top: 22px;
}

.storybook-hero .game-kicker {
    background: #fff3bf;
    border: 2px solid #ffd166;
    border-radius: 999px;
    color: #805200;
    display: inline-flex;
    font-size: 13px;
    padding: 8px 13px;
}

.storybook-hero .portal-hero-copy h1 {
    color: #10233f;
    font-size: clamp(56px, 8vw, 104px);
    text-shadow: 0 5px 0 rgba(255, 255, 255, 0.85);
}

.storybook-hero .portal-hero-copy > p:not(.game-kicker) {
    color: #31506a;
    font-size: 19px;
    max-width: 720px;
}

.storybook-hero .portal-showcase {
    background: linear-gradient(180deg, #ffffff 0%, #e5fff2 48%, #dff4ff 100%);
    border: 3px solid #ffffff;
    border-radius: 24px;
    box-shadow: 0 22px 54px rgba(31, 72, 107, 0.16);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.primary-action,
.secondary-action {
    border-radius: 999px;
    font-weight: 950;
    padding: 13px 18px;
}

.primary-action {
    background: linear-gradient(135deg, #ffb703, #fb7185);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(251, 113, 133, 0.28);
}

.secondary-action {
    background: #ffffff;
    border: 2px solid #38bdf8;
    color: #075985;
}

.primary-action:hover,
.secondary-action:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.library-section {
    background: rgba(255, 255, 255, 0.62);
    border: 3px solid rgba(255, 255, 255, 0.82);
    border-radius: 26px;
    box-shadow: 0 22px 64px rgba(31, 72, 107, 0.1);
    padding: 28px;
}

.section-heading p:not(.game-kicker) {
    color: #52677d;
    line-height: 1.75;
    margin-top: -4px;
    max-width: 720px;
}

.category-card {
    border-width: 2px;
    min-height: 270px;
}

.category-mark {
    align-items: center;
    background: #ffffff;
    border: 2px solid rgba(15, 118, 110, 0.2);
    border-radius: 14px;
    color: #0f766e;
    display: inline-flex;
    font-size: 14px;
    height: 38px;
    justify-content: center;
    margin-bottom: 18px;
    width: 48px;
}

.accent-mint {
    background: linear-gradient(180deg, #ffffff 0%, #dfffee 100%);
}

.accent-coral {
    background: linear-gradient(180deg, #ffffff 0%, #ffe2e7 100%);
}

.accent-amber {
    background: linear-gradient(180deg, #ffffff 0%, #fff0bf 100%);
}

.accent-blue {
    background: linear-gradient(180deg, #ffffff 0%, #dcedff 100%);
}

.accent-violet {
    background: linear-gradient(180deg, #ffffff 0%, #eee7ff 100%);
}

@media (max-width: 820px) {
    .site-announcement,
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .storybook-hero {
        padding: 34px 20px 24px;
    }
}

/* Homepage redesign v4: game knowledge archive */
.kb-home-hero,
.kb-home-hero *,
.kb-section,
.kb-section *,
.kb-feature-row,
.kb-feature-row * {
    box-sizing: border-box;
}

.kb-home-hero {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 255, 249, 0.9)),
        linear-gradient(90deg, rgba(255, 226, 108, 0.2), rgba(76, 201, 240, 0.18));
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 18px;
    box-shadow: 0 26px 70px rgba(26, 64, 92, 0.14);
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    margin-top: 20px;
    min-height: 640px;
    overflow: hidden;
    padding: 46px;
    position: relative;
}

.kb-home-hero::before {
    background: linear-gradient(90deg, #ffd166, #ff7aa2, #38bdf8, #5ee0a8);
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.kb-eyebrow {
    color: #007c72;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.kb-hero-copy h1 {
    color: #10233f;
    font-size: 82px;
    line-height: 0.98;
    margin: 0 0 20px;
}

.kb-hero-lead {
    color: #385975;
    font-size: 19px;
    line-height: 1.85;
    margin: 0;
    max-width: 650px;
}

.kb-search {
    align-items: center;
    background: #ffffff;
    border: 2px solid rgba(20, 184, 166, 0.26);
    border-radius: 16px;
    box-shadow: 0 18px 38px rgba(26, 64, 92, 0.1);
    display: flex;
    gap: 10px;
    margin-top: 28px;
    max-width: 620px;
    padding: 8px;
}

.kb-search input {
    background: transparent;
    border: 0;
    color: #172033;
    flex: 1;
    font-size: 16px;
    min-width: 0;
    outline: 0;
    padding: 13px 14px;
}

.kb-search button,
.kb-button {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 950;
    justify-content: center;
    line-height: 1;
    padding: 15px 18px;
    text-decoration: none;
}

.kb-search button,
.kb-button.primary {
    background: linear-gradient(135deg, #10b981, #0ea5e9);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.24);
}

.kb-button.secondary {
    background: #fff7d6;
    border: 2px solid #ffd166;
    color: #684500;
}

.kb-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.kb-hero-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 30px;
    max-width: 640px;
}

.kb-hero-stats span {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    color: #466176;
    padding: 14px;
}

.kb-hero-stats strong {
    color: #0f766e;
    display: block;
    font-size: 28px;
    line-height: 1;
}

.kb-hero-art {
    background: #ffffff;
    border: 3px solid #ffffff;
    border-radius: 18px;
    box-shadow: 0 22px 56px rgba(26, 64, 92, 0.16);
    min-height: 490px;
    overflow: hidden;
    position: relative;
}

.kb-hero-carousel {
    height: 100%;
    min-height: 490px;
    position: relative;
}

.kb-hero-slide {
    animation: kbHeroCarousel 15s infinite;
    inset: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
}

.kb-hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.kb-hero-slide:nth-child(2) {
    animation-delay: 5s;
}

.kb-hero-slide:nth-child(3) {
    animation-delay: 10s;
}

.kb-hero-art img {
    display: block;
    height: 100%;
    min-height: 490px;
    object-fit: cover;
    width: 100%;
}

.kb-carousel-dots {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    bottom: 22px;
    box-shadow: 0 12px 28px rgba(26, 64, 92, 0.12);
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    position: absolute;
    right: 20px;
    z-index: 2;
}

.kb-carousel-dots span {
    animation: kbHeroDot 15s infinite;
    background: #cbd5e1;
    border-radius: 999px;
    display: block;
    height: 8px;
    width: 8px;
}

.kb-carousel-dots span:nth-child(1) {
    animation-delay: 0s;
}

.kb-carousel-dots span:nth-child(2) {
    animation-delay: 5s;
}

.kb-carousel-dots span:nth-child(3) {
    animation-delay: 10s;
}

@keyframes kbHeroCarousel {
    0%,
    28% {
        opacity: 1;
    }

    34%,
    94% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes kbHeroDot {
    0%,
    28% {
        background: #0f766e;
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
        width: 22px;
    }

    34%,
    94% {
        background: #cbd5e1;
        box-shadow: none;
        width: 8px;
    }

    100% {
        background: #0f766e;
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
        width: 22px;
    }
}

.kb-art-badge {
    background: #ffffff;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 14px;
    bottom: 18px;
    box-shadow: 0 16px 34px rgba(26, 64, 92, 0.16);
    left: 18px;
    padding: 14px 16px;
    position: absolute;
}

.kb-art-badge span {
    color: #64748b;
    display: block;
    font-size: 12px;
    font-weight: 850;
}

.kb-art-badge strong {
    color: #0f766e;
    display: block;
    font-size: 18px;
    margin-top: 3px;
}

.kb-section {
    margin-top: 46px;
}

.kb-section-head {
    max-width: 760px;
}

.kb-section-head h2,
.kb-feature-panel h2 {
    color: #10233f;
    font-size: 34px;
    line-height: 1.2;
    margin: 0 0 10px;
}

.kb-section-head p:not(.kb-eyebrow),
.kb-feature-panel p {
    color: #52677d;
    line-height: 1.75;
    margin: 0;
}

.kb-category-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 22px;
}

.kb-category-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(26, 64, 92, 0.1);
    color: #172033;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    overflow: hidden;
    padding: 20px;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kb-category-card::after {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    content: "";
    height: 86px;
    position: absolute;
    right: -32px;
    top: -30px;
    width: 86px;
}

.kb-category-card:hover {
    box-shadow: 0 24px 56px rgba(26, 64, 92, 0.16);
    text-decoration: none;
    transform: translateY(-4px);
}

.kb-card-index {
    align-items: center;
    background: #ffffff;
    border: 2px solid rgba(15, 118, 110, 0.18);
    border-radius: 12px;
    color: #0f766e;
    display: inline-flex;
    font-size: 14px;
    font-weight: 950;
    height: 38px;
    justify-content: center;
    margin-bottom: 18px;
    width: 48px;
}

.kb-card-kicker {
    color: #006f69;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.kb-category-card h3 {
    color: #10233f;
    font-size: 24px;
    line-height: 1.2;
    margin: 0 0 12px;
}

.kb-category-card p {
    color: #52677d;
    line-height: 1.68;
    margin: 0;
}

.kb-category-card strong {
    color: #087f76;
    display: block;
    font-size: 32px;
    line-height: 1;
    margin-top: auto;
}

.kb-category-card small {
    color: #52677d;
    font-size: 13px;
    font-weight: 800;
}

.kb-card-mint {
    background: linear-gradient(180deg, #ffffff 0%, #dfffee 100%);
}

.kb-card-coral {
    background: linear-gradient(180deg, #ffffff 0%, #ffe3e9 100%);
}

.kb-card-amber {
    background: linear-gradient(180deg, #ffffff 0%, #fff1bc 100%);
}

.kb-card-blue {
    background: linear-gradient(180deg, #ffffff 0%, #dff0ff 100%);
}

.kb-card-violet {
    background: linear-gradient(180deg, #ffffff 0%, #eee7ff 100%);
}

.kb-feature-row {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    margin-top: 46px;
}

.kb-feature-panel {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(26, 64, 92, 0.1);
    padding: 26px;
}

.kb-feature-panel.accent {
    background: linear-gradient(135deg, #ffffff 0%, #e5fff8 100%);
}

.kb-steps {
    color: #314b62;
    line-height: 1.95;
    margin: 18px 0 0;
    padding-left: 20px;
}

.kb-inline-link {
    color: #087f76;
    display: inline-flex;
    font-weight: 900;
    margin-top: 14px;
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (max-width: 980px) {
    .kb-home-hero,
    .kb-feature-row {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .kb-home-hero {
        padding: 28px 18px;
    }

    .kb-hero-copy h1 {
        font-size: 48px;
    }

    .kb-search,
    .kb-hero-actions,
    .kb-hero-stats {
        grid-template-columns: 1fr;
    }

    .kb-search,
    .kb-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .kb-category-grid {
        grid-template-columns: 1fr;
    }

    .kb-hero-art,
    .kb-hero-carousel,
    .kb-hero-art img {
        min-height: 360px;
    }

    .kb-art-badge {
        bottom: 14px;
        left: 14px;
        padding: 11px 12px;
    }

    .kb-art-badge strong {
        font-size: 15px;
    }

    .kb-carousel-dots {
        bottom: 16px;
        right: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kb-hero-slide,
    .kb-carousel-dots span {
        animation: none;
    }

    .kb-hero-slide:first-child {
        opacity: 1;
    }
}

/* Header redesign v5: stable brand lockup and aligned navigation */
.kb-site-header {
    align-items: center;
    background: #ffffff;
    border-bottom: 3px solid #f4c84f;
    box-shadow: 0 10px 28px rgba(31, 72, 107, 0.1);
    display: flex;
    justify-content: space-between;
    min-height: 86px;
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
}

.kb-site-header .kb-brand {
    align-items: center;
    color: #10233f;
    display: inline-flex;
    gap: 12px;
    min-height: 52px;
    text-decoration: none;
}

.kb-site-header .kb-brand .kb-brand-mark {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: inline-flex;
    flex: 0 0 auto;
    height: auto;
    justify-content: center;
    padding: 0;
    width: auto;
}

.kb-site-header .kb-brand .kb-brand-mark img {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: block;
    height: 64px;
    width: auto;
}

.kb-site-header .kb-brand .kb-brand-text {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    height: auto;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: auto;
}

.kb-site-header .kb-brand .kb-brand-text strong {
    color: #10233f;
    display: block;
    font-size: 20px;
    font-weight: 950;
    white-space: nowrap;
}

.kb-site-header .kb-brand .kb-brand-text small {
    color: #087f76;
    display: block;
    font-size: 13px;
    font-weight: 850;
    margin-top: 4px;
    white-space: nowrap;
}

.kb-site-header .kb-main-nav {
    align-items: center;
    display: flex;
    gap: 8px;
}

.kb-site-header .kb-main-nav a {
    align-items: center;
    border-radius: 999px;
    color: #17324d;
    display: inline-flex;
    font-size: 15px;
    font-weight: 900;
    min-height: 40px;
    padding: 0 15px;
    text-decoration: none;
}

.kb-site-header .kb-main-nav a:hover {
    background: #e0f7ff;
    color: #075985;
}

.kb-site-header .script-toggle {
    align-items: center;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 999px;
    display: inline-flex;
    gap: 3px;
    margin-left: 4px;
    padding: 4px;
}

.kb-site-header .script-toggle button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #47637d;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    min-width: 34px;
    padding: 0 10px;
}

.kb-site-header .script-toggle button.active {
    background: #0f766e;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
    color: #ffffff;
}

@media (max-width: 720px) {
    .kb-site-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px 22px;
    }

    .kb-site-header .kb-brand {
        justify-content: center;
    }

    .kb-site-header .kb-main-nav {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .kb-site-header .kb-main-nav a {
        font-size: 14px;
        justify-content: center;
        padding: 0 10px;
    }

    .kb-site-header .script-toggle {
        margin-left: 0;
    }
}

/* Background v7: ocean-blue Fairyland episode art direction */
.portal-site {
    background-color: #eafcff;
    background-image: url("fairy-ocean-background.svg");
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
}

.portal-main {
    position: relative;
}

/* Silver shelf overview: keep server tabs and summary metrics on one row */
.silver-overview-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
}

.silver-overview-row .market-switcher,
.silver-overview-row .metric-row {
    display: contents;
}

.silver-overview-row .market-switcher a,
.silver-overview-row .metric-card {
    border-radius: 14px;
    min-height: 104px;
    padding: 16px;
}

.silver-overview-row .market-switcher a span,
.silver-overview-row .metric-card span {
    font-size: 11px;
    margin-bottom: 6px;
}

.silver-overview-row .market-switcher a strong {
    font-size: 21px;
    line-height: 1.2;
}

.silver-overview-row .metric-card strong {
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 5px;
}

.silver-overview-row .metric-card small {
    display: block;
    font-size: 13px;
    line-height: 1.35;
}

.silver-head {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 38%, rgba(255, 255, 255, 0.1) 72%),
        linear-gradient(180deg, rgba(15, 118, 110, 0) 52%, rgba(15, 23, 42, 0.24) 100%),
        url("fairy-library-hero-market.webp");
    background-position: center;
    background-size: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 24px 68px rgba(26, 64, 92, 0.18);
    min-height: 360px;
    overflow: hidden;
    padding: 48px;
    position: relative;
}

.silver-head::after {
    background: linear-gradient(90deg, #ffd166, #ff7aa2, #38bdf8, #5ee0a8);
    bottom: 0;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
}

.silver-head .game-kicker {
    background: #fff3bf;
    border: 2px solid #ffd166;
    border-radius: 999px;
    color: #805200;
    display: inline-flex;
    padding: 8px 13px;
}

.silver-head h1 {
    color: #10233f;
    max-width: 520px;
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
}

.silver-head p:not(.game-kicker) {
    color: #23445f;
    font-weight: 750;
    max-width: 610px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.category-head.accent-coral {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 39%, rgba(255, 255, 255, 0.08) 74%),
        linear-gradient(180deg, rgba(15, 118, 110, 0) 54%, rgba(15, 23, 42, 0.2) 100%),
        url("fairy-quest-hero.webp");
    background-position: center;
    background-size: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 24px 68px rgba(26, 64, 92, 0.18);
    min-height: 360px;
    overflow: hidden;
    padding: 48px;
    position: relative;
}

.category-head.accent-coral::after {
    background: linear-gradient(90deg, #ffd166, #ff7aa2, #38bdf8, #5ee0a8);
    bottom: 0;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
}

.category-head.accent-coral .game-kicker {
    background: #fff3bf;
    border: 2px solid #ffd166;
    border-radius: 999px;
    color: #805200;
    display: inline-flex;
    padding: 8px 13px;
}

.category-head.accent-coral h1 {
    color: #10233f;
    max-width: 520px;
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
}

.category-head.accent-coral p:not(.game-kicker) {
    color: #23445f;
    font-weight: 750;
    max-width: 610px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.category-head.accent-coral .category-count {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(26, 64, 92, 0.14);
    display: inline-flex;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 15px;
}

.category-head.accent-mint {
    background:
        linear-gradient(270deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 38%, rgba(255, 255, 255, 0.08) 74%),
        linear-gradient(180deg, rgba(15, 118, 110, 0) 54%, rgba(15, 23, 42, 0.2) 100%),
        url("fairy-beasts-hero.webp");
    background-position: center;
    background-size: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 24px 68px rgba(26, 64, 92, 0.18);
    min-height: 360px;
    overflow: hidden;
    padding: 48px 44px 48px clamp(360px, 48%, 610px);
    position: relative;
}

.category-head.accent-mint::after {
    background: linear-gradient(90deg, #ffd166, #ff7aa2, #38bdf8, #5ee0a8);
    bottom: 0;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
}

.category-head.accent-mint .game-kicker {
    background: #e5fff2;
    border: 2px solid #5ee0a8;
    border-radius: 999px;
    color: #075f58;
    display: inline-flex;
    padding: 8px 13px;
}

.category-head.accent-mint h1 {
    color: #10233f;
    max-width: 520px;
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
}

.category-head.accent-mint p:not(.game-kicker) {
    color: #23445f;
    font-weight: 750;
    max-width: 610px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.category-head.accent-mint .category-count {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(26, 64, 92, 0.14);
    display: inline-flex;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 15px;
}

.category-head.accent-blue {
    background:
        linear-gradient(270deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 38%, rgba(255, 255, 255, 0.08) 74%),
        linear-gradient(180deg, rgba(37, 99, 235, 0) 54%, rgba(15, 23, 42, 0.2) 100%),
        url("fairy-maps-hero.webp");
    background-position: center;
    background-size: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 24px 68px rgba(26, 64, 92, 0.18);
    min-height: 360px;
    overflow: hidden;
    padding: 48px 44px 48px clamp(360px, 48%, 610px);
    position: relative;
}

.category-head.accent-blue::after {
    background: linear-gradient(90deg, #ffd166, #ff7aa2, #38bdf8, #5ee0a8);
    bottom: 0;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
}

.category-head.accent-blue .game-kicker {
    background: #eff6ff;
    border: 2px solid #93c5fd;
    border-radius: 999px;
    color: #1d4ed8;
    display: inline-flex;
    padding: 8px 13px;
}

.category-head.accent-blue h1 {
    color: #10233f;
    max-width: 520px;
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
}

.category-head.accent-blue p:not(.game-kicker) {
    color: #23445f;
    font-weight: 750;
    max-width: 610px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.category-head.accent-blue .category-count {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(26, 64, 92, 0.14);
    display: inline-flex;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 15px;
}

.category-head.accent-amber {
    background:
        linear-gradient(270deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 40%, rgba(255, 255, 255, 0.08) 74%),
        linear-gradient(180deg, rgba(180, 83, 9, 0) 54%, rgba(15, 23, 42, 0.22) 100%),
        url("fairy-equipment-hero.webp");
    background-position: center;
    background-size: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 24px 68px rgba(26, 64, 92, 0.18);
    min-height: 360px;
    overflow: hidden;
    padding: 48px 44px 48px clamp(360px, 48%, 610px);
    position: relative;
}

.category-head.accent-amber::after {
    background: linear-gradient(90deg, #ffd166, #ff7aa2, #38bdf8, #5ee0a8);
    bottom: 0;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
}

.category-head.accent-amber .game-kicker {
    background: #fff7ed;
    border: 2px solid #fdba74;
    border-radius: 999px;
    color: #9a3412;
    display: inline-flex;
    padding: 8px 13px;
}

.category-head.accent-amber h1 {
    color: #10233f;
    max-width: 520px;
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
}

.category-head.accent-amber p:not(.game-kicker) {
    color: #23445f;
    font-weight: 750;
    max-width: 610px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.category-head.accent-amber .category-count {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(26, 64, 92, 0.14);
    display: inline-flex;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 15px;
}

.category-head.accent-violet {
    background:
        linear-gradient(270deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 40%, rgba(255, 255, 255, 0.08) 74%),
        linear-gradient(180deg, rgba(124, 58, 237, 0) 54%, rgba(15, 23, 42, 0.2) 100%),
        url("fairy-gameplay-hero.webp");
    background-position: center;
    background-size: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 24px 68px rgba(26, 64, 92, 0.18);
    min-height: 360px;
    overflow: hidden;
    padding: 48px 44px 48px clamp(360px, 48%, 610px);
    position: relative;
}

.category-head.accent-violet::after {
    background: linear-gradient(90deg, #ffd166, #ff7aa2, #38bdf8, #5ee0a8);
    bottom: 0;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    right: 0;
}

.category-head.accent-violet .game-kicker {
    background: #f5f3ff;
    border: 2px solid #c4b5fd;
    border-radius: 999px;
    color: #6d28d9;
    display: inline-flex;
    padding: 8px 13px;
}

.category-head.accent-violet h1 {
    color: #10233f;
    max-width: 520px;
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.72);
}

.category-head.accent-violet p:not(.game-kicker) {
    color: #23445f;
    font-weight: 750;
    max-width: 610px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.category-head.accent-violet .category-count {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(26, 64, 92, 0.14);
    display: inline-flex;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 15px;
}

@media (max-width: 1180px) {
    .silver-overview-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .silver-overview-row {
        grid-template-columns: 1fr;
    }

    .silver-head {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 48%, rgba(255, 255, 255, 0.18) 100%),
            url("fairy-library-hero-market.webp");
        background-position: center;
        background-size: cover;
        min-height: 420px;
        padding: 28px 22px;
    }

    .silver-head h1 {
        max-width: 100%;
    }

    .silver-head p:not(.game-kicker) {
        max-width: 100%;
    }

    .data-shell {
        border-radius: 18px;
        margin-left: -6px;
        margin-right: -6px;
        overflow: hidden;
    }

    .data-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 14px;
    }

    .data-toolbar h2 {
        font-size: 22px;
    }

    .silver-search {
        align-items: stretch;
        flex-direction: column;
        min-width: 0;
        width: 100%;
    }

    .silver-search input,
    .silver-search button {
        font-size: 15px;
        min-height: 44px;
        width: 100%;
    }

    .category-filter {
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 14px;
        scrollbar-width: thin;
    }

    .category-filter a {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 7px 11px;
        white-space: nowrap;
    }

    .data-subhead {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        padding: 10px 14px;
    }

    .preview-table-wrap {
        display: none;
    }

    .silver-card-list {
        background: rgba(248, 250, 252, 0.72);
        display: grid;
        gap: 10px;
        padding: 12px;
    }

    .silver-item-card {
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(148, 163, 184, 0.24);
        border-radius: 14px;
        box-shadow: 0 12px 28px rgba(26, 64, 92, 0.1);
        padding: 11px;
    }

    .silver-card-head {
        align-items: flex-start;
        display: flex;
        gap: 10px;
        justify-content: space-between;
    }

    .silver-card-head .silver-item-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .silver-card-head .silver-item-copy strong {
        color: #172033;
        display: block;
        font-size: 15px;
        font-weight: 900;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .mobile-price {
        background: #fff7ed;
        border: 1px solid #fed7aa;
        border-radius: 999px;
        color: #b45309;
        flex: 0 0 auto;
        font-size: 14px;
        font-weight: 950;
        line-height: 1;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .mobile-attrs {
        margin-top: 10px;
        max-width: none;
    }

    .mobile-attrs .attr-chip {
        font-size: 12px;
        padding: 5px 7px;
    }

    .silver-card-meta {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin: 11px 0 0;
    }

    .silver-card-meta div {
        background: #f8fafc;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 10px;
        min-width: 0;
        padding: 7px 8px;
    }

    .silver-card-meta dt {
        color: #64748b;
        font-size: 11px;
        font-weight: 900;
        margin: 0 0 3px;
    }

    .silver-card-meta dd {
        color: #172033;
        font-size: 13px;
        font-weight: 850;
        line-height: 1.3;
        margin: 0;
        overflow-wrap: anywhere;
    }

    .silver-card-meta small {
        color: #64748b;
        display: block;
        font-size: 11px;
        margin-top: 2px;
    }

    .mobile-empty {
        background: #ffffff;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 14px;
    }

    .pagination-bar {
        justify-content: center;
        padding: 12px;
    }

    .stats-shell,
    .stats-panel {
        border-radius: 18px;
    }

    .stats-toolbar,
    .stats-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-range {
        overflow-x: auto;
        width: 100%;
    }

    .stats-card-grid,
    .stats-layout {
        grid-template-columns: 1fr;
    }

    .stats-metric strong {
        font-size: 30px;
    }

    .stats-bar-row {
        grid-template-columns: 44px minmax(0, 1fr) 42px;
    }

    .stats-bar-row small {
        grid-column: 2 / -1;
        margin-top: -8px;
    }

    .stats-table {
        min-width: 460px;
    }

    .category-head.accent-coral {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 48%, rgba(255, 255, 255, 0.2) 100%),
            url("fairy-quest-hero.webp");
        background-position: center;
        background-size: cover;
        min-height: 420px;
        padding: 28px 22px;
    }

    .category-head.accent-coral h1,
    .category-head.accent-coral p:not(.game-kicker) {
        max-width: 100%;
    }

    .category-head.accent-mint {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 48%, rgba(255, 255, 255, 0.2) 100%),
            url("fairy-beasts-hero.webp");
        background-position: center;
        background-size: cover;
        min-height: 420px;
        padding: 28px 22px;
    }

    .category-head.accent-mint h1,
    .category-head.accent-mint p:not(.game-kicker) {
        max-width: 100%;
    }

    .category-head.accent-blue {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 48%, rgba(255, 255, 255, 0.2) 100%),
            url("fairy-maps-hero.webp");
        background-position: center;
        background-size: cover;
        min-height: 420px;
        padding: 28px 22px;
    }

    .category-head.accent-blue h1,
    .category-head.accent-blue p:not(.game-kicker) {
        max-width: 100%;
    }

    .category-head.accent-amber {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 48%, rgba(255, 255, 255, 0.2) 100%),
            url("fairy-equipment-hero.webp");
        background-position: center;
        background-size: cover;
        min-height: 420px;
        padding: 28px 22px;
    }

    .category-head.accent-amber h1,
    .category-head.accent-amber p:not(.game-kicker) {
        max-width: 100%;
    }

    .category-head.accent-violet {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 48%, rgba(255, 255, 255, 0.2) 100%),
            url("fairy-gameplay-hero.webp");
        background-position: center;
        background-size: cover;
        min-height: 420px;
        padding: 28px 22px;
    }

    .category-head.accent-violet h1,
    .category-head.accent-violet p:not(.game-kicker) {
        max-width: 100%;
    }

    .wiki-head {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 55%, rgba(255, 255, 255, 0.18) 100%),
            url("fairy-wiki-hero-v2.webp");
        background-position: center;
        background-size: cover;
        min-height: 520px;
        padding: 28px 22px;
    }

    .wiki-head h1,
    .wiki-head p:not(.game-kicker),
    .wiki-head .portal-search,
    .wiki-head .filter-chip-row,
    .wiki-head .knowledge-page-nav {
        max-width: 100%;
    }
}
