/* Styles for Showcase, Photos, Explorer views, Task view, snap layouts and the notification center.
   Colors come from the tokens in os.css. */

/* ---------- snap layouts ---------- */
.layouts {
  position: absolute; z-index: 9650; width: 300px; padding: 10px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  background: var(--acrylic); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--stroke-2); border-radius: 8px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .12s, transform .16s, visibility 0s .16s;
}
.layouts.open { opacity: 1; visibility: visible; transform: none; transition: opacity .12s, transform .16s; }
.lay { position: relative; aspect-ratio: 16 / 10; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--stroke); }
.zone { position: absolute; padding: 0; border: 0; border-radius: 3px; background: var(--card); box-shadow: inset 0 0 0 1px var(--stroke-2); }
.zone:hover, .zone:focus-visible { background: var(--accent); box-shadow: none; outline: none; }

/* ---------- Explorer views ---------- */
.ex-views { display: flex; gap: 2px; margin-left: 6px; padding-left: 6px; border-left: 1px solid var(--stroke); }
.ex-views .ibtn.on { background: var(--press); color: var(--accent); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.thumb { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 6px 6px 8px; border: 1px solid transparent; border-radius: 6px; background: none; text-align: left; }
.thumb:hover { background: var(--hover); }
.thumb.sel { background: var(--sel); border-color: var(--sel-line); }
.th-pic { display: grid; place-items: center; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 4px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--stroke); }
.th-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-ic > .ic { width: 56px; height: 56px; }
.th-label { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; padding: 0 2px; }
.th-label > .ic { width: 16px; height: 16px; }
.th-label b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlist { display: flex; flex-direction: column; font-size: 13px; }
.drow {
  display: grid; grid-template-columns: minmax(0, 1fr) 140px 150px; align-items: center; gap: 12px;
  min-height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 4px; background: none; text-align: left;
}
.drow:not(.head):hover { background: var(--hover); }
.drow.sel { background: var(--sel); border-color: var(--sel-line); }
.drow.head { position: sticky; top: -12px; z-index: 1; margin-bottom: 4px; border-radius: 0; background: var(--surface); border-bottom: 1px solid var(--stroke); }
.dh { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0; border: 0; background: none; color: var(--fg-2); font-size: 12px; text-align: left; }
.dh:hover, .dh.on { color: var(--fg); }
.dh .g { width: 12px; height: 12px; }
.dn { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dn > .ic { width: 20px; height: 20px; }
.dn > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd { color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.win[data-size="s"] .drow { grid-template-columns: minmax(0, 1fr) 110px; }
.win[data-size="s"] .drow > :nth-child(3) { display: none; }
.win[data-size="s"] .thumbs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* details pane extras */
.dt-cover { display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 1px solid var(--stroke); border-radius: 6px; overflow: hidden; background: var(--media-bg); }
.dt-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.dt-cover:hover img { transform: scale(1.03); }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
.strip-i { padding: 0; aspect-ratio: 16 / 10; border: 1px solid var(--stroke); border-radius: 4px; overflow: hidden; background: var(--media-bg); }
.strip-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-i:hover { border-color: var(--accent); }
.launch-cover { width: 100%; aspect-ratio: 16 / 8; max-width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid var(--stroke); background: var(--media-bg); }
.launch-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Showcase ---------- */
.sc { flex: 1; min-height: 0; overflow: auto; background: var(--surface); }
.sc-wrap { max-width: 1060px; margin: 0 auto; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 28px; }
.sc-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.sc-intro-t { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 62ch; }
.sc-intro h1 { margin: 0; font-family: var(--ui-display); font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.sc-intro p { margin: 0; color: var(--fg-2); font-size: 15px; line-height: 1.5; }
.sc-intro .chips { margin-top: 4px; }
.sc-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 320px;
  border-radius: 10px; overflow: hidden; background: var(--media-bg); border: 1px solid var(--stroke);
}
.sc-hero-pic { position: relative; min-height: 220px; }
.sc-hero-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 82% center; }
.sc-hero-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--media-bg) 0%, transparent 35%); }
.sc-hero-t { position: relative; z-index: 1; padding: 32px 8px 32px 32px; display: flex; flex-direction: column; justify-content: center; gap: 10px; color: var(--on-media); }
.sc-hero-t .eyebrow { color: var(--on-media-2); }
.sc-hero-t h2 { margin: 0; font-family: var(--ui-display); font-size: 32px; font-weight: 600; line-height: 1.12; text-wrap: balance; }
.sc-hero-t p { margin: 0; color: var(--on-media-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sc-hero-t .btns { margin-top: 6px; }
.btn.ghost { background: var(--ghost-bg); color: var(--on-media); border-color: var(--ghost-line); }
.btn.ghost:hover { background: var(--ghost-line); }
.btn .g { width: 14px; height: 14px; }
.sc-sec { display: flex; flex-direction: column; gap: 12px; }
.sc-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sc-sec-h h3 { margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; min-width: 0; }
.sc-count { font-size: 12px; color: var(--fg-2); white-space: nowrap; }
.sc-sec-d { margin: -4px 0 0; color: var(--fg-2); line-height: 1.5; max-width: 70ch; }
.sc-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--fg-3); }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sc-card {
  display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: left;
  border: 1px solid var(--stroke); border-radius: 8px; overflow: hidden; background: var(--card);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.sc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: var(--stroke-2); }
