/* ═══════════════════════════════════════════════════════════════════
   apps.css — per-application styles
   ═══════════════════════════════════════════════════════════════════ */

/* ══════════════════ shared app bits ══════════════════ */
.kbd {
  font-family: var(--font-mono); font-size: 12px;
  padding: 2px 7px; border-radius: 6px;
  background: var(--btn-bg); box-shadow: inset 0 -1px 0 rgba(0,0,0,.12);
}
.info-bar {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  background: var(--accent-soft, rgba(233,84,32,.12));
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.drag-ghost {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(30,30,30,.9); color: #fff; font-size: 12.5px;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  pointer-events: none; z-index: 900;
}
.drag-ghost img { width: 20px; height: 20px; }
.prop-sheet { text-align: left; }
.prop-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.prop-name { font-size: 15px; font-weight: 500; }
.prop-sub { font-size: 12.5px; color: var(--win-fg-dim); }
.pane-title { font-size: 15px; font-weight: 500; padding: 10px 14px 6px; }

/* ══════════════════ Files ══════════════════ */
.files-center { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; }
.path-bar {
  display: flex; align-items: center; gap: 1px; min-width: 0;
  max-width: 100%; overflow: hidden;
  background: var(--btn-bg); border-radius: 8px; padding: 2px;
}
.path-bar .crumb { border-radius: 6px; max-width: 190px; }
.path-bar .crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.path-bar .crumb.current { font-weight: 700; background: var(--view-bg); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.path-bar .crumb-sep { opacity: .35; }
.location-entry, .files-search { width: min(420px, 70%); }
.files-view { flex: 1; min-height: 0; padding: 6px; }
.file-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 4px; align-content: start; padding: 6px;
}
.file-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; border-radius: 10px;
  transition: background var(--t-fast);
  color: var(--win-fg); text-align: center;
}
.file-item .fi-icon { width: 64px; height: 64px; display: grid; place-items: center; }
.file-item .fi-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.file-item .fi-label {
  font-size: 12.5px; line-height: 1.25; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word; padding: 1px 4px; border-radius: 5px;
}
.file-item:hover { background: var(--hover); }
.file-item.selected { background: var(--accent-dim); }
.file-item.selected .fi-label { background: var(--accent-bg); color: var(--accent-fg); }
.file-item.drop-target, .list-row.drop-target { background: var(--accent-dim); box-shadow: inset 0 0 0 2px var(--accent-bg); }

.file-list { display: flex; flex-direction: column; min-width: 0; }
.list-head { display: flex; position: sticky; top: 0; background: var(--view-bg); z-index: 2; border-bottom: 1px solid var(--border); }
.list-th {
  display: flex; align-items: center; gap: 4px;
  padding: 7px 10px; font-size: 12.5px; font-weight: 500; color: var(--win-fg-dim);
  transition: background var(--t-fast);
}
.list-th:hover { background: var(--hover); }
.list-th.sorted { color: var(--win-fg); }
.list-row {
  display: flex; align-items: center; min-height: 34px;
  border-radius: 7px; transition: background var(--t-fast);
  font-size: 13.5px;
}
.list-row:hover { background: var(--hover); }
.list-row.selected { background: var(--accent-dim); }
.col-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 4px 10px; }
.col-name img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.col-name .li-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-size { width: 110px; flex: none; padding: 0 10px; color: var(--win-fg-dim); font-size: 12.5px; text-align: right; }
.col-type { width: 130px; flex: none; padding: 0 10px; color: var(--win-fg-dim); font-size: 12.5px; }
.col-time { width: 130px; flex: none; padding: 0 10px; color: var(--win-fg-dim); font-size: 12.5px; }
.list-head .col-size { text-align: right; justify-content: flex-end; }

