/* Moa — the desk: repositories as folders on a desktop (js/desk.js).
   Same tokens, type and curves as the album view; windows float over a soft desktop. */
.desk { --isz: 1; --panel-w: 0px; --folder: #4f9cf5; --folder-dk: #3a86e6; position: relative; min-height: 100svh; background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 7%, var(--canvas)) 0%, var(--canvas) 55%, color-mix(in srgb, var(--primary) 5%, var(--canvas)) 100%); color: var(--ink); -webkit-user-select: none; user-select: none; }
.desk[hidden] { display: none; }
body.desk-on { overscroll-behavior: none; }
.desk.busy { cursor: progress; }
.desk.panel-open { --panel-w: 360px; }
.desk svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* top bar */
.dk-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: calc(10px + var(--safe-t)) 18px 10px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.dk-back { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 12px 0 6px; border-radius: 9999px; color: var(--primary); font-size: 15px; font-weight: 600; max-width: 220px; transition: background-color 140ms ease; }
.dk-back[hidden] { display: none; }
.dk-back:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.dk-back svg { width: 20px; height: 20px; flex: none; stroke-width: 2.2; }
.dk-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-title { margin: 0; font: 700 22px/1.1 var(--font-display); letter-spacing: -.02em; }
.dk-mode { display: inline-flex; padding: 3px; border-radius: 9999px; background: var(--chip); }
.dk-mode button { padding: 6px 14px; border-radius: 9999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background-color 160ms ease, color 160ms ease; }
.dk-mode button.on { background: var(--canvas); color: var(--ink); box-shadow: var(--shadow-sm); }
.dk-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dk-tb, .dk-wb { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); transition: background-color 140ms ease, transform 140ms var(--ease-out); }
.dk-tb:hover, .dk-wb:hover { background: var(--chip); }
.dk-tb:active, .dk-wb:active { transform: scale(.94); }
.dk-tb svg, .dk-wb svg { width: 19px; height: 19px; }
.dk-wb[disabled], .dk-tb[disabled] { opacity: .3; pointer-events: none; }
.dk-wb.close:hover { background: #e5484d; color: #fff; }
.dk-seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--chip); }
.dk-seg[hidden] { display: none; }
.dk-seg button { width: 32px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.dk-seg button svg { width: 17px; height: 17px; }
.dk-seg button.on { background: var(--canvas); color: var(--ink); box-shadow: var(--shadow-sm); }
.dk-search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--field, var(--chip)); color: var(--muted); }
.dk-search svg { width: 16px; height: 16px; flex: none; }
.dk-search input { width: 180px; border: 0; background: none; outline: none; font: inherit; font-size: 14px; color: var(--ink); -webkit-user-select: text; user-select: text; }
.dk-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--canvas); box-shadow: inset 0 0 0 1px var(--hairline); font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; text-decoration: none; transition: transform 140ms var(--ease-out), background-color 140ms ease; }
.dk-btn svg { width: 17px; height: 17px; }
.dk-btn:active { transform: scale(.97); }
.dk-btn.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 28%, transparent); }
.dk-btn.danger { color: var(--danger); }
.dk-btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.dk-btn[disabled] { opacity: .35; pointer-events: none; }
.dk-btn[hidden] { display: none; }

/* desktop */
.dk-desk { position: relative; min-height: calc(100svh - 64px); padding: 18px 18px calc(40px + var(--safe-b)); }
.dk-fixed { position: absolute; top: 18px; right: 18px; width: calc(108px * var(--isz)); }
.dk-fixed:empty { display: none; }
.dk-desk:has(.dk-fixed:not(:empty)) .dk-icons.as-grid { margin-right: calc(116px * var(--isz)); }
/* albums, then the other repositories: each a stack of icon columns from the left, like a desktop; windows open beside them */
.dk-icons.as-grid { display: flex; gap: 22px; align-items: flex-start; height: calc(100svh - 64px - 36px - var(--safe-t)); overflow-x: auto; }
.dk-sec { display: flex; flex-direction: column; height: 100%; flex: none; }
.dk-sech { margin: 0 0 6px; padding: 0 6px; font: 600 12px/1.4 var(--font); letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.dk-sech span { font-weight: 500; opacity: .8; }
.dk-sgrid { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, calc(112px * var(--isz))); grid-auto-columns: calc(108px * var(--isz)); gap: 4px; align-items: start; }
.as-list .dk-sech { padding: 14px 10px 4px; }
@media (max-width: 699px) {
  .dk-icons.as-grid { flex-direction: column; gap: 14px; height: auto; overflow: visible; }
  .dk-sec { height: auto; width: 100%; }
  .dk-sgrid { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(calc(96px * var(--isz)), 1fr)); }
}
.dk-note { color: var(--muted); font-size: 14px; padding: 12px 4px; grid-column: 1 / -1; }