.sc-cover { display: grid; place-items: center; aspect-ratio: 16 / 10; max-width: 100%; overflow: hidden; background: var(--media-bg); }
.sc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.sc-card:hover .sc-cover img { transform: scale(1.03); }
.sc-cover-empty > .ic { width: 56px; height: 56px; }
.sc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px 14px; }
.sc-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-name > .ic { width: 20px; height: 20px; }
.sc-name b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-body small { font-size: 12px; color: var(--fg-2); }
.sc-desc { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-foot { margin: 0; font-size: 12px; color: var(--fg-3); text-align: center; }
.sc-crumbs { margin-bottom: -14px; }
.sc-banner { aspect-ratio: 16 / 6; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--media-bg); border: 1px solid var(--stroke); }
.sc-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.sc-head { position: relative; display: flex; align-items: flex-start; gap: 18px; margin-top: -56px; padding: 0 20px; }
.sc-head-ic { flex: none; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--stroke); box-shadow: var(--shadow-soft); }
.sc-head-ic > .ic { width: 64px; height: 64px; }
.sc-head-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 64px; }
.sc-head-t h1 { margin: 0; font-family: var(--ui-display); font-size: 28px; font-weight: 600; line-height: 1.15; text-wrap: balance; }
.sc-meta { font-size: 13px; color: var(--fg-2); }
.sc-head .btns { margin-top: 8px; }
.sc-shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 32%); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.sc-shot { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; scroll-snap-align: start; }
.sc-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border-radius: 6px; border: 1px solid var(--stroke); background: var(--media-bg); }
.sc-shot:hover img { border-color: var(--accent); }
.sc-shot span { font-size: 12px; line-height: 1.4; color: var(--fg-2); }
.sc-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.sc-about, .sc-facts { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px 20px; border-radius: 8px; background: var(--card); border: 1px solid var(--stroke); }
.sc-about h3, .sc-facts h3 { margin: 0; font-size: 15px; font-weight: 600; }
.sc-about h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--fg-2); }
.sc-about p { margin: 0; line-height: 1.6; max-width: 65ch; user-select: text; -webkit-user-select: text; }
.win[data-size="m"] .sc-wrap, .win[data-size="s"] .sc-wrap { padding: 20px 18px 32px; gap: 24px; }
.win[data-size="s"] .sc-cols { grid-template-columns: minmax(0, 1fr); }
.win[data-size="s"] .sc-hero { grid-template-columns: minmax(0, 1fr); }
.win[data-size="s"] .sc-hero-pic { order: -1; aspect-ratio: 16 / 9; min-height: 0; }
.win[data-size="s"] .sc-hero-pic img { object-position: 85% center; }
.win[data-size="s"] .sc-hero-pic::after { background: linear-gradient(0deg, var(--media-bg) 0%, transparent 40%); }
.win[data-size="s"] .sc-hero-t { padding: 4px 18px 20px; }
.win[data-size="s"] .sc-hero-t h2 { font-size: 24px; }
.win[data-size="s"] .sc-intro h1 { font-size: 28px; }
.win[data-size="s"] .sc-head { margin-top: -36px; padding: 0 8px; gap: 12px; }
.win[data-size="s"] .sc-head-ic > .ic { width: 48px; height: 48px; }
.win[data-size="s"] .sc-head-t { padding-top: 44px; }
.win[data-size="s"] .sc-head-t h1 { font-size: 22px; }
.win[data-size="s"] .sc-shots { grid-auto-columns: 82%; }
.win[data-size="s"] .sc-banner { aspect-ratio: 16 / 9; }

