:root {
        --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --theme-color: #5cd2ef;
        --text-main: #ffffff;
        --text-title: #f1f5f9;
        --text-desc: #e2e8f0;
        --text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        --text-shadow-heavy: 0 2px 4px rgba(0,0,0,0.3);
        
        --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
        --glass-bg-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
        --glass-border: rgba(255, 255, 255, 0.15);
        --glass-border-light: rgba(255, 255, 255, 0.3);
        
        --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        --glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.3);
        --glass-inset: inset 0 0 10px rgba(255, 255, 255, 0.05);
        --glass-inset-hover: inset 0 0 15px rgba(255, 255, 255, 0.1);
        
        --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        --card-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.3);
        
        --track-bg: rgba(0, 0, 0, 0.25);
        --divider-bg: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0));
        --divider-bg-hz: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0));
        
        --icon-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
        --icon-border: rgba(255, 255, 255, 0.2);
        --icon-shadow: 0 4px 15px rgba(0,0,0,0.2);
        --icon-inset: inset 0 2px 4px rgba(255, 255, 255, 0.4);

        --top-bar-bg: rgba(15, 20, 30, 0.1);
        --top-bar-border: rgba(255, 255, 255, 0.1);
        
        --btn-color-restart: #93c5fd;
        --btn-color-stop: #fca5a5;
        
        --auth-bg: linear-gradient(135deg, rgba(40, 45, 65, 0.6), rgba(20, 25, 40, 0.8));
        --auth-input-bg: rgba(0,0,0,0.25);
        --autofill-bg: #1a2030;
    }

    body::before {
        content: '';
        position: fixed;
        inset: -60px;
        z-index: -2;
        pointer-events: none;
        transition: background 0.3s ease, filter 0.3s ease;
        
        background:
            radial-gradient(closest-side at 15% 20%, rgba(56, 189, 248, 0.15), rgba(56, 189, 248, 0)),
            radial-gradient(circle at 85% 10%, rgba(129, 140, 248, 0.15), rgba(129, 140, 248, 0)),
            radial-gradient(circle at 50% 85%, rgba(244, 114, 182, 0.15), rgba(244, 114, 182, 0));
        filter: blur(0px); 
    }

    body.light-mode::before {
        opacity: 1;
        
        background:
            radial-gradient(closest-side at 15% 20%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)),
            radial-gradient(circle at 85% 10%, rgba(164, 205, 255, 0.5), rgba(164, 205, 255, 0)),
            radial-gradient(circle at 50% 85%, rgba(255, 182, 193, 0.45), rgba(255, 182, 193, 0));
        filter: blur(70px);
    }

    body.light-mode {
        --bg-gradient: linear-gradient(135deg, #dfe9f3 0%, #ffffff 100%);
        --text-main: #334155;
        --text-title: #1e293b;
        --text-desc: #64748b;
        --text-shadow: none;
        --text-shadow-heavy: none;
        
        --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
        --glass-bg-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5));
        --glass-border: rgba(255, 255, 255, 0.6);
        --glass-border-light: rgba(255, 255, 255, 0.9);
        
        --glass-shadow: 0 8px 32px rgba(30, 41, 59, 0.05);
        --glass-shadow-hover: 0 12px 40px rgba(30, 41, 59, 0.1);
        --glass-inset: inset 0 0 10px rgba(255, 255, 255, 0.5);
        --glass-inset-hover: inset 0 0 15px rgba(255, 255, 255, 0.8);
        
        --card-shadow: 0 10px 30px rgba(30, 41, 59, 0.05);
        --card-shadow-hover: 0 15px 40px rgba(30, 41, 59, 0.1);
        
        --track-bg: rgba(0, 0, 0, 0.05);
        --divider-bg: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0));
        --divider-bg-hz: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0));
        
        --icon-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
        --icon-border: rgba(255, 255, 255, 0.6);
        --icon-shadow: 0 4px 15px rgba(30,41,59,0.05);
        --icon-inset: inset 0 2px 4px rgba(255, 255, 255, 0.8);

        --top-bar-bg: rgba(255, 255, 255, 0.2);
        --top-bar-border: rgba(255, 255, 255, 0.4);

        --btn-color-restart: #3b82f6;
        --btn-color-stop: #ef4444;

        --auth-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(240, 245, 255, 0.9));
        --auth-input-bg: rgba(255,255,255,0.6);
        --autofill-bg: #eef3f8;
    }

    html {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    ::-webkit-scrollbar {
        display: none;
    }

#logs-modal {
    width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 4000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

#logs-modal.show {
    visibility: visible; opacity: 1; pointer-events: auto;
}

#logs-modal .view-section {
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#logs-modal.show .view-section {
    transform: scale(1) translateY(0);
}

.top-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 4100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,0.58);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.top-settings-modal.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.top-settings-panel {
    width: min(640px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    overflow: auto;
    border-radius: 28px;
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-left: 1px solid var(--glass-border-light);
    background: linear-gradient(180deg, rgba(42, 47, 64, 0.96), rgba(33, 37, 52, 0.94));
    box-shadow: var(--glass-shadow), var(--glass-inset);
    padding: 26px;
    color: var(--text-main);
    transform: translateY(16px) scale(0.96);
    transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.top-settings-modal.show .top-settings-panel {
    transform: translateY(0) scale(1);
}

.top-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.top-settings-title {
    margin: 0;
    color: var(--text-title);
    font-size: 20px;
    font-weight: 800;
    text-shadow: var(--text-shadow-heavy);
}

.top-settings-desc {
    margin: 6px 0 0;
    color: var(--text-desc);
    font-size: 13px;
    line-height: 1.6;
}

.top-settings-close {
    appearance: none;
    -webkit-appearance: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.top-settings-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--glass-border-light);
    transform: translateY(-1px);
}

.top-settings-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 22px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
}

.top-settings-tab {
    appearance: none;
    -webkit-appearance: none;
    min-width: 88px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.top-settings-tab:hover {
    background: rgba(255, 255, 255, 0.08);
}

.top-settings-tab.active {
    background: rgba(92, 210, 239, 0.18);
    border-color: rgba(92, 210, 239, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.top-settings-section {
    display: none;
}

.top-settings-section.active {
    display: block;
}

.top-settings-card {
    border: 1px solid rgba(92, 210, 239, 0.45);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    padding: 22px 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.top-settings-kicker {
    margin-bottom: 6px;
    color: var(--theme-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.top-settings-card-title {
    margin: 0;
    color: var(--text-title);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.top-settings-card-desc {
    margin: 8px 0 0;
    color: var(--text-desc);
    font-size: 14px;
    line-height: 1.7;
}

.top-settings-choice-row,
.top-settings-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.top-settings-choice {
    appearance: none;
    -webkit-appearance: none;
    min-width: 130px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.top-settings-choice:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.top-settings-choice.active {
    background: rgba(92, 210, 239, 0.18);
    border-color: rgba(92, 210, 239, 0.5);
}

.top-settings-account-summary {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.12);
    display: grid;
    gap: 6px;
}

.top-settings-account-summary strong {
    color: var(--text-title);
    font-size: 16px;
}

.top-settings-account-summary span {
    color: var(--text-desc);
    font-size: 13px;
    line-height: 1.6;
}

.site-notice-banner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 20px 20px 0;
    padding: 18px 22px;
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-left: 1px solid var(--glass-border-light);
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 45%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--glass-shadow), var(--glass-inset);
    overflow: hidden;
}

.site-notice-banner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--theme-color);
    box-shadow: 0 0 20px var(--theme-color);
}

.site-notice-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)),
        linear-gradient(135deg, var(--theme-color), rgba(255, 255, 255, 0.02));
    color: #fff;
    font-size: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 28px rgba(0, 0, 0, 0.16);
}

