/* ===== CFRNGdlePlus 307 位样式 ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #0a0a0a;
    --surface: #141414;
    --surface-raised: #1e1e1e;
    --surface-dim: #0f0f0f;
    --outline: #2a2a2a;
    --outline-strong: #4a4a4a;
    --prose: #f0f0f0;
    --prose-2: #b8b8b8;
    --prose-3: #5a5a5a;
    --radius: 16px;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;

    --rarity-平庸: #b0b0b0;
    --rarity-普通: #6ee7b7;
    --rarity-罕见: #93c5fd;
    --rarity-稀有: #a78bfa;
    --rarity-史诗: #fbbf24;
    --rarity-传说: #f472b6;
    --rarity-神话: #34d399;
    --rarity-超越: #60a5fa;
    --rarity-终结: #f87171;
}

/* ===== 亮色主题 ===== */
html[data-theme="light"] {
    --background: #f1f1f1;
    --surface: #ffffff;
    --surface-raised: #f5f5f5;
    --surface-dim: #e8e8e8;
    --outline: #d4d4d4;
    --outline-strong: #a0a0a0;
    --prose: #1a1a1a;
    --prose-2: #5a5a5a;
    --prose-3: #999999;
}

html[data-theme="light"] body {
    background-image:
        radial-gradient(ellipse at 50% 90%, rgba(0,0,0,0.03) 0%, transparent 65%),
        radial-gradient(ellipse at 30% 20%, rgba(0,0,0,0.02) 0%, transparent 50%);
}
html[data-theme="light"] .title {
    background: linear-gradient(135deg, #1a1a1a 40%, #555 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.04));
}
html[data-theme="light"] .number-card {
    box-shadow: 0 8px 32px rgba(0,0,0,0.08), inset 0 1px 0 rgba(0,0,0,0.04);
}
html[data-theme="light"] .number-card::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, transparent 100%);
}
html[data-theme="light"] .number-card::after {
    background: linear-gradient(0deg, rgba(0,0,0,0.01) 0%, transparent 100%);
}
html[data-theme="light"] .number-card--glow {
    box-shadow: 0 8px 40px rgba(0,0,0,0.06), inset 0 0 40px rgba(0,0,0,0.02);
}
html[data-theme="light"] .digit--active {
    text-shadow: 0 0 20px rgba(0,0,0,0.06);
}
html[data-theme="light"] .digit--revealed {
    text-shadow: 0 0 12px rgba(0,0,0,0.03);
}
html[data-theme="light"] .btn-generate {
    background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}
html[data-theme="light"] .btn-generate::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 60%);
}
html[data-theme="light"] .btn-generate:hover:not(:disabled) {
    background: linear-gradient(180deg, #e8e8e8 0%, #d4d4d4 100%);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.7);
}
html[data-theme="light"] .btn-generate .btn__spinner {
    border-color: rgba(0,0,0,0.12); border-top-color: #1a1a1a;
}
html[data-theme="light"] .badge-score-stats {
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.03);
}
html[data-theme="light"] .badge-pill {
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.03);
    background-image: radial-gradient(circle at 30% 30%, rgba(0,0,0,0.03) 0%, transparent 70%);
}
html[data-theme="light"] .badge-pill:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
html[data-theme="light"] #bestRollBox {
    background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.3); cursor: pointer;
}
html[data-theme="light"] #bestRollBox:hover {
    background: rgba(96,165,250,0.2); border-color: rgba(96,165,250,0.55);
}
html[data-theme="light"] .header-actions button {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
html[data-theme="light"] .header-actions button:hover {
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}
html[data-theme="light"] .btn-share:hover {
    box-shadow: 0 0 8px rgba(0,0,0,0.06);
}
html[data-theme="light"] .toast { box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
html[data-theme="light"] .tooltip { box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--background);
    color: var(--prose);
    font-family: var(--font-ui);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image:
        radial-gradient(ellipse at 50% 90%, rgba(255,255,255,0.018) 0%, transparent 65%),
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.01) 0%, transparent 50%);
}