/* ---------- Photos ---------- */
.ph { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); outline: none; }
.ph-gallery { flex: 1; min-height: 0; overflow: auto; padding: 24px 28px 32px; display: flex; flex-direction: column; gap: 26px; }
.ph-top { display: flex; align-items: baseline; gap: 12px; }
.ph-top h1 { margin: 0; font-family: var(--ui-display); font-size: 26px; font-weight: 600; }
.ph-album { display: flex; flex-direction: column; gap: 12px; }
.ph-album h3 > .ic { width: 22px; height: 22px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ph-th { padding: 0; aspect-ratio: 16 / 10; border: 1px solid var(--stroke); border-radius: 6px; overflow: hidden; background: var(--media-bg); }
.ph-th img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.ph-th:hover img { transform: scale(1.04); }
.ph-view { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--chrome); }
.ph-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--chrome); border-bottom: 1px solid var(--stroke); }
.ph-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ph-title > .ic { width: 18px; height: 18px; }
.ph-title b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-n { color: var(--fg-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ph-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 16px 64px; }
.ph-stage img { max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; border-radius: 6px; box-shadow: var(--shadow-soft); }
.ph-nav { position: absolute; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; border: 1px solid var(--stroke-2); background: var(--acrylic); backdrop-filter: blur(16px); display: grid; place-items: center; color: var(--fg); }
.ph-nav:hover { background: var(--card); }
.ph-nav.prev { left: 12px; }
.ph-nav.next { right: 12px; }
.ph-cap { margin: 0; padding: 0 16px 10px; text-align: center; font-size: 13px; color: var(--fg-2); }
.ph-film { display: flex; gap: 6px; justify-content: center; padding: 0 12px 14px; overflow-x: auto; }
.ph-fi { flex: none; width: 84px; aspect-ratio: 16 / 10; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: var(--media-bg); opacity: .65; }
.ph-fi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-fi.on { border-color: var(--accent); opacity: 1; }
.ph-fi:hover { opacity: 1; }
.win[data-size="s"] .ph-stage { padding: 12px; }
.win[data-size="s"] .ph-bar .btn { display: none; }

/* ---------- Task view ---------- */
#taskview {
  position: absolute; left: 0; right: 0; top: 0; bottom: calc(var(--tb-h) + env(safe-area-inset-bottom, 0px)); z-index: 8900;
  display: grid; place-items: center; overflow: auto; padding: 32px 24px;
  background: var(--tv-bg); backdrop-filter: blur(28px) saturate(1.2); -webkit-backdrop-filter: blur(28px) saturate(1.2);
  opacity: 0; transition: opacity .18s;
}
#taskview.on { opacity: 1; }
.tv-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 1200px; }
.tv-card { position: relative; width: min(300px, 80vw); border-radius: 8px; background: var(--acrylic); border: 1px solid var(--stroke-2); box-shadow: var(--shadow-soft); transform: scale(.96); transition: transform .2s, border-color .15s; }
#taskview.on .tv-card { transform: none; }
.tv-card:hover { border-color: var(--accent); }
.tv-card.act { outline: 2px solid var(--accent); outline-offset: 2px; }
.tv-main { display: flex; flex-direction: column; width: 100%; padding: 0; border: 0; border-radius: 8px; background: none; text-align: left; }
.tv-head { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 40px 0 12px; font-size: 12px; min-width: 0; }
.tv-head > .ic { width: 16px; height: 16px; }
.tv-head > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-pic { display: grid; place-items: center; aspect-ratio: 16 / 10; margin: 0 8px 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.tv-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-ic > .ic { width: 56px; height: 56px; }
.tv-x { position: absolute; top: 6px; right: 6px; }
.tv-empty { text-align: center; color: var(--fg-2); }
.tv-empty p { margin: 0 0 4px; font-size: 16px; color: var(--fg); }

/* ---------- notification center ---------- */
.fly.stack { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--acrylic); backdrop-filter: blur(40px) saturate(1.5); -webkit-backdrop-filter: blur(40px) saturate(1.5); border: 1px solid var(--stroke-2); border-radius: 8px; box-shadow: var(--shadow); }
.nc-h { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px 6px 18px; }
.nc-list { display: flex; flex-direction: column; gap: 6px; max-height: 250px; overflow: auto; padding: 0 10px 12px; }
.nc-i { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; border-radius: 6px; background: var(--card); border: 1px solid var(--stroke); font-size: 13px; }
.nc-i > .ic { width: 18px; height: 18px; margin-top: 1px; }
.nc-i p { margin: 2px 0 0; color: var(--fg-2); font-size: 12px; line-height: 1.45; }
.nc-i small { color: var(--fg-3); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nc-empty { margin: 0; padding: 4px 18px 16px; color: var(--fg-2); font-size: 13px; }
.trayb.clock { position: relative; }
.badge { position: absolute; top: 3px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; }

/* ---------- Start: best match with a cover ---------- */
.st-best.has-cover { display: grid; grid-template-columns: auto minmax(0, 1fr) 168px; align-items: center; }
.st-best-pic { border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 10; border: 1px solid var(--stroke); background: var(--media-bg); }
.st-best-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 640px) {
  .st-best.has-cover { grid-template-columns: auto minmax(0, 1fr); }
  .st-best-pic { display: none; }
  .tact .ta[data-needs-frame] { display: none; }
  .layouts { display: none; }
}

