* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

body.modal-open {
    overflow: hidden;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 24px;
    width: 98%;
    max-width: 1400px;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    margin: 1vh auto;
    transition: box-shadow 0.8s ease, border-color 0.8s ease;
}

/* 市场情绪氛围（红涨绿跌，符合A股习惯） */
.container.mkt-bull {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(239, 68, 68, 0.12), 0 10px 40px rgba(239, 68, 68, 0.06);
}

.container.mkt-bull .chart-container {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(180deg, #fff 0%, rgba(254, 242, 242, 0.35) 100%);
}

.container.mkt-bear {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(34, 197, 94, 0.12), 0 10px 40px rgba(34, 197, 94, 0.06);
}

.container.mkt-bear .chart-container {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(180deg, #fff 0%, rgba(240, 253, 244, 0.35) 100%);
}

/* 全局隐藏：任何带 hidden 类的元素一律不显示（屏幕/弹窗/面板/画布通用） */
.hidden {
    display: none !important;
}

.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.screen.hidden {
    display: none !important;
}

.start-content {
    margin: auto;
    padding: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.start-bg-decor {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.game-logo {
    font-size: 64px;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1 {
    font-size: clamp(32px, 8vw, 48px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -1px;
}

.start-content p {
    color: #64748b;
    font-size: 18px;
    margin-bottom: 30px;
}

.start-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 36px;
}

.start-features span {
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
    animation: fadeUp 0.6s ease both;
}

.start-features span:nth-child(2) { animation-delay: 0.1s; }
.start-features span:nth-child(3) { animation-delay: 0.2s; }
.start-features span:nth-child(4) { animation-delay: 0.3s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* 开局设置 */
.setup-group {
    max-width: 460px;
    margin: 0 auto 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    animation: fadeUp 0.6s ease 0.15s both;
}

.setup-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.setup-row:last-child {
    margin-bottom: 0;
}

.setup-label {
    width: 84px;
    flex-shrink: 0;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.segmented {
    flex: 1;
    display: flex;
    background: #eef2f7;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.seg-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s ease;
}

.seg-btn:hover {
    color: #475569;
    background: rgba(255, 255, 255, 0.6);
}

.seg-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.setup-hint {
    text-align: left;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.risk-note {
    margin-top: 22px;
    font-size: 12px;
    color: #94a3b8;
}

.btn-large {
    padding: 16px 48px !important;
    font-size: 18px !important;
    border-radius: 50px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulseGlow 2.4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 4px 24px rgba(102, 126, 234, 0.55); }
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    gap: 8px;
    flex-shrink: 0;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-label {
    color: #64748b;
    font-size: 10px;
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    color: #1e293b;
    font-size: clamp(14px, 3vw, 20px);
    font-weight: 800;
    display: block;
    transition: color 0.3s;
}

.market-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: clamp(12px, 2.4vw, 15px);
    color: #fff;
    transition: all 0.5s ease;
}

.market-badge.bull { background: #ef4444; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35); }
.market-badge.neutral { background: #f59e0b; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35); }
.market-badge.bear { background: #22c55e; box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35); }

/* 控制栏：视图切换 + 速度控制 + 资讯条，随屏幕宽度自动换行
   —— 宽屏：视图/速度一行、资讯条独占一行；中屏：速度组放不下时自动换行；
      窄屏（≤640px）：整体纵向排列（见媒体查询） */
.control-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.view-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.speed-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ctrl-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    flex-shrink: 0;
}

.speed-controls {
    display: flex;
    flex-wrap: wrap; /* 速度按钮过多（7 个）时换行显示 */
    gap: 6px;
    flex-shrink: 0;
}

.ctrl-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrl-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.ctrl-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.news-strip {
    flex: 1 1 260px; /* 可与视图/速度同行显示；容器放不下时自动换行（窄屏兜底） */
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 5px 10px;
    position: relative;
}

/* 宽屏：快讯与视图切换/速度控制等一行显示（内容总宽约 850px，≥961px 可全部同行） */
@media (min-width: 961px) {
    .news-strip {
        flex: 1 1 auto;
        min-width: 0;
    }
}

.news-toggle {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.2s, background 0.2s, color 0.2s;
}

.news-toggle:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.news-toggle.open {
    transform: rotate(180deg);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.news-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    z-index: 60;
    padding: 8px;
    animation: newsPanelIn 0.25s ease;
}

.news-panel.hidden {
    display: none;
}

.news-panel::-webkit-scrollbar {
    width: 6px;
}

.news-panel::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 3px;
}

@keyframes newsPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

.news-item {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    line-height: 1.5;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-item .ni-title {
    font-weight: 700;
    margin-right: 6px;
}

.news-item.good {
    background: #f0fdf4;
    border-color: rgba(34, 197, 94, 0.35);
    color: #15803d;
}

.news-item.bad {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.35);
    color: #b91c1c;
}

.news-item.warn {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.4);
    color: #b45309;
}

.news-strip-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.news-scroll {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
}

.news-scroll::-webkit-scrollbar {
    display: none;
}

.news-card {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
    animation: newsIn 0.5s ease;
}

.news-card.good {
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.35);
    background: #f0fdf4;
}

.news-card.bad {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
    background: #fef2f2;
}

.news-card.warn {
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.4);
    background: #fffbeb;
}

@keyframes newsIn {
    from { opacity: 0; transform: translateY(-5px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

.chart-container {
    flex: 1;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    position: relative;
    min-height: 400px;
    transition: border-color 0.8s ease, background 0.8s ease;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rebalance-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 4px 10px; /* 继续压缩：面板内边距再减小 */
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.panel-enter {
    animation: panelIn 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.1);
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

.panel-header {
    margin-bottom: 0; /* 继续压缩 */
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-header h3 {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

.panel-header p {
    color: #64748b;
    font-size: 10px;
}

.panel-body {
    display: flex;
    gap: 10px; /* 继续压缩 */
    align-items: stretch;
}

.allocation-sliders {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.panel-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 3px; /* 继续压缩 */
    padding-left: 12px;
    border-left: 1px solid #e2e8f0;
    min-width: 140px;
}

.allocation-item {
    flex: 1;
    background: white;
    padding: 2px 5px; /* 继续压缩 */
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.allocation-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.1);
}

.allocation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.allocation-item label {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

.allocation-value {
    font-size: 11px;
    font-weight: 700;
    color: #667eea;
}

.allocation-amount {
    font-size: 8px;
    color: #94a3b8;
    text-align: right;
}

.total-allocation {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    transition: color 0.3s;
}

/* 定投配置 */
.invest-config {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 3px 8px; /* 继续压缩 */
}

.invest-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 2px;
}

.invest-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.invest-row input {
    flex: 1;
    min-width: 0;
    padding: 3px 6px; /* 继续压缩 */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}

.invest-row input:focus {
    border-color: #667eea;
}

.invest-row select {
    padding: 3px 6px; /* 继续压缩 */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    background: #fff;
    color: #1e293b;
    outline: none;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    margin: 0; /* 继续压缩 */
    transition: height 0.2s;
}

input[type="range"]:hover {
    height: 6px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.6);
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.4);
}

.panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 7px 18px; /* 继续压缩按钮高度 */
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 7px 14px; /* 继续压缩按钮高度 */
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover {
    background: #e2e8f0;
}

/* 结算统计 */
.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin: 12px 0 6px;
}

.result-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
}

.result-stat .rs-label {
    font-size: 10px;
    color: #94a3b8;
    display: block;
    margin-bottom: 3px;
}

.result-stat .rs-value {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
}

/* 结算结果区（模拟结束时显示在调仓面板左侧，替代资产滑块） */
.result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.result-head {
    display: flex;
    gap: 28px;
    align-items: baseline;
    flex-wrap: wrap;
}

.result-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-summary .rs-label {
    font-size: 10px;
    color: #94a3b8;
}

.result-total {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.result-return {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.result-title-badge {
    font-size: 18px;
    font-weight: 800;
    color: #667eea;
    animation: titlePop 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.3) both;
}

.result-panel .result-stats {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 6px;
    margin: 0;
}

.result-panel .result-stat {
    padding: 6px 8px;
}

.result-panel .result-stat .rs-value {
    font-size: 13px;
    white-space: nowrap;
}

.title-badge {
    animation: titlePop 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.3) both;
}

@keyframes titlePop {
    from { opacity: 0; transform: scale(0.6) rotate(-4deg); }
    to { opacity: 1; transform: none; }
}

/* 弹窗 */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(4px);
}

.modal-mask.hidden {
    display: none;
}

.modal-card {
    background: #fff;
    border-radius: 16px;
    padding: 26px 30px;
    max-width: 420px;
    width: 92%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: popIn 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-card h3 {
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 10px;
}

.modal-card p {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.85) translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* 彩带 */
.confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
}

.confetti-canvas.hidden {
    display: none;
}

@media (max-width: 640px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .container {
        padding: 12px;
        width: 100%;
        margin: 0;
        border-radius: 0;
        height: auto;
        min-height: 100vh;
    }

    .screen {
        overflow: visible;
    }

    .start-content {
        padding: 24px 12px;
    }

    .start-features {
        gap: 8px;
    }

    .setup-group {
        padding: 14px 12px;
    }

    .setup-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .setup-label {
        width: auto;
        text-align: left;
    }

    .stats {
        padding: 8px;
        margin-bottom: 8px;
    }

    .chart-container {
        min-height: 250px;
    }

    .control-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    /* 手机适配：视图/速度控制行允许换行，按钮均分宽度、加大触控区域 */
    .view-controls {
        width: 100%;
        gap: 6px;
    }

    .view-controls .ctrl-btn {
        flex: 1 1 0;
        padding: 8px 6px;
        min-height: 38px;
    }

    .speed-group {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px 8px;
    }

    .speed-controls {
        flex: 1 1 auto;
        flex-wrap: wrap;
        gap: 6px;
    }

    .speed-controls .ctrl-btn {
        flex: 1 1 auto;
        min-width: 46px;
        padding: 8px 6px;
        min-height: 38px;
        text-align: center;
    }

    .news-card {
        max-width: 220px;
    }

    .news-panel {
        max-height: 40vh;
    }

    .allocation-sliders {
        flex-direction: column;
        gap: 6px;
    }

    .panel-body {
        flex-direction: column;
        gap: 12px;
    }

    .panel-action {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding-left: 0;
        padding-top: 12px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        min-width: 0;
    }

    .result-panel {
        gap: 6px;
        align-items: flex-start;
    }

    .result-head {
        gap: 14px;
    }

    .result-total {
        font-size: 20px;
    }

    .result-return {
        font-size: 18px;
    }

    .result-title-badge {
        font-size: 15px;
    }

    .invest-config {
        width: 100%;
    }
}

/* ===== 第三方广告显示优化 =====
   页头脚本（upskittyan.com / nap5k.com）会在页面注入 fixed 小窗广告（通常出现在右上角）。
   混淆代码无法定位其精确类名，故按结构特征统一柔化：圆角、轻阴影、半透明白底、限宽、
   压低层级，尽量不遮挡游戏操作区；左侧书签栏（links.js 注入）不受影响。 */
body > div[style*="position: fixed"],
body > div[style*="position:fixed"],
body > iframe[style*="position: fixed"],
body > iframe[style*="position:fixed"] {
    max-width: 320px;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    z-index: 9990;
}

/* 右侧小窗（真正的广告/弹窗）进一步收紧；书签栏在左侧，不会被命中 */
body > div[style*="position: fixed"][style*="right"],
body > div[style*="position:fixed"][style*="right"],
body > iframe[style*="position: fixed"][style*="right"],
body > iframe[style*="position:fixed"][style*="right"] {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

body > div[style*="position: fixed"][style*="right"] iframe,
body > div[style*="position: fixed"][style*="right"] img,
body > div[style*="position:fixed"][style*="right"] iframe,
body > div[style*="position:fixed"][style*="right"] img {
    display: block;
    border-radius: 12px;
    border: 0;
}
