/**
 * 44gg 全站腾讯游戏门户风（浅色内容区 + 深色顶栏底栏 + 品牌蓝）
 * 使用：根节点 <html class="tg">
 */
:root.tg,
html.tg {
    --tg-brand: #006eff;
    --tg-brand-dark: #0050c8;
    --tg-brand-soft: #e8f3ff;
    --tg-page-bg: #f0f2f5;
    --tg-card: #ffffff;
    --tg-border: #e3e6eb;
    --tg-text: #1a1a1a;
    --tg-muted: #5c6370;
    --tg-topbar: #0f131a;
    --tg-footer: #171a21;
}

html.tg {
    scroll-behavior: smooth;
}

html.tg body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--tg-page-bg) !important;
    color: var(--tg-text) !important;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* —— 全站顶栏 —— */
html.tg .tg-site-header {
    background: var(--tg-topbar);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html.tg .tg-site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

html.tg .tg-brand-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

html.tg .tg-brand-line a {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    letter-spacing: 0.02em;
}

html.tg .tg-brand-line a:hover {
    color: #7ec1ff;
}

html.tg .tg-brand-line .tg-brand-mark {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 2px;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
    line-height: 0;
}

html.tg .tg-brand-line .tg-brand-mark:hover {
    box-shadow: 0 0 0 1px rgba(126, 193, 255, 0.45);
}

html.tg .tg-brand-line .tg-brand-mark svg {
    display: block;
}

html.tg .tg-site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    align-items: center;
}

html.tg .tg-site-nav a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 14px;
}

html.tg .tg-site-nav a:hover {
    color: #7ec1ff;
}

html.tg .tg-site-nav a[aria-current="page"] {
    color: var(--tg-brand);
    font-weight: 600;
}

/* —— 文档页 / 落地页 主区 —— */
html.tg .tg-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    box-sizing: border-box;
}

html.tg .tg-section-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--tg-text);
    margin: 0 0 8px;
    padding-left: 12px;
    border-left: 4px solid var(--tg-brand);
    line-height: 1.3;
}

html.tg .tg-section-sub {
    font-size: 18px;
    font-weight: 700;
    color: var(--tg-text);
    margin: 28px 0 12px;
}

html.tg .tg-card {
    background: var(--tg-card);
    border: 1px solid var(--tg-border);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 20px 22px;
    margin-bottom: 16px;
}

html.tg .tg-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--tg-text);
    margin: 0 0 10px;
}

html.tg .tg-card p,
html.tg .tg-card li {
    color: var(--tg-muted);
    font-size: 14px;
}

html.tg .tg-recommend {
    background: var(--tg-brand-soft);
    border-left: 4px solid var(--tg-brand);
    padding: 16px 18px;
    margin: 14px 0;
    border-radius: 0 8px 8px 0;
}

html.tg .tg-recommend strong {
    color: var(--tg-text);
}

/* —— 按钮（浅底页用） —— */
html.tg .tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

html.tg .tg-btn:active {
    transform: translateY(1px);
}

html.tg .tg-btn--primary {
    background: var(--tg-brand);
    color: #fff;
    box-shadow: 0 3px 0 var(--tg-brand-dark);
}

html.tg .tg-btn--primary:hover {
    background: #1a7dff;
}

html.tg .tg-btn--ghost {
    background: #fff;
    color: var(--tg-brand);
    border: 1px solid var(--tg-brand);
}

html.tg .tg-btn--ghost:hover {
    background: var(--tg-brand-soft);
}

/* —— 底栏 —— */
html.tg .tg-footer {
    background: var(--tg-footer);
    color: rgba(255, 255, 255, 0.62);
    padding: 24px 20px 28px;
    margin-top: auto;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html.tg .tg-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.7;
}

html.tg .tg-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

html.tg .tg-footer a:hover {
    color: #fff;
}

/* —— ra3map 地图页 —— */
html.tg .ra3map-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

html.tg .ra3map-hero {
    text-align: center;
    padding: 8px 0 4px;
}