/* an icon (desktop or window) */
.dk-it { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 12px; outline: none; cursor: default; transition: background-color 120ms ease; }
.dk-it:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.dk-it:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.dk-it.sel { background: color-mix(in srgb, var(--primary) 14%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 55%, transparent); }
.dk-it.drop-on, .dk-body.drop-on, .dk-crumbs .drop-on { outline: 2px dashed var(--primary); outline-offset: -2px; background: color-mix(in srgb, var(--primary) 10%, transparent); }
.dk-ic { position: relative; width: calc(56px * var(--isz)); height: calc(52px * var(--isz)); display: grid; place-items: center; }
.dk-nm { max-width: 100%; font-size: 13px; line-height: 1.25; text-align: center; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dk-it.sel .dk-nm { color: var(--ink); font-weight: 600; }
.ic-folder { width: 100%; height: 100%; stroke: none !important; filter: drop-shadow(0 2px 3px rgba(20, 60, 120, .18)); }
.ic-folder .back { fill: var(--folder-dk); }
.ic-folder .front { fill: var(--folder); }
.dk-it:hover .ic-folder .front, .dk-it.drop-on .ic-folder .front { fill: color-mix(in srgb, var(--folder) 88%, #fff); }
.ic-file { height: 100%; width: auto; stroke: none !important; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .12)); }
.ic-file .paper { fill: var(--canvas); stroke: var(--chip-strong) !important; stroke-width: 1.4 !important; }
.ic-file .fold { fill: var(--chip); stroke: var(--chip-strong) !important; stroke-width: 1.4 !important; }
.ic-file text { font: 700 9.5px var(--font); fill: #fff; letter-spacing: .02em; }
.ic-trash { height: 88%; width: auto; color: color-mix(in srgb, var(--ink-2) 80%, transparent); stroke-width: 2 !important; filter: drop-shadow(0 2px 3px rgba(20, 60, 120, .12)); }
.ic-trash .can { fill: color-mix(in srgb, var(--canvas) 70%, var(--chip)); }
.ic-trash .ribs, .ic-trash .paper { stroke-width: 1.7; opacity: .7; }
.ic-trash.full .can { fill: color-mix(in srgb, var(--primary) 10%, var(--canvas)); }
.dk-count { position: absolute; top: 0; right: calc(50% - 26px * var(--isz)); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9999px; background: var(--danger); color: #fff; font: 700 11px/18px var(--font); font-style: normal; text-align: center; }
.dk-badges { position: absolute; right: 2px; bottom: 2px; display: flex; gap: 2px; }
.b-lock { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--canvas); color: var(--ink-2); display: grid; place-items: center; box-shadow: var(--shadow-sm); font-style: normal; }
.dk-badges .b-lock { position: static; }
.b-lock svg { width: 12px; height: 12px; stroke-width: 2.2; }
.dk-sub { width: 70%; height: 70%; display: grid; place-items: center; border-radius: 12px; background: var(--chip); color: var(--ink-2); }
.dk-sub svg { width: 55%; height: 55%; }

/* pictures render as themselves */
.dk-thumb { position: absolute; inset: 0; display: block; border-radius: calc(8px * var(--isz)); overflow: hidden; pointer-events: none; }
.dk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; animation: dk-fade 240ms ease both; }
.dk-ic.has-img > .ic-file { visibility: hidden; }
.dk-ic.has-img .dk-thumb { background: var(--tile-bg); box-shadow: 0 0 0 1px var(--hairline), 0 2px 6px rgba(0, 0, 0, .12); }
.dk-it .dk-ic:has(.dk-thumb) { height: calc(56px * var(--isz)); width: calc(56px * var(--isz)); }
.dk-play { position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin: -6px 0 0 -4px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); z-index: 1; }
@keyframes dk-fade { from { opacity: 0; } }

