/* 夏夜工具集 - 毛玻璃 + 随机光团主题 */

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size:16px; }

body {
    font-family: 'Inter', -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #FFFAF7;
    color: #1E293B;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll; /* 强制始终显示滚动条占位，避免下拉框弹出时页面宽度抖动 */
    position: relative;
}

.container { max-width:1200px; margin:0 auto; padding:0 24px; }

/* 光团容器（纯装饰 pointer-events:none，隐藏只靠 opacity——不用 visibility，
   否则 visibility 的离散过渡会"最后一刻才翻转"，正好在 opacity 淡到 1 那瞬弹出 → 啪一下出现） */
#orbContainer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 1;
}

.orb {
    position: absolute;
    pointer-events: none;
    will-change: transform, filter, width, height, opacity;
}
.orb-inner {
    position: absolute;
    inset: 0;
    border-radius: 40%;
    will-change: transform, filter, border-radius;
}

/* 导航栏 */
.navbar {
    position: sticky; top:0; z-index:100;
    padding: 16px 0;
    background: rgba(255, 250, 247, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* 底边柔化：淡投影 + 伪元素羽化渐变（见下方 ::after） */
    box-shadow: 0 6px 18px -12px rgba(120, 87, 76, 0.22);
}
/* 底部羽化：毛玻璃条下缘渐隐到透明，白天用米白落点、夜晚用深蓝（避免生硬切边） */
.navbar::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: -24px;
    height: 34px;
    background: linear-gradient(to bottom, rgba(255, 250, 247, 0.45), rgba(255, 250, 247, 0));
    pointer-events: none;
}
.navbar .container { display:flex; align-items:center; justify-content:space-between; }
.navbar__brand {
    display:flex; align-items:center; gap:8px;
    font-size:1.2rem; font-weight:700;
    color:#1E293B; text-decoration:none;
}
.navbar__logo { font-size:1.5rem; }
.navbar__links { display:flex; gap:8px; }
.navbar__link {
    padding:8px 18px; border-radius:100px;
    font-size:0.9rem; font-weight:500;
    color:#78716C; text-decoration:none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background:transparent;
}
.navbar__link:hover, .navbar__link.active {
    color:#1E293B;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
}

/* Hero */
.hero { position:relative; z-index:1; padding:80px 0 48px; text-align:center; }
.hero__title {
    font-size:2.8rem; font-weight:800;
    letter-spacing:-0.03em; color:#1E293B;
    margin-bottom:16px; line-height:1.2;
}
.hero__subtitle {
    font-size:1.1rem; color:#78716C; max-width:500px;
    margin:0 auto; line-height:1.7;
}

/* 工具网格 */
.tools { position:relative; z-index:1; padding:32px 0 80px; }
.tools__grid {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap:24px;
}

/* 毛玻璃卡片 */
.glass-card {
    position:relative;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    opacity: 0;
    transform: translateY(24px);
}
.glass-card.visible { opacity:1; transform:translateY(0); }