/* ══════════════════ file chooser ══════════════════ */
.file-chooser { display: flex; flex-direction: column; max-height: 78vh; }
.file-chooser .fc-body { display: flex; min-height: 0; height: 420px; }
.file-chooser .fc-sidebar { width: 176px; padding: 6px 0; }
.file-chooser .fc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--view-bg); }
.file-chooser .fc-pathbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.file-chooser .fc-list { flex: 1; min-height: 0; padding: 4px; }
.file-chooser .fc-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; border-radius: 7px; font-size: 13.5px; text-align: left;
  color: var(--win-fg); transition: background var(--t-fast);
}
.file-chooser .fc-row:hover { background: var(--hover); }
.file-chooser .fc-row.selected { background: var(--accent-dim); }
.file-chooser .fc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chooser .fc-size, .file-chooser .fc-time { color: var(--win-fg-dim); font-size: 12px; flex: none; }
.file-chooser .fc-time { width: 96px; text-align: right; }
.file-chooser .fc-namebar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.file-chooser .fc-namebar .entry { flex: 1; }
.file-chooser .fc-footer { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 13px; min-height: 20px; }
.fc-filter { background: var(--btn-bg); border: 0; border-radius: 6px; padding: 4px 8px; font-size: 13px; color: var(--win-fg); }