/* =====================================================================
   Realism pass: Windows 11 menus, tray, taskbar previews, Explorer, Properties
   ===================================================================== */

/* context menus: icon row, submenus, checkmarks */
.ctx-row { display: flex; gap: 2px; padding: 2px 2px 4px; margin-bottom: 4px; border-bottom: 1px solid var(--stroke); }
.ctx-ib { width: 40px; height: 34px; border: 0; border-radius: 4px; background: none; display: grid; place-items: center; color: var(--fg); }
.ctx-ib:hover:not(:disabled) { background: var(--hover); }
.ctx-ib:disabled { opacity: .35; }
.ctx-i .lbl { flex: 1; }
.ctx-i .g.sm { width: 12px; height: 12px; color: var(--fg-2); }
.ctx-i .hint { color: var(--fg-3); font-size: 12px; }
.ctx-i .ck { font-size: 13px; line-height: 1; color: var(--fg); }
.ctx-i.bold .lbl { font-weight: 600; }
.ctx-i:disabled { opacity: .4; background: none; }
.ctx-i.open { background: var(--hover); }
.ctx.sub { z-index: 9701; min-width: 180px; }

/* desktop: shortcut arrows, selection box, icon sizes */
.dicon > .ic { position: relative; }
.sc-arrow { position: absolute; left: -2px; bottom: -2px; width: 34%; height: 34%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.sc-arrow svg { width: 100%; height: 100%; display: block; }
#icons[data-size="small"] .dicon > span:last-child { font-size: 11px; }
.band { position: absolute; z-index: 1; pointer-events: none; border: 1px solid color-mix(in srgb, var(--accent) 70%, white); background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* taskbar: search box, tray extras, bell */
.tb-search {
  display: none; align-items: center; gap: 10px; height: 34px; width: 200px; margin: 0 4px; padding: 0 14px;
  border-radius: 17px; border: 1px solid var(--stroke); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--fg-2); font-size: 13px;
}
.tb-search:hover, .tb-search.pressed { background: var(--surface); }
@media (min-width: 1100px) {
  .tb-search { display: inline-flex; }
  .tbb.search-ic { display: none; }
}
.trayb.chev { padding: 0 8px; }
.trayb.chev .g { width: 12px; height: 12px; }
.trayb.lang { flex-direction: column; align-items: center; justify-content: center; gap: 0; font-size: 11px; line-height: 1.3; padding: 0 7px; }
.trayb.bell { position: relative; padding: 0 9px; }
.trayb.bell .badge { top: 4px; right: 2px; }
.over { right: 140px; display: grid; grid-template-columns: repeat(3, 36px); gap: 2px; padding: 6px; }
.ov-i { width: 36px; height: 36px; border: 0; border-radius: 4px; background: none; display: grid; place-items: center; color: var(--fg); }
.ov-i:hover { background: var(--hover); }

/* taskbar hover previews */
.peek {
  position: absolute; z-index: 9550; width: 232px; padding: 0 0 8px;
  background: var(--acrylic); backdrop-filter: blur(40px) saturate(1.5); -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid var(--stroke-2); border-radius: 8px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(6px); transition: opacity .12s, transform .16s;
}
.peek.on { opacity: 1; transform: none; }
.peek.label-only { width: auto; padding: 0; }
.peek.label-only .peek-h { padding-right: 12px; }
.peek-h { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 10px; font-size: 12px; min-width: 0; }
.peek-h > .ic { width: 16px; height: 16px; }
.peek-h > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek-pic { display: grid; place-items: center; width: calc(100% - 16px); margin: 0 8px; aspect-ratio: 16 / 10; padding: 0; border: 1px solid var(--stroke); border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.peek-pic:hover { border-color: var(--accent); }
.peek-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.peek-ic > .ic { width: 40px; height: 40px; }

/* File Explorer command bar */
.ex-cmd { display: flex; align-items: center; gap: 2px; padding: 4px 8px; background: var(--chrome); border-bottom: 1px solid var(--stroke); overflow-x: auto; scrollbar-width: none; }
.ex-cmd::-webkit-scrollbar { display: none; }
.cmd { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 4px; background: none; color: var(--fg); font-size: 13px; white-space: nowrap; flex: none; }
.cmd .g.sm { width: 10px; height: 10px; color: var(--fg-2); }
.cmd:hover:not(:disabled) { background: var(--hover); }
.cmd:disabled { opacity: .4; }
.cmd-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--stroke-2); flex: none; }
.cmd-fill { flex: 1; }
.ex.no-details .ex-main { grid-template-columns: 210px minmax(0, 1fr); }
.ex.no-details .ex-details { display: none; }
.ex.no-details .details-toggle { color: var(--fg-2); }
.win[data-size="s"] .ex-cmd .cmd span:not(.g) { display: none; }
.drow { grid-template-columns: minmax(130px, 1fr) 100px 100px 72px; }
.dlist { min-width: 0; }
.win[data-size="m"] .drow { grid-template-columns: minmax(130px, 1fr) 100px 72px; }
.win[data-size="m"] .drow > :nth-child(3) { display: none; }
.dd.num { text-align: right; }
.win[data-size="s"] .drow { grid-template-columns: minmax(0, 1fr) 90px; }
.win[data-size="s"] .drow > :nth-child(2), .win[data-size="s"] .drow > :nth-child(3) { display: none; }
.tile.drive { grid-column: span 1; }
.bar { display: block; width: 180px; max-width: 100%; height: 12px; margin: 4px 0 2px; background: var(--surface-2); border: 1px solid var(--stroke-2); }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar.wide { width: 100%; }

