/* iOS 26 phone shell (<= 760px). Everything is scoped to body.ios-mode, set by os/ios.js.
   Tablets and desktops never match, so the macOS layer is untouched. App chrome: ios-apps.css. */

.ios-status, .ios-island, .ios-homebar, .ios-home, .ios-scrim, .ios-unlock, .ios-ghost { display: none; }

body.ios-mode {
  --ios-sb: calc(env(safe-area-inset-top, 0px) + 50px);
  --ios-bot: env(safe-area-inset-bottom, 0px);
  --ios-bg: #f2f2f7;
  --ios-card: #fff;
  --ios-sep: rgba(60, 60, 67, .18);
  --ios-label: #000;
  --ios-label2: rgba(60, 60, 67, .62);
  --ios-fill: rgba(120, 120, 128, .14);
  --ios-tint: #0a84ff;
  --ios-ic: 60px;
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
body.ios-mode.dark-desktop {
  --ios-bg: #000; --ios-card: #1c1c1e; --ios-sep: rgba(84, 84, 88, .55); --ios-label: #fff;
  --ios-label2: rgba(235, 235, 245, .6); --ios-fill: rgba(120, 120, 128, .28); --ios-tint: #0a84ff;
}

/* ---------- macOS chrome is hidden (kept in the DOM for desktop) ---------- */
body.ios-mode .menu-bar, body.ios-mode #desktop-items, body.ios-mode nav.dock, body.ios-mode .minimized-tray,
body.ios-mode .dock-tooltip, body.ios-mode .preview-note, body.ios-mode .menu-layer, body.ios-mode .desktop-widgets { display: none !important; }
body.ios-mode .ios-home, body.ios-mode .ios-scrim { display: block; }
body.ios-mode .ios-status { display: flex; }
body.ios-mode .ios-island, body.ios-mode .ios-homebar, body.ios-mode .ios-unlock { display: flex; }
body.ios-mode .ios-ghost { display: flex; position: absolute; pointer-events: none; z-index: 700; }
body.ios-mode .os-ghost { display: none !important; }
body.ios-mode.profile-mode.ios-peek .desktop { visibility: visible; }

/* ---------- status bar + Dynamic Island + home indicator ---------- */
.ios-status {
  position: fixed; top: 0; left: 0; right: 0; height: var(--ios-sb); z-index: 8900;
  padding: calc(env(safe-area-inset-top, 0px) + 19px) 30px 0 36px; box-sizing: border-box;
  justify-content: space-between; align-items: flex-start; color: #fff; touch-action: none;
  font: 600 15px/22px var(--ios-font); letter-spacing: -.01em; transition: color .3s;
}
.ios-time { min-width: 44px; font-variant-numeric: tabular-nums; }
body.profile-mode .ios-time { opacity: 0; }
.ios-cc-trigger {
  display: flex; align-items: center; gap: 6px; height: 44px; margin: -11px -12px 0 0; padding: 0 12px; border: 0;
  background: none; color: inherit; border-radius: 14px;
}
.ios-cc-trigger:focus-visible { outline: 2px solid var(--ios-tint); }
.isb-signal { width: 18px; height: 12px; } .isb-wifi { width: 17px; height: 12px; } .isb-battery { width: 27px; height: 13px; }
body.ios-mode.ios-app-open:not(.dark-desktop) .ios-status { color: #000; }
body.ios-mode[data-ios-app="work"] .ios-status, body.ios-mode.ios-cc-open .ios-status { color: #fff; }
body.ios-mode[data-ios-app="game"] .ios-status { color: #1b2b24; }

.ios-island {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 11px); left: 50%; width: 120px; height: 36px; z-index: 8950;
  transform: translateX(-50%); border-radius: 20px; background: #000; align-items: center; justify-content: space-between;
  padding: 0 13px; overflow: hidden; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .06); color: #fff;
  transition: width .55s cubic-bezier(.34, 1.4, .64, 1); font: 600 15px/1 var(--ios-font);
}
.ios-island > * { opacity: 0; transition: opacity .2s; }
.ios-island[data-state="live"] { width: 232px; }
.ios-island[data-state="paused"] { width: 172px; }
.ios-island:not([data-state="idle"]) > * { opacity: 1; transition-delay: .18s; }
.isl-bean { width: 22px; height: 22px; }
.isl-wave { display: flex; align-items: center; gap: 3px; height: 16px; margin-left: auto; margin-right: 12px; }
.isl-wave i { width: 3px; height: 100%; border-radius: 2px; background: #30d158; transform-origin: 50% 50%; animation: isl-bar .9s ease-in-out infinite alternate; }
.isl-wave i:nth-child(2) { animation-delay: -.3s; } .isl-wave i:nth-child(3) { animation-delay: -.6s; } .isl-wave i:nth-child(4) { animation-delay: -.15s; }
.ios-island[data-state="paused"] .isl-wave i { animation: none; transform: scaleY(.3); background: #8e8e93; }
@keyframes isl-bar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.isl-score { font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; }

.ios-homebar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--ios-bot) + 30px); z-index: 8900; justify-content: center; align-items: flex-end; touch-action: none; }
.ios-homebar i { width: 134px; height: 5px; border-radius: 3px; background: #fff; margin-bottom: calc(var(--ios-bot) * .4 + 8px); box-shadow: 0 0 6px rgba(0, 0, 0, .25); transition: background .3s; }
body.ios-mode.ios-app-open:not(.dark-desktop) .ios-homebar i { background: #000; box-shadow: none; }
body.ios-mode[data-ios-app="work"] .ios-homebar i { background: #fff; }
body.ios-mode .ios-homebar { pointer-events: auto; }
body.ios-mode.ios-cc-open .ios-homebar { pointer-events: none; }

/* ---------- lock screen ---------- */
body.ios-mode .profile-screen { z-index: 8800; touch-action: none; will-change: transform; }
body.ios-mode .entry-clock { top: max(15%, calc(var(--ios-sb) + 24px)); gap: 4px; }
body.ios-mode #entry-date { font: 500 20px/1.2 var(--ios-font); opacity: .9; }
body.ios-mode #entry-time { font: 600 92px/1 var(--ios-font); letter-spacing: -.03em; }
body.ios-mode .profile-entry { bottom: 24%; margin-top: 40px; }
body.ios-mode .entry-note { bottom: calc(var(--ios-bot) + 104px); }
.ios-unlock { position: absolute; bottom: calc(var(--ios-bot) + 46px); left: 0; right: 0; flex-direction: column; align-items: center; gap: 2px; margin: 0; font: 500 14px/1.2 var(--ios-font); color: rgba(255, 255, 255, .85); pointer-events: none; }
.ios-unlock svg { width: 22px; height: 22px; animation: ios-nudge 1.8s ease-in-out infinite; }
@keyframes ios-nudge { 0%, 100% { transform: translateY(2px); opacity: .5; } 50% { transform: translateY(-3px); opacity: 1; } }

/* ---------- home screen ---------- */
body.ios-mode .ios-home {
  position: absolute; inset: 0; z-index: 5; box-sizing: border-box; padding: calc(var(--ios-sb) + 6px) 20px 0;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; grid-template-rows: auto auto auto 1fr; align-content: start;
  font-family: var(--ios-font); color: #fff; touch-action: none; transition: opacity .3s;
}
body.ios-mode .ios-home[inert] { opacity: .0; pointer-events: none; transition-delay: .35s; }
.ios-widgets { display: contents; }
.ios-widget {
  --wh: min(calc((100vw - 54px) / 2), 19svh);
  height: var(--wh); box-sizing: border-box; padding: 13px 14px; border: 0; border-radius: 24px; overflow: hidden; text-align: left;
  color: #000; font-family: var(--ios-font); background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 12, 40, .22), inset 0 1px 0 rgba(255, 255, 255, .6);
}
body.dark-desktop .ios-widget { color: #fff; background: rgba(38, 38, 42, .7); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .1), 0 8px 24px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .12); }
.ios-cal { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; }
.ios-glance { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 4px; }
.ios-building { grid-column: 1 / -1; grid-row: 3; height: auto; margin-top: 14px; padding: 12px; }
.w-day { margin: 0; color: #ff3b30; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.w-date { margin: 0; font-size: 44px; line-height: 1.05; font-weight: 300; }
.w-month { margin: 0; font-size: 12px; font-weight: 500; color: var(--ios-label2); }
body:not(.dark-desktop) .ios-widget { --ios-label2: rgba(60, 60, 67, .62); } body.dark-desktop .ios-widget { --ios-label2: rgba(235, 235, 245, .6); }
.w-week { display: grid; grid-template-columns: repeat(7, 1fr); margin: auto 0 0; padding: 0; list-style: none; text-align: center; font-size: 11px; }
.w-week small { display: block; font-size: 9px; color: var(--ios-label2); }
.w-week span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-weight: 500; }
.w-week .is-today span { background: #ff3b30; color: #fff; }
.w-title { font-size: 13px; font-weight: 600; color: var(--ios-tint); margin-bottom: 2px; }
.w-stat { font-size: 12px; color: var(--ios-label2); line-height: 1.15; }
.w-stat b { display: block; font-size: 24px; line-height: 1.05; font-weight: 600; color: inherit; }
body:not(.dark-desktop) .w-stat b { color: #000; } body.dark-desktop .w-stat b { color: #fff; }
.ios-glance { cursor: pointer; } .ios-glance .w-stat { display: flex; align-items: baseline; gap: 5px; } .ios-glance .w-stat b { display: inline; font-size: 21px; }
.ios-building div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.ios-work { grid-column: 1 / -1; grid-row: 3; height: auto; margin-top: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ios-work .w-open { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.ios-work .w-open i { width: 9px; height: 9px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 3px rgba(48, 209, 88, .25); flex: none; }
.ios-work small { display: block; font-size: 12px; color: var(--ios-label2); }
.ios-work > div { display: flex; gap: 8px; margin-top: 8px; }
.ios-work button, .ios-work a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px; border: 0; border-radius: 14px; background: rgba(120, 120, 128, .16); color: var(--ios-tint); font: 600 14px var(--ios-font); text-decoration: none; }
.ios-work .is-primary { background: var(--ios-tint); color: #fff; }
.ios-building button { min-height: 44px; padding: 8px 10px; border: 0; border-radius: 14px; background: var(--ios-fill); color: inherit; text-align: left; }
body:not(.dark-desktop) .ios-building button { background: rgba(120, 120, 128, .14); }
.ios-building b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-building small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 10px; line-height: 1.25; color: var(--ios-label2); }

.ios-grid { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, 1fr); row-gap: clamp(10px, 2.4svh, 22px); margin-top: clamp(14px, 3svh, 26px); }
.ios-app { display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; color: #fff; text-decoration: none; font-family: var(--ios-font); border-radius: 16px; }
.ios-app:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.ios-icon {
  position: relative; width: var(--ios-ic); height: var(--ios-ic); border-radius: calc(var(--ios-ic) * .225); display: grid; place-items: center; overflow: hidden; color: #fff;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 3px 10px rgba(0, 12, 40, .3), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .18s var(--lg-ease, ease), filter .18s;
}
.ios-icon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(165deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 48%); pointer-events: none; }
.ios-icon > img { max-width: 70%; max-height: 70%; object-fit: contain; }
.ios-icon > svg { width: 55%; height: 55%; }
.ios-app:active .ios-icon { transform: scale(.9); filter: brightness(.8); }
.ios-i-cert { background: linear-gradient(160deg, #5db4ff, #0a63e0); }
.ios-i-proj { background: linear-gradient(160deg, #9a7bff, #5b3fd6); }
.ios-i-help { background: linear-gradient(160deg, #ffe066, #ffb400); color: #5a3b00; }
.ios-i-work { background: linear-gradient(160deg, #3a4f86, #17234a); }
.ios-i-about { background: #dde7f7; }
.ios-i-about .avatar { width: 100%; height: 100%; border-radius: 0; font-size: 22px; }
.ios-i-about .avatar img { width: 100%; height: 100%; object-fit: cover; }
.ios-icon.dock-game-local { background: linear-gradient(160deg, #3f9b79, #1e5a43); }
.ios-label { margin-top: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.2; font-weight: 500; text-shadow: 0 1px 3px rgba(0, 10, 30, .5); }

.ios-bottom { position: absolute; left: 14px; right: 14px; bottom: calc(var(--ios-bot) + 24px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ios-search {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 18px; border: 0; border-radius: 18px; color: #fff; font: 500 14px var(--ios-font);
  background: rgba(120, 120, 128, .34); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .4);
}
.ios-search svg { width: 14px; height: 14px; opacity: .85; }
.ios-dock {
  box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; padding: 14px 16px; border-radius: 34px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .12)); -webkit-backdrop-filter: blur(30px) saturate(1.9) brightness(1.06); backdrop-filter: blur(30px) saturate(1.9) brightness(1.06);
  box-shadow: var(--lg-rim, inset 0 1px 0 rgba(255, 255, 255, .6)), 0 12px 32px rgba(0, 12, 40, .28);
}
body.dark-desktop .ios-dock { background: linear-gradient(160deg, rgba(60, 60, 66, .5), rgba(30, 30, 34, .4)); }
@media (max-height: 700px) { body.ios-mode { --ios-ic: 54px; } .ios-building, .ios-work { display: none; } .ios-dock { padding: 11px 14px; border-radius: 30px; } }
@media (max-height: 640px) {
  body.ios-mode { --ios-ic: 50px; } .w-week, .w-month { display: none; } .w-date { font-size: 38px; } .ios-widget { padding: 10px 12px; }
  .w-stat b, .ios-glance .w-stat b { font-size: 17px; } .ios-bottom { bottom: calc(var(--ios-bot) + 18px); gap: 8px; } .ios-search { height: 30px; }
}

/* ---------- Control Centre sheet ---------- */
.ios-scrim { position: absolute; inset: 0; z-index: 4900; background: rgba(0, 0, 0, .34); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); opacity: 0; pointer-events: none; transition: opacity .3s; touch-action: none; }
body.ios-cc-open .ios-scrim { opacity: 1; pointer-events: auto; }
body.ios-mode #appearance-panel.control-centre {
  position: fixed; top: calc(var(--ios-sb) - 6px); left: 12px; right: 12px; width: auto; max-height: calc(100svh - var(--ios-sb) - 16px); padding: 12px; gap: 10px; z-index: 5000;
  border-radius: 38px; transform-origin: 50% 0; -webkit-backdrop-filter: blur(44px) saturate(1.8); backdrop-filter: blur(44px) saturate(1.8); touch-action: pan-y; overscroll-behavior: contain;
}
body.ios-mode #appearance-panel.control-centre[hidden] { transform: translateY(-36px) scale(.94); }
body.ios-mode .control-centre .cc-module { border-radius: 26px; padding: 14px 16px; }
body.ios-mode .control-centre .cc-connect { padding: 0; background: none; box-shadow: none; grid-template-columns: 1fr 1fr; gap: 10px; }
body.ios-mode .control-centre .cc-toggle { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 96px; padding: 14px; border-radius: 26px; background: var(--cc-module); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
body.ios-mode .control-centre .cc-toggle[aria-pressed="true"] { background: var(--cc-module); }
body.ios-mode .control-centre .cc-circle { width: 44px; height: 44px; }
body.ios-mode .control-centre .cc-text b { font-size: 14px; } body.ios-mode .control-centre .cc-text small { font-size: 12px; }
body.ios-mode .control-centre .cc-slider { height: 44px; } body.ios-mode .control-centre .cc-slide label { font-size: 13px; }
body.ios-mode .control-centre .cc-tile, body.ios-mode .control-centre .cc-swatches button { min-height: 52px; border-radius: 22px; }

/* ---------- Notification banner + Spotlight ---------- */
body.ios-mode .notif-stack { top: calc(env(safe-area-inset-top, 0px) + 56px); left: 12px; right: 12px; width: auto; z-index: 9000; }
body.ios-mode .notif { padding: 13px 40px 13px 14px; border-radius: 28px; transform: translateY(-150%) scale(.9); transform-origin: 50% 0; }
body.ios-mode .notif.is-in { transform: none; }
body.ios-mode .notif.is-out { transform: translateY(-150%) scale(.9); opacity: 0; }
body.ios-mode .notif-icon { width: 38px; height: 38px; border-radius: 10px; }
body.ios-mode .notif-text strong { font-size: 15px; } body.ios-mode .notif-body { font-size: 14px; }
body.ios-mode .spotlight::backdrop { background: rgba(0, 0, 0, .3); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
body.ios-mode .spotlight .sl-stage { top: calc(env(safe-area-inset-top, 0px) + 14px); width: calc(100vw - 24px); }
body.ios-mode .spotlight .sl-bar { height: 46px; border-radius: 23px; background: rgba(255, 255, 255, .72); }
body.dark-desktop.ios-mode .spotlight .sl-bar { background: rgba(60, 60, 66, .72); }
body.ios-mode .spotlight .sl-bar input { font-size: 17px; }
body.ios-mode .spotlight .sl-card { border-radius: 26px; }
body.ios-mode .spotlight #spotlight-results { max-height: calc(100svh - 120px); }

/* ---------- Motion + accessibility ---------- */
body.motion-reduced .ios-island, body.motion-reduced .ios-scrim, body.motion-reduced .ios-home { transition: none; }
body.motion-reduced .ios-unlock svg, body.motion-reduced .isl-wave i { animation: none; }
@media (prefers-reduced-motion: reduce) { .ios-island, .ios-scrim, .ios-home { transition: none; } .ios-unlock svg, .isl-wave i { animation: none; } }
@media (prefers-reduced-transparency: reduce) {
  .ios-widget, .ios-dock, .ios-search, #appearance-panel.control-centre { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  body.ios-mode .ios-widget { background: #f4f4f8; } body.ios-mode.dark-desktop .ios-widget { background: #2a2a2e; }
}
body.ios-mode.ios-peek .ios-home[inert] { opacity: 1; transition-delay: 0s; }
body.dark-desktop .w-title { color: #4aa8ff; }

/* ---------- catalog icons + home folders ---------- */
.ios-icon.ios-icon-os { overflow: visible; background: none; box-shadow: none; }
.ios-icon.ios-icon-os::after { display: none; }
.ios-icon-os .osapp-icon { width: 100% !important; height: 100% !important; font-size: calc(var(--ios-ic) * .5); }
.ios-icon.dock-github { background: #1b1f24; } .ios-icon.dock-linkedin { background: #0a66c2; } .ios-icon.dock-youtube { background: #fff; }
.ios-folder-icon {
  background: linear-gradient(160deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .26)); -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .35), 0 3px 10px rgba(0, 12, 40, .28), inset 0 1px 0 rgba(255, 255, 255, .6);
}
body.dark-desktop .ios-folder-icon { background: linear-gradient(160deg, rgba(120, 120, 130, .5), rgba(60, 60, 68, .4)); }
.ios-folder-icon::after { display: none; }
.ios-folder-mini { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 3.5px; width: 100%; height: 100%; padding: 6.5px; box-sizing: border-box; }
.ios-mini { display: block; min-width: 0; min-height: 0; border-radius: 24%; overflow: hidden; font-size: 8px; }
.ios-mini > * { display: block; width: 100% !important; height: 100% !important; border-radius: inherit; }
.ios-mini .osapp-icon { font-size: 8px; }
.ios-mini-link { display: grid; place-items: center; }
.ios-mini-link img { max-width: 70%; max-height: 70%; }
.ios-mini-link.dock-github { background: #1b1f24; } .ios-mini-link.dock-linkedin { background: #0a66c2; } .ios-mini-link.dock-youtube { background: #fff; }

/* ---------- folder overlay ---------- */
.ios-folder { display: none; }
body.ios-mode .ios-folder {
  position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; box-sizing: border-box;
  padding: calc(var(--ios-sb) + 4px) 16px calc(var(--ios-bot) + 56px); font-family: var(--ios-font); touch-action: none;
}
.ios-folder-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .3); -webkit-backdrop-filter: blur(28px) saturate(1.5); backdrop-filter: blur(28px) saturate(1.5); opacity: 0; transition: opacity .3s; }
.ios-folder.is-open .ios-folder-back { opacity: 1; }
.ios-folder-title { position: relative; margin: 0; max-width: 100%; color: #fff; font: 600 30px/1.15 var(--ios-font); letter-spacing: .01em; text-align: center; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.ios-folder-panel {
  position: relative; width: 100%; max-height: min(520px, calc(100svh - var(--ios-sb) - var(--ios-bot) - 150px)); box-sizing: border-box; padding: 24px 12px 18px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none;
  border-radius: 40px; background: linear-gradient(160deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .24)); -webkit-backdrop-filter: blur(44px) saturate(1.8); backdrop-filter: blur(44px) saturate(1.8);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .4), 0 24px 60px rgba(0, 12, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
}
body.dark-desktop .ios-folder-panel { background: linear-gradient(160deg, rgba(90, 90, 98, .55), rgba(44, 44, 50, .5)); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .14), 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .16); }
.ios-folder-panel::-webkit-scrollbar { display: none; }
.ios-folder-grid { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 20px; justify-items: center; }
.ios-folder-grid .ios-app { width: 100%; padding: 2px 4px; }
.ios-folder-grid .ios-label { white-space: normal; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 92px; }
@media (max-height: 640px) { .ios-folder-title { font-size: 24px; } .ios-folder-panel { padding: 16px 8px 12px; } .ios-folder-grid { row-gap: 12px; } }
body.motion-reduced .ios-folder-back { transition: none; }
@media (prefers-reduced-motion: reduce) { .ios-folder-back { transition: none; } }
@media (prefers-reduced-transparency: reduce) {
  .ios-folder-back, .ios-folder-panel, .ios-folder-icon { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  body.ios-mode .ios-folder-panel { background: #e9e9ee; } body.ios-mode.dark-desktop .ios-folder-panel { background: #2a2a2e; }
}

/* Folder previews always lay out a 3×3 grid of square minis, even with fewer apps. */
.ios-folder-mini { grid-template-rows: repeat(3, 1fr); grid-auto-rows: 0; align-content: start; }
.ios-mini { aspect-ratio: 1; }
/* Long app names truncate inside their own column instead of overlapping neighbours. */
.ios-grid > *, .ios-grid .ios-app { min-width: 0; }
.ios-grid .ios-label { width: 100%; text-align: center; }
/* LinkedIn's mark is itself a blue tile: show it on white so the "in" stays legible at mini size. */
.ios-mini-link.dock-linkedin { background: #fff; }
.ios-mini-link.dock-linkedin img { max-width: 82%; max-height: 82%; }
.ios-icon.dock-behance, .ios-mini-link.dock-behance { background: #1769ff; }
.ios-mini-link.dock-behance img { max-width: 100%; max-height: 100%; }
