/* FixMe workspace: modular forms, clear readings and locally bundled type. */
@font-face { font-family: 'DM Sans'; src: url('assets/fonts/dm-sans-regular.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('assets/fonts/dm-sans-medium.ttf') format('truetype'); font-style: normal; font-weight: 500 800; font-display: swap; }
:root {
    color-scheme: light;
    --frame: #2c2331;
    --bg-primary: #f8f5ec;
    --bg-secondary: #f1ede4;
    --bg-card: #eee8df;
    --bg-hover: #e8e2d8;
    --accent-orange: #302636;
    --accent-blue: #417261;
    --light-blue: #c9dfd1;
    --cream: #f8f5ec;
    --white: #f8f5ec;
    --mint: #c9dfd1;
    --rose: #f1dcd5;
    --yellow: #f2dd8e;
    --coral: #ee816d;
    --text-primary: #302636;
    --text-secondary: #665f68;
    --text-muted: #716b73;
    --border-color: #dcd5ce;
    --success: #35604e;
    --warning: #795b1c;
    --danger: #a43d41;
    --radius: 12px;
    --z-header: 10;
    --z-backdrop: 20;
    --z-panel: 30;
    --z-dialog: 40;
    --z-toast: 50;
}
* { box-sizing: border-box; }
html { scrollbar-color: #8d8391 var(--frame); scrollbar-width: thin; }
body { margin: 0; padding: 18px; min-width: 320px; min-height: 100dvh; background: var(--frame); color: var(--text-primary); font-family: 'DM Sans', 'Segoe UI', sans-serif; font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; transition: background 160ms ease, border-color 160ms ease, color 160ms ease; }
button, a { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:not(:disabled):active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1, h2 { text-wrap: balance; }
svg { flex-shrink: 0; }
.skip-link { position: fixed; top: -70px; left: 28px; padding: 12px 20px; background: var(--yellow); color: var(--text-primary); z-index: 60; border-radius: 6px; }
.skip-link:focus { top: 8px; }
.header { max-width: 1440px; height: 76px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 42px; background: var(--bg-primary); border-radius: 14px 14px 0 0; }
.logo { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--text-primary); flex-shrink: 0; }
.logo-icon { display: grid; place-items: center; width: 32px; height: 32px; }
.logo-icon svg { width: 29px; height: 29px; }
.logo-text { font-size: 30px; font-weight: 500; letter-spacing: -1.7px; line-height: 1; }
.logo-text > span { font-weight: inherit; }
.logo-period { display: none; }
.primary-nav { display: flex; align-items: center; gap: 3px; flex: 1; }
.nav-item { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 6px; padding: 10px 13px; background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 500; white-space: nowrap; }
.nav-item svg { width: 16px; height: 16px; }
.nav-item:hover { color: var(--text-primary); background: var(--bg-secondary); }
.nav-item.is-active { color: var(--text-primary); background: var(--mint); }
.header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.icon-btn, .lang-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 38px; min-width: 38px; border: 1px solid var(--border-color); border-radius: 7px; background: transparent; color: var(--text-primary); }
.icon-btn { width: 38px; }
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn { padding: 0 10px; font-size: 12px; }
.lang-flag { color: var(--text-secondary); }
.icon-btn:hover, .lang-btn:hover { background: var(--bg-hover); }
.app-shell { max-width: 1440px; margin: 0 auto; min-height: calc(100dvh - 112px); display: flex; flex-direction: column; background: var(--bg-primary); border-radius: 0 0 14px 14px; }
.content { flex: 1; padding: 28px 32px 24px; min-width: 0; outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading h1 { font-size: clamp(29px, 3.1vw, 42px); line-height: 1.12; letter-spacing: -1.6px; font-weight: 500; }
.page-heading p { margin-top: 10px; max-width: 65ch; color: var(--text-secondary); font-size: 13px; }
.connection-status { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.connection-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.connection-status[data-state='live'] .connection-dot { background: var(--success); }
.connection-status[data-state='offline'] .connection-dot, .connection-status[data-state='preview'] .connection-dot { background: var(--text-muted); }
[data-panel='overview'] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 29%); gap: 18px 24px; }
[data-panel='overview'] > .section-header { grid-column: 1; grid-row: 1; margin: 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 15px; }
.section-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.section-link { display: inline-flex; align-items: center; gap: 7px; padding: 5px 0; border: 0; background: transparent; color: var(--text-secondary); font-size: 12px; text-decoration: none; }
.section-link svg { width: 14px; height: 14px; }
.section-link:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.hw-live-badge { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-secondary); }
.hw-live-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.hardware-grid { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hardware-card { position: relative; min-width: 0; min-height: 230px; padding: 20px 18px 18px; border-radius: 8px; background: var(--mint); display: flex; flex-direction: column; }
#hw-mem { background: var(--rose); }
#hw-gpu { background: var(--yellow); }
.hardware-label { order: -1; margin-bottom: 24px; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.gauge-ring { height: 62px; margin-bottom: 16px; }
.gauge-ring > svg { display: none; }
.gauge-ring-text { font-size: clamp(42px, 4.2vw, 62px); line-height: 1; font-weight: 400; letter-spacing: -2.5px; font-variant-numeric: tabular-nums; }
.hardware-value { font-size: 11px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.hw-percent { font-size: 10px; color: #5c525d; margin: 5px 0 16px; }
.hardware-usage { margin-top: auto; height: 4px; overflow: hidden; background: #3026361a; border-radius: 2px; }
.hardware-usage-bar { height: 100%; transition: width 400ms ease; }
.hardware-usage-bar.low { background: var(--text-primary); }
.hardware-usage-bar.medium { background: var(--warning); }
.hardware-usage-bar.high { background: var(--danger); }
.gpu-native-badge { font-size: 9px; font-weight: 400; margin-left: 4px; }
.status-banner { grid-column: 2; grid-row: 1 / span 2; position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 22px 24px; border-radius: 9px; background: var(--text-primary); color: var(--cream); }
.status-indicator { width: 104px; height: 78px; margin: -3px 0 16px auto; }
.status-category { position: absolute; top: 23px; left: 24px; color: #ded4df; font-size: 11px; }
.status-indicator svg { display: block; width: 100%; height: 100%; }
.status-info { margin-top: auto; margin-bottom: 20px; }
.status-title { max-width: 16ch; font-weight: 400; font-size: 25px; line-height: 1.15; letter-spacing: -.7px; }
.status-subtitle { max-width: 30ch; font-size: 11px; line-height: 1.6; color: #ded4df; margin-top: 9px; }
.scan-btn, .ai-action-btn, .profile-save-btn, .winopt-deepai-btn-primary { display: inline-flex; gap: 9px; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid transparent; border-radius: 6px; background: var(--text-primary); color: var(--cream); font-size: 13px; font-weight: 500; }
.scan-btn { width: 100%; background: var(--cream); color: var(--text-primary); font-size: 12px; padding: 10px 16px; }
.scan-btn svg, .ai-action-btn svg { width: 17px; height: 17px; }
.scan-btn:hover:not(:disabled) { background: var(--yellow); }
.ai-action-btn:hover:not(:disabled), .profile-save-btn:hover:not(:disabled), .winopt-deepai-btn-primary:hover:not(:disabled) { background: #4d3d54; }
.scan-btn:focus-visible { outline-color: var(--yellow); }
.overview-lower { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 29%); gap: 24px; margin-top: 10px; }
.apps-section { min-width: 0; }
.apps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.app-card { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 4px 10px; min-width: 0; padding: 11px 0; border-bottom: 1px solid var(--border-color); }
.app-icon { grid-column: 1; grid-row: 1 / span 2; display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 8px; background: var(--bg-hover); }
.app-card:nth-child(3n + 1) .app-icon { background: var(--mint); }
.app-card:nth-child(3n + 2) .app-icon { background: var(--rose); }
.app-icon img { height: 100%; width: 100%; object-fit: contain; }
.app-icon-fallback { font-size: 13px; font-weight: 500; }
.app-name { grid-column: 2; grid-row: 1; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-time { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-size: 10px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-usage-bar { grid-column: 2; grid-row: 2; height: 2px; overflow: hidden; background: var(--border-color); }
.app-usage-fill { height: 100%; background: var(--accent-blue); }
.apps-loading, .apps-empty, .empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 174px; gap: 10px; text-align: center; padding: 32px 24px; border: 1px dashed var(--border-color); border-radius: 9px; color: var(--text-secondary); font-size: 13px; }
.empty-state { min-height: 270px; background: var(--bg-secondary); border: 0; }
.empty-state h2 { font-size: 23px; font-weight: 400; color: var(--text-primary); letter-spacing: -.6px; }
.empty-state p { max-width: 50ch; line-height: 1.7; }
.empty-state > svg { width: 32px; height: 32px; color: var(--text-secondary); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border-color); border-top-color: var(--text-primary); border-radius: 50%; animation: spin .8s linear infinite; }
.workspace-guide { padding: 0 0 0 22px; border-left: 1px solid var(--border-color); }
.guide-symbol { display: none; }
.workspace-guide h2 { font-size: 17px; font-weight: 500; letter-spacing: -.4px; }
.workspace-guide > p { font-size: 11px; color: var(--text-secondary); line-height: 1.6; margin: 8px 0 12px; max-width: 38ch; }
.workspace-shortcut { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; border: 0; padding: 10px 0; background: transparent; color: var(--text-primary); }
.shortcut-icon { width: 29px; height: 29px; display: grid; place-items: center; background: var(--mint); border-radius: 6px; }
.workspace-shortcut:nth-of-type(2) .shortcut-icon { background: var(--yellow); }
.shortcut-icon svg { width: 15px; height: 15px; }
.workspace-shortcut > span:nth-child(2) { flex: 1; min-width: 0; }
.workspace-shortcut strong { display: block; font-size: 12px; font-weight: 500; }
.workspace-shortcut small { display: block; font-size: 10px; color: var(--text-secondary); margin-top: 3px; }
.workspace-shortcut > svg { width: 14px; height: 14px; }
.workspace-shortcut:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.workspace-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 11px; margin-top: 2px; }
.workspace-note svg { width: 13px; height: 13px; }
.app-footer { display: flex; align-items: center; gap: 24px; margin: 0 32px; padding: 16px 0; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 10px; }
.app-footer > span:first-child { color: var(--text-primary); font-weight: 500; }
.version-label { color: var(--text-secondary); font-weight: 400; margin-left: 5px; }
.app-footer > button { margin-left: auto; }
.preview-notice { display: flex; align-items: center; gap: 7px; margin: -11px 0 22px; color: var(--text-secondary); font-size: 10px; }
.preview-notice::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@media (min-width: 1400px) { .header { padding: 0 42px; } .content { padding-left: 42px; padding-right: 42px; } .app-footer { margin: 0 42px; } .hardware-card { min-height: 240px; } }
@media (max-width: 1020px) {
    body { padding: 12px; }
    .header { padding: 0 24px; gap: 20px; }
    .nav-item { padding: 9px; font-size: 12px; }
    .nav-item svg { display: none; }
    .content { padding: 24px; }
    .app-footer { margin: 0 24px; }
    [data-panel='overview'], .overview-lower { grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; }
    .hardware-card { padding: 17px 14px; min-height: 220px; }
    .hardware-label { font-size: 12px; margin-bottom: 20px; }
    .hardware-value { font-size: 10px; }
    .status-banner { padding: 20px; }
    .status-title { font-size: 24px; }
    .apps-grid { gap: 0 16px; }
    .app-card { grid-template-columns: 28px minmax(0, 1fr); gap: 3px 8px; }
    .app-icon { width: 28px; height: 28px; }
    .app-time { grid-column: 2; grid-row: 2; font-size: 10px; }
    .app-usage-bar { display: none; }
    .workspace-guide { padding-left: 18px; }
}
@media (max-width: 760px) {
    body { padding: 0; background: var(--bg-primary); }
    .header { height: auto; min-height: 76px; gap: 16px; flex-wrap: wrap; padding: 18px 20px 0; border-radius: 0; }
    .logo-text { font-size: 28px; }
    .primary-nav { order: 1; flex-basis: 100%; justify-content: space-between; padding: 4px 0 16px; }
    .nav-item { flex: 1; justify-content: center; font-size: 11px; padding: 9px 5px; }
    .header-actions { margin-left: auto; }
    .content { padding: 22px 20px; }
    .page-heading { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 26px; }
    .page-heading h1 { font-size: 34px; letter-spacing: -1.2px; }
    .page-heading p { font-size: 12px; }
    [data-panel='overview'] { grid-template-columns: 1fr; }
    .status-banner { grid-column: 1; grid-row: 3; min-height: 208px; padding: 24px; }
    .status-indicator { position: absolute; top: 16px; right: 20px; width: 90px; height: 76px; margin: 0; }
    .status-info { max-width: calc(100% - 94px); margin: 28px 0 20px; }
    .scan-btn { width: auto; min-width: 160px; margin-top: auto; }
    .overview-lower { grid-row: 4; grid-template-columns: 1fr; gap: 26px; }
    .workspace-guide { border: 0; padding: 22px 0 0; border-top: 1px solid var(--border-color); }
    .workspace-guide > p { max-width: 55ch; }
    .workspace-shortcut { max-width: 440px; }
    .hardware-card { min-height: 210px; }
    .app-footer { margin: 0 20px; }
    .app-footer > span:nth-child(2) { display: none; }
    .apps-grid { gap: 0 20px; }
}
@media (max-width: 450px) {
    .hardware-grid { grid-template-columns: 1fr; gap: 9px; }
    .hardware-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; min-height: 146px; padding: 18px; }
    .hardware-label { grid-column: 1; margin-bottom: 16px; }
    .gauge-ring { grid-column: 2; grid-row: 1 / span 3; margin: 12px 0 0; height: auto; align-self: center; }
    .gauge-ring-text { font-size: 48px; }
    .hardware-value { grid-column: 1; font-size: 11px; }
    .hw-percent { grid-column: 1; font-size: 10px; margin-bottom: 12px; }
    .hardware-usage { grid-column: 1 / -1; width: 100%; }
    .status-title { font-size: 23px; }
    .apps-grid { grid-template-columns: 1fr; }
    .app-card { grid-template-columns: 32px minmax(0, 1fr) auto; }
    .app-time { grid-column: 3; grid-row: 1 / span 2; }
}

/* Secondary workspaces use the same paper, mint and plum system as the overview. */
.section-intro { max-width: 76ch; color: var(--text-secondary); font-size: 14px; line-height: 1.7; margin-bottom: 24px; }
.basic-bundle-info { padding: 17px 20px; background: #e4ebdf; border: 0; border-left: 3px solid #638875; border-radius: 0 8px 8px 0; color: #3b5146; font-size: 13px; line-height: 1.65; margin-bottom: 18px; }
.optimization-progress { padding: 21px 24px; border: 1px solid #d8c78e; border-radius: 10px; background: #f3e6b5; margin-bottom: 26px; color: var(--text-primary); }
.optimization-progress-header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.optimization-progress-header strong { font-size: 15px; font-weight: 500; }
#optimizationElapsed { font-size: 12px; color: #66573f; font-variant-numeric: tabular-nums; white-space: nowrap; }
#optimizationProgressDetail { margin-top: 8px; font-size: 13px; color: #66573f; line-height: 1.65; max-width: 90ch; }
#optimizationProgressBar { display: block; margin-top: 16px; width: 100%; height: 5px; accent-color: var(--accent-orange); border: 0; border-radius: 5px; overflow: hidden; }
#optimizationProgressBar::-webkit-progress-bar { background: #ddcfa6; }
#optimizationProgressBar::-webkit-progress-value { background: var(--accent-orange); border-radius: 5px; }
.optimization-progress[data-state="failed"], .optimization-progress[data-state="blocked"] { border-color: #d4a3a0; background: #f4dcda; }
.optimization-progress[data-state="failed"] #optimizationProgressDetail, .optimization-progress[data-state="blocked"] #optimizationProgressDetail,
.optimization-progress[data-state="failed"] #optimizationElapsed, .optimization-progress[data-state="blocked"] #optimizationElapsed { color: #7f4145; }
.optimization-progress[data-state="completed"] { border-color: #a6c3ae; background: #e2ecdf; }
.optimization-progress[data-state="completed"] #optimizationProgressDetail, .optimization-progress[data-state="completed"] #optimizationElapsed { color: #3d604a; }
[data-panel="optimize"] > .section-header:first-of-type { margin-top: 0 !important; }
.winopt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--border-color); margin-bottom: 34px; }
.winopt-card { display: flex; align-items: center; gap: 18px; min-width: 0; min-height: 88px; border: 0; border-bottom: 1px solid var(--border-color); border-left: 3px solid transparent; border-radius: 0; padding: 18px 16px 18px 13px; background: transparent; }
.winopt-card.active, .winopt-card[data-state="applied"] { background: #e7eee3; border-left-color: #64836a; }
.winopt-card[data-state="busy"] { background: #f3e6b5; border-left-color: #a17d2d; }
.winopt-card[data-state="error"] { background: #f4dcda; border-left-color: var(--danger); }
.winopt-card-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; background: var(--bg-card) !important; color: var(--text-primary); border-radius: 10px; }
.winopt-card-icon svg { width: 20px; height: 20px; stroke: currentColor; }
.winopt-card.active .winopt-card-icon, .winopt-card[data-state="applied"] .winopt-card-icon { background: #cfdfca !important; color: #35604e; }
.winopt-card[data-state="busy"] .winopt-card-icon { background: #e7d59b !important; color: #795b1c; }
.winopt-card-info { flex: 1; min-width: 0; }
.winopt-card-title { font-size: 15px; font-weight: 500; line-height: 1.35; }
.winopt-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin-top: 5px; }
.winopt-card-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.winopt-apply-btn, .winopt-revert-btn, .winopt-bundle-btn, .winopt-gameboost-btn, .winopt-deepai-btn-secondary, .ml-apply-btn { min-height: 36px; border: 1px solid #bfb5bf; border-radius: 7px; padding: 8px 15px; color: var(--text-primary); background: transparent; font-size: 13px; line-height: 1.3; font-weight: 500; white-space: nowrap; }
.winopt-apply-btn:hover:not(:disabled), .winopt-bundle-btn:hover:not(:disabled), .winopt-gameboost-btn:hover:not(:disabled), .ml-apply-btn:hover:not(:disabled), .winopt-deepai-btn-secondary:hover:not(:disabled) { border-color: var(--accent-orange); background: #e8e0e6; color: var(--accent-orange); }
.winopt-revert-btn { border-color: transparent; color: var(--text-secondary); padding-inline: 9px; }
.winopt-revert-btn:hover:not(:disabled) { color: var(--text-primary); background: var(--bg-card); }
.winopt-bundle-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-color: var(--accent-orange); background: var(--accent-orange); color: var(--bg-primary); }
.winopt-bundle-btn:hover:not(:disabled) { background: #4b3c50; color: var(--bg-primary); }
.winopt-kill-list { border: 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); background: transparent; border-radius: 0; padding: 0 16px; margin-bottom: 30px; }
.winopt-kill-loading { font-size: 14px; color: var(--text-muted); line-height: 1.6; padding: 24px 0; }
.winopt-kill-warning { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin: 18px 0 6px; max-width: 85ch; }
.winopt-kill-item { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--border-color); padding: 17px 0; min-width: 0; }
.winopt-kill-item:last-child { border-bottom: 0; }
.winopt-kill-name { font-size: 14px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.winopt-kill-cpu { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.winopt-kill-btn { min-height: 34px; border: 1px solid #cda8a6; background: transparent; color: var(--danger); border-radius: 7px; padding: 7px 12px; font-size: 12px; flex-shrink: 0; }
.winopt-kill-btn:hover:not(:disabled) { background: #f4dcda; border-color: var(--danger); }
.winopt-gameboost { border: 0; border-radius: 10px; padding: 24px; background: #e7e0d9; }
.winopt-gameboost-header { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; margin-bottom: 17px; }
.winopt-gameboost-row, .winopt-deepai-refine { display: flex; align-items: stretch; gap: 10px; }
.winopt-gameboost-input, .profile-text-input { flex: 1; min-width: 0; width: 100%; min-height: 42px; padding: 11px 13px; background: var(--bg-primary); color: var(--text-primary); border: 1px solid #c9c0b9; border-radius: 7px; font-size: 14px; line-height: 1.5; }
input::placeholder { color: var(--text-muted); }
.ml-section { margin-bottom: 32px; }
.ml-message { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.ml-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 16px; font-weight: 500; }
.ml-section-title svg { width: 19px; height: 19px; color: var(--text-primary); }
.ml-grid { display: grid; grid-template-columns: 1.12fr 1fr 1fr; gap: 14px; }
.ml-card { border: 0; border-radius: 10px; padding: 24px; background: var(--bg-secondary); min-width: 0; }
#ml-prediction-card { background: #c9dfd1; }
#ml-model-card { border: 1px solid var(--border-color); }
#ml-usage-card { background: #f2dd8e; }
.ml-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; }
.ml-card-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 0; background: transparent; color: var(--text-primary); }
.ml-card-icon svg { width: 22px; height: 22px; }
.ml-card-label { font-size: 14px; font-weight: 500; }
.ml-status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.5; color: #62501f; margin-bottom: 15px; }
.ml-status-pill.active { color: var(--success); }
.ml-status-dot { background: currentColor; width: 6px; height: 6px; border-radius: 50%; }
.ml-pred-item, .ml-usage-item { margin-bottom: 16px; }
.ml-pred-item:last-child, .ml-usage-item:last-child { margin-bottom: 0; }
.ml-pred-row, .ml-usage-label { display: flex; justify-content: space-between; gap: 12px; color: #514b4e; font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
.ml-pred-bar-bg, .ml-usage-bar-bg { height: 4px; background: #30263620; overflow: hidden; border-radius: 4px; }
.ml-pred-bar, .ml-usage-bar { height: 100%; background: var(--accent-blue); border-radius: 4px; }
.ml-pred-bar.orange { background: var(--accent-orange); }
.ml-stats-row { display: flex; flex-wrap: wrap; gap: 22px; }
.ml-stat-val { font-size: clamp(32px, 3.5vw, 44px); line-height: 1; font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: -1.8px; }
.ml-stat-lbl { font-size: 12px; color: var(--text-secondary); margin-top: 10px; }
.ml-apply-btn { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 21px; }
.ml-apply-btn svg { width: 15px; height: 15px; }
.winopt-ai-badge { font-size: 11px; color: var(--text-secondary); border: 1px solid var(--border-color); padding: 5px 10px; border-radius: 5px; }
.winopt-deepai-card { padding: 28px; border: 1px solid var(--border-color); background: transparent; border-radius: 10px; }
.winopt-deepai-idle { max-width: 680px; text-align: left; padding: 3px 0; }
.winopt-deepai-idle > svg { color: var(--text-primary); }
.winopt-deepai-idle > p { max-width: 60ch; margin: 17px 0 23px; color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.winopt-deepai-actions { display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; }
.winopt-deepai-result-header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; font-size: 18px; font-weight: 500; margin-bottom: 20px; }
.winopt-deepai-section { margin-bottom: 24px; }
.winopt-deepai-section-title { font-size: 15px; font-weight: 500; color: var(--text-primary); margin-bottom: 10px; }
.winopt-deepai-item { font-size: 14px; line-height: 1.65; color: var(--text-secondary); border-bottom: 1px solid var(--border-color); padding: 13px 0; overflow-wrap: anywhere; }
.winopt-deepai-refine { margin-top: 25px; }
.deepai-plan-item { padding: 20px 0; border-bottom: 1px solid var(--border-color); }
.deepai-plan-title { font-size: 15px; font-weight: 500; }
.deepai-plan-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-top: 8px; overflow-wrap: anywhere; }
.deepai-predictions { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 24px; }
.deepai-pred-val { font-size: 34px; line-height: 1.2; font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.deepai-pred-label { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.bottleneck-dialog { max-width: calc(100% - 32px); font-size: 14px; }
.bottleneck-dialog::backdrop { background: #2c233180; }
.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-list > .empty-state { background: var(--bg-secondary); border-style: solid; padding-block: 64px; }
.activity-item { display: flex; gap: 16px; align-items: flex-start; padding: 22px 4px; border-bottom: 1px solid var(--border-color); }
.activity-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: var(--success); background: #dbe7d7; flex-shrink: 0; }
.activity-icon svg { width: 19px; height: 19px; }
.activity-content { min-width: 0; }
.activity-title { font-size: 15px; font-weight: 500; line-height: 1.5; }
.activity-time { font-size: 12px; color: var(--text-muted); line-height: 1.65; margin-top: 6px; overflow-wrap: anywhere; }
.ai-panel { position: fixed; top: 0; right: 0; width: min(420px, 100%); height: 100dvh; background: var(--bg-primary); color: var(--text-primary); border-left: 1px solid var(--border-color); z-index: var(--z-panel); display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform 220ms ease, visibility 220ms; }
.ai-panel.open { transform: translateX(0); visibility: visible; }
.ai-overlay { position: fixed; inset: 0; background: #2c233180; z-index: var(--z-backdrop); display: none; }
.ai-overlay.active { display: block; }
.ai-header { padding: 28px 25px 24px; border-bottom: 1px solid var(--border-color); }
.panel-close { float: right; margin: -4px -5px 0 0; }
.ai-title { display: flex; align-items: center; gap: 10px; font-size: 21px; line-height: 1.3; font-weight: 500; letter-spacing: -.5px; }
.ai-title svg { width: 22px; height: 22px; color: var(--text-primary); }
.ai-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.ai-content { flex: 1; overflow-y: auto; min-height: 0; padding: 25px; }
.ai-idle { padding: 53px 5px; text-align: left; }
.ai-idle-icon { width: 72px; height: 72px; background: #c9dfd1; display: grid; place-items: center; border-radius: 50% 50% 8px 50%; margin-bottom: 26px; color: #3d5d4d; }
.ai-idle-icon svg { width: 31px; height: 31px; }
.ai-idle-text { font-size: 16px; line-height: 1.7; color: var(--text-secondary); max-width: 32ch; }
.ai-loading, .ai-results { display: none; }
.ai-loading.active, .ai-results.active { display: block; }
.ai-step { display: flex; align-items: flex-start; gap: 14px; padding: 19px 0; border-bottom: 1px solid var(--border-color); }
.ai-step-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-secondary); color: var(--text-muted); flex-shrink: 0; }
.ai-step-icon svg { width: 17px; height: 17px; }
.ai-step.active .ai-step-icon { color: var(--text-primary); background: #f2dd8e; }
.ai-step.completed .ai-step-icon { color: var(--success); background: #dbe7d7; }
.ai-step-content { flex: 1; min-width: 0; }
.ai-step-title { font-size: 14px; line-height: 1.5; font-weight: 500; }
.ai-step-desc { margin-top: 5px; font-size: 12px; line-height: 1.6; color: var(--text-muted); overflow-wrap: anywhere; }
.ai-step-loader { display: none; height: 3px; margin-top: 13px; background: var(--border-color); overflow: hidden; border-radius: 3px; }
.ai-step.active .ai-step-loader { display: block; }
.ai-step-loader-bar { height: 100%; background: var(--accent-orange); width: 35%; animation: loading 1.6s ease infinite; }
.ai-result-card { border-bottom: 1px solid var(--border-color); padding: 17px 0; margin-bottom: 9px; }
.ai-result-header { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.ai-result-icon { color: var(--accent-orange); display: inline-flex; }
.ai-result-icon svg { width: 18px; height: 18px; }
.ai-result-title { font-size: 14px; font-weight: 500; }
.ai-result-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.7; overflow-wrap: anywhere; }
.ai-confidence { border: 0; padding: 20px; border-radius: 9px; background: #e3eadf; margin-top: 24px; }
.ai-confidence-header { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.ai-confidence-header svg { width: 16px; height: 16px; }
.ai-confidence-bar-bg { height: 4px; background: #c5d3c0; margin-top: 16px; overflow: hidden; border-radius: 4px; }
.ai-confidence-bar { height: 100%; background: var(--success); border-radius: 4px; }
.ai-confidence-value { text-align: right; font-size: 12px; margin-top: 6px; color: #4b6550; }
.ai-metric-row { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 24px; }
.ai-metric-val { font-size: 32px; line-height: 1.15; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.ai-metric-lbl { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.ai-footer { border-top: 1px solid var(--border-color); padding: 22px 25px; }
.ai-action-btn { width: 100%; }
.winopt-toast { display: none; position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #302636; border: 1px solid #5b4a60; border-radius: 9px; padding: 15px 22px; z-index: var(--z-toast); max-width: min(600px, calc(100% - 32px)); color: #f8f5ec; font-size: 13px; line-height: 1.65; box-shadow: 0 8px 24px #2c233126; }
.winopt-toast.show { display: block; }
.startup-overlay { display: none; }
.profile-overlay { position: fixed; inset: 0; background: #2c233199; z-index: var(--z-dialog); overflow-y: auto; padding: 32px 18px; align-items: center; justify-content: center; }
.profile-overlay.show { display: flex; }
.profile-box { width: 520px; max-width: 100%; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 14px; padding: 34px; margin: auto; }
.startup-logo { display: flex; gap: 10px; align-items: center; margin-bottom: 27px; }
.startup-logo-icon { width: 31px; height: 31px; display: grid; place-items: center; }
.startup-logo-icon svg { width: 27px; height: 27px; }
.startup-logo-icon svg path { fill: var(--text-primary); }
.startup-logo-text { font-size: 25px; font-weight: 500; letter-spacing: -1px; }
.startup-logo-text span { font-weight: 400; }
.profile-title { font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -.8px; }
.profile-subtitle { color: var(--text-secondary); font-size: 14px; line-height: 1.65; margin: 12px 0 29px; }
.profile-field { margin-bottom: 22px; }
.profile-field-label { font-size: 13px; color: var(--text-primary); margin-bottom: 10px; }
.profile-radio-group, .profile-checkbox-group { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-radio, .profile-checkbox { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 7px; font-size: 12px; cursor: pointer; }
.profile-radio:has(input:checked), .profile-checkbox:has(input:checked) { border-color: #7c9a84; background: #dbe7d7; }
.profile-radio:has(input:focus-visible), .profile-checkbox:has(input:focus-visible) { outline: 2px solid var(--accent-orange); outline-offset: 3px; }
.profile-radio input, .profile-checkbox input { accent-color: var(--accent-orange); margin: 0; }
.profile-save-btn { width: 100%; margin-top: 7px; }
.profile-save-btn svg { width: 17px; height: 17px; }
.profile-skip-btn { display: block; border: 0; background: transparent; color: var(--text-secondary); padding: 12px; margin: 7px auto 0; font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@media (max-width: 1020px) {
    .ml-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .ml-card { padding: 20px 17px; }
    .ml-card-header { gap: 7px; }
    .ml-card-label { font-size: 13px; }
    .ml-stats-row { gap: 17px; }
    .ml-stat-val { font-size: 35px; }
}
@media (max-width: 760px) {
    .ml-grid { grid-template-columns: 1fr; gap: 12px; }
    .ml-card { padding: 24px; }
    .ml-card-header { margin-bottom: 20px; }
    .ml-stat-val { font-size: 42px; }
    .winopt-card { padding: 18px 8px 18px 7px; gap: 13px; }
    .winopt-card-actions { flex-direction: column; gap: 5px; }
    .winopt-card-title { font-size: 14px; }
    .winopt-card-desc { font-size: 12px; }
    .winopt-deepai-card { padding: 23px; }
}
@media (max-width: 450px) {
    .basic-bundle-info { padding: 15px; }
    .optimization-progress { padding: 18px; }
    .optimization-progress-header { align-items: flex-start; gap: 12px; }
    .winopt-card { gap: 11px; flex-wrap: wrap; }
    .winopt-card-icon { width: 35px; height: 35px; border-radius: 8px; }
    .winopt-card-icon svg { width: 18px; height: 18px; }
    .winopt-card-info { flex-basis: calc(100% - 46px); }
    .winopt-card-actions { width: 100%; flex-direction: row; justify-content: flex-start; padding-left: 46px; gap: 9px; }
    .winopt-bundle-btn { font-size: 12px; padding: 8px 11px; }
    .winopt-gameboost { padding: 20px; }
    .winopt-gameboost-row, .winopt-deepai-refine { flex-direction: column; }
    .winopt-kill-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
    .winopt-kill-cpu { grid-column: 1; grid-row: 2; }
    .winopt-kill-btn { grid-column: 2; grid-row: 1 / 3; }
    .winopt-deepai-card { padding: 20px; }
    .winopt-deepai-actions { flex-direction: column; align-items: stretch; }
    .profile-box { padding: 26px 22px; }
    .profile-title { font-size: 25px; }
    .profile-radio, .profile-checkbox { padding: 9px 10px; }
    .winopt-toast { bottom: 16px; padding: 14px 17px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