.site-notice-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: grid;
    gap: 8px;
}

.site-notice-kicker {
    color: var(--theme-color);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.site-notice-content {
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.7;
    word-break: keep-all;
    display: grid;
    gap: 8px;
}

.site-notice-content a {
    color: var(--theme-color);
    text-decoration: none;
    font-weight: 700;
}

.site-notice-content a:hover {
    text-decoration: underline;
}

.site-notice-content p,
.site-notice-content ul,
.site-notice-content ol {
    margin: 0;
}

.action-dropdown {
    position: fixed;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-left: 1px solid var(--glass-border-light);
    border-radius: 16px;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    box-shadow: var(--glass-shadow), var(--glass-inset);
    z-index: 3000;
    
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), 
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), 
                visibility 0.2s;
    pointer-events: none;
}

.action-dropdown.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.management-action-dropdown {
    min-width: 190px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-main);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    text-shadow: var(--text-shadow);
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--text-desc);
}

.dropdown-item:hover {
    background: var(--glass-bg-hover);
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 4px 16px;
}

.dropdown-item-danger {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 8px;
    padding: 10px 8px;
    border-radius: 8px;
    color: var(--btn-color-stop);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    text-shadow: var(--text-shadow);
}

.dropdown-item-danger i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--btn-color-stop);
}

.dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    input:-webkit-autofill:active {
        -webkit-text-fill-color: var(--text-main) !important;
        -webkit-box-shadow: 0 0 0px 1000px var(--autofill-bg) inset !important;
        caret-color: var(--text-main) !important;
        transition: background-color 5000s ease-in-out 0s;
    }

    body {
        margin: 0;
        padding: 0;
        font-family: 'Pretendard', sans-serif;
        background: var(--bg-gradient);
        background-attachment: fixed;
        background-size: cover;
        color: var(--text-main);
        min-height: 100vh;
        overflow-x: hidden;
        transition: background 0.3s ease, color 0.3s ease;
    }

.page-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.1s ease-out, transform 0.1s ease-out, visibility 0.1s;
    height: 0;
    overflow: hidden;
}

.page-view.active {
    position: relative;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    height: auto;
    overflow: visible;
}