/* a Moa album on the desktop: its cover, or a photo tile */
.dk-album { position: relative; width: calc(52px * var(--isz)); height: calc(52px * var(--isz)); border-radius: calc(13px * var(--isz)); overflow: hidden; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #ff9f0a, #ff375f 55%, #0a84ff); box-shadow: 0 3px 10px rgba(0, 0, 0, .18), inset 0 0 0 1px rgba(255, 255, 255, .25); }
.dk-album svg { width: 50%; height: 50%; stroke-width: 2; }
.dk-album img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: dk-fade 240ms ease both; }
.dk-album.sealed { background: linear-gradient(140deg, #3a3a3c, #1c1c1e); }

/* list views */
.as-list, .dk-list { display: flex; flex-direction: column; }
.as-list .dk-it, .dk-list .dk-it, .dk-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 120px 130px; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; text-align: left; flex-direction: row; }
.dk-list .dk-it, .dk-list .dk-row { grid-template-columns: minmax(0, 1fr) 90px 90px; }
.dk-list.search-list .dk-it, .dk-list.search-list .dk-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px; }
.dk-list.trash-list .dk-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 140px auto; }
.dk-row.head { font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--hairline); border-radius: 0; padding-top: 2px; }
.as-list .dk-it .dk-ic, .dk-list .dk-it .dk-ic { position: absolute; left: 8px; width: 24px; height: 22px; }
.as-list .dk-it .dk-ic:has(.dk-thumb), .dk-list .dk-it .dk-ic:has(.dk-thumb) { width: 24px; height: 24px; }
.as-list .dk-it .dk-nm, .dk-list .dk-it .dk-nm { padding-left: 32px; text-align: left; -webkit-line-clamp: 1; font-size: 14px; }
.as-list .b-lock, .dk-list .b-lock, .as-list .dk-count { display: none; }
.as-list .dk-album { width: 24px; height: 24px; border-radius: 6px; }
.as-list .dk-album svg { width: 60%; height: 60%; }
.dk-c { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-row .nm { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-row .acts { display: flex; gap: 6px; }
.dday { font-style: normal; font-weight: 600; color: var(--warn, #9a6200); }

/* windows */
.dk-wins { position: fixed; inset: 0; z-index: 30; pointer-events: none; isolation: isolate; }
.dk-win { position: absolute; pointer-events: auto; display: flex; flex-direction: column; min-width: 380px; min-height: 240px; border-radius: 14px; background: var(--canvas); box-shadow: 0 16px 40px -14px rgba(20, 30, 60, .3), 0 0 0 1px var(--hairline); overflow: hidden; transition: box-shadow 160ms ease; }
.dk-win.front { box-shadow: 0 26px 64px -12px rgba(20, 30, 60, .42), 0 0 0 1px color-mix(in srgb, var(--primary) 25%, var(--hairline)); }
.dk-win.max { border-radius: 12px; transition: left 220ms var(--ease-drawer), top 220ms var(--ease-drawer), width 220ms var(--ease-drawer), height 220ms var(--ease-drawer); }
.dk-wh { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 8px; border-bottom: 1px solid var(--hairline); background: color-mix(in srgb, var(--card) 70%, var(--canvas)); cursor: grab; }
.dk-win.front .dk-wh { background: var(--card); }
.dk-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow: hidden; white-space: nowrap; font-size: 14px; }
.dk-crumbs button { padding: 4px 6px; border-radius: 6px; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.dk-crumbs button:last-child { color: var(--ink); font-weight: 700; }
.dk-crumbs button:hover { background: var(--chip); }
.dk-crumbs i { color: var(--muted); font-style: normal; }
.dk-crumbs b { padding: 0 6px; }
.dk-wtools { display: flex; align-items: center; gap: 6px; }
.dk-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 0; outline: none; }
/* fixed-width cells (they don't stretch with the window), a little air between, and room below the last row */
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, calc(104px * var(--isz))); justify-content: start; gap: 8px 10px; align-content: start; min-height: 100%; padding-bottom: 40px; }
.dk-list, .dk-photos { padding-bottom: 40px; }
.dk-body > .dk-list, .dk-body > .dk-empty { min-height: 100%; }
.dk-empty { min-height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.dk-wf { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--muted); }
.dk-wf .dk-btn { margin-left: auto; }
.chip-s { display: inline-flex; padding: 2px 8px; border-radius: 9999px; background: var(--chip); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.chip-s.warn { background: color-mix(in srgb, #ff9f0a 18%, transparent); color: #9a5b00; }
.rs { position: absolute; z-index: 2; }
.rs-e { top: 0; right: 0; bottom: 10px; width: 6px; cursor: ew-resize; }
.rs-s { left: 0; right: 10px; bottom: 0; height: 6px; cursor: ns-resize; }
.rs-se { right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.dk-win.max .rs { display: none; }

/* photo grid in a window */
.dk-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(110px * var(--isz)), 1fr)); gap: 3px; }
.dk-ph { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--tile-bg); transition: transform 140ms var(--ease-out); }
.dk-ph:active { transform: scale(.97); }
.dk-ph .dk-thumb { border-radius: 0; }

/* side panel */
.dk-panel { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: 360px; overflow: auto; padding: calc(16px + var(--safe-t)) 18px calc(24px + var(--safe-b)); background: var(--canvas); box-shadow: -10px 0 30px rgba(0, 0, 0, .1); border-left: 1px solid var(--hairline); -webkit-user-select: text; user-select: text; animation: dk-panel-in 260ms var(--ease-drawer) both; }
.dk-panel[hidden] { display: none; }
@keyframes dk-panel-in { from { transform: translateX(24px); opacity: 0; } }
.dk-panel header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.dk-panel header b { flex: 1; min-width: 0; font-size: 17px; line-height: 1.3; word-break: break-word; }
.dk-pname[data-p] { cursor: text; border-radius: 6px; }
.dk-pname[data-p]:hover { background: var(--chip); }
.dk-rename { width: 100%; font: inherit; font-size: 15px; padding: 4px 8px; border-radius: 8px; border: 1.5px solid var(--primary); background: var(--canvas); color: var(--ink); outline: none; -webkit-user-select: text; user-select: text; }
.dk-pprev { margin: 0 0 12px; border-radius: 12px; overflow: hidden; background: var(--tile-bg); min-height: 120px; display: grid; place-items: center; }
.dk-pprev img, .dk-pprev video { width: 100%; max-height: 280px; object-fit: contain; display: block; }
.dk-pacts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dk-kv { display: grid; grid-template-columns: 76px 1fr; gap: 8px 10px; margin: 0 0 14px; font-size: 13.5px; }
.dk-kv dt { color: var(--muted); }
.dk-kv dd { margin: 0; word-break: break-word; }
.dk-kv dd small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.dk-names { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.dk-panel .chip-s { margin-top: 10px; }

/* transfers */
.dk-xfer { position: fixed; z-index: 70; right: 16px; bottom: calc(16px + var(--safe-b)); width: min(340px, calc(100vw - 32px)); padding: 10px 12px; border-radius: 16px; background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-edge); }
.dk-xfer[hidden] { display: none; }
.dk-xfer header { display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.dk-xrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.dk-xrow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-xrow .st { color: var(--muted); font-variant-numeric: tabular-nums; }
.dk-xrow.ok .st { color: var(--ok); font-weight: 600; } .dk-xrow.fail .st { color: var(--danger); font-weight: 600; }
.dk-xrow .bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--chip-strong); overflow: hidden; }
.dk-xrow .bar i { display: block; height: 100%; background: var(--primary); transform-origin: left; transition: transform 240ms var(--ease-out); }
.dk-xrow.ok .bar i { background: var(--ok); }

