/* ===================== Nemo ===================== */
.nemo { display: flex; flex-direction: column; height: 100%; }
.nemo-main { flex: 1; display: flex; min-height: 0; }
.nemo-sidebar { width: 176px; flex-shrink: 0; background: var(--sidebar-bg); border-right: 1px solid var(--win-border); overflow-y: auto; padding: 6px 0; }
.nemo-side-head { font-size: 10.5px; font-weight: 700; color: var(--win-fg-dim); text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 14px 4px; }
.nemo-side-item {
  display: flex; align-items: center; gap: 9px; padding: 5px 14px; font-size: 12.5px;
  color: var(--win-fg); position: relative;
}
.nemo-side-item .ns-ico { width: 16px; height: 16px; display: flex; opacity: 0.8; flex-shrink: 0; }
.nemo-side-item:hover { background: var(--hover-bg); }
.nemo-side-item.active { background: var(--accent); color: #fff; }
.nemo-side-item.active .ns-ico { opacity: 1; }
.nemo-files { flex: 1; overflow: auto; position: relative; padding: 8px; }
.nemo-files.list-view { padding: 0; }

.nemo-breadcrumbs { display: flex; align-items: center; gap: 2px; flex: 1; overflow: hidden; }
.crumb {
  border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--win-fg);
  padding: 4px 11px; font-size: 12.5px; border-radius: 5px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.crumb:hover { filter: brightness(1.05); }
.crumb.current { background: var(--accent); border-color: var(--accent-strong); color: #fff; }
.nemo-path-entry { flex: 1; }

.file-icon-grid { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; }
.file-item {
  width: 96px; padding: 10px 4px 8px; border-radius: 6px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.file-item .fi-img { width: 48px; height: 48px; pointer-events: none; }
.file-item .fi-name { font-size: 11.5px; line-height: 1.25; word-break: break-word; max-height: 43px; overflow: hidden; pointer-events: none; }
.file-item:hover { background: var(--hover-bg); }
.file-item.selected { background: rgba(146,179,114,0.35); outline: 1px solid var(--accent); }
.file-item.cut-pending { opacity: 0.5; }

.file-list-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.file-list-table th {
  text-align: left; font-weight: 600; color: var(--win-fg-dim); font-size: 11.5px;
  padding: 6px 12px; border-bottom: 1px solid var(--win-border); position: sticky; top: 0; background: var(--content-bg);
}
.file-list-table td { padding: 5px 12px; }
.file-row .fr-ico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 8px; }
.file-row:hover { background: var(--hover-bg); }
.file-row.selected { background: rgba(146,179,114,0.4); color: #fff; }
.nemo-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--win-fg-dim); font-size: 13px; }
.nemo-empty svg { opacity: 0.35; }

/* ===================== Xed text editor ===================== */
.xed { display: flex; flex-direction: column; height: 100%; }
.xed-menubar { display: flex; gap: 2px; padding: 2px 6px; background: var(--win-bg); border-bottom: 1px solid var(--win-border); font-size: 12.5px; }
.xed-menubar button { border: none; background: transparent; color: var(--win-fg); padding: 4px 9px; border-radius: 4px; }
.xed-menubar button:hover { background: var(--hover-bg); }
.xed-tabs { display: flex; background: var(--win-bg); border-bottom: 1px solid var(--win-border); overflow-x: auto; }
.xed-tab {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; font-size: 12.5px;
  border-right: 1px solid var(--win-border); color: var(--win-fg-dim); max-width: 200px;
}
.xed-tab.active { color: var(--win-fg); background: var(--content-bg); box-shadow: inset 0 2px 0 var(--accent); }
.xed-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xed-tab .xt-close { border: none; background: none; color: inherit; border-radius: 4px; width: 18px; height: 18px; line-height: 1; font-size: 13px; }
.xed-tab .xt-close:hover { background: var(--hover-bg); }
.xed-editor-wrap { flex: 1; display: flex; min-height: 0; background: var(--content-bg); }
.xed-gutter {
  width: 44px; flex-shrink: 0; padding: 8px 8px 8px 0; text-align: right;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--win-fg-dim);
  background: var(--sidebar-bg); border-right: 1px solid var(--win-border);
  overflow: hidden; white-space: pre;
}
.xed-textarea {
  flex: 1; border: none; outline: none; resize: none; padding: 8px 12px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  background: var(--content-bg); color: var(--win-fg);
  white-space: pre; overflow-wrap: normal; overflow: auto;
  user-select: text; -webkit-user-select: text; cursor: text;
}