.page-view.fade-out {
    position: absolute;
    visibility: visible;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.05s ease-in, transform 0.05s ease-in;
    height: 100vh;
    overflow: hidden;
}

    input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        border: 1px solid var(--glass-border);
        border-radius: 6px;
        background: var(--track-bg);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        position: relative;
        vertical-align: middle;
        transition: all 0.2s ease;
        margin-right: 8px;
    }

    input[type="checkbox"]:checked {
        background: var(--theme-color);
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 0 10px rgba(104, 159, 255, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
    }

    input[type="checkbox"]:checked::after {
        content: '✔';
        position: absolute;
        color: white;
        font-size: 11px;
        font-weight: bold;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }

    input[type="checkbox"]:hover {
        border-color: var(--glass-border-light);
    }

    .top-bar, .config-top-bar {
        display: flex;
        padding: 20px 40px;
        background: var(--top-bar-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--top-bar-border);
        position: relative;
        z-index: 10;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        transition: background 0.3s ease, border-color 0.3s ease;
    }

    .top-bar {
        justify-content: space-between;
        align-items: flex-start;
    }

    .config-top-bar {
        align-items: center;
    }

    .main-content {
        padding: 30px 40px 60px 40px;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
        gap: 40px;
    }

    .config-content {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px;
    }

    .system-info {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .profile-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: var(--glass-shadow), var(--glass-inset);
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        cursor: pointer;
        overflow: hidden;
        border: 1px solid var(--glass-border);
    }

    .profile-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .profile-icon:hover {
        transform: scale(1.1) rotate(5deg) translateY(-2px);
        box-shadow: var(--glass-shadow-hover), var(--glass-inset-hover);
    }

    .stat-group, .weather-widget {
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--glass-border);
        border-top: 1px solid var(--glass-border-light);
        border-left: 1px solid var(--glass-border-light);
        box-shadow: var(--glass-shadow), var(--glass-inset);
        border-radius: 16px;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        cursor: default;
    }

    .stat-group {
        display: flex;
        align-items: stretch;
        gap: 15px;
        padding: 10px 18px;
        flex-wrap: wrap;
    }

    .weather-widget {
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 12px 24px;
    }

    .stat-group:hover, .weather-widget:hover {
        background: var(--glass-bg-hover);
        border-color: var(--glass-border-light);
        transform: translateY(-2px);
        box-shadow: var(--glass-shadow-hover), var(--glass-inset-hover);
    }

    .stat-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 500;
        min-width: 65px;
        text-shadow: var(--text-shadow);
        transition: text-shadow 0.3s ease;
    }

    .stat-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .progress-track {
        width: 100%;
        height: 6px;
        background: var(--track-bg);
        border-radius: 4px;
        overflow: hidden;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: background 0.3s ease;
    }

    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #5cd2ef, #689fff, #00bfff);
        width: 0%;
        border-radius: 4px;
        transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4), 0 0 8px rgba(104, 159, 255, 0.6);
    }

    .stat-icon {
        width: 16px;
        height: 16px;
        opacity: 0.9;
        filter: drop-shadow(var(--text-shadow));
    }

    .divider {
        width: 1px;
        background: var(--divider-bg);
        margin: 4px 0;
        transition: background 0.3s ease;
    }

    .stat-separator {
        opacity: 0.5;
        margin: 0 4px;
        font-size: 11px;
    }

    .time-display {
        font-size: 32px;
        font-weight: 700;
        letter-spacing: 1px;
        text-shadow: var(--text-shadow-heavy);
        transition: text-shadow 0.3s ease;
    }

    .weather-details {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .weather-location {
        font-size: 13px;
        font-weight: 700;
        opacity: 0.95;
        text-shadow: var(--text-shadow);
    }

    .weather-temp {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        opacity: 0.85;
        text-shadow: var(--text-shadow);
    }

    @keyframes pulse {
        0% { opacity: 1; }
        50% { opacity: 0.5; }
        100% { opacity: 1; }
    }

    .loading {
        animation: pulse 1.5s infinite ease-in-out;
    }

    .category {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .category.category-collapsible {
        gap: 0;
    }

    .category-title {
        font-size: 20px;
        font-weight: 600;
        color: var(--text-title);
        margin: 0;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--glass-border);
        text-shadow: var(--text-shadow-heavy);
        transition: color 0.3s ease, text-shadow 0.3s ease, border-color 0.3s ease;
    }

    .category-title-interactive {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
    }

    .category-title-text {
        min-width: 0;
        flex: 1;
    }

    .category-body {
        --category-body-spacing: 18px;
        display: flex;
        flex-direction: column;
        gap: 18px;
        margin-top: var(--category-body-spacing);
        overflow: visible;
        opacity: 1;
        transform: translateY(0);
        transition: height 0.38s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.2s ease, transform 0.38s cubic-bezier(0.25, 0.8, 0.25, 1), margin-top 0.38s ease;
        will-change: height, opacity, transform, margin-top;
    }

    .category-toggle {
        appearance: none;
        -webkit-appearance: none;
        border: 1px solid var(--glass-border);
        border-top: 1px solid var(--glass-border-light);
        border-left: 1px solid var(--glass-border-light);
        border-radius: 999px;
        background: var(--glass-bg);
        color: var(--text-main);
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        cursor: pointer;
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
        box-shadow: var(--icon-shadow), var(--glass-inset);
        transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
        flex-shrink: 0;
    }

    .category-toggle:hover {
        transform: translateY(-1px);
        background: var(--glass-bg-hover);
        border-color: var(--glass-border-light);
    }

    .category.collapsed .category-title {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .dashboard-focus-ring {
        animation: dashboardFocusPulse 1.4s ease;
    }

    @keyframes dashboardFocusPulse {
        0% { transform: translateY(0); }
        25% { transform: translateY(-3px); }
        100% { transform: translateY(0); }
    }

    .service-card {
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 18px 22px;
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--glass-border);
        border-top: 1px solid var(--glass-border-light);
        border-left: 1px solid var(--glass-border-light);
        border-radius: 20px;
        text-decoration: none;
        color: var(--text-main);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        position: relative;
        overflow: hidden;
        box-shadow: var(--card-shadow), var(--glass-inset);
    }

    .service-card:hover {
        background: var(--glass-bg-hover);
        border-color: var(--glass-border-light);
        transform: translateY(-4px);
        box-shadow: var(--card-shadow-hover), var(--glass-inset-hover);
    }

    .service-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 5px;
        background: var(--theme-color);
        opacity: 0;
        transition: opacity 0.3s ease;
        box-shadow: 0 0 15px #689fff;
    }

    .service-card:hover::before {
        opacity: 1;
    }

    .card-icon {
        width: 54px;
        height: 54px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--icon-bg);
        border-radius: 16px;
        font-size: 22px;
        flex-shrink: 0;
        color: var(--text-main);
        border: 1px solid var(--icon-border);
        box-shadow: var(--icon-shadow), var(--icon-inset);
        text-shadow: var(--text-shadow-heavy);
        transition: all 0.3s ease;
    }

    .card-text {
        display: flex;
        flex-direction: column;
        gap: 5px;
        flex-grow: 1;
    }

    .card-title {
        font-size: 17px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-shadow: var(--text-shadow);
    }

    .card-desc {
        font-size: 13px;
        color: var(--text-desc);
        line-height: 1.4;
        word-break: keep-all;
        text-shadow: var(--text-shadow);
        transition: color 0.3s ease, text-shadow 0.3s ease;
    }

    .card-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    .action-btn {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 10px;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 5;
        box-shadow: var(--icon-shadow), var(--glass-inset);
        color: var(--text-main);
        text-decoration: none;
    }

    .action-btn:hover {
        background: var(--glass-bg-hover);
        border-color: var(--glass-border-light);
        transform: translateY(-4px);
        box-shadow: var(--card-shadow-hover), var(--glass-inset-hover);
    }

    .top-action-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
        border-radius: 8px;
    }

    .restart-btn {
        color: var(--btn-color-restart);
    }

    .restart-btn:hover {
        background: linear-gradient(135deg, #3b82f6, #60a5fa);
        color: white;
        border-color: #93c5fd;
        box-shadow: 0 0 15px rgba(96, 165, 250, 0.6), inset 0 2px 4px rgba(255,255,255,0.4);
        transform: translateY(-2px);
    }

    .stop-btn {
        color: var(--btn-color-stop);
    }

    .stop-btn:hover {
        background: linear-gradient(135deg, #ef4444, #f87171);
        color: white;
        border-color: #fca5a5;
        box-shadow: 0 0 15px rgba(248, 113, 113, 0.6), inset 0 2px 4px rgba(255,255,255,0.4);
        transform: translateY(-2px);
    }

    .theme-toggle-btn {
        color: white;
    }

    body.light-mode .theme-toggle-btn:hover {
        color: white;
    }

    body.light-mode .theme-toggle-btn {
        color: black;
    }

    .theme-toggle-btn:hover {
        background: linear-gradient(135deg, #0275d8, #0d6efd);
        border-color: #0275d8;
        box-shadow: 0 0 15px rgba(2, 117, 216, 0.6), inset 0 2px 4px rgba(255,255,255,0.4);
        transform: translateY(-2px);
    }

    .config-btn {
        color: var(--text-main);
    }

    .config-btn:hover {
        background: var(--theme-color);
        border-color: #10b981;
        box-shadow: 0 0 15px rgba(104, 159, 255, 0.6), inset 0 2px 4px rgba(255,255,255,0.4);
        transform: translateY(-2px);
        color: white;
    }

    .status-dot {
        --dot-color: #94a3b8;
        width: 10px;
        height: 10px;
        background-color: var(--dot-color);
        border-radius: 50%;
        flex-shrink: 0;
        transition: background-color 0.3s ease;
        margin-left: 4px;
        position: relative;
        z-index: 1;
        box-shadow: inset 0 1px 2px rgba(255,255,255,0.5), 0 0 8px var(--dot-color);
    }

    .status-dot::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-color: var(--dot-color);
        animation: ripple 1.5s infinite ease-out;
        z-index: -1;
    }

    @keyframes ripple {
        0% { transform: scale(1); opacity: 0.8; }
        100% { transform: scale(2.8); opacity: 0; }
    }

    .action-container {
        display: flex;
        align-items: center;
        gap: 8px;
        align-self: center;
    }

    .external-links-row {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
    }

    .ext-link-btn {
        width: 52px;
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--glass-border);
        border-top: 1px solid var(--glass-border-light);
        border-left: 1px solid var(--glass-border-light);
        border-radius: 16px;
        color: var(--text-main);
        font-size: 22px;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: var(--card-shadow), var(--glass-inset);
        text-shadow: var(--text-shadow-heavy);
    }

    .ext-link-btn:hover {
        background: var(--glass-bg-hover);
        border-color: var(--glass-border-light);
        transform: translateY(-4px);
        box-shadow: var(--card-shadow-hover), var(--glass-inset-hover);
    }

    .back-btn {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-main);
        text-decoration: none;
        font-size: 18px;
        margin-right: 20px;
        box-shadow: var(--glass-shadow), var(--glass-inset);
        transition: all 0.2s ease;
    }

    .back-btn:hover {
        background: var(--glass-bg-hover);
        transform: translateY(-2px);
    }

    .page-title {
        font-size: 24px;
        font-weight: 700;
        margin: 0;
        text-shadow: var(--text-shadow-heavy);
    }

    .page-desc {
        color: var(--text-desc);
        font-size: 14px;
        margin: 5px 0 5px 0;
        text-shadow: var(--text-shadow);
    }

    .config-card {
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--glass-border);
        border-top: 1px solid var(--glass-border-light);
        border-left: 1px solid var(--glass-border-light);
        border-radius: 20px;
        padding: 24px;
        box-shadow: var(--glass-shadow), var(--glass-inset);
        margin-bottom: 30px;
    }

    .config-title {
        font-size: 18px;
        font-weight: 700;
        margin: 0 0 16px 0;
        color: var(--text-title);
        text-shadow: var(--text-shadow);
    }

    .config-textarea {
        width: 100%;
        height: 300px;
        background: var(--auth-input-bg);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        color: var(--text-main);
        font-family: 'Consolas', 'Monaco', monospace;
        font-size: 14px;
        padding: 16px;
        box-sizing: border-box;
        resize: vertical;
        box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
        transition: border-color 0.2s ease;
    }

    .config-textarea:focus {
        outline: none;
        border-color: rgba(104, 159, 255, 0.6);
    }

    .config-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 16px;
    }

    .btn-save {
        padding: 10px 24px;
        background: var(--theme-color);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        cursor: pointer;
        font-weight: bold;
        font-family: inherit;
        font-size: 14px;
        transition: all 0.2s ease;
        box-shadow: 0 4px 15px rgba(104, 159, 255, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    }

    .btn-save:hover {
        filter: brightness(1.1);
        transform: translateY(-2px);
    }

    .config-status {
        font-size: 13px;
        color: var(--text-desc);
    }

    .bot-hero-card {
        overflow: hidden;
    }

    .bot-hero-header,
    .bot-section-header {
        margin-bottom: 20px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
    }

    .bot-inline-desc {
        margin: 0;
        max-width: 760px;
    }

    .bot-toolbar {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .bot-toolbar.compact {
        gap: 8px;
    }

    .bot-btn-secondary {
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-main);
        box-shadow: none;
    }

    .bot-btn-ghost {
        background: transparent;
        color: var(--text-main);
        border-color: var(--glass-border);
        box-shadow: none;
    }

    .bot-status-banner {
        margin-top: 8px;
        padding: 14px 16px;
        border-radius: 16px;
        border: 1px solid var(--glass-border);
        font-size: 14px;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-main);
    }

    .bot-status-banner.running {
        border-color: rgba(92, 210, 239, 0.5);
        background: rgba(92, 210, 239, 0.12);
    }

    .bot-status-banner.polling {
        border-color: rgba(250, 204, 21, 0.45);
        background: rgba(250, 204, 21, 0.12);
    }

    .bot-status-banner.error {
        border-color: rgba(248, 113, 113, 0.5);
        background: rgba(248, 113, 113, 0.14);
    }

    .bot-status-banner.idle {
        border-color: var(--glass-border);
    }

    .bot-stat-grid {
        margin-top: 16px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .bot-stat-card {
        padding: 16px;
        border-radius: 18px;
        border: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.05);
        display: grid;
        gap: 8px;
    }

    .bot-stat-card span {
        color: var(--text-desc);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .bot-stat-card strong {
        color: var(--text-title);
        font-size: 28px;
        font-weight: 800;
        letter-spacing: -0.03em;
    }

    .bot-form-grid,
    .bot-request-grid,
    .bot-panels-grid {
        display: grid;
        gap: 14px;
    }

    .bot-form-grid,
    .bot-request-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bot-panels-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 10px;
    }

    .bot-admin-grid {
        margin-top: 10px;
    }

    .bot-admin-panels {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-top: 10px;
    }

    .bot-admin-panel {
        border: 1px solid var(--glass-border);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.04);
        padding: 16px;
        display: grid;
        gap: 12px;
        align-content: start;
    }

    .bot-mini-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .bot-inline-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .bot-inline-wrap .btn-save,
    .bot-admin-panel .btn-save {
        flex: 1 1 130px;
    }

    .bot-inline-options {
        padding-top: 2px;
    }

    .bot-check-inline {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 38px;
        padding: 0 12px;
        border-radius: 12px;
        border: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-main);
        font-size: 13px;
        font-weight: 600;
    }

    .bot-json-textarea {
        min-height: 220px;
        font-size: 12px;
        line-height: 1.65;
    }

    .bot-field-group {
        display: grid;
        gap: 8px;
    }

    .bot-field-wide {
        grid-column: 1 / -1;
    }

    .bot-collapse-header {
        align-items: flex-start;
        gap: 14px;
    }

    .bot-collapse-body {
        opacity: 1;
        transform: translateY(0);
        transition: height 0.36s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.22s ease, transform 0.36s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .bot-collapse-body[hidden] {
        display: none !important;
    }

    .bot-collapse-trigger {
        min-width: 108px;
        justify-content: center;
    }

    .bot-config-editor {
        min-height: 420px;
    }

    .bot-config-note {
        grid-column: 1 / -1;
        border: 1px dashed var(--glass-border);
        border-radius: 16px;
        padding: 14px 16px;
        color: var(--text-desc);
        background: rgba(255, 255, 255, 0.03);
        line-height: 1.6;
        font-size: 13px;
    }

    .bot-field-label {
        color: var(--text-desc);
        font-size: 12px;
        font-weight: 700;
    }

    .bot-input {
        margin: 0;
        background: rgba(0, 0, 0, 0.08);
    }

    .bot-input:disabled,
    .bot-textarea:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        filter: grayscale(0.15);
    }

    .bot-method-picker {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px;
        border: 1px solid var(--glass-border);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.04);
        scrollbar-width: none;
    }

    .bot-method-pill {
        appearance: none;
        -webkit-appearance: none;
        flex: 0 0 auto;
        min-width: 66px;
        min-height: 40px;
        padding: 0 14px;
        border-radius: 12px;
        border: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text-main);
        font-family: inherit;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.04em;
        white-space: nowrap;
        cursor: pointer;
        box-shadow: none;
        transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
    }

    .bot-method-pill:hover {
        transform: translateY(-1px);
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.24);
    }

    .bot-method-pill.active {
        padding: 12px;
        background: var(--theme-color);
        color: white;
        border: none;
        cursor: pointer;
        font-weight: bold;
        font-family: inherit;
        font-size: 15px;
        transition: all 0.2s ease;
    }

    .bot-textarea {
        min-height: 130px;
        margin: 0;
    }

    .bot-toggle-item {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: 0 14px;
        border: 1px solid var(--glass-border);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.04);
        color: var(--text-main);
        font-size: 14px;
        font-weight: 600;
        gap: 6px;
    }

    .bot-code-block {
        margin: 16px 0 0;
        padding: 16px;
        border-radius: 16px;
        border: 1px solid var(--glass-border);
        background: rgba(0, 0, 0, 0.2);
        color: var(--text-main);
        font-family: 'Consolas', 'Monaco', monospace;
        font-size: 13px;
        line-height: 1.6;
        white-space: pre-wrap;
        word-break: break-word;
        max-height: 320px;
        overflow: auto;
        box-sizing: border-box;
    }

    .bot-panel {
        border: 1px solid var(--glass-border);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.04);
        padding: 16px;
        min-height: 320px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .bot-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        color: var(--text-title);
        font-size: 15px;
        font-weight: 700;
    }

    .bot-panel-note {
        margin: 0;
        color: var(--text-desc);
        font-size: 13px;
        line-height: 1.5;
        text-shadow: var(--text-shadow);
    }

    .bot-panel-count {
        padding: 2px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-desc);
        font-size: 12px;
    }

    .bot-list-container,
    .bot-log-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-height: 0;
    }

    .bot-list-item,
    .bot-log-item {
        padding: 14px 16px;
        border-radius: 16px;
        border: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.05);
    }

    .bot-log-item {
        padding: 0;
        overflow: hidden;
    }

    .bot-log-toggle {
        width: 100%;
        border: 0;
        background: transparent;
        color: inherit;
        cursor: pointer;
        padding: 14px 16px;
        text-align: left;
        display: grid;
        gap: 8px;
        font-family: inherit;
    }

    .bot-log-chevron {
        justify-self: end;
        color: var(--text-desc);
        font-size: 12px;
        transition: transform 0.18s ease;
    }

    .bot-log-item.expanded .bot-log-chevron {
        transform: rotate(0deg);
    }

    .bot-log-body {
        padding: 0 16px 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .bot-list-title,
    .bot-log-message {
        color: var(--text-main);
        font-size: 14px;
        font-weight: 700;
        word-break: break-word;
    }

    .bot-list-meta {
        margin-top: 6px;
        color: var(--text-desc);
        font-size: 12px;
        line-height: 1.6;
        word-break: break-word;
    }

    .bot-empty-state {
        min-height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px dashed var(--glass-border);
        border-radius: 16px;
        color: var(--text-desc);
        font-size: 13px;
        text-align: center;
        padding: 12px;
    }

    .bot-log-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 8px;
        flex-wrap: wrap;
    }

    .bot-log-badge {
        padding: 4px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-main);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .bot-log-time {
        color: var(--text-desc);
        font-size: 12px;
    }

    .bot-log-meta {
        margin: 12px 0 0;
        padding: 12px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.16);
        color: var(--text-desc);
        font-family: 'Consolas', 'Monaco', monospace;
        font-size: 12px;
        line-height: 1.5;
        white-space: pre-wrap;
        word-break: break-word;
        overflow: auto;
    }

    .bot-log-item.warn {
        border-color: rgba(250, 204, 21, 0.35);
    }

    .bot-log-item.error {
        border-color: rgba(248, 113, 113, 0.35);
    }

    .bot-log-item.info {
        border-color: rgba(92, 210, 239, 0.26);
    }

    @media (max-width: 960px) {
        .bot-stat-grid,
        .bot-form-grid,
        .bot-request-grid,
        .bot-panels-grid,
        .bot-admin-panels,
        .bot-mini-grid {
            grid-template-columns: 1fr;
        }

        .bot-toolbar {
            width: 100%;
        }

        .bot-toolbar .btn-save {
            flex: 1 1 140px;
        }
    }

    .captcha-shell {
        margin: 0 0 18px 0;
        padding: 14px;
        border-radius: 14px;
        border: 1px solid var(--glass-border);
        background: rgba(0, 0, 0, 0.12);
        overflow: hidden;
    }

    .mypage-card {
        overflow: hidden;
    }

    .mypage-profile-layout {
        display: flex;
        gap: 32px;
        flex-wrap: wrap;
    }

    .mypage-avatar-panel {
        flex: 0 0 160px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mypage-avatar {
        width: 150px;
        height: 150px;
        border-radius: 18px;
        object-fit: cover;
        background: #000;
        border: 1px solid var(--glass-border);
        box-shadow: var(--icon-shadow);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .mypage-avatar:hover {
        transform: scale(1.03) rotate(2deg);
        box-shadow: var(--glass-shadow-hover);
    }

    .mypage-avatar-help {
        margin-top: 14px;
        text-align: center;
        font-size: 12px;
        line-height: 1.6;
        color: var(--text-desc);
    }

    .mypage-avatar-help a {
        color: var(--theme-color);
        text-decoration: none;
        font-weight: 700;
    }

    .mypage-info-panel {
        flex: 1;
        min-width: 280px;
    }

    .mypage-info-row {
        margin-bottom: 24px;
    }

    .mypage-password-row {
        margin-bottom: 18px;
    }

    .mypage-label-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-bottom: 8px;
    }

    .mypage-label {
        font-size: 14px;
        font-weight: 700;
        color: var(--text-desc);
    }

    .mypage-value {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-title);
        word-break: break-all;
    }

    .mypage-link-btn {
        border: 1px solid var(--theme-color);
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
            linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 75%);
        color: var(--theme-color);
        border-radius: 999px;
        padding: 7px 14px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        text-shadow: none;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.18);
        transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    }

    .mypage-link-btn:hover {
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)),
            linear-gradient(135deg, var(--theme-color), transparent 85%);
        color: #fff;
        box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.24);
        transform: translateY(-1px);
    }

    .mypage-section-divider {
        height: 1px;
        background: var(--divider-bg-hz);
        margin: 30px 0 20px;
    }

    .mypage-permissions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }

    .mypage-permission-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid var(--glass-border);
        background: rgba(148, 163, 184, 0.12);
        color: var(--text-main);
        font-size: 12px;
        font-weight: 700;
    }

    .mypage-permission-badge.engine-developer {
        background: rgba(239, 68, 68, 0.16);
        border-color: rgba(248, 113, 113, 0.35);
        color: #fecaca;
    }

    .mypage-settings-box {
        margin-top: 40px;
        padding-top: 22px;
        border-top: 1px solid var(--glass-border);
    }

    .mypage-section-title {
        margin: 0 0 14px 0;
        color: var(--text-title);
        font-size: 20px;
        font-weight: 700;
    }

    .mypage-setting-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
    }

    .mypage-setting-label {
        color: var(--text-title);
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .mypage-setting-help {
        color: var(--text-desc);
        font-size: 12px;
        line-height: 1.6;
        max-width: 540px;
    }

    .mypage-toggle-wrap {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--text-main);
        cursor: pointer;
        user-select: none;
        font-size: 14px;
    }

    .mypage-field-block {
        margin-bottom: 22px;
    }

    .mypage-field-label {
        display: block;
        color: var(--text-desc);
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .mypage-inline-row {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mypage-inline-row .win-input {
        margin: 0;
        flex: 1;
    }

    .mypage-action-btn,
    .mypage-danger-btn {
        border: 1px solid transparent;
        border-radius: 12px;
        font-family: inherit;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
    }

    .mypage-action-btn {
        width: 100px;
        flex-shrink: 0;
        align-self: stretch;
        color: #fff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
        border-color: rgba(255, 255, 255, 0.18);
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03)),
            linear-gradient(135deg, var(--theme-color), rgba(15, 23, 42, 0.92));
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.26);
    }

    .mypage-action-btn:hover,
    .mypage-danger-btn:hover {
        filter: brightness(1.08);
        transform: translateY(-2px);
    }

    .mypage-note {
        margin: 0 0 20px 0;
        padding: 14px 16px;
        border-radius: 14px;
        border: 1px solid var(--glass-border);
        background: rgba(0, 0, 0, 0.12);
        color: var(--text-desc);
        font-size: 13px;
        line-height: 1.7;
        word-break: keep-all;
    }

    .mypage-pledge-box {
        margin-bottom: 20px;
        padding: 18px 20px;
        border-radius: 16px;
        border: 1px solid var(--glass-border);
        background: rgba(0, 0, 0, 0.16);
        color: var(--text-main);
        font-size: 14px;
        line-height: 1.8;
        word-break: keep-all;
    }

    .mypage-danger-btn {
        width: 100%;
        padding: 14px 18px;
        color: #fff;
        background: linear-gradient(135deg, #dc3545, #ef4444);
        box-shadow: 0 12px 28px rgba(220, 53, 69, 0.28);
    }

    .login-container {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: calc(100vh);
        padding: 20px;
        box-sizing: border-box;
    }

    .view-section {
        background: var(--auth-bg);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border: 1px solid var(--glass-border);
        border-top: 1px solid var(--glass-border-light);
        border-left: 1px solid var(--glass-border-light);
        border-radius: 24px;
        padding: 40px;
        width: 100%;
        max-width: 360px;
        box-shadow: var(--glass-shadow), var(--glass-inset);
        text-align: center;
        box-sizing: border-box;
        animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        transition: background 0.3s ease;
    }

    .login-profile-circle {
        margin-bottom: 20px !important;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: var(--glass-bg);
        margin: 0 auto 30px auto;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 40px;
        color: white;
        box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
    }

    body.light-mode .login-profile-circle {
        color: var(--text-main);
        background: rgba(0, 0, 0, 0.05);
    }

    .btn-login-page {
        width: 100%;
        padding: 12px;
        background: var(--theme-color);
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: bold;
        font-family: inherit;
        font-size: 15px;
        transition: all 0.2s ease;
    }

    .btn-login-page:hover {
        filter: brightness(1.15);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(104, 159, 255, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    }

    #auth-screen { 
        width: 100%; 
        height: 100%; 
        position: fixed; 
        top: 0; 
        left: 0; 
        z-index: 2000; 
        background: rgba(0,0,0,0.6); 
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex; 
        flex-direction: column; 
        justify-content: center; 
        align-items: center; 
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }
    
    #auth-screen.show {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    #auth-screen .view-section {
        transform: scale(0.9) translateY(20px);
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    #auth-screen.show .view-section {
        transform: scale(1) translateY(0);
    }

    .win-input {
        width: 100%;
        padding: 14px 16px;
        margin-bottom: 18px;
        background: var(--auth-input-bg);
        border: 1px solid var(--glass-border);
        border-top: 1px solid rgba(0,0,0,0.1);
        border-left: 1px solid rgba(0,0,0,0.1);
        color: var(--text-main);
        border-radius: 6px;
        box-sizing: border-box;
        font-family: inherit;
        font-size: 15px;
        transition: all 0.2s ease;
        box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
    }
    
    .win-input:focus {
        outline: none;
        border-color: rgba(104, 159, 255, 0.6);
        box-shadow: inset 0 2px 6px rgba(0,0,0,0.2), 0 0 12px rgba(104, 159, 255, 0.3);
    }

    .auto-login-wrap {
        display: flex; 
        align-items: center; 
        margin-bottom: 25px; 
        justify-content: flex-start; 
        width: 100%; 
        text-align: left;
    }
    
    .btn-login {
        width: 100%;
        padding: 14px;
        background: var(--theme-color);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        cursor: pointer;
        font-weight: bold;
        font-family: inherit;
        font-size: 16px;
        transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: 0 6px 20px rgba(104, 159, 255, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    
    .btn-login:hover {
        filter: brightness(1.15);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(104, 159, 255, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    }
    
    .auth-links {
        margin-top: 20px;
        color: var(--text-desc);
        font-size: 14px;
        cursor: pointer;
        transition: color 0.2s;
    }
    
    .auth-links:hover {
        color: var(--text-main);
        text-shadow: var(--text-shadow);
    }

    .admin-only {
        display: none !important;
    }

    body.is-logged-in .admin-only {
        display: flex !important;
    }

    @media (max-width: 900px) {
        .site-notice-banner {
            flex-direction: column;
            gap: 14px;
            padding: 18px;
        }

        .site-notice-icon {
            width: 44px;
            height: 44px;
        }

        .top-bar {
            display: grid;
            grid-template-columns: 1fr 64px;
            grid-template-areas: 
                "weather profile"
                "stats stats";
            gap: 16px 0;
            padding: 20px;
        }
        
        .system-info {
            display: contents;
        }

        .weather-widget {
            grid-area: weather;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
            border-right: none;
            margin: 0;
            width: 100%;
            box-sizing: border-box;
        }

        .profile-icon {
            grid-area: profile;
            width: 100%;
            height: 100%;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
            margin: 0;
            border-left: none;
            border: none;
            border-radius: 16px;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }

        .stat-group {
            grid-area: stats;
            flex-direction: column;
            width: 100%;
            box-sizing: border-box;
            gap: 16px;
            padding: 20px;
        }

        .stat-item {
            width: 100%;
        }

        .divider {
            width: 100%;
            height: 1px;
            margin: 2px 0;
            background: var(--divider-bg-hz);
        }

        .action-container {
            align-self: flex-start;
            margin-top: 4px;
        }

        .main-content {
            padding: 20px;
            grid-template-columns: 1fr;
        }

        .mypage-profile-layout,
        .mypage-inline-row,
        .mypage-setting-row {
            flex-direction: column;
            align-items: stretch;
        }

        .mypage-avatar-panel {
            align-items: flex-start;
        }

        .mypage-avatar-help {
            text-align: left;
        }

        .mypage-action-btn {
            width: 100%;
            min-height: 48px;
        }
    }
.realtime-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.realtime-box {
    flex: 1;
    min-width: 300px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-left: 1px solid var(--glass-border-light);
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--glass-shadow), var(--glass-inset);
}

.realtime-box h3 {
    margin-top: 0;
    color: var(--text-title);
    font-size: 16px;
    margin-bottom: 15px;
    text-shadow: var(--text-shadow);
}

.realtime-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    max-height: 250px;
    overflow-y: auto;
    color: var(--text-main);
}

.realtime-box ul::-webkit-scrollbar {
    width: 6px;
    display: block;
}

.realtime-box ul::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

body.light-mode .realtime-box ul::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
}