/* menu, hint, lasso, drag ghost */
.dk-menu { position: fixed; z-index: 90; min-width: 200px; padding: 5px; border-radius: 12px; background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-edge); transform-origin: top left; }
.dk-menu[hidden] { display: none; }
.dk-menu button { width: 100%; display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 7px; font-size: 14px; text-align: left; color: var(--ink); }
.dk-menu button:hover:not([disabled]), .dk-menu button:focus-visible { background: var(--primary); color: #fff; outline: none; }
.dk-menu button[disabled] { opacity: .35; }
.dk-menu button.danger { color: var(--danger); }
.dk-menu button.danger:hover:not([disabled]) { background: var(--danger); color: #fff; }
.dk-menu .ck { width: 16px; font-style: normal; font-size: 12px; }
.dk-menu hr { border: 0; height: 1px; background: var(--hairline); margin: 4px 6px; }
.dk-hint { position: fixed; z-index: 80; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); padding: 9px 16px; border-radius: 9999px; background: rgba(29, 29, 31, .9); color: #fff; font-size: 14px; pointer-events: none; }
.dk-hint[hidden] { display: none; }
.dk-lasso { position: fixed; z-index: 85; border: 1px solid var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); border-radius: 3px; pointer-events: none; }
.dk-lasso[hidden] { display: none; }
.dk-ghost { position: fixed; z-index: 95; left: 0; top: 0; width: 56px; height: 56px; pointer-events: none; opacity: .85; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .25)); }
.dk-ghost .dk-ic { width: 56px; height: 52px; }
.dk-ghost .dk-count { right: -6px; top: -6px; }
.desk.dragging, .desk.dragging * { cursor: grabbing !important; }

