/* Linux Mint Cinnamon recreation — Mint-Y theme */

:root {
  --font-ui: "Ubuntu", "Cantarell", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Ubuntu Mono", "DejaVu Sans Mono", "SF Mono", Menlo, Consolas, monospace;
  --accent-rgb: 154,184,122;
  --accent: rgb(var(--accent-rgb));
  --accent-strong: rgb(126,157,97);
  --accent-soft: rgba(var(--accent-rgb), .22);
  --accent-fainter: rgba(var(--accent-rgb), .14);
  --accent-dimmer: rgba(var(--accent-rgb), .08);
  --panel-h: 40px;
  --scale: 100%;
  --radius-win: 12px;
  --radius-menu: 12px;
  --radius-ctrl: 8px;
  --selection-b: rgb(var(--accent-rgb));
  --selection-bg: rgba(var(--accent-rgb), .35);
  --track: rgba(255,255,255,.14);
  --thumb: rgba(255,255,255,.38);
  --thumb-hover: rgba(255,255,255,.58);
}

/* ---------- Mint-Y (light) ---------- */
html[data-theme="light"] {
  --win-body: #ffffff;
  --win-body2: #fbfbfb;
  --tb-active-top: #ffffff;
  --tb-active-bot: #eceef0;
  --tb-inactive-top: #f2f3f4;
  --tb-inactive-bot: #e7e9eb;
  --tb-text: #44484c;
  --tb-text-inactive: #9aa1a6;
  --win-border: rgba(0,0,0,.16);
  --win-glow: rgba(var(--accent-rgb), .25);
  --menu-bg: #ffffff;
  --menu-border: rgba(0,0,0,.13);
  --menu-item: #f0f4eb;
  --ctx-bg: #ffffff;
  --ctx-border: rgba(0,0,0,.13);
  --input-bg: #ffffff;
  --input-border: #c8ccd0;
  --entry-bg: #f3f4f5;
  --entry-border: #ccd0d4;
  --text-primary: #33383c;
  --text-dim: #70767b;
  --text-faint: #9aa1a6;
  --sidebar-bg: #f4f5f6;
  --sidebar-hover: rgba(0,0,0,.06);
  --sidebar-active: rgba(var(--accent-rgb), .28);
  --struts: #dde0e3;
  --window-shadow: 0 14px 40px rgba(0,0,0,.28), 0 3px 10px rgba(0,0,0,.12);
  --window-shadow-inactive: 0 8px 26px rgba(0,0,0,.18);
  --tb-btn-glyph: rgba(40,44,48,.8);
  --dialog-bg: #fafafa;
  --status-bg: #eef0f1;
  --list-row-hover: rgba(0,0,0,.05);
  --list-row-selected: rgba(var(--accent-rgb), .30);
  --tile-bg: rgba(0,0,0,.035);
  --tt-bg: #2b2e30;
  --tt-text: #f2f2f2;
  --notify-bg: rgba(252,252,252,.96);
}

/* ---------- Mint-Y (also light, softer) ---------- */
html[data-theme="minty"] {
  --win-body: #fefefe;
  --win-body2: #fafafa;
  --tb-active-top: #ffffff;
  --tb-active-bot: #eef0f1;
  --tb-inactive-top: #f4f5f6;
  --tb-inactive-bot: #e9ebec;
  --tb-text: #414549;
  --tb-text-inactive: #a2a9ae;
  --win-border: rgba(0,0,0,.15);
  --win-glow: rgba(var(--accent-rgb), .22);
  --menu-bg: #ffffff;
  --menu-border: rgba(0,0,0,.12);
  --menu-item: #edf3e6;
  --ctx-bg: #ffffff;
  --ctx-border: rgba(0,0,0,.12);
  --input-bg: #ffffff;
  --input-border: #c6cacc;
  --entry-bg: #f2f3f4;
  --entry-border: #cdd1d3;
  --text-primary: #333;
  --text-dim: #6f757a;
  --text-faint: #9ba1a6;
  --sidebar-bg: #f3f4f5;
  --sidebar-hover: rgba(0,0,0,.055);
  --sidebar-active: rgba(var(--accent-rgb), .26);
  --struts: #dcdfe1;
  --window-shadow: 0 14px 42px rgba(0,0,0,.26), 0 3px 10px rgba(0,0,0,.11);
  --window-shadow-inactive: 0 8px 24px rgba(0,0,0,.16);
  --tb-btn-glyph: rgba(40,44,48,.78);
  --dialog-bg: #fafafa;
  --status-bg: #eef0f1;
  --list-row-hover: rgba(0,0,0,.05);
  --list-row-selected: rgba(var(--accent-rgb), .30);
  --tile-bg: rgba(0,0,0,.03);
  --tt-bg: #2b2e30;
  --tt-text: #f2f2f2;
  --notify-bg: rgba(252,252,252,.96);
}

/* ---------- Mint-Y-Dark ---------- */
html[data-theme="dark"] {
  --win-body: #26292b;
  --win-body2: #232628;
  --tb-active-top: #4b4f54;
  --tb-active-bot: #33373b;
  --tb-inactive-top: #34383c;
  --tb-inactive-bot: #2b2f32;
  --tb-text: #f2f2f2;
  --tb-text-inactive: #8d949a;
  --win-border: rgba(0,0,0,.62);
  --win-glow: rgba(var(--accent-rgb), .22);
  --menu-bg: #36393d;
  --menu-border: rgba(0,0,0,.55);
  --menu-item: rgba(var(--accent-rgb), .26);
  --ctx-bg: #383c40;
  --ctx-border: rgba(0,0,0,.55);
  --input-bg: #2b2e31;
  --input-border: rgba(255,255,255,.12);
  --entry-bg: #33373b;
  --entry-border: rgba(255,255,255,.09);
  --text-primary: #e2e5e7;
  --text-dim: #a8aeb3;
  --text-faint: #7f868c;
  --sidebar-bg: #303439;
  --sidebar-hover: rgba(255,255,255,.07);
  --sidebar-active: rgba(var(--accent-rgb), .30);
  --struts: #262a2d;
  --window-shadow: 0 16px 44px rgba(0,0,0,.55), 0 4px 12px rgba(0,0,0,.35);
  --window-shadow-inactive: 0 9px 26px rgba(0,0,0,.42);
  --tb-btn-glyph: rgba(255,255,255,.92);
  --dialog-bg: #2f3336;
  --status-bg: #2b2f32;
  --list-row-hover: rgba(255,255,255,.06);
  --list-row-selected: rgba(var(--accent-rgb), .32);
  --tile-bg: rgba(255,255,255,.04);
  --tt-bg: rgba(44,47,50,.97);
  --tt-text: #f0f1f2;
  --notify-bg: rgba(48,52,56,.97);
}

