:root {
  --accent-music: #d5afef; --accent-display: #95c8ec; --accent-gamma: #f0ca79;
  --accent-volume: #b4baf4; --accent-mixer: #a9c9e3; --accent-power: #e3a79e; --accent-status: #8edbbd;
}
[data-icon] { font-size:0; display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; }
[data-icon] svg, .widget-tools svg, .gallery-icon svg, .gallery-preview svg { width:24px; height:24px; flex-shrink:0; }
header { position:relative; padding-right:45px; }
#edit-toggle { position:absolute; right:0; top:2px; height:38px; width:38px; display:grid; place-items:center; background:#172131; border:1px solid #b6cbec23; border-radius:13px; color:#c6d6ed; }
#dashboard { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:start; }
.widget { --widget-accent:var(--accent-display); position:relative; min-width:0; margin:0; padding:16px; border:1px solid color-mix(in srgb,var(--widget-accent) 18%,transparent); border-radius:22px; background:linear-gradient(145deg,color-mix(in srgb,var(--widget-accent) 10%,#131b29),#131b24); box-shadow:inset 0 1px #ffffff05,0 5px 15px #00000010; transition:background .2s,border-color .2s,opacity .18s; }
.widget[data-view="small"] { grid-column:span 1; min-height:145px; }
.widget:not([data-view="small"]) { grid-column:span 2; }
.widget[data-widget="music"] { --widget-accent:var(--accent-music); }
.widget[data-widget="gamma"] { --widget-accent:var(--accent-gamma); }
.widget[data-widget="volume"] { --widget-accent:var(--accent-volume); }
.widget[data-widget="mixer"] { --widget-accent:var(--accent-mixer); }
.widget[data-widget="power"] { --widget-accent:var(--accent-power); }
.widget[data-widget="status"] { --widget-accent:var(--accent-status); }
.widget.widget-active { border-color:color-mix(in srgb,var(--widget-accent) 36%,transparent); background:linear-gradient(145deg,color-mix(in srgb,var(--widget-accent) 17%,#131b29),#131b24); }
.widget.widget-muted { border-style:dashed; }
.widget .section-heading { margin-bottom:12px; gap:8px; }
.widget .section-heading h2 { display:flex; align-items:center; gap:7px; color:var(--widget-accent); font-size:10px; letter-spacing:1px; min-width:0; }
.widget .section-heading h2 svg { width:14px; height:14px; }
.widget-eyebrow { font-size:8px!important; color:#8796ab; white-space:nowrap; }
.widget .tile { min-height:72px; border-radius:14px; background:#ffffff04; border-color:#ffffff09; box-shadow:none; }
.widget .tile.active { background:color-mix(in srgb,var(--widget-accent) 19%,transparent); border-color:color-mix(in srgb,var(--widget-accent) 40%,transparent); }
.widget .ratio { font-size:24px; }
.widget .tile-name { font-size:7px; margin-top:6px; }
.widget .native-label { font-size:16px; font-weight:600; }
.widget .grid { gap:8px; }
.widget .widget-detail { margin:14px 0 0; color:#8b9cb3; font-size:10px; line-height:1.55; }
.widget[data-view="medium"][data-widget="display"] .widget-detail { display:none; }
.widget[data-view="small"] .section-heading { margin-bottom:6px; }
.widget[data-view="small"] .section-heading h2 { font-size:9px; }
.widget[data-view="small"] .section-heading h2 [data-icon], .widget[data-view="small"] .widget-eyebrow, .widget[data-view="small"] .music-brand { display:none; }
.widget[data-view="small"][data-widget="mixer"] #mixer-count { display:inline; }
.widget[data-view="small"] .widget-detail { display:none; }
.widget[data-widget="gamma"] .tile { width:100%; border:0; background:transparent; }
.widget[data-widget="gamma"] .sun svg { width:34px; height:34px; color:var(--widget-accent); }
.widget[data-widget="gamma"][data-view="medium"] .tile { display:flex; flex-direction:row; gap:18px; justify-content:flex-start; min-height:48px; }
.widget[data-widget="gamma"][data-view="medium"] .tile-name { font-size:14px; }
.widget[data-widget="gamma"] .indicator { display:none; }
.compact-peek { display:none; }
.widget[data-view="small"] .compact-peek { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; width:100%; min-height:87px; background:none; border:0; color:var(--widget-accent); }
.compact-peek strong { font-size:24px; font-weight:550; }
.compact-peek > span:last-child { font-size:9px; color:#a2b0c4; }
.widget[data-view="small"] .display-presets, .widget[data-view="small"] .volume-bar { display:none; }
.widget:not([data-view="large"]) .large-only { display:none; }
.widget-link { width:100%; display:flex; align-items:center; justify-content:center; gap:10px; padding:14px 4px 0; margin-top:12px; background:none; border:0; border-top:1px solid #ffffff0a; color:var(--widget-accent); font-size:11px; }
.widget-link svg { width:18px; height:18px; }
.widget .volume-bar { padding:0; background:transparent; border:0; grid-template-columns:44px 44px minmax(0,1fr) 44px; gap:2px; }
.widget .volume-bar button { color:var(--widget-accent); min-width:0; }
.widget .volume-bar #mute.active { background:#ffffff0b; color:#efb0a5; }
.widget .volume-bar output { font-size:25px; }
.widget .music-track { border:0; background:transparent; padding:0; margin:14px 0; }
.widget .track-art { background:color-mix(in srgb,var(--widget-accent) 15%,#141c28); color:var(--widget-accent); }
.widget .track-art [data-icon] svg { width:28px; height:28px; }
.widget .music-brand { color:#a89aba; font-size:8px; }
.widget:not([data-view="large"]) .music-track { display:none!important; }
.widget .transport .tile { min-height:58px; }
.widget .transport svg { width:25px; height:25px; }
.widget .transport .play { background:color-mix(in srgb,var(--widget-accent) 18%,transparent); color:var(--widget-accent); }
.widget[data-view="small"] .transport { grid-template-columns:1fr; }
.widget[data-view="small"] .transport [data-action="media_previous"], .widget[data-view="small"] .transport [data-action="media_next"] { display:none; }
.widget[data-view="small"] .transport .play { min-height:91px; background:transparent; border:0; }
.widget[data-view="small"] .open-music { flex-direction:column; padding:6px 0; gap:9px; background:transparent; border:0; font-size:9px; min-height:90px; text-align:center; }
.widget[data-view="small"] .open-music small { display:none; }
.widget .open-music { border-radius:13px; background:#ffffff06; border-color:#ffffff09; }
.widget .launch-icon { color:var(--widget-accent); }
.widget.power-section { padding:16px; margin:0; }
.widget .power { background:transparent; border:0; border-radius:12px; padding:8px 0; min-height:54px; color:var(--widget-accent); box-shadow:none; }
.widget .power .power-icon svg { width:29px; height:29px; }
.widget[data-view="small"] .power { flex-direction:column; justify-content:center; gap:12px; min-height:90px; font-size:10px; }
.widget[data-view="small"] .power-hint { display:none; }
.status-body { display:flex; align-items:center; gap:16px; min-height:65px; }
.status-body strong { font-size:18px; font-weight:550; }
.status-orb { display:block; width:20px; height:20px; border-radius:50%; background:#697487; box-shadow:0 0 0 7px #8796aa12; }
.widget-active .status-orb { background:radial-gradient(circle at 35% 25%,#c3f5df,#5eaf92); box-shadow:0 0 0 7px #8edbbd0d,0 0 22px #8edbbd25; }
.widget[data-view="small"] .status-body { flex-direction:column; justify-content:center; gap:16px; min-height:94px; }
.widget[data-view="small"] .status-body strong { font-size:13px; }
.widget .mixer-content { margin:0; padding:0; background:none; border:0; }
.widget .mixer-peek { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:36px; border:0; background:none; color:var(--widget-accent); font-size:10px; }
.widget[data-view="small"] .mixer-peek { flex-direction:column; gap:12px; min-height:92px; }
.widget[data-view="small"] .mixer-peek svg { width:31px; height:31px; }
.widget[data-view="large"] .mixer-peek { display:none; }
.widget .audio-row { gap:9px; }
.widget .audio-icon { background:#161f2c; }
.widget .audio-slider { accent-color:var(--widget-accent); }
.widget .detail-close { display:block; margin:12px auto 0; padding:10px 20px; min-height:40px; background:#ffffff07; color:#a2b4cb; border:1px solid #ffffff0a; border-radius:10px; font:inherit; font-size:10px; }
.widget-tools { display:grid; grid-template-columns:1.2fr 1fr 1fr 1fr; gap:3px; margin:-4px -4px 12px; }
.widget-tools button { min-width:0; height:30px; padding:3px; border:1px solid #ffffff13; background:#0c142280; border-radius:8px; font-size:9px; color:#c7d7ed; }
.widget-tools svg { width:16px; height:16px; }
.widget-tools [data-edit="remove"] { color:#eeb4b0; }
.editing .widget { touch-action:none; outline:1px dashed #b2c5e044; cursor:grab; }
.editing .widget-body { pointer-events:none; opacity:.7; }
.editing .widget:active { cursor:grabbing; }
.drag-source { opacity:.22!important; }
.widget-ghost { position:fixed!important; z-index:40; pointer-events:none; opacity:.92; box-shadow:0 16px 45px #0009; transform-origin:center; }
.widget-ghost .widget-tools { display:none; }
.editing-widgets .deck { padding-bottom:125px; }
#edit-bar { position:fixed; z-index:15; left:50%; transform:translateX(-50%); bottom:calc(12px + env(safe-area-inset-bottom)); width:calc(100% - 30px); max-width:430px; background:#152032f5; border:1px solid #a7bfdf30; box-shadow:0 12px 40px #0009; padding:10px 12px; border-radius:19px; }
#edit-bar p { margin:0 0 8px; font-size:10px; color:#a6b8cf; text-align:center; }
#edit-bar > div { display:flex; gap:8px; }
#edit-bar button { display:flex; justify-content:center; align-items:center; gap:6px; border:1px solid #ffffff13; border-radius:12px; padding:11px 12px; min-height:42px; background:#ffffff06; font-size:12px; }
#edit-bar #gallery-open { flex:1; }
#edit-bar #edit-done { background:#abc4e5; color:#101b2d; min-width:87px; font-weight:650; }
#edit-bar svg { width:18px; height:18px; }
.empty-dashboard { border:1px dashed #a4bada40; padding:40px 18px; text-align:center; border-radius:22px; color:#9faec3; }
.empty-dashboard button { padding:12px 18px; border:1px solid #abc4e544; border-radius:12px; background:#abc4e51a; color:#cadbf1; }
.widget-sheet { position:fixed; inset:auto 0 0; margin:0 auto; width:100%; max-width:460px; max-height:88svh; border-radius:26px 26px 0 0; padding:12px 20px calc(25px + env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain; background:linear-gradient(160deg,#1c283b,#101924); }
.widget-sheet[open] { animation:sheet-in .2s ease-out; }
.widget-sheet h2 { text-align:left; margin:22px 0 5px; font-size:21px; }
.sheet-grip { margin:0 auto; width:34px; height:4px; border-radius:5px; background:#aabbd23b; }
.sheet-subtitle { margin:0 0 22px; font-size:11px; color:#8295b0; }
.gallery-card { --widget-accent:var(--accent-display); margin-bottom:10px; padding:6px 10px; background:linear-gradient(130deg,color-mix(in srgb,var(--widget-accent) 9%,#152032),#121c2b); border:1px solid color-mix(in srgb,var(--widget-accent) 15%,transparent); border-radius:17px; }
.gallery-card[data-kind="music"] { --widget-accent:var(--accent-music); }.gallery-card[data-kind="gamma"] { --widget-accent:var(--accent-gamma); }.gallery-card[data-kind="power"] { --widget-accent:var(--accent-power); }.gallery-card[data-kind="status"] { --widget-accent:var(--accent-status); }.gallery-card[data-kind="volume"] { --widget-accent:var(--accent-volume); }
.gallery-choice { display:flex; align-items:center; width:100%; gap:13px; padding:8px 0; border:0; background:none; text-align:left; }
.gallery-icon { display:grid; place-items:center; width:43px; height:43px; flex:0 0 43px; border:1px solid #ffffff0d; background:#ffffff05; border-radius:13px; color:var(--widget-accent); }
.gallery-choice strong { display:block; font-size:13px; font-weight:550; }
.gallery-choice small { display:block; margin-top:5px; color:#8f9eb3; font-size:10px; line-height:1.4; }
.gallery-preview { margin:8px 0 12px; min-height:75px; padding:15px; display:flex; align-items:center; gap:14px; border:1px solid #ffffff0c; border-radius:13px; color:var(--widget-accent); }
.gallery-preview[data-size="large"] { min-height:105px; }.gallery-preview[data-size="small"] { max-width:160px; flex-direction:column; text-align:center; }
.gallery-preview span { font-size:11px; line-height:1.5; }
.size-options { display:flex; gap:5px; }
.size-options button { flex:1; min-width:0; border:1px solid #ffffff10; padding:10px 3px; background:#ffffff04; border-radius:9px; font-size:10px; color:#aabbd0; }
.size-options button[aria-pressed="true"] { color:var(--widget-accent); border-color:var(--widget-accent); background:#ffffff08; }
.gallery-add { width:100%; margin:10px 0 6px; padding:12px; min-height:42px; background:var(--widget-accent); color:#141c29; border:0; border-radius:10px; font-size:12px; font-weight:600; }
.deck > footer { margin-top:25px; }
@keyframes sheet-in { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:350px) { .widget { padding:12px; border-radius:18px; } .widget.power-section { padding:12px; } #dashboard { gap:10px; } .widget .volume-bar { grid-template-columns:40px 40px minmax(0,1fr) 40px; } .widget .ratio { font-size:22px; } .widget .native-label { font-size:13px; } .widget .section-heading h2 { letter-spacing:.5px; } .widget-sheet { padding-left:15px; padding-right:15px; } }
@media(prefers-reduced-motion:reduce) { .widget-sheet[open] { animation:none!important; } }

/* Six logical columns: 3 small, 2 medium, 1 full-width. Order is never dense-reordered. */
#dashboard { grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;align-items:stretch;container-type:inline-size;grid-auto-rows:var(--cell,100px); }
.widget { padding:10px;border-radius:18px;min-height:0!important;overflow:hidden; }
.widget[data-view="small"], .widget:not([data-view="small"]) { min-height:0; }
.widget-body { height:100%;display:flex;flex-direction:column;min-height:0; }
.widget .section-heading { flex-shrink:0;margin-bottom:5px; }
.widget .section-heading h2 { font-size:8px;letter-spacing:.35px; }
.widget .widget-eyebrow,.widget .music-brand { display:none; }
.widget[data-height="1"] .widget-detail { display:none; }
.widget[data-height="1"] .section-heading h2 [data-icon] { display:none; }
.widget[data-width="2"] .section-heading h2 { font-size:8px; }
.widget .tile-name { letter-spacing:.6px;font-size:8px; }
.widget[data-view="small"] .compact-peek { min-height:0;flex:1;gap:3px; }
.widget .compact-peek strong { font-size:21px; }
.widget[data-widget="gamma"] .tile { min-height:0;flex:1; }
.widget[data-widget="gamma"] .sun svg { width:28px;height:28px; }
.widget[data-widget="gamma"][data-view="medium"] .tile { flex-direction:column;gap:4px;min-height:0; }
.widget[data-widget="gamma"][data-view="medium"] .tile-name { font-size:9px; }
.widget .status-body,.widget[data-view="small"] .status-body { flex:1;min-height:0;gap:10px;justify-content:center; }
.widget .status-body strong { font-size:12px; }
.widget .status-orb { width:15px;height:15px; }
.widget[data-view="small"] .power,.widget .power { min-height:0;flex:1;font-size:9px;gap:4px;padding:2px; }
.widget .power .power-icon svg { width:26px;height:26px; }
.widget .power-hint { display:none; }
.widget.power-section { padding:10px; }
.widget .transport { flex:1;min-height:0;gap:5px; }
.widget .transport .tile,.widget[data-view="small"] .transport .play { min-height:0;padding:3px; }
.widget .transport svg { width:22px;height:22px; }
.widget .music-track { margin:5px 0;flex:1;min-height:0; }
.widget[data-widget="music"][data-height="1"] .track-art { display:none; }
.widget[data-widget="music"][data-height="1"] .track-text #track-title { font-size:10px;-webkit-line-clamp:1; }
.widget[data-widget="music"][data-height="1"] #track-artist { display:none; }
.widget[data-widget="music"][data-height="3"][data-width="6"] .music-track { flex-direction:column-reverse;align-items:center;justify-content:center;gap:10px; }
.widget[data-widget="music"][data-height="3"][data-width="6"] .track-art { width:clamp(65px,35cqw,155px);height:clamp(65px,35cqw,155px);flex-basis:auto; }
.widget[data-widget="music"][data-height="3"][data-width="6"] .track-art img { width:100%;height:100%; }
.widget[data-widget="music"][data-height="3"] .transport { max-height:50px; }
.widget .open-music,.widget[data-view="small"] .open-music { min-height:0;flex:1;padding:3px;font-size:9px;gap:5px; }
.widget .open-music small { display:none; }
.widget .display-presets { flex:1;min-height:0; }
.widget .display-presets .tile { min-height:0;padding:4px; }
.widget .ratio { font-size:20px; }
.widget[data-view="medium"] .display-presets { grid-template-columns:repeat(2,minmax(0,1fr)); }
.widget[data-view="medium"] #native { display:none; }
.widget .volume-bar { grid-template-columns:32px 30px minmax(0,1fr) 30px;flex:1;min-height:0; }
.widget .volume-bar button { width:auto;height:36px;padding:3px; }
.widget .volume-bar output { font-size:20px; }
.widget[data-view="medium"] .volume-bar { grid-template-columns:27px 25px minmax(0,1fr) 25px; }
.widget[data-view="medium"] .volume-bar output { font-size:17px; }
.master-mute { display:flex;align-items:center;gap:8px;font-size:9px;color:#9eb3cb; }
.master-mute button { background:none;border:0;color:#b4baf4;min-height:26px; }
.master-mute svg { width:16px;height:16px; }
.widget[data-view="small"] .master-mute,.widget[data-height="1"] .master-mute { display:none; }
.widget[data-widget="volume"] .mixer { flex-shrink:0; }
.widget.mixer-expanded,.widget.expanded-widget { grid-column:span 6!important;grid-row:auto!important;min-height:130px!important;height:auto;overflow:visible; }
.widget.mixer-expanded .widget-body { height:auto; }
.widget.mixer-expanded .master-mute { display:flex; }
.widget .mixer-content { padding-top:10px; }
.widget[data-widget="volume"] #mixer-toggle { display:grid;place-items:center; }
.widget-tools { position:absolute;inset:3px 3px auto;z-index:2;display:flex;gap:1px;margin:0; }
.widget-tools button { flex:1;height:24px;font-size:8px;padding:1px;border-radius:6px; }
.widget-tools [data-edit="up"],.widget-tools [data-edit="down"] { flex:.7; }
.editing .widget-body { padding-top:18px;padding-bottom:12px; }
.resize-handle { position:absolute;bottom:0;right:0;width:32px;height:32px;padding:9px 4px 4px 9px;background:#132135bb;border:0;border-radius:13px 0 16px 0;color:#b6d1f0;z-index:3;touch-action:none;cursor:nwse-resize; }
.resize-handle svg { width:15px;height:15px; }
.widget.resizing { outline:2px solid var(--widget-accent);box-shadow:0 0 20px #96c7ff20; }
.generic-action { display:flex;flex:1;min-height:0;align-items:center;justify-content:center;flex-direction:column;gap:7px;background:transparent;border:0;color:var(--widget-accent);padding:1px;width:100%; }
.generic-icon { display:grid;place-items:center; }
.generic-icon svg { width:27px;height:27px; }
.generic-icon img { width:32px;height:32px;object-fit:contain;border-radius:9px; }
.generic-name { color:#edf2fa;font-size:10px;line-height:1.2;font-weight:550;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;overflow-wrap:anywhere; }
.generic-detail { font-size:10px;color:#96a8be; }
.generic-state { font-size:14px; }
.widget[data-width="2"] .generic-detail,.widget[data-height="1"] .generic-detail { display:none; }
.widget.configured-app .generic-detail { display:block;font-size:8px;text-align:center; }
.widget[data-height="1"] .generic-action { gap:5px; }
.widget[data-width="6"][data-height="3"] .generic-icon svg { width:50px;height:50px; }
.widget[data-width="6"] .generic-name { font-size:15px; }
.app-volume-controls { display:flex;justify-content:center;gap:5px; }
.app-volume-controls button { flex:1;min-width:0;min-height:30px;border:0;border-radius:9px;color:var(--widget-accent);background:#ffffff09; }
.app-volume-controls svg { width:17px;height:17px; }
.app-volume-slider { width:100%;accent-color:var(--widget-accent);margin:10px 0; }
.widget[data-height="1"] .app-volume-slider { display:none; }
.widget.app-volume[data-height="1"] .generic-icon { display:none; }
.widget.app-volume[data-height="1"] .generic-action { gap:2px; }
.widget[data-category="nvidia"],.gallery-card[data-kind="nvidia"] { --widget-accent:#bbdb94; }
.widget[data-widget="gamma"],.widget[data-widget="r:nvidia_gamma_on"],.widget[data-widget="r:nvidia_gamma_off"] { --widget-accent:#f0ca79; }
.widget[data-category="discord"],.gallery-card[data-kind="discord"] { --widget-accent:#b3b4ff; }
.widget[data-category="music"] { --widget-accent:#d5afef; }
.widget[data-category="power"] { --widget-accent:#e3a79e; }
.widget[data-category="sound"] { --widget-accent:#b4baf4; }
.widget[data-category="notes"],.widget[data-category="reminders"] { --widget-accent:#dec795; }
.gallery-back { border:0;background:none;color:#b7cfee;padding:10px 0; }
.cap-form { display:grid;gap:12px; }
.field-label { display:grid;gap:6px;margin:10px 0;color:#aebed2;font-size:12px; }
.field-label input,.field-label textarea,.field-label select { width:100%;min-width:0;background:#111c2b;border:1px solid #a5bfd532;color:#edf3ff;border-radius:10px;padding:11px;font:inherit; }
.field-label textarea { min-height:70px;resize:vertical; }
#cap-content { white-space:pre-wrap;line-height:1.6; }
@media(max-width:350px) { .widget {padding:7px;border-radius:15px;} .widget-tools button {font-size:7px;} .generic-name {font-size:9px;} .widget .section-heading h2 {font-size:7px;} .widget .transport svg {width:19px;height:19px;} }
