@font-face {
    font-family: 'Material Icons Round';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/material-icons-round.woff2') format('woff2');
}
.material-icons-round {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}
:root {
    --page-bg: #EEF3FC;
    --page-card: rgba(255, 255, 255, 0.72);
    --page-border: rgba(15, 23, 42, 0.08);
    --tg-primary: #3B6FE0;
    --tg-on-primary: #FFFFFF;
    --tg-primary-container: rgba(59, 111, 224, 0.12);
    --tg-on-primary-container: #1E3A8A;
    --tg-secondary-container: rgba(59, 111, 224, 0.08);
    --tg-on-secondary-container: #2E5BC4;
    --tg-surface: #FFFFFF;
    --tg-surface-low: #EEF3FC;
    --tg-surface-container: #F0F5FF;
    --tg-surface-high: #E4ECF9;
    --tg-on-surface: #1A2233;
    --tg-on-surface-variant: #5A6B8C;
    --tg-outline: #7C8AA8;
    --tg-outline-variant: #D3DCEB;
    --tg-error: #D64545;
    --hero-title-color: #3B6FE0;
    --chip-bg: rgba(59, 111, 224, 0.1);
    --chip-text: #2E5BC4;
    --tool-bg: rgba(15, 23, 42, 0.045);
    --tool-text: #1A2233;
    --legend-bg: rgba(15, 23, 42, 0.05);
    --legend-text: #5A6B8C;
    --taskbar-bg: rgba(255, 255, 255, 0.78);
    --taskbar-text: #5A6B8C;
    --taskbar-active-text: #1A2233;
    --taskbar-active-bg: rgba(59, 111, 224, 0.14);
    --btn-fill-bg: linear-gradient(135deg, #3B6FE0, #22A3E6);
    --btn-fill-text: #FFFFFF;
    --btn-outline-border: rgba(26, 34, 51, 0.22);
    --btn-outline-text: #2E5BC4;
    --divider-color: rgba(26, 34, 51, 0.08);
    --state-layer: rgba(59, 111, 224, 0.4);
    --accent: #22A3E6;
    --glow: rgba(59, 111, 224, 0.28);
    --page-bg-image: radial-gradient(circle at 15% 8%, rgba(59, 111, 224, 0.1), transparent 42%),
                     radial-gradient(circle at 88% 82%, rgba(34, 211, 238, 0.07), transparent 40%),
                     linear-gradient(180deg, #F7FAFF 0%, #EEF3FC 100%);
    --lk-quark: #2E6BE6; --lk-quark-bg: rgba(46, 107, 230, 0.1); --lk-quark-text: #1E56C4;
    --lk-xunlei: #E2682E; --lk-xunlei-bg: rgba(226, 104, 46, 0.1); --lk-xunlei-text: #B84E17;
    --lk-code: #0FA872; --lk-code-bg: rgba(15, 168, 114, 0.1); --lk-code-text: #087852;
    --lk-text: #7C5CE0; --lk-text-bg: rgba(124, 92, 224, 0.1); --lk-text-text: #5B3FB8;
    --lk-web: #0891B2; --lk-web-bg: rgba(8, 145, 178, 0.1); --lk-web-text: #06698A;
    --ease: cubic-bezier(0.2, 0, 0, 1);
    --sh1: 0 1px 2px rgba(26, 34, 51, 0.05), 0 1px 3px rgba(26, 34, 51, 0.06);
    --sh2: 0 4px 14px rgba(26, 34, 51, 0.06), 0 1px 4px rgba(26, 34, 51, 0.05);
    --sh3: 0 10px 30px rgba(26, 34, 51, 0.1), 0 4px 12px rgba(26, 34, 51, 0.05);
    --sh4: 0 16px 44px rgba(2, 6, 18, 0.22), 0 6px 16px rgba(2, 6, 18, 0.1);
    --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px; --r-2xl: 26px; --r-full: 9999px;
}
html.dark-mode {
    --page-bg: #0B0F1A;
    --page-card: rgba(255, 255, 255, 0.05);
    --page-border: rgba(255, 255, 255, 0.09);
    --tg-on-surface: #E8EDF7;
    --tg-on-surface-variant: rgba(232, 237, 247, 0.66);
    --hero-title-color: #7BA3F5;
    --chip-bg: rgba(123, 163, 245, 0.18);
    --chip-text: #A9C3F7;
    --tool-bg: rgba(255, 255, 255, 0.05);
    --tool-text: #E8EDF7;
    --legend-bg: rgba(255, 255, 255, 0.06);
    --legend-text: rgba(232, 237, 247, 0.62);
    --taskbar-bg: rgba(11, 15, 26, 0.82);
    --taskbar-text: rgba(232, 237, 247, 0.6);
    --taskbar-active-text: #E8EDF7;
    --taskbar-active-bg: rgba(123, 163, 245, 0.2);
    --btn-fill-bg: linear-gradient(135deg, #3B6FE0, #22D3EE);
    --btn-fill-text: #FFFFFF;
    --btn-outline-border: rgba(232, 237, 247, 0.24);
    --btn-outline-text: #C7D3EA;
    --divider-color: rgba(255, 255, 255, 0.08);
    --state-layer: rgba(123, 163, 245, 0.35);
    --accent: #4DD6FF;
    --glow: rgba(59, 111, 224, 0.38);
    --page-bg-image: radial-gradient(circle at 15% 8%, rgba(59, 111, 224, 0.2), transparent 45%),
                     radial-gradient(circle at 85% 78%, rgba(34, 211, 238, 0.1), transparent 42%),
                     linear-gradient(180deg, #0B0F1A 0%, #10182B 55%, #0B1220 100%);
    --lk-quark: #4C8DFF; --lk-quark-bg: rgba(76, 141, 255, 0.14); --lk-quark-text: #9CC0FF;
    --lk-xunlei: #FF8A3D; --lk-xunlei-bg: rgba(255, 138, 61, 0.14); --lk-xunlei-text: #FFC299;
    --lk-code: #34D399; --lk-code-bg: rgba(52, 211, 153, 0.14); --lk-code-text: #8BE5C3;
    --lk-text: #A78BFA; --lk-text-bg: rgba(167, 139, 250, 0.14); --lk-text-text: #CDBFFE;
    --lk-web: #22D3EE; --lk-web-bg: rgba(34, 211, 238, 0.14); --lk-web-text: #8FE3F5;
    --tg-primary: #3B6FE0;
    --tg-on-primary: #FFFFFF;
    --tg-primary-container: rgba(59, 111, 224, 0.16);
    --tg-on-primary-container: #A9C3F7;
    --tg-secondary-container: rgba(123, 163, 245, 0.12);
    --tg-on-secondary-container: #C7D3EA;
    --tg-surface: #10182B;
    --tg-surface-low: #0B0F1A;
    --tg-surface-container: rgba(255, 255, 255, 0.04);
    --tg-surface-high: rgba(255, 255, 255, 0.08);
    --tg-outline: #8A97B3;
    --tg-outline-variant: rgba(255, 255, 255, 0.2);
    --tg-error: #F87171;
    --sh1: 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.24);
    --sh2: 0 4px 14px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.2);
    --sh3: 0 10px 30px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.22);
    --sh4: 0 16px 44px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: clamp(14px, 1.1vw + 10px, 17px); scroll-behavior: smooth; }
body {
    font-family: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    color: var(--tg-on-surface);
    background-image: var(--page-bg-image, none);
    background-color: var(--page-bg, var(--tg-surface-low));
    background-attachment: fixed;
    transition: background-color 0.5s, color 0.3s;
}

.splash-screen {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--tg-surface-low);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.5s;
}
.splash-screen.hidden { opacity: 0; pointer-events: none; }
.splash-card {
    background: var(--page-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--r-2xl);
    padding: 40px 30px;
    box-shadow: var(--sh3);
    text-align: center;
    max-width: 400px; width: 90%;
    border: 1px solid var(--page-border);
}
.splash-title {
    font-size: 1.5rem; font-weight: 700;
    color: var(--hero-title-color);
    margin-bottom: 20px;
}
.splash-step {
    font-size: 0.9rem; color: var(--tg-on-surface-variant);
    margin-bottom: 16px; min-height: 1.5em;
}
.splash-progress {
    width: 100%; height: 8px;
    background: var(--tg-outline-variant);
    border-radius: 4px; overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.splash-progress-fill {
    height: 100%; width: 0%;
    background: var(--btn-fill-bg);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.page-bg {
    position: fixed; inset: 0; z-index: -1;
    background: var(--page-bg-image, var(--page-bg));
    transition: background 0.5s;
}

#app {
    max-width: 1100px; margin: 0 auto;
    padding: clamp(16px, 2.5vw, 24px) clamp(16px, 3vw, 28px) 120px;
    transition: padding-bottom 0.3s;
}
#app.has-nav { padding-bottom: clamp(150px, 20vw, 180px); }

.page-fade-in { animation: pageIn 400ms var(--ease) both; }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.rpl { position: relative; overflow: hidden; }
@keyframes ripGrow {
    from { transform: scale(0); opacity: 0.24; }
    to { transform: scale(2.8); opacity: 0; }
}
.rwave {
    position: absolute; border-radius: 50%;
    background: var(--state-layer, var(--tg-primary));
    animation: ripGrow 500ms var(--ease) forwards;
    pointer-events: none;
}

.hero {
    position: relative;
    background: var(--page-card);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: var(--r-2xl);
    padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 32px);
    margin-bottom: 14px; text-align: center;
    box-shadow: var(--sh3), 0 0 60px var(--glow) inset;
    border: 1px solid var(--page-border);
    overflow: hidden;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 44px); font-weight: 800;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    color: var(--tg-on-surface);
    letter-spacing: 0.5px;
}
.hero h1 .material-icons-round { color: var(--hero-title-color); font-size: 1.35em; }
.hero-sub {
    margin-top: 10px; font-size: 0.92rem;
    color: var(--tg-on-surface-variant);
    display: flex; align-items: center; justify-content: center; gap: 14px;
    flex-wrap: wrap;
}
.hero-sub .hs-stat { font-weight: 600; color: var(--hero-title-color); }
.legend {
    display: flex; justify-content: center; gap: 10px; margin-top: 18px;
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.legend::-webkit-scrollbar { height: 4px; }
.legend::-webkit-scrollbar-thumb { background: var(--tg-outline-variant); border-radius: 4px; }
.legend span {
    font-size: 0.78rem; padding: 6px 14px; border-radius: var(--r-full);
    background: var(--legend-bg);
    color: var(--legend-text);
    font-weight: 500; display: flex; align-items: center; gap: 6px;
    white-space: nowrap; flex-shrink: 0;
    border: 1px solid var(--page-border);
}

.ad-marquee {
    position: relative;
    background: var(--page-card);
    border-radius: var(--r-xl);
    padding: 11px 0; margin-bottom: 14px; overflow: hidden;
    white-space: nowrap;
    border: 1px solid var(--page-border);
    box-shadow: var(--sh1);
}
.ad-marquee::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--accent); opacity: 0.8;
    border-radius: 0 4px 4px 0;
}
.ad-marquee .ad-track { display: inline-block; animation: scroll-left 120s linear infinite; padding: 0 20px; }
.ad-marquee .ad-item {
    display: inline-block; padding: 0 24px;
    color: var(--tg-on-surface-variant);
    font-weight: 500;
}
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.search-card {
    background: var(--page-card);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: var(--r-2xl);
    padding: 18px; margin-bottom: 14px;
    border: 1px solid var(--page-border);
    box-shadow: var(--sh2);
}
.search-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.search-box {
    flex: 1; min-width: 0; position: relative;
    display: flex; align-items: center; gap: 12px;
    background: var(--tool-bg);
    border-radius: var(--r-full);
    padding: 0 20px; min-height: 52px;
    border: 1.5px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
    border-color: var(--hero-title-color);
    box-shadow: 0 0 0 4px var(--glow);
}
.search-input {
    flex: 1; border: none; background: transparent; font: inherit;
    outline: none; color: var(--tg-on-surface); padding-right: 40px;
}
.search-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    display: none; border: none; background: transparent; cursor: pointer;
    color: var(--legend-text); padding: 8px; border-radius: 50%; z-index: 2;
}
.search-clear.show { display: inline-flex; }