/* ══════════════════ Terminal ══════════════════ */
.terminal-win .headerbar { background: #2b0a22; border-bottom-color: #1b0616; }
.terminal-win .headerbar .hb-title { color: #f6f2f0; }
.terminal-win .win-ctl { background: rgba(255,255,255,.12); color: #fff; }
.terminal-win .win-ctl:hover { background: rgba(255,255,255,.2); }
.terminal-win .win-body { background: #300a24; }
.term-root { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #300a24; }
.term-tabs {
  display: flex; align-items: center; gap: 2px; padding: 4px 6px 0;
  background: #2b0a22; border-bottom: 1px solid rgba(255,255,255,.08);
}
.term-tab {
  display: flex; align-items: center; gap: 8px; max-width: 190px;
  padding: 6px 8px 6px 12px; border-radius: 8px 8px 0 0;
  font-size: 13px; color: rgba(255,255,255,.7);
  transition: background var(--t-fast), color var(--t-fast);
}
.term-tab:hover { background: rgba(255,255,255,.08); color: #fff; }
.term-tab.active { background: #300a24; color: #fff; }
.term-tab .tt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-tab .tt-close { opacity: .5; }
.term-tab .tt-close:hover { opacity: 1; }
.term-screen {
  flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 14px;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.35;
  color: #f2f0ef; user-select: text; -webkit-user-select: text;
  white-space: pre-wrap; word-break: break-word;
  cursor: text;
}
.term-screen::selection, .term-screen *::selection { background: rgba(233,84,32,.5); color: #fff; }
.term-line { min-height: 1.35em; }
.term-cursor {
  display: inline-block; width: .58em; height: 1.1em; vertical-align: text-bottom;
  background: #f2f0ef; animation: term-blink 1.06s steps(1) infinite;
}
.term-cursor.hollow { background: none; box-shadow: inset 0 0 0 1px #f2f0ef; }
@keyframes term-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.t-green { color: #8ae234; } .t-blue { color: #729fcf; } .t-red { color: #ef5350; }
.t-yellow { color: #fce94f; } .t-magenta { color: #ad7fa8; } .t-cyan { color: #34e2e2; }
.t-white { color: #ffffff; } .t-dim { color: rgba(242,240,239,.6); } .t-bold { font-weight: 700; }
.t-orange { color: #E95420; } .t-inverse { background: #f2f0ef; color: #300a24; }
.term-input-line { display: flex; }
.term-hidden-input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}

/* ══════════════════ Text Editor ══════════════════ */
.editor-root { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--view-bg); }
.editor-tabs { display: flex; align-items: center; gap: 2px; padding: 4px 6px 0; background: var(--win-bg); border-bottom: 1px solid var(--border); }
.editor-tab {
  display: flex; align-items: center; gap: 8px; max-width: 200px;
  padding: 6px 8px 6px 12px; border-radius: 8px 8px 0 0; font-size: 13px;
  color: var(--win-fg-dim); transition: background var(--t-fast);
}
.editor-tab:hover { background: var(--hover); }
.editor-tab.active { background: var(--view-bg); color: var(--win-fg); box-shadow: inset 0 0 0 1px var(--border); }
.editor-tab .et-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-tab .et-dirty { color: var(--accent-bg); font-size: 18px; line-height: 0; }
.editor-main { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.editor-gutter {
  flex: none; padding: 10px 8px 10px 12px; text-align: right; white-space: pre;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55;
  color: var(--win-fg-faint); background: var(--view-alt);
  user-select: none; overflow: hidden; min-width: 44px;
}
.editor-area {
  flex: 1; min-width: 0; border: 0; outline: none; resize: none;
  padding: 10px 14px; background: var(--view-bg); color: var(--win-fg);
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55;
  user-select: text; -webkit-user-select: text; tab-size: 4;
}
.editor-area.wrap { white-space: pre-wrap; }
.editor-area:not(.wrap) { white-space: pre; overflow-x: auto; }
.editor-find {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-bottom: 1px solid var(--border); background: var(--win-bg);
}
.editor-find .entry { width: 200px; }
.editor-status { display: flex; align-items: center; gap: 14px; }

/* ══════════════════ Settings ══════════════════ */
.settings-sidebar { width: 218px; }
.settings-content { flex: 1; min-width: 0; overflow-y: auto; background: var(--win-bg); }
.settings-search { margin: 8px; }
.wallpaper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.wallpaper-tile {
  aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; position: relative;
  background-size: cover; background-position: center;
  box-shadow: 0 0 0 1px var(--border);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.wallpaper-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.wallpaper-tile.selected { box-shadow: 0 0 0 3px var(--accent-bg); }
.wallpaper-tile .wt-check {
  position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 999px;
  background: var(--accent-bg); color: #fff; display: grid; place-items: center;
}
.wallpaper-tile .wt-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff; font-size: 12px;
}
.accent-swatches { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0; }
.accent-swatch {
  width: 34px; height: 34px; border-radius: 999px; position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
  transition: transform var(--t-fast);
}
.accent-swatch:hover { transform: scale(1.1); }
.accent-swatch.selected { box-shadow: 0 0 0 2px var(--view-bg), 0 0 0 4px currentColor; }
.style-previews { display: flex; gap: 14px; padding: 4px 0 8px; }
.style-preview { flex: 1; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
.style-preview.selected { box-shadow: 0 0 0 2px var(--accent-bg); }
.style-preview .sp-img { height: 92px; display: flex; flex-direction: column; }
.style-preview .sp-label { padding: 7px; font-size: 13px; text-align: center; background: var(--card-bg); }
.display-canvas {
  height: 170px; background: var(--view-alt); border-radius: 10px;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--border);
  margin-bottom: 14px; position: relative;
}
.display-monitor {
  width: 220px; aspect-ratio: 16/10; border-radius: 6px;
  background-size: cover; background-position: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.3), 0 0 0 3px #333;
  display: grid; place-items: center; color: #fff; font-size: 12px;
}
.about-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0 18px; }
.about-hero .ah-logo { width: 96px; height: 96px; }
.about-hero .ah-name { font-size: 22px; font-weight: 300; }
.about-hero .ah-version { font-size: 13.5px; color: var(--win-fg-dim); }

/* ══════════════════ Calculator ══════════════════ */
.calc-root { flex: 1; display: flex; flex-direction: column; background: var(--win-bg); min-height: 0; }
.calc-display {
  padding: 14px 18px 10px; text-align: right; background: var(--view-bg);
  border-bottom: 1px solid var(--border);
}
.calc-expr { font-size: 14px; color: var(--win-fg-dim); min-height: 20px; font-family: var(--font-mono); word-break: break-all; }
.calc-value { font-size: 38px; font-weight: 300; font-variant-numeric: tabular-nums; word-break: break-all; user-select: text; }
.calc-error { color: var(--error); font-size: 20px; }
.calc-pad { flex: 1; display: grid; gap: 6px; padding: 10px; min-height: 0; }
.calc-pad.basic { grid-template-columns: repeat(4, 1fr); }
.calc-pad.advanced { grid-template-columns: repeat(6, 1fr); }
.calc-pad.programming { grid-template-columns: repeat(6, 1fr); }
.calc-key {
  border-radius: 10px; background: var(--view-alt); font-size: 17px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--border);
  transition: background var(--t-fast), transform 80ms;
  min-height: 40px;
}
.calc-key:hover { background: var(--btn-bg-hover); }
.calc-key:active { background: var(--btn-bg-active); transform: scale(.97); }
.calc-key.op { background: var(--btn-bg); font-weight: 400; }
.calc-key.equals { background: var(--accent-bg); color: var(--accent-fg); }
.calc-key.equals:hover { background: var(--accent-hl); }
.calc-key.fn { font-size: 13.5px; color: var(--win-fg-dim); background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.calc-history { max-height: 40%; overflow-y: auto; border-bottom: 1px solid var(--border); background: var(--view-alt); }
.calc-history-row { padding: 6px 14px; text-align: right; font-size: 13px; color: var(--win-fg-dim); cursor: pointer; }
.calc-history-row:hover { background: var(--hover); }
.calc-history-row b { color: var(--win-fg); font-weight: 500; }

/* ══════════════════ App Center ══════════════════ */
.store-root { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--win-bg); }
.store-body { flex: 1; min-height: 0; overflow-y: auto; }
.store-banner {
  margin: 16px; padding: 26px; border-radius: 14px; color: #fff;
  background: linear-gradient(120deg, var(--ubuntu-aubergine), var(--accent-bg));
  display: flex; align-items: center; gap: 20px;
}
.store-banner img { width: 84px; height: 84px; }
.store-banner .sb-title { font-size: 22px; font-weight: 500; }
.store-banner .sb-text { font-size: 13.5px; opacity: .9; margin-top: 4px; max-width: 460px; }
.store-section { padding: 8px 16px 20px; }
.store-section h3 { font-size: 16px; font-weight: 500; margin-bottom: 10px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.store-card {
  display: flex; gap: 12px; padding: 12px; border-radius: 12px; text-align: left;
  background: var(--card-bg); box-shadow: 0 0 0 1px var(--border);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.store-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.16), 0 0 0 1px var(--border); }
.store-card img { width: 52px; height: 52px; flex: none; }
.store-card .sc-name { font-size: 14px; font-weight: 500; }
.store-card .sc-sub { font-size: 12.5px; color: var(--win-fg-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store-card .sc-meta { font-size: 12px; color: var(--win-fg-faint); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.store-detail { padding: 20px 24px 30px; max-width: 820px; margin: 0 auto; }
.store-detail-head { display: flex; gap: 18px; align-items: flex-start; }
.store-detail-head img { width: 96px; height: 96px; }
.store-detail-head .sd-name { font-size: 24px; font-weight: 500; }
.store-detail-head .sd-dev { font-size: 13.5px; color: var(--win-fg-dim); }
.store-shots { display: flex; gap: 10px; margin: 18px 0; overflow-x: auto; padding-bottom: 6px; }
.store-shot {
  flex: none; width: 300px; aspect-ratio: 16/10; border-radius: 10px;
  background: var(--view-alt); box-shadow: 0 0 0 1px var(--border);
  background-size: cover; background-position: center;
}
.store-stats { display: flex; gap: 22px; margin: 16px 0; flex-wrap: wrap; }
.store-stat .ss-label { font-size: 12px; color: var(--win-fg-dim); }
.store-stat .ss-value { font-size: 14px; font-weight: 500; }
.rating-stars { display: flex; gap: 2px; color: var(--warning); }

/* ══════════════════ Firefox ══════════════════ */
.ff-root { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--view-bg); }
.ff-win .headerbar { min-height: 42px; padding: 4px 6px 0; background: var(--view-alt); align-items: flex-end; }
.ff-win .headerbar .hb-center { align-items: stretch; padding: 0 6px 0 0; }
.ff-win .headerbar .win-controls { margin-bottom: 8px; }
.ff-win .headerbar .hb-end { margin-bottom: 6px; }
.ff-tabbar { display: flex; align-items: flex-end; gap: 2px; width: 100%; overflow-x: auto; scrollbar-width: none; }
.ff-tabbar::-webkit-scrollbar { height: 0; }
.ff-tab {
  display: flex; align-items: center; gap: 8px; min-width: 90px; max-width: 220px; flex: 1;
  padding: 7px 8px 7px 11px; border-radius: 8px 8px 0 0; font-size: 13px;
  color: var(--win-fg-dim); transition: background var(--t-fast);
}
.ff-tab:hover { background: var(--hover); }
.ff-tab.active { background: var(--view-bg); color: var(--win-fg); box-shadow: 0 -1px 0 var(--accent-bg) inset; }
.ff-tab .ft-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-tab .ft-spinner { width: 12px; height: 12px; }
.ff-toolbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.ff-urlbar {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
  min-height: 32px; padding: 0 10px; border-radius: 999px;
  background: var(--entry-bg); box-shadow: inset 0 0 0 1px var(--entry-border);
}
.ff-urlbar:focus-within { box-shadow: inset 0 0 0 2px var(--accent-bg); background: var(--view-bg); }
.ff-urlbar input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 13.5px; color: var(--win-fg); user-select: text; }
.ff-bookmarks { display: flex; align-items: center; gap: 4px; padding: 2px 8px 6px; font-size: 12.5px; }
.ff-bookmarks button { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; color: var(--win-fg-dim); }
.ff-bookmarks button:hover { background: var(--hover); color: var(--win-fg); }
.ff-progress { height: 2px; background: transparent; }
.ff-progress > i { display: block; height: 100%; background: var(--accent-bg); transition: width 200ms linear; }
.ff-content { flex: 1; min-height: 0; overflow-y: auto; background: #fff; color: #15141a; }
[data-color-scheme="dark"] .ff-content { background: #1c1b22; color: #fbfbfe; }
.ff-page { padding: 32px 40px 60px; max-width: 900px; margin: 0 auto; user-select: text; }
.ff-page h1 { font-size: 30px; font-weight: 300; margin-bottom: 12px; }
.ff-page h2 { font-size: 20px; font-weight: 500; margin: 22px 0 8px; }
.ff-page p { margin: 10px 0; line-height: 1.6; font-size: 14.5px; }
.ff-page a { color: #0060df; text-decoration: underline; cursor: pointer; }
.ff-page ul { margin: 10px 0 10px 22px; list-style: disc; }
.ff-page li { margin: 5px 0; line-height: 1.55; }
.ff-page code { font-family: var(--font-mono); background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.ff-home { display: flex; flex-direction: column; align-items: center; padding: 70px 20px; gap: 26px; }
.ff-home .fh-logo { width: 74px; height: 74px; }
.ff-home .fh-search {
  width: min(560px, 90%); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; min-height: 44px; border-radius: 999px;
  background: var(--view-bg); box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
}
.ff-home .fh-search input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; color: var(--win-fg); }
.ff-shortcuts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 108px)); gap: 12px;
  justify-content: center; width: 100%; max-width: 620px;
}
.ff-shortcut { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; transition: background var(--t-fast); }
.ff-shortcut:hover { background: var(--hover); }
.ff-shortcut .fs-tile {
  width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center;
  background: var(--btn-bg); font-size: 22px; font-weight: 500;
}
.ff-shortcut .fs-label { font-size: 12px; color: var(--win-fg-dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-error { max-width: 560px; margin: 70px auto; text-align: center; padding: 0 20px; }
.ff-error .fe-icon { color: var(--win-fg-faint); margin-bottom: 16px; }
.ff-error h1 { font-size: 22px; margin-bottom: 10px; }
.ff-error p { color: var(--win-fg-dim); font-size: 14px; line-height: 1.6; }

/* ══════════════════ System Monitor / graphs ══════════════════ */
.mon-graph { width: 100%; height: 150px; border-radius: 8px; background: var(--view-alt); box-shadow: inset 0 0 0 1px var(--border); }
.mon-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12.5px; }
.mon-legend span { display: flex; align-items: center; gap: 6px; }
.mon-legend i { width: 12px; height: 3px; border-radius: 2px; }
.proc-table { width: 100%; font-size: 13px; }
.proc-head { display: flex; position: sticky; top: 0; background: var(--view-bg); border-bottom: 1px solid var(--border); z-index: 1; }
.proc-head button { padding: 6px 8px; font-size: 12.5px; color: var(--win-fg-dim); text-align: left; }
.proc-row { display: flex; align-items: center; min-height: 30px; border-radius: 6px; }
.proc-row:hover { background: var(--hover); }
.proc-row.selected { background: var(--accent-dim); }
.proc-c-name { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; padding: 0 8px; }
.proc-c-name img { width: 18px; height: 18px; }
.proc-c-user { width: 90px; color: var(--win-fg-dim); }
.proc-c-cpu, .proc-c-mem, .proc-c-pid { width: 84px; text-align: right; padding-right: 12px; font-variant-numeric: tabular-nums; }

/* ══════════════════ Image Viewer ══════════════════ */
.iv-root { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #1b1b1b; }
.iv-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; position: relative; }
.iv-stage img { max-width: 100%; max-height: 100%; transition: transform 180ms var(--ease); box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.iv-toolbar {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px;
  background: rgba(20,20,20,.8); color: #fff;
}
.iv-toolbar .btn { color: #fff; background: rgba(255,255,255,.1); }
.iv-toolbar .btn:hover { background: rgba(255,255,255,.2); }
.iv-filmstrip { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: rgba(0,0,0,.4); }
.iv-thumb { width: 64px; height: 48px; border-radius: 6px; background-size: cover; background-position: center; flex: none; opacity: .6; transition: opacity var(--t-fast), box-shadow var(--t-fast); }
.iv-thumb:hover { opacity: 1; }
.iv-thumb.active { opacity: 1; box-shadow: 0 0 0 2px var(--accent-bg); }

/* ══════════════════ Clocks ══════════════════ */
.clocks-root { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.clock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 16px; }
.clock-card { padding: 16px; border-radius: 12px; background: var(--card-bg); box-shadow: 0 0 0 1px var(--border); position: relative; }
.clock-card .cc-city { font-size: 15px; font-weight: 500; }
.clock-card .cc-time { font-size: 30px; font-weight: 300; font-variant-numeric: tabular-nums; }
.clock-card .cc-meta { font-size: 12.5px; color: var(--win-fg-dim); }
.clock-card .cc-remove { position: absolute; right: 8px; top: 8px; opacity: 0; transition: opacity var(--t-fast); }
.clock-card:hover .cc-remove { opacity: .7; }
.big-timer { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.big-timer .bt-value { font-size: 70px; font-weight: 200; font-variant-numeric: tabular-nums; }
.big-timer .bt-actions { display: flex; gap: 12px; }
.lap-list { max-height: 180px; overflow-y: auto; width: min(420px, 90%); }
.lap-row { display: flex; justify-content: space-between; padding: 6px 12px; font-size: 13.5px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.timer-presets { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ══════════════════ Rhythmbox ══════════════════ */
.rb-root { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rb-player { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--win-bg); }
.rb-art { width: 54px; height: 54px; border-radius: 8px; background: linear-gradient(140deg, var(--accent-hl), var(--accent-bg)); display: grid; place-items: center; color: #fff; flex: none; }
.rb-meta { flex: 1; min-width: 0; }
.rb-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-artist { font-size: 12.5px; color: var(--win-fg-dim); }
.rb-seek { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--win-fg-dim); font-variant-numeric: tabular-nums; }
.rb-track-row { display: flex; align-items: center; gap: 12px; min-height: 34px; padding: 0 12px; border-radius: 6px; font-size: 13.5px; }
.rb-track-row:hover { background: var(--hover); }
.rb-track-row.playing { background: var(--accent-dim); font-weight: 500; }
.rb-track-row .rb-num { width: 22px; color: var(--win-fg-faint); font-size: 12px; }
.rb-track-row .rb-dur { color: var(--win-fg-dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rb-visualiser { height: 42px; display: flex; align-items: flex-end; gap: 2px; padding: 0 14px 8px; }
.rb-visualiser i { flex: 1; background: var(--accent-bg); border-radius: 2px 2px 0 0; height: 10%; transition: height 90ms linear; opacity: .8; }

/* ══════════════════ Mail ══════════════════ */
.mail-list { width: 320px; flex: none; border-right: 1px solid var(--border); overflow-y: auto; background: var(--view-bg); }
.mail-row { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--t-fast); }
.mail-row:hover { background: var(--hover); }
.mail-row.selected { background: var(--accent-dim); }
.mail-row.unread .mr-subject { font-weight: 700; }
.mail-row .mr-from { display: flex; justify-content: space-between; font-size: 13px; }
.mail-row .mr-date { color: var(--win-fg-dim); font-size: 12px; }
.mail-row .mr-subject { font-size: 13.5px; margin-top: 2px; }
.mail-row .mr-preview { font-size: 12.5px; color: var(--win-fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-view { flex: 1; min-width: 0; overflow-y: auto; padding: 20px 26px; user-select: text; }
.mail-view h2 { font-size: 19px; margin-bottom: 6px; }
.mail-view .mv-meta { font-size: 13px; color: var(--win-fg-dim); margin-bottom: 16px; }
.mail-view .mv-body { font-size: 14px; line-height: 1.65; white-space: pre-wrap; }

/* ══════════════════ Office ══════════════════ */
.doc-toolbar { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: var(--win-bg); }
.doc-page {
  flex: 1; min-height: 0; overflow-y: auto; padding: 30px; background: var(--view-alt);
}
.doc-sheet {
  max-width: 760px; margin: 0 auto; min-height: 900px; padding: 60px 70px;
  background: #fff; color: #1a1a1a; box-shadow: 0 2px 14px rgba(0,0,0,.2);
  font-size: 15px; line-height: 1.7; outline: none;
}
[data-color-scheme="dark"] .doc-sheet { background: #fdfdfd; }
.sheet-grid { flex: 1; min-height: 0; overflow: auto; background: var(--view-bg); }
.sheet-table { border-collapse: collapse; font-size: 13px; }
.sheet-table th, .sheet-table td { border: 1px solid var(--border); min-width: 92px; height: 26px; padding: 0 6px; }
.sheet-table th { background: var(--view-alt); font-weight: 500; color: var(--win-fg-dim); text-align: center; position: sticky; top: 0; z-index: 1; }
.sheet-table td.selected { box-shadow: inset 0 0 0 2px var(--accent-bg); }
.sheet-table td input { width: 100%; border: 0; outline: none; background: none; font: inherit; color: inherit; }
.slide-list { width: 170px; flex: none; border-right: 1px solid var(--border); overflow-y: auto; padding: 8px; background: var(--sidebar-bg); }
.slide-thumb { aspect-ratio: 16/9; border-radius: 6px; background: #fff; margin-bottom: 8px; box-shadow: 0 0 0 1px var(--border); padding: 8px; font-size: 8px; color: #333; overflow: hidden; }
.slide-thumb.active { box-shadow: 0 0 0 2px var(--accent-bg); }
.slide-stage { flex: 1; display: grid; place-items: center; background: var(--view-alt); padding: 20px; }
.slide-canvas {
  width: min(100%, 720px); aspect-ratio: 16/9; background: #fff; color: #222;
  border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.25);
  display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 44px;
}
.slide-canvas h2 { font-size: 30px; font-weight: 500; outline: none; }
.slide-canvas .sc-body { font-size: 17px; line-height: 1.6; outline: none; white-space: pre-wrap; }

/* ══════════════════ Games / misc ══════════════════ */
.sudoku-grid { display: grid; grid-template-columns: repeat(9, 1fr); width: min(96%, 460px); aspect-ratio: 1; margin: 0 auto; box-shadow: 0 0 0 2px var(--win-fg); }
.sudoku-cell {
  display: grid; place-items: center; font-size: 20px;
  border: 1px solid var(--border); position: relative; background: var(--view-bg);
  transition: background var(--t-fast);
}
.sudoku-cell:nth-child(3n):not(:nth-child(9n)) { border-right: 2px solid var(--win-fg-dim); }
.sudoku-cell.row3 { border-bottom: 2px solid var(--win-fg-dim); }
.sudoku-cell.given { font-weight: 700; background: var(--view-alt); }
.sudoku-cell.selected { background: var(--accent-dim); }
.sudoku-cell.error { color: var(--error); }
.sudoku-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: min(96%, 460px); margin: 16px auto; }
.mines-grid { display: grid; gap: 2px; margin: 0 auto; }
.mine-cell {
  width: 30px; height: 30px; border-radius: 4px; background: var(--btn-bg);
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
  transition: background var(--t-fast);
}
.mine-cell:hover { background: var(--btn-bg-hover); }
.mine-cell.revealed { background: var(--view-alt); box-shadow: inset 0 0 0 1px var(--border); }
.mine-cell.mine { background: var(--destructive); color: #fff; }
.mine-cell.flag { color: var(--accent-bg); }
.mine-c1 { color: #3584e4; } .mine-c2 { color: #2ec27e; } .mine-c3 { color: #e01b24; }
.mine-c4 { color: #9141ac; } .mine-c5 { color: #e66100; } .mine-c6 { color: #1c71d8; }
.mine-c7 { color: #63452c; } .mine-c8 { color: #77767b; }
.game-bar { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }

/* weather */
.weather-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 0 16px; }
.weather-temp { font-size: 62px; font-weight: 200; }
.weather-cond { font-size: 16px; color: var(--win-fg-dim); }
.weather-hours { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; }
.weather-hour { flex: none; width: 76px; padding: 10px; border-radius: 10px; background: var(--card-bg); box-shadow: 0 0 0 1px var(--border); text-align: center; font-size: 12.5px; }
.weather-days { padding: 8px 16px 20px; }

/* extension manager */
.ext-row-desc { font-size: 12.5px; color: var(--win-fg-dim); }

/* ══════════════════ utilities ══════════════════ */
.util-page { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; }
.log-list { font-family: var(--font-mono); font-size: 12.5px; user-select: text; }
.log-row { display: flex; gap: 12px; padding: 3px 10px; border-radius: 4px; }
.log-row:hover { background: var(--hover); }
.log-row .lr-time { color: var(--win-fg-faint); flex: none; }
.log-row .lr-unit { color: var(--accent-bg); flex: none; min-width: 150px; }
.log-row.warning .lr-msg { color: var(--warning); }
.log-row.error .lr-msg { color: var(--error); }
.font-sample { padding: 14px; border-radius: 10px; background: var(--card-bg); box-shadow: 0 0 0 1px var(--border); margin-bottom: 10px; }
.font-sample .fs-name { font-size: 13px; color: var(--win-fg-dim); margin-bottom: 6px; }
.font-sample .fs-text { font-size: 22px; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.char-cell { aspect-ratio: 1; display: grid; place-items: center; font-size: 24px; border-radius: 8px; background: var(--card-bg); box-shadow: 0 0 0 1px var(--border); transition: transform var(--t-fast); }
.char-cell:hover { transform: scale(1.08); background: var(--accent-dim); }
.disk-bar { height: 26px; border-radius: 6px; overflow: hidden; display: flex; box-shadow: inset 0 0 0 1px var(--border); }
.disk-bar > i { height: 100%; }
.treemap { display: flex; flex-wrap: wrap; gap: 3px; }
.treemap-tile { border-radius: 6px; padding: 8px; color: #fff; font-size: 12px; overflow: hidden; min-width: 60px; }
.pdf-page {
  max-width: 640px; margin: 0 auto 16px; background: #fff; color: #222; padding: 46px 52px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25); font-size: 14px; line-height: 1.65; min-height: 500px;
}