.realtime-box li {
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.realtime-box li:last-child {
    border-bottom: none;
}

.realtime-box .rank {
    font-weight: bold;
    color: var(--btn-color-restart);
    min-width: 20px;
}

.realtime-box a {
    color: var(--text-main);
    text-decoration: none;
}

.realtime-box a:hover {
    text-decoration: underline;
}

#widget-calculator.calculator-widget {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    min-width: 0;
    width: 100%;
    justify-content: center;
}

#widget-calculator .calculator-panel {
    position: relative;
    width: min(100%, 380px);
    min-height: 640px;
    max-width: 380px;
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(126, 146, 255, 0.24), rgba(126, 146, 255, 0) 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
        linear-gradient(180deg, rgba(27, 34, 55, 0.86), rgba(15, 20, 33, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    color: #f8fafc;
}

#widget-calculator .calculator-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

#widget-calculator .calculator-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 24, 0.36);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 2;
}

#widget-calculator .calculator-overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}

#widget-calculator .calculator-drawer {
    position: absolute;
    top: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
    max-width: 290px;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.24s ease;
}

#widget-calculator .calculator-drawer-left {
    left: 10px;
    transform: translateX(-108%);
}

#widget-calculator .calculator-drawer-right {
    right: 10px;
    transform: translateX(108%);
}

