/* DOPA on the web. The same black room as the app: white ink, no accent
   colour, the work is the only thing allowed to be loud. */
:root {
  --ground: #0a0a0b;
  --panel: #121214;
  --panel-2: #18181b;
  --ink: #ffffff;
  --dim: rgba(255, 255, 255, 0.55);
  --dimmer: rgba(255, 255, 255, 0.34);
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(18, 18, 20, 0.62);
  --alarm: #c4657c;
  --bar: 60px;
  --side: 380px;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; border-radius: 8px;
}
img { display: block; }
.dim { color: var(--dim); }
.dimmer { color: var(--dimmer); }
.label {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
}

/* ---------- bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 50;
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0.92), rgba(10, 10, 11, 0.55));
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand .mark { width: 24px; height: auto; }
.brand .word { height: 17px; width: auto; }
.tabs { display: flex; gap: 4px; }
.tab {
  padding: 7px 14px; border-radius: 999px; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
}
.tab[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.tab:hover { color: var(--ink); }
.search { position: relative; flex: 1; max-width: 340px; margin-left: auto; }
.search input {
  width: 100%; height: 36px; padding: 0 14px 0 36px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; font-size: 14px;
}
.search svg { position: absolute; left: 12px; top: 10px; width: 16px; height: 16px; opacity: 0.55; }
.results {
  position: absolute; top: 44px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.results a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.results a:hover, .results a.on { background: rgba(255, 255, 255, 0.07); }
.results .empty { padding: 10px; color: var(--dim); font-size: 13px; }
.me { display: flex; align-items: center; gap: 10px; flex: none; }
.pill {
  height: 36px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); font-size: 13px; white-space: nowrap;
}
.pill:hover { background: rgba(255, 255, 255, 0.12); }
.pill svg { width: 16px; height: 16px; flex: none; }
.pill.on svg path { fill: #fff; }
.pill.solid { background: var(--ink); color: #0a0a0b; border-color: var(--ink); font-weight: 600; }
.pill.solid:hover { background: #e9e7e2; }
.menu {
  position: absolute; top: 52px; right: 16px; min-width: 200px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); z-index: 60;
}
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, 0.07); }

.avatar { border-radius: 50%; object-fit: cover; background: var(--panel-2); flex: none; }
.avatar.ph { display: grid; place-items: center; color: var(--dim); font-weight: 600; }

main { padding-top: var(--bar); min-height: 100%; }

/* ---------- feed: one work at a time ---------- */
.feed { height: calc(100vh - var(--bar)); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; }
.slide {
  height: calc(100vh - var(--bar)); scroll-snap-align: start; scroll-snap-stop: always;
  position: relative; display: grid; grid-template-columns: 1fr auto; overflow: hidden;
}
.slide .stage { position: relative; min-width: 0; }
.slide .meta {
  position: absolute; left: 28px; bottom: 26px; right: 120px; max-width: 560px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.slide .acts {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 0 22px 26px 0; z-index: 2;
  position: absolute; right: 0; bottom: 0;
}
.who { display: flex; align-items: center; gap: 10px; }
.who .name { font-weight: 600; }
.who .handle { color: var(--dim); font-size: 13px; }
.caption { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.slide .caption { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.34); border: 1px solid rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.92); }
.when { font-size: 12px; color: var(--dim); margin-top: 8px; }
.act {
  width: 52px; min-height: 52px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 11px; padding: 8px 0;
}
.act svg { width: 22px; height: 22px; }
.act:hover { background: rgba(40, 40, 44, 0.8); }
.act.on svg path { fill: #fff; }
.end { height: calc(100vh - var(--bar)); scroll-snap-align: start; display: grid; place-items: center; text-align: center; color: var(--dim); padding: 20px; }

/* ---------- the work itself ---------- */
.work { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: var(--ground); }
.work .glow {
  position: absolute; inset: -10%; background-size: cover; background-position: center;
  filter: blur(60px) saturate(1.2); opacity: 0.35; transform: scale(1.1);
}
.work .frame { position: absolute; inset: 24px; display: grid; place-items: center; min-width: 0; min-height: 0; }
.work img.art, .work video.art {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; min-width: 0; min-height: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); user-select: none; -webkit-user-drag: none;
}
.work.zoomable img.art { cursor: zoom-in; }
.work.zoomed img.art { cursor: grab; box-shadow: none; }
.work img.art { transition: transform 0.25s ease; }
.work.dragging img.art { transition: none; }
.work.zoomed.dragging img.art { cursor: grabbing; }
/* 3D: the model takes the whole stage once it's drawn; its picture fades away. */
.work img.art.still { transition: opacity 0.45s ease; }
.work canvas.three { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; opacity: 0; transition: opacity 0.45s ease; cursor: grab; touch-action: none; }
.work canvas.three.in { opacity: 1; }
.work canvas.three:active { cursor: grabbing; }
.work:has(.cover) canvas.three { filter: blur(28px); }
.loadbar {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none;
  display: grid; gap: 10px; padding: 13px 18px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
}
.loadbar[hidden] { display: none; }
.lb-label { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.9); font-variant-numeric: tabular-nums; text-align: center; }
.lb-track { position: relative; width: 168px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.24); overflow: hidden; }
.lb-fill { position: absolute; inset: 0 auto 0 0; width: 2%; border-radius: 3px; background: #fff; transition: width 0.25s linear; }
.lb-fill.indeterminate { width: 30%; transition: none; animation: lb-sweep 0.9s ease-in-out infinite alternate; }
@keyframes lb-sweep { from { transform: translateX(0); } to { transform: translateX(233%); } }
@media (prefers-reduced-motion: reduce) { .lb-fill.indeterminate { animation: none; } }
.hint3d {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3; pointer-events: none; white-space: nowrap;
  font-size: 12px; color: rgba(255, 255, 255, 0.85); padding: 7px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: opacity 0.6s ease;
}
.hint3d.gone { opacity: 0; }
@media (max-width: 700px) { .hint3d { white-space: normal; text-align: center; width: calc(100% - 48px); } }
.badge {
  position: absolute; top: 18px; right: 18px; z-index: 3; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.cover {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; text-align: center;
  background: rgba(10, 10, 11, 0.35);
}
.cover p { margin: 0 0 12px; color: var(--dim); max-width: 300px; }
.blurred { filter: blur(26px); }

/* timeline: just a line */
.timeline { position: absolute; left: 32px; right: 32px; bottom: 18px; height: 22px; z-index: 3; cursor: pointer; }
.timeline::before, .timeline i {
  content: ""; position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px;
}
.timeline::before { right: 0; background: rgba(255, 255, 255, 0.3); }
.timeline i { background: #fff; width: 0; box-shadow: 0 0 6px rgba(0, 0, 0, 0.35); }
.slide .timeline { bottom: auto; top: 16px; }

.player {
  position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 3; width: min(520px, calc(100% - 48px));
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 999px; background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.player .play { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #0a0a0b; display: grid; place-items: center; flex: none; }
.player .play svg { width: 18px; height: 18px; }
.player .track { flex: 1; position: relative; height: 22px; cursor: pointer; }
.player .track::before, .player .track i { content: ""; position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; }
.player .track::before { right: 0; background: rgba(255, 255, 255, 0.25); }
.player .track i { background: #fff; width: 0; }
.player time { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.sound {
  position: absolute; right: 18px; bottom: 46px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.14);
}
.sound svg { width: 18px; height: 18px; }

/* ---------- a post on its own ---------- */
.post { display: grid; grid-template-columns: 1fr var(--side); height: calc(100vh - var(--bar)); }
.post .stage { position: relative; min-width: 0; }
.side { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.side .head { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.side .head .who { flex: 1; min-width: 0; }
.side .body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.side .stats { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.facts { margin-top: 14px; display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
.facts span { display: flex; gap: 8px; align-items: center; }
.notes { margin-top: 18px; display: grid; gap: 14px; }
.note { display: flex; gap: 10px; }
.note .text { font-size: 14px; }
.note .text b { font-weight: 600; margin-right: 6px; }
.note .t { font-size: 11px; color: var(--dimmer); margin-top: 2px; }
.write { padding: 12px 18px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.write textarea {
  flex: 1; resize: none; height: 40px; min-height: 40px; max-height: 120px; padding: 10px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; font-size: 14px;
}
.back {
  position: absolute; top: 16px; left: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.back svg { width: 18px; height: 18px; }

/* ---------- a post on its own: the whole screen, like the app ---------- */
/* Liquid glass: a clear, bright-edged pane that bends the work behind it. */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.09));
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px) saturate(1.8) brightness(1.05); -webkit-backdrop-filter: blur(22px) saturate(1.8) brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 0 -1px 0 rgba(255, 255, 255, 0.08),
              inset 0 0 18px rgba(255, 255, 255, 0.05), 0 12px 34px rgba(0, 0, 0, 0.38);
}
.post-full { position: fixed; inset: 0; z-index: 60; background: #000; overflow: hidden; }
.post-full .stage { position: absolute; inset: 0; }
.post-full .work { background: #000; }
.post-full .work .frame { inset: 0; }
.post-full .shade {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 16%, transparent 68%, rgba(0, 0, 0, 0.55));
}
.post-top { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 6; display: flex; align-items: center; gap: 12px; }
.post-top .back { position: static; flex: none; }
.post-top .who { min-width: 0; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65); }
.post-top .who .name, .post-top .who .handle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-top .pill { margin-left: 4px; }
.post-cap {
  position: absolute; left: 24px; bottom: 96px; z-index: 5; max-width: min(560px, calc(100% - 48px)); text-align: left;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7); cursor: pointer;
}
.post-cap .caption { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-full.kind-video .post-cap, .post-full.kind-audio .post-cap { bottom: 136px; }
.post-full.kind-audio .post-cap { bottom: 172px; }
.post-full .timeline { bottom: 92px; }
.post-full .player { bottom: 92px; }
.post-full .sound { bottom: 92px; }
.post-full .hint3d { bottom: 96px; }
.glassbar {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 999px; max-width: calc(100% - 24px);
}
.glassbar .pill { background: transparent; border-color: transparent; height: 44px; padding: 0 16px; font-size: 14px; }
.glassbar .pill:hover, .glassbar .pill.on { background: rgba(255, 255, 255, 0.14); }
.glassbar .pill svg { width: 20px; height: 20px; }
.drawer {
  position: absolute; top: 16px; right: 16px; bottom: 90px; width: min(380px, calc(100% - 32px)); z-index: 8;
  border-radius: 26px; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(160deg, rgba(20, 20, 22, 0.72), rgba(20, 20, 22, 0.58));
}
.drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px 18px; }
.drawer .x { width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--dim); }
.drawer .x:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 18px 14px; }
.drawer .write { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 10px 12px 12px; }
@media (max-width: 820px) {
  .post-top { top: 12px; left: 12px; right: 12px; }
  .post-cap { left: 16px; bottom: 84px; max-width: calc(100% - 32px); }
  .glassbar { bottom: 14px; }
  .glassbar .pill { padding: 0 12px; }
  .glassbar .app-link { display: none; }
  .drawer { left: 8px; right: 8px; width: auto; top: auto; bottom: 78px; height: 62vh; }
}

/* ---------- grids: never cropped ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; }
.title { font-size: 28px; font-weight: 650; letter-spacing: -0.01em; margin: 6px 0 4px; }
.kinds { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 22px; }
.kind { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.kind[aria-pressed="true"] { color: #0a0a0b; background: #fff; border-color: #fff; }
.grid { columns: 4 260px; column-gap: 14px; }
.tile { break-inside: avoid; margin-bottom: 14px; display: block; position: relative; border-radius: 6px; overflow: hidden; background: var(--panel); }
.tile img { width: 100%; height: auto; transition: transform 0.4s ease, opacity 0.3s; }
.tile:hover img { transform: scale(1.02); }
.tile .kindmark {
  position: absolute; top: 8px; right: 8px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 8px;
  border-radius: 999px; background: rgba(10, 10, 11, 0.6); backdrop-filter: blur(8px);
}
.tile .by {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px; font-size: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); opacity: 0; transition: opacity 0.2s;
}
.tile:hover .by, .tile:focus-visible .by { opacity: 1; }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* ---------- profile ---------- */
.profile { display: flex; gap: 26px; align-items: center; padding: 10px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.profile .info { flex: 1; min-width: 0; }
.profile .bio { margin: 8px 0 0; max-width: 620px; white-space: pre-wrap; }
.profile .counts { display: flex; gap: 18px; margin-top: 10px; font-size: 14px; color: var(--dim); }
.profile .counts b { color: var(--ink); }

/* ---------- dialog, toast, states ---------- */
dialog {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 20px; padding: 26px; width: min(400px, calc(100% - 32px));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); }
dialog h2 { margin: 0 0 4px; font-size: 22px; }
dialog form { display: grid; gap: 10px; margin-top: 18px; }
dialog input {
  height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit;
}
dialog .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 6px; }
dialog .or { text-align: center; color: var(--dimmer); font-size: 12px; margin: 6px 0; }
dialog .error { color: var(--alarm); font-size: 13px; min-height: 18px; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; padding: 11px 18px; border-radius: 999px;
  background: #fff; color: #0a0a0b; font-size: 14px; font-weight: 500; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.banner {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 13px;
}
.state { min-height: calc(100vh - var(--bar)); display: grid; place-items: center; text-align: center; color: var(--dim); padding: 24px; }
.state h1 { color: var(--ink); font-size: 22px; margin: 0 0 6px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  :root { --bar: 56px; }
  .bar { gap: 10px; padding: 0 12px; }
  .brand .word { display: none; }
  .tab { padding: 7px 10px; font-size: 11px; }
  .search { max-width: none; }
  .search input { padding-left: 32px; }
  .me .pill .label-long { display: none; }
  .post { grid-template-columns: 1fr; grid-template-rows: 62vh auto; height: auto; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .slide .meta { left: 16px; right: 84px; bottom: 20px; }
  .slide .acts { padding: 0 12px 20px 0; }
  .grid { columns: 2 150px; column-gap: 10px; }
  .tile { margin-bottom: 10px; }
  .profile { flex-direction: column; align-items: flex-start; gap: 14px; }
  .wrap { padding: 20px 14px 50px; }
}