.app {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: relative;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 24px; left: 50%;
    transform: translateX(-50%) translateY(-80px);
    background: var(--surface-raised);
    color: var(--prose);
    border: 1px solid var(--outline);
    border-radius: 12px;
    padding: 10px 24px;
    font-family: var(--font-ui);
    font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
    opacity: 0; pointer-events: none; z-index: 999;
    transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast--show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===== Tooltip ===== */
.tooltip {
    position: fixed; z-index: 998;
    background: var(--surface-raised); color: var(--prose);
    border: 1px solid var(--outline-strong);
    border-radius: 12px; padding: 10px 16px;
    font-family: var(--font-ui); font-size: 0.78rem;
    font-weight: 500; letter-spacing: 0.03em; line-height: 1.5;
    max-width: 300px; text-align: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.tooltip--show { opacity: 1; }
.tooltip__desc { white-space: normal; word-break: break-word; }

/* ===== 右上角按钮组 ===== */
.header-actions {
    position: absolute; top: 0; right: 0;
    display: flex; gap: 8px; z-index: 10;
}
.header-actions button {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--outline);
    background: var(--surface); cursor: pointer;
    position: relative; transition: all 0.25s ease; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--prose-2);
}
.header-actions button:hover {
    border-color: var(--outline-strong); transform: scale(1.08);
    box-shadow: 0 0 12px rgba(255,255,255,0.06); color: var(--prose);
}
.header-actions button:active { transform: scale(0.92); }
.header-actions button svg { width: 18px; height: 18px; stroke-width: 1.8; }

/* 主题切换图标 */
.theme-toggle::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 13px; height: 13px; margin: -7px 0 0 -7px;
    border: 1.5px solid var(--prose-2); border-radius: 50%;
    background: transparent; transition: all 0.35s ease;
}
.theme-toggle::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px;
    background: var(--prose-2); border-radius: 50%; transition: all 0.35s ease;
    box-shadow: 0 -7px 0 0 var(--prose-2), 0 7px 0 0 var(--prose-2),
        -7px 0 0 0 var(--prose-2), 7px 0 0 0 var(--prose-2),
        -5px -5px 0 0 var(--prose-2), 5px -5px 0 0 var(--prose-2),
        -5px 5px 0 0 var(--prose-2), 5px 5px 0 0 var(--prose-2);
}
html[data-theme="light"] .theme-toggle::before {
    width: 13px; height: 13px; margin: -7px 0 0 -7px;
    border: 1.5px solid var(--prose-2); background: transparent; box-shadow: none;
}
html[data-theme="light"] .theme-toggle::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 10px; height: 10px; margin: -5.5px 0 0 -1px;
    background: var(--surface); border-radius: 50%;
    box-shadow: none; transition: all 0.35s ease;
}

/* 自动按钮 */
.auto-icon-pause { display: none; }
.btn-auto .auto-icon-play { transform: translate(1px, 1px); }
.btn-auto.is-running .auto-icon-play { display: none; }
.btn-auto.is-running .auto-icon-pause { display: inline-flex; }

/* ===== 标题 ===== */
.title {
    font-size: 1.4rem; font-weight: 900; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--prose); text-align: center;
    background: linear-gradient(135deg, #fff 40%, var(--prose-2) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.04));
}

/* ===== 数字卡片 ===== */
.number-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    padding: 24px 16px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: relative; overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
}
.number-card::before {
    content: ''; position: absolute; inset: -1px -1px auto -1px; height: 55%;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
    pointer-events: none; border-radius: var(--radius) var(--radius) 0 0;
}
.number-card::after {
    content: ''; position: absolute; inset: auto -1px -1px -1px; height: 30%;
    background: linear-gradient(0deg, rgba(255,255,255,0.015) 0%, transparent 100%);
    pointer-events: none; border-radius: 0 0 var(--radius) var(--radius);
}
.number-card__label {
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.25em;
    text-transform: uppercase; color: var(--prose-3);
    position: relative; z-index: 1; margin-bottom: 6px; opacity: 0.7;
}
.number-card__digits {
    display: flex; justify-content: center; align-items: center;
    flex-wrap: wrap;
    gap: 0.04em;
    font-family: var(--font-mono); font-weight: 700;
    /* 307位：桌面约 0.7rem */
    font-size: clamp(0.55rem, 1.4vw, 0.85rem);
    letter-spacing: 0.02em;
    color: var(--prose);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    position: relative; z-index: 1;
    line-height: 1.5;
    min-height: 1.4em;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.03));
    padding: 4px 0;
    word-break: break-all;
}
.digit {
    display: inline-block;
    transition: color 0.12s ease, transform 0.2s cubic-bezier(0.34,1.56,0.64,1), opacity 0.15s ease;
    min-width: 0.5em; text-align: center;
    color: var(--prose-3); opacity: 0.25; font-weight: 700;
}
.digit--active {
    color: var(--prose); opacity: 1; transform: scale(1.12);
    text-shadow: 0 0 20px rgba(255,255,255,0.08);
}
.digit--revealed {
    color: var(--prose); opacity: 1; transform: scale(1);
    text-shadow: 0 0 12px rgba(255,255,255,0.04);
}
.digit--leading-zero {
    opacity: 0.18 !important; color: var(--prose-3) !important;
    transform: scale(0.92) !important;
}
.number-card--glow {
    border-color: var(--outline-strong);
    box-shadow: 0 8px 40px rgba(255,255,255,0.04), inset 0 0 40px rgba(255,255,255,0.01);
}