/* Properties dialog */
.win.fixed .rz, .win.fixed .wctl .mx { display: none; }
.pr { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--chrome); font-size: 13px; }
.pr-tabs { display: flex; gap: 2px; padding: 8px 10px 0; }
.pr-tabs button { padding: 6px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0; background: none; color: var(--fg-2); }
.pr-tabs button.on { background: var(--card); border-color: var(--stroke-2); color: var(--fg); }
.pr-body { flex: 1; min-height: 0; overflow: auto; margin: 0 10px; padding: 14px 16px; background: var(--card); border: 1px solid var(--stroke-2); border-radius: 0 4px 4px 4px; user-select: text; -webkit-user-select: text; }
.pr-body hr { margin: 10px 0; border-top-color: var(--stroke-2); }
.pr-head { display: flex; align-items: center; gap: 16px; }
.pr-head > .ic { width: 36px; height: 36px; }
.pr-name { flex: 1; min-width: 0; height: 28px; padding: 0 8px; border: 1px solid var(--stroke-2); border-radius: 3px; background: var(--surface); color: var(--fg); }
.pr-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.pr-row > span:first-child { color: var(--fg-2); }
.pr-v { min-width: 0; overflow-wrap: anywhere; }
.pr-attr { display: flex; gap: 14px; flex-wrap: wrap; }
.pr-attr label { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); }
.pr-btns { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 10px; }
.pr-btns .btn { min-width: 76px; justify-content: center; }
.pr-pie { width: 120px; aspect-ratio: 1; margin: 14px auto 6px; border-radius: 50%; background: conic-gradient(var(--accent) var(--p), color-mix(in srgb, var(--accent) 22%, var(--surface-2)) 0); border: 1px solid var(--stroke-2); }
.pr-c { text-align: center; color: var(--fg-2); }

