/* Meaningful — Artists as a macOS Finder window (Tahoe / Liquid Glass).
   Sidebar + toolbar are the functional layer (glass); files are content.
   iPhone gets the Files app: full screen, large title, grid. Dark. */

:root {
  --label: #fff; --label-2: rgba(235, 235, 245, 0.62); --label-3: rgba(235, 235, 245, 0.32);
  --sep: rgba(84, 84, 88, 0.55); --tint: #0a84ff; --sel: #0a5fd1;
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1); --smooth: cubic-bezier(0.32, 0.72, 0, 1);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { background: #000; color: var(--label); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100svh; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, sans-serif; font-size: 13px; letter-spacing: -0.006em; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: default; }
a { color: inherit; }
svg { display: block; }
.hx { position: fixed; left: -100px; top: -100px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Desktop picture */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #0b1a10 url(/media/roadmap-bg.jpg) center / cover no-repeat; }
.bg video { position: absolute; inset: -3%; width: 106%; height: 106%; object-fit: cover; filter: blur(10px) saturate(115%); }
.bg-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); }

/* Window */
.win {
  position: fixed; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(1200px, calc(100vw - 64px)); height: min(780px, calc(100svh - 64px));
  display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  border-radius: 26px; overflow: hidden; background: rgba(22, 22, 24, 0.86);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.16), 0 40px 120px rgba(0, 0, 0, 0.55), 0 12px 32px rgba(0, 0, 0, 0.35);
  animation: winIn 700ms var(--smooth) both;
}
@keyframes winIn { from { opacity: 0; transform: translate(-50%, -48%) scale(0.965); } }

/* Sidebar (Liquid Glass, inset) */
.side {
  margin: 10px 0 10px 10px; border-radius: 18px; padding: 14px 10px; overflow-y: auto;
  background: rgba(58, 58, 64, 0.42); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .side { background: #1c1c1e; } }
.lights { display: flex; gap: 8px; padding: 2px 6px 18px; }
.lights > * { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2); position: relative; }
.lights > :nth-child(2) { background: #febc2e; }
.lights > :nth-child(3) { background: #28c840; }
.lights:hover .l-close::after { content: "×"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; font-weight: 700; color: rgba(70, 0, 0, 0.75); }
.side-h { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; color: var(--label-3); }
.side-h:first-of-type { margin-top: 0; }
.side-item { width: 100%; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--label); text-decoration: none; text-align: left; transition: background-color 150ms; }
.side-item svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--tint); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-item img { width: 16px; height: 16px; object-fit: contain; flex: none; }
.side-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .count { font-style: normal; font-size: 12px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.side-item:hover { background: rgba(255, 255, 255, 0.06); }
.side-item.is-on { background: rgba(255, 255, 255, 0.14); }
.tag-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 0 3px; }

/* Main */
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 14px 0 16px; flex: none; }
.tb-nav { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(58, 58, 64, 0.5); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1); }
.tb-ic { width: 30px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--label); }
.tb-ic svg, .v-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tb-ic:disabled { color: var(--label-3); }
.tb-ic:not(:disabled):hover { background: rgba(255, 255, 255, 0.1); }
.tb-title { flex: 1; min-width: 0; }
.tb-title h1 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sub { margin: 1px 0 0; font-size: 11px; color: var(--label-2); }
.tb-tools { display: flex; align-items: center; gap: 10px; }
.views { display: flex; padding: 3px; border-radius: 999px; background: rgba(58, 58, 64, 0.5); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1); }
.v-btn { width: 34px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--label-2); transition: background-color 150ms, color 150ms; }
.v-btn.is-on { background: rgba(255, 255, 255, 0.16); color: var(--label); }
.search { position: relative; display: flex; align-items: center; width: 200px; height: 34px; border-radius: 999px; background: rgba(58, 58, 64, 0.5); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1); transition: box-shadow 200ms, width 300ms var(--smooth); }
.search:focus-within { box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.6); width: 240px; }
.search svg { position: absolute; left: 11px; width: 15px; height: 15px; fill: none; stroke: var(--label-2); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; height: 100%; border: 0; outline: 0; background: none; color: var(--label); font: inherit; font-size: 13px; padding: 0 12px 0 32px; caret-color: var(--tint); }
.search input::placeholder { color: var(--label-2); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.6); }