html.tg .ra3map-hero h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--tg-text);
    margin: 0 0 6px;
}

html.tg .ra3map-hero p {
    font-size: 14px;
    color: var(--tg-muted);
    margin: 0;
}

html.tg .ra3map-card {
    background: var(--tg-card);
    border: 1px solid var(--tg-border);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 16px;
    margin-bottom: 14px;
}

html.tg .ra3map-card h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--tg-text);
    margin: 0 0 12px;
    padding-left: 10px;
    border-left: 3px solid var(--tg-brand);
}

html.tg .ra3map-features {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
}

html.tg .ra3map-features p {
    flex: 1;
    min-width: 42%;
    margin: 0;
    font-size: 14px;
    color: var(--tg-muted);
    font-weight: 500;
}

html.tg .ra3map-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

html.tg .ra3map-preview-item {
    width: calc(33.33% - 7px);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--tg-border);
    background: var(--tg-card);
    transition: box-shadow 0.2s, transform 0.2s;
}

html.tg .ra3map-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

html.tg .ra3map-preview-item img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

html.tg .ra3map-preview-item figcaption {
    text-align: center;
    padding: 8px 6px;
    font-size: 12px;
    color: var(--tg-muted);
}

html.tg .ra3map-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

html.tg .ra3map-page-btn {
    min-width: 96px;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    background: var(--tg-brand);
    color: #fff;
    box-shadow: 0 3px 0 var(--tg-brand-dark);
}

html.tg .ra3map-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

html.tg .ra3map-page-btn:not(:disabled):hover {
    background: #1a7dff;
}

html.tg #pageIndicator {
    font-size: 14px;
    color: var(--tg-muted);
}

html.tg .ra3map-qq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 10px 20px;
    background: #12b7f5;
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 3px 0 #0a8ec4;
}

html.tg .ra3map-qq:hover {
    filter: brightness(1.05);
}

html.tg .ra3map-gen-block {
    text-align: center;
    margin: 18px 0;
}

html.tg .ra3map-gen-block a {
    text-decoration: none;
    color: inherit;
}