/* ---------- Mint-Y-Darker ---------- */
html[data-theme="darker"] {
  --win-body: #232627;
  --win-body2: #202324;
  --tb-active-top: #3a3e41;
  --tb-active-bot: #2a2d2f;
  --tb-inactive-top: #2e3133;
  --tb-inactive-bot: #26292b;
  --tb-text: #eeeeee;
  --tb-text-inactive: #7e858b;
  --win-border: rgba(0,0,0,.7);
  --win-glow: rgba(var(--accent-rgb), .20);
  --menu-bg: #2e3134;
  --menu-border: rgba(0,0,0,.6);
  --menu-item: rgba(var(--accent-rgb), .24);
  --ctx-bg: #303436;
  --ctx-border: rgba(0,0,0,.6);
  --input-bg: #232629;
  --input-border: rgba(255,255,255,.10);
  --entry-bg: #2b2e30;
  --entry-border: rgba(255,255,255,.08);
  --text-primary: #dcdfe1;
  --text-dim: #a0a7ac;
  --text-faint: #767d83;
  --sidebar-bg: #292c2e;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-active: rgba(var(--accent-rgb), .28);
  --struts: #202326;
  --window-shadow: 0 16px 46px rgba(0,0,0,.6), 0 4px 12px rgba(0,0,0,.4);
  --window-shadow-inactive: 0 9px 26px rgba(0,0,0,.45);
  --tb-btn-glyph: rgba(255,255,255,.85);
  --dialog-bg: #2a2d2f;
  --status-bg: #26292b;
  --list-row-hover: rgba(255,255,255,.055);
  --list-row-selected: rgba(var(--accent-rgb), .30);
  --tile-bg: rgba(255,255,255,.035);
  --tt-bg: rgba(40,43,45,.97);
  --tt-text: #ececec;
  --notify-bg: rgba(42,46,49,.97);
}

/* ================= base ================= */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-ui);
  font-size: calc(13px * var(--scale));
  color: var(--text-primary);
  background: #101214;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  cursor: default;
}
.layer { position: fixed; inset: 0; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--thumb); border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--thumb-hover); background-clip: content-box; }

input, textarea, select, button { font-family: inherit; }
button { background: none; border: none; color: inherit; cursor: default; }
input[type="text"], input[type="password"], input[type="search"], textarea, select, .entry-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-ctrl);
  color: var(--text-primary);
  padding: 6px 10px;
  outline: none;
  user-select: text;
  cursor: text;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-fainter); }
::selection { background: var(--selection-bg); }

button.flat {
  border-radius: var(--radius-ctrl);
  padding: 7px 14px;
  background: var(--entry-bg);
  border: 1px solid var(--entry-border);
  color: var(--text-primary);
  font-size: calc(13px * var(--scale));
}
button.flat:hover { background: var(--list-row-hover); border-color: var(--accent-dimmer); }
button.flat:active { background: var(--accent-dimmer); }
button.suggest {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-ctrl);
  padding: 7px 16px;
  font-size: calc(13px * var(--scale));
}
html[data-theme^="light"] button.suggest, html[data-theme="minty"] button.suggest { color: #1f2a16; }
button.suggest:hover { background: var(--accent-strong); }
button.suggest:active { filter: brightness(.88); }

hr.sep { border: none; border-top: 1px solid var(--struts); margin: 4px 8px; }

/* ================= desktop ================= */

#session-layer { background: #131517; }
#desktop { position: absolute; inset: 0 0 var(--panel-h) 0; overflow: hidden; }
#wallpaper-aurora {
  position: absolute; inset: -60px; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 32%, rgba(var(--accent-rgb), .10), transparent 70%);
  opacity: .7; animation: aurora 90s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}
@keyframes aurora {
  0%   { transform: translate3d(-1.2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(1.4%, 1.2%, 0) scale(1.05); }
  100% { transform: translate3d(-1%, .8%, 0) scale(1); }
}
#desktop-icons { position: absolute; inset: 8px 8px 8px 8px; }
.desktop-icon {
  position: absolute; width: 88px; height: 92px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px 4px; border-radius: 10px; border: 1px solid transparent;
  z-index: 1; will-change: left, top;
}
.desktop-icon .di-ic { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; }
.desktop-icon .di-ic svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.desktop-icon .di-label {
  width: 100%; text-align: center; color: #fff; font-size: calc(12px * var(--scale));
  line-height: 1.25; padding: 1px 4px; border-radius: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,.8), 0 0 6px rgba(0,0,0,.5);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.desktop-icon:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.14); }
.desktop-icon.selected { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.26); }
.desktop-icon .di-rename { user-select: text; cursor: text; }
#drag-marquee {
  position: absolute; border: 1px solid var(--selection-b); background: var(--selection-bg);
  border-radius: 3px; z-index: 40; pointer-events: none;
}

/* ================= panel ================= */

#panel-root { position: fixed; left: 0; right: 0; bottom: 0; height: var(--panel-h); z-index: 900; transform: translateY(0); transition: transform .18s ease; }
#panel-root.autohide { transform: translateY(100%); }
#panel {
  position: absolute; inset: 0;
  background: linear-gradient(#33383b, #282c2e);
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -2px 12px rgba(0,0,0,.25);
  display: flex; align-items: stretch; font-size: calc(13px * var(--scale));
}
.panel-item { display: flex; align-items: center; justify-content: center; position: relative; }

#menu-btn {
  width: var(--panel-h); height: var(--panel-h); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 4px; transition: background .12s, box-shadow .12s;
}
#menu-btn svg { width: calc(var(--panel-h) - 10px); height: calc(var(--panel-h) - 10px); }
#menu-btn:hover { background: rgba(255,255,255,.10); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .55), 0 0 14px rgba(var(--accent-rgb), .35); }
#menu-btn:active { filter: brightness(.85); }

.launcher {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 2px 1px;
  transition: background .1s, transform .1s;
}
.launcher svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.launcher:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.launcher:active { transform: translateY(0); background: rgba(var(--accent-rgb), .30); }
.launcher.active { background: rgba(var(--accent-rgb), .28); }

#wl-root { display: flex; align-items: center; gap: 3px; padding: 5px 6px; min-width: 0; flex: 1 1 auto; }
.wl-item {
  display: flex; align-items: center; gap: 7px; height: 28px; min-width: 34px; max-width: 230px;
  padding: 0 10px; border-radius: 7px; color: #c3c7c9; font-size: calc(12px * var(--scale));
  transition: background .1s, color .1s; white-space: nowrap; overflow: hidden;
  position: relative;
}
.wl-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.wl-item .wl-title { overflow: hidden; text-overflow: ellipsis; }
.wl-item:hover { background: rgba(255,255,255,.11); color: #eee; }
.wl-item.active { background: linear-gradient(rgba(var(--accent-rgb), .42), rgba(var(--accent-rgb), .26)); color: #fff; }
.wl-item.active svg { opacity: 1; }
.wl-item.active::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 2px; height: 2px;
  border-radius: 1px; background: #fff; opacity: .9;
}
.wl-item.minimized { opacity: .55; }
.wl-item .wl-close { display: none; }

#tray { display: flex; align-items: center; gap: 1px; padding: 0 4px; }
.tray-item {
  position: relative; height: 34px; min-width: 34px; padding: 0 6px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #d4d8da; transition: background .1s;
}
.tray-item svg { width: 20px; height: 20px; }
.tray-item:hover { background: rgba(255,255,255,.12); }
.tray-item:active { background: rgba(var(--accent-rgb), .30); }
.tray-item .badge {
  position: absolute; top: 3px; right: 2px; min-width: 15px; height: 15px; border-radius: 8px;
  background: #e0574f; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  border: 1px solid rgba(0,0,0,.4);
}

#ws-switch { display: flex; gap: 3px; padding: 0 6px; }
.ws-pill { width: 22px; height: 12px; border-radius: 6px; background: rgba(255,255,255,.14); transition: background .12s, box-shadow .12s, transform .1s; }
.ws-pill:hover { background: rgba(255,255,255,.26); }
.ws-pill.active { background: var(--accent); box-shadow: 0 0 6px rgba(var(--accent-rgb), .6); transform: translateY(-1px); }

#clock {
  height: 34px; padding: 0 10px; border-radius: 8px; display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center; line-height: 1.15; color: #e8eaeb;
  transition: background .1s; min-width: 0;
}
#clock:hover { background: rgba(255,255,255,.12); }
#clock .cl-time { font-size: calc(13px * var(--scale)); font-weight: 600; letter-spacing: .2px; }
#clock .cl-date { font-size: calc(10px * var(--scale)); color: #a9afb3; }