.content { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 18px; outline: none; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.intro { margin: 0 6px 14px; font-size: 12px; line-height: 1.45; color: var(--label-2); max-width: 80ch; }
.intro b { color: var(--label); font-weight: 600; }
.empty { margin: 60px 0; text-align: center; font-size: 13px; color: var(--label-2); }

/* Icon view */
.files[data-view="icons"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px 4px; align-content: start; }
.file { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 6px; border-radius: 10px; text-align: center; user-select: none; -webkit-user-select: none; opacity: 0; transform: translateY(10px) scale(0.96); animation: fileIn 520ms var(--spring) forwards; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes fileIn { to { opacity: 1; transform: none; } }
.file .thumb { position: relative; width: 92px; height: 92px; border-radius: 12px; padding: 4px; transition: background-color 120ms; }
.file .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; background: #2c2c2e; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 6px 16px rgba(0, 0, 0, 0.35); transition: transform 300ms var(--spring); }
.file:active .thumb img { transform: scale(0.95); }
.file .name { max-width: 112px; padding: 1px 6px; border-radius: 5px; font-size: 12px; line-height: 1.3; color: var(--label); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.file .meta { font-size: 11px; color: var(--label-3); max-width: 112px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file.is-sel .thumb { background: rgba(255, 255, 255, 0.14); }
.file.is-sel .name { background: var(--sel); color: #fff; }
.files:not(:focus-within) .file.is-sel .name { background: rgba(255, 255, 255, 0.2); }
.file .badge { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px #1c1c1e; }

/* List view */
.files[data-view="list"] { display: block; border-radius: 12px; overflow: hidden; }
.lhead, .lrow { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1fr) 90px; align-items: center; gap: 12px; padding: 0 12px; }
.lhead { height: 28px; font-size: 11px; font-weight: 600; color: var(--label-2); border-bottom: 0.5px solid var(--sep); position: sticky; top: -4px; background: rgba(22, 22, 24, 0.96); z-index: 1; }
.lrow { height: 34px; border-radius: 6px; font-size: 13px; user-select: none; -webkit-user-select: none; }
.lrow:nth-child(even) { background: rgba(255, 255, 255, 0.035); }
.lrow .n { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lrow .n img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; flex: none; background: #2c2c2e; }
.lrow .n span, .lrow .c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .c { color: var(--label-2); }
.lrow.is-sel { background: var(--sel) !important; }
.lrow.is-sel .c { color: rgba(255, 255, 255, 0.85); }

/* Gallery view */
.gallery { display: flex; flex-direction: column; height: calc(100% - 40px); min-height: 360px; }
.g-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 10px 20px 18px; }
.g-stage img { max-height: 100%; max-width: 52%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 24px 60px rgba(0, 0, 0, 0.5); animation: pop 420ms var(--spring); }
@keyframes pop { from { opacity: 0.4; transform: scale(0.96); } }
.g-meta { max-width: 320px; }
.g-meta h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.g-meta p { margin: 6px 0 0; font-size: 13px; color: var(--label-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.g-strip { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 8px 4px 4px; scrollbar-width: thin; }
.g-strip .gt { flex: none; width: 64px; height: 64px; border-radius: 10px; padding: 3px; }
.g-strip .gt img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; display: block; }
.g-strip .gt.is-sel { box-shadow: 0 0 0 2.5px var(--tint); }

/* Status / path bar */
.statusbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 30px; padding: 0 16px; border-top: 0.5px solid var(--sep); font-size: 11px; color: var(--label-2); }
.path { display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; }
.path img { width: 12px; height: 12px; object-fit: contain; }
.path i { font-style: normal; color: var(--label-3); }
.join a { color: var(--tint); text-decoration: none; font-weight: 600; }

/* Quick Look */
.ql-wrap { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; visibility: hidden; }
.ql-wrap.open { visibility: visible; }
.ql-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); opacity: 0; transition: opacity 260ms var(--smooth); }
.ql-wrap.open .ql-dim { opacity: 1; }
.ql {
  position: relative; width: min(820px, calc(100vw - 40px)); max-height: min(560px, calc(100svh - 40px)); display: flex; flex-direction: column;
  border-radius: 22px; overflow: hidden; background: rgba(36, 36, 40, 0.86); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.18), 0 40px 120px rgba(0, 0, 0, 0.6);
  transform: scale(0.9); opacity: 0; transition: transform 460ms var(--spring), opacity 220ms var(--smooth);
}
.ql-wrap.open .ql { transform: none; opacity: 1; }
.ql-bar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-bottom: 0.5px solid var(--sep); flex: none; }
.ql-close { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.1); }
.ql-close svg, .ql-nav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ql-title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-nav { display: flex; gap: 4px; }
.ql-nav button { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.1); }
.ql-nav button:disabled { opacity: 0.35; }
.ql-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; overflow: auto; }
.ql-photo { padding: 20px; display: flex; align-items: center; justify-content: center; }
.ql-photo img { width: 100%; max-width: 380px; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 20px 50px rgba(0, 0, 0, 0.45); background: #2c2c2e; }
.ql-info { padding: 26px 26px 26px 6px; overflow: auto; }
.ql-kind { margin: 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--label-3); }
.ql-info h2 { margin: 4px 0 2px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.ql-place { margin: 0 0 14px; font-size: 13px; color: var(--label-2); }
.ql-bio { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: rgba(235, 235, 245, 0.8); white-space: pre-line; }
.ql-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ql-links a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 13px; font-weight: 500; text-decoration: none; transition: background-color 150ms, transform 250ms var(--spring); }
.ql-links a:hover { background: rgba(255, 255, 255, 0.16); }
.ql-links a:active { transform: scale(0.95); }
.ql-links .ic { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.ql-links .ic svg { width: 13px; height: 13px; color: #fff; }

/* ── iPhone: the Files app ─────────────────────────────────────────────── */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .bg { display: none; }
  .win { left: 0; top: 0; width: 100vw; height: 100svh; transform: none; border-radius: 0; grid-template-columns: 1fr; background: #000; box-shadow: none; animation: none; }
  .side { display: none; }
  .toolbar { height: auto; flex-wrap: wrap; padding: calc(10px + var(--safe-t)) 16px 8px; gap: 10px; }
  .tb-nav { display: none; }
  .tb-title { flex: 1 1 100%; order: 1; }
  .tb-title h1 { font-size: 34px; letter-spacing: 0.01em; white-space: normal; }
  .tb-sub { font-size: 13px; }
  .tb-tools { order: 2; flex: 1 1 100%; }
  .search, .search:focus-within { flex: 1; width: auto; height: 36px; border-radius: 10px; background: rgba(118, 118, 128, 0.24); }
  .search input { font-size: 17px; }
  .views { order: 2; }
  .content { padding: 6px 12px calc(16px + var(--safe-b)); }
  .intro { font-size: 13px; }
  .files[data-view="icons"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 6px; }
  .file .thumb { width: 100%; height: auto; aspect-ratio: 1; }
  .file .name { font-size: 13px; }
  .lhead, .lrow { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
  .lhead > :nth-child(n+3), .lrow > :nth-child(n+3) { display: none; }
  .lrow { height: 48px; }
  .lrow .n img { width: 34px; height: 34px; border-radius: 8px; }
  .g-stage { flex-direction: column; gap: 14px; }
  .g-stage img { max-width: 80%; max-height: 52svh; }
  .statusbar { height: auto; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 16px calc(8px + var(--safe-b)); }
  .ql-wrap { align-items: flex-end; }
  .ql { width: 100%; max-height: calc(100svh - 30px - var(--safe-t)); border-radius: 22px 22px 0 0; transform: translateY(100%); opacity: 1; transition: transform 500ms var(--smooth); background: #1c1c1e; padding-bottom: var(--safe-b); }
  .ql-body { grid-template-columns: 1fr; }
  .ql-photo { padding: 16px 16px 0; }
  .ql-info { padding: 16px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .side, .tb-nav, .views, .search, .ql { background: #2c2c2e; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bg video { filter: blur(18px); }
}

[hidden] { display: none !important; }
.file:focus, .lrow:focus, .gt:focus { outline: none; }
.file:focus-visible .thumb, .lrow:focus-visible, .gt:focus-visible { box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.55); }