html.tg .ra3map-gen-thumb {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    border-radius: 8px;
    border: 1px solid var(--tg-border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

html.tg .ra3map-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 22px 0;
}

html.tg .ra3map-links a {
    text-align: center;
    text-decoration: none;
    color: var(--tg-muted);
    font-size: 13px;
}

html.tg .ra3map-links a > div {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 1px solid var(--tg-border);
    background: var(--tg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: box-shadow 0.2s;
}

html.tg .ra3map-links a:hover > div {
    box-shadow: 0 4px 16px rgba(0, 110, 255, 0.15);
}

html.tg .ra3map-qr {
    text-align: center;
    margin: 18px 0;
}

html.tg .ra3map-qr img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 1px solid var(--tg-border);
}

@media (max-width: 768px) {
    html.tg .ra3map-preview-item {
        width: calc(50% - 6px);
    }
}

@media (max-width: 480px) {
    html.tg .ra3map-preview-item {
        width: 100%;
    }
    html.tg .ra3map-features p {
        min-width: 100%;
    }
}

/* —— 地图生成器页（覆盖原深色 UI） —— */
html.tg .site-header {
    background: var(--tg-topbar) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

html.tg .header-title {
    color: #fff !important;
}

html.tg .header-home-link {
    color: #fff !important;
}

html.tg .header-home-link:hover {
    color: #7ec1ff !important;
}

html.tg .tg-gen-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    margin: 0 12px;
}

html.tg .tg-gen-nav a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

html.tg .tg-gen-nav a:hover {
    color: #7ec1ff;
}

/* 生成器顶栏：标题 + 导航 + 按钮横排 */
html.tg .header-container {
    justify-content: flex-start !important;
}

html.tg .header-buttons {
    margin-left: auto;
}

@media (max-width: 768px) {
    html.tg .header-container {
        align-items: stretch !important;
    }

    html.tg .header-buttons {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    html.tg .tg-gen-nav {
        width: 100%;
        justify-content: center;
        margin: 4px 0 !important;
    }
}

html.tg main {
    background: transparent !important;
}

/* —— 生成器使用文档页（深色内联样式 + html.tg 覆盖为门户浅色） —— */
html.tg body > header:not(.tg-site-header) {
    background: var(--tg-topbar) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 12px 20px !important;
    padding-top: calc(12px + env(safe-area-inset-top, 0px)) !important;
}

html.tg body > header:not(.tg-site-header) .header-container {
    justify-content: flex-start !important;
    max-width: 1200px;
    margin: 0 auto;
}

html.tg body > header:not(.tg-site-header) .header-container > a:last-child {
    margin-left: auto;
}

html.tg body > header:not(.tg-site-header) .header-title {
    color: #fff !important;
}

html.tg body > header:not(.tg-site-header) .tg-gen-nav a {
    color: rgba(255, 255, 255, 0.78);
}

html.tg body.tg-doc-page > main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 48px !important;
}

html.tg body.tg-doc-page > main .section-title {
    color: var(--tg-text) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    border-left: 4px solid var(--tg-brand);
    padding-left: 12px;
    margin-bottom: 16px !important;
    gap: 10px !important;
}

html.tg body.tg-doc-page > main .section-title svg path {
    fill: var(--tg-brand) !important;
}

html.tg body.tg-doc-page > main .section-subtitle {
    color: var(--tg-brand) !important;
    margin-top: 24px !important;
}

html.tg body.tg-doc-page > main .card {
    background: var(--tg-card) !important;
    border: 1px solid var(--tg-border) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
}

html.tg body.tg-doc-page > main .card-title {
    color: var(--tg-brand) !important;
}

html.tg body.tg-doc-page > main .card-content {
    color: var(--tg-muted) !important;
}

html.tg body.tg-doc-page > main .param-table th {
    background: #f7f8fa !important;
    color: var(--tg-text) !important;
    border-bottom: 1px solid var(--tg-border);
}

html.tg body.tg-doc-page > main .param-table td {
    border-top-color: var(--tg-border) !important;
    color: var(--tg-muted) !important;
}

html.tg body.tg-doc-page > main .param-table tr:hover {
    background: var(--tg-brand-soft) !important;
}

html.tg body.tg-doc-page > main .recommendation {
    background: var(--tg-brand-soft) !important;
    border-left-color: var(--tg-brand) !important;
}

html.tg body.tg-doc-page > main .recommendation-title {
    color: var(--tg-brand) !important;
}

html.tg body > footer:not(.tg-footer) {
    background: var(--tg-footer) !important;
    padding: 20px !important;
    margin-top: auto !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html.tg body > footer:not(.tg-footer) .footer-container {
    color: rgba(255, 255, 255, 0.65) !important;
}

@media (max-width: 768px) {
    html.tg body > header:not(.tg-site-header) .header-container > a:last-child {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    html.tg body > header:not(.tg-site-header) .tg-gen-nav {
        width: 100%;
        justify-content: center;
    }
}

html.tg .map-wrapper {
    background: linear-gradient(180deg, #12161d, #1c2430) !important;
    border: 1px solid var(--tg-border) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

html.tg .control-panel {
    background: var(--tg-card) !important;
    border: 1px solid var(--tg-border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

html.tg .panel-title {
    color: var(--tg-text) !important;
    border-left-color: var(--tg-brand) !important;
}

html.tg .control-label {
    color: var(--tg-text) !important;
}

html.tg .control-hint {
    color: var(--tg-muted) !important;
}

html.tg .control-select {
    background: #f7f8fa !important;
    border: 1px solid var(--tg-border) !important;
    color: var(--tg-text) !important;
}

html.tg .control-checkbox {
    background: #f7f8fa !important;
    border: 1px solid var(--tg-border) !important;
}

html.tg .control-checkbox label {
    color: var(--tg-text) !important;
}

html.tg .checkbox-hint {
    color: var(--tg-muted) !important;
}

html.tg .legend-item {
    background: var(--tg-card) !important;
    border: 1px solid var(--tg-border) !important;
    color: var(--tg-muted) !important;
}

html.tg .slider-value {
    color: var(--tg-brand) !important;
}

html.tg .control-slider {
    background: linear-gradient(90deg, #e5e7eb, #d1d5db) !important;
}

html.tg .control-slider::-webkit-slider-thumb {
    background: linear-gradient(180deg, #4da3ff, var(--tg-brand)) !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12) !important;
}

html.tg .control-slider::-moz-range-thumb {
    background: linear-gradient(180deg, #4da3ff, var(--tg-brand)) !important;
}

html.tg .map-info-block {
    background: #f7f8fa !important;
    border: 1px solid var(--tg-border) !important;
}

html.tg .info-label {
    color: var(--tg-muted) !important;
}

html.tg .map-info span:last-child {
    color: var(--tg-text) !important;
}

html.tg .btn-gold {
    background: linear-gradient(180deg, #3d9fff, var(--tg-brand)) !important;
    color: #fff !important;
    box-shadow: 0 3px 0 var(--tg-brand-dark) !important;
}

html.tg .btn-gold svg path {
    fill: #fff !important;
}

html.tg .btn-outline {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
}

html.tg .btn-outline svg path {
    fill: #fff !important;
}

html.tg #loadingOverlay {
    background: rgba(255, 255, 255, 0.88) !important;
}

html.tg .loading-text {
    color: var(--tg-text) !important;
}

html.tg footer {
    background: var(--tg-footer) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html.tg .footer-container {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* —— 404 —— */
html.tg .tg404-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

html.tg .tg404-card {
    max-width: 520px;
    width: 100%;
    background: var(--tg-card);
    border: 1px solid var(--tg-border);
    border-radius: 10px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

html.tg .tg404-num {
    font-size: 72px;
    font-weight: 800;
    color: var(--tg-brand);
    line-height: 1;
    margin-bottom: 12px;
}

html.tg .tg404-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--tg-text);
    margin-bottom: 12px;
}

html.tg .tg404-desc {
    font-size: 15px;
    color: var(--tg-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

html.tg .tg404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* —— ra3map 落地页（ra3map.html · body.ra3-landing）加强 —— */
html.tg body.ra3-landing .landing-wrap {
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* 落地页：整页黑底 + 暗色内容区（与 KV 横图一致） */
html.tg body.ra3-landing {
    background: #000000 !important;
    color: #e8eaed;
}

html.tg body.ra3-landing .section-head h2 {
    color: #f3f4f6;
}

html.tg body.ra3-landing .section-head--landing {
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
}

html.tg body.ra3-landing .section-head--landing::before {
    width: 3px;
    min-height: 44px;
    height: auto;
    align-self: center;
    border-radius: 3px;
    background: linear-gradient(180deg, #9fd0ff 0%, #006eff 48%, #b8942e 100%);
    box-shadow: 0 0 18px rgba(0, 110, 255, 0.35);
}

html.tg body.ra3-landing .section-head-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

html.tg body.ra3-landing .section-head--landing h2 {
    font-size: clamp(17px, 2.6vw, 22px);
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #f8fafc;
    margin: 0;
    line-height: 1.25;
}

html.tg body.ra3-landing .section-head-en {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: rgba(148, 163, 184, 0.95);
}

html.tg body.ra3-landing .panel-card {
    background: #0c0e12;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.55);
}

html.tg body.ra3-landing .panel-card.panel-card--shine {
    position: relative;
    border-radius: 14px;
    padding: 22px 20px 20px;
    background: linear-gradient(165deg, rgba(28, 36, 52, 0.95) 0%, #080a0e 52%, #0e121c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 0 1px rgba(0, 110, 255, 0.16),
        0 24px 56px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

html.tg body.ra3-landing .panel-card.panel-card--shine::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 110, 255, 0.55), rgba(212, 175, 55, 0.35), transparent);
    pointer-events: none;
}

html.tg body.ra3-landing .feature-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

html.tg body.ra3-landing .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

html.tg body.ra3-landing .feature-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 110, 255, 0.42);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.38),
        0 0 28px rgba(0, 110, 255, 0.12);
}

html.tg body.ra3-landing .feature-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    margin-top: 1px;
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(0, 110, 255, 0.42), rgba(0, 60, 140, 0.12));
    border: 1px solid rgba(90, 173, 255, 0.38);
    box-shadow: 0 0 14px rgba(0, 110, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
}

html.tg body.ra3-landing .feature-icon::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 3px;
    border: 1px solid rgba(186, 220, 255, 0.45);
    box-shadow: inset 0 0 10px rgba(0, 110, 255, 0.2);
}

html.tg body.ra3-landing .feature-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 600;
    color: #cfd6e6;
}

html.tg body.ra3-landing .gen-teaser {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html.tg body.ra3-landing .gen-teaser--promo {
    border-top: none;
    margin-top: 20px;
    padding-top: 0;
}

html.tg body.ra3-landing .gen-teaser--promo::before {
    content: "";
    display: block;
    height: 1px;
    margin-bottom: 18px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 18%,
        rgba(0, 110, 255, 0.45) 50%,
        rgba(255, 255, 255, 0.08) 82%,
        transparent 100%
    );
}

html.tg body.ra3-landing .gen-teaser--promo .gen-teaser-link {
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(125deg, rgba(0, 90, 210, 0.14) 0%, rgba(255, 255, 255, 0.03) 55%);
    border: 1px solid rgba(0, 110, 255, 0.32);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    gap: 16px;
}

html.tg body.ra3-landing .gen-teaser--promo .gen-teaser-link:hover {
    border-color: rgba(0, 170, 255, 0.55);
    box-shadow: 0 0 32px rgba(0, 110, 255, 0.22);
    transform: translateY(-2px);
}

html.tg body.ra3-landing .gen-teaser--promo .gen-go {
    flex-shrink: 0;
    align-self: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #061018;
    background: linear-gradient(180deg, #f0f7ff, #7ec1ff);
    border: 1px solid rgba(180, 220, 255, 0.95);
    box-shadow: 0 2px 0 rgba(0, 70, 150, 0.4);
    transition: filter 0.2s ease;
}

html.tg body.ra3-landing .gen-teaser--promo .gen-teaser-link:hover .gen-go {
    filter: brightness(1.06);
}

@media (max-width: 640px) {
    html.tg body.ra3-landing .feature-cards {
        grid-template-columns: 1fr;
    }
}

html.tg body.ra3-landing .gen-teaser .gen-thumb {
    background: #141820;
    border-color: rgba(255, 255, 255, 0.12);
}

html.tg body.ra3-landing .preview-item {
    background: #0c0e12;
    border-color: rgba(255, 255, 255, 0.08);
}

html.tg body.ra3-landing .preview-item p {
    color: #aeb8c6;
}

html.tg body.ra3-landing #pageIndicator {
    color: #aeb8c6;
}

html.tg body.ra3-landing .community-grid a {
    color: #aeb8c6;
}

html.tg body.ra3-landing .community-tile {
    background: #141820;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e8eaed;
}

html.tg .tg-site-header.ra3-top {
    position: sticky;
    top: 0;
    z-index: 200;
    padding-top: env(safe-area-inset-top, 0);
}

html.tg body.ra3-landing .hero.hero--kv {
    position: relative;
    overflow: hidden;
    padding: 40px 20px 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #030305;
    min-height: min(52vw, 400px);
}

html.tg body.ra3-landing .hero.hero--kv .hero-kv-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}

html.tg body.ra3-landing .hero.hero--kv::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.28) 45%, rgba(0, 0, 0, 0.45) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.72) 100%),
        radial-gradient(ellipse 85% 55% at 50% -25%, rgba(0, 110, 255, 0.22), transparent 55%);
}

html.tg body.ra3-landing .hero.hero--kv .hero-inner {
    position: relative;
    z-index: 2;
}

html.tg body.ra3-landing .hero.hero--kv .hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(240, 200, 92, 0.95);
    margin-bottom: 10px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
}

html.tg body.ra3-landing .hero.hero--kv h1 {
    color: #fff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

@supports (-webkit-background-clip: text) {
    html.tg body.ra3-landing .hero.hero--kv h1 {
        background: linear-gradient(180deg, #ffffff 0%, #f5ecd4 45%, #c9a44a 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: none;
        filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.45));
    }
}

html.tg body.ra3-landing .promo-strip {
    margin: 0 0 22px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(105deg, #0e1118 0%, #121a26 55%, #0a1424 100%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

html.tg body.ra3-landing .promo-strip-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    padding: 14px 18px;
}

html.tg body.ra3-landing .promo-strip .promo-text {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #e8eaed;
}

html.tg body.ra3-landing .promo-strip .promo-text strong {
    color: #5aadff;
    font-weight: 800;
}

html.tg body.ra3-landing .promo-strip .promo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

html.tg body.ra3-landing .promo-strip .tg-btn--ghost {
    background: transparent;
    color: #b3d9ff;
    border-color: rgba(90, 173, 255, 0.55);
}

html.tg body.ra3-landing .promo-strip .tg-btn--ghost:hover {
    background: rgba(0, 110, 255, 0.18);
}

html.tg body.ra3-landing .gen-teaser {
    text-align: left;
}

html.tg body.ra3-landing .gen-teaser-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    width: 100%;
    text-decoration: none;
    color: #e8eaed;
}

html.tg body.ra3-landing .gen-teaser .gen-thumb {
    flex-shrink: 0;
    margin: 0;
}

html.tg body.ra3-landing .gen-teaser .gen-copy {
    flex: 1;
    min-width: 0;
}

html.tg body.ra3-landing .gen-teaser .gen-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--tg-brand);
    margin: 0 0 4px;
}