/* ===== 生成按钮 ===== */
.btn-generate {
    width: 100%; padding: 18px 12px;
    background: linear-gradient(180deg, #1e1e1e 0%, #0e0e0e 100%);
    color: #fff; font-family: var(--font-ui); font-size: 1.05rem;
    font-weight: 900; letter-spacing: 0.22em; text-transform: uppercase;
    border: 1px solid var(--outline); border-radius: var(--radius);
    cursor: pointer; transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
    position: relative; overflow: hidden; user-select: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
    display: flex; align-items: center; justify-content: center;
}
.btn-generate::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 60%);
    pointer-events: none; border-radius: var(--radius);
}
.btn-generate:hover:not(:disabled) {
    background: linear-gradient(180deg, #2e2e2e 0%, #1a1a1a 100%);
    border-color: var(--outline-strong); transform: scale(1.015);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}
.btn-generate:active:not(:disabled) {
    transform: scale(0.97); box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition-duration: 0.06s;
}
.btn-generate:disabled {
    opacity: 0.45; cursor: not-allowed; transform: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.btn-generate .btn__text { transition: opacity 0.2s ease; position: relative; z-index: 1; }
.btn-generate .btn__spinner {
    display: none; width: 22px; height: 22px;
    border: 2.5px solid rgba(255,255,255,0.12); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.7s linear infinite;
    margin: 0 auto; position: relative; z-index: 1;
}
.btn-generate.is-loading .btn__text { display: none; }
.btn-generate.is-loading .btn__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 徽章区域 ===== */
.badge-area {
    width: 100%; display: flex; flex-direction: column;
    align-items: center; gap: 14px; margin-top: 2px;
}
.badge-area__scores {
    display: flex; flex-wrap: wrap; justify-content: center;
    align-items: center; gap: 8px; width: 100%;
}
.badge-score-stats {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 0.7rem; font-weight: 600; color: var(--prose-2);
    background: var(--surface); padding: 6px 14px;
    border-radius: 14px; border: 1px solid var(--outline);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.badge-score-label { opacity: 0.6; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-score-value { color: var(--prose); font-weight: 900; font-size: 0.9rem; }

#currentScore { color: #fbbf24; }
.badge-score-best-num {
    color: #60a5fa; font-weight: 900; font-size: 0.75rem;
    font-family: var(--font-mono); letter-spacing: 0.04em;
}
.badge-score-best-tp { color: #fbbf24; font-weight: 700; font-size: 0.7rem; }
#bestRollBox { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.3); cursor: pointer; transition: all 0.2s ease; }
#bestRollBox.no-record { opacity: 0.25; filter: grayscale(0.6); pointer-events: auto; }
#bestRollBox.no-record:hover { opacity: 0.5; }
#bestRollBox:hover { background: rgba(96,165,250,0.18); border-color: rgba(96,165,250,0.5); }

/* 分享按钮 */
.btn-share {
    display: flex; align-items: center; gap: 4px; cursor: pointer;
    font-family: var(--font-ui); font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.04em; color: var(--prose-2);
    transition: all 0.2s ease; user-select: none; white-space: nowrap;
    border: 1px solid var(--outline);
    background: var(--surface); padding: 6px 14px; border-radius: 14px;
}
.btn-share:hover { color: var(--prose); border-color: var(--outline-strong); box-shadow: 0 0 8px rgba(255,255,255,0.04); }
.btn-share:active { transform: scale(0.95); }
.btn-share svg { width: 14px; height: 14px; stroke-width: 2; }
.btn-share .share-check { display: none; }
.btn-share.is-copied .share-icon,
.btn-share.is-copied .share-text { display: none; }
.btn-share.is-copied .share-check { display: inline-flex; }
.btn-share.is-copied { color: #34d399; border-color: #34d399; pointer-events: none; }

.badge-list {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; min-height: 38px; padding: 2px 0;
}

/* ===== 徽章药丸 ===== */
.badge-pill {
    display: inline-flex; align-items: center;
    gap: 0.3rem; padding: 0.25rem 0.7rem 0.25rem 0.5rem;
    border-radius: 9999px; font-family: var(--font-ui);
    font-size: 0.75rem; font-weight: 600;
    background: var(--surface-raised); border: 1px solid var(--outline);
    color: var(--prose-2);
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    background-image: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.04) 0%, transparent 70%);
    cursor: pointer;
}
.badge-pill:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.badge-pill .badge-emoji { font-size: 1rem; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.badge-pill .badge-name { color: var(--prose); font-weight: 600; }
.badge-pill .badge-rarity {
    font-size: 0.5rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 2px 10px; border-radius: 20px;
    background: rgba(255,255,255,0.05); border: 1px solid currentColor;
    line-height: 1.4; opacity: 0.9;
}
.badge-pill .badge-score {
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 2px 10px; border-radius: 20px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    color: var(--prose-2); line-height: 1.4; white-space: nowrap;
}

/* 九个稀有度 */
.badge-pill--平庸 { border-color: var(--rarity-平庸); color: var(--rarity-平庸); background: rgba(176,176,176,0.07); box-shadow: 0 0 6px rgba(176,176,176,0.1); }
.badge-pill--平庸 .badge-rarity { color: var(--rarity-平庸); border-color: var(--rarity-平庸); }
.badge-pill--普通 { border-color: var(--rarity-普通); color: var(--rarity-普通); background: rgba(110,231,183,0.07); box-shadow: 0 0 8px rgba(110,231,183,0.15); }
.badge-pill--普通 .badge-rarity { color: var(--rarity-普通); border-color: var(--rarity-普通); }
.badge-pill--罕见 { border-color: var(--rarity-罕见); color: var(--rarity-罕见); background: rgba(147,197,253,0.07); box-shadow: 0 0 10px rgba(147,197,253,0.2); }
.badge-pill--罕见 .badge-rarity { color: var(--rarity-罕见); border-color: var(--rarity-罕见); }
.badge-pill--稀有 { border-color: var(--rarity-稀有); color: var(--rarity-稀有); background: rgba(167,139,250,0.07); box-shadow: 0 0 12px rgba(167,139,250,0.25); }
.badge-pill--稀有 .badge-rarity { color: var(--rarity-稀有); border-color: var(--rarity-稀有); }
.badge-pill--史诗 { border-color: var(--rarity-史诗); color: var(--rarity-史诗); background: rgba(251,191,36,0.07); box-shadow: 0 0 14px rgba(251,191,36,0.3); }
.badge-pill--史诗 .badge-rarity { color: var(--rarity-史诗); border-color: var(--rarity-史诗); }
.badge-pill--传说 { border-color: var(--rarity-传说); color: var(--rarity-传说); background: rgba(244,114,182,0.07); box-shadow: 0 0 16px rgba(244,114,182,0.35); }
.badge-pill--传说 .badge-rarity { color: var(--rarity-传说); border-color: var(--rarity-传说); }
.badge-pill--神话 { border-color: var(--rarity-神话); color: var(--rarity-神话); background: rgba(52,211,153,0.07); box-shadow: 0 0 18px rgba(52,211,153,0.4); }
.badge-pill--神话 .badge-rarity { color: var(--rarity-神话); border-color: var(--rarity-神话); }
.badge-pill--超越 { border-color: var(--rarity-超越); color: var(--rarity-超越); background: rgba(96,165,250,0.07); box-shadow: 0 0 20px rgba(96,165,250,0.45); }
.badge-pill--超越 .badge-rarity { color: var(--rarity-超越); border-color: var(--rarity-超越); }
.badge-pill--终结 { border-color: var(--rarity-终结); color: var(--rarity-终结); background: rgba(248,113,113,0.07); box-shadow: 0 0 24px rgba(248,113,113,0.5); }
.badge-pill--终结 .badge-rarity { color: var(--rarity-终结); border-color: var(--rarity-终结); }
.badge-pill--inactive { opacity: 0.3; filter: grayscale(0.3); transition: opacity 0.3s ease, filter 0.3s ease; }

/* 分隔线 */
.badge-separator {
    width: 100%; display: flex; justify-content: center; margin: 8px 0 4px;
}
.badge-separator > span { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 360px; }
.badge-separator__line { flex: 1; height: 1px; background: var(--outline); opacity: 0.5; }
.badge-separator__label {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--prose-3); white-space: nowrap;
}

/* 加载更多 */
.badge-load-more { width: 100%; display: flex; justify-content: center; margin-top: 8px; }
.badge-load-more__btn {
    background: var(--surface); color: var(--prose-2);
    font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
    padding: 7px 22px; border: 1px solid var(--outline);
    border-radius: 40px; cursor: pointer; transition: all 0.2s ease; letter-spacing: 0.04em;
}
.badge-load-more__btn:hover { background: var(--surface-raised); color: var(--prose); border-color: var(--outline-strong); }
.badge-load-more__btn:active { transform: scale(0.96); }

/* 更多提示 */
.badge-more-hint {
    display: inline-block; font-size: 0.65rem;
    color: var(--prose-3); font-weight: 500; padding: 4px 8px; opacity: 0.7;
}

/* 新徽章标签 */
.badge-new {
    display: inline-block; font-size: 0.55rem; font-weight: 900;
    color: #fbbf24; background: rgba(251,191,36,0.15);
    padding: 0 6px; border-radius: 4px; border: 1px solid #fbbf24;
    text-transform: uppercase; letter-spacing: 0.05em;
    animation: pulse-new 0.8s ease-in-out infinite alternate;
}
@keyframes pulse-new {
    0% { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* ===== 底部 ===== */
.footer {
    font-size: 0.65rem; color: var(--prose-3);
    letter-spacing: 0.08em; text-align: center;
    margin-top: 2px; opacity: 0.5; font-weight: 400;
}

/* ===== 响应式：手机端307位适配 ===== */
@media (max-width: 600px) {
    .app { max-width: 100%; gap: 20px; }
    .number-card { padding: 16px 8px 14px; }
    .number-card__digits {
        font-size: clamp(0.38rem, 2vw, 0.55rem);
        gap: 0.02em; line-height: 1.35;
    }
    .digit { min-width: 0.45em; }
    .title { font-size: 1.1rem; letter-spacing: 0.14em; }
    .btn-generate { font-size: 0.9rem; padding: 16px 12px; letter-spacing: 0.18em; }
    .badge-score-stats { font-size: 0.65rem; padding: 4px 10px; border-radius: 12px; }
    .badge-score-value { font-size: 0.8rem; }
    .badge-pill { font-size: 0.7rem; padding: 0.2rem 0.6rem 0.2rem 0.4rem; gap: 0.2rem; }
    .badge-pill .badge-emoji { font-size: 0.85rem; }
    .badge-pill .badge-rarity { font-size: 0.45rem; padding: 1px 8px; }
    .badge-pill .badge-score { font-size: 0.5rem; padding: 1px 8px; }
    .badge-separator__label { font-size: 0.55rem; }
    .badge-load-more__btn { font-size: 0.65rem; padding: 5px 16px; }
}

@media (max-width: 380px) {
    .number-card__digits {
        font-size: clamp(0.28rem, 1.8vw, 0.42rem);
        gap: 0.01em; line-height: 1.25;
    }
    .digit { min-width: 0.4em; }
    .badge-pill { font-size: 0.6rem; padding: 0.15rem 0.5rem 0.15rem 0.3rem; gap: 0.15rem; }
    .badge-pill .badge-rarity,
    .badge-pill .badge-score { font-size: 0.4rem; padding: 0 6px; }
    .badge-score-stats { font-size: 0.55rem; padding: 3px 8px; }
    .badge-score-value { font-size: 0.7rem; }
    .header-actions button { width: 30px; height: 30px; }
    .header-actions button svg { width: 15px; height: 15px; }
}