.search-actions-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sib {
    width: 44px; height: 44px; border-radius: var(--r-full);
    border: 1px solid var(--page-border);
    background: var(--tool-bg);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--legend-text);
    transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.sib:hover { border-color: var(--hero-title-color); box-shadow: 0 0 0 3px var(--glow); transform: translateY(-1px); }
.sib:active { transform: scale(0.94); }
.sib-wide { width: auto; padding: 0 18px; gap: 6px; font-size: 0.85rem; font-weight: 500; font-family: inherit; }

.search-meta { font-size: 0.8rem; color: var(--legend-text); margin-top: 8px; }

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px; margin-bottom: 14px;
}

.sc-card, .q-card {
    background: var(--page-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: var(--r-2xl);
    overflow: hidden;
    border: 1px solid var(--page-border);
    box-shadow: var(--sh1);
    transition: box-shadow 0.25s;
}
.sc-card:hover, .q-card:hover { box-shadow: var(--sh2); }
.sc-hdr, .q-hdr {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px; cursor: pointer; user-select: none;
    min-height: 56px;
}
.sc-hdr > .material-icons-round, .q-hdr > .material-icons-round {
    color: var(--hero-title-color); flex-shrink: 0;
}
.sc-arr, .q-arr { transition: transform 0.35s var(--ease); color: var(--legend-text); display: flex; }
.sc-card.open .sc-arr, .q-card.open .q-arr { transform: rotate(180deg); }
.sc-body, .q-body, .sec-body { overflow: hidden; height: 0; }

.sc-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 10px; padding: 12px 18px 18px;
}
.sc-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--tool-bg);
    border-radius: var(--r-md);
    padding: 10px 12px;
    border: 1px solid var(--page-border);
}
.sc-keys { display: flex; gap: 4px; flex-shrink: 0; }
.kbd {
    display: inline-block; min-width: 24px;
    padding: 2px 7px; border-radius: 6px;
    background: var(--chip-bg); color: var(--chip-text);
    font-size: 0.78rem; font-weight: 600; text-align: center;
    border: 1px solid var(--page-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.sc-desc { font-size: 0.8rem; color: var(--legend-text); }
.q-cnt { font-size: 0.78rem; color: var(--legend-text); margin-left: auto; white-space: nowrap; }
.q-empty { text-align: center; padding: 24px; color: var(--legend-text); font-size: 0.9rem; }

.item-list { display: flex; flex-direction: column; gap: 10px; padding: 6px 18px 18px; }

.item-card {
    background: var(--tool-bg);
    border: 1px solid var(--page-border);
    border-radius: var(--r-lg);
    padding: 12px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.item-card:hover { border-color: var(--hero-title-color); box-shadow: 0 0 0 3px var(--glow); }
.item-head { display: flex; align-items: center; gap: 10px; }
.item-icon {
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--chip-bg); color: var(--chip-text);
    font-size: 1.1rem; flex-shrink: 0;
}
.item-name {
    flex: 1; min-width: 0;
    font-size: 0.92rem; font-weight: 600; color: var(--tool-text);
    white-space: normal; overflow-wrap: anywhere; word-break: break-word;
    line-height: 1.45;
}
.item-badges { display: inline-flex; gap: 3px; flex-shrink: 0; }
.item-badges span { font-size: 0.85rem; }
.item-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.copy-all {
    height: 34px; padding: 0 12px;
    border: none; border-radius: var(--r-full);
    background: var(--chip-bg); color: var(--chip-text);
    font: inherit; font-size: 0.78rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
    cursor: pointer;
    transition: transform 0.15s var(--ease), box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.copy-all:hover { box-shadow: 0 0 0 3px var(--glow); }
.copy-all:active { transform: scale(0.94); }
.copy-all .material-icons-round { font-size: 16px; }
.fav-btn {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: transparent; display: flex; align-items: center;
    justify-content: center; color: var(--legend-text); cursor: pointer; flex-shrink: 0;
    transition: color 0.2s, transform 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.fav-btn:hover { color: var(--hero-title-color); }
.fav-btn:active { transform: scale(0.85); }
.fav-btn.on { color: var(--hero-title-color); }
.fav-btn .material-icons-round { font-size: 20px; }
.share-btn {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: transparent; display: flex; align-items: center;
    justify-content: center; color: var(--legend-text); cursor: pointer; flex-shrink: 0;
    transition: color 0.2s, transform 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.share-btn:hover { color: var(--hero-title-color); }
.share-btn:active { transform: scale(0.85); }
.share-btn .material-icons-round { font-size: 18px; }

.item-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lk-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--r-full);
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer; border: 1px solid transparent;
    transition: transform 0.15s var(--ease), box-shadow 0.2s, filter 0.2s;
    max-width: 100%;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.lk-badge .material-icons-round { font-size: 15px; flex-shrink: 0; }
.lk-badge .lk-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-badge:hover { filter: brightness(1.12); box-shadow: 0 0 0 3px var(--badge-focus, transparent); transform: translateY(-1px); }
.lk-badge:active { transform: scale(0.94); }
.lk-quark { color: var(--lk-quark); border-color: var(--lk-quark); background: var(--lk-quark-bg); }
.lk-xunlei { color: var(--lk-xunlei); border-color: var(--lk-xunlei); background: var(--lk-xunlei-bg); }
.lk-code { color: var(--lk-code); border-color: var(--lk-code); background: var(--lk-code-bg); }
.lk-text { color: var(--lk-text); border-color: var(--lk-text); background: var(--lk-text-bg); }
.lk-web { color: var(--lk-web); border-color: var(--lk-web); background: var(--lk-web-bg); }

.detail-stats { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-stats .ds-count { font-size: 0.85rem; color: var(--legend-text); }
.stat-chip { cursor: default; pointer-events: none; }
.detail-list { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.detail-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--tool-bg); border-radius: var(--r-md); padding: 10px 12px;
}
.detail-row .lk-badge { flex-shrink: 0; }
.detail-url {
    flex: 1; min-width: 0; font-size: 0.8rem; color: var(--tool-text);
    word-break: break-all; overflow-wrap: anywhere; line-height: 1.5;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    max-height: 76px; overflow-y: auto;
}
.detail-copy { flex-shrink: 0; }
.detail-copy .material-icons-round { font-size: 18px; }
.detail-actions { display: flex; gap: 10px; }
.detail-actions .btn { flex: 1; justify-content: center; }
.detail-actions .material-icons-round { font-size: 18px; }

.sec-card {
    background: var(--page-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--r-2xl);
    overflow: hidden;
    border: 1px solid var(--page-border);
    box-shadow: var(--sh1);
    transition: box-shadow 0.25s, transform 0.2s var(--ease);
    display: flex; flex-direction: column;
    min-width: 0;
}
.sec-card:hover { box-shadow: var(--sh2); }
.sec-hdr {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; min-height: 56px;
    border-bottom: 1px solid var(--divider-color);
}
.sec-toggle { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; touch-action: manipulation; }
.sec-arr { display: flex; color: var(--legend-text); transition: transform 0.35s var(--ease); flex-shrink: 0; }
.sec-title {
    flex: 1; min-width: 0; font-size: 0.98rem; font-weight: 700;
    color: var(--tg-on-surface);
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sec-count {
    flex-shrink: 0; font-size: 0.75rem; font-weight: 600;
    color: var(--legend-text);
    background: var(--legend-bg);
    padding: 3px 10px; border-radius: var(--r-full);
    border: 1px solid var(--page-border);
}
.sec-body { height: 0; overflow: hidden; }

.sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

mark.hl {
    background: rgba(255, 200, 80, 0.35);
    color: inherit;
    border-radius: 3px;
    padding: 0 2px;
}

.taskbar {
    position: fixed; bottom: 0; left: 0; right: 0; height: 80px;
    display: flex;
    background: var(--taskbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    border-top: 1px solid var(--page-border);
    transform: translateY(0); opacity: 1;
    transition: transform 0.35s var(--ease), opacity 0.35s;
}
.taskbar.hidden { transform: translateY(100%); opacity: 0; pointer-events: none; }
.task-btn {
    flex: 1; border: none; background: transparent;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 6px; color: var(--taskbar-text);
    cursor: pointer; font: inherit; font-size: 0.72rem;
    transition: color 0.3s; -webkit-tap-highlight-color: transparent;
}
.task-btn.active { color: var(--taskbar-active-text); }
.task-btn .pill {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 6px 18px; border-radius: 24px;
    transition: background 0.3s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.task-btn.active .pill {
    background: var(--taskbar-active-bg);
    box-shadow: 0 0 0 2px var(--hero-title-color), 0 0 14px var(--glow);
    transform: scale(1.05);
}
.task-btn:active .pill { transform: scale(0.97); }

.fab-top {
    position: fixed; right: 22px; bottom: 96px;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--btn-fill-bg);
    color: var(--btn-fill-text);
    border: none; display: none; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 18px var(--glow);
    z-index: 900;
    transition: opacity 0.3s, transform 0.2s var(--ease);
    opacity: 0;
    -webkit-tap-highlight-color: transparent;
}
.fab-top.show { display: flex; opacity: 1; }
.fab-top:active { transform: scale(0.92); }
.fab-top .material-icons-round { font-size: 26px; }

.toast {
    position: fixed; bottom: 104px; left: 50%; transform: translateX(-50%);
    background: var(--page-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 12px 28px; border-radius: 28px;
    font-size: 0.85rem; opacity: 0; z-index: 3000;
    box-shadow: var(--sh4);
    border: 1px solid var(--page-border);
    pointer-events: none;
    transition: opacity 0.3s;
    max-width: calc(100vw - 32px);
    text-align: center;
}
.toast.show { opacity: 1; }

.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(4, 8, 18, 0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; padding: 24px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-card {
    background: var(--page-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--r-2xl);
    width: 100%; max-width: 600px; max-height: 80vh; overflow-y: auto;
    padding: 28px; position: relative; box-shadow: var(--sh4);
    border: 1px solid var(--page-border);
    word-wrap: break-word; overflow-wrap: break-word; word-break: break-word;
    transform: scale(0.96);
    transition: transform 0.35s var(--ease);
}
.modal-overlay.show .modal-card { transform: scale(1); }

.notice-fullscreen {
    position: fixed; inset: 0; z-index: 2500;
    background: var(--page-bg-image, var(--page-bg));
    display: flex; flex-direction: column;
    padding: 24px; overflow: hidden;
}
.notice-content {
    flex: 1; overflow-y: scroll; padding: 22px;
    background: var(--page-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--r-2xl);
    line-height: 1.8; box-shadow: var(--sh2);
    border: 1px solid var(--page-border); margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
}
.progress-bar {
    width: 100%; height: 8px;
    background: var(--tg-outline-variant);
    border-radius: 4px; margin-bottom: 16px; overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.progress-fill {
    height: 100%; width: 0%;
    background: var(--btn-fill-bg);
    transition: width 0.1s linear; border-radius: 4px;
}

.btn {
    border: none; font: inherit; cursor: pointer; font-weight: 600;
    padding: 12px 26px; border-radius: var(--r-full);
    transition: all 0.25s; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--btn-outline-border);
    color: var(--btn-outline-text);
}
.btn-outline:hover { border-color: var(--hero-title-color); }
.btn-filled { background: var(--btn-fill-bg); color: var(--btn-fill-text); box-shadow: 0 4px 16px var(--glow); }
.btn-filled:active, .btn-outline:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-btn {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: transparent; display: flex; align-items: center;
    justify-content: center; color: var(--legend-text); cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s, background 0.2s, transform 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { color: var(--hero-title-color); background: var(--tool-bg); }
.icon-btn:active { transform: scale(0.9); }
.notice-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.refuse-box {
    background: var(--page-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: var(--r-2xl);
    border: 1px solid var(--page-border);
    box-shadow: var(--sh2);
    padding: 44px 28px; text-align: center;
}
.refuse-box .material-icons-round { color: var(--tg-error); }
.refuse-box h2 { margin: 14px 0 8px; font-size: 1.3rem; }
.refuse-box p { color: var(--legend-text); font-size: 0.9rem; }

.notice-title {
    text-align: center; font-size: 1.4rem; font-weight: 700;
    color: var(--hero-title-color); margin-bottom: 16px;
}

@media (max-width: 1024px) {
    .sections { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .sections { grid-template-columns: 1fr; }
    .tool-grid { grid-template-columns: 1fr; }
    .sc-grid { grid-template-columns: 1fr; }
    .taskbar { height: 72px; padding-bottom: env(safe-area-inset-bottom); }
    #app { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
    #app.has-nav { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
    .fab-top { bottom: calc(88px + env(safe-area-inset-bottom)); }
    .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