html.tg body.ra3-landing .gen-teaser--promo .gen-title {
    color: #b8dcff;
    text-shadow: 0 0 20px rgba(0, 110, 255, 0.2);
}

html.tg body.ra3-landing .gen-teaser .gen-desc {
    font-size: 13px;
    color: #aeb8c6;
    margin: 0;
    line-height: 1.5;
}

html.tg body.ra3-landing .gen-teaser-link:hover .gen-thumb {
    box-shadow: 0 4px 16px rgba(0, 110, 255, 0.2);
    border-color: rgba(0, 110, 255, 0.35);
}

@media (max-width: 520px) {
    html.tg body.ra3-landing .gen-teaser-link {
        flex-direction: column;
        text-align: center;
    }

    html.tg body.ra3-landing .gen-teaser .gen-thumb {
        margin: 0 auto;
    }

    html.tg body.ra3-landing .promo-strip-inner {
        flex-direction: column;
        align-items: stretch;
    }

    html.tg body.ra3-landing .promo-strip .promo-actions {
        justify-content: center;
    }
}

/* —— 顶栏网格与 CTA（ra3map / 地图生成器 共用） —— */
html.tg .tg-site-header.ra3-top .tg-site-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px 20px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 20px;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    html.tg .tg-site-header.ra3-top .tg-site-header-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    html.tg .tg-site-header.ra3-top .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    html.tg .tg-site-header.ra3-top .btn-nav-cta {
        margin-left: 0 !important;
        width: 100%;
        max-width: 280px;
    }
}

