/* MLC Office — desktop + iPhone-style phone layout, v2 (25-Nov-2026). Colours, menu bar, window, buttons, forms come
   from mac-ui-20261125.css (shared with Draft + Laws Library). JS: office-desktop-20261125.js */

/* old page pieces never shown (no flash) */
header.top, div.unofficial, .mlc-install-entry, section.info { display: none !important; }
html:not(.mlc-ready) main.wrap > * { display: none !important; }
.mac-hidden { display: none !important; }
html.mac-ui body { padding-bottom: 104px !important; }
main.wrap { max-width: none !important; margin: 0 !important; padding: 0 16px 16px !important; background: none !important; }

/* ---------- menu bar: open-window tabs ---------- */
.mac-tabs { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 4px; }
.mac-tabs::-webkit-scrollbar { display: none; }
.mac-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 5px 0 11px; max-width: 220px;
  border-radius: 9px; border: 1px solid transparent; background: var(--m-hover); color: inherit; cursor: pointer;
  font: 550 12.5px/1 var(--m-font); white-space: nowrap; transition: background .15s;
}
.mac-tab:hover { background: var(--m-line); }
.mac-tab.on { background: var(--m-surface); border-color: var(--m-line2); box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .25); }
.mac-tab .t-ico { font-size: 14px; }
.mac-tab .t-name { overflow: hidden; text-overflow: ellipsis; }
.mac-tab .t-x { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: inherit; font-size: 14px; line-height: 1; opacity: .55; cursor: pointer; }
.mac-tab .t-x:hover { opacity: 1; background: var(--m-bad-soft); color: var(--m-bad); }
.mac-tabs-empty { font-size: 12px; color: var(--m-muted); white-space: nowrap; padding-left: 4px; }
#mac-cantt { height: 30px; max-width: 230px; padding: 0 10px; font: 500 12.5px var(--m-font); color: inherit; border-radius: 8px; border: 1px solid var(--m-line2); background: var(--m-surface); }
#mac-sign:not([href]) { color: var(--m-ok); cursor: default; }
#mac-menubar .nr-find-option { display: none !important; }

