/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 云与灰主题变量（默认）。底色为纯白。 */
:root {
    /* 动态对比度系统 */
    --light-text: #ffffff;
    --dark-text: #000000;
    --medium-text: #495057;
    --auto-text-on-light: var(--dark-text);
    --auto-text-on-dark: var(--light-text);
    --auto-text-on-medium: var(--dark-text);
    
    --theme-bg: #ffffff;
    --theme-bg-secondary: #f8f9fa;
    --theme-bg-tertiary: #e9ecef;
    --theme-text: #000000;
    --theme-text-secondary: #495057;
    --theme-text-muted: #6c757d;
    --theme-border: #e9ecef;
    --theme-border-strong: #dee2e6;
    --theme-border-focus: #000000;
    --theme-input-bg: #ffffff;
    --theme-input-border: #dee2e6;
    --theme-btn-bg: #000000;
    --theme-btn-hover: #333333;
    --theme-btn-text: #ffffff;
    --theme-btn-disabled-bg: #6c757d;
    --theme-card-bg: #ffffff;
    --theme-result-bg: #ffffff;
    --theme-result-border: #dee2e6;
    --theme-result-hover-bg: #f8f9fa;
    --theme-shadow: 0 2px 10px rgba(0,0,0,0.05);
    --theme-shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
    --theme-modal-backdrop: rgba(0,0,0,0.3);
}

/* 云雨灰（默认）：勾选、滑块等控件统一灰色，覆盖浏览器默认红色 */
input[type="checkbox"],
.opt-cb,
.lib-cb,
.eg-cb,
.group-cb,
.element-group-cb {
    accent-color: #6c757d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--theme-bg);
    color: var(--theme-text);
    line-height: 1.6;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
/* 所有显示 emoji 的元素用系统 emoji 字体，避免显示成方框 □ */
.tool-icon-emoji,
.toolbox-btn-icon,
.emoji-chip,
.blindbox-emoji,
.jar-emoji,
.seed-emoji,
.basket-item-emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* 屏幕管理 */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.screen.hidden {
    display: none;
}

/* 口令锁页面 */
#auth-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--theme-bg-secondary);
}

.auth-container {
    text-align: center;
    padding: 2rem;
    background: var(--theme-card-bg);
    border-radius: 10px;
    box-shadow: var(--theme-shadow-lg);
    max-width: 400px;
    width: 90%;
}

.auth-container h1 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--theme-text-secondary);
}

.auth-form p {
    margin-bottom: 1rem;
    color: #666;
}

#password-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

#password-input:focus {
    outline: none;
    border-color: #333;
}

#auth-submit {
    width: 100%;
    padding: 0.8rem;
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

#auth-submit:hover {
    background: var(--theme-btn-hover);
}

.error-message {
    color: var(--theme-text-secondary);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* 主应用布局：桌面与移动端一致，中间一栏可滚动 */
#main-app {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh; /* 移动端地址栏显隐时高度更准确 */
    position: relative;
}

/* 侧边栏：始终为覆盖层，与移动端一致（点菜单才滑出） */
.sidebar {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-right: 2px solid #495057;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1001;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    padding: 0.5rem;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.hidden {
    display: none;
}

/* 主内容区：居中单栏，与移动端同一套布局 */
.main-content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* 主内容区收窄，避免过宽 */
@media (min-width: 480px) {
    .main-content {
        max-width: 400px;
    }
}

@media (min-width: 640px) {
    .main-content {
        max-width: 420px;
    }
}

@media (min-width: 768px) {
    .main-content {
        max-width: 440px;
    }
}

@media (min-width: 1024px) {
    .main-content {
        max-width: 460px;
    }
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar-header h3 {
    font-size: 1.2rem;
}

.close-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem;
}

.sidebar-content {
    padding: 0.5rem;
}