html.tg .tg-site-header.ra3-top .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    justify-content: center;
}

html.tg .tg-site-header.ra3-top .nav-links a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

html.tg .tg-site-header.ra3-top .nav-links a:hover {
    color: #7ec1ff;
}

html.tg .tg-site-header.ra3-top .btn-nav-cta {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(180deg, #3d9fff, #006eff);
    color: #fff;
    box-shadow: 0 3px 0 #0050c8;
    white-space: nowrap;
}

html.tg .tg-site-header.ra3-top .btn-nav-cta:hover {
    filter: brightness(1.06);
}

html.tg .tg-site-header.ra3-top .btn-nav-cta:active {
    transform: translateY(1px);
}

/* —— ra3-map-generator.html（与 ra3map 黑底门户风一致） —— */
html.tg body.ra3-gen-body {
    background: #000000 !important;
    color: #e8eaed;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

html.tg body.ra3-gen-body .gen-page-toolbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #000000;
    box-sizing: border-box;
}

html.tg body.ra3-gen-body .gen-page-heading {
    margin: 0;
    font-size: clamp(17px, 2.6vw, 22px);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #f3f4f6;
}

html.tg body.ra3-gen-body .gen-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

html.tg body.ra3-gen-body main {
    padding: 20px 20px 40px;
}

html.tg body.ra3-gen-body .tg-footer-inner .tg-footer-note {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

html.tg body.ra3-gen-body .control-panel {
    background: linear-gradient(165deg, rgba(28, 36, 52, 0.95) 0%, #080a0e 52%, #0e121c 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 0 0 1px rgba(0, 110, 255, 0.14),
        0 20px 48px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

html.tg body.ra3-gen-body .panel-title {
    color: #f3f4f6 !important;
}

html.tg body.ra3-gen-body .control-label {
    color: #e8eaed !important;
}

html.tg body.ra3-gen-body .control-hint,
html.tg body.ra3-gen-body .checkbox-hint {
    color: #9aa3b2 !important;
}

html.tg body.ra3-gen-body .control-select,
html.tg body.ra3-gen-body .control-checkbox {
    background: #141820 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e8eaed !important;
}

html.tg body.ra3-gen-body .control-checkbox label {
    color: #e8eaed !important;
}

html.tg body.ra3-gen-body .legend-item {
    background: #141820 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #c5cdd8 !important;
}

html.tg body.ra3-gen-body .map-info-block {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.tg body.ra3-gen-body .map-info span:last-child {
    color: #e8eaed !important;
}

html.tg body.ra3-gen-body #loadingOverlay {
    background: rgba(6, 8, 12, 0.9) !important;
}

html.tg body.ra3-gen-body .loading-text {
    color: #e8eaed !important;
}

@media (max-width: 768px) {
    html.tg body.ra3-gen-body .gen-page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    html.tg body.ra3-gen-body .gen-page-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    html.tg body.ra3-gen-body main {
        padding: 12px 14px 32px;
    }

    html.tg body.ra3-gen-body .gen-page-actions .btn-3d {
        flex: 1;
        justify-content: center;
    }
}

/* —— 全站：键盘焦点、跳过导航、页脚点击热区 —— */
html.tg .skip-link {
    position: absolute;
    left: -9999px;
    top: 0.75rem;
    z-index: 300;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: #006eff;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

html.tg .skip-link:focus {
    left: 0.75rem;
    outline: none;
}

html.tg .skip-link:focus-visible {
    left: 0.75rem;
    outline: 2px solid #f0c85c;
    outline-offset: 2px;
}

html.tg a:focus-visible,
html.tg button:focus-visible,
html.tg .btn:focus-visible,
html.tg .tg-btn:focus-visible,
html.tg .btn-nav-cta:focus-visible,
html.tg .btn-3d:focus-visible {
    outline: 2px solid #7ec1ff;
    outline-offset: 2px;
}

html.tg .tg-footer-inner a {
    display: inline-block;
    padding: 0.5rem 0.65rem;
    margin: 0 -0.2rem;
    border-radius: 4px;
    min-height: 44px;
    line-height: 1.35;
    box-sizing: border-box;
    vertical-align: middle;
}

html.tg .tg-footer-inner p {
    line-height: 1.75;
}