/* picture viewer */
.dk-lb { position: fixed; inset: 0; z-index: 105; background: rgba(0, 0, 0, .94); color: #f5f5f7; display: flex; flex-direction: column; }
.dk-lb header { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 12px 10px 18px; }
.dk-lb header .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.dk-lb header .n { color: #aeaeb2; font-size: 13px; font-variant-numeric: tabular-nums; }
.dk-lb .dk-wb { color: #f5f5f7; }
.dk-lb .dk-wb:hover { background: rgba(255, 255, 255, .12); }
.dk-lb .stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 8px calc(16px + var(--safe-b)); }
.dk-lb .stage img, .dk-lb .stage video { max-width: 100%; max-height: 100%; object-fit: contain; animation: dk-fade 200ms ease both; }
.dk-lb .nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 28px; line-height: 1; display: grid; place-items: center; }
.dk-lb .nav[hidden] { display: none; }
.dk-lb .prev { left: 14px; } .dk-lb .next { right: 14px; }
.dk-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sheets the desk opens */
.dk-text { max-height: 60vh; overflow: auto; padding: 12px 14px; border-radius: 12px; background: var(--card); font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }
.dk-pick { display: grid; max-height: 50vh; overflow: auto; margin-bottom: 12px; }
.dk-pick .pk-ic { width: 26px; height: 22px; display: inline-grid; margin-right: 8px; }
.dk-pick .pk-ic svg { width: 100%; height: 100%; }

/* narrow screens: windows fill the screen, the panel comes up from below */
@media (max-width: 899px) {
  .desk.panel-open { --panel-w: 0px; }
  .dk-panel { top: auto; left: 0; width: auto; max-height: 70vh; border-left: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .15); animation-name: dk-panel-up; }
  @keyframes dk-panel-up { from { transform: translateY(30px); opacity: 0; } }
  .dk-search input { width: 120px; }
}
@media (max-width: 699px) {
  .dk-top { gap: 8px; padding: calc(8px + var(--safe-t)) 12px 8px; }
  .dk-title { display: none; }
  .dk-tools { width: 100%; margin: 0; }
  .dk-search { flex: 1; } .dk-search input { width: 100%; }
  .dk-btn span { display: none; }
  .dk-btn { padding: 0 10px; }
  .dk-tb[data-dk^=zoom] { display: none; }
  .dk-desk { padding: 12px 10px calc(30px + var(--safe-b)); }
  .dk-wins { z-index: 50; } /* a window fills the phone, top bar included */
  .dk-win { left: 0 !important; top: 0 !important; width: 100vw !important; height: 100dvh !important; min-width: 0; border-radius: 0; padding-top: var(--safe-t); }
  .dk-win .max, .dk-win .rs { display: none; }
  .dk-wh { cursor: default; }
  .dk-wtools .dk-btn span { display: none; }
  .as-list .dk-it, .as-list .dk-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .as-list .dk-c.owner, .as-list .dk-c.date, .as-list .dk-row span:nth-child(2), .as-list .dk-row span:nth-child(4) { display: none; }
  .dk-list.search-list .dk-it, .dk-list.trash-list .dk-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dk-list.search-list .dk-c:last-child, .dk-list.trash-list .dk-c { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dk-panel, .dk-thumb img, .dk-album img, .dk-lb .stage img { animation: none; }
  .dk-win.max { transition: none; }
}

/* the album list's switch to the desk */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 16px; }
.home-head h1 { margin: 0; }
.home-head .dk-mode { flex: none; }
/* the album list's row for the repositories that aren't albums */
.album-dot.repos { display: grid; place-items: center; background: color-mix(in srgb, #4f9cf5 16%, var(--card)); color: #3a86e6; }
.album-dot.repos::after { display: none; }
.album-dot.repos svg { width: 20px; height: 20px; }