/* ---------- desktop: full width, icons left, widgets right ---------- */
#mac-desktop { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding: 26px 10px 0; min-height: calc(100vh - 160px); }
.d-group + .d-group { margin-top: 26px; }
.d-gtitle { margin: 0 0 10px 8px !important; font: 700 11px/1 var(--m-font) !important; letter-spacing: .12em !important; text-transform: uppercase; color: var(--m-muted) !important; }
.d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px 6px; }
.d-icon {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 10px; border-radius: 14px;
  border: 0; background: transparent; color: inherit; text-decoration: none; cursor: pointer; font: inherit;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), background .15s;
}
.d-icon:hover { transform: translateY(-3px); background: var(--m-hover); }
.d-icon:focus-visible { outline: 2px solid var(--m-accent); outline-offset: 2px; }
.d-glyph { width: 64px; height: 64px; border-radius: 17px; display: grid; place-items: center; font-size: 30px; color: #fff; box-shadow: 0 10px 22px rgba(15, 23, 42, .2), inset 0 1px 0 rgba(255, 255, 255, .45); }
.d-name { font-size: 13px; font-weight: 650; text-align: center; line-height: 1.25; }
.d-sub { font-size: 11px; color: var(--m-muted); text-align: center; line-height: 1.3; }

.d-widgets { display: flex; flex-direction: column; gap: 12px; }
.wdg { background: var(--m-bar); border: 1px solid var(--m-line); border-radius: 18px; padding: 16px 18px; backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
.wdg-h { font: 700 11px/1 var(--m-font); letter-spacing: .1em; text-transform: uppercase; color: var(--m-muted); margin-bottom: 8px; }
.wdg-b { font-size: 13px; color: var(--m-ink2); line-height: 1.5; white-space: pre-line; }
.wt-time { font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.wt-day { margin-top: 8px; font-size: 13.5px; font-weight: 600; }
.wt-hijri { margin-top: 3px; font-size: 12.5px; color: var(--m-muted); }
.wx-now { display: flex; align-items: center; gap: 8px; color: var(--m-ink); }
.wx-ic { font-size: 30px; line-height: 1; } .wx-t { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.wx-d { font-size: 13.5px; font-weight: 600; color: var(--m-ink); margin-top: 4px; }
.wx-l { font-size: 12px; color: var(--m-muted); margin-top: 2px; }
.wx-days { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.wx-days span { font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: var(--m-hover); color: var(--m-ink2); white-space: nowrap; }
.w-ctext { margin-left: 4px; }

/* ---------- window: full screen ---------- */
#mac-window { max-width: none; margin: 14px 0 0; min-height: calc(100vh - 44px - 118px); display: flex; flex-direction: column; animation: mac-open .16s cubic-bezier(.2, .8, .2, 1); }
#mac-window > .w-body { flex: 1 1 auto; }
@keyframes mac-open { from { opacity: 0; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }
#mac-window .w-back, #mac-window .w-btn.sw { display: none; }
#mac-wbody > section.sec { display: block; margin: 0 0 20px !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; text-align: left; max-width: none !important; }
#mac-wbody > section.sec:last-child { margin-bottom: 0 !important; }
#mac-wbody .hero h2 { font-size: clamp(22px, 2.6vw, 30px) !important; text-align: left !important; }
/* a Branch app shows only its own branch (the branch switcher strip is the Dock / desktop now) */
#mac-window.w-branch #branches > h2, #mac-window.w-branch #branches > .lead, #mac-window.w-branch #btabs { display: none !important; }
:fullscreen #mac-window { min-height: calc(100vh - 44px - 118px); }

/* ---------- dock ---------- */
#mac-dock {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 980;
  display: inline-flex; align-items: flex-end; gap: 8px; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none;
  padding: 8px 12px 6px; border-radius: 22px;
  background: var(--m-bar); border: 1px solid var(--m-line);
  backdrop-filter: blur(26px) saturate(200%); -webkit-backdrop-filter: blur(26px) saturate(200%);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .22);
}
#mac-dock::-webkit-scrollbar { display: none; }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 2px 10px; background: var(--m-line2); flex: none; }
.dock-app { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0 2px; cursor: pointer; color: inherit; text-decoration: none; font: inherit; transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.dock-app:hover { transform: translateY(-7px) scale(1.1); }
.dock-tile { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 23px; color: #fff; box-shadow: 0 6px 16px rgba(15, 23, 42, .22), inset 0 1px 0 rgba(255, 255, 255, .45); }
.dock-lbl { font-size: 10px; font-weight: 600; opacity: .8; white-space: nowrap; }
.dock-run { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.dock-app.running .dock-run { background: var(--m-ink); opacity: .6; }
.dock-app.active .dock-run { background: var(--m-accent); opacity: 1; box-shadow: 0 0 6px var(--m-accent); }

footer { opacity: .6; font-size: 12px !important; text-align: center !important; margin: 26px 0 0 !important; color: var(--m-muted); }
body.mac-app-open footer { display: none; }
#mac-switcher { display: none; }

@media (max-width: 1100px) { #mac-desktop { grid-template-columns: 1fr; } .d-widgets { flex-direction: row; flex-wrap: wrap; order: -1; } .wdg { flex: 1 1 220px; } }

/* =====================================================================
   PHONE — iPhone-style (≤760px)
   ===================================================================== */
@media (max-width: 760px) {
  html.mac-ui body { padding-bottom: 96px !important; }
  /* status bar */
  #mac-menubar { min-height: 44px; padding: 0 10px; gap: 8px; }
  #mac-menubar .mb-brand span, .mac-tabs, #mac-menubar .mb-dot, #mac-menubar .mb-clock { display: none !important; }
  #mac-office { max-width: 132px; min-width: 0; }
  #mac-menubar .mb-right { gap: 6px; min-width: 0; }
  main.wrap { padding: 0 !important; }

  /* home screen */
  #mac-desktop { display: flex; flex-direction: column; padding: 14px 14px 0; min-height: 0; gap: 0; }
  .d-widgets { order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .wx-ic, .wx-t { font-size: 22px; } .wx-days, .wdg-wx .wx-l { display: none; } .wx-d { font-size: 12px; }
  .wdg { padding: 12px 14px; border-radius: 20px; }
  .wdg-cantt { display: none; }
  .wt-time { font-size: 30px; }
  .wt-day { font-size: 12px; margin-top: 6px; } .wt-hijri { font-size: 11px; }
  .d-gtitle { margin: 0 0 8px 4px !important; }
  .d-grid { grid-template-columns: repeat(4, 1fr); gap: 16px 4px; }
  .d-icon { padding: 2px 0; gap: 6px; border-radius: 12px; }
  .d-icon:hover { transform: none; background: none; }
  .d-icon:active .d-glyph { transform: scale(.92); }
  .d-glyph { width: 58px; height: 58px; border-radius: 14px; font-size: 27px; transition: transform .12s; }
  .d-name { font-size: 11px; font-weight: 500; max-width: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .d-sub { display: none; }
  footer { display: none; }

  /* dock: 4 pinned apps like the iPhone dock; no running list / links on phone */
  #mac-dock { bottom: 10px; padding: 10px 14px; gap: 14px; border-radius: 28px; }
  #mac-dock .dock-home, #mac-dock .dock-sep, #mac-dock .dock-links, #mac-dock .dock-lbl { display: none !important; }
  #mac-dock .dock-app:not(.dock-spot):not(.dock-stack) { display: none !important; }
  .dock-tile { width: 56px; height: 56px; border-radius: 14px; font-size: 27px; }
  .dock-app:hover { transform: none; }
  body.mac-app-open #mac-dock { display: none; }
  body.mac-app-open { padding-bottom: 0 !important; }

  /* app = full screen with an iOS navigation bar */
  #mac-window { margin: 0 !important; border-radius: 0 !important; border: 0 !important; box-shadow: none !important; min-height: calc(100vh - 44px); animation: mac-slide .2s cubic-bezier(.2, .8, .2, 1); }
  @keyframes mac-slide { from { opacity: .4; transform: translateX(24px); } to { opacity: 1; transform: none; } }
  #mac-window > .w-chrome { position: sticky; top: 44px; z-index: 60; height: 48px; padding: 0 8px; border-radius: 0 !important; background: var(--m-bar) !important; backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); }
  #mac-window .w-lights, #mac-window .w-btn.min, #mac-window .w-ctext { display: none !important; }
  #mac-window .w-back { display: inline-flex; align-items: center; height: 34px; padding: 0 8px; border: 0; background: none; color: var(--m-accent); font: 600 16px var(--m-font); cursor: pointer; flex: 0 0 auto; }
  #mac-window .w-title { font-size: 15px; }
  #mac-window .w-btn.sw { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0 !important; border-radius: 9px !important; font-size: 12px !important; border: 1.5px solid currentColor !important; }
  #mac-window .w-btn.close { width: 34px; height: 34px; padding: 0 !important; justify-content: center; font-size: 15px !important; border: 0 !important; }
  #mac-window > .w-body { padding: 16px 14px 28px !important; }

  /* app switcher sheet */
  #mac-switcher:not(.mac-hidden) { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 1200; padding: 56px 16px 24px; background: rgba(10, 12, 18, .55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: mac-fade .15s; }
  @keyframes mac-fade { from { opacity: 0; } to { opacity: 1; } }
  .sw-head { display: flex; justify-content: space-between; align-items: center; color: #fff; margin-bottom: 14px; font-size: 17px; }
  .sw-done { background: none; border: 0; color: #93c5fd; font: 600 16px var(--m-font); cursor: pointer; }
  .sw-list { display: flex; flex-direction: column; gap: 10px; overflow: auto; }
  .sw-card { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--m-surface); color: var(--m-ink); cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
  .sw-card.on { outline: 2px solid var(--m-accent); }
  .sw-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; color: #fff; flex: none; }
  .sw-name { flex: 1; font-weight: 600; font-size: 15px; }
  .sw-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--m-hover); color: inherit; font-size: 14px; cursor: pointer; }
  .sw-empty { color: #fff; opacity: .8; }
  .sw-closeall { margin-top: 16px; align-self: center; padding: 10px 22px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font: 600 14px var(--m-font); cursor: pointer; }
}
@media print { #mac-dock, #mac-menubar, #mac-switcher { display: none !important; } }

/* ---------- private record apps (Employees · Applicants · Election) ---------- */
.rc-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 10px; }
.rc-bar .rc-q { flex: 1 1 320px; min-height: 42px !important; font-size: 15px !important; }
.rc-bar .rc-f { flex: 0 1 280px; }
.rc-count { font-size: 12.5px; margin-bottom: 12px; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.rc-first { grid-column: 1 / -1; text-align: center; padding: 46px 16px; color: var(--m-muted); border: 1px dashed var(--m-line2); border-radius: var(--m-r); }
.rc-card { padding: 0 !important; overflow: hidden; }
.rc-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--m-line); }
.rc-name { font-weight: 700; font-size: 15px; }
.rc-meta { font-size: 12.5px; color: var(--m-muted); margin-top: 2px; }
.rc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rc-chip { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--m-accent-soft); color: var(--m-ink2); }
.rc-warn { font-size: 11px; color: var(--m-warn); }
.rc-rows { padding: 6px 16px 10px; }
.rc-row { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--m-line); font-size: 13px; }
.rc-row:last-child { border-bottom: 0; }
.rc-row span { color: var(--m-muted); flex: 0 0 auto; }
.rc-row b { font-weight: 550; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.rc-sub { padding: 2px 16px 4px; font: 700 11px var(--m-font); letter-spacing: .08em; text-transform: uppercase; color: var(--m-muted); }
.rc-list { margin: 0; padding: 0 16px 14px 32px; font-size: 12.5px; color: var(--m-ink2); }
.rc-list li { margin: 3px 0; }
.rc-more-wrap { display: flex; justify-content: center; margin-top: 16px; }
@media (max-width: 760px) { .rc-grid { grid-template-columns: 1fr; } .rc-bar .rc-f { flex: 1 1 100%; } }

/* ---------- Finder ---------- */
.fd-top { max-width: 860px; margin: 0 auto 18px; text-align: center; }
.fd-top h2 { margin: 6px 0 4px; }
.fd-top .lead { margin: 0 auto 16px; max-width: 640px; }
.fd-q { width: 100%; min-height: 50px !important; font-size: 17px !important; border-radius: 12px !important; padding: 12px 18px !important; }
.fd-hint { margin-top: 8px; font-size: 12px; color: var(--m-muted); }
.fd-hint kbd { font: 600 11px var(--m-font); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--m-line2); background: var(--m-surface2); }
.fd-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.fd-empty { grid-column: 1 / -1; text-align: center; color: var(--m-muted); padding: 30px 10px; }
.fd-group { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--m-r); overflow: hidden; }
.fd-gh { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--m-surface2); border-bottom: 1px solid var(--m-line); font-weight: 650; font-size: 13.5px; }
.fd-n { font-size: 12px; color: var(--m-muted); font-weight: 600; }
.fd-none { padding: 12px 14px; color: var(--m-muted); font-size: 13px; }
.fd-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--m-line); background: none; color: inherit; font: inherit; cursor: pointer; }
.fd-row:hover { background: var(--m-hover); }
.fd-t { font-weight: 600; font-size: 13.5px; grid-column: 1; overflow: hidden; text-overflow: ellipsis; }
.fd-s { font-size: 12px; color: var(--m-muted); grid-column: 1; line-height: 1.45; }
.fd-ext { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 700 10.5px var(--m-font); padding: 2px 7px; border-radius: 6px; background: var(--m-accent-soft); color: var(--m-accent); }
.fd-more { margin: 10px 14px 12px; }
@media (max-width: 760px) { .fd-out { grid-template-columns: 1fr; } .fd-hint { display: none; } }

/* ---------- Draft / Audit Reply inside the window ---------- */
#mac-window.w-frame > .w-body { padding: 0 !important; }
.fr-app { margin: 0 !important; }
.mac-frame { display: block; width: 100%; height: calc(100vh - 44px - 42px - 118px); min-height: 520px; border: 0; background: var(--m-surface); border-radius: 0 0 14px 14px; }
@media (max-width: 760px) { .mac-frame { height: calc(100vh - 44px - 48px); min-height: 0; border-radius: 0; } }

/* ---------- Deadlines widget ---------- */
.wdg-today .wdg-b { white-space: normal; display: flex; flex-direction: column; gap: 2px; }
.td-row { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; padding: 7px 8px; margin: 0 -8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; }
.td-row:hover { background: var(--m-hover); }
.td-t { font-size: 13px; font-weight: 600; color: var(--m-ink); }
.td-w { font-size: 11.5px; color: var(--m-muted); }
.td-row.soon .td-w { color: var(--m-warn); } .td-row.late .td-w { color: var(--m-bad); font-weight: 600; }
.td-none { font-size: 13px; color: var(--m-muted); }
@media (max-width: 760px) { .wdg-today { grid-column: 1 / -1; } }
.fd-recent { grid-column: 1 / -1; max-width: 860px; width: 100%; justify-self: center; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--m-line); }
.fd-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--m-line2); background: var(--m-surface2); color: inherit; font: 500 12.5px var(--m-font); cursor: pointer; }
.fd-chip:hover { background: var(--m-hover); }
.fd-clear { min-height: 26px !important; padding: 3px 10px !important; font-size: 11.5px !important; }
@media (max-width: 760px) { #mac-menubar .mac-install { padding: 0 6px !important; } #mac-menubar .mac-install span { display: none; } }
@media (max-width: 760px) {
  #mac-menubar .mb-theme { width: 22px; padding: 0 0 0 5px !important; overflow: hidden; white-space: nowrap; justify-content: flex-start; }
  #mac-cantt { max-width: 112px; }
}

/* =====================================================================
   v4 (25-Nov): Mac glyph icons · office selector · Spotlight · one-screen desktop
   ===================================================================== */
.d-glyph, .dock-tile, .sw-ico { color: #fff; }
.d-glyph svg { width: 54%; height: 54%; }
.dock-tile svg { width: 56%; height: 56%; }
.sw-ico svg { width: 58%; height: 58%; }
.mac-tab .t-ico { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; color: #fff; flex: none; }
.mac-tab .t-ico svg { width: 13px; height: 13px; }
.d-sub-grid { display: contents; }
#mac-office { height: 30px; max-width: 250px; padding: 0 10px; font: 500 12.5px var(--m-font); color: inherit; border-radius: 8px; border: 1px solid var(--m-line2); background: var(--m-surface); }
#mac-menubar .mb-spot { width: 32px; padding: 0 !important; justify-content: center; }
#mac-menubar .mb-spot svg { width: 17px; height: 17px; }
.wdg-about { font-size: 11px; line-height: 1.5; color: var(--m-muted); padding: 2px 6px; }
footer { display: none !important; }
main.wrap > #app-finder { display: none !important; }

/* ---- one screen (computer): desktop and windows fit the visible page; only their insides scroll ---- */
@media (min-width: 761px) {
  html.mac-ui body { height: 100vh; overflow: hidden; padding-bottom: 0 !important; }
  main.wrap { height: calc(100vh - 44px); overflow: hidden; padding-bottom: 0 !important; }
  #mac-desktop { height: calc(100vh - 44px - 96px); min-height: 0; overflow: hidden; padding-top: 22px; }
  #mac-desktop .d-main { overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
  #mac-desktop .d-widgets { overflow-y: auto; scrollbar-width: none; }
  .d-group + .d-group { margin-top: 16px; }
  .d-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 4px 4px; }
  .d-icon { padding: 9px 4px 8px; gap: 6px; }
  .d-glyph { width: 58px; height: 58px; border-radius: 15px; }
  .d-sub { display: none; }
  #mac-window { height: calc(100vh - 44px - 14px - 96px); min-height: 0; }
  #mac-window > .w-body { overflow: auto; min-height: 0; }
  #mac-window.w-frame > .w-body { overflow: hidden; display: flex; }
  #mac-window.w-frame .fr-app { flex: 1 1 auto; display: flex; min-height: 0; }
  #mac-window.w-frame .mac-frame { height: auto; flex: 1 1 auto; min-height: 0; }
}

/* ---- Spotlight ---- */
#mac-spot { position: fixed; inset: 0; z-index: 1500; display: none; justify-content: center; align-items: flex-start; padding: 14vh 16px 16px;
  background: rgba(8, 10, 16, .28); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
#mac-spot.on { display: flex; animation: sp-in .14s ease-out; }
@keyframes sp-in { from { opacity: 0; } to { opacity: 1; } }
.sp-panel { width: min(680px, 100%); max-height: 72vh; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: var(--m-bar); border: 1px solid var(--m-line2); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .55);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); animation: sp-drop .16s cubic-bezier(.2, .8, .2, 1); }
@keyframes sp-drop { from { transform: translateY(-8px) scale(.98); } to { transform: none; } }
#mac-spot #app-finder { display: flex !important; flex-direction: column; min-height: 0; margin: 0 !important; padding: 0 !important; }
#mac-spot .fd-top { display: flex; align-items: center; gap: 10px; margin: 0; max-width: none; padding: 10px 16px; border-bottom: 1px solid var(--m-line); }
#mac-spot .fd-glass { width: 22px; height: 22px; color: var(--m-muted); flex: none; }
#mac-spot .fd-glass svg { width: 22px; height: 22px; }
#mac-spot .fd-q { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 22px !important; padding: 8px 0 !important; min-height: 44px !important; color: var(--m-ink) !important; }
#mac-spot .fd-q:focus { box-shadow: none !important; }
#mac-spot .fd-esc { font: 600 11px var(--m-font); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--m-line2); color: var(--m-muted); }
#mac-spot .fd-out { display: block; overflow-y: auto; max-height: calc(72vh - 66px); padding: 6px 0 8px; }
#mac-spot .fd-out:empty { display: none; }
#mac-spot .fd-group { border: 0; border-radius: 0; background: transparent; margin: 0; }
#mac-spot .fd-gh { background: transparent; border: 0; padding: 10px 18px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--m-muted); }
#mac-spot .fd-row { border: 0; margin: 0 8px; width: calc(100% - 16px); border-radius: 9px; padding: 7px 12px; }
#mac-spot .fd-row:hover, #mac-spot .fd-row:focus-visible { background: var(--m-accent); color: #fff; outline: none; }
#mac-spot .fd-row:hover .fd-s, #mac-spot .fd-row:focus-visible .fd-s { color: rgba(255, 255, 255, .85); }
#mac-spot .fd-row:hover mark { background: rgba(255, 255, 255, .25); color: #fff; }
#mac-spot .fd-more { margin: 4px 18px 6px; min-height: 26px !important; padding: 3px 10px !important; font-size: 11.5px !important; }
#mac-spot .fd-empty { padding: 14px 18px; text-align: left; }
#mac-spot .fd-recent { max-width: none; }
#mac-spot .fd-chips { border: 0; padding: 6px 18px 10px; }
html.mac-spot-on #mac-dock, html.mac-spot-on main.wrap, html.mac-spot-on #mac-menubar { filter: saturate(.9); }
@media (max-width: 760px) {
  #mac-spot { padding: 10px 10px; }
  .sp-panel { max-height: 86vh; border-radius: 16px; }
  #mac-spot .fd-q { font-size: 18px !important; }
  #mac-spot .fd-out { max-height: calc(86vh - 66px); }
  #mac-office { max-width: 132px; }
  #mac-dock .dock-spot { display: flex !important; }
  #mac-dock .dock-app[data-open="office-tools"] { display: none !important; }
}
#mac-spot .fd-q, #mac-spot .fd-q:focus, #mac-spot .fd-q:focus-visible { outline: none !important; border: 0 !important; box-shadow: none !important; }
@media (max-width: 760px) { .wdg-about { grid-column: 1 / -1; order: 9; padding: 0 4px; } }

/* ---------- Dock folder stacks (25-Nov) ---------- */
.stack-tile { display: grid !important; grid-template-columns: 1fr 1fr; gap: 3px; padding: 5px; background: rgba(148, 163, 184, .28) !important;
  border: 1px solid var(--m-line2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25) !important; }
.stack-tile i { display: grid; place-items: center; border-radius: 4px; color: #fff; min-width: 0; min-height: 0; }
.stack-tile i svg { width: 70%; height: 70%; }
.dock-stack.open .dock-tile { outline: 2px solid var(--m-accent); outline-offset: 2px; }
#mac-stack { position: fixed; z-index: 1300; display: none; width: max-content; max-width: min(430px, calc(100vw - 16px)); padding: 12px 12px 10px;
  border-radius: 18px; background: var(--m-bar); border: 1px solid var(--m-line2); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); }