#widget-calculator .calculator-drawer.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

#widget-calculator .calculator-drawer-glass {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05)),
        linear-gradient(180deg, rgba(29, 39, 66, 0.88), rgba(19, 24, 38, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    overflow: hidden;
}

#widget-calculator .calculator-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#widget-calculator .calculator-drawer-title-wrap {
    min-width: 0;
}

#widget-calculator .calculator-drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
}

#widget-calculator .calculator-drawer-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #b8c0d1;
}

#widget-calculator .calculator-drawer-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#widget-calculator .calculator-drawer-icon-btn,
#widget-calculator .calculator-chrome-btn,
#widget-calculator .calculator-app-hint {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #eef2ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#widget-calculator .calculator-drawer-icon-btn,
#widget-calculator .calculator-chrome-btn,
#widget-calculator .calculator-app-hint {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

#widget-calculator .calculator-drawer-icon-btn:hover,
#widget-calculator .calculator-chrome-btn:hover,
#widget-calculator .calculator-app-hint:hover,
#widget-calculator .calculator-chrome-btn.active,
#widget-calculator .calculator-app-hint.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#widget-calculator .calculator-drawer-scroll,
#widget-calculator .calculator-history-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

#widget-calculator .calculator-drawer-scroll {
    padding: 8px 12px 16px;
}