#show-desktop { width: 34px; height: 40px; border-left: 1px solid rgba(255,255,255,.07); border-radius: 0; }
#show-desktop svg { width: 18px; height: 18px; opacity: .9; }

/* ================= windows ================= */

.mint-window {
  position: absolute; min-width: 320px; min-height: 200px;
  background: var(--win-body); border-radius: var(--radius-win);
  border: 1px solid var(--win-border);
  box-shadow: var(--window-shadow-inactive);
  display: flex; flex-direction: column;
  transform-origin: center center;
  will-change: left, top, width, height;
}
.mint-window.focused { box-shadow: var(--window-shadow), 0 0 30px var(--win-glow); }
.mint-window.anim-bounds { transition: left .22s cubic-bezier(.2,.8,.3,1), top .22s cubic-bezier(.2,.8,.3,1), width .22s cubic-bezier(.2,.8,.3,1), height .22s cubic-bezier(.2,.8,.3,1); }
.mint-window.minimizing, .mint-window.restoring {
  transition: transform .16s cubic-bezier(.4,0,.7,1), opacity .16s;
  pointer-events: none;
}
.mint-window.minimizing { transform: scale(.12); opacity: 0; }
.mint-window.restoring { transform: scale(1); opacity: 1; }
.mint-window.workspace-hide { display: none; }

.win-titlebar {
  height: 34px; flex: none; border-radius: var(--radius-win) var(--radius-win) 0 0;
  background: linear-gradient(var(--tb-inactive-top), var(--tb-inactive-bot));
  display: flex; align-items: center; padding-left: 10px;
  cursor: default; touch-action: none;
}
.mint-window.focused .win-titlebar { background: linear-gradient(var(--tb-active-top), var(--tb-active-bot)); }
.win-titlebar .wt-icon { width: 20px; height: 20px; margin-right: 8px; flex: none; }
.win-titlebar .wt-icon svg { width: 20px; height: 20px; }
.win-titlebar .wt-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: calc(12.5px * var(--scale)); color: var(--tb-text-inactive); font-weight: 600;
}
.mint-window.focused .win-titlebar .wt-title { color: var(--tb-text); }
.win-btn {
  width: 40px; height: 34px; display: flex; align-items: center; justify-content: center;
  color: var(--tb-btn-glyph); position: relative;
}
.win-btn:hover { background: rgba(0,0,0,.12); }
.win-btn svg { width: 14px; height: 14px; pointer-events: none; }
.win-btn.wb-close:hover { background: #e0494d; color: #fff; }
.win-btn.wb-max:hover { background: #84bc3a; color: #fff; }
.win-btn.wb-min:hover { background: #e7a52c; color: #fff; }
.wb-close { border-radius: 0 var(--radius-win) 0 0; }
.win-btn.wb-max { border-radius: 0 0 0 0; }

.win-content { flex: 1; min-height: 0; position: relative; border-radius: 0 0 var(--radius-win) var(--radius-win); overflow: hidden; display: flex; flex-direction: column; }
.win-resizer { position: absolute; z-index: 50; }
.wr-n  { top: -4px; left: 10px; right: 10px; height: 8px; cursor: n-resize; }
.wr-s  { bottom: -4px; left: 10px; right: 10px; height: 8px; cursor: s-resize; }
.wr-e  { right: -4px; top: 10px; bottom: 10px; width: 8px; cursor: e-resize; }
.wr-w  { left: -4px; top: 10px; bottom: 10px; width: 8px; cursor: w-resize; }
.wr-ne { top: -4px; right: -4px; width: 14px; height: 14px; cursor: ne-resize; }
.wr-nw { top: -4px; left: -4px; width: 14px; height: 14px; cursor: nw-resize; }
.wr-se { bottom: -4px; right: -4px; width: 14px; height: 14px; cursor: se-resize; }
.wr-sw { bottom: -4px; left: -4px; width: 14px; height: 14px; cursor: sw-resize; }

/* snap preview */
#snap-preview {
  position: absolute; border: 2px solid rgba(var(--accent-rgb), .9); border-radius: 4px;
  background: rgba(var(--accent-rgb), .12); z-index: 5; pointer-events: none;
  transition: left .1s, top .1s, width .1s, height .1s;
}

/* ================= menus / panels (popovers) ================= */

.pop-root { position: fixed; z-index: 1200; }
#menu-root .mint-pop, #context-root .ctx-menu, #panelpop-root .mint-pop { opacity: 0; transform: scale(.96) translateY(-4px); transition: opacity .15s ease, transform .15s ease; }
#menu-root .mint-pop.visible, #context-root .ctx-menu.visible, #panelpop-root .mint-pop.visible { opacity: 1; transform: none; }
#menu-root .mint-pop.fading, #context-root .ctx-menu.fading, #panelpop-root .mint-pop.fading { transition: opacity .13s ease, transform .13s ease; opacity: 0; transform: scale(.97) translateY(-2px); pointer-events: none; }

.mint-pop {
  background: var(--menu-bg); border: 1px solid var(--menu-border);
  border-radius: var(--radius-menu); box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 4px 14px rgba(0,0,0,.3);
  overflow: hidden;
}

#mint-menu { width: 640px; height: 540px; display: flex; flex-direction: column; }
#mm-searchbar { padding: 14px 14px 8px; }
#mm-search {
  width: 100%; height: 34px; padding: 0 12px 0 36px; border-radius: 20px;
  background: var(--entry-bg); border: 1px solid var(--entry-border); color: var(--text-primary);
  outline: none; font-size: calc(13px * var(--scale));
}
#mm-search:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-fainter); }
#mm-searchbar { position: relative; }
#mm-search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-faint); pointer-events: none; }
#mm-body { flex: 1; display: flex; min-height: 0; border-top: 1px solid var(--struts); }
#mm-favs { width: 250px; border-right: 1px solid var(--struts); display: flex; flex-direction: column; padding: 10px 8px; }
#mm-favs-title { font-size: calc(11px * var(--scale)); text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); padding: 4px 10px 8px; }
.mm-fav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-ctrl); font-size: calc(13px * var(--scale)); color: var(--text-primary); }
.mm-fav:hover { background: var(--menu-item); }
.mm-fav svg { width: 26px; height: 26px; flex: none; }
#mm-favs-foot { margin-top: auto; padding: 8px 10px; font-size: calc(11.5px * var(--scale)); color: var(--text-dim); }
#mm-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#mm-cats { display: flex; flex-direction: column; padding: 10px; gap: 2px; max-height: 132px; overflow-y: auto; }
.mm-cat { display: flex; align-items: center; gap: 9px; padding: 5px 10px; border-radius: var(--radius-ctrl); font-size: calc(12.5px * var(--scale)); color: var(--text-dim); }
.mm-cat svg { width: 17px; height: 17px; }
.mm-cat.active { background: var(--menu-item); color: var(--text-primary); font-weight: 600; }
#mm-apps { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.mm-app { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: var(--radius-ctrl); font-size: calc(13px * var(--scale)); color: var(--text-primary); }
.mm-app:hover { background: var(--menu-item); }
.mm-app svg { width: 30px; height: 30px; flex: none; }
.mm-app-no { padding: 24px; text-align: center; color: var(--text-faint); font-size: calc(12.5px * var(--scale)); }
#mm-session { display: flex; padding: 4px 10px 12px; gap: 4px; border-top: 1px solid var(--struts); }
.sess-btn {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); transition: background .1s, color .1s;
}
.sess-btn svg { width: 18px; height: 18px; }
.sess-btn:hover { background: var(--menu-item); color: var(--text-primary); }