#mac-stack.on { display: block; animation: stk-in .14s cubic-bezier(.2, .8, .2, 1); }
@keyframes stk-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.stk-h { font: 700 11px var(--m-font); letter-spacing: .1em; text-transform: uppercase; color: var(--m-muted); padding: 0 6px 8px; }
.stk-grid { display: grid; grid-template-columns: repeat(4, 92px); gap: 6px 4px; }
.stk-app { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px; border: 0; border-radius: 12px; background: none; color: inherit; cursor: pointer; text-decoration: none; font: inherit; }
.stk-app:hover { background: var(--m-hover); }
.stk-ico { position: relative; width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px rgba(15, 23, 42, .22); }
.stk-ico svg { width: 56%; height: 56%; }
.stk-dot { position: absolute; bottom: -7px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--m-ink); opacity: .7; }
.stk-name { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.2; max-width: 88px; }
@media (max-width: 760px) {
  #mac-dock .dock-stack { display: flex !important; }
  #mac-dock .dock-app[data-open] { display: none !important; }
  #mac-dock .dock-sep { display: none !important; }
  #mac-dock { gap: 10px; padding: 9px 12px; }
  #mac-dock .dock-tile { width: 54px; height: 54px; }
  .stk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); width: calc(100vw - 40px); }
  .stk-app { padding: 6px 0; } .stk-ico { width: 52px; height: 52px; }
}
@media (max-width: 760px) { html body #mac-dock .dock-app .dock-lbl { display: none !important; } }