#widget-calculator .calculator-drawer-section {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

#widget-calculator .calculator-drawer-kicker {
    padding: 0 6px;
    color: #98a3bb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

#widget-calculator .calculator-nav-item {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #eef2ff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

#widget-calculator .calculator-nav-item:hover:not([disabled]),
#widget-calculator .calculator-nav-item.active {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

#widget-calculator .calculator-nav-item[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

#widget-calculator .calculator-nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    flex-shrink: 0;
}

#widget-calculator .calculator-app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#widget-calculator .calculator-app-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

#widget-calculator .calculator-app-label {
    min-width: 0;
    flex: 1;
}

#widget-calculator .calculator-app-mode {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
}

#widget-calculator .calculator-app-caption {
    margin-bottom: 4px;
    color: #afbad1;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#widget-calculator .calculator-memory-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

#widget-calculator .calculator-shared-shell {
    display: grid;
    gap: 14px;
}

#widget-calculator .calculator-mode-stack {
    display: grid;
    gap: 12px;
}

#widget-calculator .calculator-mode-panel {
    display: none;
    gap: 12px;
}

#widget-calculator .calculator-mode-panel.active {
    display: grid;
}

#widget-calculator .calculator-grid-secondary {
    margin-bottom: 2px;
}

#widget-calculator .calculator-scientific-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#widget-calculator .calculator-angle-toggle,
#widget-calculator .calculator-tool-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#widget-calculator .calculator-angle-toggle:hover,
#widget-calculator .calculator-tool-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#widget-calculator .calculator-mode-note {
    color: #b3bed3;
    font-size: 12px;
    line-height: 1.6;
}