/* =====================================================================
   Resolve (method-development game) and Restore Desktop
   ===================================================================== */
.rv { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--surface); }
.rv-levels { display: flex; align-items: center; gap: 4px; padding: 6px 10px; background: var(--chrome); border-bottom: 1px solid var(--stroke); overflow-x: auto; scrollbar-width: none; }
.rv-levels::-webkit-scrollbar { display: none; }
.rv-tab { flex: none; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--fg); font-size: 13px; }
.rv-tab:hover:not(:disabled) { background: var(--hover); }
.rv-tab.on { background: var(--card); border-color: var(--stroke-2); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.rv-tab:disabled { opacity: .45; }
.rv-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rv-tab.on .rv-n { background: var(--accent); color: var(--on-accent); }
.rv-st, .rv-stars { color: #e7a817; letter-spacing: 1px; font-size: 12px; }
.rv-st i, .rv-stars i { font-style: normal; color: var(--stroke-2); }
.rv-fill { flex: 1; }
.rv-help { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 4px; background: none; color: var(--fg-2); font-size: 13px; }
.rv-help:hover { background: var(--hover); color: var(--fg); }
.rv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.rv-side { min-height: 0; overflow: auto; padding: 16px 18px 20px; border-right: 1px solid var(--stroke); background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.rv-side h2 { margin: -4px 0 0; font-family: var(--ui-display); font-size: 22px; font-weight: 600; line-height: 1.2; }
.rv-side h3 { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-2); }
.rv-brief { margin: 0; color: var(--fg-2); line-height: 1.55; font-size: 13px; }
.rv-goals { margin: 0; padding: 10px 12px 10px 28px; border-radius: 6px; background: var(--sel); font-size: 13px; line-height: 1.7; }
.rv-goals small { color: var(--fg-2); }
.rv-ctl { display: flex; flex-direction: column; gap: 4px; }
.rv-lab { display: flex; justify-content: space-between; font-size: 13px; }
.rv-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); }
.rv-ctl input { width: 100%; accent-color: var(--accent); }
.rv-prog { width: 100%; height: 96px; display: block; border-radius: 4px; background: var(--surface); border: 1px solid var(--stroke); }
.rv-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.rv-inject { height: 36px; padding: 0 18px; font-weight: 600; }
.rv-left { font-size: 12px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.rv-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--fg-2); font-size: 12px; }
.rv-link:hover { color: var(--accent); }
.rv-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px 14px; gap: 8px; overflow: auto; }
.rv-plothead { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--fg-3); }
.rv-plotwrap { position: relative; flex: 1; min-height: 240px; border: 1px solid var(--stroke); border-radius: 6px; background: var(--card); }
.rv-plot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rv-status { min-height: 40px; padding: 10px 12px; border-radius: 6px; background: var(--surface-2); font-size: 13px; line-height: 1.5; }
.rv-status.good { background: color-mix(in srgb, #1f9d55 16%, var(--card)); }
.rv-status.bad { background: color-mix(in srgb, var(--close) 12%, var(--card)); }
.rv-table { overflow-x: auto; }
.rv-table table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.rv-table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--fg-2); padding: 4px 8px; border-bottom: 1px solid var(--stroke-2); }
.rv-table td { padding: 5px 8px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.rv-table .num { text-align: right; }
.rv-table td.n { color: var(--fg-3); width: 28px; }
.rv-table td.bad { color: var(--close); font-weight: 600; }
.rv-table td.ok { color: color-mix(in srgb, #1f9d55 80%, var(--fg)); }
.rv-overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--surface) 55%, transparent); backdrop-filter: blur(3px); }
.rv-card { width: 100%; max-width: 460px; max-height: 100%; overflow: auto; padding: 24px; border-radius: 10px; background: var(--card); border: 1px solid var(--stroke-2); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.rv-card h2 { margin: 0; font-family: var(--ui-display); font-size: 22px; font-weight: 600; }
.rv-card p { margin: 0; line-height: 1.55; color: var(--fg-2); }
.rv-stars.big { font-size: 34px; letter-spacing: 6px; line-height: 1; }
.rv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.rv-stats div { padding: 10px; border-radius: 6px; background: var(--surface-2); }
.rv-stats dt { font-size: 12px; color: var(--fg-2); }
.rv-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rv-tips { margin: 0; padding-left: 18px; line-height: 1.6; color: var(--fg-2); font-size: 13px; }
.rv-tips b { color: var(--fg); }
.rv-fine { font-size: 12px !important; color: var(--fg-3) !important; }
.win[data-size="s"] .rv-body, .win[data-size="m"] .rv-body { display: block; overflow: auto; }
.win[data-size="s"] .rv-body .rv-side, .win[data-size="m"] .rv-body .rv-side { border-right: 0; border-bottom: 1px solid var(--stroke); overflow: visible; }
.win[data-size="s"] .rv-main, .win[data-size="m"] .rv-main { overflow: visible; }
.win[data-size="s"] .rv-plotwrap, .win[data-size="m"] .rv-plotwrap { flex: none; height: 300px; }
.win[data-size="s"] .rv-t, .win[data-size="s"] .rv-help span { display: none; }

.rd { flex: 1; display: flex; flex-direction: column; justify-content: space-between; background: var(--chrome); }
.rd-top { display: flex; gap: 16px; padding: 22px 22px 0; }
.rd-top > .ic { width: 48px; height: 48px; }
.rd-top h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.rd-top p { margin: 0; line-height: 1.55; color: var(--fg-2); font-size: 13px; }