.glass-card:hover {
    transform: translateY(-6px) scale(1.02) !important;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(24px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
    border-color: rgba(255,255,255,0.95);
}
.glass-card:active { transform: translateY(-2px) scale(0.98) !important; }

.glass-card__icon { font-size:2rem; margin-bottom:14px; display:block; }
.glass-card__title { font-size:1.05rem; font-weight:700; color:#1E293B; margin-bottom:6px; }
.glass-card__desc { font-size:0.88rem; color:#78716C; line-height:1.5; margin-bottom:14px; }
.glass-card__badge {
    display:inline-block; font-size:0.75rem; font-weight:600;
    padding:3px 12px; border-radius:100px;
    background: rgba(251,146,60,0.15);
    color:#D97706; backdrop-filter:blur(4px);
    border: 1px solid rgba(251,146,60,0.2);
}

/* 滚动偏移（补偿固定导航栏） */
#hero, #tools, #about { scroll-margin-top: 72px; }

/* 关于 */
.about {
    position:relative; z-index:1; padding:60px 0 40px;
    text-align:center;
}
.about__title {
    font-size:1.6rem; font-weight:800; color:#1E293B;
    margin-bottom:20px; letter-spacing:-0.02em;
}
.about__content {
    max-width:520px; margin:0 auto;
    font-size:0.95rem; color:#78716C; line-height:1.8;
    display:flex; flex-direction:column; gap:8px;
}
.about__info {
    display:flex; gap:8px; flex-wrap:wrap; justify-content:center;
    margin-top:20px;
}
.about__tag {
    display:inline-block; padding:5px 16px; border-radius:100px;
    font-size:0.82rem; font-weight:600;
    background: rgba(255,255,255,0.5); backdrop-filter:blur(8px);
    border: 1px solid rgba(255,255,255,0.7);
    color:#57534E;
}
@media (max-width:480px) {
    .about { padding:40px 0 24px; }
    .about__title { font-size:1.3rem; }
}

/* 页脚 */
.footer {
    position:relative; z-index:1; padding:32px 0;
    text-align:center; color:#78716C; font-size:0.88rem;
}
.footer__tag { margin-top:4px; font-size:0.82rem; opacity:0.7; }

/* Toast */
.toast-container {
    position:fixed; bottom:32px; left:50%;
    transform:translateX(-50%); z-index:999;
    display:flex; flex-direction:column; align-items:center;
    gap:8px; pointer-events:none;
}
.toast {
    padding:12px 28px; border-radius:16px;
    font-size:0.95rem; font-weight:500;
    color:#1E293B; pointer-events:auto;
    background: rgba(255,250,247,0.85);
    backdrop-filter:blur(24px);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.toast.removing { animation: toastOut 0.3s ease-in forwards; }

@keyframes toastIn {
    0% { opacity:0; transform:translateY(16px) scale(0.92); }
    100% { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes toastOut {
    0% { opacity:1; transform:translateY(0) scale(1); }
    100% { opacity:0; transform:translateY(12px) scale(0.95); }
}

/* 响应式 */
@media (max-width:768px) {
    .hero__title { font-size:2rem; }
    .hero__subtitle { font-size:1rem; }
    .tools__grid { grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:16px; }
    .glass-card { padding:22px 18px; }
    .navbar__link { padding:6px 14px; font-size:0.85rem; }
}
@media (max-width:480px) {
    .hero { padding:48px 0 32px; }
    .hero__title { font-size:1.6rem; }
    .tools__grid { grid-template-columns:1fr; }
    .navbar__links { gap:4px; }
    .navbar__link { padding:6px 10px; font-size:0.8rem; }
}

/* ===== 弹窗 Modal ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal-panel {
    position: relative;
    width: 720px; max-width: 90vw; max-height: 85vh;
    background: rgba(255,250,247,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 20px rgba(0,0,0,0.06);
    display: flex; flex-direction: column;
    opacity: 0; transform: translateY(0) scale(0.9);
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.open .modal-panel {
    opacity: 1; transform: translateY(0) scale(1);
}
.modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.6);
    position: sticky; top: 0; z-index: 1;
    background: rgba(255,250,247,0.8);
    backdrop-filter: blur(12px);
    border-radius: 20px 20px 0 0;
}
.modal__title {
    font-size: 1.15rem; font-weight: 700; color: #1E293B; margin: 0;
}
.modal__close {
    width: 36px; height: 36px; border-radius: 50%;
    border: none; background: transparent;
    font-size: 1.1rem; color: #78716C; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal__close:hover {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    color: #1E293B;
}
.modal__body {
    padding: 28px;
    overflow-y: scroll; /* 强制始终显示滚动条占位 */
    flex: 1;
}
body.modal-open { overflow: hidden; }

@keyframes modalOverlayIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes modalPanelIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width:768px) {
    .modal-panel { max-width: 90vw; }
    .modal__body { padding: 20px; }
    .modal__header { padding: 16px 20px; }
}
@media (max-width:480px) {
    .modal-panel { max-width: 95vw; max-height: 90vh; }
    .modal__body { padding: 16px; }
}

/* ===== JSON 格式化工具 (jt-) ===== */
.jt-container { display: flex; flex-direction: column; gap: 16px; }
.jt-textarea {
    width: 100%; min-height: 180px; padding: 16px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.88rem;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 12px; color: #1E293B; resize: vertical;
    outline: none; transition: border-color 0.25s;
    line-height: 1.5;
}
.jt-textarea:focus { border-color: rgba(167,139,250,0.5); }
.jt-textarea::placeholder { color: #A8A29E; }
.jt-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.jt-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.jt-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.jt-btn:active { transform: scale(0.95); }
.jt-btn.jt-btn-primary { background: rgba(167,139,250,0.2); border-color: rgba(167,139,250,0.3); }
.jt-btn.jt-btn-primary:hover { background: rgba(167,139,250,0.35); }
.jt-btn.jt-btn-danger { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); color: #DC2626; }
.jt-btn.jt-btn-danger:hover { background: rgba(239,68,68,0.2); }
.jt-output {
    width: 100%; min-height: 100px; max-height: 300px; overflow: auto;
    padding: 16px; border-radius: 12px;
    background: rgba(255,255,255,0.35); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5);
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.85rem;
    line-height: 1.6; white-space: pre-wrap; word-break: break-all; color: #1E293B;
}
.jt-error {
    background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #DC2626;
}
.jt-hint { color: #A8A29E; font-size: 0.85rem; padding: 8px 0; }

/* ===== Base64 编解码 (b64-) ===== */
.b64-container { display: flex; flex-direction: column; gap: 16px; }
.b64-row { display: flex; gap: 16px; align-items: flex-start; }
.b64-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.b64-col label { font-size: 0.88rem; font-weight: 600; color: #57534E; }
.b64-textarea {
    width: 100%; min-height: 120px; padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.85rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; resize: vertical; outline: none;
    line-height: 1.5;
}
.b64-textarea:focus { border-color: rgba(167,139,250,0.5); }
.b64-textarea::placeholder { color: #A8A29E; }
.b64-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.b64-btn {
    padding: 8px 18px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.85rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.b64-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.b64-btn:active { transform: scale(0.95); }
.b64-btn.b64-btn-primary { background: rgba(96,165,250,0.2); border-color: rgba(96,165,250,0.3); }
.b64-btn.b64-btn-primary:hover { background: rgba(96,165,250,0.35); }
@media (max-width:600px) {
    .b64-row { flex-direction: column; }
}

/* ===== 时间戳转换 (ts-) ===== */
.ts-container { display: flex; flex-direction: column; gap: 16px; }
.ts-toggle { display: flex; gap: 4px; background: rgba(255,255,255,0.35); border-radius: 100px; padding: 4px; width: fit-content; }
.ts-toggle-btn {
    padding: 6px 20px; border-radius: 100px; border: none;
    background: transparent; font-size: 0.85rem; font-weight: 600; color: #78716C; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ts-toggle-btn.active { background: rgba(255,255,255,0.7); color: #1E293B; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.ts-toggle-btn:hover { color: #1E293B; }
.ts-input {
    width: 100%; padding: 12px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.9rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; outline: none;
}
.ts-input:focus { border-color: rgba(167,139,250,0.5); }
.ts-input-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-result { display: flex; flex-direction: column; gap: 8px; }
.ts-field {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; border-radius: 12px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
    gap: 12px;
}
.ts-field label { font-size: 0.82rem; font-weight: 600; color: #78716C; white-space: nowrap; }
.ts-field span { font-family: 'SF Mono', monospace; font-size: 0.85rem; color: #1E293B; word-break: break-all; }
.ts-field .ts-copy-btn {
    flex-shrink: 0; padding: 4px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.5);
    background: transparent; font-size: 0.78rem; cursor: pointer; color: #78716C;
    transition: all 0.2s;
}
.ts-field .ts-copy-btn:hover { background: rgba(255,255,255,0.5); color: #1E293B; }
.ts-btn {
    padding: 8px 18px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.85rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ts-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.ts-btn:active { transform: scale(0.95); }

/* ===== 文字统计 (st-) ===== */
.st-container { display: flex; flex-direction: column; gap: 14px; }
.st-textarea {
    width: 100%; min-height: 200px; padding: 14px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.88rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; resize: vertical; outline: none; line-height: 1.6;
}
.st-textarea:focus { border-color: rgba(167,139,250,0.5); }
.st-textarea::placeholder { color: #A8A29E; }
.st-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-btn {
    padding: 8px 18px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.85rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.st-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.st-btn:active { transform: scale(0.95); }
.st-btn.st-btn-danger { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); color: #DC2626; }
.st-btn.st-btn-danger:hover { background: rgba(239,68,68,0.2); }
.st-note { font-size: 0.78rem; color: #A8A29E; }
.st-spacer { flex: 1; }
.st-topn { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: #57534E; white-space: nowrap; }
.st-topn select {
    padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.6); color: #1E293B; font-size: 0.85rem; outline: none;
}
.st-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.st-stat {
    flex: 1 1 150px; min-width: 130px; padding: 12px 14px; border-radius: 12px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
    display: flex; flex-direction: column; gap: 4px;
}
.st-stat label { font-size: 0.78rem; font-weight: 600; color: #78716C; }
.st-stat b {
    font-size: 1.35rem; font-family: 'SF Mono', 'Fira Code', monospace; font-weight: 700; color: #1E293B;
}
.st-freq { display: flex; flex-direction: column; gap: 8px; }
.st-freq-head { display: flex; align-items: baseline; gap: 10px; font-size: 0.88rem; font-weight: 700; color: #1E293B; flex-wrap: wrap; }
.st-freq-tip { font-size: 0.75rem; font-weight: 400; color: #A8A29E; }
.st-freq-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.st-empty { text-align: center; padding: 24px 0; color: #A8A29E; font-size: 0.85rem; }
.st-freq-row { display: flex; align-items: center; gap: 10px; }
.st-freq-word { flex: 0 0 90px; font-size: 0.85rem; font-weight: 600; color: #1E293B; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-freq-track { flex: 1; height: 18px; border-radius: 9px; background: rgba(255,255,255,0.35); overflow: hidden; }
.st-freq-bar { height: 100%; border-radius: 9px; background: linear-gradient(90deg, rgba(167,139,250,0.6), rgba(96,165,250,0.6)); min-width: 2px; transition: width 0.3s ease; }
.st-freq-count { flex: 0 0 34px; font-size: 0.8rem; font-family: 'SF Mono', monospace; color: #78716C; }
/* 夜间 */
body.night .st-textarea { background: rgba(30,41,59,0.4); border-color: rgba(255,255,255,0.08); color: #E2E8F0; }
body.night .st-textarea::placeholder { color: #64748B; }
body.night .st-btn { background: rgba(30,41,59,0.5); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .st-btn:hover { background: rgba(30,41,59,0.7); color: #FFF; }
body.night .st-btn.st-btn-danger { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #FCA5A5; }
body.night .st-btn.st-btn-danger:hover { background: rgba(239,68,68,0.25); }
body.night .st-note { color: #64748B; }
body.night .st-topn { color: #CBD5E1; }
body.night .st-topn select { background: rgba(30,41,59,0.6); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .st-stat { background: rgba(30,41,59,0.35); border-color: rgba(255,255,255,0.08); }
body.night .st-stat label { color: #94A3B8; }
body.night .st-stat b { color: #F1F5F9; }
body.night .st-freq-head { color: #F1F5F9; }
body.night .st-freq-tip { color: #64748B; }
body.night .st-freq-word { color: #F1F5F9; }
body.night .st-freq-track { background: rgba(255,255,255,0.08); }
body.night .st-freq-count { color: #94A3B8; }
body.night .st-empty { color: #64748B; }

/* ===== 日期计算器 (dc-) ===== */
.dc-container { display: flex; flex-direction: column; gap: 16px; }
.dc-toggle { display: flex; gap: 4px; background: rgba(255,255,255,0.35); border-radius: 100px; padding: 4px; width: fit-content; flex-wrap: wrap; }
.dc-toggle-btn {
    padding: 6px 18px; border-radius: 100px; border: none;
    background: transparent; font-size: 0.85rem; font-weight: 600; color: #78716C; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dc-toggle-btn.active { background: rgba(255,255,255,0.7); color: #1E293B; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.dc-toggle-btn:hover { color: #1E293B; }
.dc-field-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dc-field-row label { font-size: 0.82rem; font-weight: 600; color: #57534E; white-space: nowrap; }
.dc-input {
    padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); color: #1E293B; font-size: 0.88rem; outline: none;
}
.dc-input:focus { border-color: rgba(167,139,250,0.5); }
.dc-input-num { width: 90px; }
.dc-btn {
    padding: 8px 16px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.85rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dc-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.dc-btn:active { transform: scale(0.95); }
.dc-hint { font-size: 0.78rem; color: #A8A29E; }
.dc-result {
    display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
}
.dc-big { font-size: 1.25rem; font-weight: 700; color: #1E293B; }
.dc-lunar { font-size: 0.82rem; color: #78716C; }
.dc-copy-row { display: flex; justify-content: flex-end; }
/* 夜间 */
body.night .dc-toggle-btn { color: #94A3B8; }
body.night .dc-toggle-btn.active { background: rgba(51,65,85,0.8); color: #F1F5F9; box-shadow: none; }
body.night .dc-toggle-btn:hover { color: #F1F5F9; }
body.night .dc-field-row label { color: #CBD5E1; }
body.night .dc-input { background: rgba(30,41,59,0.6); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .dc-btn { background: rgba(30,41,59,0.5); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .dc-btn:hover { background: rgba(30,41,59,0.7); color: #FFF; }
body.night .dc-hint { color: #64748B; }
body.night .dc-result { background: rgba(30,41,59,0.35); border-color: rgba(255,255,255,0.08); }
body.night .dc-big { color: #F1F5F9; }
body.night .dc-lunar { color: #94A3B8; }

/* ===== IP 地址工具 (ip-) ===== */
.ip-toggle { display: flex; gap: 4px; background: rgba(255,255,255,0.35); border-radius: 100px; padding: 4px; width: fit-content; flex-wrap: wrap; }
.ip-toggle-btn {
    padding: 6px 18px; border-radius: 100px; border: none;
    background: transparent; font-size: 0.85rem; font-weight: 600; color: #78716C; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ip-toggle-btn.active { background: rgba(255,255,255,0.7); color: #1E293B; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.ip-toggle-btn:hover { color: #1E293B; }
.ip-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.ip-card {
    display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
}
.ip-card-hidden { display: none; }
.ip-card-title { font-size: 0.8rem; font-weight: 600; color: #78716C; }
.ip-big { font-size: 1.2rem; font-weight: 700; color: #1E293B; word-break: break-all; }
.ip-big.ip-ok { color: #16A34A; }
.ip-big.ip-err { color: #DC2626; }
.ip-sub { font-size: 0.8rem; color: #78716C; line-height: 1.5; }
.ip-locked { font-size: 0.9rem; color: #A8A29E; }
.ip-chip {
    display: inline-block; padding: 4px 10px; border-radius: 8px; margin: 2px 4px 2px 0;
    background: rgba(167,139,250,0.15); color: #7C3AED; font-family: Consolas, Menlo, monospace; font-size: 0.82rem;
}
.ip-chip-v6 { background: rgba(56,189,248,0.15); color: #0369A1; }
.ip-actions { display: flex; gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.ip-btn {
    padding: 8px 16px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.85rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ip-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.ip-btn:active { transform: scale(0.95); }
.ip-note { font-size: 0.76rem; color: #A8A29E; line-height: 1.5; }
.ip-field-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ip-input {
    padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); color: #1E293B; font-size: 0.88rem; outline: none;
    min-width: 0; flex: 1;
}
.ip-input:focus { border-color: rgba(167,139,250,0.5); }
.ip-hint { font-size: 0.78rem; color: #A8A29E; margin: 6px 0; }
.ip-table { display: flex; flex-direction: column; gap: 4px; }
.ip-tr { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 3px 0; border-bottom: 1px dashed rgba(255,255,255,0.4); }
.ip-tr:last-child { border-bottom: none; }
.ip-td-key { font-size: 0.8rem; color: #78716C; }
.ip-td-val { font-size: 0.86rem; font-weight: 600; color: #1E293B; font-family: Consolas, Menlo, monospace; word-break: break-all; text-align: right; }
.ip-bin { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.ip-bin-row { display: flex; gap: 10px; align-items: center; }
.ip-bin-label { width: 34px; font-size: 0.72rem; color: #A8A29E; flex-shrink: 0; }
.ip-bin-spans { display: flex; gap: 6px; font-family: Consolas, Menlo, monospace; font-size: 0.72rem; letter-spacing: 1px; }
.ip-bin-byte { display: flex; }
.ip-bin-net { color: #16A34A; }
.ip-bin-host { color: #B8B2AC; }
/* 夜间 */
body.night .ip-toggle-btn { color: #94A3B8; }
body.night .ip-toggle-btn.active { background: rgba(51,65,85,0.8); color: #F1F5F9; box-shadow: none; }
body.night .ip-toggle-btn:hover { color: #F1F5F9; }
body.night .ip-card { background: rgba(30,41,59,0.35); border-color: rgba(255,255,255,0.08); }
body.night .ip-card-title { color: #94A3B8; }
body.night .ip-big { color: #F1F5F9; }
body.night .ip-big.ip-ok { color: #4ADE80; }
body.night .ip-big.ip-err { color: #F87171; }
body.night .ip-sub { color: #94A3B8; }
body.night .ip-locked { color: #64748B; }
body.night .ip-chip { background: rgba(167,139,250,0.2); color: #C4B5FD; }
body.night .ip-chip-v6 { background: rgba(56,189,248,0.18); color: #7DD3FC; }
body.night .ip-btn { background: rgba(30,41,59,0.5); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .ip-btn:hover { background: rgba(30,41,59,0.7); color: #FFF; }
body.night .ip-note { color: #64748B; }
body.night .ip-input { background: rgba(30,41,59,0.6); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .ip-hint { color: #64748B; }
body.night .ip-tr { border-bottom-color: rgba(255,255,255,0.08); }
body.night .ip-td-key { color: #94A3B8; }
body.night .ip-td-val { color: #F1F5F9; }
body.night .ip-bin-label { color: #64748B; }
body.night .ip-bin-host { color: #475569; }

/* ===== 文本批量处理 (bt-) ===== */
.bt-wrap { display: flex; flex-direction: column; gap: 10px; }
.bt-input {
    width: 100%; min-height: 110px; resize: vertical; box-sizing: border-box;
    padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); color: #1E293B; font-size: 0.85rem;
    font-family: Consolas, Menlo, monospace; line-height: 1.6; outline: none;
}
.bt-input:focus { border-color: rgba(167,139,250,0.5); }
.bt-input-inline { width: auto; min-height: 0; padding: 8px 12px; flex: 1; }
.bt-ops { display: flex; flex-direction: column; gap: 6px; }
.bt-ops-label { font-size: 0.72rem; font-weight: 600; color: #A8A29E; letter-spacing: 1px; }
.bt-row { display: flex; gap: 6px; flex-wrap: wrap; }
.bt-btn {
    padding: 7px 13px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.82rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bt-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.bt-btn:active { transform: scale(0.95); }
.bt-btn-primary { background: rgba(167,139,250,0.35); border-color: rgba(167,139,250,0.5); color: #5B21B6; }
.bt-btn-primary:hover { background: rgba(167,139,250,0.5); }
.bt-btn-plain { background: transparent; border-color: transparent; color: #A8A29E; }
.bt-btn-plain:hover { background: transparent; color: #78716C; transform: none; }
.bt-ext { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.25); border: 1px solid rgba(255,255,255,0.45); }
.bt-ext-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bt-chk { font-size: 0.8rem; color: #57534E; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.bt-output-wrap { display: flex; flex-direction: column; gap: 6px; }
.bt-output-head { display: flex; justify-content: space-between; align-items: center; }
.bt-status { font-size: 0.78rem; font-weight: 600; color: #7C3AED; }
.bt-sub { font-size: 0.75rem; color: #A8A29E; }
.bt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* 夜间 */
body.night .bt-input { background: rgba(30,41,59,0.6); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .bt-ops-label { color: #64748B; }
body.night .bt-btn { background: rgba(30,41,59,0.5); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .bt-btn:hover { background: rgba(30,41,59,0.7); color: #FFF; }
body.night .bt-btn-primary { background: rgba(139,92,246,0.35); border-color: rgba(139,92,246,0.5); color: #C4B5FD; }
body.night .bt-btn-primary:hover { background: rgba(139,92,246,0.5); }
body.night .bt-btn-plain { color: #64748B; }
body.night .bt-btn-plain:hover { color: #94A3B8; }
body.night .bt-ext { background: rgba(30,41,59,0.3); border-color: rgba(255,255,255,0.08); }
body.night .bt-chk { color: #CBD5E1; }
body.night .bt-status { color: #C4B5FD; }
body.night .bt-sub { color: #64748B; }

/* ===== 亲戚称呼计算器 (rk-) ===== */
.rk-wrap { display: flex; flex-direction: column; gap: 8px; }
.rk-toggle { display: flex; gap: 4px; background: rgba(255,255,255,0.35); border-radius: 100px; padding: 4px; width: fit-content; flex-wrap: wrap; max-width: 100%; flex-shrink: 0; }
.rk-toggle-btn {
    padding: 6px 12px; border-radius: 100px; border: none; background: transparent;
    font-size: 0.8rem; font-weight: 600; color: #78716C; cursor: pointer; transition: all 0.2s;
    white-space: nowrap;
}
.rk-toggle-btn.active { background: rgba(255,255,255,0.7); color: #1E293B; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.rk-toggle-btn:hover { color: #1E293B; }
.rk-sex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; color: #57534E; flex-shrink: 0; }
.rk-sex-label { white-space: nowrap; }
.rk-seg {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.4); cursor: pointer;
    font-size: 0.82rem; font-weight: 600; color: #1E293B; user-select: none; transition: all 0.2s;
}
.rk-seg:has(input:checked) { background: rgba(167,139,250,0.3); border-color: rgba(167,139,250,0.5); color: #5B21B6; }
.rk-seg input { margin: 0; accent-color: #7C3AED; }

/* 路径显示 */
.rk-path-display {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px;
    background: rgba(255,255,255,0.4); border-radius: 12px; border: 1px solid rgba(255,255,255,0.6);
    min-height: 44px; flex-shrink: 0;
}
.rk-path-empty {
    width: 100%; text-align: center; font-size: 0.8rem; color: #A8A29E; font-weight: 500;
}
.rk-path-item {
    padding: 3px 8px; background: rgba(255,255,255,0.7); border-radius: 6px;
    font-size: 0.78rem; font-weight: 600; color: #57534E; border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.2s;
}
.rk-path-start {
    background: rgba(167,139,250,0.2); color: #5B21B6; border-color: rgba(167,139,250,0.3);
}
.rk-path-result {
    background: rgba(34,197,94,0.2); color: #15803D; border-color: rgba(34,197,94,0.3);
    font-size: 0.85rem; padding: 4px 10px;
}
.rk-path-error {
    background: rgba(239,68,68,0.2); color: #DC2626; border-color: rgba(239,68,68,0.3);
}
.rk-path-arrow {
    font-size: 0.85rem; color: #A8A29E; font-weight: 600;
}

/* 关系按钮面板 */
.rk-buttons-panel {
    display: flex; flex-direction: column; gap: 8px; padding: 10px 12px;
    background: rgba(255,255,255,0.35); border-radius: 12px; border: 1px solid rgba(255,255,255,0.6);
    flex-shrink: 0;
}
.rk-button-group {
    display: flex; flex-direction: column; gap: 5px;
}
.rk-group-title {
    font-size: 0.7rem; font-weight: 600; color: #A8A29E; letter-spacing: 0.5px;
    text-transform: uppercase;
}
.rk-group-items {
    display: flex; gap: 5px; flex-wrap: wrap;
}
.rk-rel-btn {
    padding: 5px 10px; border: 1px solid rgba(167,139,250,0.3); border-radius: 6px;
    background: rgba(255,255,255,0.6); color: #7C3AED; font-size: 0.78rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.rk-rel-btn:hover {
    background: rgba(167,139,250,0.25); border-color: rgba(167,139,250,0.5);
    transform: translateY(-1px); box-shadow: 0 2px 6px rgba(124,58,237,0.15);
}
.rk-rel-btn:active {
    transform: scale(0.95);
}

/* 操作按钮 */
.rk-actions {
    display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0;
}
.rk-action-btn {
    flex: 1; min-width: 120px; padding: 8px 14px; border: 1.5px solid rgba(249,115,22,0.3);
    border-radius: 8px; background: rgba(249,115,22,0.1); color: #EA580C;
    font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.rk-action-btn:hover:not(:disabled) {
    background: rgba(249,115,22,0.2); border-color: rgba(249,115,22,0.5);
    color: #DC2626; transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(249,115,22,0.15);
}
.rk-action-btn:active:not(:disabled) {
    transform: scale(0.98);
}
.rk-action-btn:disabled {
    opacity: 0.4; cursor: not-allowed; background: rgba(255,255,255,0.3);
    border-color: rgba(120,113,108,0.2); color: #A8A29E;
}

.rk-field-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rk-result { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.rk-card {
    padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.55); display: flex; flex-direction: column; gap: 5px;
}
.rk-answer { font-size: 1.15rem; font-weight: 700; color: #1E293B; word-break: break-all; line-height: 1.4; }
.rk-answer-dim { font-size: 0.85rem; font-weight: 500; color: #A8A29E; }
.rk-sub { font-size: 0.78rem; color: #78716C; line-height: 1.3; }
.rk-aliases { color: #7C3AED; font-weight: 600; }
.rk-desc { font-size: 0.75rem; color: #78716C; line-height: 1.4; }
.rk-err { font-size: 0.85rem; font-weight: 600; color: #DC2626; }
.rk-note { font-size: 0.72rem; color: #A8A29E; line-height: 1.5; padding: 6px 0; }
.rk-quick-title { font-size: 0.75rem; font-weight: 600; color: #78716C; margin-top: 2px; flex-shrink: 0; }
.rk-quick { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.rk-qgroup { display: flex; flex-direction: column; gap: 4px; }
.rk-qtitle { font-size: 0.7rem; font-weight: 600; color: #A8A29E; letter-spacing: 1px; }
.rk-qitems { display: flex; gap: 5px; flex-wrap: wrap; }
.rk-chip {
    padding: 4px 10px; border-radius: 100px; border: 1px solid rgba(167,139,250,0.25);
    background: rgba(255,255,255,0.45); font-size: 0.75rem; font-weight: 500; color: #57534E;
    cursor: pointer; transition: all 0.2s;
}
.rk-chip:hover { background: rgba(167,139,250,0.2); color: #6D28D9; transform: translateY(-1px); }
/* 夜间 */
body.night .rk-toggle-btn { color: #94A3B8; }
body.night .rk-toggle-btn.active { background: rgba(51,65,85,0.8); color: #F1F5F9; box-shadow: none; }
body.night .rk-toggle-btn:hover { color: #F1F5F9; }
body.night .rk-sex { color: #CBD5E1; }
body.night .rk-seg { border-color: rgba(255,255,255,0.1); background: rgba(30,41,59,0.5); color: #E2E8F0; }
body.night .rk-seg:has(input:checked) { background: rgba(139,92,246,0.35); border-color: rgba(139,92,246,0.5); color: #C4B5FD; }
body.night .rk-path-display { background: rgba(30,41,59,0.4); border-color: rgba(255,255,255,0.08); }
body.night .rk-path-empty { color: #64748B; }
body.night .rk-path-item { background: rgba(30,41,59,0.6); color: #CBD5E1; border-color: rgba(255,255,255,0.1); }
body.night .rk-path-start { background: rgba(139,92,246,0.3); color: #C4B5FD; border-color: rgba(139,92,246,0.4); }
body.night .rk-path-result { background: rgba(34,197,94,0.25); color: #4ADE80; border-color: rgba(34,197,94,0.3); }
body.night .rk-path-error { background: rgba(239,68,68,0.25); color: #F87171; border-color: rgba(239,68,68,0.3); }
body.night .rk-path-arrow { color: #64748B; }
body.night .rk-buttons-panel { background: rgba(30,41,59,0.35); border-color: rgba(255,255,255,0.08); }
body.night .rk-group-title { color: #64748B; }
body.night .rk-rel-btn { background: rgba(30,41,59,0.5); color: #C4B5FD; border-color: rgba(139,92,246,0.25); }
body.night .rk-rel-btn:hover { background: rgba(139,92,246,0.3); border-color: rgba(139,92,246,0.4); box-shadow: 0 2px 6px rgba(139,92,246,0.2); }
body.night .rk-action-btn { background: rgba(30,41,59,0.5); color: #CBD5E1; border-color: rgba(255,255,255,0.1); }
body.night .rk-action-btn:hover:not(:disabled) { background: rgba(249,115,22,0.25); border-color: rgba(249,115,22,0.4); color: #FB923C; }
body.night .rk-action-btn:disabled { opacity: 0.3; }
body.night .rk-input { background: rgba(30,41,59,0.6); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .rk-btn { background: rgba(139,92,246,0.35); border-color: rgba(139,92,246,0.5); color: #C4B5FD; }
body.night .rk-card { background: rgba(30,41,59,0.35); border-color: rgba(255,255,255,0.08); }
body.night .rk-answer { color: #F1F5F9; }
body.night .rk-answer-dim { color: #64748B; }
body.night .rk-sub { color: #94A3B8; }
body.night .rk-aliases { color: #C4B5FD; }
body.night .rk-desc { color: #94A3B8; }
body.night .rk-err { color: #F87171; }
body.night .rk-note { color: #64748B; }
body.night .rk-quick-title { color: #94A3B8; }
body.night .rk-qtitle { color: #64748B; }
body.night .rk-chip { border-color: rgba(139,92,246,0.2); background: rgba(30,41,59,0.45); color: #CBD5E1; }
body.night .rk-chip:hover { background: rgba(139,92,246,0.25); color: #E9D5FF; }

/* 亲戚计算器响应式 */
@media (max-width: 640px) {
    .rk-toggle { padding: 3px; gap: 3px; }
    .rk-toggle-btn { font-size: 0.75rem; padding: 6px 10px; }
    .rk-sex-label { font-size: 0.75rem; }
    .rk-seg { font-size: 0.75rem; padding: 4px 10px; }
    .rk-path-display { padding: 10px; gap: 4px; }
    .rk-path-item { font-size: 0.75rem; padding: 3px 8px; }
    .rk-path-arrow { font-size: 0.8rem; }
    .rk-buttons-panel { padding: 10px; gap: 8px; }
    .rk-group-title { font-size: 0.7rem; }
    .rk-group-items { gap: 5px; }
    .rk-rel-btn { font-size: 0.75rem; padding: 5px 10px; }
    .rk-actions { gap: 6px; }
    .rk-action-btn { font-size: 0.78rem; padding: 8px 12px; min-width: 100px; }
    .rk-answer { font-size: 1.1rem; }
    .rk-card { padding: 14px 16px; }
    .rk-chip { font-size: 0.75rem; padding: 4px 10px; }
    .rk-quick { gap: 6px; }
}

/* ===== 像素画制作器 (px-) ===== */
.px-wrap { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.px-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; width: 100%; }
.px-label { font-size: 0.78rem; font-weight: 600; color: #A8A29E; }
.px-label-gap { margin-left: 8px; }
.px-btn {
    padding: 7px 13px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.82rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.px-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.px-btn:active { transform: scale(0.95); }
.px-btn.active { background: rgba(167,139,250,0.35); border-color: rgba(167,139,250,0.5); color: #5B21B6; }
.px-btn-plain { background: transparent; border-color: transparent; color: #A8A29E; }
.px-btn-plain:hover { background: transparent; color: #78716C; transform: none; }
.px-btn-primary { background: rgba(167,139,250,0.35); border-color: rgba(167,139,250,0.5); color: #5B21B6; }
.px-btn-primary:hover { background: rgba(167,139,250,0.5); }
.px-btn-secondary { background: rgba(34,197,94,0.25); border-color: rgba(34,197,94,0.4); color: #166534; }
.px-btn-secondary:hover { background: rgba(34,197,94,0.35); }
.px-btn-mini {
    padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.45); backdrop-filter: blur(8px);
    font-size: 0.75rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.2s;
}
.px-btn-mini:hover { background: rgba(255,255,255,0.65); transform: scale(1.05); }
.px-btn-mini.active { background: rgba(167,139,250,0.3); border-color: rgba(167,139,250,0.5); color: #5B21B6; }
.px-size-input {
    width: 50px; padding: 6px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.82rem; font-weight: 600; color: #1E293B; text-align: center;
    outline: none; transition: all 0.2s;
}
.px-size-input:focus { border-color: rgba(167,139,250,0.5); background: rgba(255,255,255,0.75); }
.px-color-input {
    width: 45px; padding: 5px 7px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.78rem; font-weight: 600; color: #1E293B; text-align: center;
    outline: none; transition: all 0.2s;
}
.px-color-input:focus { border-color: rgba(167,139,250,0.5); background: rgba(255,255,255,0.75); }
.px-checkbox { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #57534E; cursor: pointer; user-select: none; }
.px-checkbox input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #8B5CF6; }
.px-select {
    padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.8rem; color: #1E293B; cursor: pointer; outline: none;
}
.px-select:focus { border-color: rgba(167,139,250,0.5); background: rgba(255,255,255,0.75); }
.px-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.px-swatch {
    width: 26px; height: 26px; border-radius: 8px; border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15); flex-shrink: 0;
}
.px-palette { display: flex; gap: 5px; flex-wrap: wrap; }
.px-pal {
    width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.6);
    cursor: pointer; transition: transform 0.15s; padding: 0;
}
.px-pal:hover { transform: scale(1.18); }
.px-colorpick {
    width: 34px; height: 26px; padding: 0; border: 1px solid rgba(255,255,255,0.6);
    border-radius: 8px; background: transparent; cursor: pointer;
}
.px-grid-wrap { width: 100%; display: flex; justify-content: center; }
.px-grid {
    display: grid; gap: 0; aspect-ratio: 1;
    background: rgba(255,255,255,0.25);
    border-radius: 8px; overflow: hidden; user-select: none; touch-action: none;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.px-cell {
    aspect-ratio: 1; box-sizing: border-box;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.07); cursor: crosshair;
}
.px-cell:hover { box-shadow: inset 0 0 0 2px rgba(167,139,250,0.6); z-index: 1; }
.px-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; }
.px-status { font-size: 0.76rem; color: #A8A29E; }
.px-note { font-size: 0.74rem; color: #A8A29E; line-height: 1.6; text-align: center; }
/* 夜间 */
body.night .px-btn { background: rgba(30,41,59,0.5); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .px-btn:hover { background: rgba(30,41,59,0.7); color: #FFF; }
body.night .px-btn.active { background: rgba(139,92,246,0.35); border-color: rgba(139,92,246,0.5); color: #C4B5FD; }
body.night .px-btn-plain { color: #64748B; }
body.night .px-size-input { background: rgba(30,41,59,0.5); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .px-size-input:focus { border-color: rgba(139,92,246,0.5); background: rgba(30,41,59,0.7); }
body.night .px-btn-plain:hover { color: #94A3B8; }
body.night .px-btn-primary { background: rgba(139,92,246,0.35); border-color: rgba(139,92,246,0.5); color: #C4B5FD; }
body.night .px-btn-primary:hover { background: rgba(139,92,246,0.5); color: #FFF; }
body.night .px-btn-secondary { background: rgba(34,197,94,0.2); border-color: rgba(34,197,94,0.3); color: #86EFAC; }
body.night .px-btn-secondary:hover { background: rgba(34,197,94,0.3); }
body.night .px-btn-mini { background: rgba(30,41,59,0.4); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .px-btn-mini:hover { background: rgba(30,41,59,0.6); }
body.night .px-btn-mini.active { background: rgba(139,92,246,0.3); border-color: rgba(139,92,246,0.5); color: #C4B5FD; }
body.night .px-color-input { background: rgba(30,41,59,0.5); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .px-color-input:focus { border-color: rgba(139,92,246,0.5); background: rgba(30,41,59,0.7); }
body.night .px-checkbox { color: #A8A29E; }
body.night .px-select { background: rgba(30,41,59,0.5); border-color: rgba(255,255,255,0.1); color: #E2E8F0; }
body.night .px-select:focus { border-color: rgba(139,92,246,0.5); background: rgba(30,41,59,0.7); }
body.night .px-swatch { border-color: rgba(255,255,255,0.15); }
body.night .px-pal { border-color: rgba(255,255,255,0.15); }
body.night .px-colorpick { border-color: rgba(255,255,255,0.15); }
body.night .px-grid { background: rgba(30,41,59,0.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
body.night .px-cell { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
body.night .px-status { color: #64748B; }
body.night .px-note { color: #64748B; }

/* 像素画确认对话框 */
.px-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000;
    background: rgba(0,0,0,0); backdrop-filter: blur(0px);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.px-modal-overlay.px-modal-show { background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); }
.px-modal-overlay.px-modal-closing { background: rgba(0,0,0,0); backdrop-filter: blur(0px); }
.px-modal {
    background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
    border-radius: 16px; padding: 24px; min-width: 320px; max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.9); opacity: 0; transition: all 0.2s;
}
.px-modal-show .px-modal { transform: scale(1); opacity: 1; }
.px-modal-closing .px-modal { transform: scale(0.9); opacity: 0; }
.px-modal-title {
    font-size: 1.1rem; font-weight: 700; color: #1E293B; margin-bottom: 12px;
}
.px-modal-message {
    font-size: 0.9rem; color: #475569; line-height: 1.6; margin-bottom: 20px;
}
.px-modal-buttons {
    display: flex; gap: 10px; justify-content: flex-end;
}
.px-modal-btn {
    padding: 8px 20px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; border: none; transition: all 0.2s;
}
.px-modal-btn-cancel {
    background: rgba(100,116,139,0.15); color: #64748B;
}
.px-modal-btn-cancel:hover { background: rgba(100,116,139,0.25); }
.px-modal-btn-confirm {
    background: rgba(167,139,250,0.35); color: #5B21B6;
}
.px-modal-btn-confirm:hover { background: rgba(167,139,250,0.5); }

/* 夜间模式 */
body.night .px-modal {
    background: rgba(30,41,59,0.95);
}
body.night .px-modal-title { color: #E2E8F0; }
body.night .px-modal-message { color: #94A3B8; }
body.night .px-modal-btn-cancel {
    background: rgba(100,116,139,0.2); color: #94A3B8;
}
body.night .px-modal-btn-cancel:hover { background: rgba(100,116,139,0.3); }
body.night .px-modal-btn-confirm {
    background: rgba(139,92,246,0.35); color: #C4B5FD;
}
body.night .px-modal-btn-confirm:hover { background: rgba(139,92,246,0.5); }

/* ===== 正则测试器 (rx-) ===== */
.rx-container { display: flex; flex-direction: column; gap: 16px; }
.rx-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.rx-col { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.rx-col label, .rx-row label { font-size: 0.85rem; font-weight: 600; color: #57534E; }
.rx-input {
    width: 100%; padding: 10px 14px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.88rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; outline: none;
}
.rx-input:focus { border-color: rgba(167,139,250,0.5); }
.rx-textarea {
    width: 100%; min-height: 120px; padding: 12px; resize: vertical;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.85rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; outline: none; line-height: 1.6;
}
.rx-textarea:focus { border-color: rgba(167,139,250,0.5); }
.rx-flags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rx-flag {
    padding: 4px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.3); font-size: 0.82rem; font-weight: 600;
    cursor: pointer; color: #78716C; user-select: none;
    transition: all 0.2s;
}
.rx-flag.active { background: rgba(167,139,250,0.25); border-color: rgba(167,139,250,0.4); color: #6D28D9; }
.rx-result {
    padding: 12px 16px; border-radius: 12px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
    font-size: 0.85rem; color: #1E293B; min-height: 40px;
    white-space: pre-wrap; word-break: break-all; line-height: 1.6;
}
.rx-result mark {
    background: rgba(251,146,60,0.3); color: #1E293B;
    border-radius: 3px; padding: 1px 2px;
}
.rx-error { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #DC2626; }
.rx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rx-chip {
    padding: 4px 12px; border-radius: 100px; border: 1px solid rgba(167,139,250,0.2);
    background: rgba(167,139,250,0.1); font-size: 0.8rem; cursor: pointer; color: #7C3AED;
    transition: all 0.2s;
}
.rx-chip:hover { background: rgba(167,139,250,0.2); }
.rx-count { font-size: 0.82rem; color: #78716C; }
.rx-sub-mode { display: flex; gap: 8px; align-items: center; }
.rx-sub-input {
    flex: 1; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.4); font-size: 0.85rem; color: #1E293B; outline: none;
}
.rx-sub-input:focus { border-color: rgba(167,139,250,0.5); }

/* ===== 色值转换 (cc-) ===== */
.cc-container { display: flex; flex-direction: column; gap: 16px; }
.cc-picker-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.cc-color-input { width: 60px; height: 60px; border: none; border-radius: 16px; cursor: pointer; padding: 0; background: none; }
.cc-swatch {
    width: 60px; height: 60px; border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.6); box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.cc-fields { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 200px; }
.cc-field {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 10px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
}
.cc-field label { font-size: 0.82rem; font-weight: 700; color: #78716C; min-width: 36px; }
.cc-field input {
    flex: 1; border: none; background: transparent;
    font-family: 'SF Mono', monospace; font-size: 0.85rem; color: #1E293B; outline: none;
}
.cc-copy-btn {
    padding: 2px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.4);
    background: transparent; font-size: 0.75rem; cursor: pointer; color: #78716C;
    transition: all 0.2s;
}
.cc-copy-btn:hover { background: rgba(255,255,255,0.5); color: #1E293B; }
.cc-btn {
    padding: 8px 18px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.85rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cc-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.cc-btn:active { transform: scale(0.95); }
.cc-recents { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cc-recents-label { font-size: 0.82rem; color: #78716C; font-weight: 600; }
.cc-recent-color {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6); cursor: pointer;
    transition: transform 0.2s;
}
.cc-recent-color:hover { transform: scale(1.15); }

/* ===== 二维码生成 (qr-) ===== */
.qr-container { display: flex; flex-direction: column; gap: 16px; }
.qr-textarea {
    width: 100%; min-height: 80px; padding: 12px;
    font-size: 0.9rem; background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; resize: vertical; outline: none;
}
.qr-textarea:focus { border-color: rgba(167,139,250,0.5); }
.qr-textarea::placeholder { color: #A8A29E; }
.qr-canvas-wrap {
    display: flex; justify-content: center; align-items: center;
    padding: 24px; background: white; border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.5); min-height: 180px;
}
.qr-options { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.qr-options label { font-size: 0.85rem; font-weight: 600; color: #57534E; }
.qr-options select {
    padding: 6px 12px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.5);
    font-size: 0.85rem; color: #1E293B; outline: none;
}
.qr-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.qr-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.qr-btn:active { transform: scale(0.95); }
.qr-placeholder { color: #A8A29E; font-size: 0.9rem; }

/* ===== 图片压缩 (ic-) ===== */
.ic-container { display: flex; flex-direction: column; gap: 16px; }
.ic-dropzone {
    border: 2px dashed rgba(167,139,250,0.3);
    border-radius: 16px; padding: 40px 24px;
    text-align: center; cursor: pointer;
    background: rgba(255,255,255,0.3); backdrop-filter: blur(8px);
    transition: all 0.3s;
}
.ic-dropzone:hover, .ic-dropzone.drag-over { border-color: rgba(167,139,250,0.6); background: rgba(167,139,250,0.05); }
.ic-dropzone p { color: #78716C; font-size: 0.9rem; }
.ic-dropzone .ic-icon { font-size: 2.5rem; margin-bottom: 8px; }
.ic-preview-row { display: flex; gap: 16px; flex-wrap: wrap; }
.ic-preview-col { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.ic-preview-col label { font-size: 0.82rem; font-weight: 600; color: #57534E; }
.ic-preview-wrap {
    border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    min-height: 120px; max-height: 260px;
}
.ic-preview-wrap img { max-width: 100%; max-height: 260px; object-fit: contain; display: block; }
.ic-info { font-size: 0.82rem; color: #78716C; }
.ic-slider-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ic-slider-row label { font-size: 0.85rem; font-weight: 600; color: #57534E; white-space: nowrap; }
.ic-slider {
    flex: 1; min-width: 120px; -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 3px;
    background: rgba(167,139,250,0.2); outline: none;
}
.ic-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: rgba(167,139,250,0.6); cursor: pointer;
    border: 2px solid white; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.ic-slider-val { font-size: 0.85rem; font-weight: 700; color: #7C3AED; min-width: 36px; }
/* 滑条禁用态：选无损格式（PNG/ICO）时整体转红 + not-allowed，配下方小字注释说明原因 */
.ic-slider.ic-slider-locked {
    background: rgba(220,38,38,0.25); cursor: not-allowed; pointer-events: none;
}
.ic-slider.ic-slider-locked::-webkit-slider-thumb {
    background: rgba(220,38,38,0.55); cursor: not-allowed; border-color: rgba(220,38,38,0.3);
}
/* 图片格式转换：选项区三行布局 —— 第一行「转为 + 下载/重置」，第二行「质量条」，第三行固定提示位 */
.ic-opt-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; flex-basis: 100%; }
.ic-opt-spacer { flex: 1; }
/* 格式下拉框加宽到能完整显示最长选项（「ICO（图标，最大 256px）」文本约 160px + 内边距 24px + 箭头） */
#ifFormat { width: 200px; }
/* 质量手动输入框：可输 ≤1 任意数（含负数 → 彩蛋），故不加 min/max 属性（浏览器标红碍眼），由 JS 钳制 */
#ifQualityInput {
    width: 64px; padding: 6px 8px; text-align: center;
    font-variant-numeric: tabular-nums;
}
.ic-slider-note-row {
    flex-basis: 100%; min-height: 1.15em; line-height: 1.15em;
    font-size: 0.72rem; box-sizing: border-box;
}
.ic-slider-note {
    font-size: 0.72rem; color: #DC2626;
    font-weight: 500; letter-spacing: 0.01em;
    visibility: hidden; /* 默认隐藏；隐藏时仍占一行，不同格式下选项区高度统一 */
}
body.night .ic-slider-note { color: #F87171; }
body.night .ic-slider.ic-slider-locked { background: rgba(248,113,113,0.18); }
body.night .ic-slider.ic-slider-locked::-webkit-slider-thumb { background: rgba(248,113,113,0.5); border-color: rgba(248,113,113,0.3); }
/* 夜间：select / 质量输入框转深色底（半透明白在深色面板上不够清晰） */
body.night .ic-options select, body.night .ic-options input[type=number] {
    background: rgba(30,41,59,0.6); border-color: rgba(255,255,255,0.15); color: #E2E8F0;
}
.ic-options { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.ic-options label { font-size: 0.85rem; font-weight: 600; color: #57534E; }
.ic-options select, .ic-options input[type=number] {
    padding: 6px 12px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.5);
    font-size: 0.85rem; color: #1E293B; outline: none; width: 100px;
}
.ic-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ic-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.ic-btn:active { transform: scale(0.95); }
.ic-btn.ic-btn-primary { background: rgba(96,165,250,0.2); border-color: rgba(96,165,250,0.3); }
.ic-btn.ic-btn-primary:hover { background: rgba(96,165,250,0.35); }

/* ===== PDF 工具箱 (pt-) ===== */
.pt-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-tab {
    padding: 7px 18px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.45); font-size: 0.88rem; font-weight: 600; color: #57534E;
    cursor: pointer; transition: all 0.25s;
}
.pt-tab:hover { background: rgba(255,255,255,0.7); }
.pt-tab.active {
    background: rgba(96,165,250,0.25); border-color: rgba(96,165,250,0.4); color: #1E293B;
}
.pt-panel { display: none; flex-direction: column; gap: 14px; margin-top: 6px; }
.pt-panel.active { display: flex; }
.pt-loading {
    display: flex; align-items: center; gap: 10px;
    padding: 18px; border-radius: 14px; margin-bottom: 12px;
    background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.25);
    font-size: 0.88rem; color: #1E293B;
}
.pt-spinner {
    width: 18px; height: 18px; border-radius: 50%; flex: none;
    border: 3px solid rgba(96,165,250,0.2); border-top-color: rgba(96,165,250,0.8);
    animation: pt-spin 0.8s linear infinite;
}
@keyframes pt-spin { to { transform: rotate(360deg); } }
.pt-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.pt-list-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 10px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
    font-size: 0.84rem;
}
.pt-list-name {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1E293B;
}
.pt-btn-mini {
    width: 24px; height: 24px; border-radius: 8px; border: none;
    background: rgba(96,165,250,0.15); color: #1E293B; cursor: pointer;
    font-size: 0.75rem; line-height: 1; transition: all 0.2s; flex: none;
}
.pt-btn-mini:hover { background: rgba(96,165,250,0.35); }
.pt-preview-canvas { max-width: 100%; max-height: 260px; object-fit: contain; display: block; }
.pt-note { font-size: 0.82rem; color: #78716C; }
body.night .pt-loading { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.3); color: #E2E8F0; }
body.night .pt-tab { background: rgba(30,41,59,0.6); border-color: rgba(148,163,184,0.25); color: #94A3B8; }
body.night .pt-tab:hover { background: rgba(51,65,85,0.75); }
body.night .pt-tab.active { background: rgba(96,165,250,0.22); border-color: rgba(96,165,250,0.45); color: #BFDBFE; }
body.night .pt-list-row { background: rgba(30,41,59,0.4); border-color: rgba(148,163,184,0.2); }
body.night .pt-list-name { color: #E2E8F0; }
body.night .pt-btn-mini { background: rgba(96,165,250,0.18); color: #BFDBFE; }
body.night .pt-btn-mini:hover { background: rgba(96,165,250,0.4); }
body.night .pt-note { color: #94A3B8; }

/* ===== OCR 文字识别 (ocr-) ===== */
.ocr-container { display: flex; flex-direction: column; gap: 16px; }
.ocr-upload-zone {
    border: 2px dashed rgba(96,165,250,0.3);
    border-radius: 16px; padding: 36px 24px;
    text-align: center; cursor: pointer;
    background: rgba(255,255,255,0.3); backdrop-filter: blur(8px);
    transition: all 0.3s;
}
.ocr-upload-zone:hover, .ocr-upload-zone.drag-over { border-color: rgba(96,165,250,0.6); background: rgba(96,165,250,0.05); }
.ocr-upload-zone .ocr-icon { font-size: 2.5rem; margin-bottom: 8px; }
.ocr-upload-zone p { color: #78716C; font-size: 0.9rem; }
.ocr-preview-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ocr-thumb { width: 120px; height: 120px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.5); flex-shrink: 0; }
.ocr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ocr-progress-wrap { flex: 1; min-width: 180px; }
.ocr-progress-bar {
    height: 8px; border-radius: 4px; background: rgba(255,255,255,0.3); overflow: hidden;
}
.ocr-progress-fill {
    height: 100%; border-radius: 4px; background: rgba(167,139,250,0.5);
    width: 0%; transition: width 0.3s;
}
.ocr-status { font-size: 0.82rem; color: #78716C; margin-top: 4px; }
.ocr-result-textarea {
    width: 100%; min-height: 120px; padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.85rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; resize: vertical; outline: none; line-height: 1.6;
}
.ocr-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.ocr-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ocr-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.ocr-btn:active { transform: scale(0.95); }
.ocr-btn.ocr-btn-primary { background: rgba(96,165,250,0.2); border-color: rgba(96,165,250,0.3); }
.ocr-btn.ocr-btn-primary:hover { background: rgba(96,165,250,0.35); }
.ocr-btn.ocr-btn-danger { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); color: #DC2626; }
.ocr-btn.ocr-btn-danger:hover { background: rgba(239,68,68,0.2); }
.ocr-lang-select {
    padding: 6px 12px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.5);
    font-size: 0.85rem; color: #1E293B; outline: none;
}
/* ===== Markdown 编辑器 (md-) ===== */
.md-container { display: flex; flex-direction: column; gap: 12px; }
.md-editor-row { display: flex; gap: 12px; flex: 1; }
.md-pane { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.md-pane label { font-size: 0.85rem; font-weight: 600; color: #57534E; }
.md-textarea {
    width: 100%; min-height: 320px; padding: 14px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.85rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; resize: vertical; outline: none; line-height: 1.6;
}
.md-textarea:focus { border-color: rgba(167,139,250,0.5); }
.md-textarea::placeholder { color: #A8A29E; }
.md-preview {
    flex: 1; min-height: 320px; padding: 14px; overflow-y: auto;
    background: rgba(255,255,255,0.4); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5); border-radius: 12px;
    color: #1E293B; line-height: 1.7; font-size: 0.88rem;
    word-break: break-word;
}
.md-preview h1, .md-preview h2, .md-preview h3 { margin-top: 12px; margin-bottom: 6px; color: #1E293B; }
.md-preview h1 { font-size: 1.4rem; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 4px; }
.md-preview h2 { font-size: 1.2rem; }
.md-preview h3 { font-size: 1.05rem; }
.md-preview p { margin-bottom: 8px; }
.md-preview code { background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 4px; font-size: 0.82rem; }
.md-preview pre { background: rgba(0,0,0,0.05); padding: 12px 16px; border-radius: 10px; overflow-x: auto; margin-bottom: 8px; }
.md-preview pre code { background: none; padding: 0; }
.md-preview blockquote { border-left: 3px solid rgba(167,139,250,0.5); padding-left: 12px; color: #78716C; margin-bottom: 8px; }
.md-preview ul, .md-preview ol { padding-left: 20px; margin-bottom: 8px; }
.md-preview table { border-collapse: collapse; width: 100%; margin-bottom: 8px; }
.md-preview th, .md-preview td { border: 1px solid rgba(0,0,0,0.1); padding: 6px 10px; text-align: left; }
.md-preview th { background: rgba(0,0,0,0.03); }
.md-preview img { max-width: 100%; border-radius: 8px; }
.md-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.md-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.md-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.md-btn:active { transform: scale(0.95); }
.md-btn.md-btn-primary { background: rgba(167,139,250,0.2); border-color: rgba(167,139,250,0.3); }
.md-btn.md-btn-primary:hover { background: rgba(167,139,250,0.35); }
.md-cdn-error { text-align: center; padding: 40px 0; color: #DC2626; font-size: 0.9rem; }
@media (max-width: 700px) {
    .md-editor-row { flex-direction: column; }
}

/* ===== 密码生成器 (pw-) ===== */
.pw-container { display: flex; flex-direction: column; gap: 16px; }
.pw-display-row { display: flex; gap: 10px; align-items: center; }
.pw-display {
    flex: 1; padding: 12px 16px; border-radius: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 1.3rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); color: #1E293B;
    word-break: break-all; letter-spacing: 1px;
    text-align: center; min-height: 50px; display: flex; align-items: center; justify-content: center;
}
.pw-slider-row { display: flex; gap: 12px; align-items: center; }
.pw-slider-row label { font-size: 0.85rem; font-weight: 600; color: #57534E; white-space: nowrap; }
.pw-slider {
    flex: 1; min-width: 100px; -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 3px;
    background: rgba(167,139,250,0.2); outline: none;
}
.pw-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: rgba(167,139,250,0.6); cursor: pointer;
    border: 2px solid white; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.pw-slider-val { font-size: 1rem; font-weight: 700; color: #7C3AED; min-width: 36px; text-align: center; }
.pw-options { display: flex; gap: 16px; flex-wrap: wrap; }
.pw-option { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.88rem; color: #1E293B; }
.pw-option input[type=checkbox] { accent-color: #7C3AED; width: 16px; height: 16px; cursor: pointer; }
.pw-strength { font-size: 0.85rem; font-weight: 600; text-align: center; padding: 6px 0; }
.pw-strength.pw-weak { color: #DC2626; }
.pw-strength.pw-medium { color: #D97706; }
.pw-strength.pw-strong { color: #16A34A; }
.pw-strength.pw-very-strong { color: #7C3AED; }
.pw-btn {
    padding: 10px 28px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(167,139,250,0.2); backdrop-filter: blur(8px);
    font-size: 0.95rem; font-weight: 700; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    align-self: center;
}
.pw-btn:hover { background: rgba(167,139,250,0.35); transform: translateY(-1px); }
.pw-btn:active { transform: scale(0.95); }
.pw-copy-btn {
    padding: 8px 16px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.85rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}
.pw-copy-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.pw-copy-btn:active { transform: scale(0.95); }

/* ===== 文本差异对比 (df-) ===== */
.df-container { display: flex; flex-direction: column; gap: 14px; }
.df-textarea-row { display: flex; gap: 12px; }
.df-col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.df-col label { font-size: 0.85rem; font-weight: 600; color: #57534E; }
.df-textarea {
    width: 100%; height: 120px; padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.85rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; resize: vertical; outline: none; line-height: 1.5;
}
.df-textarea:focus { border-color: rgba(167,139,250,0.5); }
.df-textarea::placeholder { color: #A8A29E; }
.df-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.df-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.df-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.df-btn:active { transform: scale(0.95); }
.df-btn.df-btn-primary { background: rgba(167,139,250,0.2); border-color: rgba(167,139,250,0.3); }
.df-btn.df-btn-primary:hover { background: rgba(167,139,250,0.35); }
.df-result {
    padding: 14px 18px; border-radius: 12px;
    background: rgba(255,255,255,0.4); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5);
    font-size: 0.9rem; color: #1E293B; line-height: 1.7;
    min-height: 40px; word-break: break-word; white-space: pre-wrap;
}
.df-added { background: rgba(34,197,94,0.25); border-radius: 2px; padding: 1px 2px; }
.df-removed { background: rgba(239,68,68,0.2); border-radius: 2px; padding: 1px 2px; text-decoration: line-through; }
.df-unchanged { }
.df-identical { color: #16A34A; font-weight: 600; }
.df-cdn-error { text-align: center; padding: 40px 0; color: #DC2626; font-size: 0.9rem; }
@media (max-width: 600px) {
    .df-textarea-row { flex-direction: column; }
}

/* ===== Cron 表达式解析 (cr-) ===== */
.cr-container { display: flex; flex-direction: column; gap: 14px; }
.cr-input-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cr-input {
    flex: 1; min-width: 180px; padding: 10px 14px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.95rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; outline: none;
}
.cr-input:focus { border-color: rgba(167,139,250,0.5); }
.cr-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-preset {
    padding: 6px 14px; border-radius: 100px; border: 1px solid rgba(167,139,250,0.2);
    background: rgba(167,139,250,0.1); font-size: 0.8rem; cursor: pointer; color: #7C3AED;
    font-family: 'SF Mono', monospace; transition: all 0.2s;
}
.cr-preset:hover { background: rgba(167,139,250,0.2); }
.cr-description {
    padding: 12px 16px; border-radius: 12px;
    background: rgba(255,255,255,0.4); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5);
    font-size: 0.9rem; color: #1E293B; line-height: 1.5;
}
.cr-description-label { font-size: 0.82rem; font-weight: 600; color: #78716C; margin-bottom: 4px; }
.cr-schedule { display: flex; flex-direction: column; gap: 6px; }
.cr-schedule-label { font-size: 0.82rem; font-weight: 600; color: #78716C; }
.cr-schedule-item {
    padding: 8px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.4);
    font-family: 'SF Mono', monospace; font-size: 0.85rem; color: #1E293B;
}
.cr-error {
    padding: 10px 16px; border-radius: 10px;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
    color: #DC2626; font-size: 0.85rem;
}
.cr-cdn-error { text-align: center; padding: 40px 0; color: #DC2626; font-size: 0.9rem; }

/* ===== URL 编解码 (ue-) ===== */
.ue-container { display: flex; flex-direction: column; gap: 14px; }
.ue-textarea {
    width: 100%; min-height: 100px; padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.85rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); border-radius: 12px;
    color: #1E293B; resize: vertical; outline: none; line-height: 1.5;
}
.ue-textarea:focus { border-color: rgba(167,139,250,0.5); }
.ue-textarea::placeholder { color: #A8A29E; }
.ue-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.ue-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ue-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.ue-btn:active { transform: scale(0.95); }
.ue-btn.ue-btn-primary { background: rgba(96,165,250,0.2); border-color: rgba(96,165,250,0.3); }
.ue-btn.ue-btn-primary:hover { background: rgba(96,165,250,0.35); }
.ue-label { font-size: 0.85rem; font-weight: 600; color: #57534E; }
.ue-error { color: #DC2626; font-size: 0.85rem; }

/* ===== 随机数生成器 (rn-) ===== */
.rn-container { display: flex; flex-direction: column; gap: 20px; }
.rn-section {
    padding: 16px; border-radius: 14px;
    background: rgba(255,255,255,0.35); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5);
    display: flex; flex-direction: column; gap: 10px;
}
.rn-section-title { font-size: 0.95rem; font-weight: 700; color: #1E293B; }
.rn-display { display: flex; flex-direction: column; gap: 6px; }
.rn-result-item {
    display: flex; align-items: center; gap: 8px; padding: 6px 12px;
    border-radius: 8px; border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.3);
    font-family: 'SF Mono', monospace; font-size: 0.85rem; color: #1E293B;
}
.rn-result-item span { flex: 1; word-break: break-all; }
.rn-copy-btn {
    padding: 3px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.5);
    background: transparent; font-size: 0.78rem; cursor: pointer; color: #78716C;
    transition: all 0.2s; white-space: nowrap;
}
.rn-copy-btn:hover { background: rgba(255,255,255,0.5); color: #1E293B; }
.rn-input-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rn-input-row label { font-size: 0.82rem; font-weight: 600; color: #57534E; }
.rn-input {
    width: 80px; padding: 6px 10px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.5);
    font-family: 'SF Mono', monospace; font-size: 0.85rem; color: #1E293B; outline: none; text-align: center;
}
.rn-input:focus { border-color: rgba(167,139,250,0.5); }
.rn-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rn-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.rn-btn:active { transform: scale(0.95); }
.rn-btn.rn-btn-primary { background: rgba(96,165,250,0.2); border-color: rgba(96,165,250,0.3); }
.rn-btn.rn-btn-primary:hover { background: rgba(96,165,250,0.35); }
.rn-batch-row { display: flex; gap: 8px; align-items: center; }
.rn-batch-row label { font-size: 0.82rem; font-weight: 600; color: #57534E; white-space: nowrap; }

/* ===== 单位换算器 (uc-) ===== */
.uc-container { display: flex; flex-direction: column; gap: 14px; }
/* 自定义下拉框 */
.uc-custom-select {
    position: relative;
    display: inline-block;
}

.uc-custom-select__trigger {
    position: relative;
    padding: 10px 40px 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.8);
    background: linear-gradient(135deg, rgba(255,255,255,0.65), rgba(255,255,255,0.45));
    backdrop-filter: blur(12px);
    font-size: 0.9rem;
    color: #1E293B;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.uc-custom-select__trigger:hover {
    border-color: rgba(167,139,250,0.6);
    box-shadow: 0 2px 8px rgba(167,139,250,0.15);
}

.uc-custom-select__trigger::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #1E293B;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-top-color 0.3s;
}

.uc-custom-select.open .uc-custom-select__trigger {
    border-color: rgba(167,139,250,0.8);
    box-shadow: 0 0 0 3px rgba(167,139,250,0.12), 0 4px 12px rgba(167,139,250,0.2);
}

.uc-custom-select.open .uc-custom-select__trigger::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: #A78BFA;
}

.uc-custom-select__label {
    display: block;
    white-space: nowrap;
}

.uc-custom-select__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.75), rgba(255,255,255,0.55));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.uc-custom-select.open .uc-custom-select__dropdown {
    max-height: 300px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
}

.uc-custom-select__option {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.uc-custom-select__option:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.uc-custom-select__option:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.uc-custom-select__option:hover {
    background: rgba(167,139,250,0.15);
    color: #1E293B;
}

.uc-custom-select__option.selected {
    background: rgba(167,139,250,0.25);
    color: #6D28D9;
    font-weight: 600;
}

.uc-custom-select__option.selected:hover {
    background: rgba(167,139,250,0.35);
}

/* 滚动条样式 */
.uc-custom-select__dropdown::-webkit-scrollbar {
    width: 6px;
}

.uc-custom-select__dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.uc-custom-select__dropdown::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.3);
    border-radius: 3px;
}

.uc-custom-select__dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,0.5);
}

.uc-select-row { display: flex; gap: 10px; align-items: center; }
.uc-select-row label { font-size: 0.85rem; font-weight: 600; color: #57534E; white-space: nowrap; }
.uc-convert-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.uc-input {
    flex: 1; min-width: 100px; padding: 10px 14px; border-radius: 12px;
    font-family: 'SF Mono', monospace; font-size: 0.95rem;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7); color: #1E293B; outline: none;
}
.uc-input:focus { border-color: rgba(167,139,250,0.5); }
.uc-swap-btn {
    padding: 8px 14px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 1.1rem; cursor: pointer; color: #1E293B;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
}
.uc-swap-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.uc-swap-btn:active { transform: scale(0.95); }
.uc-result {
    padding: 16px 20px; border-radius: 14px;
    background: rgba(255,255,255,0.4); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5);
    font-size: 1.2rem; font-weight: 700; color: #1E293B; text-align: center;
    font-family: 'SF Mono', monospace;
}
.uc-result-label { font-size: 0.82rem; font-weight: 600; color: #78716C; }
.uc-result-placeholder { color: #A8A29E; font-weight: 400; }
.uc-rate-info {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
    font-size: 0.8rem;
    color: #78716C;
    text-align: center;
    font-weight: 500;
}

/* ===== 后台控制台 (console-) ===== */
.console-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(30, 41, 59, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.console-overlay.open { opacity: 1; }
.console-panel {
    position: relative;
    width: 400px; max-width: 92vw; max-height: 88vh;
    background: rgba(255, 250, 247, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.14), 0 4px 20px rgba(0,0,0,0.06);
    padding: 36px 32px 28px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    opacity: 0; transform: translateY(0) scale(0.9);
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.console-overlay.open .console-panel { opacity: 1; transform: translateY(0) scale(1); }
/* hidden 必须真正生效（类选择器的 display 会压过 UA 的 [hidden]，需强制隐藏） */
.console-panel[hidden] { display: none !important; }
/* 控制台集成页：毛玻璃大卡片（不占满屏，放得下内容即可） */
.console-panel--main {
    width: min(960px, 94vw);
    height: auto;
    max-height: 92vh;
    padding: 36px 44px 28px;
    text-align: left;
    align-items: stretch;
    gap: 20px;
    overflow-y: auto;
}
.console__head {
    display: flex; align-items: center; gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    flex-wrap: wrap;
}
.console__head .console__icon { font-size: 1.9rem; margin: 0; flex-shrink: 0; }
.console__head-text { flex: 1; min-width: 0; text-align: left; }
.console__head .console__title { text-align: left; }
.console__head .console__subtitle { margin: 0; text-align: left; }
.console__head .console__logout { margin: 0; flex-shrink: 0; }
.console__section { display: flex; flex-direction: column; gap: 12px; }
.console__section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 700; color: #1E293B;
    letter-spacing: -0.01em;
}
.console__refresh {
    margin-left: auto;
    padding: 5px 14px; border-radius: 100px;
    border: 1px solid rgba(167,139,250,0.3);
    background: rgba(167,139,250,0.12);
    font-size: 0.78rem; font-weight: 600; color: #7C3AED; cursor: pointer;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.console__refresh:hover { background: rgba(167,139,250,0.25); }
.console__refresh:disabled { opacity: 0.5; cursor: wait; }
.console__grid--checkin {
    grid-template-columns: repeat(2, minmax(200px, 320px));
    justify-content: center;
}
.console__grid--single {
    grid-template-columns: minmax(200px, 320px);
    justify-content: center;
}
.console__grid--servers { grid-template-columns: repeat(3, 1fr); }
.console__close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px; border-radius: 50%;
    border: none; background: transparent;
    font-size: 1.05rem; color: #78716C; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.console__close:hover {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px);
    color: #1E293B;
}
.console__icon { font-size: 2.6rem; margin-bottom: 2px; }
.console__title { font-size: 1.3rem; font-weight: 800; color: #1E293B; letter-spacing: -0.02em; }
.console__subtitle { font-size: 0.9rem; color: #78716C; margin-bottom: 8px; }
.console__field { width: 100%; }
.console__field input {
    width: 100%; padding: 13px 18px; font-size: 1rem;
    background: rgba(255,255,255,0.6); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.85); border-radius: 14px;
    color: #1E293B; outline: none; text-align: center;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.console__field input:focus { border-color: rgba(167,139,250,0.6); box-shadow: 0 0 0 3px rgba(167,139,250,0.15); }
.console__field input::placeholder { color: #A8A29E; }
.console__btn {
    width: 100%; padding: 13px 0; border-radius: 100px;
    border: 1px solid rgba(167,139,250,0.35);
    background: rgba(167,139,250,0.22); backdrop-filter: blur(8px);
    font-size: 1rem; font-weight: 700; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: inherit; margin-top: 4px;
}
.console__btn:hover { background: rgba(167,139,250,0.35); transform: translateY(-1px); }
.console__btn:active { transform: scale(0.97); }
.console__btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.console__msg {
    width: 100%; padding: 10px 14px; border-radius: 12px;
    font-size: 0.88rem; line-height: 1.5;
}
.console__msg:not([hidden]) { display: block; }
.console__msg--error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #DC2626; }
.console__msg--success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25); color: #16A34A; }
.console__grid {
    width: 100%; display: grid; gap: 16px;
    margin: 8px 0 4px;
}
.console-card {
    border: 1px solid rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(20px);
    border-radius: 20px; padding: 28px 16px;
    cursor: pointer; font-family: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
}
.console-card:hover {
    transform: translateY(-6px) scale(1.03);
    background: rgba(255,255,255,0.8); backdrop-filter: blur(24px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.09), 0 4px 16px rgba(0,0,0,0.04);
    border-color: rgba(255,255,255,0.95);
}
.console-card:active { transform: translateY(-2px) scale(0.98); }
.console-card__icon { font-size: 2rem; }
.console-card__name { font-size: 1rem; font-weight: 700; color: #1E293B; }
.console-card__desc { font-size: 0.82rem; color: #78716C; }
.console__logout {
    margin-top: 10px; padding: 8px 24px; border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.45);
    font-size: 0.85rem; font-weight: 600; color: #78716C; cursor: pointer;
    font-family: inherit; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.console__logout:hover { color: #DC2626; background: rgba(255,255,255,0.7); }

/* 面板切换入场动画 */
@keyframes consolePanelIn {
    0% { opacity: 0; transform: translateY(14px) scale(0.94); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.console-panel--entering { animation: consolePanelIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* 密码错误抖动 */
@keyframes consoleShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.console__field .shake { animation: consoleShake 0.45s ease-in-out; }

/* 服务器状态卡片 */
.server-card {
    border: 1px solid rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 18px;
    display: flex; flex-direction: column; gap: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.server-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.75);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
    border-color: rgba(255,255,255,0.95);
}
.server-card__head { display: flex; align-items: center; gap: 8px; }
.server-card__icon { font-size: 1.3rem; flex-shrink: 0; }
.server-card__name { font-size: 0.95rem; font-weight: 700; color: #1E293B; }
.server-card__status {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 600;
    white-space: nowrap;
}
.server-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.server-card__addr {
    font-size: 0.78rem; color: #A8A29E;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.server-card__btn {
    margin-top: auto;
    padding: 9px 0; border-radius: 100px;
    border: 1px solid rgba(167,139,250,0.3);
    background: rgba(167,139,250,0.15);
    font-size: 0.85rem; font-weight: 600; color: #1E293B; cursor: pointer;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.server-card__btn:hover { background: rgba(167,139,250,0.3); transform: translateY(-1px); }
.server-card__btn:active { transform: scale(0.97); }

/* 状态指示灯 */
.server-card__status--checking .server-dot { background: #A8A29E; animation: serverPulse 1.1s ease-in-out infinite; }
.server-card__status--checking .server-text { color: #A8A29E; }
.server-card__status--ok .server-dot { background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.server-card__status--ok .server-text { color: #16A34A; }
.server-card__status--warn .server-dot { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,0.18); }
.server-card__status--warn .server-text { color: #D97706; }
.server-card__status--down .server-dot { background: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }
.server-card__status--down .server-text { color: #DC2626; }
@keyframes serverPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* 导航栏设置按钮（沿用 navbar__link 胶囊样式） */
.navbar__btn-settings {
    border: none; background: transparent; cursor: pointer; font-family: inherit;
    line-height: 1.2; opacity: 0.7; font-size: 0.85em;
}
.navbar__btn-settings:hover { opacity: 1; }

/* ===== 工具顺序调整弹窗 ===== */
.tool-order-modal {
    position: fixed; inset: 0; z-index: 999999;
    background: rgba(30,41,59,0.7); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.tool-order-modal.open { opacity: 1; }
.tool-order-panel {
    position: relative; width: 90%; max-width: 560px; max-height: 85vh;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.95); border-radius: 24px;
    padding: 32px 28px 24px; box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    display: flex; flex-direction: column; gap: 20px;
    transform: scale(0.9); transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-order-modal.open .tool-order-panel { transform: scale(1); }
.tool-order__close {
    position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
    border: 1px solid rgba(120,113,108,0.3); border-radius: 50%;
    background: rgba(255,255,255,0.7); color: #78716C;
    font-size: 1rem; font-weight: 400; cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-order__close:hover {
    background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4);
    color: #DC2626; transform: rotate(90deg);
}
.tool-order__head { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tool-order__icon { font-size: 2.2rem; }
.tool-order__title { font-size: 1.3rem; font-weight: 700; color: #1E293B; margin: 0; }
.tool-order__subtitle { font-size: 0.88rem; color: #78716C; margin: 0; }
.tool-order__list {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
    padding: 8px 4px; min-height: 300px; max-height: 55vh;
}
.tool-order__list::-webkit-scrollbar { width: 6px; }
.tool-order__list::-webkit-scrollbar-track { background: rgba(255,255,255,0.3); border-radius: 3px; }
.tool-order__list::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.4); border-radius: 3px; }
.tool-order__list::-webkit-scrollbar-thumb:hover { background: rgba(167,139,250,0.6); }
.tool-order-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 14px;
    background: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.85);
    cursor: move; transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.tool-order-item:hover {
    background: rgba(255,255,255,0.95); border-color: rgba(167,139,250,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-2px);
}
.tool-order-item.dragging {
    opacity: 0.5; cursor: grabbing; transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.tool-order-item__handle {
    font-size: 1.1rem; color: #A8A29E; cursor: grab; flex-shrink: 0;
}
.tool-order-item__icon { font-size: 1.4rem; flex-shrink: 0; }
.tool-order-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-order-item__name { font-size: 0.92rem; font-weight: 600; color: #1E293B; }
.tool-order-item__desc {
    font-size: 0.78rem; color: #78716C;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tool-order__actions {
    display: flex; gap: 10px; align-items: center; padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.6);
}
.tool-order__actions-right { display: flex; gap: 10px; margin-left: auto; }
.tool-order__btn {
    padding: 10px 20px; border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    font-family: inherit; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-order__btn:hover { background: rgba(255,255,255,0.85); transform: translateY(-1px); }
.tool-order__btn:active { transform: scale(0.97); }
.tool-order__btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.tool-order__btn--primary {
    background: rgba(96,165,250,0.25); border-color: rgba(96,165,250,0.35);
}
.tool-order__btn--primary:hover { background: rgba(96,165,250,0.4); }
.tool-order__btn--secondary {
    background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3);
}
.tool-order__btn--secondary:hover { background: rgba(245,158,11,0.25); }
.tool-order__btn--cancel { color: #78716C; }
.tool-order__msg {
    padding: 10px 14px; border-radius: 12px; font-size: 0.88rem; line-height: 1.5;
    margin-top: -8px;
}
.tool-order__msg:not([hidden]) { display: block; }
.tool-order__msg--error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #DC2626; }
.tool-order__msg--success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25); color: #16A34A; }

@media (max-width:768px) {
    .console-panel--main { padding: 24px 20px; }
    .console__grid--servers { grid-template-columns: 1fr; }
    .console__grid--checkin { grid-template-columns: 1fr 1fr; }
    .tool-order-panel { width: 95%; max-height: 90vh; padding: 28px 20px 20px; }
    .tool-order__list { min-height: 250px; max-height: 50vh; }
    .tool-order__actions { flex-wrap: wrap; }
    .tool-order__actions-right { width: 100%; justify-content: flex-end; }
}
@media (max-width:480px) {
    .console-panel { padding: 28px 20px 22px; }
    .console-panel--main { width: 100%; height: 100vh; padding: 20px 16px; }
    .console__grid { gap: 12px; }
    .console__grid--checkin { grid-template-columns: 1fr; }
    .console-card { padding: 22px 12px; }
    .tool-order-panel { padding: 24px 16px 18px; }
    .tool-order-item { padding: 10px 12px; gap: 10px; }
    .tool-order-item__name { font-size: 0.88rem; }
    .tool-order-item__desc { font-size: 0.75rem; }
}

/* ===== 反馈浮窗（屏幕居中浮窗 + 全屏模糊遮罩）===== */
.feedback-overlay {
    position: fixed; inset: 0; z-index: 250;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30, 41, 59, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0; transition: opacity 0.3s ease;
}
.feedback-overlay.open { opacity: 1; }
.feedback-panel {
    position: relative;
    width: 420px; max-width: calc(100vw - 32px);
    background: rgba(255, 250, 247, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.14), 0 4px 20px rgba(0,0,0,0.06);
    padding: 22px 22px 20px;
    text-align: left;
    opacity: 0;
    transform: translateY(14px) scale(0.94);
    transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feedback-overlay.open .feedback-panel { opacity: 1; transform: translateY(0) scale(1); }
.feedback__header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px;
}
.feedback__title { font-size: 1.05rem; font-weight: 700; color: #1E293B; margin: 0; }
.feedback__close {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: transparent;
    font-size: 1rem; color: #78716C; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feedback__close:hover { background: rgba(255,255,255,0.7); color: #1E293B; }
.feedback__desc {
    font-size: 0.85rem; color: #78716C; line-height: 1.6;
    margin: 0 0 16px;
}
.feedback__field { margin-bottom: 12px; }
.feedback__field input,
.feedback__field textarea {
    width: 100%; box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: rgba(255,255,255,0.75);
    font-family: inherit; font-size: 0.9rem; color: #1E293B;
    outline: none; resize: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.feedback__field input::placeholder,
.feedback__field textarea::placeholder { color: #A8A29E; }
.feedback__field input:focus,
.feedback__field textarea:focus {
    border-color: #A78BFA; background: #fff;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}
.feedback__honeypot {
    position: absolute; left: -9999px; top: -9999px;
    width: 1px; height: 1px; overflow: hidden; opacity: 0;
}
.feedback__btn {
    width: 100%;
    padding: 12px 0;
    border: none; border-radius: 12px;
    background: linear-gradient(135deg, #A78BFA, #8B5CF6);
    color: #fff; font-family: inherit; font-size: 0.95rem; font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease, opacity 0.25s ease;
}
.feedback__btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(139, 92, 246, 0.42); }
.feedback__btn:active { transform: translateY(0) scale(0.98); }
.feedback__btn:disabled { opacity: 0.6; cursor: not-allowed; }
.feedback__msg {
    margin-top: 12px;
    padding: 9px 12px; border-radius: 10px;
    font-size: 0.85rem; line-height: 1.5;
}
.feedback__msg--error { background: rgba(220, 38, 38, 0.08); color: #DC2626; }
.feedback__msg--ok { background: rgba(16, 185, 129, 0.1); color: #059669; }

/* 导航栏反馈按钮（沿用 navbar__link 胶囊，气泡带一点强调色） */
.navbar__btn-feedback {
    border: none; background: transparent; cursor: pointer; font-family: inherit;
    line-height: 1.2; font-size: 0.85em; color: #8B5CF6;
}
.navbar__btn-feedback:hover {
    color: #7C3AED;
    background: rgba(167, 139, 250, 0.15);
    backdrop-filter: blur(12px);
}

@media (max-width:480px) {
    .feedback-panel { width: calc(100vw - 32px); max-width: none; }
}

/* ===== 彩蛋：樱花花瓣（连点 Logo 5 次触发） ===== */
.petal-layer {
    position: fixed; inset: 0;
    z-index: 240;
    pointer-events: none;
    overflow: hidden;
}
.petal {
    position: absolute;
    top: 0;
    border-radius: 100% 0 100% 0;   /* 花瓣尖角 */
    transform: rotate(-45deg);
    opacity: 0;
    box-shadow: 0 0 6px rgba(255, 182, 193, 0.35);
    will-change: transform, opacity;
}
/* 花瓣轨迹动画由 easter-egg.js 用 Web Animations API 驱动（21 点采样 + 引擎自动 lerp），此处无 CSS 动画 */
.petal-toast {
    position: fixed;
    left: 50%; top: 42%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 260;
    padding: 14px 28px;
    border-radius: 100px;
    background: rgba(255, 250, 247, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    color: #DB6A8B;
    font-size: 1rem; font-weight: 600;
    opacity: 0; pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.petal-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 鼠标互动：全屏星光/涟漪画布（pointer-events:none 不拦截任何点击），层级在正文之上、浮窗之下 */
.mouse-fx {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
}

/* 关于板块 · 联系方式（邮箱由 contact.js 运行时拼接展示，防爬虫抓取明文；点击=复制） */
.about__contact {
    display: flex;
    align-items: center;
    justify-content: center;   /* 整行居中 */
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 0;
    font-size: 0.95rem;
}
.about__contact-label { color: #888; }
.about__mail {
    color: #333;               /* 低调黑，不做成可点击的链接感 */
    word-break: break-all;
    cursor: default;
}
.about__copy {
    border: 1px solid rgba(139, 92, 246, 0.25);
    background: rgba(255, 255, 255, 0.55);
    color: #7C3AED;
    border-radius: 100px;
    padding: 2px 12px;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.about__copy:hover { background: rgba(237, 233, 254, 0.9); }
.about__copy--done { background: rgba(220, 252, 231, 0.8); color: #16A34A; border-color: rgba(22, 163, 74, 0.3); }

/* ===== ✦ 星空夜幕模式（body.night 覆盖块） =====
   现有样式全硬编码，此块追加在末尾，用「body.night + 原类」提升特异性覆盖，不重构原规则。
   深色基调：夜空底 #0B1026 / 玻璃 rgba(30,41,59,.55) / 面板 rgba(11,16,38,.92) /
   主文字 #E2E8F0 / 次级 #94A3B8 / 边框 rgba(148,163,184,.16) */

/* 基础 */
body.night {
    background-color: #0B1026;
    color: #E2E8F0;
    color-scheme: dark;
}
/* 夜间隐藏彩色光球：夜晚的「光」改由 starfield 的流星 + 萤火虫接管。
   用 opacity 而非 display:none——这样黑夜→白天能平滑淡入、且不破坏 orb 生命周期 */
body.night #orbContainer {
    opacity: 0;
}

/* 导航 / Hero */
body.night .navbar {
    background: rgba(11, 16, 38, 0.7);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.35);
}
body.night .navbar::after {
    background: linear-gradient(to bottom, rgba(11, 16, 38, 0.45), rgba(11, 16, 38, 0));
}
body.night .navbar__brand { color: #E2E8F0; }
body.night .navbar__link { color: #94A3B8; }
body.night .navbar__link:hover,
body.night .navbar__link.active {
    color: #E2E8F0;
    background: rgba(30, 41, 59, 0.55);
}
body.night .navbar__btn-feedback { color: #C4B5FD; }
body.night .navbar__btn-feedback:hover { color: #DDD6FE; background: rgba(139, 92, 246, 0.18); }
body.night .hero__title { color: #E2E8F0; }
body.night .hero__subtitle { color: #94A3B8; }

/* 毛玻璃卡片（hover/active 的 transform 保持原样不动，仅换底色与描边） */
body.night .glass-card {
    background: rgba(30, 41, 59, 0.55);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
}
body.night .glass-card:hover {
    background: rgba(51, 65, 85, 0.65);
    border-color: rgba(148, 163, 184, 0.28);
}
body.night .glass-card__title { color: #E2E8F0; }
body.night .glass-card__desc { color: #94A3B8; }

/* 关于 / 页脚 / Toast */
body.night .about__title { color: #E2E8F0; }
body.night .about__content { color: #94A3B8; }
body.night .about__tag {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(148, 163, 184, 0.16);
    color: #94A3B8;
}
body.night .about__contact-label { color: #94A3B8; }
body.night .about__mail { color: #E2E8F0; }
body.night .about__copy {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(139, 92, 246, 0.3);
    color: #C4B5FD;
}
body.night .about__copy:hover { background: rgba(139, 92, 246, 0.18); }
body.night .about__copy--done { background: rgba(22, 163, 74, 0.18); color: #4ADE80; border-color: rgba(74, 222, 128, 0.3); }
body.night .footer { color: #64748B; }
body.night .toast {
    background: rgba(11, 16, 38, 0.9);
    color: #E2E8F0;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

/* 弹窗面板（Modal / 反馈 / 控制台） */
body.night .modal-panel {
    background: rgba(11, 16, 38, 0.94);
    border-color: rgba(148, 163, 184, 0.16);
}
body.night .modal__header {
    background: rgba(11, 16, 38, 0.85);
    border-bottom-color: rgba(148, 163, 184, 0.16);
}
body.night .modal__title { color: #E2E8F0; }
body.night .modal__close { color: #94A3B8; }
body.night .modal__close:hover { background: rgba(51, 65, 85, 0.7); color: #E2E8F0; }
body.night .feedback-panel {
    background: rgba(11, 16, 38, 0.94);
    border-color: rgba(148, 163, 184, 0.16);
}
body.night .feedback__title { color: #E2E8F0; }
body.night .feedback__close { color: #94A3B8; }
body.night .feedback__close:hover { background: rgba(51, 65, 85, 0.7); color: #E2E8F0; }
body.night .feedback__desc { color: #94A3B8; }
body.night .feedback__field input,
body.night .feedback__field textarea {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.25);
    color: #E2E8F0;
}
body.night .feedback__field input:focus,
body.night .feedback__field textarea:focus { background: #1E293B; }
body.night .feedback__field input::placeholder,
body.night .feedback__field textarea::placeholder { color: #64748B; }
body.night .console-panel {
    background: rgba(11, 16, 38, 0.94);
    border-color: rgba(148, 163, 184, 0.16);
}
body.night .console__head { border-bottom-color: rgba(148, 163, 184, 0.16); }
body.night .console__title,
body.night .console__section-title { color: #E2E8F0; }
body.night .console__subtitle { color: #94A3B8; }
body.night .console__close { color: #94A3B8; }
body.night .console__close:hover { background: rgba(51, 65, 85, 0.7); color: #E2E8F0; }
body.night .console__field input {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.25);
    color: #E2E8F0;
}
body.night .console__field input:focus { background: #1E293B; }
body.night .console__field input::placeholder { color: #64748B; }
body.night .console__btn { color: #E2E8F0; }
body.night .console-card {
    background: rgba(30, 41, 59, 0.55);
    border-color: rgba(148, 163, 184, 0.16);
}
body.night .console-card:hover { background: rgba(51, 65, 85, 0.65); border-color: rgba(148, 163, 184, 0.28); }
body.night .console-card__name { color: #E2E8F0; }
body.night .console-card__desc { color: #94A3B8; }
body.night .console__logout {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(148, 163, 184, 0.2);
    color: #94A3B8;
}
body.night .console__refresh { color: #C4B5FD; }
body.night .server-card {
    background: rgba(30, 41, 59, 0.55);
    border-color: rgba(148, 163, 184, 0.16);
}
body.night .server-card:hover { background: rgba(51, 65, 85, 0.65); border-color: rgba(148, 163, 184, 0.28); }
body.night .server-card__addr { color: #94A3B8; }
body.night .server-card__btn { color: #E2E8F0; }
body.night .console__msg--error { color: #F87171; }
body.night .console__msg--success { color: #4ADE80; }

/* 工具模态框内部：泛型深色化 + 重申语义色 + 结果区深色 + label 浅灰 */
body.night .modal__body { color: #E2E8F0; }
body.night .modal__body label { color: #94A3B8; }
body.night .modal__body input,
body.night .modal__body textarea,
body.night .modal__body select {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.25);
    color: #E2E8F0;
}
body.night .modal__body input::placeholder,
body.night .modal__body textarea::placeholder { color: #64748B; }
body.night .modal__body input:focus,
body.night .modal__body textarea:focus,
body.night .modal__body select:focus { background: #1E293B; }
body.night .modal__body button {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.25);
    color: #E2E8F0;
}
body.night .modal__body button:hover { background: rgba(51, 65, 85, 0.75); }

/* 重申语义色：danger 红 / primary 紫（泛型 button 覆盖会吞掉它们） */
body.night .modal__body .jt-btn.jt-btn-danger,
body.night .modal__body .ocr-btn.ocr-btn-danger,
body.night .modal__body .jt-btn-danger {
    color: #F87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}
body.night .modal__body .jt-btn.jt-btn-primary {
    color: #C4B5FD;
    background: rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.35);
}

/* 结果展示区（深色卡片）；二维码区保持白底以保可扫码 */
body.night .modal__body .jt-output,
body.night .modal__body .rx-result {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(148, 163, 184, 0.2);
    color: #E2E8F0;
}
body.night .modal__body .rx-result mark { background: rgba(251, 146, 60, 0.35); color: #FED7AA; }
body.night .modal__body .md-preview { color: #E2E8F0; }
body.night .modal__body .md-preview h1,
body.night .modal__body .md-preview h2,
body.night .modal__body .md-preview h3 { color: #E2E8F0; border-bottom-color: rgba(148, 163, 184, 0.2); }
body.night .modal__body .md-preview code { background: rgba(0, 0, 0, 0.35); }
body.night .modal__body .md-preview pre { background: rgba(0, 0, 0, 0.3); }
body.night .modal__body .md-preview blockquote { color: #94A3B8; }
body.night .modal__body .md-preview th,
body.night .modal__body .md-preview td { border-color: rgba(148, 163, 184, 0.2); }
body.night .modal__body .md-preview th { background: rgba(148, 163, 184, 0.08); }
body.night .modal__body .qr-canvas-wrap { background: #fff; }   /* ⚠️ 例外：二维码区保持白底 */
body.night .petal-toast {
    background: rgba(11, 16, 38, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
}

/* ===== 新增控件 ===== */

/* 星尘画布：画在 body 背景之上、正文内容之下（负 z-index），不拦截点击 */
.starfield {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* 节日彩蛋层与飘落元素（层级在正文之上、反馈浮窗之下） */
.festival-layer {
    position: fixed;
    inset: 0;
    z-index: 240;
    pointer-events: none;
    overflow: hidden;
}
.festival-fall {
    position: absolute;
    top: 0;
    opacity: 0;
    will-change: transform, left;
    user-select: none;
    pointer-events: none;
    line-height: 1;
}
/* 无 WAAPI 老浏览器的降级下落动画（festival.js 兜底用） */
@keyframes festivalFallCss {
    0%   { opacity: 0; transform: translateY(-10vh) rotate(0deg) translateX(0); }
    8%   { opacity: 1; }
    30%  { transform: translateY(25vh) rotate(50deg) translateX(8px); }
    60%  { transform: translateY(60vh) rotate(110deg) translateX(-10px); }
    100% { opacity: 0.9; transform: translateY(110vh) rotate(180deg) translateX(4px); }
}

/* 生日当天专属提示：festival.js 检测到生日会给 body 挂 festival-birthday class，平时隐藏 */
.about__birthday {
    display: none;
    margin-top: 14px;
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #FFE8EF, #FFF3CC);
    border: 1px solid rgba(244, 114, 182, 0.35);
    color: #BE185D;
    align-self: center;
}
body.festival-birthday .about__birthday { display: inline-block; }
body.night .about__birthday {
    background: linear-gradient(135deg, rgba(255, 112, 150, 0.22), rgba(255, 200, 90, 0.16));
    border-color: rgba(251, 146, 210, 0.35);
    color: #F9A8D4;
}

/* 主题切换按钮（沿用 navbar__link 胶囊样式） */
.navbar__btn-theme {
    border: none; background: transparent; cursor: pointer; font-family: inherit;
    line-height: 1.2; font-size: 0.9em; opacity: 0.9;
}
.navbar__btn-theme:hover { opacity: 1; }

/* 重置排序按钮（「关于」区低调胶囊，亮暗各一份） */
.about__reset {
    display: inline-block;
    margin-top: 18px;
    padding: 6px 18px;
    border-radius: 100px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.4);
    color: #78716C;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.about__reset:hover { background: rgba(255, 255, 255, 0.7); color: #1E293B; }
body.night .about__reset {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(148, 163, 184, 0.2);
    color: #94A3B8;
}
body.night .about__reset:hover { background: rgba(51, 65, 85, 0.7); color: #E2E8F0; }

/* ===== 时间氛围组：时段问候 + 农历节气角 + 黄昏渐变 ===== */

/* 时段问候（hero 每日一言上方，ambient.js 按小时填充，淡紫色小字） */
.hero__greeting {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #A78BFA;
}
body.night .hero__greeting { color: #C4B5FD; }

/* 页脚农历节气角（lunar.js 填充） */
.footer__lunar {
    margin-top: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: #A8A29E;
}
body.night .footer__lunar { color: #64748B; }

/* 页脚 ICP 备案号 */
.footer__icp {
    margin-top: 8px;
    font-size: 0.82rem;
    color: #A8A29E;
}
.footer__icp a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.footer__icp a:hover { color: #F59E0B; }
body.night .footer__icp { color: #64748B; }
body.night .footer__icp a:hover { color: #FBBF24; }

/* 黄昏渐变：主题切换瞬间 body 挂上此 class，后代背景/文字 0.35s 平滑过渡
   （只保留 background-color + color：毛玻璃 backdrop-filter 元素多，过渡属性越少每帧重绘越轻；box-shadow/border-color 已去掉）
   0.85s 后 JS 移除 class，日常 hover/focus 的颜色动画不受影响（transform 不参与，卡片入场/浮窗动画不破坏） */
body.theme-transition,
body.theme-transition * {
    transition: background-color 0.35s ease, color 0.35s ease !important;
}

/* 光球容器有自己的淡入淡出时序，主题通配过渡规则不接管它（否则 opacity 过渡会被 color 过渡覆盖而瞬变）：
   只过渡 opacity 一个属性，0.5s 延迟正好压住"先光球后背景"，0.8s 时长让光球柔和慢速浮现；
   白天→黑夜：随背景同步快速淡出；黑夜→白天：等背景渐变完之后再慢慢淡入 */
body.theme-transition.night #orbContainer,
body.theme-transition.night #orbContainer * {
    transition: opacity 0.35s ease !important;
}
body.theme-transition:not(.night) #orbContainer,
body.theme-transition:not(.night) #orbContainer * {
    transition: opacity 0.8s ease 0.5s !important;
}

/* ===== 微光交互（v63 新增）===== */

/* 选中文字：星空紫（白天深紫底 / 夜晚浅紫底） */
::selection { background: rgba(167, 139, 250, 0.30); color: #4C1D95; }
body.night ::selection { background: rgba(196, 181, 253, 0.25); color: #EDE9FE; }

/* 阳光光斑：白天 3 道柔光缓缓飘移（纯 CSS keyframes；夜晚 display:none 交给 starfield 的星空） */
.sunbeam-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sunbeam {
    position: absolute;
    top: -18%;
    height: 135vh;
    width: 26vw;
    transform-origin: top center;
    opacity: 0;
    background: linear-gradient(90deg, rgba(255, 238, 190, 0) 0%, rgba(255, 238, 190, 0.14) 50%, rgba(255, 238, 190, 0) 100%);
    filter: blur(22px);
}
.sunbeam--1 { left: 6%;  animation: sunbeamDrift1 24s ease-in-out infinite; }
.sunbeam--2 { left: 40%; width: 20vw; animation: sunbeamDrift2 31s ease-in-out infinite 3s; }
.sunbeam--3 { left: 68%; width: 30vw; animation: sunbeamDrift3 27s ease-in-out infinite 8s; }
@keyframes sunbeamDrift1 {
    0%   { transform: rotate(-5deg) translateX(-20px); opacity: 0; }
    10%  { opacity: 0.9; }
    45%  { opacity: 0.45; }
    60%  { opacity: 0.75; }
    90%  { opacity: 0; }
    100% { transform: rotate(7deg) translateX(40px); opacity: 0; }
}
@keyframes sunbeamDrift2 {
    0%   { transform: rotate(4deg) translateX(15px); opacity: 0; }
    8%   { opacity: 0.8; }
    40%  { opacity: 0.4; }
    55%  { opacity: 0.7; }
    88%  { opacity: 0; }
    100% { transform: rotate(-6deg) translateX(-35px); opacity: 0; }
}
@keyframes sunbeamDrift3 {
    0%   { transform: rotate(6deg) translateX(-10px); opacity: 0; }
    12%  { opacity: 0.85; }
    50%  { opacity: 0.5; }
    65%  { opacity: 0.7; }
    92%  { opacity: 0; }
    100% { transform: rotate(-7deg) translateX(30px); opacity: 0; }
}
body.night .sunbeam-layer { display: none; }

/* 卡片光标微光跟随（--gx/--gy 由 micro-glow.js 喂，跟随鼠标的柔光；::after 画在卡片内容之上，alpha 低不会糊字） */
.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(150px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.25), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.glass-card:hover::after { opacity: 1; }
body.night .glass-card::after {
    background: radial-gradient(150px circle at var(--gx, 50%) var(--gy, 50%), rgba(165, 180, 252, 0.14), transparent 70%);
}

/* ===== 图片工坊（iw-）独立整页 =====
   三栏工作台：左工具+面板 / 中画布 / 右导出，底部状态栏。
   复用 ic-btn / ic-slider / ic-slider-locked 已有的夜间覆盖，本段自带 body.night 块。 */

/* ---- 顶栏 ---- */
.iw-topbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; gap: 16px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.65); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.7);
}
.iw-title { margin: 0; font-size: 1.15rem; font-weight: 800; color: #1E293B; }
.iw-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.iw-file-badge {
    max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 0.78rem; color: #78716C;
    padding: 4px 12px; border-radius: 100px;
    background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.25);
}
.iw-btn {
    padding: 8px 20px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.55); backdrop-filter: blur(8px);
    font-size: 0.88rem; font-weight: 600; color: #1E293B; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.iw-btn:hover { background: rgba(255,255,255,0.8); transform: translateY(-1px); }
.iw-btn:active { transform: scale(0.95); }
.iw-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.iw-btn.iw-btn-primary { background: rgba(96,165,250,0.2); border-color: rgba(96,165,250,0.35); }
.iw-btn.iw-btn-primary:hover:not(:disabled) { background: rgba(96,165,250,0.35); }
.iw-btn.iw-btn-back { white-space: nowrap; }
.iw-btn.iw-btn-theme { width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; }
.iw-btn.iw-btn-mini { padding: 5px 14px; font-size: 0.8rem; }
.iw-btn.iw-export-btn { width: 100%; padding: 12px 20px; font-size: 0.95rem; }

/* ---- 三栏主体 ---- */
.iw-main {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 300px 1fr 270px;
    gap: 20px; align-items: start;
    max-width: 1500px; margin: 0 auto;
    padding: 20px 24px 90px;
    min-height: calc(100vh - 66px);
}
.iw-side { display: flex; flex-direction: column; gap: 14px; }
.iw-tools { display: flex; flex-direction: column; gap: 6px; }
.iw-tool {
    width: 100%; text-align: left;
    padding: 10px 16px; border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.45);
    font-size: 0.9rem; font-weight: 600; color: #57534E; cursor: pointer;
    transition: all 0.25s;
}
.iw-tool:hover { background: rgba(255,255,255,0.7); color: #1E293B; }
.iw-tool.active {
    background: rgba(167,139,250,0.16); border-color: rgba(167,139,250,0.4); color: #6D28D9;
}
.iw-panel {
    display: flex; flex-direction: column; gap: 14px;
    padding: 16px; border-radius: 16px;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7);
}
.iw-panel-group { display: flex; flex-direction: column; gap: 12px; }
.iw-panel-hint { margin: 0; font-size: 0.8rem; line-height: 1.5; color: #78716C; }
.iw-up-info { display: flex; flex-direction: column; gap: 4px; }
.iw-up-name { margin: 0; font-size: 0.9rem; font-weight: 700; color: #1E293B; word-break: break-all; }
.iw-info { margin: 0; font-size: 0.8rem; color: #78716C; line-height: 1.5; }

/* 表单域（面板 + 导出栏共用） */
.iw-field {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 0.85rem; font-weight: 600; color: #57534E;
}
.iw-field select, .iw-field input[type=number] {
    padding: 7px 12px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.5);
    font-size: 0.85rem; color: #1E293B; outline: none;
}
.iw-field select { width: 100%; }
.iw-num { width: 100%; }
.iw-val { float: right; color: #7C3AED; font-weight: 700; font-variant-numeric: tabular-nums; }
.iw-field input[type=color] {
    width: 100%; height: 34px; padding: 2px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.5); cursor: pointer;
}
.iw-field input[type=text], .iw-field input[type=file] {
    width: 100%; padding: 8px 12px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.5);
    font-size: 0.85rem; color: #1E293B; outline: none; box-sizing: border-box;
}
.iw-field input[type=file] { font-size: 0.75rem; }

/* ---- 中：画布 ---- */
.iw-stage {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 20px; border-radius: 16px;
    background: rgba(255,255,255,0.4); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
    min-height: 480px;
}
.iw-dropzone {
    width: 100%; box-sizing: border-box;
    border: 2px dashed rgba(167,139,250,0.35);
    border-radius: 16px; padding: 60px 24px;
    text-align: center; cursor: pointer;
    background: rgba(255,255,255,0.25);
    transition: all 0.3s;
}
.iw-dropzone:hover, .iw-dropzone.drag-over {
    border-color: rgba(167,139,250,0.65); background: rgba(167,139,250,0.06);
}
.iw-dropzone p { margin: 0; color: #57534E; font-size: 0.95rem; font-weight: 600; }
.iw-dropzone .iw-sub { margin-top: 6px; font-size: 0.78rem; font-weight: 400; color: #78716C; }
.iw-dropzone .iw-icon { font-size: 3rem; margin-bottom: 10px; }
.iw-canvas-wrap {
    position: relative; display: inline-flex; max-width: 100%;
}
#iwCanvas {
    max-width: 100%; max-height: 68vh; height: auto; display: block;
    border-radius: 12px; box-shadow: 0 6px 24px -10px rgba(0,0,0,0.2);
}
.iw-crop-overlay { position: absolute; pointer-events: none; }
.iw-crop-dim { position: absolute; background: rgba(0,0,0,0.4); box-sizing: border-box; }
.iw-crop-sel {
    position: absolute; box-sizing: border-box;
    border: 1px dashed #fff; outline: 1px solid rgba(0,0,0,0.45);
    background: rgba(255,255,255,0.08);
}
.iw-empty-tip { font-size: 0.85rem; color: #78716C; }

/* ---- 右：导出 ---- */
.iw-export {
    display: flex; flex-direction: column; gap: 14px;
    padding: 16px; border-radius: 16px;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.7);
    position: sticky; top: 76px;
}
.iw-export-title { margin: 0; font-size: 1rem; font-weight: 800; color: #1E293B; }
.iw-export-note {
    min-height: 1.15em; line-height: 1.15em; font-size: 0.72rem;
    color: #DC2626; font-weight: 500;
    visibility: hidden; /* 隐藏时仍占一行，导出栏高度稳定 */
}
.iw-size-compare {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 0.8rem; color: #57534E;
    padding: 8px 10px; border-radius: 10px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
}
.iw-size-compare b { color: #1E293B; font-variant-numeric: tabular-nums; }
.iw-size-arrow { color: #94A3B8; }
.iw-size-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.iw-size-delta-good { color: #16A34A; }
.iw-size-delta-bad { color: #DC2626; }

.iw-export-preview {
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.5);
}
.iw-export-preview-img {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(148,163,184,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.iw-export-preview-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.iw-export-preview-info {
    margin: 8px 0 0 0;
    font-size: 0.75rem;
    color: #57534E;
    text-align: center;
}

/* ---- 底部状态栏 ---- */
.iw-statusbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 24px;
    background: rgba(255,255,255,0.7); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.7);
    font-size: 0.8rem; color: #78716C;
}
.iw-statusbar-spacer { flex: 1; }

/* ---- 面板内细分控件 ---- */
.iw-crop-nums {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.iw-crop-nums label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.8rem; font-weight: 600; color: #57534E;
}
.iw-crop-nums .iw-num { flex: 1; min-width: 0; padding: 6px 8px; }
.iw-rot-btns { display: flex; flex-direction: column; gap: 8px; }
.iw-rot-btns .iw-btn { width: 100%; }
.iw-tabs { display: flex; gap: 8px; }
.iw-tab {
    flex: 1; padding: 8px 0; border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.4);
    font-size: 0.85rem; font-weight: 600; color: #57534E; cursor: pointer;
    transition: all 0.25s;
}
.iw-tab.active { background: rgba(167,139,250,0.16); border-color: rgba(167,139,250,0.4); color: #6D28D9; }
.iw-format-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.iw-format-btn {
    flex: 1; min-width: 48px; padding: 8px 6px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.4);
    font-size: 0.8rem; font-weight: 700; color: #57534E; cursor: pointer;
    transition: all 0.25s;
}
.iw-format-btn:hover:not(:disabled) { background: rgba(255,255,255,0.7); color: #1E293B; }
.iw-format-btn.active { background: rgba(96,165,250,0.22); border-color: rgba(96,165,250,0.4); color: #1D4ED8; }
.iw-format-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.iw-comp-result {
    display: flex; flex-direction: column; gap: 8px;
    padding: 10px; border-radius: 12px;
    border: 1px solid rgba(167,139,250,0.3); background: rgba(255,255,255,0.3);
}
.iw-comp-thumb {
    display: flex; align-items: center; justify-content: center;
    min-height: 80px; max-height: 200px; overflow: hidden; border-radius: 8px;
    background: rgba(255,255,255,0.35);
}
.iw-comp-thumb img { max-width: 100%; max-height: 200px; object-fit: contain; display: block; }

/* ---- 夜间覆盖 ---- */
body.night .iw-topbar { background: rgba(11,16,38,0.7); border-bottom-color: rgba(148,163,184,0.12); }
body.night .iw-title { color: #E2E8F0; }
body.night .iw-file-badge { background: rgba(139,92,246,0.16); border-color: rgba(139,92,246,0.3); color: #C4B5FD; }
body.night .iw-btn { background: rgba(30,41,59,0.55); border-color: rgba(148,163,184,0.16); color: #E2E8F0; }
body.night .iw-btn:hover:not(:disabled) { background: rgba(51,65,85,0.65); }
body.night .iw-btn.iw-btn-primary { background: rgba(96,165,250,0.16); border-color: rgba(96,165,250,0.3); }
body.night .iw-btn.iw-btn-primary:hover:not(:disabled) { background: rgba(96,165,250,0.28); }
body.night .iw-panel, body.night .iw-export { background: rgba(30,41,59,0.55); border-color: rgba(148,163,184,0.16); }
body.night .iw-stage { background: rgba(30,41,59,0.4); border-color: rgba(148,163,184,0.14); }
body.night .iw-dropzone { background: rgba(30,41,59,0.3); }
body.night .iw-dropzone p { color: #E2E8F0; }
body.night .iw-dropzone .iw-sub { color: #94A3B8; }
body.night .iw-tool { background: rgba(30,41,59,0.4); border-color: rgba(148,163,184,0.14); color: #94A3B8; }
body.night .iw-tool:hover { background: rgba(51,65,85,0.55); color: #E2E8F0; }
body.night .iw-tool.active { background: rgba(139,92,246,0.18); border-color: rgba(139,92,246,0.4); color: #C4B5FD; }
body.night .iw-panel-hint, body.night .iw-info, body.night .iw-empty-tip { color: #94A3B8; }
body.night .iw-up-name, body.night .iw-export-title { color: #E2E8F0; }
body.night .iw-field { color: #94A3B8; }
body.night .iw-field select, body.night .iw-field input[type=number],
body.night .iw-field input[type=text], body.night .iw-field input[type=file],
body.night .iw-field input[type=color] {
    background: rgba(30,41,59,0.6); border-color: rgba(255,255,255,0.15); color: #E2E8F0;
}
body.night .iw-val { color: #C4B5FD; }
body.night .iw-crop-nums label { color: #94A3B8; }
body.night .iw-tab { background: rgba(30,41,59,0.4); border-color: rgba(148,163,184,0.14); color: #94A3B8; }
body.night .iw-tab.active { background: rgba(139,92,246,0.18); border-color: rgba(139,92,246,0.4); color: #C4B5FD; }
body.night .iw-format-btn { background: rgba(30,41,59,0.4); border-color: rgba(148,163,184,0.14); color: #94A3B8; }
body.night .iw-format-btn:hover:not(:disabled) { background: rgba(51,65,85,0.6); color: #E2E8F0; }
body.night .iw-format-btn.active { background: rgba(96,165,250,0.2); border-color: rgba(96,165,250,0.35); color: #93C5FD; }
body.night .iw-comp-result { background: rgba(30,41,59,0.45); border-color: rgba(139,92,246,0.25); }
body.night .iw-comp-thumb { background: rgba(30,41,59,0.5); }
body.night .iw-size-compare { background: rgba(30,41,59,0.45); border-color: rgba(148,163,184,0.14); color: #94A3B8; }
body.night .iw-size-compare b { color: #E2E8F0; }
body.night .iw-size-delta-good { color: #4ADE80; }
body.night .iw-size-delta-bad { color: #F87171; }
body.night .iw-export-preview { background: rgba(30,41,59,0.45); border-color: rgba(148,163,184,0.14); }
body.night .iw-export-preview-img { background: rgba(148,163,184,0.08); }
body.night .iw-export-preview-info { color: #94A3B8; }
body.night .iw-statusbar { background: rgba(11,16,38,0.75); border-top-color: rgba(148,163,184,0.12); color: #94A3B8; }
body.night .iw-export-note { color: #F87171; }