#widget-calculator .calculator-programmer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#widget-calculator .calculator-programmer-card,
#widget-calculator .calculator-result-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#widget-calculator .calculator-programmer-card span,
#widget-calculator .calculator-result-card span {
    color: #b3bed3;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#widget-calculator .calculator-programmer-card strong,
#widget-calculator .calculator-result-card strong {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    word-break: break-all;
}

#widget-calculator .calculator-tool-mode {
    display: none;
    gap: 12px;
}

#widget-calculator .calculator-tool-mode.active {
    display: grid;
}

#widget-calculator .calculator-inline-form,
#widget-calculator .calculator-form-grid {
    display: grid;
    gap: 10px;
}

#widget-calculator .calculator-inline-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

#widget-calculator .calculator-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#widget-calculator .calculator-form-grid-tight {
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.8fr));
}

#widget-calculator .calculator-field-group {
    display: grid;
    gap: 8px;
}

#widget-calculator .calculator-field-group-wide {
    grid-column: span 1;
}

#widget-calculator .calculator-field-label {
    color: #b8c0d1;
    font-size: 12px;
    font-weight: 700;
}

#widget-calculator .calculator-tool-input,
#widget-calculator .calculator-tool-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    padding: 12px 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

#widget-calculator .calculator-tool-input:focus,
#widget-calculator .calculator-tool-select:focus {
    border-color: rgba(117, 212, 245, 0.42);
    background: rgba(255, 255, 255, 0.12);
}

#widget-calculator .calculator-tool-select option {
    color: #111827;
}

#widget-calculator .calculator-tool-meta {
    color: #afbad1;
    font-size: 12px;
    line-height: 1.6;
}

#widget-calculator .calculator-graph-canvas {
    width: 100%;
    height: 240px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#widget-calculator .calculator-memory-key,
#widget-calculator .calculator-key,
#widget-calculator .calculator-history-item {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

#widget-calculator .calculator-memory-key {
    min-height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #b8c0d1;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#widget-calculator .calculator-memory-key:hover,
#widget-calculator .calculator-memory-key.active,
#widget-calculator .calculator-memory-row.has-memory .calculator-memory-key {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.16);
}

#widget-calculator .calculator-display-shell {
    position: relative;
    padding: 16px 12px 14px;
    min-height: 122px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
        rgba(8, 12, 20, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#widget-calculator .calculator-memory-indicator {
    position: absolute;
    left: 12px;
    top: 14px;
    color: #98a9ff;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.15s ease;
}

#widget-calculator .calculator-memory-indicator.active {
    opacity: 1;
}

#widget-calculator .calculator-history-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 12px 12px 12px;
}

#widget-calculator .calculator-history-tab {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #b8c0d1;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#widget-calculator .calculator-history-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

