/* Desktop preferences and a Linux-inspired shell; portfolio content has its own theme. */
:root { --settings-bg:#f5f3e9; --settings-panel:#fffefa; --settings-text:#24313c; --settings-muted:#57616b; --settings-line:#c9cbbd; --settings-accent:#235db7; }
#settings-app { width:min(720px,calc(100vw - 60px)); height:min(740px,calc(100dvh - 100px)); left:max(30px,calc((100vw - 720px)/2)); top:32px; }
.settings-body { flex:1; min-height:0; overflow:auto; padding:28px; background:var(--settings-bg); color:var(--settings-text); font:16px/1.5 Tahoma,Verdana,sans-serif; }
.settings-heading { display:flex; align-items:center; gap:14px; margin-bottom:24px; }
.settings-heading img { flex-shrink:0; width:48px; height:48px; }
.settings-heading h2 { margin:0; font:700 25px/1.25 Tahoma,sans-serif; letter-spacing:-.6px; color:inherit; }
.settings-heading p { margin:5px 0 0; color:var(--settings-muted); font-size:14px; }
.settings-fieldset { min-width:0; padding:0; margin:0 0 24px; border:0; }
.settings-fieldset legend { margin-bottom:10px; font-size:16px; font-weight:bold; color:var(--settings-text); }
.desktop-theme-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.desktop-theme-choice { position:relative; display:block; min-width:0; }
.desktop-theme-choice input { position:absolute; width:18px; height:18px; bottom:17px; left:13px; accent-color:var(--settings-accent); z-index:1; }
.theme-choice-card { display:block; padding:10px; border:2px solid var(--settings-line); border-radius:8px; background:var(--settings-panel); }
.desktop-theme-choice input:checked + .theme-choice-card { border-color:var(--settings-accent); box-shadow:0 0 0 1px var(--settings-accent); }
.desktop-theme-choice input:focus-visible + .theme-choice-card { outline:3px solid var(--settings-accent); outline-offset:4px; }
.theme-choice-card > strong { display:block; margin:12px 0 2px 28px; font-size:15px; }
.theme-preview { height:105px; position:relative; display:block; overflow:hidden; border-radius:4px; }
.theme-preview.windows-preview { background:linear-gradient(145deg,#073b77,#0b9f91); }
.theme-preview.linux-preview { background:radial-gradient(ellipse at 80% 100%,#3b725d,#182321 70%); }
.preview-window { position:absolute; display:block; width:66%; height:60%; left:18%; top:17%; background:#eeeade; border:2px solid #2466d7; border-radius:4px 4px 0 0; }
.preview-window::before { content:''; display:block; height:15px; background:linear-gradient(#4b91fb,#1050c7); }
.preview-window::after { content:''; position:absolute; top:24px; left:12px; width:50%; height:4px; background:#b4b5a7; box-shadow:0 9px #b4b5a7; }
.preview-panel { position:absolute; bottom:0; left:0; right:0; height:13px; background:#225bd1; }
.preview-panel::before { content:''; display:block; width:28%; height:100%; background:#39922d; }
.linux-preview .preview-window { border:1px solid #50605a; border-radius:5px; background:#232a27; }
.linux-preview .preview-window::before { background:#37423c; }
.linux-preview .preview-window::after { background:#6b867a; box-shadow:0 9px #6b867a; }
.linux-preview .preview-panel { background:#141a17; }
.linux-preview .preview-panel::before { width:12%; margin-left:6px; background:#9ed498; }
.settings-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 0; border-bottom:1px solid var(--settings-line); }
.settings-row:first-child { padding-top:0; }
.settings-row span { min-width:0; }
.settings-row strong { display:block; font-size:15px; font-weight:600; }
.settings-row small { display:block; color:var(--settings-muted); font-size:13px; margin-top:3px; }
.settings-row select { max-width:52%; min-width:140px; padding:9px; border:1px solid var(--settings-line); border-radius:4px; background:var(--settings-panel); color:var(--settings-text); font:14px Tahoma,sans-serif; }
.settings-row input[type='checkbox'] { width:22px; height:22px; margin:0 2px 0 0; flex-shrink:0; accent-color:var(--settings-accent); }
.settings-actions { display:flex; gap:10px; flex-wrap:wrap; }
.settings-actions button { padding:10px 14px; border:1px solid var(--settings-line); border-radius:4px; background:var(--settings-panel); color:var(--settings-text); font:14px Tahoma,sans-serif; }
.settings-actions button:hover { border-color:var(--settings-accent); }
.settings-status { margin:17px 0 0; min-height:2em; font-size:13px; color:var(--settings-muted); }
.settings-body :focus-visible { outline:3px solid var(--settings-accent); outline-offset:3px; }

/* Linux: graphite panels, quiet window chrome, and mint selection accents. */
:root[data-desktop-theme='linux'] { --settings-bg:#202724; --settings-panel:#2a332e; --settings-text:#edf2ef; --settings-muted:#b4c3ba; --settings-line:#47534c; --settings-accent:#a3d991; --xp-panel:#242c27; --xp-blue:#43574a; }
[data-desktop-theme='linux'] .desktop-environment { font-family:Arial,Helvetica,sans-serif; }
[data-desktop-theme='linux'] .desktop-wallpaper { background:radial-gradient(ellipse at 75% 85%,#37664f 0%,transparent 55%),linear-gradient(135deg,#111b18,#203c2e); }
[data-desktop-theme='linux'] .wallpaper-orb { border-color:#9ed69c1a; box-shadow:none; border-radius:22%; transform:rotate(-30deg); }
[data-desktop-theme='linux'] .wallpaper-grid { opacity:.06; }
[data-desktop-theme='linux'] .desktop-brand strong { color:#a3d991; }
[data-desktop-theme='linux'] .desktop-brand { text-shadow:none; }
[data-desktop-theme='linux'] .desktop-icon { font-family:Arial,sans-serif; border-radius:6px; text-shadow:0 1px 3px #000; }
[data-desktop-theme='linux'] .desktop-icon:is(:hover,:focus-visible,.selected,.is-dragging) { background:#a3d99126; border-color:#a3d99188; }
[data-desktop-theme='linux'] .desktop-icon.selected .desktop-icon-label { background:transparent; outline:0; }
[data-desktop-theme='linux'] .desktop-taskbar { background:#151b18; border-top:1px solid #47534c; box-shadow:0 -3px 14px #0005; font-family:Arial,sans-serif; }
[data-desktop-theme='linux'] .start-button { min-width:132px; padding-inline:12px; border-radius:0; background:transparent; box-shadow:none; font:600 14px Arial,sans-serif; text-shadow:none; }
[data-desktop-theme='linux'] .start-button:is(:hover,[aria-expanded='true']) { background:#314236; filter:none; }
[data-desktop-theme='linux'] .start-mark { background:#a3d991; color:#1c3022; border-radius:50%; transform:none; }
[data-desktop-theme='linux'] .taskbar-divider { height:23px; border:0; background:#435048; }
[data-desktop-theme='linux'] .taskbar-app { height:32px; color:#d2ded6; border:0; border-bottom:2px solid transparent; border-radius:3px 3px 0 0; background:#232d27; box-shadow:none; font-family:Arial,sans-serif; }
[data-desktop-theme='linux'] .taskbar-app.active { background:#3a4b3e; border-bottom-color:#a3d991; color:#fff; box-shadow:none; }
[data-desktop-theme='linux'] .system-tray { color:#e3ebe5; background:#151b18; box-shadow:none; border-left:1px solid #435048; }
[data-desktop-theme='linux'] .tray-status { color:#a3d991; text-shadow:none; }
[data-desktop-theme='linux'] .start-menu { left:8px; bottom:48px; width:min(365px,calc(100vw - 16px)); max-height:calc(100dvh - 58px); color:#edf2ef; background:#202724; border:1px solid #48594e; border-radius:9px; box-shadow:0 12px 38px #0008; }
[data-desktop-theme='linux'] .start-menu-user { background:#28352c; border-radius:0; }
[data-desktop-theme='linux'] .start-menu-user img { border:0; }
[data-desktop-theme='linux'] .start-menu-user strong { text-shadow:none; font-size:17px; }
[data-desktop-theme='linux'] .start-menu-links { background:#202724; }
[data-desktop-theme='linux'] .start-menu-links :is(a,button) { color:#edf2ef; border-radius:5px; font-family:Arial,sans-serif; }
[data-desktop-theme='linux'] .start-menu-links :is(a,button):hover { color:#fff; background:#394d3d; }
[data-desktop-theme='linux'] .start-menu-links small { color:#b4c3ba; }
[data-desktop-theme='linux'] .shortcut-glyph { background:#445b4a; }
[data-desktop-theme='linux'] .start-menu-footer { color:#b4c3ba; background:#28352c; }
[data-desktop-theme='linux'] .portfolio-app { border:1px solid #536159; border-radius:8px; box-shadow:0 18px 55px #0008; }
[data-desktop-theme='linux'] .portfolio-app.maximized { border:0; border-radius:0; }
[data-desktop-theme='linux'] .portfolio-titlebar { color:#f1f4f2; background:#2c3830; border-bottom:1px solid #46534a; text-shadow:none; font-family:Arial,sans-serif; }
[data-desktop-theme='linux'] .portfolio-app:not(.active-window) .portfolio-titlebar { background:#242d28; color:#b2bdb6; filter:none; }
[data-desktop-theme='linux'] .window-actions { gap:5px; }
[data-desktop-theme='linux'] .window-actions button { background:#3e4a42; color:#e6ede8; border:0; border-radius:50%; box-shadow:none; text-shadow:none; font-weight:400; }
[data-desktop-theme='linux'] .window-actions .window-close { background:#a3d991; color:#203025; }
[data-desktop-theme='linux'] :is(.browser-toolbar,.browser-tabs,.browser-status,.terminal-quick-commands,.terminal-status,.game-toolbar) { color:#e2eae5; background:#242e28; border-color:#47534c; }
[data-desktop-theme='linux'] :is(.browser-toolbar input,.browser-toolbar a,.browser-tabs button,.game-action,.game-toolbar select,.terminal-quick-commands button) { color:#e2eae5; background:#354139; border-color:#58685d; box-shadow:none; }
[data-desktop-theme='linux'] .browser-tabs button[aria-selected='true'] { background:#485e4d; box-shadow:inset 0 3px #a3d991; color:#fff; }
[data-desktop-theme='linux'] :is(.game-action,.browser-toolbar a,.terminal-quick-commands button):hover:not(:disabled) { background:#485e4d; border-color:#a3d991; }
[data-desktop-theme='linux'] .game-action[aria-pressed='true'] { background:#4c664f; border-color:#a3d991; }

/* Wallpaper choices are independent of the selected desktop theme. */
[data-desktop-wallpaper='teal'] .desktop-wallpaper { background:linear-gradient(135deg,#005b62,#058b86); }
[data-desktop-wallpaper='dusk'] .desktop-wallpaper { background:radial-gradient(ellipse at 75% 20%,#7e4d77,transparent 60%),linear-gradient(135deg,#202542,#572e4c); }
[data-desktop-wallpaper='midnight'] .desktop-wallpaper { background:radial-gradient(ellipse at 85% 90%,#213955,transparent 55%),#111923; }
[data-desktop-motion='reduced'] *,[data-desktop-motion='reduced'] *::before,[data-desktop-motion='reduced'] *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
[data-desktop-motion='reduced'] :is(.hero-art,.magnetic,.tilt-card,.ticker-track,.contact-orbit) { transform:none !important; animation:none !important; }

@media(pointer:fine) {
  :root:is([data-desktop-theme='linux'],[data-desktop-cursor='system']) :is(body,body.modal-open,.credential-modal),
  :root:is([data-desktop-theme='linux'],[data-desktop-cursor='system']) .credential-modal::backdrop { cursor:auto !important; }
  :root:is([data-desktop-theme='linux'],[data-desktop-cursor='system']) :is(a,button,select,[role='button'],.workflow-controls button) { cursor:pointer !important; }
  :root:is([data-desktop-theme='linux'],[data-desktop-cursor='system']) :is(input,textarea,[contenteditable='true'],.terminal-surface,.terminal-command-row input) { cursor:text !important; }
  :root:is([data-desktop-theme='linux'],[data-desktop-cursor='system']) :is(button:disabled,select:disabled) { cursor:default !important; }
  :root:is([data-desktop-theme='linux'],[data-desktop-cursor='system']) .portfolio-titlebar { cursor:move !important; }
  :root:is([data-desktop-theme='linux'],[data-desktop-cursor='system']) .desktop-icon.is-dragging { cursor:grabbing !important; }
  :root:is([data-desktop-theme='linux'],[data-desktop-cursor='system']) { cursor:auto !important; }
}
@media(max-width:650px) {
  #settings-app { inset:5px 5px 45px; width:auto; height:auto; }
  .settings-body { padding:20px 16px; }
  .settings-heading { align-items:flex-start; }
  .settings-heading h2 { font-size:23px; }
  .theme-preview { height:80px; }
  [data-desktop-theme='linux'] .start-button { min-width:48px; padding-inline:10px; }
  [data-desktop-theme='linux'] .start-button strong { display:none; }
}
@media(max-width:360px) {
  .settings-row { flex-wrap:wrap; gap:9px; }
  .settings-row select { max-width:100%; width:100%; }
  .desktop-theme-options { gap:8px; }
  .theme-choice-card { padding:7px; }
  .theme-choice-card > strong { font-size:14px; }
}