/* context menus */
.ctx-menu { min-width: 210px; padding: 5px; }
.ctx-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; font-size: calc(13px * var(--scale)); color: var(--text-primary); position: relative; }
.ctx-item:hover { background: var(--menu-item); }
.ctx-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.ctx-item .ci-label { flex: 1; }
.ctx-item .ci-short { color: var(--text-faint); font-size: calc(11px * var(--scale)); }
.ctx-item.disabled { color: var(--text-faint); pointer-events: none; }
.ctx-item.disabled svg { opacity: .4; }
.ctx-subbox { position: absolute; left: calc(100% - 4px); top: -6px; z-index: 5; }

/* panel popovers */
#panelpop-root .mint-pop { min-width: 260px; padding: 12px; }
.popov-item { padding: 9px 10px; border-radius: 8px; display: flex; gap: 9px; align-items: flex-start; color: var(--text-primary); font-size: calc(12.5px * var(--scale)); }
.popov-item:hover { background: var(--menu-item); }
.popov-item svg { width: 20px; height: 20px; flex: none; }
.popov-title { font-weight: 700; font-size: calc(13px * var(--scale)); }
.popov-sub { color: var(--text-dim); font-size: calc(11.5px * var(--scale)); margin-top: 1px; }
.slider { flex: 1; height: 16px; display: flex; align-items: center; cursor: e-resize; }
.slider .track { position: relative; width: 100%; height: 5px; border-radius: 3px; background: var(--track); }
.slider .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }
.slider .knob { position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 1px solid rgba(0,0,0,.3); transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.popov-row { display: flex; align-items: center; gap: 10px; font-size: calc(12.5px * var(--scale)); color: var(--text-primary); margin: 2px 0; }

/* calendar */
.cal-pop { width: 300px; padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.cal-nav:hover { background: var(--menu-item); }
.cal-nav svg { width: 15px; height: 15px; }
.cal-title { font-weight: 700; color: var(--text-primary); text-transform: capitalize; }
.cal-today-label { text-align: center; font-size: calc(12px * var(--scale)); color: var(--text-dim); margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: calc(10.5px * var(--scale)); color: var(--text-faint); padding: 4px 0; font-weight: 600; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: calc(12px * var(--scale)); color: var(--text-primary); }
.cal-day:hover { background: var(--menu-item); }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.other { color: var(--text-faint); }

/* ================= notifications ================= */

#notify-root { position: fixed; right: 12px; bottom: calc(var(--panel-h) + 12px); z-index: 1400; display: flex; flex-direction: column; gap: 8px; width: 340px; pointer-events: none; }
.notify {
  pointer-events: auto;
  background: var(--notify-bg); border: 1px solid var(--menu-border);
  border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.4);
  padding: 12px 12px 12px 14px; display: flex; gap: 11px; position: relative;
  overflow: hidden; cursor: default;
  animation: notif-in .22s cubic-bezier(.2,.9,.3,1.2);
  transition: transform .2s, opacity .2s;
}
.notify.leaving { transform: translateX(120%); opacity: 0; }
@keyframes notif-in { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }
.notify .n-ic { width: 34px; height: 34px; flex: none; }
.notify .n-ic svg { width: 34px; height: 34px; }
.notify .n-body { flex: 1; min-width: 0; }
.notify .n-title { font-weight: 700; font-size: calc(13px * var(--scale)); color: var(--text-primary); }
.notify .n-msg { font-size: calc(12px * var(--scale)); color: var(--text-dim); margin-top: 2px; line-height: 1.35; overflow-wrap: break-word; }
.notify .n-close { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-faint); opacity: 0; }
.notify:hover .n-close { opacity: 1; }
.notify .n-close:hover { background: var(--list-row-hover); color: var(--text-primary); }
.notify .n-close svg { width: 12px; height: 12px; }
.notify .n-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); width: 100%; }
.notify.paused .n-bar { animation-play-state: paused; }

/* ================= dialogs ================= */

#dialog-root { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; }
#dialog-root .backdrop { position: absolute; inset: 0; background: rgba(10,12,14,.42); animation: fadel .18s ease; }
@keyframes fadel { from { opacity: 0; } }
.mint-dialog {
  position: relative; width: 430px; max-width: calc(100vw - 60px); max-height: calc(100vh - 100px);
  background: var(--dialog-bg); border: 1px solid var(--win-border); border-radius: var(--radius-win);
  box-shadow: var(--window-shadow); display: flex; flex-direction: column;
  animation: dlg-in .18s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes dlg-in { from { transform: scale(.94); opacity: 0; } }
.dlg-titlebar {
  height: 40px; flex: none; border-radius: var(--radius-win) var(--radius-win) 0 0;
  background: linear-gradient(var(--tb-active-top), var(--tb-active-bot));
  display: flex; align-items: center; padding: 0 16px; gap: 9px; color: var(--tb-text);
  font-size: calc(13.5px * var(--scale)); font-weight: 700;
}
.dlg-titlebar svg { width: 20px; height: 20px; }
.dlg-body { padding: 18px 18px 8px; overflow-y: auto; color: var(--text-primary); font-size: calc(13px * var(--scale)); line-height: 1.45; user-select: text; cursor: auto; }
.dlg-buttons { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; }
.dlg-buttons button { min-width: 84px; }

/* file chooser */
.chooser { width: 720px; height: 460px; max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.ch-body { flex: 1; display: flex; min-height: 0; }
.ch-side { width: 168px; background: var(--sidebar-bg); padding: 8px; overflow-y: auto; border-right: 1px solid var(--struts); }
.ch-side .ch-place { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 7px; color: var(--text-primary); font-size: calc(12.5px * var(--scale)); }
.ch-side .ch-place:hover { background: var(--sidebar-hover); }
.ch-side .ch-place.active { background: var(--sidebar-active); }
.ch-side .ch-place svg { width: 20px; height: 20px; }
.ch-side .ch-und { padding: 8px 9px 4px; font-size: calc(10.5px * var(--scale)); text-transform: uppercase; letter-spacing: .8px; color: var(--text-faint); }
.ch-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-path { height: 38px; display: flex; align-items: center; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--struts); overflow: hidden; white-space: nowrap; flex: none; }
.ch-crumb { padding: 4px 8px; border-radius: 6px; color: var(--text-primary); font-size: calc(12.5px * var(--scale)); }
.ch-crumb:hover { background: var(--list-row-hover); }
.ch-crumb.last { font-weight: 700; }
.ch-cells { flex: 1; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); align-content: start; gap: 2px; }
.ch-cell { padding: 8px 4px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--text-primary); font-size: calc(12px * var(--scale)); text-align: center; }
.ch-cell:hover { background: var(--list-row-hover); }
.ch-cell.active { background: var(--list-row-selected); }
.ch-cell svg { width: 44px; height: 44px; }
.ch-cell .c-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-footer { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--struts); flex: none; }
.ch-name { flex: 1; }
.ch-footer .flat { min-width: 74px; }