.sidebar-section {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar-section h4 {
    margin-bottom: 0.5rem;
    color: var(--theme-text-secondary);
}

.default-fav-in-group {
    margin-bottom: 0.5rem;
}
.default-fav-in-group .default-fav-label {
    margin-right: 0.35rem;
}
.default-fav-in-group .default-favorite-select {
    min-width: 10rem;
}

.group-buttons-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.action-btn {
    width: 100%;
    padding: 0.55rem 0.8rem;
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    border: 1px solid var(--theme-border-strong);
    border-radius: 999px;
    cursor: pointer;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.action-btn:hover {
    background: var(--theme-btn-hover);
    color: var(--theme-btn-text);
    border-color: var(--theme-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.items-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 3px;
}

.sidebar-item {
    padding: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    border-radius: 6px;
    margin: 2px 4px;
    border: 1px solid #e9ecef;
    box-sizing: border-box;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sidebar-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item button {
    cursor: pointer;
}

.sidebar-item.sidebar-item-dragging {
    opacity: 0.6;
    background: #e9ecef;
    cursor: grabbing;
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    touch-action: none; /* 移动端拖拽时仅动当前项 */
}

.sidebar-item.drop-indicator {
    box-shadow: inset 0 2px 0 0 #333;
}

/* 侧边栏拖拽排序时的占位符 */
.sidebar-item.sidebar-item-placeholder {
    background: transparent;
    box-shadow: none;
    border-style: dashed;
    opacity: 0.6;
}

.item-info {
    margin-bottom: 0.5rem;
}

.item-name {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.item-count {
    font-size: 0.8rem;
    color: #505a62;
}

.item-actions {
    display: flex;
    gap: 0.3rem;
}

.action-btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn-sm:hover {
    background: #5a6268;
}

.action-btn-sm.delete {
    background: #6c757d;
}

.action-btn-sm.delete:hover {
    background: #5a6268;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 移动端：拖拽时锁定页面与侧栏滚动，避免“整页跟着动” */
body.drag-active {
    overflow: hidden;
    touch-action: none;
}
body.drag-active .main-content,
body.drag-active .sidebar-content,
body.drag-active #sidebar,
body.drag-active #sidebar .items-list {
    overflow: hidden !important;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

/* 顶部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    border-bottom: 1px solid var(--theme-border);
    background: var(--theme-card-bg);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-btn, .settings-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.menu-btn:hover, .settings-btn:hover {
    background: linear-gradient(135deg, #dee2e6 0%, #ced4da 100%);
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.history-btn {
    padding: 0.4rem 0.9rem;
    min-height: 44px;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.history-btn:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* 工具箱选择器：按钮仅 emoji，旁边单独显示当前工具标题 */
.toolbox-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

@media (min-width: 768px) {
    .toolbox-selector {
        padding: 1rem 2rem;
    }
}

.toolbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.toolbox-btn-icon {
    font-size: 1.25rem;
}

.toolbox-btn-text {
    font-weight: 500;
}

.toolbox-btn:hover {
    background: #e9ecef;
}

/* 旁边单独展示的当前工具名（每次切换/刷新时更新） */
.toolbox-current-title {
    font-weight: 700;
    font-size: 1rem;
}

/* 工具箱弹窗：emoji + 文字，不要大方块 */
.toolbox-modal .modal-content {
    padding: 0.5rem 0;
}
.toolbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.5rem;
    justify-items: center;
}
.toolbox-tool-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    width: 100%;
    max-width: 72px;
    padding: 0.4rem 0.35rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: grab;
    user-select: none;
    touch-action: none; /* 移动端拖拽时不让页面一起滚动 */
    transition: background 0.15s, transform 0.1s;
}
.toolbox-tool-icon:hover {
    background: rgba(0, 0, 0, 0.06);
}
.toolbox-tool-icon:active {
    cursor: grabbing;
}
.toolbox-tool-icon.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    cursor: grabbing;
}
.toolbox-tool-icon.drag-over {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}
.toolbox-tool-icon.active .tool-icon-emoji,
.toolbox-tool-icon.active .tool-icon-label {
    color: inherit;
}
.toolbox-tool-icon.active {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-focus);
    color: var(--theme-text);
    font-weight: 600;
}
.toolbox-tool-icon.active:hover {
    background: var(--theme-card-bg);
    border-color: var(--theme-border-strong);
}
.toolbox-tool-icon .tool-icon-emoji {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}
.toolbox-tool-icon .tool-icon-label {
    font-size: 0.68rem;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.toolbox-modal .modal {
    max-width: 420px;
}
/* 工具箱：移动端标题单行缩小适应，内容区可上下滚动 */
.toolbox-modal .modal-header h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 2.5rem);
}
@media (max-width: 480px) {
    .toolbox-modal .modal-header h3 { font-size: 1rem; }
}
/* 工具箱弹窗内容区：移动端限制高度可滚动 */
.toolbox-modal-scroll-wrap {
    max-height: min(60vh, 400px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.25rem;
    /* 隐藏系统自带滚动条，只保留自定义 bar 控制 */
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
}
.toolbox-modal-scroll-wrap::-webkit-scrollbar {
    display: none;                  /* WebKit */
}

/* 移动端专属：可拖拽的滚动条（只在需要滚动时显示） */
.toolbox-scroll-bar-wrap {
    display: none;
}
@media (max-width: 768px) {
    .toolbox-modal .modal-content {
        display: flex;
        gap: 0.5rem;
        padding-right: 0.5rem;
    }
    .toolbox-modal-scroll-wrap {
        flex: 1;
        min-width: 0;
    }
    .toolbox-scroll-bar-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: 24px;
        flex-shrink: 0;
        touch-action: none;
        align-self: stretch;
        min-height: 0;
    }
    .toolbox-scroll-bar {
        width: 8px;
        min-height: 32px;
        border-radius: 4px;
        background: rgba(0,0,0,0.2);
        cursor: grab;
        touch-action: none;
        flex-shrink: 0;
        transition: transform 0.05s ease-out;
    }
    .toolbox-scroll-bar:active {
        cursor: grabbing;
        background: rgba(0,0,0,0.35);
    }
}

/* 词库选择区 */
.library-selector {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

@media (min-width: 768px) {
    .library-selector {
        padding: 1rem 2rem;
    }
}

.selector-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.selected-libraries {
    flex: 1;
}

.selector-label {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.selected-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: linear-gradient(135deg, #ffffff 0%, #e9ecef 100%);
    border: 1px solid var(--theme-border);
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.selected-item .remove-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: 1px solid #495057;
    border-radius: 4px;
    color: white;
    padding: 0.2rem 0.4rem;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.7rem;
}

.add-btn {
    padding: 0.3rem 0.8rem;
    background: #000;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
}

.add-btn:hover {
    background: #000;
    color: white;
}

.quick-switch {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.switch-btn, .switch-select, .btn-select {
    padding: 0.5rem 0.8rem;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.switch-btn:hover, .btn-select:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.quick-switch-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 50vh;
    overflow-y: auto;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: left;
}

.quick-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #eee;
}

.quick-switch-row:last-child {
    border-bottom: none;
}

.quick-switch-item-wrap {
    flex: 1;
    min-width: 0;
}
.quick-switch-binding {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.3;
}
.quick-switch-item {
    width: 100%;
    padding: 0.6rem 1rem;
    text-align: left;
}

.quick-switch-row-actions {
    display: flex;
    gap: 0.3rem;
}

.quick-switch-overwrite, .quick-switch-delete {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* 生成区域 */
.generation-area {
    padding: 1rem;
}

@media (min-width: 768px) {
    .generation-area {
        padding: 2rem;
    }
    
    .tool-content {
        max-width: 800px;
    }
}

/* 结果区域：白框与底部信息分离 */
.results-area {
    border-top: 1px solid var(--theme-border);
    background: var(--theme-bg);
    padding: 1rem;
}

.results-content-box {
    background: var(--theme-result-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0;
    border: 1px solid var(--theme-result-border);
    box-shadow: var(--theme-shadow);
    color: #1a1a1a;
}

.results-content-box-empty {
    display: none;
}

.results-copy-hint {
    font-size: 0.85rem;
    color: #404040;
    margin: 0 0 0.5rem 0;
}

.results-content {
    padding: 0;
}

/* 结果区词条：统一白底方格纸 + 可点击 */
.result-item {
    display: inline-block;
    margin: 0.2rem;
    padding: 0.4rem 0.7rem;
    background-color: #fff;
    background-image: linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid var(--theme-border-focus);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #1a1a1a;
    font-size: 0.9rem;
}
.result-item:hover {
    background-color: var(--theme-result-hover-bg);
    background-image: none;
    color: var(--theme-result-hover-text);
}
/* 组合框：纯色底，里面的 .result-item 才是方格纸 */
.result-item-wrap-combo {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: flex-start;
    background: #f5f5f5;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 4px;
    margin: 4px 0;
}

/* 组合生成：竖排一行一条，以：对齐，换行只在右侧 */
.result-item-wrap-combo-by-source {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
.combo-list-wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}
.combo-source-line {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem 0.5rem;
    margin-bottom: 0.35rem;
}
.combo-source-label {
    flex-shrink: 0;
    width: 7em;
    text-align: right;
    color: #333;
    font-size: 0.875rem;
    font-weight: 600;
}
.combo-source-value {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.4rem;
}
.combo-source-value .result-item {
    margin: 0;
}
.combo-source-sep,
.result-item-sep {
    color: var(--medium-text);
    font-size: 0.85rem;
    user-select: none;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: 0.7em;
}
.result-item-wrap-combo-by-source .result-combo-edit,
.result-item-wrap-combo-by-source .result-action-btn {
    flex-shrink: 0;
}

.result-item-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.3rem;
    margin: 0.4rem 0;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fafafa;
}
/* 基础生成结果区：编辑/收藏/拉黑按钮适中尺寸，与「+」同高 */
.result-item-wrap .result-combo-edit,
.result-item-wrap .result-action-btn,
.result-item-wrap-combo-by-source .result-combo-edit,
.result-item-wrap-combo-by-source .result-action-btn {
    padding: 0.22rem 0.5rem !important;
    font-size: 0.75rem !important;
    min-height: 0;
    margin-top: 0.6em;
    align-self: flex-start;
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
}
.result-item-wrap .result-combo-edit:hover,
.result-item-wrap .result-action-btn:hover,
.result-item-wrap-combo-by-source .result-combo-edit:hover,
.result-item-wrap-combo-by-source .result-action-btn:hover {
    background: var(--theme-btn-hover);
}

/* 词条圈：所有可点击的词条/元素统一带框样式 */
.entry-chip {
    display: inline-block;
    margin: 0.2rem;
    padding: 0.4rem 0.7rem;
    background: var(--theme-card-bg);
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.entry-chip:hover {
    background: #000;
    color: white;
}

.entry-chip-selected {
    border-width: 2px;
    border-color: var(--theme-border-focus);
    font-weight: 700;
    background: var(--theme-bg-tertiary);
    color: var(--theme-text);
}

.entry-chip-selected:hover {
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    border-color: var(--theme-border-strong);
}
.clickable-list {
    cursor: pointer;
    padding: 0.4rem 0.7rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: inline-block;
    margin: 0 0.2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.clickable-list:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.element-detail {
    min-width: 260px;
}

.element-detail-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.element-detail-row {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.element-detail-label {
    color: #555;
}

.element-detail-value {
    flex: 1;
    min-width: 0;
}

.elem-edit-libs-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}

.checkbox-list label.lib-cb-system {
    opacity: 0.85;
}

.checkbox-list label.lib-cb-system input:disabled {
    cursor: not-allowed;
}

.element-tags-row {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.element-tags-label {
    color: #555;
    margin-right: 0.25rem;
}

.btn-tag-inline {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: pointer;
}

.btn-tag-inline.on {
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    border-color: var(--theme-border-strong);
}

.element-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.text-muted {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.sidebar-hint,
.import-backup-hint,
.export-backup-hint {
    color: #404040;
    font-size: 0.8rem;
    margin: 0.4rem 0;
    line-height: 1.35;
}

.library-bulk-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.library-filter-checkboxes {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.library-filter-checkboxes label {
    cursor: pointer;
    white-space: nowrap;
}

.library-bulk-actions-inline {
    flex-wrap: nowrap;
    align-items: center;
}

.library-bulk-actions-inline .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.library-bulk-actions-inline #library-bulk-actions {
    display: inline-flex;
    gap: 0.35rem;
    margin-left: 0.5rem;
}

.library-bulk-actions-inline #library-bulk-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.element-detail h4 {
    margin-bottom: 1rem;
}

.combo-element-list {
    max-height: 200px;
    overflow-y: auto;
}

.combo-element-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 2px 0;
    transition: all 0.2s ease;
}
.combo-element-row:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.library-entries-list {
    max-height: 50vh;
    overflow-y: auto;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.library-entry-row {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0.2rem 0;
}

.library-entry-row.system-entry {
    display: flex;
    flex-wrap: wrap;
}

.library-entry-row .entry-chip {
    margin: 0;
}

.entry-tags {
    display: inline-flex;
    gap: 0.2rem;
}

.btn-tag {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
}

.btn-tag.on {
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    border-color: var(--theme-border-strong);
}

.default-fav-section {
    margin-bottom: 1rem;
}

.default-favorite-select {
    width: 100%;
    padding: 0.5rem 0.8rem;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.default-favorite-select:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 禁止所有 select 原生展开样式 */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.8rem;
}

/* 美化效果：展开选择 */
.theme-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.theme-current-name {
    font-size: 0.85rem;
    color: var(--theme-text-muted);
    font-weight: 500;
}
.theme-select-wrap {
    padding: 0.25rem 0;
}
.theme-select-label {
    font-size: 0.8rem;
    color: #404040;
    margin-bottom: 0.6rem;
}
.theme-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.theme-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-bg-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.theme-option:hover {
    border-color: var(--theme-border-strong);
    background: var(--theme-bg-tertiary);
    box-shadow: var(--theme-shadow);
}
.theme-option.active {
    border-color: var(--theme-border-focus);
    background: var(--theme-card-bg);
    box-shadow: 0 0 0 2px var(--theme-border-focus);
    color: var(--theme-text);
}
.theme-option-name {
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 0.2rem;
}
.theme-option-desc {
    font-size: 0.8rem;
    color: #404040;
    line-height: 1.4;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-list label {
    cursor: pointer;
}

.single-column-selector {
    max-height: 60vh;
    overflow-y: auto;
}

.selector-section {
    margin-bottom: 1rem;
}

.selector-section .column-title {
    padding: 0.5rem 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a1a;
}

.selector-section .column-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.column-list .selector-item {
    display: block;
    padding: 0.4rem 0;
}

.two-column-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.selector-column {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.column-title {
    padding: 0.5rem;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a1a;
}

.column-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem;
}

.system-options-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.system-options-row.hidden {
    display: none;
}

.system-options-row label {
    margin: 0;
    cursor: pointer;
}

.emoji-options-row {
    flex-wrap: wrap;
    align-items: flex-start;
}
.emoji-options-row.hidden {
    display: none;
}
.emoji-filter-primary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.btn-emoji-filter-toggle {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-emoji-filter-toggle:hover {
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-strong);
}
.emoji-edit-options {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}
.emoji-edit-options .checkbox-label { margin-right: 0.75rem; }
.emoji-filter-in-edit { margin-top: 0.5rem; }
.emoji-category-filter-wrap {
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
}
.emoji-category-filter-wrap.hidden {
    display: none !important;
}
.emoji-category-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}
.emoji-category-actions .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}
.emoji-category-tree {
    max-height: 11rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.emoji-cat-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.emoji-cat-parent-row {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.emoji-cat-fold {
    cursor: pointer;
    user-select: none;
    width: 1.2em;
    text-align: center;
    font-size: 0.85em;
    color: #666;
    flex-shrink: 0;
}
.emoji-cat-fold:hover {
    color: #333;
}
.emoji-cat-children {
    margin-left: 0.8em;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.emoji-cat-group-collapsed .emoji-cat-children {
    display: none;
}
.emoji-cat-item {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-size: 0.88rem;
    padding: 0.2rem 0;
}
.emoji-cat-item input {
    margin-right: 0.4rem;
    flex-shrink: 0;
}

.emoji-settings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.emoji-chip {
    font-size: 1.5rem;
    padding: 0.25rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.emoji-chip:hover {
    background: #e9ecef;
}

.emoji-chip.emoji-blacklisted {
    opacity: 0.4;
    background: var(--theme-bg-tertiary);
    border-color: var(--theme-border-strong);
}

.emoji-settings-row .text-muted.small {
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .two-column-selector {
        grid-template-columns: 1fr;
    }
}

/* 页脚 */
.footer {
    padding: 2rem 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--theme-border);
    background: var(--theme-bg-secondary);
    font-size: 0.8rem;
    color: var(--theme-text-muted);
    text-align: center;
    margin-top: auto;
}

.footer > div {
    margin-bottom: 1rem;
}

.copyable {
    cursor: pointer;
    color: #000;
    font-weight: 600;
}

.copyable:hover {
    text-decoration: underline;
}

/* 模态框（栈：关闭返回上一个） */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-container .modal {
    position: absolute;
    margin: auto;
}

.modal-stack-hidden {
    display: none !important;
}

.modal {
    background: var(--theme-card-bg);
    border-radius: 10px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-emoji {
    max-width: 560px;
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow-lg);
}

.modal-emoji .modal-header {
    border-bottom: 1px solid var(--theme-border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    font-size: 1.3rem;
}

.modal-content {
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: #000;
    color: white;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 设置页面 */
.settings-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--theme-card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-height: 90vh;
    overflow-y: auto;
}
.action-btn-danger {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}
.action-btn-danger:hover {
    background: #5a6268;
    color: #fff;
}

.history-list-area { max-height: 60vh; overflow-y: auto; }
.history-pagination-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}
.history-pagination-bar label { margin: 0; }
.history-page-size {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 4rem;
}
.history-page-info { margin-left: auto; font-size: 0.9rem; color: #6c757d; }
.history-jump-wrap { display: inline-flex; align-items: center; gap: 0.25rem; }
.history-jump-wrap label { font-size: 0.9rem; }
.history-page-jump {
    width: 3.5rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}
.history-page-prev, .history-page-next { flex-shrink: 0; }
.history-entries-list { padding: 0; margin: 0; }
.history-entry-block {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}
.history-entry-block:last-child { border-bottom: none; }
.history-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.history-entry-meta { font-size: 0.85rem; color: #404040; }
.history-entry-results {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.history-entry-delete { flex-shrink: 0; }

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.setting-section {
    margin-bottom: 2rem;
}

.setting-section h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.setting-details {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.setting-summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    list-style: none;
    background: #f8f9fa;
}

.setting-summary::-webkit-details-marker {
    display: none;
}

.setting-summary::after {
    content: ' ▼';
    font-size: 0.75em;
    opacity: 0.7;
}

.setting-details[open] .setting-summary::after {
    content: ' ▲';
}

.setting-details-content {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
}

.action-btn-more {
    padding: 0.2rem 0.4rem;
    font-size: 1rem;
    line-height: 1;
    min-width: 1.6em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }
    
    .selector-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .auth-container {
        margin: 1rem;
    }
    
    .modal {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
    
    .header {
        padding: 0.5rem;
    }
    
    .generation-area, .library-selector, .toolbox-selector {
        padding: 0.5rem;
    }
    
    .footer {
        padding: 1rem 0.5rem;
    }
    
    /* 移动端输入框字体至少 16px，避免 iOS 聚焦自动放大 */
    .form-control-sm {
        font-size: 1rem;
    }
}

/* 工具特定样式 */
.tool-content {
    background: var(--theme-card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--theme-shadow);
}

/* 生成工具标题与文字：适应性字号，尽量单行展示更紧凑 */
.tool-content h1,
.tool-content h2,
.tool-content h3 {
    line-height: 1.25;
    margin-bottom: 0.6rem;
}

@media (max-width: 768px) {
    .tool-content h1,
    .tool-content h2,
    .tool-content h3 {
        font-size: clamp(1rem, 3.2vw + 0.4rem, 1.25rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .toolbox-btn-text,
    .toolbox-current-title {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .header h1 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 心有灵犀：通用——整块浅底 + 所有文字强制深色，避免被注入样式或继承盖掉 */
.telepathy-tool-content,
.telepathy-tool-content * {
    color: #1a1a1a !important;
}
.telepathy-tool-content {
    background: #f0f0f2 !important;
}
.telepathy-slots-area,
.telepathy-pool-area {
    background: #ebebee !important;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.5rem 0;
}
.telepathy-pool-legend { font-size: 0.85rem; margin-bottom: 0.5rem; }
.telepathy-pool-hint { margin-bottom: 0.35rem; }
.telepathy-pool-chip,
.telepathy-slot-chip {
    background: #f5f5f7 !important;
    border: 2px solid #e0e0e4;
}
.telepathy-pool-chip:hover,
.telepathy-slot-chip:hover {
    background: #e8e8ec !important;
    border-color: #d0d0d6;
}
/* 灰色“完全不对”芯片：深底保留浅字 */
.telepathy-tool-content .telepathy-pool-chip.telepathy-pool-absent {
    background: #6c6c6c !important;
    color: #f5f5f5 !important;
}
.telepathy-new-game {
    color: #f5f5f5 !important; /* 云雨灰主题下，黑色按钮上的文字改为浅色 */
}
.telepathy-win {
    background: #f0f0f2 !important;
}

/* 挖矿：柔和灰底 + 背包/生成结果用深字，避免白底浅字 */
.mining-tool-content {
    background: #f0f0f2 !important;
    color: #1a1a1a !important;
}
.mining-hint,
.mining-stamina-text,
.mining-map-label,
.mining-backpack-label,
.mining-backpack-empty { color: #333 !important; }
.mining-map-empty { background: #ebebee !important; color: #404040 !important; }
.mining-backpack-area,
.mining-backpack-items,
.mining-backpack-item,
.mining-backpack-item-inner,
.mining-backpack-chip { color: #1a1a1a !important; }
.mining-backpack-chip { background: #ebebee !important; border-color: #888 !important; }
.mining-backpack-chip:hover { background: #e0e0e4 !important; color: #1a1a1a !important; }
.mining-backpack-sep { color: #555 !important; }

.form-group {
    margin-bottom: 1rem;
}
.basic-quick-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.basic-quick-actions .checkbox-label { display: inline-flex; align-items: center; gap: 0.3rem; margin: 0; cursor: pointer; }
.result-quick-fav, .result-quick-blacklist { margin-left: 0.15rem; }

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: #333;
}

.library-sort-row {
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.library-sort-label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    font-size: 0.85rem;
    color: #404040;
}
.library-sort-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--theme-input-border);
    border-radius: 4px;
    min-width: 5rem;
    background: var(--theme-input-bg);
}
.library-sort-select:focus {
    outline: none;
    border-color: var(--theme-border-focus);
}

.search-row .search-input-wrap {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.search-row .search-input-wrap .form-control {
    flex: 1;
    min-width: 0;
}
.search-row .search-input-wrap .btn {
    flex-shrink: 0;
}

.form-control {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--theme-input-border);
    border-radius: 5px;
    font-size: 1rem; /* >=16px 避免 iOS 聚焦时自动放大 */
    background: var(--theme-input-bg);
    color: var(--theme-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--theme-border-focus);
}

/* 全局去掉 number 输入的上下箭头，移动端难点击且占空间 */
input[type="number"] {
    -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.generate-btn {
    width: 100%;
    padding: 1rem;
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.generate-btn:hover {
    background: var(--theme-btn-hover);
    border-color: var(--theme-border-strong);
}

.generate-btn:disabled {
    background: var(--theme-btn-disabled-bg);
    cursor: not-allowed;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 0.6s ease-in-out;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 盲盒：设置可展开收起，白色抽取区，居中摇一摇 */
.blindbox-settings {
    margin-bottom: 1rem;
}
.blindbox-settings summary {
    cursor: pointer;
    font-weight: 500;
    color: #555;
    padding: 0.25rem 0;
}
.blindbox-config {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #e9ecef;
    border-radius: 6px;
}
.blindbox-config-compact {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.blindbox-config-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}
.blindbox-config-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.blindbox-config-row label {
    font-size: 0.8rem;
    color: #555;
    white-space: nowrap;
}
.blindbox-config-row .form-control,
.blindbox-config-row .form-control-sm {
    width: 3.5rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.85rem;
}
.form-control-sm {
    width: auto;
    min-height: 28px;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
}

.blindbox-result-area {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #212529;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    min-height: 160px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.blindbox-touch-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 10px;
}
.blindbox-touch-bubble {
    position: absolute;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.9;
    animation: blindbox-touch-bubble-float 0.9s ease-out forwards;
}
@keyframes blindbox-touch-bubble-float {
    0% { transform: translateY(0) scale(0.6); opacity: 0.9; }
    100% { transform: translateY(-80px) scale(1); opacity: 0; }
}
.blindbox-stage-touch {
    gap: 0.5rem;
}

.blindbox-stage {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}
.blindbox-stage-visible .blindbox-item {
    animation: blindbox-appear 0.35s ease-out;
}
.blindbox-item.blindbox-item--shake {
    animation: blindbox-shake 0.8s ease-in-out;
}

.blindbox-item {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    background: linear-gradient(145deg, #f0f0f0 0%, #e5e5e5 100%);
}
.blindbox-item.rare {
    background: linear-gradient(145deg, #fff8e1 0%, #ffecb3 100%);
    border: 2px solid #ffb74d;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.25);
}

.blindbox-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.blindbox-cover.opened {
    position: absolute;
    inset: 0;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}
.blindbox-emoji {
    font-size: 2.6rem;
    line-height: 1;
}

.blindbox-rare-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    border-radius: 14px;
}
.blindbox-rare-bubble {
    position: absolute;
    bottom: 20%;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.95;
    animation: blindbox-bubble-float 0.7s ease-out forwards;
}
@keyframes blindbox-bubble-float {
    0% { transform: translateY(0) scale(0.7); opacity: 0.95; }
    100% { transform: translateY(-60px) scale(1); opacity: 0; }
}

.blindbox-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}
.blindbox-content.hidden {
    display: none;
}
.blindbox-content .box-element {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    margin: 0.05rem 0;
    color: #333;
    line-height: 1.2;
}

.blindbox-slip {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    max-width: 92%;
}
.blindbox-slip.hidden {
    display: none;
}
.blindbox-slip-sparkles {
    position: absolute;
    inset: -8px;
    pointer-events: none;
    overflow: visible;
    border-radius: 12px;
}
.blindbox-slip-sparkle {
    position: absolute;
    bottom: 0;
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.9;
    animation: blindbox-slip-sparkle 0.5s ease-out forwards;
}
@keyframes blindbox-slip-sparkle {
    0% { transform: translateY(0) scale(0.6); opacity: 0.9; }
    100% { transform: translateY(-40px) scale(1); opacity: 0; }
}
.blindbox-slip-inner {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #495057;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.blindbox-slip--rare .blindbox-slip-inner {
    border: 2px solid #ffb74d;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.25);
}
.blindbox-slip-title {
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 0.4rem;
}
.blindbox-slip-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.blindbox-slip-chip {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #212529;
    transition: all 0.2s ease;
}
.blindbox-slip-chip:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.blindbox-slip-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #495057;
    color: #212529;
}
.blindbox-slip-btn:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #343a40;
    color: #212529;
}

.blindbox-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.blindbox-draw-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.blindbox-draw-row .form-control {
    width: auto;
    min-width: 100px;
}
.blindbox-open-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@keyframes blindbox-appear {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes blindbox-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px) rotate(-2deg); }
    30% { transform: translateX(6px) rotate(2deg); }
    45% { transform: translateX(-4px) rotate(-1deg); }
    60% { transform: translateX(4px) rotate(1deg); }
    75% { transform: translateX(-2px); }
}

/* 抽卡样式（与盲盒类似：白底结果区、牌背点击翻开、纸条） */
.gacha-result-area {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #212529;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    min-height: 160px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.gacha-settings {
    margin-bottom: 1rem;
}
.gacha-settings summary {
    cursor: pointer;
    font-weight: 500;
    color: #555;
    padding: 0.25rem 0;
}
.gacha-config {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #e9ecef;
    border-radius: 6px;
}
.gacha-config-compact {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.gacha-config-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}
.gacha-config-row { display: flex; align-items: center; gap: 0.35rem; }
.gacha-config-row label { min-width: 4em; margin: 0; font-size: 0.85rem; }
.gacha-config-row .form-control-sm { width: 4rem; }
.gacha-pity-display {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #333;
}
.gacha-pity-display strong { margin: 0 0.15em; }

.gacha-stage {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}
.gacha-stage-visible .gacha-item {
    animation: gacha-appear 0.35s ease-out;
}
.gacha-item {
    position: relative;
    width: 72px;
    height: 100px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    perspective: 320px;
    overflow: hidden;
}
.gacha-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}
.gacha-item.flipped .gacha-item-inner {
    transform: rotateY(180deg);
}
.gacha-cover,
.gacha-content {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gacha-cover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #dee2e6;
}
.gacha-cover.rare {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #212529;
    border: 2px solid #d4a84b;
}
.gacha-cover.opened {
    pointer-events: none;
}
.gacha-cover-icon { font-size: 2rem; line-height: 1; }
.gacha-content {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #dee2e6;
    padding: 0.35rem;
}
.gacha-item.rare .gacha-content {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #212529;
    border: 2px solid #d4a84b;
    box-shadow: 0 0 8px rgba(212, 168, 75, 0.2);
}
.gacha-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
    background: rgba(0,0,0,0.15);
    color: #333;
}
.gacha-item.rare .gacha-badge {
    background: rgba(0,0,0,0.2);
    color: #1a1a1a;
}
.gacha-content-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.65rem;
    color: #111;
    text-align: center;
    padding-top: 0.5rem;
}
.gacha-element { font-weight: 600; }
.gacha-rare-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    border-radius: 8px;
}
.gacha-rare-bubble {
    position: absolute;
    bottom: 20%;
    font-size: 0.9rem;
    animation: blindbox-bubble-float 0.7s ease-out forwards;
}

.gacha-slip {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    max-width: 92%;
}
.gacha-slip.hidden { display: none; }
.gacha-slip-sparkles {
    position: absolute;
    inset: -8px;
    pointer-events: none;
    overflow: visible;
    border-radius: 12px;
}
.gacha-slip-sparkle {
    position: absolute;
    bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    animation: blindbox-slip-sparkle 0.5s ease-out forwards;
}
.gacha-slip-inner {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #495057;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.gacha-slip--rare .gacha-slip-inner {
    border: 2px solid #ffb74d;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.25);
}
.gacha-slip-title { font-size: 0.8rem; color: #333; margin-bottom: 0.4rem; }
.gacha-slip-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.gacha-slip-chip {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #212529;
    transition: all 0.2s ease;
}
.gacha-slip-chip:hover { 
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%); 
    border-color: #495057; 
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.gacha-slip-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #495057;
    color: #212529;
}
.gacha-slip-btn {
    color: #212529;
}
.gacha-slip-btn:hover { 
    background: #e9ecef; 
    color: #000000;
    border-color: #495057;
}

.gacha-bottom { display: flex; flex-direction: column; gap: 0.5rem; }
.gacha-draw-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gacha-open-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gacha-open-actions.hidden { display: none; }

@keyframes gacha-appear {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}

/* 抽签样式 */
.fortune-area {
    text-align: center;
    margin: 2rem 0;
}

.fortune-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    border: 3px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.fortune-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.fortune-box.shaking {
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.fortune-sticks {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.fortune-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    color: #495057;
    max-width: 150px;
    line-height: 1.3;
}

.fortune-card {
    background: var(--theme-card-bg);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-top: 1rem;
    border: 1px solid #eee;
}

.fortune-sign {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
}

.fortune-result-content {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.fortune-result-chip {
    display: inline-block;
    margin: 0 0.15em;
    padding: 0.2em 0.4em;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #111;
}

.fortune-footer {
    text-align: center;
}

/* 星座运势样式 */
.horoscope-list {
    margin-top: 1rem;
}

.horoscope-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.horoscope-item {
    background: var(--theme-card-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.horoscope-item.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.horoscope-item.horoscope-rank-1 {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #212529;
    border: 2px solid #c9a227;
}
.horoscope-item.horoscope-rank-2 {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 2px solid #a0a0a0;
}
.horoscope-item.horoscope-rank-3 {
    background: linear-gradient(135deg, #fdf6e3 0%, #f4e5d3 100%);
    color: #212529;
    border: 2px solid #b87333;
}

.horoscope-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.zodiac-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.zodiac-symbol {
    font-size: 1.5rem;
}

.zodiac-details h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.zodiac-details small {
    color: #6c757d;
    font-size: 0.8rem;
}

.rank-display {
    font-size: 1.2rem;
    line-height: 1;
}
.rank-display.rank-num {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}
.zodiac-rank .rank-display:not(:empty) {
    display: inline-block;
}

.horoscope-fortune {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
}
.horoscope-fortune-chip {
    display: inline-block;
    padding: 0.25em 0.5em;
    border-radius: 999px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    font-size: 0.85rem;
}
.horoscope-fortune-chip:hover {
    background: #e5e5e5;
    border-color: #ccc;
}
.horoscope-fortune-empty {
    color: var(--medium-text);
}

/* 组合生成器样式 */
.combo-config .form-group {
    background: #f8f9fa;
    padding: 0.8rem;
    border-radius: 5px;
    margin-bottom: 0.8rem;
}

.combo-config label {
    color: #495057;
    font-weight: 600;
}

/* 色彩生成器：与基础/组合生成器一致的 form-group + generate-btn */
.color-tool-content {
    max-width: 100%;
}

.color-tool-content .form-group {
    margin-bottom: 0.75rem;
}

.color-tool-content .form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    color: #333;
}

.color-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0.5rem 0 0.75rem 0;
}

.color-blocks {
    margin-top: 0.25rem;
}

.color-blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 0.5rem;
}

.color-block {
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    position: relative;
    border: 2px solid rgba(0,0,0,0.06);
}

.color-block:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.color-block--fixed {
    border: 3px solid #333;
    outline: 2px solid #333;
    outline-offset: 3px;
    box-shadow: none;
}

.color-detail {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.color-detail.hidden {
    display: none;
}

.color-detail-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.4rem;
}

.color-detail-row {
    font-family: ui-monospace, 'SF Mono', monospace;
    font-size: 0.875rem;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    transition: background 0.15s;
    color: #212529;
}

.color-detail-row:hover {
    background: rgba(0,0,0,0.06);
}

/* 自定义颜色区块 */
.color-fixed-section {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.color-fixed-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.color-fixed-section .color-sidebar-title {
    margin-bottom: 0;
}

.color-fixed-section .color-current-swatch {
    position: static;
    flex-shrink: 0;
}

.color-sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
}

/* 角落实时当前色 */
.color-current-swatch {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    border: 2px solid rgba(0,0,0,0.12);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: background-color 0.05s ease-out;
}

/* 色盘：拖动选色相+饱和度，中心灰边沿饱和 */
.color-wheel-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 0.75rem;
    cursor: crosshair;
    touch-action: none;
}

.color-wheel-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    --pick-l: 55%;
    background: radial-gradient(
        circle at center,
        hsl(0, 0%, var(--pick-l)) 0%,
        transparent 65%
    ), conic-gradient(
        hsl(0, 100%, 50%),
        hsl(60, 100%, 50%),
        hsl(120, 100%, 50%),
        hsl(180, 100%, 50%),
        hsl(240, 100%, 50%),
        hsl(300, 100%, 50%),
        hsl(360, 100%, 50%)
    );
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.06);
}

.color-wheel-handle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 2px solid #333;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    pointer-events: none;
    will-change: transform;
}

.color-sliders {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.color-slider-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.color-slider-row label {
    width: 1.25em;
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
    margin: 0;
    flex-shrink: 0;
}

.color-slider-row input[type="range"] {
    flex: 1;
    min-width: 0;
    height: 6px;
    border-radius: 3px;
    accent-color: #495057;
    cursor: pointer;
}

.color-slider-num {
    width: 4.5rem;
    min-width: 4.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.875rem;
    font-family: ui-monospace, monospace;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
}

.color-slider-num:focus {
    outline: none;
    border-color: #495057;
}

.color-values-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.color-copy-value {
    font-family: ui-monospace, monospace;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #e9ecef;
    cursor: pointer;
    color: #495057;
    transition: background 0.15s, border-color 0.15s;
}

.color-copy-value:hover {
    background: #f1f3f5;
    border-color: #dee2e6;
}

.color-hex-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.color-hex-input {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    padding: 0.45rem 0.6rem;
    font-family: ui-monospace, 'SF Mono', monospace;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
}

.color-hex-input:focus {
    outline: none;
    border-color: #495057;
}

/* 色彩工具按钮统一样式 */
.color-btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.color-btn-generate {
    background: #495057;
    color: #fff;
}

.color-btn-generate:hover {
    background: #343a40;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.color-btn-add {
    background: #333;
    color: #fff;
}

.color-btn-add:hover {
    background: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-btn-shuffle {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    color: #212529;
    border: 1px solid #333;
}

.color-btn-shuffle:hover {
    background: #f5f5f5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.color-combo-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-btn-save {
    background: #333;
    color: #fff;
}

.color-btn-save:hover {
    background: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-custom-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.color-custom-chip {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.12);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.color-custom-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: #495057;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.color-custom-remove:hover {
    background: #343a40;
}

/* 搭配效果：多种展示 */
.color-combo {
    margin-top: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.color-combo.hidden {
    display: none;
}

.color-combo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.color-combo-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
}

.color-previews {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
}

.color-preview-item-circles {
    grid-column: 1 / -1;
}

@media (max-width: 520px) {
    .color-previews {
        grid-template-columns: 1fr;
    }
    .color-preview-item-circles {
        grid-column: 1;
    }
}

.color-preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.color-preview-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
}

.color-preview-bar {
    display: flex;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
}

.color-preview-swatch {
    flex: 1;
    min-width: 4px;
}

.color-preview-gradient {
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
}

/* 圆环：整圆 conic 渐变 */
.color-preview-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.color-preview-circles {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    min-height: 48px;
    padding: 4px 0;
}

.color-preview-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.12);
    margin-left: -14px;
    position: relative;
    flex-shrink: 0;
}

.color-preview-circle:first-child {
    margin-left: 0;
}

/* 色彩收藏夹 */
.color-favorites-section {
    margin-top: 1.25rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.color-favorites-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.35rem;
}

.color-favorites-hint {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0 0 0.75rem 0;
}

.color-favorites-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-favorites-empty {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

.color-favorite-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.color-favorite-item:hover {
    background: #f1f3f5;
    border-color: #dee2e6;
}

.color-favorite-bar {
    flex: 1;
    display: flex;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    min-width: 0;
}

.color-favorite-bar .color-preview-swatch {
    min-width: 6px;
}

.color-favorite-name {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #495057;
    max-width: 12em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.color-favorite-remove {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: #6c757d;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.color-favorite-remove:hover {
    background: #495057;
}

.color-favorite-item--active {
    border-color: #333;
    background: #f0f0f0;
    box-shadow: 0 0 0 2px #333;
}

.color-favorites-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    flex-wrap: nowrap;
    font-size: 0.75rem;
}

.color-favorites-pagination.hidden {
    display: none;
}

.color-btn-pagination {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.75rem !important;
    min-height: 0;
    background: #333;
    color: #fff;
}

.color-btn-pagination:hover:not(:disabled) {
    background: #000;
}

.color-btn-pagination:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.color-favorites-total {
    font-size: 0.75rem;
    color: #495057;
    margin-right: 0.15rem;
    white-space: nowrap;
}

.color-favorites-page-info {
    font-size: 0.75rem;
    color: #495057;
    white-space: nowrap;
}

.color-fav-page-input {
    width: 2.25rem;
    padding: 0.15rem 0.2rem;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    margin: 0 0.1rem;
}

.color-fav-page-input:focus {
    outline: none;
    border-color: #333;
}

/* 元素管理样式 */
.system-settings {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.system-settings label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-top: 0.5rem;
}

.search-results-header {
    padding: 0.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 0.9rem;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.elements-grid {
    padding: 0.5rem;
}

.element-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.element-item:hover {
    background: #f8f9fa;
}

.element-item.blacklisted {
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-muted);
}

.element-item:last-child {
    border-bottom: none;
}

.element-name {
    font-weight: 500;
}

.element-actions {
    display: flex;
    gap: 0.3rem;
}

.btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-sm.btn-success {
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
}

.btn-sm.btn-success:hover {
    background: var(--theme-btn-hover);
}

.btn-sm.btn-danger {
    background: #6c757d;
    color: #fff;
}

.btn-sm.btn-danger:hover {
    background: #5a6268;
}

/* 分组管理样式 */
.combinations-selector {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.no-combinations {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.combinations-list {
    padding: 0.5rem;
}

.select-all-row {
    padding: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.select-all-row label {
    font-weight: 600;
    margin: 0;
}

.combination-item {
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.combination-item:last-child {
    border-bottom: none;
}

.combination-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
}

.combination-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 黑名单管理样式 */
.blacklist-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.blacklist-items {
    max-height: 400px;
    overflow-y: auto;
}

.blacklist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.blacklist-item:hover {
    background: #f8f9fa;
}

.blacklist-item-actions-inline {
    margin-left: 0.5rem;
    display: inline-flex;
    gap: 0.25rem;
}

.blacklist-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-name {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.2rem;
}

.item-source {
    font-size: 0.8rem;
    color: #6c757d;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.empty-list {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.blacklist-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.btn-warning {
    background: #adb5bd;
    color: var(--theme-text);
}

.btn-warning:hover {
    background: #6c757d;
    color: #fff;
}

.btn-warning:disabled {
    background: #6c757d;
    color: #fff;
    cursor: not-allowed;
}

/* 一掷千金样式 */
.shop-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.shop-restart-area {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #dee2e6;
    text-align: center;
}

.shop-restart-btn {
    min-width: 7rem;
}

.shop-tool-content {
    max-width: 720px;
}
.shop-settings-panel {
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}
.shop-settings-title {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}
.shop-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}
.shop-setting-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #333;
}
.shop-setting-row input {
    width: 4.5rem;
    padding: 0.25rem 0.4rem;
}
.shop-event-weights-title {
    font-size: 0.85rem;
    color: #404040;
    margin-bottom: 0.5rem;
}
.shop-events-settings {
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
}
.shop-events-settings summary {
    cursor: pointer;
    color: #333;
    font-size: 0.95rem;
}
.shop-prob-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
}
.shop-prob-grid label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #333;
}
.shop-prob-grid input {
    width: 3rem;
    padding: 0.2rem 0.35rem;
}
.shop-event-discount-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.75rem 0;
}
.shop-event-discount-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.shop-event-discount-item .item-name { font-weight: 600; }
.shop-event-discount-item .item-original { text-decoration: line-through; color: #505a62; }
.shop-event-discount-item .item-off { color: var(--theme-text-secondary); font-weight: 600; }
.shop-event-discount-item .item-now { color: var(--theme-text); font-weight: 600; }
.shop-modal-balance {
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 0.5rem;
}
.shop-event-auction-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}
.shop-event-auction-row #shop-auction-current {
    font-weight: 700;
    min-width: 3rem;
}
.shop-scratch-wrap { margin: 0.5rem 0; }
.shop-scratch-body {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.shop-scratch-card {
    background: #1a1a1a;
    border: none;
    border-radius: 10px;
    min-width: 240px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.shop-scratch-card:hover:not(.scratch-done) { background: #252525; }
.shop-scratch-card.scratch-bought:not(.scratch-done) {
    background: #9e9e9e;
}
.shop-scratch-card.scratch-bought:hover:not(.scratch-done) { background: #b0b0b0; }
.shop-scratch-card.scratch-done {
    cursor: default;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
}
.shop-scratch-card:not(.scratch-done) .shop-scratch-placeholder,
.shop-scratch-card:not(.scratch-done) .shop-scratch-price-inline {
    color: #fff;
}
.shop-scratch-card .shop-scratch-placeholder {
    font-size: 1rem;
    user-select: none;
}
.shop-scratch-card .shop-scratch-placeholder.hidden { display: none; }
.shop-scratch-card .shop-scratch-price-inline {
    font-size: 0.85rem;
}
.shop-scratch-card .shop-scratch-price-inline.hidden { display: none; }
.shop-scratch-card.scratch-done .shop-scratch-reveal {
    color: #1a1a1a;
}
.shop-scratch-card .shop-scratch-reveal {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}
.shop-scratch-card .shop-scratch-reveal.hidden { display: none; }
.shop-scratch-awards {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.shop-scratch-awards-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.shop-scratch-award-row { margin: 0.25rem 0; }
.shop-scratch-price { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #ddd; }
.shop-scratch-result {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0.5rem 0;
}
.shop-scratch-grid { margin: 0.5rem 0; }
.shop-scratch-once {
    display: block;
    margin: 1rem auto;
    padding: 0.6rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
    cursor: pointer;
    transition: all 0.2s ease;
}
.shop-scratch-once:hover:not(:disabled) {
    border-color: var(--theme-border-focus);
    background: var(--theme-bg-tertiary);
}
.shop-scratch-once:disabled { cursor: default; opacity: 0.8; }
.shop-scratch-result-text {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-top: 0.75rem;
    color: #333;
}
.shop-scratch-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.shop-scratch-slot {
    width: 3rem;
    height: 3rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 0.9rem;
}
.shop-scratch-slot:hover:not(.revealed) { background: #e0e0e0; }
.shop-scratch-slot.revealed { cursor: default; }
.shop-scratch-total { font-weight: 600; margin-top: 0.5rem; }
.catch-gift-box-area { margin-top: 1rem; padding: 0.75rem; background: #f8f9fa; border-radius: 8px; }
.catch-gift-box-label { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.catch-gift-box-items { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 2rem; margin-bottom: 0.5rem; }
.catch-gift-combo {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.6rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}
.catch-gift-combo {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
}
.catch-gift-combo:hover { 
    border-color: #495057; 
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.catch-gift-element {
    display: inline-block;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.catch-gift-element {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    color: #212529;
}
.catch-gift-element:hover { 
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%); 
    color: #000000;
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.catch-gift-sep { color: #495057; user-select: none; pointer-events: none; margin: 0 0.15rem; }
.catch-gift-item { 
    padding: 0.25rem 0.5rem; 
    background: linear-gradient(135deg, #ffffff 0%, #dee2e6 100%); 
    border: 1px solid var(--theme-border); 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.85rem; 
    transition: all 0.2s ease;
}
.catch-gift-item:hover { 
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%); 
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* 捕鱼达人礼物盒子：组合卡片 + 单个元素可点 */
.fishmaster-gift-combo {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem 0.65rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.fishmaster-gift-combo:hover { 
    border-color: #495057; 
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.fishmaster-gift-combo .catch-gift-element {
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--theme-border);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.fishmaster-gift-combo .catch-gift-element:hover { 
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%); 
    border-color: var(--theme-border-strong);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.fishmaster-gift-combo .catch-gift-sep { font-size: 0.8rem; color: var(--theme-text-muted); }
.catch-gift-box-empty { color: #9e9e9e; font-size: 0.9rem; }
.catch-clear-box-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0.75rem auto 0;
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid #dee2e6;
    background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.catch-clear-box-btn:hover {
    border-color: #adb5bd;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.catch-clear-box-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.shop-grid-size-row {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}
.shop-grid-size-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #495057;
}
.shop-grid-size-label input {
    width: 4rem;
    padding: 0.25rem 0.5rem;
}
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.player-money {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.money-label {
    font-weight: 600;
    color: #495057;
}

.money-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--theme-text);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.shop-items-2col {
    grid-template-columns: repeat(2, 1fr);
    max-width: 520px;
}

.shop-game-over {
    padding: 1rem;
    background: var(--theme-bg-tertiary);
    border: 1px solid var(--theme-border-strong);
    border-radius: 8px;
    margin-bottom: 1rem;
    color: var(--theme-text-secondary);
}

.shop-game-over.hidden {
    display: none;
}

.shop-combine-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.shop-combine-option {
    cursor: pointer;
}

.shop-combine-type {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.inventory-item-name.clickable-inv {
    cursor: pointer;
    text-decoration: underline;
}

.inventory-item-name.clickable-inv:hover {
    color: var(--theme-text);
}

.shop-item {
    background: var(--theme-card-bg);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.shop-item:hover:not(.purchased) {
    border-color: var(--theme-border-focus);
    transform: translateY(-2px);
    box-shadow: var(--theme-shadow-lg);
}

.shop-item.purchased {
    opacity: 0.6;
    background: #f8f9fa;
}

.shop-item-event {
    cursor: pointer;
    background: var(--theme-bg-secondary);
    border-color: var(--theme-border);
}
.shop-item-event:hover:not(.triggered) {
    border-color: var(--theme-border-focus);
    box-shadow: var(--theme-shadow-lg);
}
.shop-item-event.triggered {
    opacity: 0.6;
    cursor: default;
    background: #f8f9fa;
}
.shop-item-event .shop-event-placeholder { font-size: 1rem; }
.shop-item-event .item-event-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.35rem;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.item-price {
    font-size: 1rem;
    color: var(--theme-text);
    font-weight: 600;
    margin-bottom: 1rem;
}

.buy-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.buy-btn:hover:not(:disabled) {
    background: var(--theme-btn-hover);
}

.buy-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.purchased-label {
    color: var(--theme-text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.inventory-area {
    border-top: 2px solid #e9ecef;
    padding-top: 2rem;
}

.inventory-area h4 {
    margin-bottom: 1rem;
    color: #495057;
}

.inventory-items {
    min-height: 100px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.empty-inventory {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

.inventory-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-item-name {
    font-weight: 600;
    color: #333;
}

.inventory-item-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
}

.purchase-price {
    color: #6c757d;
}

.actual-value {
    color: #333;
    font-weight: 600;
}

.profit {
    font-weight: 600;
}

.profit.profit {
    color: var(--theme-text);
}

.profit.loss {
    color: var(--theme-text-muted);
}

.profit.neutral {
    color: #6c757d;
}

.sell-btn {
    padding: 0.3rem 0.8rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.sell-btn:hover {
    background: #5a6268;
}

.inventory-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.combination-result {
    text-align: center;
}

.combined-elements {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.combined-element {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--theme-bg-tertiary);
    border-radius: 15px;
    margin: 0.2rem;
}

.combination-value {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.combination-value p {
    margin: 0.3rem 0;
}

/* 心理测试样式 */
.quiz-tool-content {
    max-width: 640px;
    margin: 0 auto;
}
.quiz-setup {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.quiz-setup-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.quiz-setup-row label { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.quiz-setup-row input { width: 3.5rem; }
.quiz-setup-btn-row {
    display: block;
    width: 100%;
    flex-basis: 100%;
    margin-top: 0.5rem;
}
.quiz-start-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    cursor: pointer;
}
.quiz-start-btn:hover {
    background: var(--theme-btn-hover);
}
.quiz-start-btn:active {
    filter: brightness(0.9);
}
.quiz-setup .form-group {
    margin-bottom: 0;
}
.quiz-area {
    margin: 2rem 0;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #495057 0%, #6c757d 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.quiz-question h4 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.quiz-option {
    background: var(--theme-card-bg);
    border: 2px solid var(--theme-border);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quiz-option:hover {
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.quiz-option.selected {
    border-color: #000;
    background: var(--theme-bg-tertiary);
    transform: scale(1.05);
}

.quiz-option.not-selected {
    opacity: 0.5;
    transform: scale(0.95);
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.option-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.quiz-result-card {
    background: var(--theme-card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 1rem;
    text-align: center;
}
.quiz-result-card.quiz-result-inline { margin-top: 0; }
.quiz-result-combo-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 1.5rem 0;
    padding: 1rem;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color 0.2s, background 0.2s;
}
.quiz-result-combo-wrapper:hover {
    border-color: #000;
    background: #f8f9fa;
}

.quiz-result-elements {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.quiz-element {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-element:hover {
    border-color: #000;
    background: #f0f0f0;
    transform: translateY(-1px);
}

.quiz-sep {
    color: #505a62;
    font-size: 0.95rem;
    user-select: none;
}

.quiz-analysis {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.quiz-analysis h5 {
    margin-bottom: 1rem;
    color: #333;
}

.quiz-analysis p {
    color: #404040;
    line-height: 1.6;
    margin: 0;
}

.quiz-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* 接礼物游戏样式（主题/速度选择为黑白灰） */
.catch-game-area {
    margin: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
}

.catch-theme-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.catch-theme-label {
    font-size: 0.9rem;
    color: #495057;
    display: inline-block;
    width: 72px;          /* 用固定像素宽度，保证两行冒号在同一竖线 */
    text-align: right;
    white-space: nowrap;  /* 这四个字+冒号不换行，按钮可以换行 */
}

.catch-theme-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.catch-theme-btn {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.4rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catch-theme-btn:hover {
    border-color: #adb5bd;
    background: #f8f9fa;
}

.catch-theme-btn.selected {
    border-color: #333;
    background: #e9ecef;
}

.catch-speed-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: nowrap;
}

.catch-speed-btns {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    min-width: 0;
}

.catch-speed-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    cursor: pointer;
    color: #495057;
}

.catch-speed-btn:hover {
    border-color: #adb5bd;
    background: #f8f9fa;
}

.catch-speed-btn.active {
    border-color: #333;
    background: #e9ecef;
    color: #212529;
}

.catch-result-hint {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.game-canvas {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none; /* iOS 长按不弹系统菜单 */
}

.game-canvas-white {
    background: #f5f5f7;
    border: 1px solid #dee2e6;
}

/* 接礼物：不强制白底，跟随主题（云与灰等） */
.game-canvas-theme-bg {
    background: var(--theme-bg);
    border: 1px solid var(--theme-border);
}

/* 捕鱼达人 */
.fishmaster-area .game-controls { margin-bottom: 0.75rem; }
.fishmaster-pond {
    position: relative;
    background: linear-gradient(180deg, #87CEEB 0%, #5F9EA0 30%, #4682B4 70%, #2F4F4F 100%) !important;
    border: 1px solid #2F4F4F;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    box-shadow: inset 0 2px 8px rgba(47, 79, 79, 0.3);
}
.fishmaster-hint {
    font-size: 0.9rem;
    color: #495057;
    margin: 0 0 0.75rem 0;
}
.fishmaster-fishes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.fishmaster-fish {
    position: absolute;
    font-size: 1.6rem;
    line-height: 1;
    transition: left 0.12s linear, top 0.12s linear;
    pointer-events: none;
}
.fishmaster-net {
    position: absolute;
    font-size: 4rem;
    pointer-events: none;
    z-index: 10;
    transition: transform 0.2s ease-out;
}
.fishmaster-net.hidden { display: none; }
.fishmaster-net.casting { display: flex; align-items: center; justify-content: center; }

.basket-draggable {
    cursor: grab;
    user-select: none;
    touch-action: none; /* 移动端拖拽篮子时页面不跟着动 */
}

.basket-draggable:active {
    cursor: grabbing;
}

.falling-items {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.falling-item {
    position: absolute;
    top: -50px;
    font-size: 2rem;
    animation: fall 4s linear forwards;
    pointer-events: none;
}

@keyframes fall {
    from {
        top: -50px;
        transform: rotate(0deg);
    }
    to {
        top: 100%;
        transform: rotate(360deg);
    }
}

.basket {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    transition: left 0.05s ease;
    pointer-events: auto;
}

.basket.catch-animation {
    animation: basketBounce 0.3s ease;
}

@keyframes basketBounce {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.2); }
}

.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.game-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
}

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

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.2rem;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.catch-result-card {
    background: var(--theme-card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 1rem;
    text-align: center;
}

.catch-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.catch-element {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--theme-bg-tertiary);
    border: 1px solid var(--theme-border-strong);
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.catch-element:hover {
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    transform: translateY(-1px);
}

/* 种菜功能样式 */
.farming-tools {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.farming-tool-btn {
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
}

.farming-tool-btn:hover,
.farming-tool-btn.active {
    border-color: var(--theme-border-focus);
    background: var(--theme-bg-tertiary);
}

.farming-tool-hint {
    min-height: 1.5rem;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.farming-area {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.farming-field-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.farm-field {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1rem;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.farm-field.farm-field-grid {
    width: max-content;
    flex-shrink: 0;
}

.farm-field-grid {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    align-items: start;
}

.farm-field-grid .field-plot {
    width: 100%;
    min-width: 0;
    aspect-ratio: 1;
    height: auto;
}

.farm-field-grid.farm-field-grid--medium .field-plot {
    width: 80px;
    height: 80px;
}

.farm-field-grid.farm-field-grid--small .field-plot {
    width: 58px;
    height: 58px;
}

.farm-field-grid.farm-field-grid--tiny .field-plot {
    width: 44px;
    height: 44px;
}

.farm-field-grid--medium .plot-content,
.farm-field-grid--small .plot-content,
.farm-field-grid--tiny .plot-content {
    font-size: 1.5rem;
}

.farm-field-grid--small .plot-content,
.farm-field-grid--tiny .plot-content {
    font-size: 1.2rem;
}

.farm-field-grid--tiny .plot-content {
    font-size: 1rem;
}

.farm-field-grid--small .plot-status,
.farm-field-grid--tiny .plot-status {
    font-size: 0.65rem;
}

.field-plot {
    width: 120px;
    height: 120px;
    background: #654321;
    border: 3px solid #8B4513;
    border-radius: 10px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.field-plot.plot-wasteland {
    background: #5a4a3a;
    border-color: #6b5b4a;
}

.farming-grid-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.farming-grid-size.hidden {
    display: none !important;
}

.farming-mode-btns .farming-mode-btn-group {
    display: flex;
    gap: 0.5rem;
}

.farming-mode-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    cursor: pointer;
    color: #495057;
}

.farming-mode-btn:hover {
    border-color: #adb5bd;
}

.farming-mode-btn.active {
    border-color: var(--theme-border-focus);
    background: var(--theme-bg-tertiary);
    color: var(--theme-text);
}

.farming-seed-panel {
    margin: 0.5rem 0 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.farming-seed-panel.hidden {
    display: none !important;
}

.farming-current-seed {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.farming-current-seed span {
    font-size: 1.2rem;
}

.seed-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.seed-tab {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    cursor: pointer;
    color: #495057;
}

.seed-tab:hover {
    border-color: #adb5bd;
}

.seed-tab.active {
    border-color: var(--theme-border-focus);
    background: var(--theme-bg-tertiary);
    color: var(--theme-text);
}

.seed-tab-panels {
    min-height: 2.5rem;
}

.seed-tab-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.seed-tab-panel.hidden {
    display: none !important;
}

.seeds-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.seed-emoji {
    font-size: 1.25rem;
    padding: 0.2rem;
    cursor: pointer;
    border-radius: 6px;
    border: 2px solid transparent;
}

.seed-emoji:hover,
.seed-emoji.selected {
    border-color: var(--theme-border-focus);
    background: var(--theme-bg-tertiary);
}

.farming-basket {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.basket-label {
    display: block;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.5rem;
}
.basket-summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.basket-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2rem;
    margin-bottom: 0.5rem;
}

.basket-item {
    padding: 0.25rem 0.5rem;
    background: #f1f3f4;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.basket-item:hover {
    background: #e9ecef;
}

.basket-item-combo {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.6rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}
.basket-item-combo:hover { border-color: #000; background: #eee; }
.basket-item-emoji { margin-right: 0.2rem; }
.basket-item-combo-inner { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.1rem; }
.basket-combo-element {
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    cursor: pointer;
}
.basket-combo-element {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    color: #212529;
}
.basket-combo-element:hover { 
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%); 
    color: #000000;
    border-color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.basket-combo-sep { color: #6c757d; user-select: none; pointer-events: none; }

.basket-empty {
    color: #9e9e9e;
    font-size: 0.9rem;
}

.farming-basket-actions {
    margin-top: 0.5rem;
}

.farming-basket-actions .btn {
    font-size: 0.9rem;
}


.seeds-label {
    display: block;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.harvest-bubble {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    animation: harvestBubble 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes harvestBubble {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(1.5); }
}

.farm-field:not(.farm-field-grid) .field-plot {
    width: 150px;
    height: 150px;
}

.field-plot.ready-to-harvest {
    animation: harvest-glow 1s ease-in-out infinite alternate;
    border-color: #FFD700;
}

@keyframes harvest-glow {
    from { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    to { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.plot-content {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.plot-status {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
}
.plot-status-nowrap {
    white-space: nowrap;
}

.farming-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.harvest-card {
    background: var(--theme-card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 1rem;
    text-align: center;
}

.harvest-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.harvest-element {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--theme-bg-tertiary);
    border: 1px solid var(--theme-border-strong);
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.harvest-element:hover {
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    transform: translateY(-1px);
}

/* 十四行诗样式：云与灰主题（人生纸条见 body.theme-notes 块） */
body:not(.theme-notes) .range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body:not(.theme-notes) .range-inputs input {
    flex: 1;
}

body:not(.theme-notes) .range-inputs span {
    color: #6c757d;
    font-size: 0.9rem;
}

body:not(.theme-notes) .sonnet-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

body:not(.theme-notes) .sonnet-result {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

body:not(.theme-notes) .sonnet-paper {
    background: #fefefe;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.3s ease;
}

body:not(.theme-notes) .sonnet-paper.completed {
    border-color: var(--theme-border-focus);
    box-shadow: var(--theme-shadow-lg);
}

body:not(.theme-notes) .sonnet-check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

body:not(.theme-notes) .sonnet-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

body:not(.theme-notes) .sonnet-lines {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

body:not(.theme-notes) .sonnet-line {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: lineAppear 0.5s ease-out forwards;
}

body:not(.theme-notes) .sonnet-line:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

@keyframes lineAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body:not(.theme-notes) .line-number {
    color: #6c757d;
    font-weight: 600;
    margin-right: 0.8rem;
    min-width: 20px;
}

body:not(.theme-notes) .line-text {
    color: #333;
    line-height: 1.4;
    flex: 1;
}

body:not(.theme-notes) .sonnet-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
    text-align: center;
}

body:not(.theme-notes) .line-counter {
    color: #6c757d;
    font-size: 0.9rem;
}

body:not(.theme-notes) .sonnet-completion {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--theme-bg-tertiary);
    border-radius: 5px;
    border: 1px solid var(--theme-border);
}

body:not(.theme-notes) .completion-text {
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 0.8rem;
}

/* 词云样式 */
.wordcloud-container {
    margin-top: 1rem;
}

.wordcloud-canvas {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.wordcloud-controls {
    text-align: center;
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.wordcloud-word {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease;
    user-select: none;
    line-height: 1.25;
    white-space: nowrap;
    letter-spacing: 0.02em;
    color: #1a1a1a;
}

.wordcloud-word--placed {
    position: absolute;
}

.wordcloud-word--black {
    color: #1a1a1a;
}

.wordcloud-word:hover {
    filter: brightness(0.75);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    z-index: 10;
    position: relative;
}

/* 转盘样式 */
.wheel-container {
    text-align: center;
    margin: 2rem 0;
}

.wheel-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    /* 不用 transition，由 JS 逐帧设置 transform 做转盘动画 */
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--theme-text);
    z-index: 10;
}

.wheel-result-card {
    background: var(--theme-card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 1rem;
    text-align: center;
}

.wheel-result-card h4 {
    margin-bottom: 1rem;
    color: #333;
}

.wheel-result-card .result-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.2s;
}

.wheel-result-card .result-text:hover {
    background: #f8f9fa;
}

.wheel-result-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0.75rem 0 0.35rem 0;
}

.wheel-result-row.result-item-wrap {
    margin-bottom: 0.5rem;
}

/* 暂停挑战：简洁，快速变化时灰色不彩色 */
.pause-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0 0 0.75rem 0;
    line-height: 1.35;
}

.pause-display {
    margin-top: 1rem;
}

.pause-screen {
    width: 100%;
    min-height: 140px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    background: #f5f5f5;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.pause-screen:hover {
    background: #eee;
    border-color: #ccc;
}

.pause-screen.running {
    background: #e9ecef;
    border-color: #ced4da;
}

.pause-text {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: #495057;
    padding: 0.75rem 1rem;
    line-height: 1.4;
}

.pause-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.pause-controls .btn {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
}

.pause-captured-wrap {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
}

.pause-captured-wrap.hidden {
    display: none;
}

.pause-captured-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.4rem;
}

.pause-captured {
    min-height: 0;
}

.pause-result-row {
    margin: 0;
}

/* 主题样式：当前仅「云与灰」使用 :root 变量；后续新主题在 body 上加 .theme-xxx 并覆盖变量即可 */

/* ========== 人生纸条主题：便签纸风格，暖黄+新绿，温馨可爱 ========== */
body.theme-notes {
    --theme-bg: #faf6ed;
    --theme-bg-secondary: #f5eedf;
    --theme-bg-tertiary: #ebe2d0;
    --theme-text: #3d3829;
    --theme-text-secondary: #5c5542;
    --theme-text-muted: #7a735a;
    --theme-border: #e2d9c4;
    --theme-border-strong: #d4c9ad;
    --theme-border-focus: #7cb342;
    --theme-input-bg: #fffef9;
    --theme-input-border: #e2d9c4;
    --theme-btn-bg: #8bc34a;
    --theme-btn-hover: #7cb342;
    --theme-btn-text: #fff;
    --theme-btn-disabled-bg: #b5c99a;
    --theme-card-bg: #fffef7;
    --theme-result-bg: #fffef7;
    --theme-result-border: #e8e0ce;
    --theme-result-hover-bg: #8bc34a;
    --theme-result-hover-text: #fff;
    --theme-shadow: 0 2px 8px rgba(124, 179, 66, 0.12), 0 1px 3px rgba(210, 190, 140, 0.2);
    --theme-shadow-lg: 0 4px 16px rgba(124, 179, 66, 0.15), 0 2px 6px rgba(210, 190, 140, 0.25);
    --theme-modal-backdrop: rgba(245, 230, 200, 0.6);
    --notes-paper: #fffef7;
    --notes-tape: rgba(255, 248, 220, 0.7);
    --notes-green: #8bc34a;
    --notes-green-dark: #7cb342;
    --notes-warm: #f5e6c8;
    --notes-warm-yellow: #e8d4a0;
    --notes-warm-yellow-deep: #d4b84a;
    --notes-grid: rgba(180, 160, 100, 0.12);
}
/* 人生纸条：抽取结果里每个小元素用白色方格纸（组合框用纯色，见下方） */
body.theme-notes .result-item,
body.theme-notes .selected-item,
body.theme-notes .fortune-result-chip,
body.theme-notes .blindbox-slip-chip {
    background-color: #fff !important;
    background-image: linear-gradient(var(--notes-grid) 1px, transparent 1px), linear-gradient(90deg, var(--notes-grid) 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
}
/* 主页面与主内容区：保证背景与布局不被破坏（不写 position，侧栏保持 fixed） */
body.theme-notes #main-app {
    background: var(--theme-bg) !important;
}
body.theme-notes .main-content {
    background: var(--theme-bg) !important;
}
body.theme-notes .tool-content {
    background: var(--theme-card-bg) !important;
}
body.theme-notes .results-area {
    background: var(--theme-bg) !important;
}

/* 人生纸条：标题与标签美化（暖色 + 胶带条 + 柔影） */
body.theme-notes .header h1 {
    color: #4a4228 !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(212, 184, 74, 0.15);
    padding-left: 0.5rem;
    border-left: 4px solid var(--notes-warm-yellow-deep);
    border-radius: 0 2px 2px 0;
}
body.theme-notes .auth-container h1 {
    color: #4a4228 !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(212, 184, 74, 0.2);
    padding-bottom: 0.5rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--notes-warm-yellow-deep), transparent 70%) 1;
}
body.theme-notes .sidebar-header h3 {
    color: #4a4228 !important;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.03em;
    padding-left: 0.45rem;
    border-left: 4px solid var(--notes-green);
    border-radius: 0 2px 2px 0;
}
body.theme-notes .sidebar-section h4 {
    color: #5c5542 !important;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    padding-left: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--notes-warm-yellow-deep);
    border-radius: 0 2px 2px 0;
}
body.theme-notes .toolbox-current-title {
    color: #4a4228 !important;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 2px rgba(212, 184, 74, 0.12);
}
/* 工具箱 + 旁边标题：纸条美化 */
body.theme-notes .toolbox-selector {
    padding: 0.75rem 1rem;
    gap: 1rem;
}
body.theme-notes .toolbox-btn {
    position: relative;
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 10px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.08), 4px 4px 10px rgba(0,0,0,0.05) !important;
    padding: 0.75rem 1.1rem !important;
}
body.theme-notes .toolbox-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 8px 0;
    pointer-events: none;
}
body.theme-notes .toolbox-btn:hover {
    background: #f5f0e6 !important;
    border-color: var(--notes-green) !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1), 4px 4px 12px rgba(124, 179, 66, 0.1) !important;
}
body.theme-notes .toolbox-current-title {
    display: inline-block;
    position: relative;
    padding: 0.5rem 1rem !important;
    background: linear-gradient(135deg, #f5ecd8 0%, #ebe0c4 100%) !important;
    border: 1px solid var(--notes-warm-yellow-deep) !important;
    border-radius: 8px !important;
    box-shadow: 2px 2px 6px rgba(180, 150, 80, 0.15), 3px 3px 10px rgba(0,0,0,0.05) !important;
}
body.theme-notes .toolbox-current-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 6px 0;
    pointer-events: none;
}

/* 生成时筛选：纸条美化 */
body.theme-notes .system-options-row {
    position: relative;
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    margin-top: 0.5rem;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.06), 3px 3px 10px rgba(0,0,0,0.04) !important;
}
body.theme-notes .system-options-row::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent rgba(0,0,0,0.05) transparent;
    border-radius: 0 0 8px 0;
    pointer-events: none;
}
body.theme-notes .system-options-row label {
    color: var(--theme-text-secondary);
    font-weight: 500;
}
body.theme-notes .system-options-row .opt-cb {
    accent-color: var(--notes-green);
}
body.theme-notes .emoji-options-row {
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.06), 3px 3px 10px rgba(0,0,0,0.04) !important;
}
body.theme-notes .emoji-filter-primary {
    gap: 0.5rem 1rem;
}
body.theme-notes .btn-emoji-filter-toggle {
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 8px !important;
    color: var(--theme-text) !important;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.05) !important;
}
body.theme-notes .btn-emoji-filter-toggle:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .emoji-category-filter-wrap {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
}

body.theme-notes .selector-label {
    color: #5c5542 !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}
body.theme-notes .modal-header h3 {
    color: #4a4228 !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding-left: 0.5rem;
    border-left: 4px solid var(--notes-warm-yellow-deep);
    border-radius: 0 2px 2px 0;
}
body.theme-notes .settings-header h2,
body.theme-notes .setting-section h3 {
    color: #4a4228 !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding-left: 0.5rem;
    border-left: 4px solid var(--notes-green);
    border-radius: 0 2px 2px 0;
}
body.theme-notes .tool-content h3 {
    color: #4a4228 !important;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0 0.4rem 0.6rem;
    border-left: 4px solid var(--notes-warm-yellow-deep);
    border-radius: 0 4px 4px 0;
    text-shadow: 0 1px 2px rgba(212, 184, 74, 0.1);
}
body.theme-notes .sonnet-title {
    color: #4a4228 !important;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 2px rgba(212, 184, 74, 0.15);
}
body.theme-notes .system-options-label,
body.theme-notes .theme-select-label {
    color: #5c5542 !important;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}
body.theme-notes .theme-option-name {
    color: #4a4228 !important;
    font-weight: 700;
    letter-spacing: 0.02em;
}
body.theme-notes .setting-summary {
    font-weight: 600;
    color: #5c5542 !important;
    letter-spacing: 0.02em;
}
body.theme-notes .theme-current-name {
    color: var(--theme-text-muted) !important;
    font-weight: 500;
}
body.theme-notes .doubleblind-content h3 {
    color: #4a4228 !important;
    font-weight: 700;
    padding-left: 0.5rem;
    border-left: 4px solid var(--notes-warm-yellow-deep);
    border-radius: 0 2px 2px 0;
}
body.theme-notes .scrollpoem-desc {
    color: #5c5542 !important;
}

/* 便签纸通用造型（不含 .sidebar/.header，避免覆盖 fixed 导致主页面空） */
body.theme-notes .auth-container,
body.theme-notes .results-content-box,
body.theme-notes .modal,
body.theme-notes .modal-emoji,
body.theme-notes .settings-container,
body.theme-notes .fortune-box,
body.theme-notes .fortune-card,
body.theme-notes .sidebar-section,
body.theme-notes .shop-header,
body.theme-notes .catch-gift-box-area,
body.theme-notes .fishing-stats,
body.theme-notes .fishing-config,
body.theme-notes .blindbox-config,
body.theme-notes .doubleblind-phone,
body.theme-notes .gashapon-machine,
body.theme-notes .scrollpoem-paper,
body.theme-notes .theme-option,
body.theme-notes .result-item-wrap,
body.theme-notes .combo-list-wrap,
body.theme-notes .shop-item,
body.theme-notes .shop-game-over,
body.theme-notes .horoscope-item,
body.theme-notes .gashapon-capsule.opened .gashapon-result-card,
body.theme-notes .blindbox-slip-inner,
body.theme-notes .blindbox-content {
    position: relative;
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 6px;
    box-shadow: var(--theme-shadow), 0 1px 0 rgba(255,255,255,0.5) inset !important;
}
/* 顶栏与侧栏：只改颜色，不改 position（侧栏必须保持 fixed） */
body.theme-notes .header {
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    box-shadow: var(--theme-shadow);
}
body.theme-notes .sidebar {
    background: var(--theme-bg-secondary) !important;
    border-right: 1px solid var(--theme-border);
    box-shadow: 4px 0 20px rgba(124, 179, 66, 0.12) !important;
    /* 不设置 position，保留 base 的 position: fixed */
}
body.theme-notes .auth-container::before,
body.theme-notes .results-content-box::before,
body.theme-notes .modal::before,
body.theme-notes .modal-emoji::before,
body.theme-notes .settings-container::before,
body.theme-notes .fortune-card::before,
body.theme-notes .blindbox-slip-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 12px;
    background: var(--notes-tape);
    border-radius: 0 0 4px 4px;
    pointer-events: none;
}
body.theme-notes .scrollpoem-paper:not(:empty)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 12px;
    background: rgba(212, 184, 74, 0.25);
    border-radius: 0 0 4px 4px;
    pointer-events: none;
}
body.theme-notes .scrollpoem-paper:empty::before,
body.theme-notes .scrollpoem-paper[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #9a9068 !important;
}
body.theme-notes .auth-container { transform: rotate(-0.3deg); }
body.theme-notes .results-content-box { transform: rotate(0.2deg); }
body.theme-notes .fortune-card { transform: rotate(-0.4deg); }
body.theme-notes .theme-option { transform: rotate(0.1deg); }
body.theme-notes .theme-option.active { transform: rotate(0deg); box-shadow: 0 0 0 2px var(--notes-green); }

body.theme-notes .fortune-box {
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 50%, #ebe2d0 100%) !important;
    border: 2px solid var(--theme-border-strong) !important;
    box-shadow: var(--theme-shadow-lg), inset 0 1px 0 rgba(255,255,255,0.6) !important;
}
body.theme-notes .fortune-box:hover {
    box-shadow: 0 6px 20px rgba(124, 179, 66, 0.2), inset 0 1px 0 rgba(255,255,255,0.6) !important;
}

body.theme-notes .doubleblind-phone-frame {
    border-color: var(--theme-border-strong) !important;
    box-shadow: 0 0 0 2px var(--notes-warm-yellow-deep), 0 12px 32px rgba(0,0,0,0.12) !important;
}
body.theme-notes .doubleblind-phone-status {
    background: #4a4228 !important;
    color: #f5eedf !important;
}
body.theme-notes .doubleblind-phone {
    background: linear-gradient(180deg, #f5eedf 0%, #ebe2d0 100%) !important;
    box-shadow: none !important;
}
body.theme-notes .doubleblind-bubble-user .doubleblind-bubble-role { color: var(--notes-green-dark) !important; }
body.theme-notes .doubleblind-bubble-bot .doubleblind-bubble-role { color: var(--theme-text-muted) !important; }
body.theme-notes .doubleblind-bubble-user .doubleblind-bubble {
    background: linear-gradient(135deg, #c5e1a5 0%, #9ccc65 100%) !important;
    color: #2e3d1f !important;
    border: 1px solid #8bc34a !important;
    border-radius: 14px 14px 4px 14px !important;
    box-shadow: 0 2px 6px rgba(124, 179, 66, 0.25) !important;
}
body.theme-notes .doubleblind-bubble-bot .doubleblind-bubble {
    background: var(--notes-paper) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 14px 14px 14px 4px !important;
    box-shadow: var(--theme-shadow) !important;
}
body.theme-notes .doubleblind-input-bar {
    background: #fdfbf5 !important;
    border-top-color: var(--theme-border) !important;
}
body.theme-notes .doubleblind-input {
    background: #fdfbf5 !important;
    border-color: var(--theme-border) !important;
}
body.theme-notes .doubleblind-send-btn {
    background: var(--notes-green) !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 6px rgba(124, 179, 66, 0.3) !important;
}
body.theme-notes .doubleblind-send-btn:hover { background: var(--notes-green-dark) !important; }
body.theme-notes .doubleblind-clear-btn {
    border-radius: 12px !important;
    border: 1px solid var(--theme-border) !important;
    background: #f5f0e6 !important;
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .doubleblind-clear-btn:hover {
    background: #ebe2d0 !important;
}

body.theme-notes .gashapon-machine {
    background: linear-gradient(180deg, #fffef7 0%, #f5eedf 50%, #e8dfc8 100%) !important;
    border: 3px solid var(--theme-border-strong) !important;
    box-shadow: 0 4px 16px rgba(124, 179, 66, 0.15), inset 0 1px 0 rgba(255,255,255,0.7) !important;
}
body.theme-notes .gashapon-balls-window {
    border-color: var(--theme-border-strong) !important;
    background: linear-gradient(145deg, rgba(255,254,247,0.98) 0%, rgba(245,238,223,0.95) 100%) !important;
}
body.theme-notes .gashapon-dot-white { background: #fffef7; border-color: var(--theme-border); }
body.theme-notes .gashapon-dot-black { background: #5c5542; border-color: #3d3829; }
body.theme-notes .gashapon-dot-gray { background: #9ccc65; border-color: #7cb342; }
body.theme-notes .gashapon-handle {
    background: var(--notes-green) !important;
    border-radius: 8px !important;
}
body.theme-notes .gashapon-handle:hover { background: var(--notes-green-dark) !important; }
body.theme-notes .gashapon-ball-white { background: linear-gradient(145deg, #fffef7 0%, #f5eedf 100%); }
body.theme-notes .gashapon-ball-black { background: linear-gradient(145deg, #5c5542 0%, #3d3829 100%); border-color: rgba(0,0,0,0.2); }
body.theme-notes .gashapon-ball-gray { background: linear-gradient(145deg, #c5e1a5 0%, #9ccc65 100%); }
body.theme-notes .gashapon-capsule {
    border-color: rgba(255,255,255,0.7) !important;
    box-shadow: 0 3px 10px rgba(124, 179, 66, 0.2) !important;
}
body.theme-notes .gashapon-capsule:hover {
    box-shadow: 0 5px 14px rgba(124, 179, 66, 0.3) !important;
}
body.theme-notes .gashapon-result-content .fortune-result-chip {
    background: #f5eedf !important;
    border-color: var(--theme-border) !important;
    border-radius: 8px !important;
}

/* 卷轴与诗（人生纸条专属）：小便签 + 深暖黄 + 布局补全 */
body.theme-notes .scrollpoem-desc {
    color: var(--theme-text-secondary) !important;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
body.theme-notes .scrollpoem-note {
    margin: 0.75rem 0;
}
body.theme-notes .scrollpoem-paper {
    position: relative;
    min-height: 180px;
    padding: 1.25rem 1.4rem 1.25rem 1.4rem !important;
    background: linear-gradient(135deg, #f5ecd8 0%, #ebe0c4 50%, #e2d4a8 100%) !important;
    border: 1px solid var(--notes-warm-yellow-deep) !important;
    border-radius: 6px !important;
    box-shadow: 2px 2px 8px rgba(180, 150, 80, 0.2), 4px 4px 12px rgba(0,0,0,0.06) !important;
    color: #4a4228 !important;
    font-size: 1rem;
    line-height: 1.65;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
}
body.theme-notes .scrollpoem-chip {
    display: inline;
    white-space: nowrap;
    margin: 0 0.1em;
    background: linear-gradient(135deg, #f0e6c8 0%, #e8d4a0 100%) !important;
    border: 1px solid var(--notes-warm-yellow-deep) !important;
    border-radius: 6px !important;
    color: #3d3829 !important;
    padding: 0.2em 0.55em !important;
    font-size: inherit;
    cursor: pointer;
    vertical-align: baseline;
}
body.theme-notes .scrollpoem-chip:hover {
    background: linear-gradient(135deg, #e8d4a0 0%, #d4b84a 100%) !important;
    border-color: #b89830 !important;
}
body.theme-notes .scrollpoem-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
body.theme-notes .scrollpoem-actions .btn {
    flex-shrink: 0;
    border-radius: 12px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.08) !important;
}

/* 十四行诗（人生纸条专属）：深暖黄便签 + 翘脚 */
body.theme-notes .range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
body.theme-notes .range-inputs input {
    flex: 1;
}
body.theme-notes .range-inputs span {
    color: var(--theme-text-secondary);
    font-size: 0.9rem;
}
body.theme-notes .sonnet-config {
    padding: 0.75rem;
    background: var(--theme-bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--theme-border);
    margin-bottom: 1rem;
}
body.theme-notes .sonnet-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}
body.theme-notes .sonnet-result {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}
body.theme-notes .sonnet-paper {
    position: relative;
    max-width: 500px;
    width: 100%;
    min-height: 280px;
    padding: 1.75rem 2rem !important;
    background: linear-gradient(135deg, #f5ecd8 0%, #ebe0c4 50%, #e2d4a8 100%) !important;
    border: 1px solid var(--notes-warm-yellow-deep) !important;
    border-radius: 10px !important;
    box-shadow: 2px 2px 8px rgba(180, 150, 80, 0.2), 4px 4px 14px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease;
}
body.theme-notes .sonnet-paper::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 18px 18px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 8px 0;
    pointer-events: none;
}
body.theme-notes .sonnet-paper.completed {
    border-color: var(--notes-green) !important;
    box-shadow: 2px 2px 10px rgba(124, 179, 66, 0.2), 4px 4px 16px rgba(0,0,0,0.08) !important;
}
body.theme-notes .sonnet-check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--theme-text-secondary);
}
body.theme-notes .sonnet-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a4228 !important;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(212, 184, 74, 0.4);
    padding-bottom: 0.5rem;
}
body.theme-notes .sonnet-lines {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}
body.theme-notes .sonnet-line {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: lineAppear 0.5s ease-out forwards;
    background: rgba(255, 254, 247, 0.6);
    border: 1px solid rgba(212, 184, 74, 0.25);
}
body.theme-notes .sonnet-line:hover {
    background: rgba(232, 212, 160, 0.5);
    transform: translateX(5px);
    border-color: var(--notes-warm-yellow-deep);
}
body.theme-notes .line-number {
    color: var(--theme-text-muted);
    font-weight: 600;
    margin-right: 0.8rem;
    min-width: 20px;
}
body.theme-notes .line-text {
    color: #3d3829;
    line-height: 1.4;
    flex: 1;
}
body.theme-notes .sonnet-footer {
    border-top: 1px solid rgba(212, 184, 74, 0.35);
    padding-top: 1rem;
    text-align: center;
}
body.theme-notes .line-counter {
    color: var(--theme-text-muted);
    font-size: 0.9rem;
}
body.theme-notes .sonnet-completion {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--notes-paper);
    border-radius: 8px;
    border: 1px solid var(--theme-border);
    box-shadow: 2px 2px 6px rgba(0,0,0,0.06);
}
body.theme-notes .completion-text {
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 0.8rem;
}

body.theme-notes .firework-canvas {
    background: linear-gradient(180deg, #e8f5e9 0%, #f5eedf 50%, #fff8e1 100%) !important;
    border-radius: 12px !important;
    border: 1px solid var(--theme-border) !important;
}
body.theme-notes .firework-trigger-btn {
    background: var(--notes-green) !important;
    border-color: var(--notes-green-dark) !important;
    border-radius: 10px !important;
}
body.theme-notes .firework-trigger-btn:hover { background: var(--notes-green-dark) !important; }
body.theme-notes .firework-item {
    background: var(--notes-paper) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px !important;
}
body.theme-notes .firework-reset-btn {
    background: var(--notes-paper) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    border-radius: 8px !important;
}

body.theme-notes .game-canvas {
    background: linear-gradient(135deg, #fff8e1 0%, #e8f5e9 50%, #c8e6c9 100%) !important;
    border-radius: 12px !important;
    border: 1px solid var(--theme-border) !important;
}
body.theme-notes .game-canvas-white {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
}

body.theme-notes .catch-game-area {
    background: linear-gradient(135deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border: 2px solid var(--theme-border-strong) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
}
body.theme-notes .firework-tool {
    background: linear-gradient(135deg, var(--notes-paper) 0%, var(--theme-bg-secondary) 100%) !important;
    border: 2px solid var(--theme-border-strong) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    color: var(--theme-text) !important;
}
body.theme-notes .fishing-pond {
    background: linear-gradient(180deg, #81c784 0%, #66bb6a 50%, #4caf50 100%) !important;
    border-color: var(--theme-border-strong) !important;
    border-radius: 12px !important;
}
body.theme-notes .fishmaster-pond {
    background: linear-gradient(180deg, #81c784 0%, #4caf50 100%) !important;
}

/* 翘脚便签：按钮、词条、组合、弹窗 */
body.theme-notes .btn,
body.theme-notes .btn-primary,
body.theme-notes .btn-secondary,
body.theme-notes .action-btn,
body.theme-notes .catch-clear-box-btn,
body.theme-notes .doubleblind-send-btn,
body.theme-notes .doubleblind-clear-btn,
body.theme-notes .firework-trigger-btn,
body.theme-notes .firework-reset-btn,
body.theme-notes #auth-submit,
body.theme-notes .blindbox-slip-btn,
body.theme-notes .fishing-start-btn,
body.theme-notes .catch-speed-btn,
body.theme-notes .catch-theme-btn,
body.theme-notes .generate-btn,
body.theme-notes .gacha-slip-btn,
body.theme-notes .result-action-btn,
body.theme-notes .result-combo-edit,
body.theme-notes .action-btn-sm,
body.theme-notes .shop-refresh-btn,
body.theme-notes .shop-scratch-once,
body.theme-notes .farming-tool-btn,
body.theme-notes .farming-mode-btn,
body.theme-notes .telepathy-submit-btn,
body.theme-notes .telepathy-clear-btn {
    position: relative !important;
    border-radius: 12px !important;
    border: 1px solid var(--theme-border-strong) !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1), 4px 4px 12px rgba(0,0,0,0.06) !important;
}
body.theme-notes .btn::after,
body.theme-notes .btn-primary::after,
body.theme-notes .btn-secondary::after,
body.theme-notes .action-btn::after,
body.theme-notes .action-btn-danger::after,
body.theme-notes #auth-submit::after,
body.theme-notes .generate-btn::after,
body.theme-notes .gacha-slip-btn::after,
body.theme-notes .blindbox-slip-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 14px 14px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 10px 0;
    pointer-events: none;
}
body.theme-notes .btn-primary,
body.theme-notes .action-btn,
body.theme-notes #auth-submit,
body.theme-notes .generate-btn,
body.theme-notes .telepathy-new-game {
    background: var(--notes-green) !important;
    color: #fff !important;
    border-color: var(--notes-green-dark) !important;
}
body.theme-notes .btn-primary:hover,
body.theme-notes .action-btn:hover,
body.theme-notes #auth-submit:hover,
body.theme-notes .generate-btn:hover:not(:disabled),
body.theme-notes .telepathy-new-game:hover {
    background: var(--notes-green-dark) !important;
}
body.theme-notes .generate-btn:disabled {
    background: var(--theme-btn-disabled-bg) !important;
    color: var(--theme-text-muted) !important;
}
/* 次要按钮：暖米色，与主按钮区分 */
body.theme-notes .btn-secondary,
body.theme-notes .blindbox-slip-btn,
body.theme-notes .gacha-slip-btn,
body.theme-notes .telepathy-submit-btn,
body.theme-notes .telepathy-clear-btn {
    background: linear-gradient(135deg, #f5eedf 0%, #ebe2d0 100%) !important;
    color: #3d3829 !important;
    border-color: var(--theme-border-strong) !important;
}
body.theme-notes .btn-secondary:hover,
body.theme-notes .blindbox-slip-btn:hover,
body.theme-notes .gacha-slip-btn:hover,
body.theme-notes .telepathy-submit-btn:hover,
body.theme-notes .telepathy-clear-btn:hover {
    background: #e8dfc8 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .btn-outline-secondary {
    background: linear-gradient(135deg, #f5eedf 0%, #ebe2d0 100%) !important;
    color: #3d3829 !important;
    border-color: var(--theme-border-strong) !important;
}
body.theme-notes .btn-outline-secondary:hover {
    background: #e8dfc8 !important;
    border-color: var(--notes-green) !important;
}
/* 一键初始化：琥珀/橙警示色，与主操作和删除区分 */
body.theme-notes .action-btn-danger {
    background: linear-gradient(135deg, #e8a317 0%, #d4890a 100%) !important;
    color: #fff !important;
    border-color: #b8730a !important;
}
body.theme-notes .action-btn-danger:hover {
    background: #d4890a !important;
    border-color: #a06a09 !important;
}
/* 删除类按钮：暖灰棕，符合主题 */
body.theme-notes .action-btn-sm,
body.theme-notes .action-btn-sm.delete,
body.theme-notes .btn-sm.btn-danger,
body.theme-notes .history-entry-delete,
body.theme-notes .quick-switch-delete {
    background: linear-gradient(135deg, #a89f8e 0%, #8c8374 100%) !important;
    color: #fff !important;
    border-color: #6b6356 !important;
}
body.theme-notes .action-btn-sm:hover,
body.theme-notes .action-btn-sm.delete:hover,
body.theme-notes .btn-sm.btn-danger:hover,
body.theme-notes .history-entry-delete:hover,
body.theme-notes .quick-switch-delete:hover {
    background: #8c8374 !important;
    border-color: #6b6356 !important;
}
body.theme-notes .remove-btn {
    color: #5c5542 !important;
    background: transparent !important;
    border: none !important;
}
body.theme-notes .remove-btn:hover {
    color: #8c8374 !important;
}
/* 结果区操作按钮 */
body.theme-notes .result-action-btn,
body.theme-notes .result-combo-edit {
    background: linear-gradient(135deg, #f5eedf 0%, #ebe2d0 100%) !important;
    color: #3d3829 !important;
    border-color: var(--theme-border-strong) !important;
}
body.theme-notes .result-action-btn:hover,
body.theme-notes .result-combo-edit:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .catch-theme-btn.selected,
body.theme-notes .catch-speed-btn.active {
    border-color: var(--notes-green) !important;
    background: #e8f5e9 !important;
    color: var(--theme-text) !important;
}

body.theme-notes .result-item {
    position: relative !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.08), 4px 4px 10px rgba(0,0,0,0.05) !important;
}
body.theme-notes .result-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 6px 0;
    pointer-events: none;
}
body.theme-notes .result-item:hover {
    background: var(--notes-green) !important;
    color: #fff !important;
    border-color: var(--notes-green-dark) !important;
}
body.theme-notes .result-item:hover::after {
    border-color: transparent transparent rgba(0,0,0,0.08) transparent;
}
/* 人生纸条：组合框纯色，里面的 .result-item 才是方格纸 */
body.theme-notes .result-item-wrap-combo {
    position: relative !important;
    background: var(--theme-bg-secondary) !important;
    background-image: none !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.08), 4px 4px 12px rgba(0,0,0,0.05) !important;
}
body.theme-notes .result-item-wrap-combo::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 14px 14px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 8px 0;
    pointer-events: none;
}
body.theme-notes .fortune-result-chip {
    position: relative !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 6px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.07) !important;
}
body.theme-notes .fortune-result-chip::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent rgba(0,0,0,0.05) transparent;
    border-radius: 0 0 4px 0;
    pointer-events: none;
}
body.theme-notes .blindbox-slip-chip {
    border: 1px solid var(--theme-border) !important;
    border-radius: 6px !important;
}

body.theme-notes .blindbox-slip--rare .blindbox-slip-inner {
    border-color: var(--notes-green) !important;
    box-shadow: 0 0 12px rgba(124, 179, 66, 0.3) !important;
}
body.theme-notes .blindbox-content .box-element {
    color: var(--theme-text) !important;
}

body.theme-notes .setting-summary,
body.theme-notes details[open] .setting-summary {
    border-radius: 8px;
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border) !important;
}
body.theme-notes .catch-gift-combo,
body.theme-notes .fishmaster-gift-combo {
    position: relative !important;
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.08), 4px 4px 10px rgba(0,0,0,0.05) !important;
}
body.theme-notes .catch-gift-combo::after,
body.theme-notes .fishmaster-gift-combo::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 6px 0;
    pointer-events: none;
}
body.theme-notes .catch-gift-item {
    position: relative !important;
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.06) !important;
}
body.theme-notes .catch-gift-combo:hover,
body.theme-notes .fishmaster-gift-combo:hover {
    border-color: var(--notes-green) !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1), 4px 4px 14px rgba(124, 179, 66, 0.12) !important;
}

body.theme-notes .sidebar-section {
    padding: 1.25rem 1.5rem !important;
}
body.theme-notes .sidebar-backdrop {
    background: rgba(245, 230, 200, 0.5) !important;
}
/* 已选词库/分组：便签底 + 翘脚 */
body.theme-notes .library-selector {
    position: relative;
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px !important;
    margin: 0 0.5rem 0.5rem !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.08), 4px 4px 12px rgba(0,0,0,0.05) !important;
}
body.theme-notes .library-selector::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 16px 16px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 6px 0;
    pointer-events: none;
}
body.theme-notes .selector-label {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .selected-item {
    position: relative !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 14px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.06) !important;
    color: var(--theme-text) !important;
}
body.theme-notes .selected-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent rgba(0,0,0,0.05) transparent;
    border-radius: 0 0 12px 0;
    pointer-events: none;
}
body.theme-notes .add-btn {
    background: var(--notes-green) !important;
    color: #fff !important;
    border: 1px solid var(--notes-green-dark) !important;
    border-radius: 14px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.08) !important;
}
body.theme-notes .add-btn:hover {
    background: var(--notes-green) !important;
}
body.theme-notes .switch-btn,
body.theme-notes .btn-select {
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 10px !important;
    color: var(--theme-text) !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.06) !important;
}
body.theme-notes .switch-btn:hover,
body.theme-notes .btn-select:hover {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--notes-green) !important;
}
/* 历史按钮：便签翘脚 */
body.theme-notes .history-btn {
    position: relative !important;
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 10px !important;
    color: var(--theme-text) !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.08), 4px 4px 10px rgba(0,0,0,0.05) !important;
}
body.theme-notes .history-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 8px 0;
    pointer-events: none;
}
body.theme-notes .history-btn:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .sidebar-item {
    border-radius: 8px !important;
}
body.theme-notes .sidebar-item:hover {
    background: #e8f5e9 !important;
}
body.theme-notes .sidebar-item.sidebar-item-dragging {
    border-color: var(--notes-green) !important;
    box-shadow: 0 2px 8px rgba(124, 179, 66, 0.2) !important;
}

body.theme-notes input[type="text"],
body.theme-notes input[type="password"],
body.theme-notes .doubleblind-input,
body.theme-notes .form-control {
    border-radius: 10px !important;
    border-color: var(--theme-border) !important;
    background: var(--theme-input-bg) !important;
}
body.theme-notes input:focus,
body.theme-notes .doubleblind-input:focus {
    border-color: var(--notes-green) !important;
}

body.theme-notes .modal-container {
    background: var(--theme-modal-backdrop) !important;
}
body.theme-notes .modal {
    position: relative !important;
    transform: rotate(-0.2deg);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1), 4px 4px 16px rgba(0,0,0,0.08) !important;
}
body.theme-notes .modal::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 20px 20px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 8px 0;
    pointer-events: none;
}
body.theme-notes .modal-emoji {
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1), 4px 4px 16px rgba(0,0,0,0.08) !important;
}
body.theme-notes .modal-emoji::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 20px 20px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 8px 0;
    pointer-events: none;
}
body.theme-notes .modal-header,
body.theme-notes .modal-footer {
    border-color: var(--theme-border) !important;
}

body.theme-notes .shop-item {
    transform: rotate(0.15deg);
}
body.theme-notes .shop-item:hover:not(.purchased) {
    border-color: var(--notes-green) !important;
    box-shadow: 0 4px 16px rgba(124, 179, 66, 0.2) !important;
}

body.theme-notes .horoscope-item {
    border: 1px solid var(--theme-border) !important;
    box-shadow: var(--theme-shadow) !important;
}

/* 人生纸条：色彩生成器 + 自定义颜色 + 色彩收藏夹 */
body.theme-notes .color-tool-content h3 {
    color: #4a4228 !important;
}
body.theme-notes .color-tool-content .form-group label {
    color: #5c5542 !important;
}
body.theme-notes .color-hint {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .color-detail {
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.06) !important;
}
body.theme-notes .color-detail-title {
    color: #5c5542 !important;
}
body.theme-notes .color-detail-row {
    color: #3d3829 !important;
}
body.theme-notes .color-detail-row:hover {
    background: rgba(124, 179, 66, 0.15) !important;
}
body.theme-notes .color-block {
    border-radius: 10px !important;
    border-color: var(--theme-border) !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.08) !important;
}
body.theme-notes .color-block:hover {
    box-shadow: 3px 3px 10px rgba(124, 179, 66, 0.2) !important;
}
body.theme-notes .color-block--fixed {
    border-color: var(--notes-green) !important;
    outline-color: var(--notes-green) !important;
}
body.theme-notes .color-fixed-section {
    position: relative !important;
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 50%, #ebe2d0 100%) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 14px !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.08), 4px 4px 12px rgba(0,0,0,0.05) !important;
}
body.theme-notes .color-fixed-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 14px 14px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 12px 0;
    pointer-events: none;
}
body.theme-notes .color-sidebar-title {
    color: #4a4228 !important;
}
body.theme-notes .color-current-swatch {
    border-color: var(--theme-border-strong) !important;
    border-radius: 10px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.08) !important;
}
body.theme-notes .color-wheel-bg {
    box-shadow: inset 0 0 0 2px var(--theme-border) !important;
}
body.theme-notes .color-wheel-handle {
    background: var(--notes-paper) !important;
    border-color: var(--notes-green) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12) !important;
}
body.theme-notes .color-slider-row label {
    color: #5c5542 !important;
}
body.theme-notes .color-slider-row input[type="range"] {
    accent-color: var(--notes-green) !important;
}
body.theme-notes .color-slider-num {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    border-radius: 8px !important;
}
body.theme-notes .color-slider-num:focus {
    border-color: var(--notes-green) !important;
}
body.theme-notes .color-copy-value {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    color: #3d3829 !important;
    border-radius: 8px !important;
}
body.theme-notes .color-copy-value:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .color-hex-input {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    border-radius: 10px !important;
}
body.theme-notes .color-hex-input:focus {
    border-color: var(--notes-green) !important;
}
body.theme-notes .color-btn {
    border-radius: 10px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.06) !important;
}
body.theme-notes .color-btn-add,
body.theme-notes .color-btn-save {
    background: var(--notes-green) !important;
    color: #fff !important;
    border: 1px solid var(--notes-green-dark) !important;
}
body.theme-notes .color-btn-add:hover,
body.theme-notes .color-btn-save:hover {
    background: var(--notes-green-dark) !important;
    box-shadow: 2px 2px 8px rgba(124, 179, 66, 0.3) !important;
}
body.theme-notes .color-btn-shuffle {
    background: var(--notes-paper) !important;
    color: #3d3829 !important;
    border: 1px solid var(--theme-border-strong) !important;
}
body.theme-notes .color-btn-shuffle:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .color-custom-chip {
    border-radius: 8px !important;
    border-color: var(--theme-border) !important;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.06) !important;
}
body.theme-notes .color-custom-remove {
    background: var(--notes-green) !important;
}
body.theme-notes .color-custom-remove:hover {
    background: var(--notes-green-dark) !important;
}
body.theme-notes .color-combo {
    position: relative !important;
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 50%, #ebe2d0 100%) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 14px !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.08), 4px 4px 12px rgba(0,0,0,0.05) !important;
}
body.theme-notes .color-combo::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 14px 14px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 12px 0;
    pointer-events: none;
}
body.theme-notes .color-combo-title {
    color: #4a4228 !important;
}
body.theme-notes .color-preview-item {
    background: transparent;
}
body.theme-notes .color-preview-label {
    color: #5c5542 !important;
}
body.theme-notes .color-preview-bar,
body.theme-notes .color-preview-gradient,
body.theme-notes .color-preview-ring {
    border-color: var(--theme-border) !important;
    border-radius: 8px !important;
}
body.theme-notes .color-preview-circle {
    border-color: var(--theme-border-strong) !important;
}
body.theme-notes .color-favorites-section {
    position: relative !important;
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 50%, #ebe2d0 100%) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 14px !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.08), 4px 4px 12px rgba(0,0,0,0.05) !important;
}
body.theme-notes .color-favorites-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 14px 14px;
    border-color: transparent transparent rgba(0,0,0,0.06) transparent;
    border-radius: 0 0 12px 0;
    pointer-events: none;
}
body.theme-notes .color-favorites-title {
    color: #4a4228 !important;
}
body.theme-notes .color-favorites-hint {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .color-favorites-empty {
    color: var(--theme-text-muted) !important;
}
body.theme-notes .color-favorite-item {
    position: relative !important;
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 12px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.06) !important;
}
body.theme-notes .color-favorite-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent rgba(0,0,0,0.05) transparent;
    border-radius: 0 0 10px 0;
    pointer-events: none;
}
body.theme-notes .color-favorite-item:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .color-favorite-item--active {
    border-color: var(--notes-green) !important;
    background: #e8f5e9 !important;
    box-shadow: 0 0 0 2px var(--notes-green) !important;
}
body.theme-notes .color-favorite-bar {
    border-color: var(--theme-border) !important;
    border-radius: 6px !important;
}
body.theme-notes .color-favorite-remove {
    background: var(--notes-green) !important;
    border-radius: 50% !important;
}
body.theme-notes .color-favorite-remove:hover {
    background: var(--notes-green-dark) !important;
}
body.theme-notes .color-favorites-pagination {
    color: #5c5542;
}
body.theme-notes .color-favorites-total,
body.theme-notes .color-favorites-page-info {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .color-fav-page-input {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    border-radius: 6px !important;
}
body.theme-notes .color-fav-page-input:focus {
    border-color: var(--notes-green) !important;
}
body.theme-notes .color-btn-pagination {
    background: var(--notes-green) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
}
body.theme-notes .color-btn-pagination:hover:not(:disabled) {
    background: var(--notes-green-dark) !important;
}
body.theme-notes .color-btn-pagination:disabled {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-muted) !important;
}

/* 人生纸条：设置页详情折叠、快捷切换列表 */
body.theme-notes .setting-details {
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 12px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.06) !important;
}
body.theme-notes .setting-summary {
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 100%) !important;
    color: #4a4228 !important;
    border-radius: 12px 12px 0 0 !important;
}
body.theme-notes .setting-details[open] .setting-summary {
    border-bottom: 1px solid var(--theme-border) !important;
}
body.theme-notes .setting-details-content {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
}
body.theme-notes .quick-switch-list {
    background: transparent;
}
body.theme-notes .quick-switch-row {
    border-color: var(--theme-border) !important;
}
body.theme-notes .quick-switch-item {
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    color: #3d3829 !important;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.05) !important;
}
body.theme-notes .quick-switch-item:hover {
    border-color: var(--notes-green) !important;
    background: #e8f5e9 !important;
}
body.theme-notes .quick-switch-binding {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .quick-switch-overwrite {
    background: var(--notes-green) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
}
body.theme-notes .quick-switch-overwrite:hover {
    background: var(--notes-green-dark) !important;
}
body.theme-notes .quick-switch-delete {
    background: var(--theme-bg-tertiary) !important;
    color: #5c5542 !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px !important;
}
body.theme-notes .quick-switch-delete:hover {
    background: #ebe2d0 !important;
    border-color: var(--theme-border-strong) !important;
}

/* 人生纸条：暂停挑战、转盘、抽卡内部、结果框 */
body.theme-notes .pause-hint {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .pause-screen {
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 100%) !important;
    border-color: var(--theme-border) !important;
    border-radius: 12px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.06) !important;
}
body.theme-notes .pause-screen:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .pause-screen.running {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .pause-text {
    color: #4a4228 !important;
}
body.theme-notes .pause-controls .btn {
    background: var(--notes-green) !important;
    color: #fff !important;
    border-color: var(--notes-green-dark) !important;
}
body.theme-notes .pause-controls .btn:hover {
    background: var(--notes-green-dark) !important;
}
body.theme-notes .pause-captured-wrap {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    border-radius: 12px !important;
}
body.theme-notes .pause-captured-label {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .gacha-result-area {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    border-radius: 12px !important;
}
body.theme-notes .gacha-settings summary {
    color: #4a4228 !important;
}
body.theme-notes .gacha-config {
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 100%) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
}
body.theme-notes .gacha-pity-display {
    color: #4a4228 !important;
}
body.theme-notes .gacha-cover,
body.theme-notes .gacha-content {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
}
body.theme-notes .gacha-cover.rare,
body.theme-notes .gacha-item.rare .gacha-content {
    border-color: var(--notes-warm-yellow-deep) !important;
}
body.theme-notes .gacha-slip-inner {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border-strong) !important;
}
body.theme-notes .gacha-slip--rare .gacha-slip-inner {
    border-color: var(--notes-green) !important;
}
body.theme-notes .gacha-slip-title {
    color: #4a4228 !important;
}
body.theme-notes .gacha-slip-chip {
    background: var(--theme-bg-secondary) !important;
    border-color: var(--theme-border) !important;
}
body.theme-notes .gacha-slip-chip:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .gacha-slip-btn {
    background: linear-gradient(135deg, #f5eedf 0%, #ebe2d0 100%) !important;
    color: #3d3829 !important;
}
body.theme-notes .gacha-slip-btn:hover {
    background: #e8dfc8 !important;
}
body.theme-notes .gacha-draw-row .btn,
body.theme-notes .gacha-open-actions .btn {
    background: var(--notes-green) !important;
    color: #fff !important;
    border-color: var(--notes-green-dark) !important;
}
body.theme-notes .gacha-draw-row .btn:hover,
body.theme-notes .gacha-open-actions .btn:hover {
    background: var(--notes-green-dark) !important;
}
body.theme-notes .wheel-container,
body.theme-notes .wheel-wrapper {
    background: transparent;
}
/* 转盘只改颜色/阴影，保持圆形，不改成方块 */
body.theme-notes #wheel-canvas {
    border-radius: 50% !important;
    box-shadow: 0 4px 20px rgba(124, 179, 66, 0.15) !important;
}

/* 人生纸条：种地按钮、果篮、种子面板 */
body.theme-notes .farming-tool-btn {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    color: #3d3829 !important;
}
body.theme-notes .farming-tool-btn:hover,
body.theme-notes .farming-tool-btn.active {
    border-color: var(--notes-green) !important;
    background: #e8f5e9 !important;
}
body.theme-notes .farming-tool-hint {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .farming-mode-btn {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    color: #3d3829 !important;
}
body.theme-notes .farming-mode-btn:hover {
    border-color: var(--theme-border-strong) !important;
}
body.theme-notes .farming-mode-btn.active {
    border-color: var(--notes-green) !important;
    background: #e8f5e9 !important;
    color: var(--theme-text) !important;
}
body.theme-notes .farming-seed-panel {
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 100%) !important;
    border-color: var(--theme-border) !important;
    border-radius: 12px !important;
}
body.theme-notes .farming-current-seed,
body.theme-notes .seed-tab {
    color: #4a4228 !important;
}
body.theme-notes .seed-tab {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
}
body.theme-notes .seed-tab:hover {
    border-color: var(--theme-border-strong) !important;
}
body.theme-notes .seed-tab.active {
    border-color: var(--notes-green) !important;
    background: #e8f5e9 !important;
}
body.theme-notes .farming-basket {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    border-radius: 12px !important;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.06) !important;
}
body.theme-notes .basket-label,
body.theme-notes .basket-summary {
    color: #4a4228 !important;
}
body.theme-notes .basket-item {
    background: var(--theme-bg-secondary) !important;
    border-color: var(--theme-border) !important;
    border-radius: 8px !important;
}
body.theme-notes .basket-item:hover {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .basket-item-combo {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
}
body.theme-notes .basket-item-combo:hover {
    border-color: var(--notes-green) !important;
    background: #e8f5e9 !important;
}
body.theme-notes .basket-combo-sep {
    color: var(--theme-text-muted) !important;
}
body.theme-notes .basket-empty {
    color: var(--theme-text-muted) !important;
}
body.theme-notes .farming-basket-actions .btn {
    background: var(--notes-green) !important;
    color: #fff !important;
    border-color: var(--notes-green-dark) !important;
}
body.theme-notes .farming-basket-actions .btn:hover {
    background: var(--notes-green-dark) !important;
}

/* 人生纸条：心理测试选项、心有灵犀 */
body.theme-notes .quiz-option {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    color: #3d3829 !important;
}
body.theme-notes .quiz-option:hover {
    border-color: var(--notes-green) !important;
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.2) !important;
}
body.theme-notes .quiz-option.selected {
    border-color: var(--notes-green) !important;
    background: #e8f5e9 !important;
}
body.theme-notes .option-text {
    color: #3d3829 !important;
    font-weight: 600 !important;
}
body.theme-notes .telepathy-tool-content h3 {
    color: #4a4228 !important;
}
body.theme-notes .telepathy-slots-area,
body.theme-notes .telepathy-pool-area {
    background: transparent;
}
body.theme-notes .telepathy-slots-label,
body.theme-notes .telepathy-pool-hint {
    color: #4a4228 !important;
    font-weight: 600 !important;
}
body.theme-notes .telepathy-pool-legend {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .telepathy-pool-chip {
    background: var(--notes-paper) !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 8px !important;
    color: #3d3829 !important;
    font-weight: 600 !important;
}
body.theme-notes .telepathy-pool-chip.telepathy-pool-wrong-pos {
    border-color: var(--notes-warm-yellow-deep) !important;
    background: #fff8e1 !important;
    font-weight: 700 !important;
}
body.theme-notes .telepathy-pool-chip.telepathy-pool-absent {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-muted) !important;
    border-color: var(--theme-border) !important;
}
body.theme-notes .telepathy-slot-chip {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    color: #3d3829 !important;
    font-weight: 600 !important;
}
body.theme-notes .telepathy-submit-btn,
body.theme-notes .telepathy-clear-btn {
    background: linear-gradient(135deg, #f5eedf 0%, #ebe2d0 100%) !important;
    color: #3d3829 !important;
}
body.theme-notes .telepathy-submit-btn:hover,
body.theme-notes .telepathy-clear-btn:hover {
    background: #e8dfc8 !important;
    border-color: var(--notes-green) !important;
}

/* 人生纸条：一掷千金按钮 */
body.theme-notes .shop-refresh-btn,
body.theme-notes .shop-restart-btn {
    background: var(--notes-green) !important;
    color: #fff !important;
    border-color: var(--notes-green-dark) !important;
}
body.theme-notes .shop-refresh-btn:hover {
    background: var(--notes-green-dark) !important;
}
body.theme-notes .shop-scratch-once {
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 100%) !important;
    border-color: var(--theme-border-strong) !important;
    color: #3d3829 !important;
    font-weight: 600 !important;
}
body.theme-notes .shop-scratch-once:hover:not(:disabled) {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}
body.theme-notes .shop-scratch-slot {
    background: var(--theme-bg-secondary) !important;
    border-color: var(--theme-border) !important;
}
body.theme-notes .shop-scratch-slot:hover:not(.revealed) {
    background: #e8f5e9 !important;
    border-color: var(--notes-green) !important;
}

/* 人生纸条：设置页历史分页、弹窗取消等 */
body.theme-notes .history-pagination-bar {
    border-color: var(--theme-border) !important;
}
body.theme-notes .history-page-size,
body.theme-notes .history-page-jump {
    background: var(--notes-paper) !important;
    border-color: var(--theme-border) !important;
    border-radius: 8px !important;
}
body.theme-notes .history-page-info {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .history-entry-block {
    border-color: var(--theme-border) !important;
}
body.theme-notes .history-entry-meta {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .history-page-prev,
body.theme-notes .history-page-next {
    background: linear-gradient(135deg, #f5eedf 0%, #ebe2d0 100%) !important;
    color: #3d3829 !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 10px !important;
}
body.theme-notes .history-page-prev:hover,
body.theme-notes .history-page-next:hover {
    background: #e8dfc8 !important;
    border-color: var(--notes-green) !important;
}

/* 人生纸条：商店设置面板、活动折扣等 */
body.theme-notes .shop-settings-panel {
    background: linear-gradient(135deg, #fffef7 0%, #f5eedf 50%, #ebe2d0 100%) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 14px !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.06) !important;
}
body.theme-notes .shop-settings-title {
    color: #4a4228 !important;
}
body.theme-notes .shop-setting-row {
    color: #5c5542 !important;
}
body.theme-notes .shop-events-settings {
    border-color: var(--theme-border) !important;
}
body.theme-notes .shop-events-settings summary {
    color: #4a4228 !important;
}
body.theme-notes .shop-event-weights-title {
    color: var(--theme-text-secondary) !important;
}
body.theme-notes .shop-prob-grid label {
    color: #5c5542 !important;
}
body.theme-notes .shop-event-discount-item {
    background: var(--notes-paper) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.04) !important;
}

@media (max-width: 768px) {
    body.theme-notes .fortune-box {
        width: 150px;
        height: 150px;
    }
}

/* ========== 末日游戏：深灰底 + 灰卡片，对比度拉高易读；仅红色做强调（勾选/选中/抽牌） ========== */
body.theme-doomsday {
    --theme-bg: #1a1a1a;
    --theme-bg-secondary: #222;
    --theme-bg-tertiary: #2a2a2a;
    --theme-text: #e5e5e5;
    --theme-text-secondary: #c0c0c0;
    --theme-text-muted: #a8a8a8;
    --theme-border: #5a5a5a;
    --theme-border-strong: #6e6e6e;
    --theme-border-focus: #b54a4a;
    --theme-input-bg: #252525;
    --theme-input-border: #5a5a5a;
    --theme-btn-bg: #2a2a2a;
    --theme-btn-hover: #353535;
    --theme-btn-text: #e5e5e5;
    --theme-btn-disabled-bg: #444;
    --theme-card-bg: #222;
    --theme-result-bg: #222;
    --theme-result-border: #5a5a5a;
    --theme-result-hover-bg: #2a2a2a;
    --theme-result-hover-text: #f0f0f0;
    --theme-shadow: 0 2px 6px rgba(0,0,0,0.4);
    --theme-shadow-lg: none;
    --theme-modal-backdrop: rgba(0,0,0,0.85);
    --doomsday-red: #b54a4a;
    --doomsday-red-dim: #8b3a3a;
}
body.theme-doomsday #main-app,
body.theme-doomsday .main-content { background: var(--theme-bg) !important; color: var(--theme-text) !important; }
body.theme-doomsday .tool-content,
body.theme-doomsday .results-area { background: var(--theme-bg) !important; }

/* 顶部栏 */
body.theme-doomsday .header {
    background: rgba(26, 26, 26, 0.98) !important;
    border-bottom: 1px solid #5a5a5a !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
}
body.theme-doomsday .header h1 { color: #e5e5e5 !important; }

/* 返回/菜单/设置按钮：无填充，仅悬停时深底 */
body.theme-doomsday .menu-btn,
body.theme-doomsday .settings-btn {
    color: #e5e5e5 !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
body.theme-doomsday .menu-btn:hover,
body.theme-doomsday .settings-btn:hover { background: #2a2a2a !important; border-color: #5a5a5a !important; }

/* 历史按钮 */
body.theme-doomsday .history-btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #a8a8a8 !important;
    box-shadow: none !important;
}
body.theme-doomsday .history-btn:hover { background: #353535 !important; border-color: #6e6e6e !important; }

/* 侧边栏 */
body.theme-doomsday .sidebar {
    background: var(--theme-bg-secondary) !important;
    border-right: 1px solid #5a5a5a !important;
}
body.theme-doomsday .sidebar-header {
    background: rgba(26, 26, 26, 0.98) !important;
    border-bottom: 1px solid #5a5a5a !important;
}
body.theme-doomsday .sidebar-header h3,
body.theme-doomsday .sidebar-section h4 { color: #e5e5e5 !important; }
body.theme-doomsday .close-btn { color: #e5e5e5 !important; }
body.theme-doomsday .sidebar-section {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    padding: 1rem !important;
    margin: 0.5rem 0.35rem !important;
    box-shadow: none !important;
}
body.theme-doomsday .sidebar-backdrop { background: rgba(0,0,0,0.85) !important; backdrop-filter: blur(5px); }
body.theme-doomsday .sidebar-item:hover { background: #2a2a2a !important; }
body.theme-doomsday .sidebar-item.sidebar-item-dragging { border-color: #5a5a5a !important; background: #2a2a2a !important; }

/* 词库管理侧边栏：整块深灰底，强制覆盖 base 白底、自定义填充 */
body.theme-doomsday #sidebar,
body.theme-doomsday #sidebar .sidebar-content,
body.theme-doomsday #sidebar .sidebar-section,
body.theme-doomsday #sidebar .items-list {
    background: #222 !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday #sidebar .sidebar-item {
    background: #222 !important;
    border-color: #5a5a5a !important;
    box-shadow: none !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday #sidebar .item-name,
body.theme-doomsday #sidebar .item-count,
body.theme-doomsday #sidebar .sidebar-hint,
body.theme-doomsday #sidebar .default-fav-label {
    color: #e5e5e5 !important;
}
body.theme-doomsday #sidebar .default-favorite-select {
    background: #252525 !important;
    color: #e5e5e5 !important;
    border-color: #5a5a5a !important;
}
body.theme-doomsday #sidebar .group-buttons-row,
body.theme-doomsday #sidebar .group-buttons-row .action-btn {
    background: #252525 !important;
    color: #e5e5e5 !important;
    border: 1px solid #5a5a5a !important;
}

/* 口令页、设置页、弹窗、结果框、词条、主题选项、词库选择区、已选标签、details */
body.theme-doomsday .auth-container,
body.theme-doomsday .settings-container,
body.theme-doomsday .modal,
body.theme-doomsday .modal-emoji,
body.theme-doomsday .results-content-box,
body.theme-doomsday .result-item,
body.theme-doomsday .theme-option,
body.theme-doomsday .library-selector,
body.theme-doomsday .selected-item,
body.theme-doomsday .setting-details,
body.theme-doomsday .setting-details-content {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
}
/* 末日：emoji 用主题深底，不继承避免出现白框 */
body.theme-doomsday .tool-icon-emoji,
body.theme-doomsday .toolbox-btn-icon,
body.theme-doomsday .blindbox-emoji,
body.theme-doomsday .jar-emoji,
body.theme-doomsday .seed-emoji,
body.theme-doomsday .basket-item-emoji {
    font-weight: normal !important;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    color-scheme: light !important;
    background: var(--theme-card-bg) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
body.theme-doomsday .emoji-chip {
    font-weight: normal !important;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    color-scheme: light !important;
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border) !important;
    box-shadow: none !important;
}
body.theme-doomsday .emoji-chip:hover {
    background: var(--theme-btn-hover) !important;
}
body.theme-doomsday .emoji-chip.emoji-blacklisted {
    background: var(--theme-bg-tertiary) !important;
}
/* 末日：含 emoji 的块用 color-scheme: light，emoji 按亮色渲染才不会有背后灰方框（背景/文字已显式设好，不会变亮） */
body.theme-doomsday .result-item,
body.theme-doomsday .result-item-wrap,
body.theme-doomsday .result-item-wrap-combo,
body.theme-doomsday .fortune-result-chip,
body.theme-doomsday .entry-chip,
body.theme-doomsday .gacha-element,
body.theme-doomsday .horoscope-fortune-chip,
body.theme-doomsday .toolbox-tool-icon,
body.theme-doomsday .mining-backpack-chip,
body.theme-doomsday .wheel-result-label,
body.theme-doomsday .jar-jar-wrap {
    color-scheme: light !important;
}
body.theme-doomsday .library-selector .selector-column,
body.theme-doomsday .library-selector .column-list {
    background: #252525 !important;
    border-color: #5a5a5a !important;
    color: #f0f0f0 !important;
}
body.theme-doomsday .library-selector .column-title,
body.theme-doomsday .library-selector .selector-section .column-title {
    background: #2a2a2a !important;
    color: #f2f2f2 !important;
    border-color: #5a5a5a !important;
}
body.theme-doomsday .library-selector .selector-item,
body.theme-doomsday .library-selector .column-list .selector-item { color: #f0f0f0 !important; }
body.theme-doomsday .library-selector,
body.theme-doomsday .library-selector p,
body.theme-doomsday .library-selector label,
body.theme-doomsday .modal,
body.theme-doomsday .modal-body,
body.theme-doomsday .modal p,
body.theme-doomsday .modal label { color: #f0f0f0 !important; }

/* 选择词库/分组弹窗：整块灰底亮字，覆盖 base 白底；用 content 及其子元素兜底 */
body.theme-doomsday .modal .modal-content {
    background: #252525 !important;
    color: #e8e8e8 !important;
    border-color: #5a5a5a !important;
}
body.theme-doomsday .modal .modal-content .single-column-selector,
body.theme-doomsday .modal .modal-content .two-column-selector,
body.theme-doomsday .modal .modal-content .selector-section,
body.theme-doomsday .modal .modal-content .selector-column,
body.theme-doomsday .modal .modal-content .column-title,
body.theme-doomsday .modal .modal-content .selector-section .column-title,
body.theme-doomsday .modal .modal-content .column-list,
body.theme-doomsday .modal .modal-content .selector-section .column-list,
body.theme-doomsday .modal .modal-content .checkbox-list {
    background: #252525 !important;
    color: #e8e8e8 !important;
    border-color: #5a5a5a !important;
}
body.theme-doomsday .modal .modal-content .selector-item,
body.theme-doomsday .modal .modal-content .checkbox-list label,
body.theme-doomsday .modal .modal-content label,
body.theme-doomsday .modal .modal-content .element-detail,
body.theme-doomsday .modal .modal-content .element-detail-title,
body.theme-doomsday .modal .modal-content .element-detail-label,
body.theme-doomsday .modal .modal-content .element-detail-value {
    color: #e8e8e8 !important;
    background: transparent !important;
}
/* 弹窗内非按钮子元素统一灰底亮字（避免白底白字） */
body.theme-doomsday .modal .modal-content *:not(.btn):not(button):not(.close-btn) {
    color: inherit;
}
body.theme-doomsday .modal .modal-content .column-title,
body.theme-doomsday .modal .modal-content .selector-section .column-title,
body.theme-doomsday .modal .modal-content .column-list,
body.theme-doomsday .modal .modal-content .selector-item,
body.theme-doomsday .modal .modal-content label {
    color: #e8e8e8 !important;
}
body.theme-doomsday .auth-container h1,
body.theme-doomsday .settings-header h2,
body.theme-doomsday .setting-section h3,
body.theme-doomsday .modal-header h3 { color: #eee !important; }

/* 勾选：末日全部用红色 */
body.theme-doomsday input[type="checkbox"],
body.theme-doomsday .opt-cb,
body.theme-doomsday .lib-cb,
body.theme-doomsday .eg-cb,
body.theme-doomsday .group-cb,
body.theme-doomsday .element-group-cb { accent-color: var(--doomsday-red) !important; }

/* 工具区内容 */
body.theme-doomsday .tool-content {
    background: var(--theme-card-bg) !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}
body.theme-doomsday .tool-content,
body.theme-doomsday .tool-content * { color: inherit; }
body.theme-doomsday .tool-content { color: #e5e5e5 !important; background: var(--theme-card-bg) !important; }
body.theme-doomsday .tool-content h3 { color: #e8e8e8 !important; }
/* 所有工具内容区强制深底，覆盖 base 的浅色 */
body.theme-doomsday .telepathy-tool-content,
body.theme-doomsday .mining-tool-content,
body.theme-doomsday .jar-tool-content,
body.theme-doomsday .quiz-tool-content,
body.theme-doomsday .shop-tool-content,
body.theme-doomsday .color-tool-content,
body.theme-doomsday .firework-tool,
body.theme-doomsday .doubleblind-content { background: var(--theme-card-bg) !important; color: #e5e5e5 !important; }

/* 末日：所有按钮统一深底亮字，避免看不见 */
body.theme-doomsday .btn,
body.theme-doomsday .btn-sm,
body.theme-doomsday .btn-outline-secondary,
body.theme-doomsday .generate-btn {
    background: #2a2a2a !important;
    color: #e8e8e8 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
}
body.theme-doomsday .btn:hover:not(:disabled),
body.theme-doomsday .btn-sm:hover:not(:disabled),
body.theme-doomsday .btn-outline-secondary:hover,
body.theme-doomsday .generate-btn:hover:not(:disabled) {
    background: #353535 !important;
    color: #f0f0f0 !important;
    border-color: #6e6e6e !important;
}

/* 工具箱按钮与当前工具名 */
body.theme-doomsday .toolbox-selector { border-bottom: 1px solid #5a5a5a !important; padding: 12px !important; background: #222 !important; }
body.theme-doomsday .toolbox-btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    box-shadow: none !important;
    color: #e0e0e0 !important;
}
body.theme-doomsday .toolbox-btn:hover { background: #353535 !important; border-color: #6e6e6e !important; color: #f0f0f0 !important; }
body.theme-doomsday .toolbox-current-title { color: #e8e8e8 !important; }

/* 生成时筛选、Emoji 筛选 */
body.theme-doomsday .system-options-row,
body.theme-doomsday .emoji-options-row {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}
body.theme-doomsday .system-options-row label,
body.theme-doomsday .system-options-label,
body.theme-doomsday .theme-select-label,
body.theme-doomsday .selector-label { color: #e0e0e0 !important; }
body.theme-doomsday .btn-emoji-filter-toggle {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #a8a8a8 !important;
    box-shadow: none !important;
}
body.theme-doomsday .btn-emoji-filter-toggle:hover { background: #353535 !important; }
body.theme-doomsday .emoji-category-filter-wrap {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
}

/* 主按钮、操作按钮、生成按钮 */
body.theme-doomsday .btn-primary,
body.theme-doomsday .action-btn,
body.theme-doomsday .generate-btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    color: #e8e8e8 !important;
    border: 1px solid #5a5a5a !important;
    box-shadow: none !important;
}
body.theme-doomsday .btn-primary:hover,
body.theme-doomsday .action-btn:hover,
body.theme-doomsday .generate-btn:hover:not(:disabled) { background: #353535 !important; border-color: #6e6e6e !important; color: #f0f0f0 !important; }
body.theme-doomsday .btn-secondary {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    color: #e8e8e8 !important;
    border: 1px solid #5a5a5a !important;
    box-shadow: none !important;
}
body.theme-doomsday .btn-secondary:hover { background: #353535 !important; color: #f0f0f0 !important; }
body.theme-doomsday .action-btn-danger {
    border-radius: 2px !important;
    background: #2a1a1a !important;
    color: #883333 !important;
    border: 1px solid #443333 !important;
    box-shadow: none !important;
}
body.theme-doomsday .action-btn-danger:hover { background: #352020 !important; }
body.theme-doomsday .action-btn-sm,
body.theme-doomsday .action-btn-sm.delete {
    background: #2a2a2a !important;
    color: #e8e8e8 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
}
body.theme-doomsday .action-btn-sm:hover,
body.theme-doomsday .action-btn-sm.delete:hover { background: #353535 !important; color: #f0f0f0 !important; }

/* 输入框：黑底 + 左边条 */
body.theme-doomsday input,
body.theme-doomsday .form-control,
body.theme-doomsday select,
body.theme-doomsday textarea,
body.theme-doomsday .default-favorite-select {
    border-radius: 2px !important;
    color: #e5e5e5 !important;
    background: #000 !important;
    border: 1px solid #5a5a5a !important;
    border-left: 3px solid #666 !important;
    box-shadow: none !important;
}
body.theme-doomsday input::placeholder,
body.theme-doomsday textarea::placeholder { color: #666 !important; }

/* 结果区词条：深灰卡片 + 左边条，黑底用亮字 */
body.theme-doomsday .result-item {
    background: #0d0d0d !important;
    border: 1px solid #333 !important;
    border-left: 3px solid #666 !important;
    border-radius: 2px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5) !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .result-item:hover {
    background: #1a1a1a !important;
    color: #f0f0f0 !important;
    border-color: #5a5a5a !important;
    border-left-color: #666 !important;
}
body.theme-doomsday .result-item-wrap,
body.theme-doomsday .result-item-wrap-combo {
    background: #0d0d0d !important;
    border: 1px solid #333 !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .result-action-btn,
body.theme-doomsday .result-combo-edit {
    border-radius: 2px !important;
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}
body.theme-doomsday .result-action-btn:hover,
body.theme-doomsday .result-combo-edit:hover { background: #252525 !important; color: #f0f0f0 !important; }

/* 已选词库标签、+ 选择、一键开关 */
body.theme-doomsday .selected-item {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .add-btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    color: #a8a8a8 !important;
    border: 1px solid #5a5a5a !important;
    box-shadow: none !important;
}
body.theme-doomsday .add-btn:hover { background: #2a2a2a !important; }
body.theme-doomsday .switch-btn,
body.theme-doomsday .btn-select {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #e8e8e8 !important;
    box-shadow: none !important;
}
body.theme-doomsday .switch-btn:hover,
body.theme-doomsday .btn-select:hover { background: #353535 !important; border-color: #6e6e6e !important; color: #f0f0f0 !important; }

/* 设置页：details / summary；选中用红色 */
body.theme-doomsday .setting-summary {
    background: #252525 !important;
    color: #e8e8e8 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    list-style: none !important;
}
body.theme-doomsday details summary,
body.theme-doomsday .tool-content details summary,
body.theme-doomsday .blindbox-settings summary,
body.theme-doomsday .jar-settings summary { color: #e8e8e8 !important; }
body.theme-doomsday details summary::-webkit-details-marker { display: none !important; }
/* 敲罐子/盲盒：设置区深底亮字，与其它工具一致 */
body.theme-doomsday .blindbox-config,
body.theme-doomsday .jar-settings .blindbox-config {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 6px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .blindbox-config-row label,
body.theme-doomsday .jar-settings .blindbox-config-row label {
    color: #e5e5e5 !important;
}
body.theme-doomsday .jar-tool-content .jar-result-area,
body.theme-doomsday .jar-tool-content .jar-bottom,
body.theme-doomsday .jar-tool-content .jar-actions {
    color: #e5e5e5 !important;
}
body.theme-doomsday .jar-content-wrap .jar-result-item {
    color: #e5e5e5 !important;
}
body.theme-doomsday .blindbox-result-area,
body.theme-doomsday .jar-result-area {
    background: var(--theme-card-bg) !important;
    border-color: #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .setting-details[open] .setting-summary { border-bottom: 1px solid #5a5a5a !important; }
body.theme-doomsday .theme-option {
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    background: #252525 !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .theme-option:hover { background: #2a2a2a !important; border-color: #6e6e6e !important; }
body.theme-doomsday .theme-option.active { border-color: var(--doomsday-red) !important; background: #222 !important; box-shadow: 0 0 0 1px var(--doomsday-red) !important; }
body.theme-doomsday .theme-option-name { color: #e5e5e5 !important; }
body.theme-doomsday .theme-option-desc,
body.theme-doomsday .theme-current-name { color: #c0c0c0 !important; }

/* 弹窗头尾线 */
body.theme-doomsday .modal-header,
body.theme-doomsday .modal-footer { border-color: #5a5a5a !important; }

/* 占卜/抽签卡片 */
body.theme-doomsday .fortune-box,
body.theme-doomsday .fortune-card {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    color: #e5e5e5 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

/* 作者/说明类区块 */
body.theme-doomsday .sidebar-hint,
body.theme-doomsday .credits,
body.theme-doomsday .author-info,
body.theme-doomsday .disclaimer { color: #999 !important; }
body.theme-doomsday .copyable { color: #c0c0c0 !important; }

/* items-list、工具箱图标格；选中用红色 */
body.theme-doomsday .items-list {
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    background: #222 !important;
}
body.theme-doomsday .toolbox-tool-icon {
    background: #252525 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #a8a8a8 !important;
}
body.theme-doomsday .toolbox-tool-icon:hover { background: #2a2a2a !important; border-color: #6e6e6e !important; }
body.theme-doomsday .toolbox-tool-icon.active {
    background: #2a2a2a !important;
    border-color: var(--doomsday-red) !important;
    color: #e5e5e5 !important;
    box-shadow: 0 0 0 1px var(--doomsday-red) !important;
}

/* 词条圈、entry-chip；选中边框用红色 */
body.theme-doomsday .entry-chip {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .entry-chip:hover { background: #2a2a2a !important; border-color: #6e6e6e !important; color: #f0f0f0 !important; }
body.theme-doomsday .entry-chip-selected { border-color: var(--doomsday-red) !important; background: #2a2a2a !important; box-shadow: 0 0 0 1px var(--doomsday-red) !important; }

/* 密码输入页 */
body.theme-doomsday #auth-screen { background: #1a1a1a !important; }
body.theme-doomsday #password-input {
    background: #252525 !important;
    color: #e5e5e5 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
}
body.theme-doomsday #auth-submit {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    color: #a8a8a8 !important;
    border: 1px solid #5a5a5a !important;
    box-shadow: none !important;
}
body.theme-doomsday #auth-submit:hover { background: #353535 !important; color: #e5e5e5 !important; }
body.theme-doomsday .error-message { color: #a8a8a8 !important; }

/* 页脚 */
body.theme-doomsday .footer { border-top: 1px solid #5a5a5a !important; color: #666 !important; }
body.theme-doomsday .footer p { color: #b0b0b0 !important; }

/* ========== 末日游戏：与人生纸条同范围的扩展；抽牌/稀有用红色强调 ========== */
body.theme-doomsday .doubleblind-phone-frame {
    border-color: #333 !important;
    box-shadow: 0 0 0 2px #5a5a5a, 0 12px 32px rgba(0,0,0,0.5) !important;
}
body.theme-doomsday .doubleblind-phone-status {
    background: #0d0d0d !important;
    color: #c0c0c0 !important;
}
body.theme-doomsday .doubleblind-phone {
    background: #1a1a1a !important;
}
body.theme-doomsday .doubleblind-messages {
    background: #1a1a1a !important;
}
body.theme-doomsday .doubleblind-bubble-user .doubleblind-bubble-role { color: var(--doomsday-red) !important; }
body.theme-doomsday .doubleblind-bubble-bot .doubleblind-bubble-role { color: #b0b0b0 !important; }
body.theme-doomsday .doubleblind-bubble-user .doubleblind-bubble {
    background: #2a2a2a !important;
    border: 1px solid var(--doomsday-red) !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .doubleblind-bubble-bot .doubleblind-bubble {
    background: #252525 !important;
    border: 1px solid #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .doubleblind-input-bar {
    background: #222 !important;
    border-top-color: #5a5a5a !important;
}
body.theme-doomsday .doubleblind-input {
    background: #252525 !important;
    border: 1px solid #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .doubleblind-send-btn,
body.theme-doomsday .doubleblind-clear-btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #a8a8a8 !important;
    box-shadow: none !important;
}
body.theme-doomsday .doubleblind-send-btn:hover,
body.theme-doomsday .doubleblind-clear-btn:hover { background: #353535 !important; color: #e5e5e5 !important; }

body.theme-doomsday .gacha-config,
body.theme-doomsday .gacha-slip-inner,
body.theme-doomsday .gacha-cover,
body.theme-doomsday .gacha-content {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .gacha-slip-title,
body.theme-doomsday .gacha-slip-chip,
body.theme-doomsday .gacha-content-inner,
body.theme-doomsday .gacha-slip-elements { color: #e5e5e5 !important; }
body.theme-doomsday .gacha-slip-chip {
    background: #2a2a2a !important;
    border-color: #5a5a5a !important;
}
/* 抽牌稀有：红色边框强调 */
body.theme-doomsday .gacha-slip--rare .gacha-slip-inner,
body.theme-doomsday .gacha-item.rare .gacha-content,
body.theme-doomsday .gacha-cover.rare { border-color: var(--doomsday-red) !important; box-shadow: 0 0 0 1px var(--doomsday-red) !important; }
body.theme-doomsday .gacha-slip-btn,
body.theme-doomsday .gacha-draw-row .btn,
body.theme-doomsday .gacha-open-actions .btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #e8e8e8 !important;
    box-shadow: none !important;
}
body.theme-doomsday .gacha-slip-btn:hover,
body.theme-doomsday .gacha-draw-row .btn:hover,
body.theme-doomsday .gacha-open-actions .btn:hover { background: #353535 !important; color: #e5e5e5 !important; }

body.theme-doomsday .scrollpoem-paper,
body.theme-doomsday .scrollpoem-chip,
body.theme-doomsday .sonnet-paper,
body.theme-doomsday .sonnet-line,
body.theme-doomsday .sonnet-footer {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .sonnet-title,
body.theme-doomsday .scrollpoem-desc { color: #a8a8a8 !important; }
body.theme-doomsday .line-number,
body.theme-doomsday .line-text,
body.theme-doomsday .line-counter { color: #c0c0c0 !important; }
body.theme-doomsday .sonnet-line:hover { background: #2a2a2a !important; }

body.theme-doomsday .color-fixed-section,
body.theme-doomsday .color-favorites-section,
body.theme-doomsday .color-detail,
body.theme-doomsday .color-combo,
body.theme-doomsday .color-favorite-item,
body.theme-doomsday .color-block,
body.theme-doomsday .color-slider-num,
body.theme-doomsday .color-hex-input,
body.theme-doomsday .color-copy-value {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .color-tool-content h3,
body.theme-doomsday .color-sidebar-title,
body.theme-doomsday .color-detail-title,
body.theme-doomsday .color-combo-title,
body.theme-doomsday .color-favorites-title,
body.theme-doomsday .color-favorites-hint,
body.theme-doomsday .color-favorite-name,
body.theme-doomsday .color-favorites-empty,
body.theme-doomsday .color-favorites-page-info,
body.theme-doomsday .color-favorites-total { color: #c8c8c8 !important; }
body.theme-doomsday .color-btn-add,
body.theme-doomsday .color-btn-save,
body.theme-doomsday .color-btn-pagination {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #e8e8e8 !important;
    box-shadow: none !important;
}
body.theme-doomsday .color-btn-add:hover,
body.theme-doomsday .color-btn-save:hover,
body.theme-doomsday .color-btn-pagination:hover:not(:disabled) { background: #353535 !important; color: #f0f0f0 !important; }
body.theme-doomsday .color-btn-shuffle {
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #e8e8e8 !important;
    border-radius: 2px !important;
}
body.theme-doomsday .color-btn-shuffle:hover { background: #353535 !important; }

body.theme-doomsday .pause-screen,
body.theme-doomsday .pause-captured-wrap,
body.theme-doomsday .gacha-result-area {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .pause-controls .btn,
body.theme-doomsday .pause-text { color: #e8e8e8 !important; }
body.theme-doomsday .pause-controls .btn {
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e8e8e8 !important;
}
body.theme-doomsday .pause-controls .btn:hover { background: #353535 !important; color: #f0f0f0 !important; }

body.theme-doomsday .shop-item,
body.theme-doomsday .shop-settings-panel,
body.theme-doomsday .shop-scratch-slot,
body.theme-doomsday .shop-event-discount-item {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .shop-refresh-btn,
body.theme-doomsday .shop-scratch-once {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #a8a8a8 !important;
    box-shadow: none !important;
}
body.theme-doomsday .shop-refresh-btn:hover,
body.theme-doomsday .shop-scratch-once:hover:not(:disabled) { background: #353535 !important; color: #e5e5e5 !important; }
body.theme-doomsday .shop-settings-title,
body.theme-doomsday .shop-events-settings summary { color: #e0e0e0 !important; }
body.theme-doomsday .shop-setting-row,
body.theme-doomsday .shop-event-weights-title,
body.theme-doomsday .shop-prob-grid label,
body.theme-doomsday .shop-event-discount-item .item-name,
body.theme-doomsday .shop-event-discount-item .item-original,
body.theme-doomsday .shop-modal-balance { color: #f0f0f0 !important; }
body.theme-doomsday .quiz-question h4,
body.theme-doomsday .option-text,
body.theme-doomsday .quiz-analysis h5,
body.theme-doomsday .progress-text,
body.theme-doomsday .quiz-sep { color: #e0e0e0 !important; }
body.theme-doomsday .quiz-analysis p { color: #c0c0c0 !important; }
body.theme-doomsday .item-name,
body.theme-doomsday .column-title,
body.theme-doomsday .selector-section .column-title { color: #f2f2f2 !important; }
body.theme-doomsday .item-count { color: #a8a8a8 !important; }
body.theme-doomsday .shop-scratch-awards,
body.theme-doomsday .shop-scratch-awards-title,
body.theme-doomsday .shop-scratch-result,
body.theme-doomsday .shop-scratch-result-text { color: #e0e0e0 !important; }
body.theme-doomsday .shop-scratch-card.scratch-done {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .shop-scratch-card.scratch-done .shop-scratch-awards,
body.theme-doomsday .shop-scratch-card.scratch-done .shop-scratch-awards-title,
body.theme-doomsday .shop-scratch-card.scratch-done .shop-scratch-result-text,
body.theme-doomsday .shop-scratch-card.scratch-done .shop-scratch-reveal { color: #e5e5e5 !important; }

body.theme-doomsday .farming-basket,
body.theme-doomsday .farming-seed-panel,
body.theme-doomsday .farming-tool-btn,
body.theme-doomsday .farming-mode-btn,
body.theme-doomsday .seed-tab,
body.theme-doomsday .basket-item,
body.theme-doomsday .basket-item-combo {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
/* 选中用红色 */
body.theme-doomsday .farming-tool-btn:hover,
body.theme-doomsday .farming-mode-btn:hover { background: #2a2a2a !important; border-color: #6e6e6e !important; color: #e5e5e5 !important; }
body.theme-doomsday .farming-tool-btn.active,
body.theme-doomsday .farming-mode-btn.active,
body.theme-doomsday .seed-tab.active { background: #2a2a2a !important; border-color: var(--doomsday-red) !important; color: #e5e5e5 !important; box-shadow: 0 0 0 1px var(--doomsday-red) !important; }
body.theme-doomsday .farming-basket-actions .btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #a8a8a8 !important;
}
body.theme-doomsday .farming-basket-actions .btn:hover { background: #353535 !important; color: #e5e5e5 !important; }
body.theme-doomsday .basket-label,
body.theme-doomsday .basket-summary { color: #c0c0c0 !important; }

body.theme-doomsday .quiz-option { color: #e8e8e8 !important; }
body.theme-doomsday .quiz-result-card,
body.theme-doomsday .quiz-analysis {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 8px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .quiz-result-combo-wrapper {
    background: #2a2a2a !important;
    border-color: #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .quiz-result-combo-wrapper:hover { border-color: var(--doomsday-red) !important; background: #252525 !important; }
body.theme-doomsday .quiz-element {
    background: #2a2a2a !important;
    border-color: #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .quiz-element:hover { background: #353535 !important; border-color: #6e6e6e !important; color: #f0f0f0 !important; }
body.theme-doomsday .quiz-analysis h5,
body.theme-doomsday .quiz-analysis p,
body.theme-doomsday .quiz-sep { color: #d0d0d0 !important; }
/* 心有灵犀末日：整块深底 + 所有子元素强制亮字，通用覆盖 */
body.theme-doomsday .telepathy-tool-content,
body.theme-doomsday .telepathy-tool-content * { color: #e8e8e8 !important; }
body.theme-doomsday .telepathy-tool-content { background: var(--theme-card-bg) !important; }
body.theme-doomsday .telepathy-slots-area,
body.theme-doomsday .telepathy-pool-area { background: #222 !important; }
body.theme-doomsday .telepathy-pool-chip,
body.theme-doomsday .telepathy-slot-chip {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
}
body.theme-doomsday .telepathy-pool-chip.telepathy-pool-absent {
    background: #444 !important;
    color: #e0e0e0 !important;
}
body.theme-doomsday .telepathy-submit-btn,
body.theme-doomsday .telepathy-clear-btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
}
body.theme-doomsday .telepathy-submit-btn:hover,
body.theme-doomsday .telepathy-clear-btn:hover { background: #353535 !important; }
body.theme-doomsday .telepathy-win { background: #2a2a2a !important; border-color: #5a5a5a !important; }
body.theme-doomsday .quiz-option:hover { background: #2a2a2a !important; border-color: #6e6e6e !important; }
body.theme-doomsday .quiz-option.selected { background: #2a2a2a !important; border-color: var(--doomsday-red) !important; box-shadow: 0 0 0 1px var(--doomsday-red) !important; }

/* 末日：挖矿工具区与背包黑底亮字 */
body.theme-doomsday .mining-tool-content { background: var(--theme-card-bg) !important; color: #e8e8e8 !important; }
body.theme-doomsday .mining-hint,
body.theme-doomsday .mining-stamina-text,
body.theme-doomsday .mining-map-label,
body.theme-doomsday .mining-backpack-label,
body.theme-doomsday .mining-backpack-empty,
body.theme-doomsday .mining-backpack-sep { color: #c8c8c8 !important; }
body.theme-doomsday .mining-map-empty { background: #2a2a2a !important; color: #d0d0d0 !important; }
body.theme-doomsday .mining-backpack-area,
body.theme-doomsday .mining-backpack-items,
body.theme-doomsday .mining-backpack-item,
body.theme-doomsday .mining-backpack-item-inner,
body.theme-doomsday .mining-backpack-chip { color: #f0f0f0 !important; }
body.theme-doomsday .mining-backpack-chip { background: #222 !important; border-color: #5a5a5a !important; }
body.theme-doomsday .mining-backpack-chip:hover { background: #2a2a2a !important; color: #f0f0f0 !important; }

body.theme-doomsday .quick-switch-list { background: transparent !important; }
body.theme-doomsday .quick-switch-row { border-color: #5a5a5a !important; }
body.theme-doomsday .quick-switch-item {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .quick-switch-item:hover { background: #2a2a2a !important; border-color: #6e6e6e !important; }
body.theme-doomsday .quick-switch-overwrite {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #a8a8a8 !important;
}
body.theme-doomsday .quick-switch-overwrite:hover { background: #353535 !important; color: #e5e5e5 !important; }
body.theme-doomsday .quick-switch-delete {
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #c0c0c0 !important;
    border-radius: 2px !important;
}
body.theme-doomsday .quick-switch-delete:hover { background: #353535 !important; }
body.theme-doomsday .quick-switch-binding { color: #e0e0e0 !important; }

body.theme-doomsday .history-pagination-bar { border-color: #5a5a5a !important; }
body.theme-doomsday .history-page-size,
body.theme-doomsday .history-page-jump {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .history-page-prev,
body.theme-doomsday .history-page-next {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #a8a8a8 !important;
}
body.theme-doomsday .history-page-prev:hover,
body.theme-doomsday .history-page-next:hover { background: #353535 !important; color: #e5e5e5 !important; }
body.theme-doomsday .history-entry-block { border-color: #5a5a5a !important; }
body.theme-doomsday .history-entry-meta { color: #a8a8a8 !important; }

body.theme-doomsday .blindbox-slip-inner,
body.theme-doomsday .blindbox-content {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .blindbox-slip-title,
body.theme-doomsday .blindbox-slip-chip,
body.theme-doomsday .blindbox-content .box-element { color: #e5e5e5 !important; }
body.theme-doomsday .blindbox-slip-chip {
    background: #2a2a2a !important;
    border-color: #5a5a5a !important;
}
/* 盲盒稀有：红色强调 */
body.theme-doomsday .blindbox-slip--rare .blindbox-slip-inner { border-color: var(--doomsday-red) !important; box-shadow: 0 0 0 1px var(--doomsday-red) !important; }
body.theme-doomsday .blindbox-slip-btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #e8e8e8 !important;
}
body.theme-doomsday .blindbox-slip-btn:hover { background: #353535 !important; color: #f0f0f0 !important; }

body.theme-doomsday .fortune-result-chip,
body.theme-doomsday .catch-gift-combo,
body.theme-doomsday .fishmaster-gift-combo,
body.theme-doomsday .catch-gift-item {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .catch-gift-sep,
body.theme-doomsday .fishmaster-gift-combo .catch-gift-sep { color: #a0a0a0 !important; }
body.theme-doomsday .catch-gift-element,
body.theme-doomsday .fishmaster-gift-combo .catch-gift-element { color: #e5e5e5 !important; }
body.theme-doomsday .catch-gift-combo .catch-gift-element,
body.theme-doomsday .fishmaster-gift-combo .catch-gift-element {
    background: #2a2a2a !important;
    border-color: #5a5a5a !important;
}
/* 末日：扭蛋机（与人生纸条同级别，机身/球窗/球/手柄/胶囊/配置区统一深底亮字） */
body.theme-doomsday .gashapon-machine {
    background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 50%, #1a1a1a 100%) !important;
    border: 2px solid #5a5a5a !important;
    border-radius: 2px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}
body.theme-doomsday .gashapon-machine-body {
    color: #e8e8e8 !important;
}
body.theme-doomsday .gashapon-balls-window {
    background: linear-gradient(145deg, rgba(30,30,30,0.98) 0%, rgba(26,26,26,0.95) 100%) !important;
    border: 2px solid #5a5a5a !important;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3) !important;
}
body.theme-doomsday .gashapon-dot-white {
    background: #e0e0e0 !important;
    border-color: #5a5a5a !important;
}
body.theme-doomsday .gashapon-dot-black {
    background: #353535 !important;
    border-color: #4a4a4a !important;
}
body.theme-doomsday .gashapon-dot-gray {
    background: #5a5a5a !important;
    border-color: #6e6e6e !important;
}
body.theme-doomsday .gashapon-handle {
    background: #353535 !important;
    border: 1px solid #5a5a5a !important;
    color: #e8e8e8 !important;
    border-radius: 2px !important;
}
body.theme-doomsday .gashapon-handle:hover { background: #404040 !important; color: #f0f0f0 !important; }
body.theme-doomsday .gashapon-chute {
    color: #e5e5e5 !important;
}
body.theme-doomsday .gashapon-capsule {
    border: 2px solid #5a5a5a !important;
    border-radius: 2px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4) !important;
}
body.theme-doomsday .gashapon-capsule:hover {
    box-shadow: 0 5px 14px rgba(0,0,0,0.5) !important;
}
body.theme-doomsday .gashapon-ball-white {
    background: linear-gradient(145deg, #4a4a4a 0%, #3a3a3a 100%) !important;
    border-color: rgba(255,255,255,0.1) !important;
}
body.theme-doomsday .gashapon-ball-black {
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%) !important;
    border-color: rgba(0,0,0,0.5) !important;
}
body.theme-doomsday .gashapon-ball-gray {
    background: linear-gradient(145deg, #404040 0%, #303030 100%) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
body.theme-doomsday .gashapon-config,
body.theme-doomsday .gashapon-config .form-group,
body.theme-doomsday .gashapon-config label {
    color: #e5e5e5 !important;
}
body.theme-doomsday .gashapon-config .form-control,
body.theme-doomsday .gashapon-config select {
    background: #252525 !important;
    border-color: #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .gashapon-capsule.opened .gashapon-result-card {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}
body.theme-doomsday .gashapon-result-content .fortune-result-chip {
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .gashapon-result-content .fortune-result-chip:hover {
    background: #353535 !important;
}

body.theme-doomsday .firework-item,
body.theme-doomsday .firework-reset-btn {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 2px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .firework-trigger-btn {
    border-radius: 2px !important;
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #e8e8e8 !important;
}
body.theme-doomsday .firework-trigger-btn:hover { background: #353535 !important; color: #e5e5e5 !important; }

body.theme-doomsday .modal-container { background: rgba(0,0,0,0.85) !important; backdrop-filter: blur(5px); }
body.theme-doomsday .remove-btn { color: #e0e0e0 !important; background: transparent !important; border: none !important; }
body.theme-doomsday .remove-btn:hover { color: #f0f0f0 !important; }

/* ---------- 末日：全工具兜底，所有设置/结果区/标签/按钮一律深底亮字 ---------- */
body.theme-doomsday .gacha-settings summary,
body.theme-doomsday .gacha-result-area,
body.theme-doomsday .gacha-config-row label,
body.theme-doomsday .gacha-pity-display { color: #e5e5e5 !important; }
body.theme-doomsday .gacha-result-area { background: var(--theme-card-bg) !important; border-color: #5a5a5a !important; }
body.theme-doomsday .gacha-content-inner,
body.theme-doomsday .gacha-element,
body.theme-doomsday .gacha-badge { color: #e5e5e5 !important; }
body.theme-doomsday .gacha-badge { background: rgba(0,0,0,0.4) !important; }
body.theme-doomsday .horoscope-title,
body.theme-doomsday .horoscope-header,
body.theme-doomsday .zodiac-details h4,
body.theme-doomsday .zodiac-details small,
body.theme-doomsday .horoscope-fortune,
body.theme-doomsday .horoscope-fortune-empty,
body.theme-doomsday .rank-display,
body.theme-doomsday .rank-display.rank-num { color: #e5e5e5 !important; }
body.theme-doomsday .horoscope-item,
body.theme-doomsday .horoscope-item.horoscope-rank-1,
body.theme-doomsday .horoscope-item.horoscope-rank-2,
body.theme-doomsday .horoscope-item.horoscope-rank-3 {
    background: #222 !important;
    border-color: #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .horoscope-item.horoscope-rank-1 { border-color: #8a7a3a !important; }
body.theme-doomsday .horoscope-item.horoscope-rank-2 { border-color: #6e6e6e !important; }
body.theme-doomsday .horoscope-item.horoscope-rank-3 { border-color: #7a5a3a !important; }
body.theme-doomsday .horoscope-fortune-chip {
    background: #2a2a2a !important;
    border-color: #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .horoscope-fortune-chip:hover { background: #353535 !important; }
body.theme-doomsday .wheel-container,
body.theme-doomsday .wheel-wrapper,
body.theme-doomsday .wheel-result-card,
body.theme-doomsday .wheel-result-label { background: #222 !important; border-color: #5a5a5a !important; color: #e5e5e5 !important; }
body.theme-doomsday .wheel-result-card h4,
body.theme-doomsday .wheel-result-card .result-text { color: #e5e5e5 !important; }
body.theme-doomsday .catch-gift-box-area {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 8px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .catch-gift-box-label,
body.theme-doomsday .catch-gift-box-empty,
body.theme-doomsday .catch-theme-label,
body.theme-doomsday .catch-speed-row label,
body.theme-doomsday .catch-result-hint { color: #e5e5e5 !important; }
body.theme-doomsday .catch-theme-btn,
body.theme-doomsday .catch-speed-btn {
    background: #2a2a2a !important;
    border: 1px solid #5a5a5a !important;
    color: #e8e8e8 !important;
}
body.theme-doomsday .catch-theme-btn:hover,
body.theme-doomsday .catch-speed-btn:hover { background: #353535 !important; color: #f0f0f0 !important; }
body.theme-doomsday .catch-theme-btn.selected,
body.theme-doomsday .catch-speed-btn.active {
    border-color: var(--doomsday-red) !important;
    box-shadow: 0 0 0 1px var(--doomsday-red) !important;
}
body.theme-doomsday .game-stats {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 5px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .stat-label { color: #b0b0b0 !important; }
body.theme-doomsday .stat-value { color: #e8e8e8 !important; }
body.theme-doomsday .catch-game-area {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border: 2px solid #5a5a5a !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .firework-tool {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border: 2px solid #5a5a5a !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .game-canvas-white,
body.theme-doomsday .catch-game-area .game-canvas {
    background: #1a1a1a !important;
    border-color: #5a5a5a !important;
}
body.theme-doomsday .fishmaster-area .game-controls,
body.theme-doomsday .fishmaster-pond,
body.theme-doomsday .fishmaster-hint,
body.theme-doomsday .fishmaster-fishes,
body.theme-doomsday .fishmaster-fish { color: #e5e5e5 !important; }
body.theme-doomsday .fishmaster-pond { background: #1a1a1a !important; border-color: #5a5a5a !important; }
body.theme-doomsday .fishmaster-net { background: #2a2a2a !important; border-color: #5a5a5a !important; color: #e5e5e5 !important; }
body.theme-doomsday .fishing-basket-area {
    background: #222 !important;
    border: 1px solid #5a5a5a !important;
    border-radius: 8px !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .fishing-basket-label,
body.theme-doomsday .fishing-basket-items { color: #e5e5e5 !important; }
body.theme-doomsday .fishing-clear-basket-btn {
    background: #2a2a2a !important;
    border-color: #5a5a5a !important;
    color: #e8e8e8 !important;
}
body.theme-doomsday .fishing-clear-basket-btn:hover { background: #353535 !important; color: #f0f0f0 !important; }
body.theme-doomsday .fishing-stats,
body.theme-doomsday .fishing-config,
body.theme-doomsday .fishing-config summary,
body.theme-doomsday .fishing-config label { background: #222 !important; border-color: #5a5a5a !important; color: #e5e5e5 !important; }
body.theme-doomsday .wordcloud-canvas {
    background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%) !important;
    border: 1px solid #5a5a5a !important;
}
body.theme-doomsday .wordcloud-container,
body.theme-doomsday .wordcloud-controls,
body.theme-doomsday .wordcloud-word { color: #e5e5e5 !important; }
body.theme-doomsday .wordcloud-word,
body.theme-doomsday .wordcloud-word--black { color: #e0e0e0 !important; }
body.theme-doomsday .wordcloud-controls .btn { background: #2a2a2a !important; border-color: #5a5a5a !important; color: #e8e8e8 !important; }
body.theme-doomsday .combo-config .form-group,
body.theme-doomsday .combo-config label,
body.theme-doomsday .combo-source-label,
body.theme-doomsday .combo-list-wrap { background: #222 !important; border-color: #5a5a5a !important; color: #e5e5e5 !important; }
body.theme-doomsday .combo-source-value .result-item { background: var(--theme-card-bg) !important; color: #e5e5e5 !important; border-color: #5a5a5a !important; }
body.theme-doomsday .tool-content .form-group label,
body.theme-doomsday .tool-content label,
body.theme-doomsday .tool-content .hint,
body.theme-doomsday .tool-content p:not(.result-item) { color: #e5e5e5 !important; }
body.theme-doomsday .doubleblind-send-btn,
body.theme-doomsday .doubleblind-clear-btn { color: #e8e8e8 !important; }
body.theme-doomsday .gashapon-capsule.opened .gashapon-result-card,
body.theme-doomsday .gashapon-result-content .fortune-result-chip {
    background: #222 !important;
    border-color: #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .catch-result-card,
body.theme-doomsday .catch-elements,
body.theme-doomsday .catch-element {
    background: #222 !important;
    border-color: #5a5a5a !important;
    color: #e5e5e5 !important;
}
body.theme-doomsday .daily-tool .form-group,
body.theme-doomsday .basic-tool-content label,
body.theme-doomsday .basic-tool-content .checkbox-label { color: #e5e5e5 !important; }

/* ========== 温柔海：水蓝配色，方格线+斜格，深色标题，方角 ========== */
body.theme-sea {
    --theme-bg: #f4fbfe;
    --theme-bg-secondary: #e3f4fa;
    --theme-bg-tertiary: #ccecf6;
    --theme-text: #1e5070;
    --theme-text-secondary: #35708c;
    --theme-text-muted: #5a8fa8;
    --theme-border: #9ed4ea;
    --theme-border-strong: #6bb8d8;
    --theme-border-focus: #5ba8cc;
    --theme-input-bg: #fff;
    --theme-input-border: #9ed4ea;
    --theme-btn-bg: #5ba8cc;
    --theme-btn-hover: #6bb8dc;
    --theme-btn-text: #fff;
    --theme-card-bg: #fff;
    --theme-result-bg: #fff;
    --theme-result-border: #9ed4ea;
    --theme-result-hover-bg: #5ba8cc;
    --theme-result-hover-text: #fff;
    --theme-shadow: 0 2px 10px rgba(91, 168, 204, 0.12);
    --theme-shadow-lg: 0 4px 16px rgba(91, 168, 204, 0.14);
    --theme-modal-backdrop: rgba(200, 230, 245, 0.55);
    --sea-pure: #5ba8cc;
    --sea-water: #7ec4e0;
    --sea-deep: #2d6b8a;
    --sea-grid: rgba(91, 168, 204, 0.11);
    --sea-slant: rgba(126, 196, 224, 0.07);
}

/* 温柔海：方格线参考（只定义一次，下面所有需要方格纸的共用） */
body.theme-sea #main-app,
body.theme-sea .main-content,
body.theme-sea .tool-content,
body.theme-sea .auth-container,
body.theme-sea .settings-container,
body.theme-sea .modal,
body.theme-sea .results-content-box,
body.theme-sea .theme-option,
body.theme-sea .setting-details,
body.theme-sea .setting-details-content,
body.theme-sea .sidebar-section,
/* .library-selector 用灰底，不在此列 */
body.theme-sea .shop-header,
body.theme-sea .catch-gift-box-area,
body.theme-sea .fishing-stats,
body.theme-sea .fishing-config,
body.theme-sea .blindbox-config,
body.theme-sea .doubleblind-phone,
body.theme-sea .gashapon-machine,
body.theme-sea .scrollpoem-paper,
/* .result-item-wrap / .result-item-wrap-combo 用纯色，不在此列 */
body.theme-sea .combo-list-wrap,
body.theme-sea .shop-item,
body.theme-sea .shop-game-over,
body.theme-sea .horoscope-item,
body.theme-sea .gashapon-capsule.opened .gashapon-result-card,
body.theme-sea .blindbox-slip-inner,
body.theme-sea .blindbox-content,
body.theme-sea .sonnet-paper,
body.theme-sea .range-inputs,
body.theme-sea .sonnet-controls,
body.theme-sea .sonnet-result,
body.theme-sea .result-item,
body.theme-sea .selected-item,
body.theme-sea .fortune-result-chip,
body.theme-sea .blindbox-slip-chip {
    background-color: #fff !important;
    background-image: linear-gradient(var(--sea-grid) 1px, transparent 1px), linear-gradient(90deg, var(--sea-grid) 1px, transparent 1px) !important;
    background-size: 24px 24px !important;
}

/* 主区 + 内容区（方格线由上参考提供） */
body.theme-sea #main-app,
body.theme-sea .main-content {
    color: var(--theme-text) !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
}
body.theme-sea .results-area { background: transparent !important; }

body.theme-sea .header {
    background: #fff !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--sea-deep) !important;
    border-left: 4px solid var(--sea-pure) !important;
    border-radius: 0 !important;
    box-shadow: 0 1px 4px rgba(45, 107, 138, 0.08);
}

/* 侧栏：水蓝底（去掉斜格伪元素，避免卡顿） */
body.theme-sea .sidebar {
    background: var(--theme-bg-secondary) !important;
    border-right: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
}

body.theme-sea .sidebar-section {
    color: var(--theme-text) !important;
    padding: 1.25rem 1.5rem !important;
    margin: 0.5rem 0.35rem !important;
    border: 1px solid var(--sea-deep) !important;
    border-left: 4px solid var(--sea-pure) !important;
    border-radius: 0 !important;
    box-shadow: var(--theme-shadow);
}

/* 工具区（方格线由上参考提供） */
body.theme-sea .tool-content {
    color: var(--theme-text) !important;
    border: 1px solid var(--sea-deep) !important;
    border-left: 4px solid var(--sea-pure) !important;
    border-radius: 0 !important;
}

/* 通用卡片（方格线由上参考提供） */
body.theme-sea .auth-container,
body.theme-sea .settings-container,
body.theme-sea .modal,
body.theme-sea .results-content-box,
body.theme-sea .theme-option,
body.theme-sea .library-selector,
body.theme-sea .setting-details,
body.theme-sea .setting-details-content {
    color: var(--theme-text) !important;
    border: 1px solid var(--sea-deep) !important;
    border-left: 4px solid var(--sea-pure) !important;
    border-radius: 0 !important;
    box-shadow: var(--theme-shadow);
}

/* 每个小元素（方格线由上参考提供） */
body.theme-sea .result-item,
body.theme-sea .selected-item {
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 0 !important;
}

/* 标题与标签：深色字，方角 */
body.theme-sea .header h1 {
    color: var(--theme-text) !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding-left: 0.5rem;
    border-left: 4px solid var(--sea-pure);
    border-radius: 0;
}
body.theme-sea .auth-container h1 {
    color: var(--theme-text) !important;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--sea-pure), transparent 70%) 1;
}
body.theme-sea .sidebar-header h3 {
    color: var(--theme-text) !important;
    font-weight: 700;
    font-size: 1.2rem;
    padding-left: 0.45rem;
    border-left: 4px solid var(--sea-pure);
    border-radius: 0;
}
body.theme-sea .sidebar-section h4 {
    color: var(--theme-text-secondary) !important;
    font-weight: 600;
    font-size: 1rem;
    padding-left: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--sea-pure);
    border-radius: 0;
}
body.theme-sea .toolbox-current-title {
    color: var(--theme-text) !important;
    font-weight: 700;
    font-size: 1.05rem;
}
body.theme-sea .toolbox-selector { padding: 0.75rem 1rem; gap: 1rem; }
body.theme-sea .toolbox-btn {
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
    color: var(--theme-text) !important;
    box-shadow: 0 1px 4px rgba(45, 107, 138, 0.06);
}
body.theme-sea .toolbox-btn:hover {
    border-color: var(--sea-pure) !important;
    background: var(--theme-bg-secondary) !important;
}
body.theme-sea .toolbox-current-title {
    display: inline-block;
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
    padding: 0.5rem 1rem !important;
    color: var(--theme-text) !important;
}

body.theme-sea .system-options-row {
    position: relative;
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
    padding: 0.75rem 1rem !important;
    margin-top: 0.5rem;
}
body.theme-sea .system-options-row label { color: var(--theme-text-secondary) !important; font-weight: 500; }
body.theme-sea .system-options-row .opt-cb { accent-color: var(--sea-pure); }
body.theme-sea .emoji-options-row {
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
    padding: 0.75rem 1rem !important;
}
body.theme-sea .btn-emoji-filter-toggle {
    background: var(--theme-bg-tertiary) !important;
    border: 1px solid var(--theme-border-strong) !important;
    color: var(--theme-text) !important;
    border-radius: 0 !important;
}
body.theme-sea .btn-emoji-filter-toggle:hover { border-color: var(--sea-pure) !important; }
body.theme-sea .emoji-category-filter-wrap {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 0 !important;
}

body.theme-sea .selector-label { color: var(--theme-text-secondary) !important; font-weight: 600; }
body.theme-sea .modal-header h3 {
    color: var(--theme-text) !important;
    font-weight: 700;
    padding-left: 0.5rem;
    border-left: 4px solid var(--sea-pure);
    border-radius: 0;
}
body.theme-sea .settings-header h2,
body.theme-sea .setting-section h3 {
    color: var(--theme-text) !important;
    font-weight: 700;
    padding-left: 0.5rem;
    border-left: 4px solid var(--sea-pure);
    border-radius: 0;
}
body.theme-sea .tool-content h3 {
    color: var(--theme-text) !important;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0 0.4rem 0.6rem;
    border-left: 4px solid var(--sea-pure);
    border-radius: 0;
}
body.theme-sea .sonnet-title,
body.theme-sea .doubleblind-content h3 { color: var(--theme-text) !important; font-weight: 700; padding-left: 0.5rem; border-left: 4px solid var(--sea-pure); border-radius: 0; }
body.theme-sea .system-options-label,
body.theme-sea .theme-select-label { color: var(--theme-text-secondary) !important; font-weight: 600; }
body.theme-sea .theme-option-name { color: var(--theme-text) !important; font-weight: 700; }
body.theme-sea .setting-summary { font-weight: 600; color: var(--theme-text-secondary) !important; }
body.theme-sea .theme-current-name { color: var(--theme-text-muted) !important; }
body.theme-sea .scrollpoem-desc { color: var(--theme-text-secondary) !important; }

/* 便签纸造型扩展（方格线由上参考提供） */
body.theme-sea .sidebar-section,
body.theme-sea .shop-header,
body.theme-sea .catch-gift-box-area,
body.theme-sea .fishing-stats,
body.theme-sea .fishing-config,
body.theme-sea .blindbox-config,
body.theme-sea .doubleblind-phone,
body.theme-sea .gashapon-machine,
body.theme-sea .scrollpoem-paper,
body.theme-sea .theme-option,
body.theme-sea .result-item-wrap,
body.theme-sea .combo-list-wrap,
body.theme-sea .shop-item,
body.theme-sea .shop-game-over,
body.theme-sea .horoscope-item,
body.theme-sea .gashapon-capsule.opened .gashapon-result-card,
body.theme-sea .blindbox-slip-inner,
body.theme-sea .blindbox-content {
    position: relative !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
    box-shadow: var(--theme-shadow);
}
body.theme-sea .fortune-box,
body.theme-sea .fortune-card {
    position: relative !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
    box-shadow: var(--theme-shadow);
}
body.theme-sea .theme-option { border-left: 4px solid var(--sea-pure) !important; }
body.theme-sea .theme-option.active { box-shadow: 0 0 0 2px var(--sea-pure); }

body.theme-sea .sidebar-backdrop { background: rgba(0,0,0,0.15) !important; }
body.theme-sea .library-selector {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
    padding: 0.75rem 1rem !important;
}

/* 按钮组：方角 */
body.theme-sea .btn,
body.theme-sea .btn-primary,
body.theme-sea .action-btn,
body.theme-sea .generate-btn,
body.theme-sea #auth-submit {
    background: var(--sea-pure) !important;
    color: #fff !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
}
body.theme-sea .btn-primary:hover,
body.theme-sea .action-btn:hover,
body.theme-sea .generate-btn:hover:not(:disabled),
body.theme-sea #auth-submit:hover {
    background: var(--theme-btn-hover) !important;
    border-color: var(--theme-border-strong) !important;
}
body.theme-sea .generate-btn:disabled { background: var(--theme-bg-tertiary) !important; color: var(--theme-text-muted) !important; }
body.theme-sea .btn-secondary,
body.theme-sea .blindbox-slip-btn,
body.theme-sea .gacha-slip-btn,
body.theme-sea .telepathy-submit-btn,
body.theme-sea .telepathy-clear-btn {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .btn-secondary:hover,
body.theme-sea .blindbox-slip-btn:hover,
body.theme-sea .gacha-slip-btn:hover,
body.theme-sea .telepathy-submit-btn:hover,
body.theme-sea .telepathy-clear-btn:hover {
    background: var(--theme-bg-tertiary) !important;
    border-color: var(--sea-pure) !important;
}
body.theme-sea .action-btn-danger {
    background: #c45c5c !important;
    color: #fff !important;
    border: 1px solid #a04040 !important;
    border-radius: 0 !important;
}
body.theme-sea .action-btn-danger:hover { background: #a04040 !important; }
body.theme-sea .action-btn-sm,
body.theme-sea .remove-btn,
body.theme-sea .result-action-btn,
body.theme-sea .result-combo-edit {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .action-btn-sm:hover,
body.theme-sea .remove-btn:hover,
body.theme-sea .result-action-btn:hover,
body.theme-sea .result-combo-edit:hover {
    border-color: var(--sea-pure) !important;
    background: var(--theme-bg-tertiary) !important;
}

/* 输入框与表单 */
body.theme-sea input[type="text"],
body.theme-sea input[type="password"],
body.theme-sea .form-control,
body.theme-sea .doubleblind-input {
    background: var(--theme-input-bg) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-input-border) !important;
    border-radius: 0 !important;
}
body.theme-sea input:focus,
body.theme-sea .doubleblind-input:focus { border-color: var(--sea-pure) !important; outline: none; }

/* 结果条与芯片 */
body.theme-sea .result-item:hover { background: var(--theme-result-hover-bg) !important; color: var(--theme-result-hover-text) !important; border-color: var(--sea-pure) !important; }
/* 组合框/外框：纯色，里面的 .result-item 才是方格纸 */
body.theme-sea .result-item-wrap,
body.theme-sea .result-item-wrap-combo {
    background: var(--theme-bg-secondary) !important;
    background-image: none !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
}
body.theme-sea .fortune-result-chip { border: 1px solid var(--theme-border-strong) !important; border-radius: 0 !important; color: var(--theme-text) !important; }
body.theme-sea .blindbox-slip-chip { background: var(--theme-bg-secondary) !important; border-color: var(--theme-border) !important; }
body.theme-sea .blindbox-slip--rare .blindbox-slip-inner { border-color: var(--sea-pure) !important; }

/* 设置与折叠 */
body.theme-sea .setting-summary,
body.theme-sea details[open] .setting-summary {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text) !important;
    border-radius: 0 !important;
}
body.theme-sea .setting-details { border: 1px solid var(--sea-deep) !important; border-left: 4px solid var(--sea-pure) !important; }
body.theme-sea .modal-header,
body.theme-sea .modal-footer { border-color: var(--theme-border-strong) !important; }

/* 抽签/盲盒/扭蛋/双盲：水蓝色、方角 */
body.theme-sea .fortune-box {
    background: linear-gradient(135deg, #e8f6fa 0%, var(--theme-bg-tertiary) 50%, #d4eef6 100%) !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
}
body.theme-sea .fortune-box:hover { box-shadow: 0 4px 16px rgba(91, 168, 204, 0.2); }
body.theme-sea .fortune-card {
    background: linear-gradient(180deg, #fff 0%, #eef8fc 100%) !important;
    border-radius: 0 !important;
}
body.theme-sea .doubleblind-phone { border: 1px solid var(--sea-deep) !important; border-radius: 0 !important; }
body.theme-sea .doubleblind-bubble-user .doubleblind-bubble {
    background: linear-gradient(135deg, var(--sea-pure) 0%, var(--sea-water) 100%) !important;
    color: #fff !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
}
body.theme-sea .doubleblind-bubble-bot .doubleblind-bubble {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .doubleblind-input-bar { border-top-color: var(--theme-border-strong) !important; }
body.theme-sea .doubleblind-send-btn { background: var(--sea-pure) !important; border-radius: 0 !important; }
body.theme-sea .doubleblind-send-btn:hover { background: var(--theme-btn-hover) !important; }
body.theme-sea .doubleblind-clear-btn {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .doubleblind-clear-btn:hover { background: var(--theme-border-strong) !important; }

/* 温柔海扭蛋机：对齐人生纸条写法，机身/球窗/球色/手柄/胶囊统一水蓝配色 */
body.theme-sea .gashapon-machine {
    background: linear-gradient(180deg, #f4fbfe 0%, #e3f4fa 50%, #ccecf6 100%) !important;
    border: 3px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 16px rgba(91, 168, 204, 0.15), inset 0 1px 0 rgba(255,255,255,0.6) !important;
}
body.theme-sea .gashapon-balls-window {
    border-color: var(--theme-border-strong) !important;
    background: linear-gradient(145deg, rgba(244,251,254,0.98) 0%, rgba(204,236,246,0.95) 100%) !important;
}
body.theme-sea .gashapon-dot-white { background: #f4fbfe !important; border-color: var(--theme-border) !important; }
body.theme-sea .gashapon-dot-black { background: var(--sea-deep) !important; border-color: #1e5070 !important; }
body.theme-sea .gashapon-dot-gray { background: var(--sea-water) !important; border-color: var(--sea-pure) !important; }
body.theme-sea .gashapon-handle {
    background: var(--sea-pure) !important;
    border-radius: 0 !important;
}
body.theme-sea .gashapon-handle:hover { background: var(--theme-btn-hover) !important; }
body.theme-sea .gashapon-ball-white { background: linear-gradient(145deg, #f4fbfe 0%, #e3f4fa 100%) !important; }
body.theme-sea .gashapon-ball-black { background: linear-gradient(145deg, var(--sea-pure) 0%, var(--sea-deep) 100%) !important; border-color: rgba(30,80,112,0.35) !important; }
body.theme-sea .gashapon-ball-gray { background: linear-gradient(145deg, var(--sea-water) 0%, var(--sea-pure) 100%) !important; }
body.theme-sea .gashapon-capsule {
    border-color: rgba(255,255,255,0.7) !important;
    box-shadow: 0 3px 10px rgba(91, 168, 204, 0.2) !important;
}
body.theme-sea .gashapon-capsule:hover {
    box-shadow: 0 5px 14px rgba(91, 168, 204, 0.3) !important;
}
body.theme-sea .gashapon-result-content .fortune-result-chip {
    background: #e8f6fa !important;
    border-color: var(--theme-border) !important;
    border-radius: 0 !important;
}

body.theme-sea .scrollpoem-paper {
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .scrollpoem-chip { background: var(--theme-bg-tertiary) !important; border: 1px solid var(--theme-border-strong) !important; color: var(--theme-text) !important; border-radius: 0 !important; }
body.theme-sea .scrollpoem-chip:hover { border-color: var(--sea-pure) !important; }
body.theme-sea .sonnet-paper,
body.theme-sea .range-inputs,
body.theme-sea .sonnet-controls,
body.theme-sea .sonnet-result {
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
    color: var(--theme-text) !important;
}
body.theme-sea .range-inputs input,
body.theme-sea .sonnet-line,
body.theme-sea .line-text,
body.theme-sea .sonnet-footer { color: var(--theme-text) !important; }
body.theme-sea .sonnet-title { color: var(--theme-text) !important; }
body.theme-sea .line-number { color: var(--theme-text-muted) !important; }

/* 色彩工具 */
body.theme-sea .color-tool-content h3 { color: var(--theme-text) !important; border-left: 4px solid var(--sea-pure); padding-left: 0.5rem; }
body.theme-sea .color-detail,
body.theme-sea .color-block,
body.theme-sea .color-fixed-section,
body.theme-sea .color-favorites-section,
body.theme-sea .color-combo {
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border-strong) !important;
    color: var(--theme-text) !important;
}
body.theme-sea .color-btn-add,
body.theme-sea .color-btn-save { background: var(--sea-pure) !important; color: #fff !important; border: 1px solid var(--sea-deep) !important; }
body.theme-sea .color-btn-add:hover,
body.theme-sea .color-btn-save:hover { background: var(--theme-btn-hover) !important; }
body.theme-sea .color-btn-shuffle { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-sea .color-btn-shuffle:hover { border-color: var(--sea-pure) !important; }

/* 一键开关/历史/暂停/抽卡/种地/商店等 */
body.theme-sea .setting-details-content { background: var(--theme-card-bg) !important; }
body.theme-sea .quick-switch-item,
body.theme-sea .quick-switch-row { border-color: var(--theme-border-strong) !important; }
body.theme-sea .quick-switch-item { background: var(--theme-card-bg) !important; color: var(--theme-text) !important; border-radius: 0 !important; }
body.theme-sea .quick-switch-item:hover { border-color: var(--sea-pure) !important; }
body.theme-sea .quick-switch-overwrite { background: var(--sea-pure) !important; color: #fff !important; border-radius: 0 !important; }
body.theme-sea .quick-switch-overwrite:hover { background: var(--theme-btn-hover) !important; }
body.theme-sea .history-btn {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .history-btn:hover { border-color: var(--sea-pure) !important; }
body.theme-sea .selected-item { border: 1px solid var(--theme-border-strong) !important; }
body.theme-sea .add-btn {
    background: var(--sea-pure) !important;
    color: #fff !important;
    border: 1px solid var(--sea-deep) !important;
    border-radius: 0 !important;
}
body.theme-sea .add-btn:hover { background: var(--sea-pure) !important; }
body.theme-sea .switch-btn,
body.theme-sea .btn-select {
    background: var(--theme-bg-tertiary) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .switch-btn:hover,
body.theme-sea .btn-select:hover { border-color: var(--sea-pure) !important; }

body.theme-sea .pause-screen,
body.theme-sea .pause-captured-wrap {
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .pause-hint,
body.theme-sea .pause-text { color: var(--theme-text-secondary) !important; }
body.theme-sea .gacha-config,
body.theme-sea .gacha-slip-inner {
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .gacha-slip-title { color: var(--theme-text) !important; }
body.theme-sea .farming-basket,
body.theme-sea .shop-settings-panel {
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: 0 !important;
}
body.theme-sea .modal-container { background: var(--theme-modal-backdrop) !important; }
body.theme-sea .shop-item { border: 1px solid var(--theme-border-strong) !important; }
body.theme-sea .shop-item:hover:not(.purchased) { border-color: var(--sea-pure) !important; }
body.theme-sea h1, body.theme-sea h2, body.theme-sea h3, body.theme-sea h4 { color: var(--theme-text) !important; }
body.theme-sea .tool-content h1, body.theme-sea .tool-content h2, body.theme-sea .tool-content h3, body.theme-sea .tool-content h4 { color: var(--theme-text) !important; }
body.theme-sea label, body.theme-sea .theme-option-desc { color: var(--theme-text-secondary) !important; }
body.theme-sea select,
body.theme-sea .default-favorite-select {
    background: var(--theme-input-bg) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-input-border) !important;
    border-radius: 6px !important;
}
body.theme-sea .footer,
body.theme-sea .credits,
body.theme-sea .author-info,
body.theme-sea .disclaimer { color: var(--theme-text-secondary) !important; }
body.theme-sea .close-btn { color: var(--theme-text) !important; background: transparent !important; border: none !important; }
body.theme-sea .close-btn:hover { color: var(--sea-pure) !important; }
body.theme-sea .menu-btn { color: var(--theme-text) !important; background: var(--theme-bg-tertiary) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-sea .settings-btn { color: var(--theme-text) !important; }

/* ========== 温柔星空：深蓝底 + 明显更浅的卡片，金黄点缀，月亮与碎闪，字清晰 ========== */
body.theme-starry {
    --theme-bg: #0f1822;
    --theme-bg-secondary: #16202d;
    --theme-bg-tertiary: #1e2d3d;
    --theme-text: #e8e4dc;
    --theme-text-secondary: #b8b4a8;
    --theme-text-muted: #88909a;
    --theme-border: #2a3a4d;
    --theme-border-strong: #3d5068;
    --theme-input-bg: #1e2d3d;
    --theme-input-border: #2a3a4d;
    --theme-btn-bg: #d4a84a;
    --theme-btn-hover: #c4983a;
    --theme-btn-text: #0f1822;
    --theme-card-bg: #1a2635;
    --theme-result-bg: #1a2635;
    --theme-result-border: #2a3a4d;
    --theme-result-hover-bg: #d4a84a;
    --theme-result-hover-text: #0f1822;
    --theme-shadow: 0 2px 16px rgba(0,0,0,0.35), 0 0 24px rgba(212, 168, 74, 0.06);
    --theme-shadow-lg: 0 4px 24px rgba(0,0,0,0.4), 0 0 32px rgba(212, 168, 74, 0.08);
    --theme-modal-backdrop: rgba(15, 24, 34, 0.88);
}
body.theme-starry #main-app,
body.theme-starry .main-content { background: var(--theme-bg) !important; color: var(--theme-text) !important; }
body.theme-starry .tool-content,
body.theme-starry .results-area { background: var(--theme-bg) !important; }
body.theme-starry .header {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    box-shadow: 0 0 20px rgba(212, 168, 74, 0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}
body.theme-starry .sidebar { background: var(--theme-bg-secondary) !important; border-right: 1px solid var(--theme-border) !important; }
body.theme-starry .sidebar-section {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    padding: 1.25rem 1.5rem !important;
    margin: 0.5rem 0.35rem !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 16px rgba(212, 168, 74, 0.05), inset 0 1px 0 rgba(255,255,255,0.03);
}
body.theme-starry .tool-content {
    position: relative !important;
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 0 24px rgba(212, 168, 74, 0.06), inset 0 1px 0 rgba(255,255,255,0.03);
}
body.theme-starry .tool-content::before {
    content: '';
    position: absolute;
    top: 12px; right: 12px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(240,230,200,0.25), rgba(212,168,74,0.08));
    box-shadow: 0 0 20px rgba(212,168,74,0.15);
    pointer-events: none;
}
body.theme-starry .tool-content::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    background-image: radial-gradient(2px 2px at 15px 25px, rgba(212,168,74,0.5), transparent), radial-gradient(2px 2px at 45px 80px, rgba(255,255,255,0.35), transparent), radial-gradient(2px 2px at 80px 40px, rgba(212,168,74,0.4), transparent);
    background-size: 100px 120px;
    pointer-events: none;
    border-radius: inherit;
}
body.theme-starry .tool-content > * { position: relative; z-index: 1; }
body.theme-starry .auth-container,
body.theme-starry .settings-container,
body.theme-starry .modal,
body.theme-starry .results-content-box,
body.theme-starry .result-item,
body.theme-starry .theme-option,
body.theme-starry .library-selector,
body.theme-starry .selected-item,
body.theme-starry .fortune-box,
body.theme-starry .fortune-card {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    box-shadow: 0 0 12px rgba(212, 168, 74, 0.04), inset 0 1px 0 rgba(255,255,255,0.02);
}
body.theme-starry h1, body.theme-starry h2, body.theme-starry h3 { color: #e8dca8 !important; text-shadow: 0 0 16px rgba(212,168,74,0.2); }
body.theme-starry .btn-primary, body.theme-starry .action-btn, body.theme-starry .generate-btn { background: #d4a84a !important; color: #0f1822 !important; border: 1px solid #c4983a !important; }
body.theme-starry .btn-primary:hover, body.theme-starry .action-btn:hover { background: #c4983a !important; }
body.theme-starry .btn-secondary { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-starry input, body.theme-starry .form-control { background: var(--theme-input-bg) !important; color: var(--theme-text) !important; border: 1px solid var(--theme-border) !important; }
body.theme-starry .result-item:hover { background: #d4a84a !important; color: #0f1822 !important; }
body.theme-starry .setting-summary { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; }
body.theme-starry .modal-header, body.theme-starry .modal-footer { border-color: var(--theme-border) !important; }

/* ========== 春日烂漫：整体亮、浅粉；下面信息区浅粉色；信纸框+白横线+花 ========== */
body.theme-spring {
    --theme-bg: #fff;
    --theme-bg-secondary: #fce4ec;
    --theme-bg-tertiary: #fce4ec;
    --theme-text: #262E33;
    --theme-text-secondary: #412830;
    --theme-text-muted: #412830;
    --theme-border: #e090a0;
    --theme-border-strong: #412830;
    --theme-input-bg: #fff;
    --theme-input-border: #e090a0;
    --theme-btn-bg: #ED86A3;
    --theme-btn-hover: #412830;
    --theme-btn-text: #fff;
    --theme-card-bg: #fff;
    --theme-result-bg: #fff;
    --theme-result-border: #f8b8c8;
    --theme-result-hover-bg: #7FA87B;
    --theme-result-hover-text: #fff;
    --theme-shadow: 0 2px 12px rgba(237, 134, 163, 0.14);
    --theme-shadow-lg: 0 4px 20px rgba(237, 134, 163, 0.18);
    --theme-modal-backdrop: rgba(252, 228, 236, 0.6);
    --spring-white: #fff;
    --spring-pink: #d49aab;
    --spring-light-pink: #fce4ec;
    --spring-green: #7FA87B;
    --spring-rose: #ED86A3;
    --spring-dark: #412830;
    --spring-graygreen: #8fa88b;
}
/* 春日：强制全页面/设置/弹窗无灰无黑——遮罩、设置区、弹窗、按钮、列表、侧栏项、历史区、黑框 */
body.theme-spring,
body.theme-spring body { background: #fffafb !important; color: var(--theme-text) !important; }
body.theme-spring .modal-container { background: var(--theme-modal-backdrop) !important; }
body.theme-spring .modal-header,
body.theme-spring .modal-footer { border-color: var(--spring-pink) !important; }
body.theme-spring .settings-header { border-bottom-color: var(--spring-pink) !important; }
body.theme-spring .setting-section h3 { color: var(--spring-dark) !important; }
body.theme-spring .setting-details { border-color: var(--theme-border) !important; background: #fff !important; }
body.theme-spring .setting-summary,
body.theme-spring details[open] .setting-summary { background: var(--theme-bg-tertiary) !important; color: var(--spring-dark) !important; border-color: var(--theme-border) !important; }
body.theme-spring .setting-details-content { background: #fff !important; border-top-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .btn,
body.theme-spring .btn-primary,
body.theme-spring .action-btn,
body.theme-spring .action-btn-danger { background: var(--spring-rose) !important; color: #fff !important; border-color: var(--spring-dark) !important; }
body.theme-spring .btn:hover,
body.theme-spring .btn-primary:hover,
body.theme-spring .action-btn:hover { background: var(--spring-dark) !important; color: #fff !important; }
body.theme-spring .action-btn-danger:hover { background: var(--spring-dark) !important; color: #fff !important; }
body.theme-spring .btn-secondary { background: var(--spring-pink) !important; color: var(--theme-text) !important; border-color: var(--spring-graygreen) !important; }
body.theme-spring .btn-secondary:hover { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; }
body.theme-spring .items-list { border-color: var(--theme-border) !important; background: #fff !important; }
body.theme-spring .sidebar-item { border-color: var(--theme-border) !important; background: #fff !important; }
body.theme-spring .sidebar-item:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .sidebar-item.sidebar-item-dragging { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-rose) !important; box-shadow: 0 2px 8px rgba(237,134,163,0.2) !important; }
body.theme-spring .history-list-area,
body.theme-spring .history-pagination-bar { border-color: var(--spring-pink) !important; }
body.theme-spring .history-entry-block { border-bottom-color: var(--theme-border) !important; }
body.theme-spring .history-page-size,
body.theme-spring .history-page-jump { border-color: var(--theme-border) !important; background: #fff !important; color: var(--theme-text) !important; }
body.theme-spring .history-entry-meta { color: var(--theme-text-secondary) !important; }
body.theme-spring .quick-switch-list,
body.theme-spring .quick-switch-row { border-color: var(--spring-pink) !important; }
body.theme-spring .quick-switch-item { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; border: 2px solid var(--spring-pink) !important; border-radius: 10px !important; }
body.theme-spring .quick-switch-item:hover { border-color: var(--spring-rose) !important; background: var(--spring-light-pink) !important; }
body.theme-spring .quick-switch-binding { color: var(--theme-text-secondary) !important; }
body.theme-spring .quick-switch-overwrite { background: var(--spring-rose) !important; color: #fff !important; border: none !important; border-radius: 8px !important; }
body.theme-spring .quick-switch-overwrite:hover { background: var(--spring-dark) !important; color: #fff !important; }
body.theme-spring .quick-switch-delete { background: var(--theme-bg-tertiary) !important; color: var(--spring-dark) !important; border: 1px solid var(--spring-pink) !important; border-radius: 8px !important; }
body.theme-spring .quick-switch-delete:hover { background: var(--spring-light-pink) !important; border-color: var(--spring-rose) !important; color: var(--spring-dark) !important; }
body.theme-spring .doubleblind-phone-frame { border-color: var(--spring-graygreen) !important; background: #fff !important; box-shadow: 0 0 0 2px var(--spring-pink), 0 8px 24px rgba(237,134,163,0.15) !important; }
body.theme-spring .mining-backpack-empty,
body.theme-spring .mining-map-empty { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; }
body.theme-spring .mining-backpack-chip { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .mining-backpack-chip:hover { background: var(--spring-pink) !important; color: #fff !important; }
body.theme-spring .form-control,
body.theme-spring input[type="text"],
body.theme-spring input[type="password"],
body.theme-spring select { background: #fff !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
body.theme-spring .close-btn,
body.theme-spring .menu-btn,
body.theme-spring .settings-btn { color: var(--theme-text) !important; background: var(--theme-bg-tertiary) !important; border-color: var(--theme-border) !important; }
body.theme-spring .close-btn:hover,
body.theme-spring .menu-btn:hover,
body.theme-spring .settings-btn:hover { border-color: var(--spring-rose) !important; }
body.theme-spring .remove-btn { color: var(--spring-dark) !important; background: transparent !important; }
body.theme-spring .remove-btn:hover { color: var(--spring-rose) !important; }
body.theme-spring .tool-content h3,
body.theme-spring .tool-content label,
body.theme-spring .tool-content p { color: var(--theme-text) !important; }
body.theme-spring .theme-option-name,
body.theme-spring .theme-option-desc { color: var(--theme-text) !important; }
body.theme-spring .theme-current-name { color: var(--theme-text-secondary) !important; }
body.theme-spring .auth-container h1 { color: var(--spring-dark) !important; }
body.theme-spring .auth-form p { color: var(--theme-text-secondary) !important; }
body.theme-spring #auth-submit { background: var(--spring-rose) !important; color: #fff !important; border: none !important; }
body.theme-spring #auth-submit:hover { background: var(--spring-dark) !important; color: #fff !important; }
body.theme-spring .modal-emoji { background: #fff !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .jar-content-wrap,
body.theme-spring .blindbox-config,
body.theme-spring .pause-screen,
body.theme-spring .pause-captured-wrap { background: #fff !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .hint,
body.theme-spring .form-group label { color: var(--theme-text) !important; }

/* 春日：漏掉的按钮——禁止黑边框白底/灰底，一律粉/灰绿 */
body.theme-spring .blindbox-slip-btn,
body.theme-spring .gacha-slip-btn { background: var(--spring-pink) !important; color: var(--theme-text) !important; border: 1px solid var(--spring-graygreen) !important; }
body.theme-spring .blindbox-slip-btn:hover,
body.theme-spring .gacha-slip-btn:hover { background: var(--spring-rose) !important; color: #fff !important; border-color: var(--spring-dark) !important; }
body.theme-spring .btn-tag-inline.on,
body.theme-spring .btn-tag.on { background: var(--spring-rose) !important; border-color: var(--spring-pink) !important; color: #fff !important; }
body.theme-spring .entry-chip { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .entry-chip:hover,
body.theme-spring .entry-chip-selected,
body.theme-spring .entry-chip-selected:hover { background: var(--spring-rose) !important; border-color: var(--spring-dark) !important; color: #fff !important; }
body.theme-spring .action-btn-sm,
body.theme-spring .action-btn-sm.delete { background: var(--spring-pink) !important; border-color: var(--theme-border) !important; color: var(--theme-text) !important; }
body.theme-spring .action-btn-sm:hover,
body.theme-spring .action-btn-sm.delete:hover { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .history-entry-delete { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-pink) !important; color: var(--spring-dark) !important; }
body.theme-spring .history-entry-delete:hover { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .default-favorite-select { background: #fff !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .default-favorite-select:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .generate-btn { background: var(--spring-rose) !important; color: #fff !important; border: none !important; }
body.theme-spring .generate-btn:hover:not(:disabled) { background: var(--spring-dark) !important; color: #fff !important; }
body.theme-spring .generate-btn:disabled { background: var(--theme-bg-tertiary) !important; color: var(--theme-text-muted) !important; }
body.theme-spring .firework-trigger-btn { background: var(--spring-rose) !important; color: #fff !important; border: none !important; }
body.theme-spring .firework-trigger-btn:hover { background: var(--spring-dark) !important; }
body.theme-spring .firework-reset-btn { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; border-color: var(--spring-pink) !important; }
body.theme-spring .firework-reset-btn:hover { background: var(--spring-pink) !important; }
body.theme-spring .firework-item { border-color: var(--spring-pink) !important; }
body.theme-spring .firework-item:hover { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-rose) !important; }
body.theme-spring .quiz-option:hover,
body.theme-spring .quiz-option.selected { border-color: var(--spring-rose) !important; }
body.theme-spring .quiz-result-combo-wrapper:hover,
body.theme-spring .quiz-element:hover { border-color: var(--spring-rose) !important; background: var(--theme-bg-tertiary) !important; }
body.theme-spring .basket-item-combo:hover { border-color: var(--spring-rose) !important; background: var(--theme-bg-tertiary) !important; }
body.theme-spring #password-input:focus { border-color: var(--spring-rose) !important; }
body.theme-spring .color-fav-page-input:focus { border-color: var(--spring-rose) !important; }
body.theme-spring .color-favorite-item--active { border-color: var(--spring-rose) !important; }
body.theme-spring .add-btn { background: var(--spring-rose) !important; color: #fff !important; border: 1px solid var(--spring-pink) !important; }
body.theme-spring .add-btn:hover { background: var(--spring-rose) !important; }
body.theme-spring .switch-btn,
body.theme-spring .btn-select { background: #fff !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .switch-btn:hover,
body.theme-spring .btn-select:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .btn-secondary { background: var(--spring-pink) !important; color: var(--theme-text) !important; border-color: var(--spring-graygreen) !important; }
body.theme-spring .btn-secondary:hover { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .color-btn-add,
body.theme-spring .color-btn-save { background: var(--spring-rose) !important; color: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .color-btn-add:hover,
body.theme-spring .color-btn-save:hover { background: var(--spring-dark) !important; }
body.theme-spring .color-btn-shuffle { background: #fff !important; color: var(--theme-text) !important; border-color: var(--spring-pink) !important; }
body.theme-spring .color-btn-shuffle:hover { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-rose) !important; }
body.theme-spring .color-btn-pagination { background: var(--spring-pink) !important; color: var(--theme-text) !important; border-color: var(--spring-graygreen) !important; }
body.theme-spring .color-btn-pagination:hover:not(:disabled) { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .color-block--fixed { border-color: var(--spring-pink) !important; outline-color: var(--spring-pink) !important; }
body.theme-spring .catch-theme-btn.selected,
body.theme-spring .catch-speed-btn.active { border-color: var(--spring-rose) !important; background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; }
body.theme-spring .catch-clear-box-btn { border-color: var(--spring-pink) !important; background: linear-gradient(180deg, #fff 0%, var(--theme-bg-tertiary) 100%) !important; color: var(--theme-text) !important; }
body.theme-spring .catch-clear-box-btn:hover { border-color: var(--spring-rose) !important; background: linear-gradient(180deg, var(--theme-bg-tertiary) 0%, var(--spring-light-pink) 100%) !important; }
body.theme-spring .sonnet-line:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .scrollpoem-chip:hover { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-rose) !important; }
body.theme-spring .result-action-btn,
body.theme-spring .result-combo-edit { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; border: 1px solid var(--spring-pink) !important; }
body.theme-spring .result-action-btn:hover,
body.theme-spring .result-combo-edit:hover { background: var(--spring-pink) !important; color: var(--theme-text) !important; border-color: var(--spring-rose) !important; }
body.theme-spring .telepathy-submit-btn,
body.theme-spring .telepathy-clear-btn,
body.theme-spring .telepathy-new-game { background: var(--spring-pink) !important; color: var(--theme-text) !important; border-color: var(--spring-graygreen) !important; }
body.theme-spring .telepathy-submit-btn:hover,
body.theme-spring .telepathy-clear-btn:hover { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .telepathy-new-game:hover { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .mining-tool-content { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; }
body.theme-spring .shop-refresh-btn,
body.theme-spring .shop-scratch-once { background: var(--spring-pink) !important; color: var(--theme-text) !important; border-color: var(--spring-graygreen) !important; }
body.theme-spring .shop-scratch-once:hover:not(:disabled) { background: var(--spring-rose) !important; color: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .farming-tool-btn,
body.theme-spring .fishing-start-btn { background: #fff !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .farming-tool-btn:hover,
body.theme-spring .farming-tool-btn.active,
body.theme-spring .fishing-start-btn:hover { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-rose) !important; }
body.theme-spring .shop-scratch-card { background: var(--theme-bg-tertiary) !important; border: 1px solid var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .shop-scratch-card:hover:not(.scratch-done) { background: var(--spring-light-pink) !important; }
body.theme-spring .shop-scratch-card.scratch-bought:not(.scratch-done) { background: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .shop-scratch-card.scratch-bought:hover:not(.scratch-done) { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .shop-scratch-card.scratch-done { background: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .shop-scratch-card:not(.scratch-done) .shop-scratch-placeholder,
body.theme-spring .shop-scratch-card:not(.scratch-done) .shop-scratch-price-inline { color: var(--theme-text) !important; }
body.theme-spring .shop-scratch-card .shop-scratch-reveal { color: var(--theme-text) !important; }
body.theme-spring .shop-scratch-card.scratch-done .shop-scratch-reveal { color: var(--spring-dark) !important; }
body.theme-spring .shop-scratch-awards { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-pink) !important; }
body.theme-spring .shop-scratch-slot { border-color: var(--spring-pink) !important; }
body.theme-spring .shop-scratch-slot:hover:not(.revealed) { background: var(--theme-bg-tertiary) !important; }

/* 春日：漏掉的灰底区域——全部改为白/浅粉 */
body.theme-spring .telepathy-tool-content,
body.theme-spring .telepathy-slots-area,
body.theme-spring .telepathy-pool-area { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .telepathy-pool-chip,
body.theme-spring .telepathy-slot-chip { background: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .telepathy-pool-chip:hover,
body.theme-spring .telepathy-slot-chip:hover { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-rose) !important; }
body.theme-spring .telepathy-pool-chip.telepathy-pool-absent { background: var(--spring-pink) !important; color: #fff !important; }
body.theme-spring .telepathy-win { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .shop-settings-panel { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-pink) !important; }
body.theme-spring .combo-config .form-group,
body.theme-spring .catch-gift-box-area,
body.theme-spring .fishing-basket-area { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .blindbox-slip-inner,
body.theme-spring .gacha-slip-inner { background: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .blindbox-slip-chip:hover,
body.theme-spring .gacha-slip-chip:hover { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-rose) !important; }
body.theme-spring .blindbox-slip-title,
body.theme-spring .gacha-slip-title { color: var(--spring-dark) !important; }
body.theme-spring .pause-screen.running { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .pause-screen:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .column-title,
body.theme-spring .search-results-header,
body.theme-spring .element-item:hover,
body.theme-spring .blacklist-item:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .inventory-item,
body.theme-spring .combination-value { background: var(--theme-bg-tertiary) !important; border-color: var(--theme-border) !important; }
body.theme-spring .quiz-option,
body.theme-spring .quiz-result-combo-wrapper,
body.theme-spring .quiz-analysis,
body.theme-spring .basket-item-combo { background: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .catch-gift-combo:hover { border-color: var(--spring-rose) !important; background: var(--theme-bg-tertiary) !important; }
body.theme-spring .catch-gift-item:hover,
body.theme-spring .catch-gift-element:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .toolbox-btn:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .shop-item.purchased,
body.theme-spring .shop-item.disabled { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .wheel-result-card .result-text:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .jar-content { background: linear-gradient(135deg, #fff 0%, var(--theme-bg-tertiary) 100%) !important; border-color: var(--spring-pink) !important; }
body.theme-spring details summary,
body.theme-spring .setting-details summary { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
body.theme-spring .sidebar-item:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .sidebar-item.sidebar-item-dragging { background: var(--spring-light-pink) !important; border-color: var(--spring-pink) !important; }
body.theme-spring .setting-details,
body.theme-spring .setting-details-content { background: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .btn-tag { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .btn-tag-inline { border-color: var(--spring-pink) !important; background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; }
body.theme-spring .library-bulk-actions-inline .btn { background: var(--spring-pink) !important; border-color: var(--spring-graygreen) !important; color: var(--theme-text) !important; }
body.theme-spring .library-bulk-actions-inline .btn:hover { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .emoji-chip:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .gashapon-result-content .fortune-result-chip:hover { background: var(--theme-bg-tertiary) !important; }

/* 春日：词云——画布与控件粉白风格，无灰底黑边 */
body.theme-spring .wordcloud-canvas {
    background: linear-gradient(135deg, #fff 0%, var(--theme-bg-tertiary) 50%, var(--spring-light-pink) 100%) !important;
    border: 2px solid var(--spring-pink) !important;
    border-radius: 10px !important;
}
body.theme-spring .wordcloud-container,
body.theme-spring .wordcloud-controls { color: var(--theme-text) !important; }
body.theme-spring .wordcloud-controls .btn { background: var(--spring-pink) !important; color: var(--theme-text) !important; border: 1px solid var(--spring-graygreen) !important; }
body.theme-spring .wordcloud-controls .btn:hover { background: var(--spring-rose) !important; color: #fff !important; }
body.theme-spring .wordcloud-word,
body.theme-spring .wordcloud-word--black { color: var(--spring-dark) !important; }

/* 温柔海：接礼物、钓鱼、礼花等游戏区域背景 */
body.theme-sea .catch-game-area {
    background: linear-gradient(135deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
}
body.theme-sea .firework-tool {
    background: linear-gradient(135deg, var(--theme-card-bg) 0%, var(--theme-bg-secondary) 100%) !important;
    border: 2px solid var(--sea-deep) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    color: var(--theme-text) !important;
}
body.theme-sea .catch-gift-box-area {
    background: linear-gradient(135deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border: 2px solid var(--sea-deep) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
}

/* 春日：接礼物背景——盒子区与组合卡片粉白边框，非灰底黑边 */
body.theme-spring .catch-game-area {
    background: linear-gradient(135deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%) !important;
    border: 2px solid var(--spring-pink) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
}
body.theme-spring .firework-tool {
    background: linear-gradient(135deg, var(--theme-card-bg) 0%, var(--theme-bg-secondary) 100%) !important;
    border: 2px solid var(--spring-pink) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    color: var(--spring-dark) !important;
}
body.theme-spring .catch-gift-box-area {
    background: linear-gradient(135deg, var(--theme-bg-tertiary) 0%, var(--spring-light-pink) 100%) !important;
    border: 2px solid var(--spring-pink) !important;
    border-left: 4px solid var(--spring-graygreen) !important;
    border-radius: 10px !important;
}
body.theme-spring .catch-gift-combo,
body.theme-spring .fishmaster-gift-combo {
    background: #fff !important;
    border: 2px solid var(--spring-pink) !important;
    border-left: 4px solid var(--spring-graygreen) !important;
    border-radius: 8px !important;
    color: var(--theme-text) !important;
}
body.theme-spring .catch-gift-item,
body.theme-spring .catch-gift-box-label,
body.theme-spring .catch-gift-box-empty { color: var(--theme-text) !important; }
body.theme-spring .catch-gift-item { background: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .fishmaster-gift-combo .catch-gift-element { background: var(--theme-bg-tertiary) !important; border-color: var(--spring-pink) !important; color: var(--theme-text) !important; }
body.theme-spring .catch-gift-sep,
body.theme-spring .fishmaster-gift-combo .catch-gift-sep { color: var(--theme-text-muted) !important; }

/* 春日：一键开关同款——emoji 筛选等开关按钮粉边浅粉底 */
body.theme-spring .btn-emoji-filter-toggle {
    background: var(--theme-bg-tertiary) !important;
    border: 2px solid var(--spring-pink) !important;
    color: var(--theme-text) !important;
    border-radius: 8px !important;
}
body.theme-spring .btn-emoji-filter-toggle:hover {
    background: var(--spring-light-pink) !important;
    border-color: var(--spring-rose) !important;
}

/* 春日主区：信纸框+白横线，内边距放大不压线；边框角饰（左上信封右下花），竖线灰绿 */
body.theme-spring #main-app {
    position: relative !important;
    padding: 1.5rem 1.75rem !important;
    background-color: #fffafb !important;
    color: var(--theme-text) !important;
    border: 2px solid var(--spring-pink) !important;
    border-left: 4px solid var(--spring-graygreen) !important;
    border-radius: 0 14px 0 14px !important;
    background-image: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent 25px,
        rgba(255,255,255,0.65) 25px,
        rgba(255,255,255,0.65) 26px
    );
}
body.theme-spring #main-app::before { display: none !important; }
/* 右下角一朵大花：大号、大半个在右下角可见 */
body.theme-spring #main-app::after { display: none !important; }
body.theme-spring .main-content,
body.theme-spring .results-area {
    background: transparent !important;
    color: var(--theme-text) !important;
    position: relative;
    z-index: 1;
}
body.theme-spring .tool-content { background: var(--theme-bg) !important; }

/* 顶栏：竖线灰绿，内边距放大不压字 */
body.theme-spring .header {
    background: var(--spring-white) !important;
    color: var(--theme-text) !important;
    padding: 1.25rem 1.75rem !important;
    border: none !important;
    border-left: 4px solid var(--spring-graygreen) !important;
    box-shadow: 0 1px 6px rgba(237, 134, 163, 0.1);
}
/* 侧栏：竖线灰绿；分框可白字或深粉字 */
body.theme-spring .sidebar {
    background: var(--theme-bg-secondary) !important;
    border-right: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 12px 0 12px !important;
}
body.theme-spring .sidebar-section {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    padding: 1.75rem 2rem !important;
    margin: 0.5rem 0.35rem !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 10px 0 10px !important;
    box-shadow: 0 1px 4px rgba(237, 134, 163, 0.06);
}
body.theme-spring .sidebar-section.highlight-box {
    background: var(--spring-pink) !important;
    color: #fff !important;
}
body.theme-spring .sidebar-section h4 { color: var(--spring-dark) !important; }

/* 工具区：竖线灰绿，内边距放大不压线 */
body.theme-spring .tool-content {
    background: #fff !important;
    padding: 1.75rem 2rem !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 12px 0 12px !important;
    box-shadow: 0 2px 8px rgba(237, 134, 163, 0.08);
}

/* 弹窗 / 设置 / 结果区：内边距放大不压线 */
body.theme-spring .modal {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    padding: 1.75rem 2rem !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 12px 0 12px !important;
    box-shadow: var(--theme-shadow-lg);
}
body.theme-spring .auth-container,
body.theme-spring .settings-container {
    background: var(--spring-white) !important;
    padding: 1.75rem 2rem !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 10px 0 10px !important;
}
body.theme-spring .results-content-box {
    background: var(--theme-card-bg) !important;
    color: var(--theme-text) !important;
    padding: 1.75rem 2rem !important;
    border: 2px solid var(--spring-pink) !important;
    border-left: 4px solid var(--spring-graygreen) !important;
    border-radius: 0 10px 0 10px !important;
    box-shadow: 0 1px 4px rgba(237, 134, 163, 0.06);
}
body.theme-spring .results-content-box.deep-pink-text { color: var(--spring-dark) !important; }
body.theme-spring .results-content-box.deep-pink-text h3,
body.theme-spring .results-content-box.deep-pink-text h4 { color: var(--spring-rose) !important; }

/* 单条结果：可见边缘线 + 柔阴影 */
body.theme-spring .result-item {
    background: var(--spring-white) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--spring-pink) !important;
    border-left: 3px solid var(--spring-graygreen) !important;
    border-radius: 0 10px 0 10px !important;
    box-shadow: 0 1px 4px rgba(237, 134, 163, 0.1);
}
body.theme-spring .result-item:hover {
    background: var(--theme-result-hover-bg) !important;
    color: var(--theme-result-hover-text) !important;
    box-shadow: 0 3px 10px rgba(127, 168, 123, 0.3);
}

body.theme-spring .theme-option {
    background: var(--spring-white) !important;
    color: var(--theme-text) !important;
    padding: 1rem 1.25rem !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 8px 0 8px !important;
    box-shadow: 0 1px 3px rgba(237,134,163,0.08);
}
body.theme-spring .theme-option.active { border-color: var(--spring-rose) !important; box-shadow: 0 0 0 1px rgba(237,134,163,0.25); }
body.theme-spring .library-selector,
body.theme-spring .selected-item,
body.theme-spring .setting-details {
    background: var(--spring-white) !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 8px 0 8px !important;
}
body.theme-spring .selected-item { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .setting-details-content {
    background: var(--spring-white) !important;
    border: none !important;
    border-top: 1px solid var(--theme-border) !important;
}
body.theme-spring .setting-summary { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; }

body.theme-spring .fortune-box,
body.theme-spring .fortune-card {
    background: var(--spring-white) !important;
    padding: 1.5rem 1.75rem !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    color: var(--theme-text) !important;
    border-radius: 0 10px 0 10px !important;
    box-shadow: 0 1px 4px rgba(237,134,163,0.08);
}
body.theme-spring h1, body.theme-spring h2, body.theme-spring h3 { color: var(--theme-text) !important; }
/* 按钮美化：灰绿左边、阴影、圆角 */
body.theme-spring .btn-primary, body.theme-spring .action-btn, body.theme-spring .generate-btn {
    background: var(--spring-rose) !important;
    color: var(--theme-btn-text) !important;
    border: none !important;
    border-radius: 0 8px 0 8px !important;
    box-shadow: 0 2px 6px rgba(237,134,163,0.25) !important;
}
body.theme-spring .btn-primary:hover, body.theme-spring .action-btn:hover {
    background: var(--theme-btn-hover) !important;
    box-shadow: 0 3px 8px rgba(237,134,163,0.35) !important;
}
body.theme-spring .btn-secondary {
    background: var(--spring-pink) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 3px solid var(--spring-graygreen) !important;
    border-radius: 0 8px 0 8px !important;
    box-shadow: 0 1px 4px rgba(224,176,188,0.3) !important;
}
body.theme-spring .btn-secondary:hover {
    box-shadow: 0 2px 6px rgba(224,176,188,0.4) !important;
}
body.theme-spring input, body.theme-spring .form-control {
    background: var(--theme-input-bg) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 8px 0 8px !important;
}
body.theme-spring .modal-header, body.theme-spring .modal-footer { border-color: var(--theme-border) !important; }

body.theme-spring .toolbox-selector {
    padding: 1.25rem 1.5rem !important;
    gap: 0.75rem !important;
}
body.theme-spring .toolbox-btn,
body.theme-spring .toolbox-current-title,
body.theme-spring .system-options-row,
body.theme-spring .doubleblind-phone,
body.theme-spring .gacha-config,
body.theme-spring .gacha-slip-inner,
body.theme-spring .pause-screen,
body.theme-spring .pause-captured-wrap,
body.theme-spring .color-fixed-section,
body.theme-spring .color-favorites-section,
body.theme-spring .farming-basket,
body.theme-spring .shop-settings-panel {
    background: var(--spring-white) !important;
    border: 1px solid var(--theme-border) !important;
    border-left: 2px solid var(--spring-graygreen) !important;
    border-radius: 0 10px 0 10px !important;
    box-shadow: 0 1px 4px rgba(237,134,163,0.06) !important;
    padding: 1.25rem 1.5rem !important;
}
body.theme-spring .toolbox-current-title {
    display: inline-block !important;
    padding: 0.75rem 1.25rem !important;
    background: var(--theme-bg-tertiary) !important;
}
body.theme-spring .gacha-config,
body.theme-spring .gacha-slip-inner,
body.theme-spring .farming-basket { background: var(--theme-bg-tertiary) !important; }
body.theme-spring .result-item-wrap-combo,
body.theme-spring .result-item-wrap,
body.theme-spring .combo-list-wrap {
    background: var(--theme-bg-tertiary) !important;
    padding: 1.25rem 1.5rem !important;
    border: 2px solid var(--spring-pink) !important;
    border-left: 4px solid var(--spring-graygreen) !important;
    border-radius: 0 10px 0 10px !important;
    box-shadow: 0 1px 6px rgba(237, 134, 163, 0.1);
}

/* 春日：最下面信息区纯粉底深色字，禁止灰粉 */
body.theme-spring .footer {
    background: #fce4ec !important;
    color: #262E33 !important;
    border-top: 2px solid var(--spring-graygreen) !important;
}
body.theme-spring .footer p,
body.theme-spring .footer .credits,
body.theme-spring .footer .author-info,
body.theme-spring .footer .disclaimer,
body.theme-spring .footer div {
    color: #262E33 !important;
}
body.theme-spring .footer .copyable {
    color: #412830 !important;
    font-weight: 600;
}
/* 春日：组合结果区域边框必须可见（不被后面共用规则覆盖） */
body.theme-spring .result-item-wrap-combo,
body.theme-spring .result-item-wrap,
body.theme-spring .combo-list-wrap {
    border: 2px solid var(--spring-pink) !important;
    border-left: 4px solid var(--spring-graygreen) !important;
}

/* 春日：双盲手机整体风格（浅色外壳+粉白气泡，不用黑框） */
body.theme-spring .doubleblind-phone-frame {
    border-color: var(--spring-graygreen) !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px var(--spring-pink), 0 8px 24px rgba(237, 134, 163, 0.15) !important;
}
body.theme-spring .doubleblind-phone-status {
    background: var(--spring-pink) !important;
    color: var(--spring-dark) !important;
}
body.theme-spring .doubleblind-phone-status .doubleblind-phone-time,
body.theme-spring .doubleblind-phone-signal::before,
body.theme-spring .doubleblind-phone-wifi::before,
body.theme-spring .doubleblind-phone-battery { border-color: var(--spring-dark) !important; }
body.theme-spring .doubleblind-phone-battery::after { background: var(--spring-dark) !important; }
body.theme-spring .doubleblind-phone {
    background: #fffafb !important;
    border-radius: 0 0 22px 22px !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}
body.theme-spring .doubleblind-messages {
    background: #fffafb !important;
}
body.theme-spring .doubleblind-bubble-user .doubleblind-bubble {
    background: var(--spring-rose) !important;
    color: #fff !important;
    border: none !important;
}
body.theme-spring .doubleblind-bubble-bot .doubleblind-bubble {
    background: #fff !important;
    color: var(--spring-dark) !important;
    border: 1px solid var(--theme-border) !important;
}
body.theme-spring .doubleblind-input-bar {
    background: #fce4ec !important;
    border-top-color: var(--spring-pink) !important;
}
body.theme-spring .doubleblind-input {
    background: #fff !important;
    border-color: var(--spring-pink) !important;
    color: var(--spring-dark) !important;
}
body.theme-spring .doubleblind-input:focus {
    border-color: var(--spring-graygreen) !important;
}
body.theme-spring .doubleblind-send-btn {
    background: var(--spring-rose) !important;
    color: #fff !important;
    border-radius: 0 12px 0 12px !important;
}
body.theme-spring .doubleblind-send-btn:hover { background: var(--spring-dark) !important; }
body.theme-spring .doubleblind-clear-btn {
    background: #fff !important;
    color: var(--spring-dark) !important;
    border: 1px solid var(--spring-pink) !important;
    border-radius: 0 8px 0 8px !important;
}
body.theme-spring .doubleblind-clear-btn:hover {
    background: var(--theme-bg-tertiary) !important;
    color: var(--spring-dark) !important;
}

/* 春日：扭蛋机（粉白机身 + 球窗/球色/手柄/胶囊/结果统一粉绿配色） */
body.theme-spring .gashapon-machine {
    background: linear-gradient(180deg, #fffafb 0%, #fce4ec 50%, #fad4dc 100%) !important;
    border: 3px solid var(--spring-pink) !important;
    box-shadow: 0 4px 16px rgba(237, 134, 163, 0.2), inset 0 1px 0 rgba(255,255,255,0.8) !important;
    padding: 0 !important;
}
body.theme-spring .gashapon-machine-body {
    color: var(--spring-dark) !important;
}
body.theme-spring .gashapon-balls-window {
    border-color: var(--spring-graygreen) !important;
    background: linear-gradient(145deg, rgba(255,250,251,0.98) 0%, rgba(252,228,236,0.95) 100%) !important;
    box-shadow: inset 0 0 12px rgba(237, 134, 163, 0.08), 0 2px 6px rgba(237, 134, 163, 0.12) !important;
}
body.theme-spring .gashapon-dot-white { background: #fff !important; border-color: var(--spring-pink) !important; }
body.theme-spring .gashapon-dot-black { background: var(--spring-dark) !important; border-color: #2a1a20 !important; }
body.theme-spring .gashapon-dot-gray { background: var(--spring-graygreen) !important; border-color: #6b8f6a !important; }
body.theme-spring .gashapon-handle {
    background: var(--spring-rose) !important;
    color: #fff !important;
}
body.theme-spring .gashapon-handle:hover { background: var(--spring-dark) !important; color: #fff !important; }
body.theme-spring .gashapon-chute { color: var(--spring-dark) !important; }
body.theme-spring .gashapon-capsule {
    border-color: rgba(255,255,255,0.8) !important;
    box-shadow: 0 3px 10px rgba(237, 134, 163, 0.25) !important;
}
body.theme-spring .gashapon-capsule:hover {
    box-shadow: 0 5px 14px rgba(237, 134, 163, 0.35) !important;
}
body.theme-spring .gashapon-ball-white { background: linear-gradient(145deg, #fff 0%, #fce4ec 100%) !important; }
body.theme-spring .gashapon-ball-black { background: linear-gradient(145deg, var(--spring-pink) 0%, var(--spring-dark) 100%) !important; border-color: rgba(65,40,48,0.3) !important; }
body.theme-spring .gashapon-ball-gray { background: linear-gradient(145deg, #c5d9c2 0%, var(--spring-graygreen) 100%) !important; }
body.theme-spring .gashapon-capsule.opened .gashapon-result-card {
    background: #fff !important;
    border: 1px solid var(--spring-pink) !important;
    box-shadow: 0 2px 12px rgba(237, 134, 163, 0.12) !important;
}
body.theme-spring .gashapon-result-content .fortune-result-chip {
    background: #fce4ec !important;
    border: 1px solid var(--spring-pink) !important;
    color: var(--spring-dark) !important;
}
body.theme-spring .gashapon-result-content .fortune-result-chip:hover {
    background: var(--theme-bg-tertiary) !important;
}

/* 春日主题：按钮点击花朵 emoji 冒泡特效 */
.spring-flower-bubble {
    position: fixed !important;
    z-index: 99999 !important;
    font-size: 1.5rem !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%);
    opacity: 0.9;
}
.spring-flower-bubble-float {
    animation: springFlowerFloat 1.2s ease-out forwards !important;
}
@keyframes springFlowerFloat {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    100% { transform: translate(-50%, -120px) scale(1.2); opacity: 0; }
}

/* 四主题共用：工具区、弹窗内、按钮、输入框、结果条等全面覆盖 */
body.theme-doomsday .toolbox-btn,
body.theme-doomsday .toolbox-current-title,
body.theme-doomsday .system-options-row,
body.theme-doomsday .gacha-config,
body.theme-doomsday .gacha-slip-inner,
body.theme-doomsday .pause-screen,
body.theme-doomsday .pause-captured-wrap,
body.theme-doomsday .color-fixed-section,
body.theme-doomsday .color-favorites-section,
body.theme-doomsday .farming-basket,
body.theme-doomsday .shop-settings-panel,
body.theme-doomsday .result-item-wrap-combo,
body.theme-doomsday .fortune-result-chip { background: var(--theme-card-bg) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
body.theme-sea .toolbox-btn,
body.theme-sea .toolbox-current-title,
body.theme-sea .system-options-row,
body.theme-sea .doubleblind-phone,
body.theme-sea .gacha-config,
body.theme-sea .gacha-slip-inner,
body.theme-sea .pause-screen,
body.theme-sea .pause-captured-wrap,
body.theme-sea .color-fixed-section,
body.theme-sea .color-favorites-section,
body.theme-sea .farming-basket,
body.theme-sea .shop-settings-panel { background: var(--theme-card-bg) !important; color: var(--theme-text) !important; border-color: var(--theme-border-strong) !important; }
body.theme-starry .toolbox-btn,
body.theme-starry .toolbox-current-title,
body.theme-starry .system-options-row,
body.theme-starry .doubleblind-phone,
body.theme-starry .gacha-config,
body.theme-starry .gacha-slip-inner,
body.theme-starry .pause-screen,
body.theme-starry .pause-captured-wrap,
body.theme-starry .color-fixed-section,
body.theme-starry .color-favorites-section,
body.theme-starry .farming-basket,
body.theme-starry .shop-settings-panel,
body.theme-starry .result-item-wrap-combo,
body.theme-starry .fortune-result-chip { background: var(--theme-card-bg) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
body.theme-spring .toolbox-btn,
body.theme-spring .toolbox-current-title,
body.theme-spring .system-options-row,
body.theme-spring .doubleblind-phone,
body.theme-spring .gacha-config,
body.theme-spring .gacha-slip-inner,
body.theme-spring .pause-screen,
body.theme-spring .pause-captured-wrap,
body.theme-spring .color-fixed-section,
body.theme-spring .color-favorites-section,
body.theme-spring .farming-basket,
body.theme-spring .shop-settings-panel,
body.theme-spring .result-item-wrap-combo { background: var(--theme-card-bg) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
/* 自定义主题：卡片类块用卡片色+卡片字（工具箱按钮/标题单独设，不跟背景一色） */
body.theme-custom .system-options-row,
body.theme-custom .doubleblind-phone,
body.theme-custom .gacha-config,
body.theme-custom .gacha-slip-inner,
body.theme-custom .pause-screen,
body.theme-custom .pause-captured-wrap,
body.theme-custom .color-fixed-section,
body.theme-custom .color-favorites-section,
body.theme-custom .farming-basket,
body.theme-custom .shop-settings-panel,
body.theme-custom .result-item-wrap-combo,
body.theme-custom .fortune-result-chip { background: var(--theme-card-bg) !important; color: var(--theme-card-text) !important; border-color: var(--theme-border) !important; }
/* 工具箱条：直接在主背景上，单独给底色+对比字，不和主背景同色 */
body.theme-custom .toolbox-selector {
    background: var(--theme-card-bg) !important;
    color: var(--theme-card-text) !important;
    border-bottom: 2px solid var(--theme-border) !important;
}

/* 自定义主题：主布局、顶栏、侧栏、工具区、结果区、弹窗等全部绑定主题变量；方框边框与背景区分 */
body.theme-custom #main-app,
body.theme-custom .main-content { background: var(--theme-bg) !important; color: var(--theme-text) !important; }
body.theme-custom .tool-content {
    background: var(--theme-card-bg) !important;
    color: var(--theme-card-text) !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 10px !important;
}
body.theme-custom .results-area { background: var(--theme-bg) !important; color: var(--theme-text) !important; }
body.theme-custom .header {
    background: var(--theme-card-bg) !important;
    color: var(--theme-card-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-left: none !important;
    border-right: none !important;
}
body.theme-custom .sidebar {
    background: var(--theme-color-2) !important;
    border-right: 1px solid var(--theme-border-strong) !important;
}
body.theme-custom .sidebar-section {
    background: var(--theme-color-0) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin: 0.5rem !important;
    box-shadow: none !important;
}
body.theme-custom .sidebar-header {
    background: var(--theme-color-1) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px !important;
    margin: 0.5rem !important;
    box-shadow: none !important;
}
body.theme-custom .sidebar-header h3 { color: var(--theme-text) !important; }
body.theme-custom .library-selector {
    background: var(--theme-bg-secondary) !important;
    border: 1px solid var(--theme-border) !important;
    border-left: none !important;
    border-right: none !important;
    color: var(--theme-text) !important;
}
body.theme-custom .selected-item {
    border: 1px solid var(--theme-border) !important;
    border-radius: 15px !important;
}
body.theme-custom .theme-option {
    border: 1px solid var(--theme-border) !important;
    border-radius: 10px !important;
}
body.theme-custom .selector-label { color: var(--theme-text-secondary) !important; }
body.theme-custom .add-btn { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border: none !important; }
body.theme-custom .add-btn:hover { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .switch-btn,
body.theme-custom .btn-select { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-custom .switch-btn:hover,
body.theme-custom .btn-select:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .toolbox-btn { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border: 2px solid var(--theme-border-strong) !important; border-radius: 8px !important; }
body.theme-custom .toolbox-btn:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .toolbox-current-title {
    display: inline-block !important;
    padding: 0.75rem 1.25rem !important;
    background: var(--theme-input-bg) !important;
    color: var(--theme-input-text) !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 8px !important;
}
body.theme-custom .theme-option-name,
body.theme-custom .theme-option-desc { color: var(--theme-card-text) !important; }
body.theme-custom .system-options-row { background: var(--theme-card-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 8px !important; color: var(--theme-card-text) !important; }
body.theme-custom .system-options-row label { color: var(--theme-card-text) !important; }
body.theme-custom input,
body.theme-custom .form-control,
body.theme-custom .doubleblind-input { background: var(--theme-input-bg) !important; color: var(--theme-input-text) !important; border: 1px solid var(--theme-border) !important; }
body.theme-custom input:focus,
body.theme-custom .form-control:focus,
body.theme-custom .doubleblind-input:focus { border-color: var(--theme-border-focus) !important; }
body.theme-custom .btn-primary,
body.theme-custom .action-btn,
body.theme-custom .generate-btn { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border: 1px solid var(--theme-btn-hover) !important; }
body.theme-custom .btn-primary:hover,
body.theme-custom .btn-primary:active,
body.theme-custom .action-btn:hover,
body.theme-custom .action-btn:active,
body.theme-custom .generate-btn:hover:not(:disabled),
body.theme-custom .generate-btn:active:not(:disabled) { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .btn-secondary { background: var(--theme-input-bg) !important; color: var(--theme-input-text) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-custom .btn-secondary:hover,
body.theme-custom .btn-secondary:active { background: var(--theme-border-strong) !important; color: var(--theme-input-text) !important; }
body.theme-custom #auth-submit { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; }
body.theme-custom #auth-submit:hover,
body.theme-custom #auth-submit:active { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
/* 小按钮、结果条上的操作钮：与背后框不同色 */
body.theme-custom .action-btn-sm,
body.theme-custom .remove-btn,
body.theme-custom .result-action-btn,
body.theme-custom .result-combo-edit { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-custom .action-btn-sm:hover,
body.theme-custom .action-btn-sm:active,
body.theme-custom .remove-btn:hover,
body.theme-custom .remove-btn:active,
body.theme-custom .result-action-btn:hover,
body.theme-custom .result-action-btn:active,
body.theme-custom .result-combo-edit:hover,
body.theme-custom .result-combo-edit:active { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .action-btn-sm.delete { background: var(--theme-border-strong) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .action-btn-sm.delete:hover,
body.theme-custom .action-btn-sm.delete:active { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .results-content-box {
    background: var(--theme-card-bg) !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 8px !important;
}
body.theme-custom .result-item {
    background: var(--theme-input-bg) !important;
    color: var(--theme-input-text) !important;
    border: 2px solid var(--theme-border-strong) !important;
    border-radius: 6px !important;
}
body.theme-custom .result-item:hover,
body.theme-custom .result-item:active { background: var(--theme-result-hover-bg) !important; color: var(--theme-result-hover-text) !important; }
body.theme-custom .modal-container { background: var(--theme-modal-backdrop) !important; }
body.theme-custom .modal {
    border: 2px solid var(--theme-border) !important;
    border-radius: 10px !important;
}
body.theme-custom .auth-container,
body.theme-custom .settings-container {
    border: 2px solid var(--theme-border) !important;
    border-radius: 10px !important;
}
body.theme-custom .modal-header,
body.theme-custom .modal-footer { border-color: var(--theme-border) !important; }
body.theme-custom .close-btn { color: var(--theme-card-text) !important; background: transparent !important; border: none !important; }
body.theme-custom .close-btn:hover { color: var(--theme-btn-bg) !important; }
body.theme-custom .menu-btn,
body.theme-custom .settings-btn { color: var(--theme-btn-text) !important; }
body.theme-custom .menu-btn,
body.theme-custom .settings-btn { background: var(--theme-btn-bg) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-custom .menu-btn:hover,
body.theme-custom .menu-btn:active,
body.theme-custom .settings-btn:hover,
body.theme-custom .settings-btn:active { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .footer,
body.theme-custom .credits,
body.theme-custom .author-info,
body.theme-custom .disclaimer { color: var(--theme-text-secondary) !important; }
body.theme-custom select,
body.theme-custom .default-favorite-select { background: var(--theme-input-bg) !important; color: var(--theme-text) !important; border: 1px solid var(--theme-border) !important; }
body.theme-custom h1, body.theme-custom h2, body.theme-custom h3, body.theme-custom h4 { color: var(--theme-text) !important; }
body.theme-custom .setting-summary { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; }
body.theme-custom .theme-option-name { color: var(--theme-text) !important; }
body.theme-custom .theme-option-desc { color: var(--theme-text-muted) !important; }
body.theme-custom .opt-cb { accent-color: var(--theme-checkbox-accent) !important; }
body.theme-custom .doubleblind-send-btn { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border: none !important; }
body.theme-custom .doubleblind-send-btn:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .doubleblind-clear-btn { background: var(--theme-input-bg) !important; color: var(--theme-input-text) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-custom .doubleblind-clear-btn:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .blindbox-config,
body.theme-custom .blindbox-slip-inner,
body.theme-custom .blindbox-content { background: var(--theme-card-bg) !important; border: 1px solid var(--theme-border) !important; color: var(--theme-card-text) !important; }
body.theme-custom .horoscope-item { background: var(--theme-card-bg) !important; border: 1px solid var(--theme-border) !important; color: var(--theme-card-text) !important; }
body.theme-custom .shop-header { background: var(--theme-card-bg) !important; color: var(--theme-card-text) !important; border: 1px solid var(--theme-border) !important; }

/* 自定义主题：卡片/框内文字用 --theme-card-text，与卡片背景明度差 */
body.theme-custom .auth-container,
body.theme-custom .settings-container,
body.theme-custom .modal,
body.theme-custom .results-content-box,
body.theme-custom .tool-content,
body.theme-custom .theme-option,
body.theme-custom .library-selector,
body.theme-custom .selected-item,
body.theme-custom .fortune-box,
body.theme-custom .fortune-card,
body.theme-custom .result-item { color: var(--theme-card-text) !important; }
/* 侧栏块已单独设为 input-bg + input-text，不在此列 */
body.theme-custom .modal-header h3,
body.theme-custom .settings-header h2,
body.theme-custom .setting-section h3,
body.theme-custom .tool-content h3 { color: var(--theme-card-text) !important; }
body.theme-custom .result-item-wrap-combo,
body.theme-custom .combo-list-wrap { color: var(--theme-card-text) !important; }

/* ========== 自定义主题：扭蛋机、接礼物、礼花、十四行诗、卷轴、种菜等全部绑定主题变量；方框边框与背景区分 ========== */
/* 礼物盒子/鱼篓：纯色，不炫彩 */
body.theme-custom .catch-gift-box-area,
body.theme-custom .fishing-basket-area { 
    background: var(--theme-bg-secondary) !important; 
    border: 2px solid var(--theme-border) !important; 
    border-radius: 12px !important; 
    padding: 1.5rem !important;
}
body.theme-custom .catch-gift-combo,
body.theme-custom .fishmaster-gift-combo { 
    background: var(--theme-card-bg) !important; 
    border: 2px solid var(--theme-border) !important; 
    color: var(--theme-card-text) !important; 
    border-radius: 8px !important; 
}
body.theme-custom .catch-gift-combo:hover,
body.theme-custom .fishmaster-gift-combo:hover { 
    border-color: var(--theme-border-focus) !important; 
    background: var(--theme-bg-tertiary) !important; 
    color: var(--theme-bg-tertiary-text) !important; 
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}
/* 接礼物外层：纯色，不渐变 */
body.theme-custom .catch-game-area {
    background: var(--theme-bg-secondary) !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
}
body.theme-custom .firework-tool {
    background: linear-gradient(135deg, var(--theme-color-1) 0%, var(--theme-color-3) 100%) !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    color: var(--theme-text) !important;
}
body.theme-custom .catch-gift-item,
body.theme-custom .catch-gift-element,
body.theme-custom .fishmaster-gift-combo .catch-gift-element { 
    background: var(--theme-card-bg) !important; 
    border: 1px solid var(--theme-border) !important; 
    color: var(--theme-card-text) !important; 
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
body.theme-custom .catch-gift-item:hover,
body.theme-custom .catch-gift-element:hover,
body.theme-custom .fishmaster-gift-combo .catch-gift-element:hover { 
    background: var(--theme-bg-tertiary) !important; 
    color: var(--theme-text) !important; 
    border-color: var(--theme-border-strong) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}
body.theme-custom .catch-clear-box-btn { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border-color: var(--theme-btn-hover) !important; }
body.theme-custom .catch-clear-box-btn:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .catch-theme-btn,
body.theme-custom .catch-speed-btn { background: var(--theme-input-bg) !important; color: var(--theme-input-text) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-custom .catch-theme-btn:hover,
body.theme-custom .catch-speed-btn:hover { background: var(--theme-bg-tertiary) !important; color: var(--theme-bg-tertiary-text) !important; border-color: var(--theme-border-strong) !important; }
body.theme-custom .catch-theme-btn.selected,
body.theme-custom .catch-speed-btn.active { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border-color: var(--theme-btn-hover) !important; }
body.theme-custom .game-canvas { background: var(--theme-bg-secondary) !important; border: 2px solid var(--theme-border) !important; border-radius: 12px !important; }
/* 接礼物内部画布：只用渐变1 */
body.theme-custom .catch-game-area .game-canvas {
    background: linear-gradient(135deg, var(--theme-color-0) 0%, var(--theme-color-1) 100%) !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 12px !important;
}
/* 自定义主题：海洋用色卡渐变1（color-0 → color-1） */
body.theme-custom .fishing-pond,
body.theme-custom .fishmaster-pond { 
    background: linear-gradient(180deg, var(--theme-color-0) 0%, var(--theme-color-1) 100%) !important; 
    border: 2px solid var(--theme-border) !important; 
    border-radius: 12px !important; 
}
body.theme-custom .gashapon-machine {
    background: linear-gradient(180deg, var(--theme-color-0) 0%, var(--theme-color-2) 50%, var(--theme-color-4) 100%) !important;
    border: 3px solid var(--theme-border-strong) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6) !important;
}
body.theme-custom .gashapon-balls-window {
    border-color: var(--theme-border-strong) !important;
    background: linear-gradient(145deg, rgba(255,255,255,0.96) 0%, var(--theme-card-bg) 100%) !important;
}
/* 自定义主题：扭蛋机顶部三颗灯，直接吃色卡的 0/2/3 号色 */
body.theme-custom .gashapon-dot-white {
    background: var(--theme-color-0) !important;
    border-color: var(--theme-border) !important;
}
body.theme-custom .gashapon-dot-black {
    background: var(--theme-color-4) !important;
    border-color: var(--theme-border-strong) !important;
}
body.theme-custom .gashapon-dot-gray {
    background: var(--theme-color-2) !important;
    border-color: var(--theme-border) !important;
}
body.theme-custom .gashapon-handle {
    background: var(--theme-color-0) !important;
    color: var(--theme-btn-text) !important;
    border-radius: 8px !important;
}
body.theme-custom .gashapon-handle:hover {
    background: var(--theme-color-4) !important;
    color: var(--theme-btn-text) !important;
}
/* 自定义主题：扭蛋机里面的三种球，参考人生纸条的“白/黑/灰球”，但颜色从色卡 1/2/3 号色里拿 */
body.theme-custom .gashapon-ball-white {
    background: linear-gradient(145deg, var(--theme-color-0) 0%, var(--theme-color-1) 100%) !important;
    border-color: rgba(255,255,255,0.7) !important;
}
body.theme-custom .gashapon-ball-black {
    background: linear-gradient(145deg, var(--theme-color-4) 0%, var(--theme-color-3) 100%) !important;
    border-color: rgba(0,0,0,0.35) !important;
}
body.theme-custom .gashapon-ball-gray {
    background: linear-gradient(145deg, var(--theme-color-2) 0%, var(--theme-color-3) 100%) !important;
    border-color: rgba(0,0,0,0.15) !important;
}
body.theme-custom .gashapon-capsule {
    border-color: rgba(255,255,255,0.7) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18) !important;
}
body.theme-custom .gashapon-capsule:hover {
    box-shadow: 0 5px 14px rgba(0,0,0,0.26) !important;
}
body.theme-custom .gashapon-capsule.opened .gashapon-result-card,
body.theme-custom .gashapon-result-content .fortune-result-chip {
    background: var(--theme-card-bg) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-card-text) !important;
}
body.theme-custom .firework-canvas { background: var(--theme-bg-secondary) !important; border: 2px solid var(--theme-border) !important; border-radius: 12px !important; }
body.theme-custom .firework-trigger-btn { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border: none !important; }
body.theme-custom .firework-trigger-btn:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .firework-reset-btn { background: var(--theme-input-bg) !important; color: var(--theme-input-text) !important; border: 1px solid var(--theme-border-strong) !important; }
body.theme-custom .firework-reset-btn:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .firework-item { background: var(--theme-card-bg) !important; border: 1px solid var(--theme-border) !important; color: var(--theme-card-text) !important; }
body.theme-custom .pause-screen,
body.theme-custom .pause-captured-wrap { background: var(--theme-card-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 10px !important; color: var(--theme-card-text) !important; }
body.theme-custom .gacha-config,
body.theme-custom .gacha-slip-inner { background: var(--theme-card-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 8px !important; color: var(--theme-card-text) !important; }
body.theme-custom .sonnet-config,
body.theme-custom .sonnet-controls,
body.theme-custom .sonnet-result { background: var(--theme-card-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 8px !important; color: var(--theme-card-text) !important; }
body.theme-custom .sonnet-paper { background: var(--theme-input-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 10px !important; color: var(--theme-input-text) !important; }
body.theme-custom .sonnet-paper.completed { border-color: var(--theme-checkbox-accent) !important; }
body.theme-custom .sonnet-check-label { color: var(--theme-text-secondary) !important; }
body.theme-custom .sonnet-title { color: var(--theme-card-text) !important; }
body.theme-custom .sonnet-line { color: var(--theme-input-text) !important; }
body.theme-custom .sonnet-line:hover { background: var(--theme-bg-tertiary) !important; }
body.theme-custom .sonnet-footer,
body.theme-custom .sonnet-completion { color: var(--theme-text-muted) !important; }
body.theme-custom .range-inputs input { background: var(--theme-input-bg) !important; border-color: var(--theme-border) !important; color: var(--theme-input-text) !important; }
body.theme-custom .scrollpoem-desc { color: var(--theme-text-secondary) !important; }
body.theme-custom .scrollpoem-paper { background: var(--theme-input-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 8px !important; color: var(--theme-input-text) !important; }
body.theme-custom .scrollpoem-chip { background: var(--theme-bg-tertiary) !important; border: 1px solid var(--theme-border-strong) !important; color: var(--theme-text) !important; }
body.theme-custom .scrollpoem-chip:hover { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border-color: var(--theme-btn-hover) !important; }
body.theme-custom .scrollpoem-actions .btn { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border: 1px solid var(--theme-btn-hover) !important; }
body.theme-custom .scrollpoem-actions .btn:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .farming-tools,
body.theme-custom .farming-seed-panel,
body.theme-custom .farming-basket { background: var(--theme-card-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 8px !important; color: var(--theme-card-text) !important; }
body.theme-custom .farming-tool-btn,
body.theme-custom .farming-mode-btn { background: var(--theme-bg-tertiary) !important; color: var(--theme-text) !important; border: 1px solid var(--theme-border) !important; }
body.theme-custom .farming-tool-btn:hover,
body.theme-custom .farming-mode-btn:hover { background: var(--theme-border-strong) !important; }
body.theme-custom .farming-tool-btn.active,
body.theme-custom .farming-mode-btn.active { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; border-color: var(--theme-btn-hover) !important; }
body.theme-custom .farming-basket-actions .btn { background: var(--theme-btn-bg) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .farming-basket-actions .btn:hover { background: var(--theme-btn-hover) !important; color: var(--theme-btn-text) !important; }
body.theme-custom .blindbox-config,
body.theme-custom .blindbox-slip-inner,
body.theme-custom .fortune-box,
body.theme-custom .fortune-card { background: var(--theme-card-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 8px !important; color: var(--theme-card-text) !important; }
body.theme-custom .shop-settings-panel,
body.theme-custom .shop-item { background: var(--theme-card-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 8px !important; color: var(--theme-card-text) !important; }
body.theme-custom .shop-item:hover:not(.purchased) { border-color: var(--theme-border-focus) !important; }
body.theme-custom .fishmaster-gift-combo,
body.theme-custom .fishing-stats,
body.theme-custom .fishing-config { background: var(--theme-card-bg) !important; border: 2px solid var(--theme-border) !important; border-radius: 8px !important; color: var(--theme-card-text) !important; }
body.theme-custom .doubleblind-phone { border: 2px solid var(--theme-border) !important; border-radius: 10px !important; }
body.theme-custom .result-item-wrap-combo { border: 2px solid var(--theme-border) !important; border-radius: 10px !important; }
body.theme-custom .color-fixed-section,
body.theme-custom .color-favorites-section { border: 2px solid var(--theme-border) !important; border-radius: 8px !important; }

/* 响应式调整 */
@media (max-width: 768px) {
    .gacha-stage {
        gap: 0.5rem;
    }
    .gacha-item {
        width: 64px;
        height: 88px;
    }
    
    .blindbox-stage {
        gap: 0.5rem;
    }
    
    .blindbox-item {
        width: 76px;
        height: 76px;
    }
    
    .fortune-box {
        width: 150px;
        height: 150px;
    }
    
    .horoscope-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 双盲 - 手机聊天样式 */
.doubleblind-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.doubleblind-content h3 { margin-bottom: 0.75rem; }
.doubleblind-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
    margin-bottom: 0.75rem;
}
.doubleblind-setting-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.doubleblind-setting-item label { font-size: 0.9rem; color: #495057; white-space: nowrap; }
.doubleblind-setting-item .form-control { width: auto; min-width: 4rem; }
.doubleblind-sep-custom { min-width: 3rem; }
.doubleblind-sep-custom.hidden { display: none; }

/* 手机外壳：圆角边框 + 状态栏 */
.doubleblind-phone-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 360px;
    max-height: 70vh;
    max-width: 380px;
    margin: 0 auto;
    border-radius: 32px;
    overflow: hidden;
    border: 10px solid #1a1a1a;
    box-shadow: 0 0 0 2px #333, 0 12px 32px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.05);
    background: #1a1a1a;
}
@media (max-width: 420px) {
    .doubleblind-phone-frame {
        border-width: 8px;
        border-radius: 28px;
        max-width: 100%;
    }
}

/* 状态栏：时间 + 信号/电量 */
.doubleblind-phone-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 8px;
    min-height: 44px;
    background: #000;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.doubleblind-phone-time {
    flex: 1;
}
.doubleblind-phone-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}
.doubleblind-phone-signal::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 10px;
    background: linear-gradient(90deg, #fff 0%, #fff 25%, transparent 25%, transparent 50%, #fff 50%, #fff 75%, transparent 75%);
    background-size: 4px 10px;
    border: 1px solid #fff;
    border-radius: 1px;
}
.doubleblind-phone-wifi::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 10px;
    border: 1.5px solid #fff;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-left: 2px;
}
.doubleblind-phone-battery {
    display: inline-block;
    width: 22px;
    height: 10px;
    border: 1.5px solid #fff;
    border-radius: 2px;
    margin-left: 4px;
    position: relative;
}
.doubleblind-phone-battery::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    bottom: 2px;
    width: 75%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border-radius: 1px;
}

.doubleblind-phone {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #e8e8ed;
    border-radius: 0 0 22px 22px;
}
.doubleblind-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}
.doubleblind-bubble-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 85%;
}
.doubleblind-bubble-wrap.doubleblind-bubble-user {
    align-self: flex-end;
    align-items: flex-end;
}
.doubleblind-bubble-wrap.doubleblind-bubble-bot {
    align-self: flex-start;
    align-items: flex-start;
}

.doubleblind-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    word-break: break-word;
    line-height: 1.4;
    font-size: 0.95rem;
    max-width: 100%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
/* 我发的：右侧灰色气泡（云雨灰为黑白灰） */
.doubleblind-bubble-user .doubleblind-bubble {
    background: #8e8e93;
    color: #fff;
    border-bottom-right-radius: 4px;
    border: none;
}
/* 随机发的：左侧灰白气泡，带浅灰边框 */
.doubleblind-bubble-bot .doubleblind-bubble {
    background: #f5f5f7;
    color: #1a1a1a;
    border: 1px solid #d1d1d6;
    border-bottom-left-radius: 4px;
}
.doubleblind-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #f2f2f7;
    border-top: 1px solid #d1d1d6;
}
.doubleblind-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #d1d1d6;
    border-radius: 20px;
    font-size: 0.95rem;
    outline: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
}
.doubleblind-input:focus {
    border-color: #333;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
}
.doubleblind-send-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 20px;
    background: #333;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.doubleblind-send-btn:hover { background: #000; }
.doubleblind-send-btn:active { opacity: 0.9; }
.doubleblind-clear-btn {
    display: block;
    margin: 8px auto 12px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: #8e8e93;
    background: transparent;
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    cursor: pointer;
}
.doubleblind-clear-btn:hover { background: #e5e5ea; color: #495057; }

/* 钓鱼：设置灰色缩起（参考盲盒） */
.fishing-settings {
    margin-bottom: 1rem;
}
.fishing-settings summary {
    cursor: pointer;
    font-weight: 500;
    color: #555;
    padding: 0.25rem 0;
}
.fishing-config {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #e9ecef;
    border-radius: 6px;
}
.fishing-config-compact {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.fishing-config-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}
.fishing-config-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.fishing-config-row label {
    font-size: 0.8rem;
    color: #555;
    white-space: nowrap;
}
.fishing-config-row .form-control-sm {
    width: 3rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.85rem;
}
.fishing-config-row span { color: #6c757d; font-size: 0.85rem; }
.fishing-pct-sep { margin-left: 0.4rem; margin-right: 0.2rem; }
.fishing-config-row #fishing-small-pct,
.fishing-config-row #fishing-mid-pct,
.fishing-config-row #fishing-large-pct { width: 2.5rem; }
.fishing-area { 
    margin: 1rem 0; 
}
/* 确保海洋背景不被覆盖 */
.fishing-pond,
.fishmaster-pond {
    background: linear-gradient(180deg, #87CEEB 0%, #5F9EA0 30%, #4682B4 70%, #2F4F4F 100%) !important;
}
.fishing-pond-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 0;
}
.fishing-pond-row .fishing-pond { flex: 1; min-width: 0; }
.fishing-stats {
    width: 140px;
    flex-shrink: 0;
    align-self: stretch;
    padding: 0.6rem 0.75rem;
    background: #f0f2f5;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
}
.fishing-stats-title { font-weight: 600; margin-bottom: 0.5rem; color: #495057; }
.fishing-stats-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; }
.fishing-stats-row:last-child { margin-bottom: 0; }
.fishing-stats-row span:first-child { color: #495057; min-width: 2.2em; }
.fishing-pond {
    position: relative;
    height: 180px;
    background: linear-gradient(180deg, #87CEEB 0%, #5F9EA0 30%, #4682B4 70%, #2F4F4F 100%) !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #2F4F4F;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(47, 79, 79, 0.3);
}
.fishing-bobber { font-size: 2.5rem; transition: transform 0.3s ease; }
/* 甩杆 / 水波动画 */
.fishing-pond.fishing-cast::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    animation: fishing-ripple 0.6s ease-out forwards;
    pointer-events: none;
}
.fishing-bobber.fishing-cast {
    animation: fishing-cast 0.5s ease-out;
}
@keyframes fishing-ripple {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(8); opacity: 0; }
}
@keyframes fishing-cast {
    0% { transform: translateY(0) rotate(-10deg); }
    35% { transform: translateY(-12px) rotate(5deg); }
    70% { transform: translateY(4px) rotate(-3deg); }
    100% { transform: translateY(0) rotate(0); }
}
.fishing-hint {
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.fishing-start-btn { display: block; width: 100%; max-width: 200px; margin: 0.75rem auto 0; padding: 0.6rem 1.25rem; }
.fishing-basket-area { 
    margin-top: 1rem; 
    padding: 0.75rem; 
    background: #f8f9fa; 
    border-radius: 8px; 
    color: #212529;
    border: 1px solid #dee2e6;
}
.fishing-basket-label { 
    font-size: 0.9rem; 
    font-weight: 600; 
    margin-bottom: 0.5rem; 
    color: #495057;
}
.fishing-basket-items { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 2rem; margin-bottom: 0.5rem; }
.fishing-clear-basket-btn {
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0.5rem auto 0;
    padding: 0.55rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
}

/* 扭蛋机：白机身 + 黑白灰圆球 + 转动画 + 抽签式结果 */
.gashapon-config { margin-bottom: 1rem; }
.gashapon-machine-wrap { text-align: center; margin: 1.5rem 0; }
.gashapon-machine {
    position: relative;
    display: inline-block;
    width: 130px;
    height: 170px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    border-radius: 12px;
    border: 3px solid #ced4da;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.8);
}
.gashapon-machine.gashapon-machine-spin { animation: gashapon-machine-spin 0.5s ease-in-out; }
@keyframes gashapon-machine-spin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-4deg); }
    75% { transform: rotate(4deg); }
    100% { transform: rotate(0deg); }
}
.gashapon-machine-body {
    position: absolute;
    top: 0.4rem;
    left: 0;
    right: 0;
    text-align: center;
    color: #495057;
    font-weight: 700;
    font-size: 0.95rem;
}
.gashapon-balls-window {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 92px;
    border: 3px solid #adb5bd;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(248,249,250,0.95) 0%, rgba(233,236,239,0.9) 100%);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.1);
    padding: 6px;
    overflow: hidden;
    animation: gashapon-window-shake 3s ease-in-out infinite;
}
.gashapon-balls-window.gashapon-balls-tumble {
    animation: gashapon-balls-tumble 0.7s ease-in-out;
}
@keyframes gashapon-window-shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(1deg); }
}
@keyframes gashapon-balls-tumble {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    20% { transform: translate(-50%, -50%) rotate(-12deg) scale(1.02); }
    40% { transform: translate(-50%, -50%) rotate(8deg) scale(0.98); }
    60% { transform: translate(-50%, -50%) rotate(10deg) scale(1.01); }
    80% { transform: translate(-50%, -50%) rotate(-4deg) scale(1); }
    100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
}
.gashapon-dot {
    position: absolute;
    left: var(--gx, 0);
    top: var(--gy, 0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    flex-shrink: 0;
}
.gashapon-dot-big {
    width: 18px;
    height: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.gashapon-balls-tumble .gashapon-dot {
    animation: gashapon-dot-tumble 0.7s ease-in-out;
    animation-delay: var(--gashapon-delay, 0s);
}
@keyframes gashapon-dot-tumble {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(3px, -4px) rotate(90deg); }
    50% { transform: translate(-2px, 2px) rotate(-60deg); }
    75% { transform: translate(-3px, -2px) rotate(45deg); }
}
.gashapon-dot-white { background: #fff; border: 1px solid #dee2e6; }
.gashapon-dot-black { background: #212529; border: 1px solid #343a40; }
.gashapon-dot-gray { background: #6c757d; border: 1px solid #495057; }
.gashapon-handle {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 44px;
    background: #495057;
    border-radius: 5px;
    color: #fff;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    writing-mode: vertical-rl;
    letter-spacing: 0.15em;
}
.gashapon-handle:hover { background: #343a40; }
.gashapon-handle.gashapon-rotating { animation: gashapon-rotate 0.7s ease-in-out; }
@keyframes gashapon-rotate {
    0% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-50%) rotate(-22deg); }
    100% { transform: translateY(-50%) rotate(0deg); }
}
.gashapon-chute {
    min-height: 90px;
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: flex-start;
}
.gashapon-capsule {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.gashapon-ball-white { background: linear-gradient(145deg, #fff 0%, #e9ecef 100%); }
.gashapon-ball-black { background: linear-gradient(145deg, #495057 0%, #212529 100%); border-color: rgba(0,0,0,0.3); }
.gashapon-ball-gray { background: linear-gradient(145deg, #adb5bd 0%, #6c757d 100%); }
.gashapon-capsule:hover { transform: scale(1.1); box-shadow: 0 5px 14px rgba(0,0,0,0.25); }
.gashapon-capsule.opened {
    width: auto;
    min-width: 120px;
    max-width: 280px;
    height: auto;
    min-height: auto;
    padding: 0;
    border-radius: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
}
.gashapon-capsule.opened .gashapon-result-card {
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.gashapon-result-content { text-align: center; margin: 0; }
.gashapon-result-content .fortune-result-chip {
    display: inline-block;
    margin: 0.15rem;
    padding: 0.2rem 0.4rem;
    background: #f1f3f5;
    border-radius: 6px;
    font-size: 0.88rem;
    border: 1px solid #dee2e6;
}
.gashapon-result-content .fortune-result-chip:hover { background: #e9ecef; }

/* 卷轴与诗：云与灰主题（人生纸条见 body.theme-notes 块） */
body:not(.theme-notes) .scrollpoem-desc { font-size: 0.9rem; color: #6c757d; margin-bottom: 0.75rem; }
body:not(.theme-notes) .scrollpoem-note { margin: 0.75rem 0; }
body:not(.theme-notes) .scrollpoem-paper {
    min-height: 160px;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #e8e4da;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
}
body:not(.theme-notes) .scrollpoem-paper:empty::before,
body:not(.theme-notes) .scrollpoem-paper[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #adb5bd;
}
body:not(.theme-notes) .scrollpoem-chip {
    display: inline;
    white-space: nowrap;
    padding: 0.15em 0.5em;
    margin: 0 0.1em;
    border: 1px solid #495057;
    border-radius: 4px;
    background: #f1f3f5;
    font-size: inherit;
    cursor: pointer;
    vertical-align: baseline;
}
body:not(.theme-notes) .scrollpoem-chip:hover { background: #e9ecef; border-color: #343a40; }
body:not(.theme-notes) .scrollpoem-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
body:not(.theme-notes) .scrollpoem-actions .btn { flex-shrink: 0; }

/* 礼花：黑底、简洁、仅黑系 */
.firework-tool {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    color: #e5e5e5;
}
.firework-tool .firework-desc {
    font-size: 0.85rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.firework-play { margin-bottom: 1rem; }
.firework-trigger-btn {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
}
.firework-trigger-btn:hover { background: #333; }
.firework-canvas {
    min-height: 280px;
    position: relative;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}
.firework-items { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.firework-items .firework-item { pointer-events: auto; }
.firework-item {
    position: absolute;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25em 0.5em;
    border-radius: 4px;
    cursor: pointer;
    animation: firework-burst 2.2s ease-out forwards;
    z-index: 2;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    color: #111;
    border: 1px solid #333;
    white-space: nowrap;
}
.firework-item:hover { background: #e0e0e0; border-color: #111; }
.firework-item.firework-captured { opacity: 1; background: #f5f5f7; color: #111; border-color: #333; cursor: default; animation: none; }
@keyframes firework-burst {
    0% { transform: scale(0.6) rotate(var(--fw-angle, 0deg)); opacity: 1; }
    35% { transform: scale(1.1) rotate(calc(var(--fw-angle, 0deg) + 25deg)); opacity: 1; }
    100% { transform: scale(0.7) rotate(calc(var(--fw-angle, 0deg) + 160deg)); opacity: 0.25; }
}
.firework-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    gap: 0.5rem;
}
.firework-count { font-size: 0.9rem; color: #333; }
.firework-reset-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    color: #111;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #212529;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
}
.firework-reset-btn:hover { background: #f0f0f0; }
.firework-got {
    margin-top: 1rem;
    padding: 0.6rem 0;
    border-top: 1px solid #eee;
}
.firework-got-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.4rem;
}
.firework-got-list { margin: 0; }
.firework-got-combo-inner {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.5rem 0.65rem;
}
.firework-got-combo-inner .firework-got-item { margin: 0; }
.firework-got-edit {
    width: auto;
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    flex-shrink: 0;
    align-self: center;
    margin-top: -0.2rem;
}
.firework-got-sep { color: #666; font-size: 0.9rem; user-select: none; }

/* 敲罐子：设置参考盲盒；打碎有渣渣动画；碎后只显示词条无边框 */
.jar-settings { margin-bottom: 1rem; }
.jar-result-area .jar-jars-wrap { gap: 0.75rem; }
.jar-item {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.jar-item.jar-broken {
    cursor: default;
    border: none;
    background: transparent;
}
.jar-jar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}
.jar-jar-wrap-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.jar-jar-wrap:hover .jar-emoji { transform: scale(1.08); }
.jar-emoji { font-size: 2.6rem; line-height: 1; transition: transform 0.15s; }
/* 打碎动画：罐子缩小旋转 + 渣渣飞散 */
.jar-jar-wrap.jar-shatter .jar-emoji {
    animation: jar-shatter-emoji 0.5s ease-out forwards;
}
.jar-debris {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -3px;
    margin-top: -3px;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: #8b7355;
    opacity: 0.9;
    animation: jar-debris-fly 0.5s ease-out forwards;
}
.jar-debris:nth-child(2) { background: #a0826d; animation-name: jar-debris-fly-2; }
.jar-debris:nth-child(3) { background: #6b5344; animation-name: jar-debris-fly-3; }
.jar-debris:nth-child(4) { background: #9c7c5c; animation-name: jar-debris-fly-4; }
.jar-debris:nth-child(5) { background: #7d6b5a; animation-name: jar-debris-fly-5; }
.jar-debris:nth-child(6) { background: #8f7356; animation-name: jar-debris-fly-6; }
.jar-debris:nth-child(7) { background: #6d5c4a; animation-name: jar-debris-fly-7; }
.jar-debris:nth-child(8) { background: #a89078; animation-name: jar-debris-fly-8; }
.jar-debris:nth-child(9) { background: #5c4d3d; animation-name: jar-debris-fly-1; }
@keyframes jar-shatter-emoji {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    40% { transform: scale(1.15) rotate(15deg); opacity: 1; }
    100% { transform: scale(0.2) rotate(180deg); opacity: 0; }
}
@keyframes jar-debris-fly {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(0, -42px) scale(0.3); opacity: 0; }
}
@keyframes jar-debris-fly-2 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(30px, -30px) scale(0.3); opacity: 0; }
}
@keyframes jar-debris-fly-3 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(42px, 0) scale(0.3); opacity: 0; }
}
@keyframes jar-debris-fly-4 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(30px, 30px) scale(0.3); opacity: 0; }
}
@keyframes jar-debris-fly-5 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(0, 42px) scale(0.3); opacity: 0; }
}
@keyframes jar-debris-fly-6 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(-30px, 30px) scale(0.3); opacity: 0; }
}
@keyframes jar-debris-fly-7 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(-42px, 0) scale(0.3); opacity: 0; }
}
@keyframes jar-debris-fly-8 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(-30px, -30px) scale(0.3); opacity: 0; }
}
@keyframes jar-debris-fly-1 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(0, -42px) scale(0.3); opacity: 0; }
}
/* 碎后显示：有内容时用与结果区一致的 result-item 样式，空则无内容 */
.jar-content-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0;
}
.jar-content-wrap .jar-result-item {
    margin: 0;
    padding: 0.3rem 0.4rem;
    font-size: 1rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    box-sizing: border-box;
}
.jar-bottom .jar-actions { gap: 0.5rem; }