/* ===================== Terminal ===================== */
.term {
  flex: 1; background: #2d2d2d; color: #d0d0d0;
  font-family: var(--mono); font-size: 13px; line-height: 1.45;
  padding: 6px 9px; overflow-y: auto; cursor: text;
  user-select: text; -webkit-user-select: text;
}
.term-line { white-space: pre-wrap; word-break: break-all; min-height: 1.45em; }
.term .t-green { color: #8ae234; font-weight: 700; }
.term .t-blue { color: #729fcf; font-weight: 700; }
.term .t-cyan { color: #34e2e2; }
.term .t-yellow { color: #fce94f; }
.term .t-red { color: #ef2929; }
.term .t-white { color: #ffffff; font-weight: 700; }
.term .t-dim { color: #888; }
.term-input-line { display: flex; flex-wrap: wrap; }
.term-caret {
  display: inline-block; width: 8px; height: 1.25em; background: #d0d0d0; vertical-align: text-bottom;
  animation: caretBlink 1.06s steps(1) infinite;
}
.term.unfocused .term-caret { animation: none; background: transparent; outline: 1px solid #d0d0d0; }
@keyframes caretBlink { 50% { opacity: 0; } }

/* ===================== Settings ===================== */
.settings { display: flex; flex-direction: column; height: 100%; }
.settings-search-row { padding: 10px 14px; border-bottom: 1px solid var(--win-border); background: var(--win-bg); display:flex; align-items:center; gap:10px; }
.settings-back { border:none; background:transparent; color: var(--win-fg); padding: 5px 9px; border-radius: 5px; display: none; align-items:center; gap:6px; font-size: 12.5px; }
.settings-back:hover { background: var(--hover-bg); }
.settings.in-page .settings-back { display: flex; }
.settings-body { flex: 1; overflow-y: auto; background: var(--content-bg); }
.settings-cat-head { font-size: 12px; font-weight: 700; color: var(--win-fg-dim); text-transform: uppercase; letter-spacing: 0.6px; padding: 18px 22px 8px; }
.settings-grid { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 14px; }
.settings-tile {
  width: 112px; padding: 14px 6px 10px; border-radius: 8px; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--win-fg);
}
.settings-tile .st-ico { width: 40px; height: 40px; }
.settings-tile span { font-size: 11.5px; line-height: 1.3; text-align: center; }
.settings-tile:hover { background: var(--hover-bg); }
.settings-tile:active { background: var(--press-bg); }

.settings-page { padding: 18px 26px 30px; max-width: 660px; }
.settings-page h2 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.set-group { background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 8px; margin-bottom: 16px; overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 16px; border-bottom: 1px solid var(--win-border); font-size: 13px; }
.set-row:last-child { border-bottom: none; }
.set-row-label small { display: block; color: var(--win-fg-dim); font-size: 11.5px; margin-top: 2px; }
select.mint-select {
  padding: 5px 10px; border-radius: 5px; border: 1px solid var(--input-border);
  background: var(--input-bg); color: var(--win-fg); font-size: 12.5px; outline: none;
}
.mint-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.mint-switch input { opacity: 0; width: 0; height: 0; }
.mint-switch .sw-track {
  position: absolute; inset: 0; border-radius: 12px; background: #b5b5b5; transition: background 0.18s;
}
.theme-dark .mint-switch .sw-track { background: #555; }
.mint-switch .sw-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: left 0.18s;
}
.mint-switch input:checked + .sw-track { background: var(--accent); }
.mint-switch input:checked + .sw-track::after { left: 22px; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.accent-swatch { width: 30px; height: 30px; border-radius: 6px; border: 2px solid transparent; }
.accent-swatch.sel { border-color: var(--win-fg); box-shadow: 0 0 0 2px var(--content-bg) inset; }
.wallpaper-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-thumb {
  width: 148px; height: 84px; border-radius: 7px; border: 3px solid transparent;
  background-size: cover; background-position: center; padding: 0;
}
.wp-thumb:hover { filter: brightness(1.08); }
.wp-thumb.sel { border-color: var(--accent); }
input[type=range].mint-range { accent-color: var(--accent); }

/* ===================== Software Manager ===================== */
.softman { display: flex; flex-direction: column; height: 100%; }
.sm-hero {
  background: linear-gradient(135deg, #5d8a4a, #92b372); color: #fff;
  padding: 26px 28px; flex-shrink: 0;
}
.sm-hero h2 { font-size: 20px; font-weight: 600; }
.sm-hero p { margin-top: 4px; font-size: 13px; opacity: 0.9; }
.sm-body { flex: 1; overflow-y: auto; padding: 16px 22px; }
.sm-section-title { font-size: 14px; font-weight: 600; margin: 10px 0 10px; }
.sm-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.sm-card {
  width: 168px; background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 9px;
  padding: 16px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.sm-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.14); border-color: var(--accent); }
.sm-card .sm-ico { width: 46px; height: 46px; }
.sm-card .sm-name { font-weight: 600; font-size: 13px; }
.sm-card .sm-sum { font-size: 11.5px; color: var(--win-fg-dim); line-height: 1.35; height: 30px; overflow: hidden; }
.sm-stars { color: #e5a50a; font-size: 11px; letter-spacing: 1px; }
.sm-detail { padding: 20px 26px; }
.sm-detail-head { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.sm-detail-head .sm-ico { width: 64px; height: 64px; }
.sm-detail-head h2 { font-size: 19px; }
.sm-detail-head .sm-sub { color: var(--win-fg-dim); font-size: 13px; margin-top: 3px; }
.sm-install-btn { margin-left: auto; min-width: 110px; padding: 9px 20px; font-size: 13.5px; }
.sm-progress { height: 6px; border-radius: 3px; background: var(--hover-bg); overflow: hidden; margin: 14px 0; display: none; }
.sm-progress .p-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.2s; }
.sm-desc { line-height: 1.6; font-size: 13px; max-width: 620px; }
.sm-shots { display: flex; gap: 12px; margin: 18px 0; }
.sm-shot { width: 220px; height: 132px; border-radius: 7px; border: 1px solid var(--win-border); background: linear-gradient(135deg, #444, #222); display:flex; align-items:center; justify-content:center; color:#888; font-size: 11px; }

/* ===================== Calculator ===================== */
.calc { display: flex; flex-direction: column; height: 100%; background: var(--win-bg); }
.calc-display {
  padding: 14px 16px 8px; text-align: right; background: var(--content-bg);
  border-bottom: 1px solid var(--win-border);
}
.calc-expr { font-size: 12px; color: var(--win-fg-dim); min-height: 16px; overflow: hidden; }
.calc-value { font-size: 30px; font-weight: 300; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.calc-pad { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 10px; }
.calc-key {
  border: 1px solid var(--btn-border); border-radius: 6px; background: var(--btn-bg); color: var(--win-fg);
  font-size: 16px;
}
.calc-key:hover { filter: brightness(1.05); }
.calc-key:active { filter: brightness(0.92); }
.calc-key.op { background: linear-gradient(color-mix(in srgb, var(--win-bg) 80%, var(--accent) 24%), color-mix(in srgb, var(--win-bg) 72%, var(--accent) 30%)); }
.calc-key.eq { background: linear-gradient(var(--accent-hi), var(--accent)); border-color: var(--accent-strong); color: #fff; font-weight: 600; }

/* ===================== Image viewer ===================== */
.viewer { display: flex; flex-direction: column; height: 100%; }
.viewer-stage { flex: 1; display: flex; align-items: center; justify-content: center; background: #262626; overflow: hidden; }
.viewer-stage img { max-width: 92%; max-height: 92%; box-shadow: 0 8px 30px rgba(0,0,0,0.5); transition: transform 0.15s; }

/* ===================== Firefox shell ===================== */
.fx { display: flex; flex-direction: column; height: 100%; }
.fx-tabs { display: flex; align-items: flex-end; background: color-mix(in srgb, var(--win-bg) 88%, #000 8%); padding: 5px 6px 0; gap: 3px; flex-shrink: 0; }
.fx-tab {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; max-width: 200px; min-width: 110px;
  border-radius: 6px 6px 0 0; font-size: 12px; color: var(--win-fg-dim); background: transparent;
}
.fx-tab.active { background: var(--win-bg); color: var(--win-fg); box-shadow: 0 -2px 6px rgba(0,0,0,0.08); }
.fx-tab span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-tab .fxt-close { border: none; background: none; color: inherit; border-radius: 4px; width: 17px; height: 17px; font-size: 12px; line-height: 1; }
.fx-tab .fxt-close:hover { background: var(--hover-bg); }
.fx-newtab { border: none; background: transparent; color: var(--win-fg); width: 26px; height: 26px; border-radius: 5px; font-size: 15px; margin-bottom: 3px; }
.fx-newtab:hover { background: var(--hover-bg); }
.fx-navbar { display: flex; align-items: center; gap: 5px; padding: 6px 8px; background: var(--win-bg); border-bottom: 1px solid var(--win-border); flex-shrink: 0; }
.fx-urlbar {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 15px;
  padding: 6px 13px; font-size: 12.5px; color: var(--win-fg);
}
.fx-urlbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(146,179,114,0.25); }
.fx-urlbar input { flex: 1; border: none; outline: none; background: transparent; color: inherit; font-size: 12.5px; }
.fx-page { flex: 1; overflow-y: auto; background: var(--content-bg); }
.fx-start { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 60px 20px 30px; background: linear-gradient(180deg, color-mix(in srgb, var(--content-bg) 94%, var(--accent) 8%), var(--content-bg)); }
.fx-start-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.fx-start-logo img { width: 54px; height: 54px; }
.fx-start-logo .fs-title { font-size: 24px; font-weight: 300; }
.fx-start-logo .fs-title b { font-weight: 600; }
.fx-start-search { width: min(560px, 90%); display: flex; border: 1px solid var(--input-border); border-radius: 24px; overflow: hidden; background: var(--input-bg); }
.fx-start-search input { flex: 1; border: none; outline: none; background: transparent; padding: 12px 20px; font-size: 14px; color: var(--win-fg); }
.fx-start-search button { border: none; background: var(--accent); color: #fff; padding: 0 22px; font-size: 13px; }
.fx-start-links { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; justify-content: center; }
.fx-quick {
  width: 108px; padding: 16px 8px 12px; background: var(--win-bg); border: 1px solid var(--win-border); border-radius: 9px;
  display: flex; flex-direction: column; align-items: center; gap: 9px; color: var(--win-fg); font-size: 11.5px;
}
.fx-quick:hover { border-color: var(--accent); box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.fx-quick .fq-ico { width: 34px; height: 34px; }
.fx-article { max-width: 720px; margin: 0 auto; padding: 34px 28px 50px; line-height: 1.65; font-size: 13.5px; user-select: text; -webkit-user-select: text; cursor: auto; }
.fx-article h1 { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.fx-article h2 { font-size: 17px; font-weight: 600; margin: 22px 0 8px; }
.fx-article p { margin: 10px 0; }
.fx-article .fx-meta { color: var(--win-fg-dim); font-size: 12px; margin-bottom: 14px; }
.fx-article a { color: var(--accent-strong); }
.fx-article ul { margin: 10px 0 10px 24px; }
.fx-article code { font-family: var(--mono); background: var(--hover-bg); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }
.fx-offline { text-align: center; padding: 80px 30px; color: var(--win-fg-dim); }
.fx-offline h2 { color: var(--win-fg); font-weight: 600; margin-bottom: 10px; }