#widget-calculator .calculator-history-tab.active {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
        linear-gradient(135deg, rgba(92, 210, 239, 0.26), rgba(104, 159, 255, 0.22));
    color: #ffffff;
    border-color: rgba(117, 212, 245, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 18px rgba(0, 0, 0, 0.12);
}

#widget-calculator .calculator-memory-panel {
    display: grid;
    gap: 12px;
    padding: 12px;
}

#widget-calculator .calculator-memory-panel-state {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    display: grid;
    gap: 6px;
}

#widget-calculator .calculator-memory-panel-label {
    color: #b3bed3;
    font-size: 12px;
    font-weight: 700;
}

#widget-calculator .calculator-memory-panel-value {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    word-break: break-all;
}

#widget-calculator .calculator-memory-panel-copy {
    color: #8ea0bb;
    font-size: 12px;
    line-height: 1.5;
}

#widget-calculator .calculator-memory-panel-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#widget-calculator .calculator-expression {
    min-height: 18px;
    color: #b3bed3;
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#widget-calculator .calculator-display {
    margin-top: 10px;
    color: #ffffff;
    font-size: clamp(44px, 7vw, 56px);
    font-weight: 700;
    line-height: 1.05;
    text-align: right;
    letter-spacing: -0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

#widget-calculator .calculator-display.error {
    color: #fca5a5;
}

#widget-calculator .calculator-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

#widget-calculator .calculator-key {
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)),
        rgba(255, 255, 255, 0.03);
    color: #f8fafc;
    font-family: inherit;
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 18px rgba(0, 0, 0, 0.08);
}

#widget-calculator .calculator-key:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07)),
        rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
}

#widget-calculator .calculator-key:active {
    transform: translateY(1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 12px rgba(0, 0, 0, 0.08);
}

#widget-calculator .calculator-key i {
    font-size: 16px;
}

#widget-calculator .calculator-key-muted,
#widget-calculator .calculator-key-function,
#widget-calculator .calculator-key-operator {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
        rgba(5, 9, 18, 0.18);
}

#widget-calculator .calculator-key-equals {
    width: 100%;
    padding: 12px;
    background: var(--theme-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s ease;
}

#widget-calculator .calculator-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}

#widget-calculator .calculator-history-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

#widget-calculator .calculator-history-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

#widget-calculator .calculator-history-expression {
    color: #b3bed3;
    font-size: 12px;
}

#widget-calculator .calculator-history-result {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

#widget-calculator .calculator-history-empty {
    min-height: 100%;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #b9c2d4;
}

#widget-calculator .calculator-history-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    margin-bottom: 14px;
}

#widget-calculator .calculator-history-empty-title {
    color: #f8fafc;
    font-size: 15px;
    font-weight: 700;
}

#widget-calculator .calculator-history-empty-copy {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
}

body.light-mode #widget-calculator .calculator-panel,
body.light-mode #widget-calculator .calculator-drawer-glass {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.3)),
        linear-gradient(180deg, rgba(225, 234, 248, 0.92), rgba(241, 246, 255, 0.84));
    color: #1f2937;
}

body.light-mode #widget-calculator .calculator-display,
body.light-mode #widget-calculator .calculator-drawer-title,
body.light-mode #widget-calculator .calculator-app-mode,
body.light-mode #widget-calculator .calculator-nav-item,
body.light-mode #widget-calculator .calculator-key,
body.light-mode #widget-calculator .calculator-history-tab,
body.light-mode #widget-calculator .calculator-history-result,
body.light-mode #widget-calculator .calculator-memory-panel-value,
body.light-mode #widget-calculator .calculator-history-empty-title {
    color: #1f2937;
}

body.light-mode #widget-calculator .calculator-key,
body.light-mode #widget-calculator .calculator-memory-key,
body.light-mode #widget-calculator .calculator-history-tab,
body.light-mode #widget-calculator .calculator-history-item,
body.light-mode #widget-calculator .calculator-nav-item,
body.light-mode #widget-calculator .calculator-display-shell,
body.light-mode #widget-calculator .calculator-programmer-card,
body.light-mode #widget-calculator .calculator-result-card,
body.light-mode #widget-calculator .calculator-tool-input,
body.light-mode #widget-calculator .calculator-tool-select,
body.light-mode #widget-calculator .calculator-angle-toggle,
body.light-mode #widget-calculator .calculator-tool-btn,
body.light-mode #widget-calculator .calculator-graph-canvas,
body.light-mode #widget-calculator .calculator-memory-panel-state {
    background: rgba(255, 255, 255, 0.5);
}

body.light-mode #widget-calculator .calculator-history-tab.active {
    background: rgba(255, 255, 255, 0.7);
}

body.light-mode #widget-calculator .calculator-expression,
body.light-mode #widget-calculator .calculator-history-expression,
body.light-mode #widget-calculator .calculator-memory-indicator,
body.light-mode #widget-calculator .calculator-memory-panel-label,
body.light-mode #widget-calculator .calculator-memory-panel-copy,
body.light-mode #widget-calculator .calculator-history-empty-copy {
    color: #64748b;
}

body.light-mode #widget-calculator .calculator-history-empty-icon {
    background: rgba(255, 255, 255, 0.6);
    color: #64748b;
}

body.light-mode #widget-calculator .calculator-mode-note,
body.light-mode #widget-calculator .calculator-tool-meta,
body.light-mode #widget-calculator .calculator-field-label,
body.light-mode #widget-calculator .calculator-programmer-card span,
body.light-mode #widget-calculator .calculator-result-card span {
    color: #475569;
}

@media (max-width: 480px) {
    .category-title-interactive {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-toggle {
        align-self: flex-end;
    }

    #widget-calculator .calculator-panel {
        width: 100%;
        min-height: 600px;
        border-radius: 22px;
    }

    #widget-calculator .calculator-main {
        padding: 12px;
    }

    #widget-calculator .calculator-display {
        font-size: 42px;
    }

    #widget-calculator .calculator-key {
        min-height: 48px;
        font-size: 20px;
        border-radius: 14px;
    }

    #widget-calculator .calculator-form-grid,
    #widget-calculator .calculator-form-grid-tight,
    #widget-calculator .calculator-inline-form,
    #widget-calculator .calculator-programmer-grid {
        grid-template-columns: 1fr;
    }

    #widget-calculator .calculator-drawer {
        width: calc(100% - 12px);
        top: 6px;
        bottom: 6px;
        left: 6px;
        right: 6px;
        max-width: none;
    }

    #widget-calculator .calculator-drawer-left,
    #widget-calculator .calculator-drawer-right {
        transform: translateY(105%);
    }

    #widget-calculator .calculator-drawer.active {
        transform: translateY(0);
    }
}

.trend-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.trend-fade-out {
    opacity: 0 !important;
    transform: translateY(-5px) !important;
}
#trend-list {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    box-sizing: border-box;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}
@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.perm-item {
    opacity: 0;
    animation: slideDownFade 0.3s ease-out forwards;
.xterm .xterm-cursor.xterm-cursor-blink {
    animation: xterm-cursor-blink 1.06s step-end infinite !important;
}
@keyframes xterm-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}