/* ================= alt-tab ================= */

#alttab-root { position: fixed; inset: 0; z-index: 1800; display: flex; align-items: center; justify-content: center; background: rgba(8,10,12,.35); }
.att-panel { display: flex; gap: 10px; padding: 18px; background: rgba(30,33,36,.92); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.6); max-width: 88vw; overflow-x: auto; }
.att-card { width: 168px; padding: 10px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 9px; transition: background .08s; }
.att-card .att-ic { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.att-card .att-ic svg { width: 54px; height: 54px; }
.att-card .att-title { color: #cfd4d7; font-size: calc(11.5px * var(--scale)); text-align: center; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.att-card.active { background: rgba(var(--accent-rgb), .30); outline: 2px solid var(--accent); }
.att-card.active .att-title { color: #fff; font-weight: 700; }
.att-hint { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); color: #9aa1a6; font-size: calc(12px * var(--scale)); }

/* ================= OSD ================= */

#osd-root { position: fixed; bottom: calc(var(--panel-h) + 90px); left: 50%; transform: translateX(-50%); z-index: 1900; }
.osd {
  display: flex; align-items: center; gap: 12px; padding: 13px 20px;
  background: rgba(28,31,34,.88); border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  color: #ececec; box-shadow: 0 12px 34px rgba(0,0,0,.45);
  animation: osd-in .2s ease;
}
@keyframes osd-in { from { transform: translateY(12px); opacity: 0; } }
.osd svg { width: 26px; height: 26px; }
.osd .osd-val { font-weight: 700; min-width: 40px; text-align: right; color: var(--accent); }

/* ================= boot / login / lock ================= */

#boot-layer { background: #040607; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; z-index: 3000; }
.boot-logo { width: 200px; height: 200px; position: relative; animation: boot-pop .9s cubic-bezier(.2,.9,.3,1.2); }
.boot-logo svg { width: 200px; height: 200px; }
@keyframes boot-pop { from { transform: scale(.6); opacity: 0; } }
.boot-rings { position: absolute; inset: -26px; border-radius: 50%; border: 2px solid rgba(154,184,122,.12); border-top-color: rgba(154,184,122,.8); animation: boot-spin 1.1s linear infinite; }
.boot-rings.r2 { inset: -38px; animation-duration: 1.8s; animation-direction: reverse; border-color: rgba(154,184,122,.07); border-bottom-color: rgba(154,184,122,.5); }
@keyframes boot-spin { to { transform: rotate(360deg); } }
.boot-text { color: #c7d3c0; font-size: calc(21px * var(--scale)); letter-spacing: .6px; font-weight: 600; }
.boot-sub { color: #68776b; font-size: calc(12px * var(--scale)); letter-spacing: 2.4px; text-transform: uppercase; }
.boot-bar { width: 240px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.09); overflow: hidden; }
.boot-bar .fill { height: 100%; width: 0%; background: linear-gradient(90deg, #748f5c, #9AB87A); border-radius: 2px; transition: width .3s ease; }
.boot-dots { display: flex; gap: 9px; }
.boot-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(154,184,122,.35); animation: dot-pulse 1.2s ease-in-out infinite; }
.boot-dots span:nth-child(2) { animation-delay: .15s; }
.boot-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot-pulse { 0%,100% { transform: scale(.75); opacity: .4; } 50% { transform: scale(1.15); opacity: 1; } }

#login-layer { background: #0d100f; z-index: 2900; display: flex; align-items: center; justify-content: center; }
#login-layer .lg-bg { position: absolute; inset: 0; filter: blur(10px) brightness(.55) saturate(.9); transform: scale(1.06); }
.lg-card {
  position: relative; width: 380px; background: rgba(30,33,36,.82); border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px; padding: 34px 34px 26px; display: flex; flex-direction: column; align-items: center; gap: 0;
  box-shadow: 0 24px 70px rgba(0,0,0,.6); backdrop-filter: blur(8px);
  animation: dlg-in .35s cubic-bezier(.2,.9,.3,1.15);
}
.lg-avatar { width: 92px; height: 92px; border-radius: 50%; background: linear-gradient(135deg, #9AB87A, #6f9257); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 40px; font-weight: 700; border: 3px solid rgba(255,255,255,.25); box-shadow: 0 0 0 5px rgba(154,184,122,.25); }
.lg-name { color: #f0f2ef; font-size: calc(21px * var(--scale)); font-weight: 700; margin-top: 14px; }
.lg-host { color: #9aa59c; font-size: calc(12px * var(--scale)); margin-top: 2px; }
.lg-err { color: #f27d78; font-size: calc(12px * var(--scale)); height: 20px; margin-top: 10px; }
.lg-field { width: 100%; margin-top: 4px; }
.lg-field input {
  width: 100%; height: 40px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; color: #fff; padding: 0 14px; font-size: calc(14px * var(--scale)); outline: none;
}
.lg-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .3); }
.lg-field input::placeholder { color: #77817a; }
.lg-row { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.lg-row select, .lg-row .session-select {
  flex: 1; height: 36px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px; color: #e4e8e3; padding: 0 10px; outline: none; font-size: calc(12.5px * var(--scale));
  appearance: none; background-image: none;
}
.lg-auth { width: 100%; margin-top: 14px; }
.lg-foot { width: 100%; display: flex; justify-content: space-between; margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.09); }
.lg-foot-ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #b8c0ba; }
.lg-foot-ic:hover { background: rgba(255,255,255,.1); color: #fff; }
.lg-foot-ic svg { width: 19px; height: 19px; }
.lg-hint { color: #7e8a81; font-size: calc(11px * var(--scale)); margin-top: 18px; text-align: center; line-height: 1.5; }

#lock-layer { z-index: 2600; }
#shutdown-layer { background: #030505; z-index: 3100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
#shutdown-layer .sh-logo { width: 130px; height: 130px; opacity: 0; animation: fade-in 2.4s ease forwards; }
#shutdown-layer .sh-text { color: #8a9890; letter-spacing: 1.5px; font-size: calc(13px * var(--scale)); text-transform: uppercase; opacity: 0; animation: fade-in 2.4s ease .8s forwards; }
@keyframes fade-in { to { opacity: 1; } }

#dim-overlay { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 3999; transition: opacity .15s; }
html.brightness-low #dim-overlay { opacity: var(--brightness-dim, 0); }

/* ================= tooltips ================= */

#desktop-tooltip {
  position: fixed; z-index: 4000; pointer-events: none; background: var(--tt-bg); color: var(--tt-text);
  padding: 5px 9px; border-radius: 6px; font-size: calc(11.5px * var(--scale)); line-height: 1.3;
  box-shadow: 0 4px 14px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08);
  opacity: 0; transition: opacity .1s; max-width: 260px; user-select: none;
}
#desktop-tooltip.show { opacity: 1; }

/* ================= generic app chrome ================= */

.app-menu {
  height: 30px; flex: none; display: flex; align-items: center; gap: 2px;
  padding: 0 8px; background: transparent; border-bottom: 1px solid var(--struts); font-size: calc(12.5px * var(--scale));
}
.app-menu .am-item { padding: 4px 9px; border-radius: 6px; color: var(--text-primary); position: relative; }
.app-menu .am-item:hover { background: var(--list-row-hover); }
.app-toolbar { flex: none; display: flex; align-items: center; gap: 5px; padding: 7px 9px; border-bottom: 1px solid var(--struts); }
.app-toolbar .tb-btn {
  width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--text-primary);
}
.app-toolbar .tb-btn svg { width: 17px; height: 17px; }
.app-toolbar .tb-btn:hover { background: var(--list-row-hover); }
.app-toolbar .tb-btn:disabled { opacity: .35; pointer-events: none; }
.app-statusbar { flex: none; height: 26px; display: flex; align-items: center; gap: 14px; padding: 0 12px; background: var(--status-bg); border-top: 1px solid var(--struts); font-size: calc(11.5px * var(--scale)); color: var(--text-dim); }

/* window content surfaces */
.app-surface { flex: 1; min-height: 0; overflow: auto; position: relative; }

/* nemo grid */
.ng-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); align-content: start; gap: 2px; padding: 10px 12px; }
.ng-item { padding: 8px 4px; border-radius: 9px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--text-primary); font-size: calc(12px * var(--scale)); text-align: center; position: relative; }
.ng-item:hover { background: var(--list-row-hover); }
.ng-item.selected { background: var(--list-row-selected); outline: 1px solid var(--selection-b); }
.ng-item svg { width: 52px; height: 52px; }
.ng-item .ni-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-item .ni-name.rename { background: var(--input-bg); border: 1px solid var(--accent); border-radius: 4px; padding: 0 4px; color: var(--text-primary); }
.ng-entry { padding: 12px 14px; color: var(--text-faint); font-size: calc(12.5px * var(--scale)); }

/* nemo list */
.nl-table { width: 100%; border-collapse: collapse; font-size: calc(12.5px * var(--scale)); }
.nl-table th { position: sticky; top: 0; z-index: 2; background: var(--sidebar-bg); text-align: left; padding: 7px 12px; color: var(--text-dim); font-weight: 600; border-bottom: 1px solid var(--struts); white-space: nowrap; }
.nl-table th.sortable { cursor: default; }
.nl-table th:hover { background: var(--sidebar-hover); }
.nl-table td { padding: 6px 12px; border-bottom: 1px solid rgba(0,0,0,.06); color: var(--text-primary); white-space: nowrap; }
.nl-table tbody tr:hover { background: var(--list-row-hover); }
.nl-table tbody tr.selected { background: var(--list-row-selected); }
.nl-table td.nl-ic svg { width: 20px; height: 20px; display: block; }
.nl-table td.nl-mtime, .nl-table td.nl-size { color: var(--text-dim); }

/* sidebar (nemo/settings) */
.app-sidebar { width: 186px; flex: none; background: var(--sidebar-bg); display: flex; flex-direction: column; border-right: 1px solid var(--struts); min-height: 0; }
.side-sec { padding: 7px 8px 2px; font-size: calc(10.5px * var(--scale)); text-transform: uppercase; letter-spacing: .8px; color: var(--text-faint); }
.side-item { display: flex; align-items: center; gap: 9px; padding: 6px 10px; margin: 0 6px; border-radius: 7px; color: var(--text-primary); font-size: calc(12.5px * var(--scale)); }
.side-item:hover { background: var(--sidebar-hover); }
.side-item.active { background: var(--sidebar-active); }
.side-item svg { width: 20px; height: 20px; }
.side-item.dim { color: var(--text-faint); }

/* xed editor */
.xed-wrap { flex: 1; display: flex; min-height: 0; }
.xed-lines { width: 52px; flex: none; background: var(--win-body2); color: var(--text-faint); text-align: right; padding: 10px 10px 10px 0; font-family: var(--font-mono); font-size: calc(12.5px * var(--scale)); line-height: 1.55; overflow: hidden; user-select: none; border-right: 1px solid var(--struts); position: relative; }
.xed-lines .ln { height: 1.55em; padding-right: 3px; border-radius: 3px; }
.xed-lines .ln.cur { color: var(--text-primary); font-weight: 700; }
.xed-area { flex: 1; padding: 10px 14px; outline: none; font-family: var(--font-mono); font-size: calc(12.5px * var(--scale)); line-height: 1.55; white-space: pre; overflow: auto; user-select: text; cursor: text; tab-size: 4; color: var(--text-primary); caret-color: var(--accent); }
.xed-findbar { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--win-body2); border-top: 1px solid var(--struts); font-size: calc(12px * var(--scale)); }
.xed-findbar input { width: 150px; height: 26px; padding: 0 8px; font-size: calc(12px * var(--scale)); }
.xed-findbar .fb-count { color: var(--text-dim); min-width: 60px; }
.xed-tabs { flex: none; display: flex; align-items: flex-end; gap: 0; background: var(--win-body2); border-bottom: 1px solid var(--struts); padding: 4px 6px 0; }
.xed-tab { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px 8px 0 0; color: var(--text-dim); font-size: calc(12px * var(--scale)); max-width: 180px; }
.xed-tab:hover { background: var(--list-row-hover); }
.xed-tab.active { background: var(--win-body); color: var(--text-primary); border: 1px solid var(--struts); border-bottom: none; }
.xed-tab .xt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xed-tab .xt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.xed-tab .xt-close { width: 15px; height: 15px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; }
.xed-tab .xt-close:hover { background: #e0494d; color: #fff; }

/* terminal */
.term-body { flex: 1; background: #1d2023; color: #d6dadc; font-family: var(--font-mono); font-size: calc(12.5px * var(--scale)); line-height: 1.5; padding: 9px 12px; overflow-y: auto; user-select: text; cursor: text; white-space: pre-wrap; word-break: break-all; }
.term-line { min-height: 1.5em; }
.tx-fg0 { color: #d6dadc; } .tx-fg1 { color: #e05a4e; } .tx-fg2 { color: #8dba64; } .tx-fg3 { color: #e0b976; }
.tx-fg4 { color: #6f9ac2; } .tx-fg5 { color: #b07cb0; } .tx-fg6 { color: #6fc2b7; } .tx-fg7 { color: #9aa2a8; }
.tx-bold { font-weight: 700; }

/* terminal: shell prompt colors */
.term-cmd { display: inline-block; outline: none; white-space: pre; min-width: 1px; }
.term-cmd .caret { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { background: transparent !important; } }
.term-tabs { display: flex; align-items: center; gap: 3px; padding: 5px 8px; background: #202326; border-bottom: 1px solid #2c3033; }
.term-tab { padding: 4px 14px; border-radius: 7px; color: #9aa2a8; font-size: calc(12px * var(--scale)); display: flex; gap: 7px; align-items: center; }
.term-tab:hover { background: rgba(255,255,255,.08); }
.term-tab.active { background: #2b2f33; color: #e6e9ea; }
.term-tab .tt-close { width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.term-tab .tt-close:hover { background: #e0494d; color: #fff; }
.term-new { width: 26px; height: 26px; border-radius: 7px; color: #9aa2a8; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.term-new:hover { background: rgba(255,255,255,.1); color: #fff; }

/* settings */
.st-root { flex: 1; display: flex; min-height: 0; }
.st-cats { width: 198px; flex: none; background: var(--sidebar-bg); border-right: 1px solid var(--struts); overflow-y: auto; padding: 8px 6px; }
.st-cat { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; color: var(--text-dim); font-size: calc(13px * var(--scale)); font-weight: 600; }
.st-cat:hover { background: var(--sidebar-hover); color: var(--text-primary); }
.st-cat.active { background: var(--sidebar-active); color: var(--text-primary); }
.st-cat svg { width: 19px; height: 19px; }
.st-items { padding: 6px 0 12px; }
.st-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: var(--text-primary); font-size: calc(13px * var(--scale)); }
.st-item:hover { background: var(--sidebar-hover); }
.st-item.active { background: var(--sidebar-active); }
.st-item svg { width: 22px; height: 22px; }
.st-page { flex: 1; overflow-y: auto; padding: 20px 26px; min-width: 0; }
.st-page h2 { font-size: calc(19px * var(--scale)); color: var(--text-primary); margin-bottom: 4px; }
.st-page .st-lead { color: var(--text-dim); font-size: calc(12.5px * var(--scale)); margin-bottom: 18px; }
.st-section { margin-bottom: 22px; }
.st-section > .lbl { font-size: calc(12px * var(--scale)); text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 9px; }
.theme-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.theme-card { border: 2px solid transparent; border-radius: 12px; background: var(--tile-bg); padding: 8px; text-align: center; }
.theme-card:hover { background: var(--list-row-hover); }
.theme-card.active { border-color: var(--accent); }
.tc-swatch { height: 72px; border-radius: 8px; border: 1px solid rgba(0,0,0,.25); margin-bottom: 7px; display: flex; flex-direction: column; overflow: hidden; }
.tc-swatch .sw-tb { height: 16px; }
.tc-swatch .sw-body { flex: 1; }
.theme-card .tc-name { font-size: calc(12px * var(--scale)); color: var(--text-primary); }
.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.wp-card { border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--tile-bg); }
.wp-card:hover { border-color: var(--text-faint); }
.wp-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wp-card canvas { width: 100%; aspect-ratio: 16/10; display: block; }
.wp-card .wp-name { padding: 6px 8px; font-size: calc(11.5px * var(--scale)); color: var(--text-dim); text-align: center; }
.accent-row { display: flex; gap: 9px; }
.accent-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.accent-dot:hover { transform: scale(1.08); }
.accent-dot.active { border-color: #fff; box-shadow: 0 0 0 2px #000, inset 0 0 0 1px rgba(0,0,0,.2); }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--struts); }
.opt-row .or-l { font-size: calc(13px * var(--scale)); color: var(--text-primary); }
.opt-row .or-s { font-size: calc(11.5px * var(--scale)); color: var(--text-dim); }

/* switch */
.switch { width: 40px; height: 22px; border-radius: 11px; background: var(--track); border: 1px solid rgba(0,0,0,.2); position: relative; transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fafafa; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch.on { background: var(--accent); }
.switch.on::after { left: 20px; }

/* software manager */
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 14px; }
.sm-card { border: 1px solid var(--struts); border-radius: 12px; padding: 13px; background: var(--tile-bg); display: flex; flex-direction: column; gap: 8px; transition: border-color .12s, box-shadow .12s; }
.sm-card:hover { border-color: rgba(var(--accent-rgb), .45); box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.sm-card .sm-top { display: flex; gap: 11px; align-items: flex-start; }
.sm-card .sm-top svg { width: 44px; height: 44px; flex: none; }
.sm-card .sm-name { font-weight: 700; color: var(--text-primary); font-size: calc(13.5px * var(--scale)); }
.sm-card .sm-cats { font-size: calc(11px * var(--scale)); color: var(--text-faint); text-transform: uppercase; letter-spacing: .5px; }
.sm-card .sm-desc { font-size: calc(11.5px * var(--scale)); color: var(--text-dim); line-height: 1.35; flex: 1; }
.sm-star { color: #e8b23a; letter-spacing: 1px; font-size: calc(12px * var(--scale)); }
.sm-btn { width: 100%; }
.sm-btn.installed { border-color: var(--accent); color: var(--accent); background: var(--accent-dimmer); }
.sm-progress { width: 100%; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; position: relative; margin-top: 2px; }
.sm-progress .fill { height: 100%; width: 0%; background: var(--accent); border-radius: 3px; transition: width .12s linear; }
.sm-progress .pct { position: absolute; right: 0; top: -16px; font-size: 10px; color: var(--text-dim); }

/* calculator */
.calc-body { flex: 1; display: flex; flex-direction: column; background: var(--win-body); padding: 12px; gap: 10px; }
.calc-disp { flex: none; text-align: right; font-size: calc(30px * var(--scale)); font-weight: 600; color: var(--text-primary); padding: 14px 16px; background: var(--tile-bg); border: 1px solid var(--struts); border-radius: 10px; font-family: var(--font-mono); user-select: text; cursor: text; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calc-disp .cd-expr { display: block; font-size: calc(13px * var(--scale)); color: var(--text-dim); min-height: 1.4em; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-keypad { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; min-height: 0; }
.calc-key { border-radius: 10px; background: var(--entry-bg); border: 1px solid var(--entry-border); color: var(--text-primary); font-size: calc(16px * var(--scale)); display: flex; align-items: center; justify-content: center; }
.calc-key:hover { background: var(--list-row-hover); }
.calc-key:active { background: var(--accent-dimmer); }
.calc-key.op { background: var(--tile-bg); color: var(--accent); font-weight: 600; }
.calc-key.op:hover { background: var(--accent-dimmer); }
.calc-key.eq { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
html[data-theme^="light"] .calc-key.eq { color: #1f2a16; }
.calc-key.eq:hover { background: var(--accent-strong); }
.calc-key.wide { grid-column: span 2; }
.calc-key:active { filter: brightness(.92); }

/* image viewer */
.pix-view { flex: 1; background: #17191b; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; min-height: 0; }
.pix-view canvas { max-width: 100%; max-height: 100%; transition: transform .12s; }
.pix-bar { flex: none; display: flex; align-items: center; gap: 4px; background: #1f2124; padding: 5px 8px; border-top: 1px solid #2c2f32; }
.pix-info { margin-left: auto; color: #9aa2a8; font-size: calc(11.5px * var(--scale)); padding-right: 10px; }

/* browser */
.br-tabs { flex: none; display: flex; align-items: center; background: #26292c; padding: 6px 8px 0; gap: 2px; }
.br-tab { display: flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 9px 9px 0 0; color: #aab0b4; font-size: calc(11.5px * var(--scale)); max-width: 200px; min-width: 60px; position: relative; }
.br-tab:hover { background: rgba(255,255,255,.06); }
.br-tab.active { background: #2f3235; color: #e8eaeb; }
.br-tab .bt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: center; }
.br-tab .bt-close { width: 15px; height: 15px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; flex: none; }
.br-tab .bt-close:hover { background: #e0494d; color: #fff; }
.br-new { width: 26px; height: 26px; border-radius: 7px; color: #aab0b4; display: flex; align-items: center; justify-content: center; font-size: 15px; margin: 0 4px 4px; }
.br-new:hover { background: rgba(255,255,255,.09); color: #fff; }
.br-chrome { flex: none; display: flex; align-items: center; gap: 5px; background: #2f3235; padding: 7px 10px; }
.br-url { flex: 1; height: 30px; background: #222528; border: none; border-radius: 18px; color: #e2e5e6; padding: 0 14px; font-size: calc(12.5px * var(--scale)); outline: none; }
.br-url:focus { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .4); }
.br-suggest { position: absolute; top: 38px; left: 74px; right: 74px; z-index: 30; background: #33373b; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 5px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.br-suggest .bs-item { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; color: #dfe3e4; font-size: calc(12.5px * var(--scale)); }
.br-suggest .bs-item:hover, .br-suggest .bs-item.hl { background: rgba(var(--accent-rgb), .25); }
.br-suggest .bs-item svg { width: 16px; height: 16px; }
.br-page { flex: 1; background: #ffffff; color: #222; overflow-y: auto; user-select: text; cursor: auto; }
.br-page code { font-family: var(--font-mono); }

/* welcome page + internal browser pages living in light context */
.mint-start { background: linear-gradient(160deg, #1c2a22 0%, #16231b 55%, #141d19 100%); color: #e8efe7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 100%; padding: 40px; font-size: calc(13px * var(--scale)); }
.mint-start h1 { font-size: calc(30px * var(--scale)); font-weight: 300; letter-spacing: .5px; }
.mint-start .ms-search { display: flex; width: 460px; max-width: 90%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 24px; height: 42px; }
.mint-start .ms-search input { flex: 1; background: none; border: none; outline: none; color: #fff; padding: 0 18px; font-size: calc(14px * var(--scale)); cursor: text; }
.mint-start .ms-search button { padding: 0 16px; color: #9AB87A; }
.mint-start .ms-links { display: flex; gap: 40px; margin-top: 8px; }
.mint-start .ms-links a { color: #9AB87A; text-decoration: none; font-size: calc(12.5px * var(--scale)); }
.mint-start .ms-links a:hover { text-decoration: underline; }

.www-doc { padding: 42px 10%; background: #fff; color: #26292c; }
.www-doc h1 { color: #3d6b2f; font-size: calc(26px * var(--scale)); margin-bottom: 8px; }
.www-doc p { margin: 10px 0; line-height: 1.6; font-size: calc(13.5px * var(--scale)); }
.www-doc .card-row { display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.www-doc .card { flex: 1; min-width: 200px; border: 1px solid #e2e5e6; border-radius: 10px; padding: 16px; background: #fafbf9; }
.www-doc .card h3 { color: #4a7c3a; margin-bottom: 6px; }
.www-offline { background: #f6f6f6; color: #333; min-height: 100%; font-family: Arial, sans-serif; }
.wo-head { background: #1d2023; color: #fff; padding: 14px 4%; display: flex; align-items: center; gap: 14px; }
.wo-search { flex: 1; display: flex; background: #2b2f33; border-radius: 20px; height: 34px; }
.wo-search input { flex: 1; background: none; border: none; color: #fff; padding: 0 14px; outline: none; }
.wo-body { padding: 26px 4%; max-width: 880px; margin: 0 auto; }
.wo-card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.07); margin-bottom: 14px; }

/* sticky notes */
.sticky-note { position: absolute; width: 208px; min-height: 180px; background: #f8eec3; border-radius: 3px; box-shadow: 2px 3px 12px rgba(0,0,0,.28); display: flex; flex-direction: column; font-size: calc(12.5px * var(--scale)); }
.sticky-note .sn-body { flex: 1; padding: 10px 12px; outline: none; background: none; border: none; color: #4a4432; font-family: "Comic Sans MS", var(--font-ui); line-height: 1.45; resize: none; user-select: text; cursor: text; }
.sticky-note .sn-x { position: absolute; top: 2px; right: 4px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: rgba(0,0,0,.35); opacity: 0; }
.sticky-note:hover .sn-x { opacity: 1; }
.sticky-note .sn-x:hover { background: rgba(0,0,0,.14); color: #000; }
.sticky-note .sn-date { padding: 0 12px 6px; font-size: 10px; color: rgba(0,0,0,.4); }

/* about dialog */
.about-art { display: flex; gap: 16px; align-items: flex-start; }
.about-art svg { width: 64px; height: 64px; }
.about-art .aa-t { font-weight: 700; font-size: calc(15px * var(--scale)); margin-bottom: 2px; }
.about-art .aa-s { color: var(--text-dim); font-size: calc(12px * var(--scale)); line-height: 1.5; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 12px 0; font-size: calc(12.5px * var(--scale)); }
.about-grid .ag-k { color: var(--text-faint); }
.about-grid .ag-v { color: var(--text-primary); text-align: right; }
.about-notice { background: var(--accent-dimmer); border: 1px solid var(--accent-fainter); border-radius: 8px; padding: 9px 12px; font-size: calc(11.5px * var(--scale)); color: var(--text-dim); }

/* welcome dialog */
.wlcm-item { display: flex; gap: 12px; padding: 9px 8px; border-radius: 9px; align-items: flex-start; }
.wlcm-item:hover { background: var(--list-row-hover); }
.wlcm-item svg { width: 30px; height: 30px; flex: none; }
.wlcm-item .wi-t { font-weight: 600; color: var(--text-primary); }
.wlcm-item .wi-s { color: var(--text-dim); font-size: calc(12px * var(--scale)); }

/* properties dialog */
.prop-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: calc(12.5px * var(--scale)); border-bottom: 1px solid var(--struts); }
.prop-row .pr-k { color: var(--text-faint); }
.prop-row .pr-v { color: var(--text-primary); text-align: right; max-width: 60%; overflow-wrap: anywhere; }

/* misc */
.faded-in { animation: fadel .25s ease; }
.panel-hidden { display: none !important; }
.drag-ghost { position: fixed; z-index: 5000; pointer-events: none; opacity: .85; }
