/* finder.css — Finder window (DESIGN §4.1). Prefix fd-. Colours come from the --mac-* tokens in base.css. */

.fd-root { display: flex; flex-direction: column; height: 100%; background: var(--mac-win-bg); color: var(--mac-text); font-size: 13px; line-height: 1.3; }
.fd-body { flex: 1; min-height: 0; display: flex; }
.fd-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--mac-win-bg); }

/* ------------------------------------------------------------- toolbar */
.fd-tb { display: flex; align-items: center; gap: 10px; width: 100%; height: 100%; min-width: 0; padding: 0 10px 0 4px; }
.fd-navbtns { display: flex; gap: 1px; flex: none; }
.fd-nb {
  width: 28px; height: 24px; padding: 0; margin: 0; border: 0; border-radius: 6px; background: none;
  color: var(--mac-text); display: flex; align-items: center; justify-content: center; cursor: default;
}
.fd-nb:hover:not(:disabled) { background: rgba(0, 0, 0, .07); }
.fd-nb:disabled { opacity: .3; }
.fd-title { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; font-weight: 700; font-size: 14px; }
.fd-title-ico { display: inline-flex; flex: none; }
.fd-title-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-spacer { flex: 1; min-width: 4px; height: 100%; }
.fd-seg { display: flex; flex: none; padding: 1px; border-radius: 7px; background: rgba(0, 0, 0, .06); }
.fd-vb {
  width: 30px; height: 22px; padding: 0; margin: 0; border: 0; border-radius: 6px; background: none;
  color: var(--mac-text-2); display: flex; align-items: center; justify-content: center; cursor: default;
}
.fd-vb.is-on { background: #fff; color: var(--mac-text); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .08); }
.fd-search { position: relative; flex: none; width: 150px; }
.fd-search-ico { position: absolute; left: 7px; top: 50%; margin-top: -6.5px; color: var(--mac-text-2); display: flex; pointer-events: none; }
.fd-search-in {
  width: 100%; height: 24px; padding: 0 8px 0 26px; margin: 0; border: 1px solid rgba(0, 0, 0, .14); border-radius: 6px;
  background: rgba(255, 255, 255, .9); color: var(--mac-text); font: 13px var(--lab-font-ui); outline: none;
  -webkit-user-select: text; user-select: text;
}
.fd-search-in:focus { border-color: var(--mac-accent); box-shadow: 0 0 0 3px rgba(10, 108, 255, .3); }
.fd-trashbtn {
  flex: none; height: 24px; padding: 0 12px; margin: 0; border: .5px solid rgba(0, 0, 0, .22); border-radius: 6px; background: #fff;
  color: var(--mac-text); font: 13px var(--lab-font-ui); cursor: default; box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
.fd-trashbtn:disabled { color: rgba(0, 0, 0, .3); }
.fd-trashbtn[hidden] { display: none; }
.fd-nb:focus-visible, .fd-vb:focus-visible, .fd-trashbtn:focus-visible, .fd-side-item:focus-visible, .fd-ps:focus-visible, .fd-hc:focus-visible {
  outline: 2px solid #f0b545; outline-offset: -1px;
}

/* ------------------------------------------------------------- sidebar */
.fd-sidebar {
  flex: none; width: 180px; padding: 6px 8px 10px; overflow-x: hidden; overflow-y: auto;
  background: var(--mac-sidebar);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border-right: 1px solid var(--mac-hair);
}
.fd-side-sec { padding: 9px 8px 2px; font-size: 11px; font-weight: 600; color: var(--mac-text-2); }
.fd-side-item {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 24px; padding: 0 8px; margin: 0 0 1px;
  border: 0; border-radius: 6px; background: none; color: var(--mac-text); font: 13px var(--lab-font-ui); text-align: left; cursor: default;
}
.fd-side-ico { display: inline-flex; flex: none; color: var(--mac-accent); }
.fd-side-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-side-item.is-cur { background: rgba(0, 0, 0, .1); }
.lab-win.is-inactive .fd-side-item.is-cur { background: rgba(0, 0, 0, .06); }
.fd-side-item.is-inert { color: rgba(0, 0, 0, .38); }
.fd-side-item.is-inert .fd-side-ico { color: rgba(0, 0, 0, .3); }
.fd-side-item.is-drop { background: var(--mac-sel-strong); color: #fff; }
.fd-side-item.is-drop .fd-side-ico { color: #fff; }
.lab-win.is-inactive .fd-side-ico { color: #8e9aab; }

/* -------------------------------------------------------------- scroller */
.fd-scroll { position: relative; flex: 1; min-height: 0; overflow: auto; outline: none; }
.fd-scroll.is-drop { box-shadow: inset 0 0 0 2px var(--mac-accent); }
.fd-item { cursor: default; outline: none; }
.fd-name-t { -webkit-user-select: none; user-select: none; }
.fd-edit {
  font: inherit; color: #000; background: #fff; border: 1px solid var(--mac-accent); border-radius: 3px; padding: 1px 3px; margin: 0;
  outline: 3px solid rgba(10, 108, 255, .35); -webkit-user-select: text; user-select: text; min-width: 0;
}
.fd-item.is-dim .fd-ico, .fd-item.is-dim .fd-rico, .fd-item.is-dim .fd-name-t { opacity: .5; }
.fd-item.is-new { animation: fd-fade .15s ease-out; }
@keyframes fd-fade { from { opacity: 0; } to { opacity: 1; } }
.fd-rubber { position: absolute; z-index: 3; border: 1px solid rgba(10, 108, 255, .75); background: rgba(10, 108, 255, .12); pointer-events: none; }

/* icon view: cell about 96 x 92 */
.fd-grid {
  position: relative; min-height: 100%; padding: 10px 10px 16px;
  display: grid; grid-template-columns: repeat(auto-fill, 96px); grid-auto-rows: min-content; align-content: start; justify-content: start; gap: 4px 4px;
}
.fd-icon { width: 96px; padding: 4px 0 6px; display: flex; flex-direction: column; align-items: center; border-radius: 6px; }
.fd-ico { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 7px; }
.fd-ico svg { pointer-events: none; }
.fd-icon.is-sel .fd-ico { background: rgba(0, 0, 0, .1); }
.fd-icon.is-drop .fd-ico { background: rgba(10, 108, 255, .22); box-shadow: 0 0 0 2px rgba(10, 108, 255, .85); }
.fd-icon .fd-name { margin-top: 3px; max-width: 92px; text-align: center; }
.fd-icon .fd-name-t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all;
  padding: 1px 5px; border-radius: 4px; font-size: 12px; line-height: 1.25;
}
.fd-icon.is-sel .fd-name-t { background: rgba(0, 0, 0, .18); }
.lab-win.is-active .fd-icon.is-sel .fd-name-t { background: var(--mac-sel-strong); color: #fff; }
.fd-icon.is-renaming .fd-name { max-width: none; width: 96px; }
.fd-icon .fd-edit { width: 94px; text-align: center; font-size: 12px; line-height: 1.25; }

/* list view */
.fd-list { position: relative; min-height: 100%; --fd-cols: minmax(140px, 1fr) 172px 80px 148px; }
.fd-list.is-where { --fd-cols: minmax(140px, 1fr) 170px 172px 80px; }
.fd-listhead {
  position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: var(--fd-cols); height: 22px;
  background: #f7f7f8; border-bottom: 1px solid var(--mac-hair); font-size: 11px; color: var(--mac-text-2);
}
.fd-hc {
  display: flex; align-items: center; gap: 4px; min-width: 0; height: 22px; padding: 0 8px; margin: 0; border: 0; border-right: 1px solid var(--mac-hair);
  background: none; color: inherit; font: 11px var(--lab-font-ui); text-align: left; cursor: default;
}
.fd-hc:last-child { border-right: 0; }
.fd-hc.is-sorted { color: var(--mac-text); font-weight: 600; }
.fd-hc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-hc-s { display: inline-flex; flex: none; }
.fd-c-where { display: none; }
.fd-h-where { display: none; }
.fd-list.is-where .fd-c-where { display: block; }
.fd-list.is-where .fd-h-where { display: flex; }
.fd-list.is-where .fd-h-kind { display: none; }
.fd-list.is-where .fd-c-kind { display: none; }
.fd-row { display: grid; grid-template-columns: var(--fd-cols); align-items: center; height: 24px; }
.fd-row.is-odd { background: #f4f5f7; }
.fd-c { min-width: 0; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mac-text-2); font-size: 12px; }
.fd-c-name { display: flex; align-items: center; gap: 5px; color: var(--mac-text); font-size: 13px; padding-left: calc(6px + var(--depth, 0) * 18px); }
.fd-c-name .fd-name-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; border-radius: 3px; }
.fd-rico { display: inline-flex; flex: none; }
.fd-disc { position: relative; flex: none; width: 14px; height: 14px; visibility: hidden; }
.fd-disc.has-kids { visibility: visible; }
.fd-disc::before {
  content: ''; position: absolute; left: 4px; top: 3px; width: 0; height: 0;
  border-left: 6px solid #8a8a8f; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s;
}
.fd-disc.is-open::before { transform: rotate(90deg); left: 3px; top: 3px; }
.fd-row.is-sel { background: rgba(0, 0, 0, .12); }
.lab-win.is-active .fd-row.is-sel { background: var(--mac-sel-strong); }
.lab-win.is-active .fd-row.is-sel .fd-c { color: rgba(255, 255, 255, .88); }
.lab-win.is-active .fd-row.is-sel .fd-c-name { color: #fff; }
.lab-win.is-active .fd-row.is-sel .fd-disc::before { border-left-color: #fff; }
.fd-row.is-drop { background: var(--mac-sel-strong) !important; }
.fd-row.is-drop .fd-c { color: #fff; }
.fd-row.is-renaming .fd-edit { flex: 1; font-size: 13px; }

/* ------------------------------------------------------------ bottom bars */
.fd-status {
  flex: none; height: 22px; line-height: 21px; text-align: center; font-size: 11px; color: var(--mac-text-2);
  background: var(--mac-win-bg); border-top: 1px solid var(--mac-hair); -webkit-user-select: none; user-select: none;
}
.fd-pathbar {
  flex: none; height: 24px; display: flex; align-items: center; gap: 1px; padding: 0 10px; overflow: hidden; white-space: nowrap;
  background: #fafafb; border-top: 1px solid var(--mac-hair); font-size: 11px; color: var(--mac-text-2); border-radius: 0 0 var(--mac-radius) var(--mac-radius);
}
.fd-pathbar.is-clipped { justify-content: flex-end; }
.fd-ps { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 18px; padding: 0 4px; margin: 0; border: 0; border-radius: 4px; background: none; color: inherit; font: 11px var(--lab-font-ui); cursor: default; }
.fd-ps:hover { background: rgba(0, 0, 0, .07); }
.fd-ps.is-last { color: var(--mac-text); }
.fd-ps.is-drop { background: var(--mac-sel-strong); color: #fff; }
.fd-ps-ico { display: inline-flex; }
.fd-psep { flex: none; color: #a0a0a6; font-size: 12px; }
.fd-root.no-path .fd-pathbar { display: none; }
.fd-root.no-path .fd-status { border-radius: 0 0 var(--mac-radius) var(--mac-radius); }
.fd-root.no-status .fd-status { display: none; }
.fd-root.no-status .fd-pathbar { border-top: 1px solid var(--mac-hair); }

/* ------------------------------------------------------------- goto sheet */
.fd-goto-in { -webkit-user-select: text; user-select: text; }
.fd-goto-err { min-height: 18px; margin-top: 6px; color: #d70015; font-size: 12px; }
.lab-sheet.fd-shake { animation: fd-shake .32s ease-in-out; }
@keyframes fd-shake {
  0%, 100% { transform: translate(-50%, 0); }
  20% { transform: translate(calc(-50% - 7px), 0); }
  40% { transform: translate(calc(-50% + 7px), 0); }
  60% { transform: translate(calc(-50% - 5px), 0); }
  80% { transform: translate(calc(-50% + 4px), 0); }
}

/* ------------------------------------------------------------- colour tags (round 5) */
.fd-tags { display: inline-flex; align-items: center; flex: none; margin-left: 4px; }
.fd-tags:empty { display: none; }
.fd-tagdot {
  display: inline-block; flex: none; width: 10px; height: 10px; margin: 0; padding: 0; border-radius: 50%;
  box-shadow: 0 0 0 1px #fff, inset 0 0 0 .5px rgba(0, 0, 0, .25);
}
.fd-tags .fd-tagdot + .fd-tagdot { margin-left: -4px; }
.fd-icon .fd-name { display: flex; justify-content: center; align-items: flex-start; }
.fd-icon .fd-name .fd-tags { margin: 5px 2px 0 0; }
.fd-icon .fd-name-t { min-width: 0; }
.fd-icon.has-tags .fd-name { max-width: 106px; }
.fd-c-name .fd-tags { margin-left: 6px; }
.fd-is-renaming .fd-tags, .is-renaming .fd-tags { display: none; }
.fd-side-tag .fd-side-ico { width: 16px; justify-content: center; }
.fd-side-tag .fd-tagdot { width: 11px; height: 11px; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25); }
.fd-side-tag.is-drop .fd-tagdot { box-shadow: 0 0 0 1px #fff; }
.fd-tagmenu { display: inline-flex; align-items: center; gap: 8px; }
.fd-tagmenu .fd-tagdot { width: 11px; height: 11px; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25); }

/* ------------------------------------------------------------- search scope bar */
.fd-scope {
  flex: none; display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px;
  background: #f7f7f8; border-bottom: 1px solid var(--mac-hair); font-size: 12px; color: var(--mac-text-2);
}
.fd-scope-l { margin-right: 4px; }
.fd-scope-b {
  height: 20px; max-width: 180px; padding: 0 9px; margin: 0; border: 0; border-radius: 5px; background: none;
  color: var(--mac-text); font: 12px var(--lab-font-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default;
}
.fd-scope-b:hover { background: rgba(0, 0, 0, .05); }
.fd-scope-b.is-on { background: rgba(0, 0, 0, .11); }
.fd-scope-b:focus-visible { outline: 2px solid #f0b545; outline-offset: -1px; }

/* ------------------------------------------------------------- thumbnails */
.fd-thumb {
  display: block; max-width: 100%; max-height: 100%; border-radius: 2px; background: #fff; pointer-events: none;
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .3);
}
.fd-ico .fd-thumb { max-width: 58px; max-height: 58px; }
.fd-rico { width: 18px; height: 18px; align-items: center; justify-content: center; }
.fd-rico .fd-thumb { max-width: 17px; max-height: 17px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .3); }
.fd-crow .fd-rico { width: 16px; height: 16px; }
.fd-crow .fd-rico .fd-thumb { max-width: 15px; max-height: 15px; }

/* ------------------------------------------------------------- column view */
.fd-scroll.is-cols, .fd-scroll.is-gal { overflow: hidden; }
.fd-cols { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; }
.fd-col { flex: none; width: 200px; height: 100%; padding: 6px; overflow-x: hidden; overflow-y: auto; border-right: 1px solid var(--mac-hair); background: var(--mac-win-bg); }
.fd-col.is-drop { box-shadow: inset 0 0 0 2px var(--mac-accent); }
.fd-crow { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px; border-radius: 5px; font-size: 13px; }
.fd-crow .fd-name-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; }
.fd-crow .fd-chev { display: inline-flex; flex: none; color: #8a8a90; }
.fd-crow .fd-chev[hidden] { display: none; }
.fd-crow.is-chain { background: rgba(0, 0, 0, .1); }
.fd-crow.is-sel { background: rgba(0, 0, 0, .12); }
.lab-win.is-active .fd-crow.is-sel { background: var(--mac-sel-strong); color: #fff; }
.lab-win.is-active .fd-crow.is-sel .fd-chev { color: #fff; }
.fd-crow.is-drop { background: var(--mac-sel-strong) !important; color: #fff; }
.fd-crow.is-renaming .fd-edit { flex: 1; min-width: 0; font-size: 13px; }
.fd-colprev { flex: none; width: 250px; height: 100%; padding: 14px 16px; overflow-y: auto; background: var(--mac-win-bg); }

/* the preview / information pane (column view, gallery) */
.fd-pane { text-align: left; }
.fd-pane-prev { display: flex; align-items: center; justify-content: center; min-height: 112px; margin: 2px 0 10px; }
.fd-pane-img { display: block; max-width: 100%; max-height: 170px; border-radius: 2px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .3), 0 2px 6px rgba(0, 0, 0, .25); -webkit-user-drag: none; }
.fd-pane-name { font-weight: 700; font-size: 13px; line-height: 1.35; word-break: break-all; }
.fd-pane-sub { margin-top: 2px; color: var(--mac-text-2); font-size: 11.5px; }
.fd-pane-sec { margin-top: 12px; padding-bottom: 3px; border-bottom: 1px solid var(--mac-hair); font-size: 11px; font-weight: 600; color: var(--mac-text-2); }
.fd-pane-rows { padding-top: 4px; }
.fd-pane-r { display: flex; gap: 8px; padding: 2.5px 0; font-size: 11.5px; line-height: 1.35; }
.fd-pane-l { flex: none; width: 56px; text-align: right; color: var(--mac-text-2); }
.fd-pane-v { flex: 1; min-width: 0; color: var(--mac-text); word-break: keep-all; overflow-wrap: anywhere; }
.fd-pane-r.is-tags .fd-pane-v { color: var(--mac-text-2); cursor: default; }
.fd-pane-more { display: block; margin: 8px 0 0 64px; padding: 0; border: 0; background: none; color: var(--mac-accent); font: 11.5px var(--lab-font-ui); cursor: default; }
.fd-pane-more:hover { text-decoration: underline; }

/* ------------------------------------------------------------- gallery view */
.fd-gal { display: flex; flex-direction: column; height: 100%; }
.fd-gal-top { flex: 1; min-height: 0; display: flex; }
.fd-gal-stage { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; background: var(--mac-win-bg); }
.fd-gal-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .22); -webkit-user-drag: none; }
.fd-gal-ico { display: flex; }
.fd-gal-empty { color: var(--mac-text-2); font-size: 13px; }
.fd-gal-info { flex: none; width: 214px; padding: 14px 16px; overflow-y: auto; border-left: 1px solid var(--mac-hair); }
.fd-gal-strip { flex: none; height: 98px; display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; border-top: 1px solid var(--mac-hair); background: #f6f6f7; }
.fd-gcell { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; padding: 2px 2px 3px; border-radius: 6px; }
.fd-gcell .fd-ico { width: 56px; height: 56px; }
.fd-gcell .fd-ico .fd-thumb { max-width: 54px; max-height: 54px; }
.fd-gcell.is-sel .fd-ico { background: rgba(0, 0, 0, .12); box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); }
.lab-win.is-active .fd-gcell.is-sel .fd-ico { background: rgba(10, 108, 255, .12); box-shadow: 0 0 0 2.5px var(--mac-accent); }
.fd-gcell .fd-name { max-width: 72px; margin-top: 2px; }
.fd-gcell .fd-name-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70px; padding: 0 3px; border-radius: 3px; font-size: 11px; }
.fd-gcell.is-sel .fd-name-t { background: rgba(0, 0, 0, .15); }
.lab-win.is-active .fd-gcell.is-sel .fd-name-t { background: var(--mac-sel-strong); color: #fff; }
.fd-gcell .fd-edit { width: 70px; font-size: 11px; text-align: center; }

/* ------------------------------------------------------------- Info window (取得資訊) */
.fd-info { height: 100%; overflow-y: auto; padding: 14px 16px 16px; background: #f5f5f6; font-size: 12px; line-height: 1.35; color: var(--mac-text); }
.fd-ix-head { display: flex; align-items: center; gap: 10px; }
.fd-ix-ico { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; }
.fd-ix-ico .fd-thumb { max-width: 50px; max-height: 50px; }
.fd-ix-hm { min-width: 0; }
.fd-ix-name { font-weight: 700; font-size: 14px; line-height: 1.25; word-break: break-all; }
.fd-ix-sub { margin-top: 1px; color: var(--mac-text-2); font-size: 11.5px; word-break: keep-all; overflow-wrap: anywhere; }
.fd-ix-tagrow { margin: 10px 0 8px; }
.fd-ix-tagbtn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 24px; margin: 0; padding: 0 8px; text-align: left;
  border: 1px solid rgba(0, 0, 0, .14); border-radius: 6px; background: #fff; color: var(--mac-text-2); font: 12px var(--lab-font-ui); cursor: default;
}
.fd-ix-tagbtn:focus-visible, .fd-ix-h:focus-visible, .fd-ix-pop:focus-visible { outline: 2px solid #f0b545; outline-offset: 1px; }
.fd-ix-tagnames { color: var(--mac-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-ix { padding: 8px 0 6px; border-top: 1px solid var(--mac-hair); }
.fd-ix-h { display: flex; align-items: center; gap: 5px; width: 100%; margin: 0 0 4px; padding: 0; border: 0; background: none; color: var(--mac-text); font: 600 12px var(--lab-font-ui); text-align: left; cursor: default; }
.fd-ix-tri { position: relative; flex: none; width: 10px; height: 10px; }
.fd-ix-tri::before {
  content: ''; position: absolute; left: 2px; top: 1px; width: 0; height: 0;
  border-left: 6px solid #8a8a8f; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s;
}
.fd-ix-h.is-open .fd-ix-tri::before { transform: rotate(90deg); left: 1px; top: 1px; }
.fd-ix-b[hidden] { display: none; }
.fd-ir { display: flex; gap: 8px; padding: 2px 0; }
.fd-ir-l { flex: none; width: 74px; text-align: right; color: var(--mac-text-2); }
.fd-ir-v { flex: 1; min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.fd-ix-inwrap { padding: 2px 0; }
.fd-ix-in {
  width: 100%; height: 24px; margin: 0; padding: 0 7px; border: 1px solid rgba(0, 0, 0, .16); border-radius: 5px; background: #fff;
  color: var(--mac-text); font: 12.5px var(--lab-font-ui); outline: none; -webkit-user-select: text; user-select: text;
}
.fd-ix-in:focus { border-color: var(--mac-accent); box-shadow: 0 0 0 3px rgba(10, 108, 255, .3); }
.fd-ix-chk { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--mac-text-2); }
.fd-ix-chk input { margin: 0; }
.fd-ix-pop {
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: 24px; margin: 2px 0 4px; padding: 0 8px;
  border: .5px solid rgba(0, 0, 0, .22); border-radius: 6px; background: #fff; color: var(--mac-text); font: 12px var(--lab-font-ui); cursor: default;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
.fd-ix-popc { color: var(--mac-text-2); font-size: 10px; transform: scaleY(1.4); }
.fd-ix-note { color: var(--mac-text-2); font-size: 11.5px; padding: 2px 0; }
.fd-ix-note.is-first { margin-bottom: 4px; color: var(--mac-text); }
.fd-ix-prev { display: block; max-width: 100%; max-height: 170px; margin: 6px auto 4px; border-radius: 2px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .3), 0 2px 6px rgba(0, 0, 0, .22); -webkit-user-drag: none; }
.fd-ix-perm { margin-top: 2px; border: 1px solid var(--mac-hair); border-radius: 6px; background: #fff; overflow: hidden; }
.fd-ix-permhead, .fd-ix-permrow { display: flex; justify-content: space-between; padding: 4px 9px; }
.fd-ix-permhead { color: var(--mac-text-2); font-size: 11px; background: #fafafb; border-bottom: 1px solid var(--mac-hair); }
.fd-ix-permrow + .fd-ix-permrow { border-top: 1px solid rgba(0, 0, 0, .06); }

/* ---------------------------------------------------- performance mode */
html[data-perf="low"] .fd-sidebar { background: #f2f2f3; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ================================================================== macOS 26 (Tahoe) look
   Teacher, 2026-10-16, from screenshots of the owner's Mac (drawn in code; no picture of the real Finder is used):
   - the sidebar is a floating glass panel (a little in from the window edge, faintly tinted, rounded), the traffic lights sit inside it;
   - the toolbar is glass capsules over the white content: back / forward, the folder name in bold (no folder icon), view (⌃⌄), group (⌄),
     share · tags · more, and a round search button;
   - the path bar (and the status bar) sit under the content only, white, with a faint line on top.
   The window bar (wm.js, bar 'unified') is laid over the top of the window instead of above it, so the sidebar reaches the top edge; it is
   still the bar: it drags the window, its lights and the toolbar in it work as before. Only colours, sizes and positions change here. */
.lab-win[data-app="finder"] { --mac-radius: 24px; --fd-side-w: 190px; --fd-inset: 8px; --fd-bar-h: 52px; --fd-cap-h: 34px; }
.lab-win[data-app="finder"] .lab-win-bar { position: absolute; left: 0; right: 0; top: 0; height: var(--fd-bar-h); background: transparent; border-bottom: 0; z-index: 5; }
.lab-win[data-app="finder"] .lab-tl { position: absolute; left: calc(var(--fd-inset) + 11px); top: var(--fd-inset); height: 32px; padding: 0; }
.lab-win[data-app="finder"] .lab-win-tools { padding-left: calc(var(--fd-inset) + var(--fd-side-w) + 10px); }
.lab-win[data-app="finder"] .lab-win-body { border-radius: var(--mac-radius); }
.lab-win[data-app="finder"] .fd-root { background: #fff; }
.lab-win[data-app="finder"] .fd-main { padding-top: var(--fd-bar-h); background: #fff; }

/* toolbar: glass capsules */
.lab-win[data-app="finder"] .fd-tb { gap: 8px; padding: 0 12px 0 0; }
.fd-navbtns, .fd-cap, .fd-search {
  height: var(--fd-cap-h); border-radius: 999px; background: rgba(255, 255, 255, .96);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .09), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.fd-navbtns { padding: 0 2px; gap: 0; }
.lab-win[data-app="finder"] .fd-nb { width: 36px; height: var(--fd-cap-h); border-radius: 999px; color: #1d1d1f; }
.lab-win[data-app="finder"] .fd-nb:disabled { opacity: .28; }
.lab-win[data-app="finder"] .fd-title { margin-left: 6px; font-size: 15px; font-weight: 700; color: #1d1d1f; }
.lab-win[data-app="finder"] .fd-title-ico { display: none; }
.fd-cap {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex: none; padding: 0 11px 0 12px; margin: 0; border: 0;
  color: #1d1d1f; font: inherit; cursor: default;
}
.fd-cap > svg:nth-child(2), .fd-cap > svg:nth-child(2) * { color: #6e6e73; }
.fd-cap:hover:not([aria-disabled="true"]), .fd-cap.is-open { background: #fff; }
.fd-acts { gap: 0; padding: 0 3px; }
.fd-capb { width: 36px; height: var(--fd-cap-h); padding: 0; margin: 0; border: 0; border-radius: 999px; background: none; color: #1d1d1f; display: flex; align-items: center; justify-content: center; cursor: default; }
.fd-cap:focus-visible, .fd-capb:focus-visible { outline: 2px solid #f0b545; outline-offset: -1px; }
/* the view capsule's panel: the four views (the old segmented buttons, data-lab unchanged) as a small glass menu under it */
.fd-viewwrap { position: relative; flex: none; }
.fd-viewwrap .fd-seg {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: flex; flex-direction: column; gap: 2px; min-width: 128px; padding: 6px;
  border-radius: 14px; background: rgba(255, 255, 255, .97); box-shadow: 0 10px 30px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .12);
}
.fd-viewwrap .fd-seg[hidden] { display: none; }
.fd-viewwrap .fd-vb { width: 100%; height: 28px; justify-content: flex-start; gap: 9px; padding: 0 10px; border-radius: 8px; color: #1d1d1f; }
.fd-viewwrap .fd-vb:hover { background: rgba(0, 0, 0, .05); }
.fd-viewwrap .fd-vb.is-on { background: rgba(0, 0, 0, .08); box-shadow: none; color: #1d1d1f; }
.fd-vb-t { font: 13px var(--lab-font-ui); }
/* search: a round button that widens into the field (it is the field: clicking it puts the caret in) */
.lab-win[data-app="finder"] .fd-search { width: var(--fd-cap-h); transition: width .2s var(--lab-ease); }
.lab-win[data-app="finder"] .fd-search:focus-within, .lab-win[data-app="finder"] .fd-search:has(.fd-search-in:not(:placeholder-shown)) { width: 176px; }
.lab-win[data-app="finder"] .fd-search:focus-within { box-shadow: 0 0 0 3px rgba(10, 108, 255, .28), 0 0 0 .5px rgba(10, 108, 255, .6); }
.lab-win[data-app="finder"] .fd-search-ico { left: 8.5px; margin-top: -8.5px; color: #1d1d1f; }
.lab-win[data-app="finder"] .fd-search-in { height: var(--fd-cap-h); padding: 0 12px 0 32px; border: 0; border-radius: 999px; background: transparent; }
.lab-win[data-app="finder"] .fd-search-in:focus { border: 0; box-shadow: none; }
.lab-win[data-app="finder"] .fd-search:not(:focus-within) .fd-search-in:placeholder-shown { cursor: default; }
.lab-win[data-app="finder"] .fd-search:not(:focus-within) .fd-search-in::placeholder { color: transparent; }
.lab-win[data-app="finder"] .fd-trashbtn { height: var(--fd-cap-h); border: 0; border-radius: 999px; padding: 0 14px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .09); }

/* sidebar: the floating glass panel */
.lab-win[data-app="finder"] .fd-sidebar {
  width: var(--fd-side-w); margin: var(--fd-inset) 0 var(--fd-inset) var(--fd-inset); padding: 44px 8px 10px; border-right: 0; border-radius: 17px;
  background: linear-gradient(180deg, rgba(244, 246, 248, .97), rgba(246, 247, 248, .97));
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .95), 0 0 0 .5px rgba(0, 0, 0, .07), 0 3px 12px rgba(0, 0, 0, .06);
  /* lab-fixes-r3: the top 44 px of the panel is under the traffic lights. When the keyboard (Tab / Shift+Tab) moves to an item the browser
     scrolls it into view; without this, an item reached going up stopped just inside the panel's top edge, half under the red / yellow / green buttons */
  scroll-padding-top: 44px; scroll-padding-bottom: 10px;
}
.lab-win[data-app="finder"] .fd-side-sec { padding: 12px 10px 4px; font-size: 11px; font-weight: 600; color: #8e8e93; }
.lab-win[data-app="finder"] .fd-side-item { height: 30px; gap: 10px; padding: 0 10px; margin-bottom: 1px; border-radius: 9px; font-size: 14px; color: #1d1d1f; }
.lab-win[data-app="finder"] .fd-side-ico { color: #1d1d1f; }
.lab-win[data-app="finder"].is-inactive .fd-side-ico { color: #8e8e93; }
.lab-win[data-app="finder"] .fd-side-item.is-cur { background: rgba(0, 0, 0, .075); }
.lab-win[data-app="finder"].is-inactive .fd-side-item.is-cur { background: rgba(0, 0, 0, .05); }
.lab-win[data-app="finder"] .fd-side-item.is-inert, .lab-win[data-app="finder"] .fd-side-item.is-inert .fd-side-ico { color: rgba(0, 0, 0, .34); }
.lab-win[data-app="finder"] .fd-side-item.is-drop, .lab-win[data-app="finder"] .fd-side-item.is-drop .fd-side-ico { color: #fff; }

/* icon view and list view */
.lab-win[data-app="finder"] .fd-grid { padding: 8px 14px 16px; grid-template-columns: repeat(auto-fill, 100px); gap: 6px 4px; }
.lab-win[data-app="finder"] .fd-icon { width: 100px; }
.lab-win[data-app="finder"] .fd-ico { border-radius: 10px; }
.lab-win[data-app="finder"] .fd-icon.is-sel .fd-ico { background: rgba(0, 0, 0, .08); }
.lab-win[data-app="finder"] .fd-icon .fd-name-t { border-radius: 5px; }
.lab-win[data-app="finder"] .fd-list { padding: 0 10px; }
.lab-win[data-app="finder"] .fd-listhead { height: 28px; background: rgba(255, 255, 255, .96); border-bottom: 0; font-size: 12px; color: #6e6e73; }
.lab-win[data-app="finder"] .fd-hc { height: 28px; padding: 0 10px; font-size: 12px; border-right: 0; box-shadow: inset -1px 0 0 rgba(0, 0, 0, .07); }
.lab-win[data-app="finder"] .fd-hc:last-child { box-shadow: none; }
.lab-win[data-app="finder"] .fd-hc.is-sorted { font-weight: 600; color: #3a3a3c; }
.lab-win[data-app="finder"] .fd-row { height: 25px; border-radius: 7px; }
.lab-win[data-app="finder"] .fd-row.is-odd { background: #f5f5f7; }
.lab-win[data-app="finder"] .fd-c { padding: 0 10px; color: #6e6e73; }
.lab-win[data-app="finder"] .fd-c-name { color: #1d1d1f; padding-left: calc(6px + var(--depth, 0) * 18px); }
.lab-win[data-app="finder"].is-active .fd-row.is-sel { background: #0a64e6; }
/* the disclosure mark is a thin chevron (›), turning down when open */
.lab-win[data-app="finder"] .fd-disc::before {
  left: 3px; top: 4px; width: 5px; height: 5px; border: 0; border-right: 1.6px solid #8a8a8f; border-bottom: 1.6px solid #8a8a8f; transform: rotate(-45deg);
}
.lab-win[data-app="finder"] .fd-disc.is-open::before { left: 4px; top: 3px; transform: rotate(45deg); }
.lab-win[data-app="finder"].is-active .fd-row.is-sel .fd-disc::before { border-left-color: transparent; border-right-color: #fff; border-bottom-color: #fff; }

/* path bar and status bar: under the content only, white */
.lab-win[data-app="finder"] .fd-pathbar { height: 30px; padding: 0 14px; gap: 2px; background: #fff; border-top: 1px solid rgba(0, 0, 0, .065); border-radius: 0 0 var(--mac-radius) 0; color: #6e6e73; }
.lab-win[data-app="finder"] .fd-ps { height: 22px; gap: 5px; padding: 0 5px; border-radius: 6px; font: 12px var(--lab-font-ui); color: #6e6e73; }
.lab-win[data-app="finder"] .fd-ps.is-last { color: #6e6e73; }
.lab-win[data-app="finder"] .fd-ps:first-child .fd-ps-ico { color: #8e8e93; }
/* lab-pathbar-dbl: a click only selects a path-bar segment (as on a real Mac); the selected one lights up like a selected item, a double-click opens it */
.lab-win[data-app="finder"] .fd-ps.is-sel, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-ps.is-sel { background: var(--mac-sel-strong); color: #fff; }
.lab-win[data-app="finder"] .fd-ps.is-sel .fd-ps-ico { color: #fff; }
.lab-win[data-app="finder"] .fd-psep { color: #aeaeb2; font-size: 13px; padding: 0 1px; }
.lab-win[data-app="finder"] .fd-status { background: #fff; border-top: 1px solid rgba(0, 0, 0, .065); }
.lab-win[data-app="finder"] .fd-root.no-path .fd-status { border-radius: 0 0 var(--mac-radius) 0; }
@media (prefers-reduced-motion: reduce) { .lab-win[data-app="finder"] .fd-search { transition: none; } }

/* the same look in the dark appearance (系統設定 › 外觀 › 深色): the rules above fix light colours, so each one gets its dark twin here
   (sysapps.css's dark Finder rules are weaker than these scoped ones) */
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-root, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-main,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-pathbar, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-status,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-listhead { background: var(--mac-win-bg); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-navbtns, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-cap,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-search, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-trashbtn {
  background: rgba(62, 62, 66, .92); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .14), 0 1px 3px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
}
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-cap:hover:not([aria-disabled="true"]), html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-cap.is-open { background: rgba(78, 78, 82, .96); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-nb, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-title,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-cap, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-capb,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-search-ico, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-vb,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-side-item, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-side-ico,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-c-name { color: var(--mac-text); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-cap > svg:nth-child(2), html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-cap > svg:nth-child(2) *,
html[data-appearance="dark"] .lab-win[data-app="finder"].is-inactive .fd-side-ico, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-c,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-ps, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-ps.is-last,
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-listhead, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-pathbar { color: var(--mac-text-2); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-hc.is-sorted { color: #d6d6dc; }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-viewwrap .fd-seg { background: rgb(44, 44, 48); box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(255, 255, 255, .16); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-viewwrap .fd-vb:hover { background: rgba(255, 255, 255, .08); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-viewwrap .fd-vb.is-on { background: rgba(255, 255, 255, .14); box-shadow: none; color: var(--mac-text); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-sidebar {
  background: linear-gradient(180deg, rgba(50, 50, 54, .96), rgba(44, 44, 48, .96));
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .1), 0 0 0 .5px rgba(0, 0, 0, .4), 0 3px 12px rgba(0, 0, 0, .3);
}
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-side-item.is-cur { background: rgba(255, 255, 255, .14); }
html[data-appearance="dark"] .lab-win[data-app="finder"].is-inactive .fd-side-item.is-cur { background: rgba(255, 255, 255, .08); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-side-item.is-inert, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-side-item.is-inert .fd-side-ico { color: rgba(255, 255, 255, .38); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-side-item.is-drop, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-side-item.is-drop .fd-side-ico { color: #fff; }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-icon.is-sel .fd-ico { background: rgba(255, 255, 255, .13); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-hc { box-shadow: inset -1px 0 0 rgba(255, 255, 255, .1); }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-hc:last-child { box-shadow: none; }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-row.is-odd { background: rgba(255, 255, 255, .04); }
html[data-appearance="dark"] .lab-win[data-app="finder"].is-active .fd-row.is-sel { background: #0a64e6; }
html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-pathbar, html[data-appearance="dark"] .lab-win[data-app="finder"] .fd-status { border-top-color: rgba(255, 255, 255, .1); }
html[data-appearance="dark"] .lab-win[data-app="finder"].is-active .fd-row.is-sel .fd-c, html[data-appearance="dark"] .lab-win[data-app="finder"].is-active .fd-row.is-sel .fd-c-name { color: #fff; }
