:root {
  --red: #e8203a;
  --orange: #f7931e;
  --yellow: #f9d648;
  --teal: #25b8a6;
  --blue: #1d4f9c;
  --grad: linear-gradient(100deg, var(--red), var(--orange) 30%, var(--yellow) 52%, var(--teal) 76%, #3d7be6);
  --bg: #0d0c14;
  --bg-2: #14131d;
  --card: #1a1925;
  --card-2: #221f30;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f1eff8;
  --muted: #9b98ab;
  --radius: 18px;
  --side: 260px;
  --font: "Montserrat", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; font: 500 14px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0; letter-spacing: -0.02em; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); margin: 4px 0 0; }
.kicker { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }

/* Buttons + fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 0; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform 0.15s, filter 0.2s, background 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.btn-grad { background: var(--grad); background-size: 180% 100%; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.btn-grad:hover { background-position: 100% 0; }
.btn-ghost { background: var(--card-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: #2b2840; }
.btn-danger { background: rgba(232,32,58,.15); color: #ff7b8d; border: 1px solid rgba(232,32,58,.35); }
.btn-block { width: 100%; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.icon-btn { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; font-size: 16px; }
.icon-btn:hover { background: #2b2840; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea, .tools select { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); outline: 0; transition: border-color 0.2s, box-shadow 0.2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(37,184,166,.18); }
.field textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-err { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(232,32,58,.14); color: #ff8b9b; font-size: 13px; }
.fine { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; }

/* Login */
.login { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 7fr) minmax(380px, 3fr);
  /* form side: deep indigo with warm/teal light, not grey */
  background: radial-gradient(circle at 90% 8%, rgba(247,147,30,.28), transparent 42%), radial-gradient(circle at 15% 95%, rgba(37,184,166,.22), transparent 45%), linear-gradient(165deg, #2a1c4f, #170f30 60%, #120c26); }
.login-art { position: relative; overflow: hidden; background: #000; }
.login-art::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, transparent 90%, #251a48), linear-gradient(160deg, rgba(42,28,79,.25), rgba(18,12,38,.35)); }
/* Login wall: Pinterest-style columns of past designs, each rolling upward at its own speed */
.pinwall { position: absolute; inset: -8% -3%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; transform: rotate(-6deg) scale(1.05); }
.wall-col { overflow: hidden; }
.wall-track { display: flex; flex-direction: column; gap: 12px; animation: wallUp 60s linear infinite; will-change: transform; }
.wall-track img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 24px -14px #000; opacity: 0.72; }
.c1 .wall-track { animation-duration: 48s; animation-delay: -12s; }
.c2 .wall-track { animation-duration: 70s; animation-delay: -30s; }
.c3 .wall-track { animation-duration: 54s; animation-delay: -6s; }
.c4 .wall-track { animation-duration: 66s; animation-delay: -40s; }
.c5 .wall-track { animation-duration: 50s; animation-delay: -22s; }
.c1, .c3, .c5 { margin-top: -60px; }
@keyframes wallUp { to { transform: translateY(-50%); } }
@media (max-width: 1280px) { .pinwall { grid-template-columns: repeat(5, 1fr); } .c5 { display: none; } }
.login-card { align-self: center; justify-self: center; width: min(360px, 100% - 48px); padding: 40px 0; }
.login-card .field input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.login-logo { width: 180px; background: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 30px; }
.login-card h1 { font-size: clamp(30px, 2.8vw, 42px); font-weight: 800; }
.login-card > .muted { margin: 10px 0 28px; line-height: 1.6; }
.pw { position: relative; display: block; }
.pw input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 16px; opacity: 0.7; }

/* App shell */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100svh; }
.side { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px; background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; padding: 0 6px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; background: #fff; padding: 3px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; transition: background 0.2s, color 0.2s; }
.side-nav a i { font-style: normal; width: 20px; text-align: center; }
.side-nav a:hover { background: var(--card); color: var(--text); }
.side-nav a.on { background: var(--card-2); color: var(--text); box-shadow: inset 3px 0 0 var(--orange); }
.side-label { margin: 0 0 6px 12px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #6d6a7d; }
.side-kind { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; color: var(--muted); font-size: 13px; }
.side-kind:hover { background: var(--card); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--card); }
.side-user div { flex: 1; min-width: 0; }
.side-user b, .side-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { color: var(--muted); font-size: 11px; }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px clamp(16px, 3vw, 36px); background: rgba(13,12,20,.96); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); max-width: 720px; }
.search:focus-within { border-color: var(--teal); }
.search span { color: var(--muted); font-size: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; }
.top-upload { margin-left: auto; }
.view { padding: 28px clamp(16px, 3vw, 36px) 80px; max-width: 1800px; }

/* Dashboard */
.hero-strip { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-strip h1 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 0.6fr)) minmax(0, 2fr); gap: 14px; margin-bottom: 34px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 13px; }
.kind-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 4px 0 14px; }
.kind-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.kind-legend a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.kind-legend a:hover { color: var(--text); }
.kind-legend i { width: 9px; height: 9px; border-radius: 3px; }
.block { margin-bottom: 36px; }
.block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.block-head h2 { font-size: 18px; }
.block-head a { color: var(--muted); font-size: 13px; font-weight: 600; }
.block-head a:hover { color: var(--text); }
.people { display: flex; gap: 12px; flex-wrap: wrap; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.person:hover { background: var(--card-2); }
.person small { color: var(--muted); margin-left: 4px; }

/* Page head + filters */
.crumb { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.crumb:hover { color: var(--text); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tools select { width: auto; padding: 9px 12px; height: 42px; }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); transition: all 0.15s; }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip small { opacity: 0.6; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { width: 42px; height: 40px; border: 0; background: var(--card); cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card-2); color: var(--text); }

/* Grids */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.grid.projects { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.sk { aspect-ratio: 4 / 3.6; border-radius: var(--radius); background: linear-gradient(90deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%); background-size: 300% 100%; animation: shine 1.4s linear infinite; }
@keyframes shine { to { background-position: -150% 0; } }

.pcard { display: block; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.pcard:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.18); box-shadow: 0 24px 40px -24px #000; }
.pcover { aspect-ratio: 16 / 8; display: grid; gap: 2px; background: var(--bg-2); overflow: hidden; }
.pcover img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.pcover.has-logo { position: relative; display: flex; align-items: center; justify-content: center; isolation: isolate; background: #111019; }
.pcover.has-logo .logo-back { position: absolute; inset: -8%; z-index: -1; width: 116%; height: 116%; object-fit: cover; filter: blur(24px) brightness(.38) saturate(.8); opacity: .8; }
.pcover.has-logo .logo-main { width: 100%; height: 100%; padding: clamp(8px, 1vw, 14px); object-fit: contain; }
.project-logo-preview { margin: 8px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.project-logo-preview img { max-width: 100%; max-height: 120px; object-fit: contain; margin: auto; }
.pcover.n2 { grid-template-columns: 1fr 1fr; }
.pcover.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pcover.n3 img:first-child { grid-row: span 2; }
.pcover.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pinit { display: grid; place-items: center; font-size: 34px; font-weight: 800; color: rgba(255,255,255,.25); background: radial-gradient(circle at 30% 20%, rgba(247,147,30,.25), transparent 60%), radial-gradient(circle at 80% 80%, rgba(37,184,166,.22), transparent 60%); }
.pinfo { padding: 11px 13px 13px; }
.pinfo h3 { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinfo p { margin: 3px 0 10px; color: var(--muted); font-size: 12.5px; }
.pkinds { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pkinds small { margin-left: auto; color: #6d6a7d; font-size: 11px; }
.kb { display: inline-block; padding: 3px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; color: var(--k); background: color-mix(in srgb, var(--k) 16%, transparent); border: 1px solid color-mix(in srgb, var(--k) 35%, transparent); }

.card { border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; outline: 0; }
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: rgba(255,255,255,.18); box-shadow: 0 24px 40px -24px #000; }
.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2) repeating-conic-gradient(#1b1a26 0 25%, #16151f 0 50%) 0 0 / 20px 20px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .thumb img { transform: scale(1.05); }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: rgba(255,255,255,.22); }
.noimg.big { font-size: 64px; min-height: 260px; }
.fav { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: rgba(255,255,255,.7); cursor: pointer; opacity: 0; transition: opacity 0.2s, color 0.2s; }
.card:hover .fav, .fav.on { opacity: 1; }
.fav.on { color: var(--yellow); }
.kinds { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.kinds .kb { background: rgba(10,10,16,.82); backdrop-filter: none; }
.cinfo { padding: 12px 14px 14px; }
.cinfo h4 { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cinfo p { margin: 2px 0 4px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cinfo small { color: #6d6a7d; font-size: 11px; }

/* Pinboard (masonry) */
.masonry { columns: 5 240px; column-gap: 16px; }
.pin { break-inside: avoid; margin-bottom: 18px; cursor: pointer; outline: 0; }
.pin-img { position: relative; border-radius: 20px; overflow: hidden; background: var(--card); }
.pin-img img { width: 100%; height: auto; }
.pin-noimg { display: grid; place-items: center; height: 180px; font-size: 30px; font-weight: 800; color: rgba(255,255,255,.22); background: radial-gradient(circle at 30% 20%, rgba(247,147,30,.18), transparent 60%), var(--card); }
.pin-over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 30%, transparent 55%, rgba(0,0,0,.7)); opacity: 0; transition: opacity 0.25s; }
.pin .fav { position: static; align-self: flex-end; opacity: 1; }
.pin-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.pin-bottom .kinds { position: static; }
.pin:hover .pin-over, .pin:focus-visible .pin-over { opacity: 1; }
.pin-cap { padding: 8px 4px 0; }
.pin-cap b, .pin-cap small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-cap b { font-size: 13.5px; }
.pin-cap small { color: var(--muted); font-size: 12px; }

/* List view */
.rows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 56px 2.2fr 1.2fr 1fr 1fr 0.9fr; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; outline: 0; }
.row:last-child { border-bottom: 0; }
.row:not(.head):hover, .row:focus-visible { background: var(--card); }
.row.head { cursor: default; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #6d6a7d; background: var(--bg-2); }
.rthumb { width: 56px; height: 42px; border-radius: 8px; overflow: hidden; background: var(--card-2); }
.rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rmain { min-width: 0; }
.rmain b, .rmain small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rmain small, .rcat, .rby, .rdate { color: var(--muted); font-size: 12.5px; }
.rkinds { display: flex; gap: 4px; flex-wrap: wrap; }

.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--radius); grid-column: 1 / -1; }
.empty-ico { font-size: 42px; margin-bottom: 10px; }
.empty p { color: var(--muted); margin: 6px 0 0; }

/* Panel */
.panel, .modal { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.panel.open, .modal.open { visibility: visible; }
.panel-backdrop, .modal-backdrop { position: absolute; inset: 0; background: rgba(5,5,10,.7); opacity: 0; transition: opacity 0.25s; }
.open > .panel-backdrop, .open > .modal-backdrop { opacity: 1; }
.panel-card { position: absolute; top: 0; right: 0; bottom: 0; width: min(1100px, 100%); display: grid; grid-template-columns: 1.3fr 1fr; background: var(--bg-2); transform: translateX(100%); transition: transform 0.35s cubic-bezier(.2,.8,.2,1); }
.panel.open .panel-card { transform: none; }
.panel-preview { position: relative; display: grid; place-items: center; background: #07070b repeating-conic-gradient(#0f0e16 0 25%, #0b0a11 0 50%) 0 0 / 24px 24px; overflow: hidden; }
.panel-preview > img { max-width: 100%; max-height: 100svh; object-fit: contain; }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 26px; cursor: pointer; }
.nav-arrow.prev { left: 14px; }
.nav-arrow.next { right: 14px; }
.panel-body { padding: 34px 28px 28px; overflow-y: auto; }
.panel-body h2 { font-size: 22px; font-weight: 800; padding-right: 30px; }
.panel-body h5 { margin: 22px 0 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill { padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(247,147,30,.15); color: var(--orange); }
.pill.ghost { background: var(--card); color: var(--muted); }
.desc { color: #cfccdb; line-height: 1.6; margin: 14px 0 0; white-space: pre-wrap; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tags span { font-size: 12px; color: var(--teal); }
.files { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.files li > div { flex: 1; min-width: 0; }
.files b, .files small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files b { font-size: 13px; }
.files small { color: var(--muted); font-size: 11.5px; }
.by { display: flex; align-items: center; gap: 10px; margin: 18px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.by b, .by small { display: block; }
.by small { color: var(--muted); font-size: 12px; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.x { position: absolute; top: 14px; right: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card-2); font-size: 22px; line-height: 1; cursor: pointer; }

.vendor-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding: 12px; border-radius: 14px; background: rgba(247,147,30,.07); border: 1px dashed rgba(247,147,30,.35); }
.vendor-share > div { flex: 1; min-width: 150px; }
.vendor-share b, .vendor-share small { display: block; }
.vendor-share small { color: var(--muted); font-size: 11.5px; }
.vendor-share select { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); }

/* Public vendor page */
.vendor { min-height: 100svh; display: grid; place-items: center; overflow-x: hidden; padding: 30px 16px; background: radial-gradient(circle at 85% 10%, rgba(247,147,30,.22), transparent 45%), radial-gradient(circle at 10% 95%, rgba(37,184,166,.18), transparent 45%), linear-gradient(165deg, #2a1c4f, #120c26); }
.v-card { width: min(640px, 100%); min-width: 0; padding: clamp(18px, 5vw, 30px); border-radius: 24px; background: rgba(20,17,34,.75); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 80px -30px #000; }
.v-logo { width: 160px; background: #fff; padding: 8px 12px; border-radius: 10px; margin-bottom: 20px; }
.v-thumb { border-radius: 16px; overflow: hidden; margin-bottom: 18px; background: #07070b; }
.v-thumb img { width: 100%; max-height: 360px; object-fit: contain; }
.v-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.v-card .files { margin-top: 18px; }
.v-card .files li { min-width: 0; }

/* Modal */
.modal { display: grid; place-items: center; padding: 20px; }
.modal-card { position: relative; width: min(720px, 100%); max-height: calc(100svh - 40px); overflow-y: auto; padding: 30px; border-radius: 24px; background: var(--bg-2); border: 1px solid var(--line); transform: translateY(20px) scale(0.98); opacity: 0; transition: transform 0.3s cubic-bezier(.2,.8,.2,1), opacity 0.25s; }
.modal-card.small { width: min(520px, 100%); }
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.new-project { padding: 14px 14px 0; margin-bottom: 14px; border-radius: 14px; background: rgba(247,147,30,.07); border: 1px dashed rgba(247,147,30,.35); }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 20px; text-align: center; border: 2px dashed rgba(255,255,255,.16); border-radius: 18px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.drop:hover, .drop.over { border-color: var(--teal); background: rgba(37,184,166,.07); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop small { color: var(--muted); max-width: 480px; }
.up-steps { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 16px; margin-top: 4px; }
.step-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.step-label span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 11px; font-weight: 800; }
.step-label em { font-style: normal; font-weight: 600; font-size: 11px; color: var(--muted); }
.step:first-child .step-label em { color: var(--orange); }
.pv-wrap { display: flex; flex-direction: column; gap: 8px; }
.pv-drop { position: relative; display: grid; place-items: center; min-height: 104px; border-radius: 16px; cursor: pointer; overflow: hidden; text-align: center; isolation: isolate;
  background: radial-gradient(circle at 20% 0%, rgba(247,147,30,.16), transparent 55%), radial-gradient(circle at 100% 100%, rgba(37,184,166,.14), transparent 55%), #15131f;
  border: 1.5px dashed rgba(247,147,30,.5); transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.pv-drop:hover, .pv-drop.over { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(247,147,30,.12); }
.pv-drop.over { transform: scale(1.01); }
.pv-drop.bad { border-color: var(--red); box-shadow: 0 0 0 4px rgba(232,32,58,.15); animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.pv-drop.has { border: 1.5px solid rgba(37,184,166,.45); background: #07070b repeating-conic-gradient(#12111a 0 25%, #0c0b12 0 50%) 0 0 / 18px 18px; cursor: default; }
.pv-drop.has input { pointer-events: none; }
.pv-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.pv-empty { display: flex; align-items: center; gap: 14px; padding: 10px 16px; text-align: left; }
.pv-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-empty b { font-size: 14px; }
.pv-empty small { color: var(--muted); max-width: 230px; line-height: 1.4; font-size: 11.5px; }
.pv-empty u { color: var(--orange); text-decoration: none; font-weight: 700; }
.pv-art { position: relative; flex: none; width: 48px; height: 40px; transition: transform 0.3s; }
.pv-drop:hover .pv-art { transform: translateY(-3px) rotate(-3deg); }
.pv-frame { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #2c2a40, #1c1a2a); border: 2px solid rgba(255,255,255,.18); }
.pv-sun { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 12px rgba(249,214,72,.6); }
.pv-hill { position: absolute; bottom: -14px; border-radius: 50%; }
.pv-hill.h1 { left: -8px; width: 38px; height: 24px; background: var(--teal); }
.pv-hill.h2 { right: -10px; width: 40px; height: 20px; background: var(--orange); opacity: 0.9; }
.pv-plus { position: absolute; right: -8px; bottom: -6px; width: 20px; height: 20px; font-size: 12px !important; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 15px; font-weight: 800; box-shadow: 0 6px 14px -4px rgba(0,0,0,.6); }
.pv-formats { display: flex; gap: 5px; margin-top: 4px; }
.pv-formats span { padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.pv-drop img { width: 100%; max-height: 170px; object-fit: contain; padding: 8px; animation: pvIn 0.35s ease; }
@keyframes pvIn { from { opacity: 0; transform: scale(0.96); } }
.pv-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; z-index: 3; }
.pv-info { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 14px; background: var(--card); border: 1px solid rgba(37,184,166,.35); }
.pv-info > div { flex: 1; min-width: 0; }
.pv-info b, .pv-info small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-info b { font-size: 13px; }
.pv-info small { color: var(--muted); font-size: 11.5px; }
.pv-ok { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(37,184,166,.18); color: var(--teal); font-weight: 800; font-size: 13px; }
.pv-info .icon-btn { width: 32px; height: 32px; font-size: 15px; }
.step .drop { padding: 14px; min-height: 104px; justify-content: center; border-radius: 16px; }
.queue { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.q { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.q.error { border-color: rgba(232,32,58,.5); }
.q.done { border-color: rgba(37,184,166,.45); }
.qthumb { width: 48px; height: 40px; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--card-2); }
.qthumb img { width: 100%; height: 100%; object-fit: cover; }
.qmain { flex: 1; min-width: 0; }
.qmain b, .qmain small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qmain b { font-size: 13px; }
.qmain small { color: var(--muted); font-size: 11.5px; }
.bar { height: 5px; margin-top: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--grad); transition: width 0.2s; }
.q.error .bar span { background: var(--red); }
.qpct { font-size: 12px; font-weight: 700; color: var(--muted); width: 40px; text-align: right; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

/* Toasts */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 12px; background: #f1eff8; color: #12101a; font-weight: 700; font-size: 13px; box-shadow: 0 16px 30px -12px #000; animation: tin 0.25s; transition: opacity 0.4s, transform 0.4s; }
.toast.err { background: #ff5a6e; color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

/* Responsive */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .kinds-stat { grid-column: 1 / -1; }
  .grid.projects { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .grid.projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform 0.3s; box-shadow: 20px 0 50px -20px #000; }
  .side.open { transform: none; }
  .menu-btn { display: grid; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .panel-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .panel-preview { max-height: 45svh; }
  .panel-preview > img { max-height: 45svh; }
  .panel-body { overflow: visible; }
  .row { grid-template-columns: 56px 1fr auto; }
  .row .rcat, .row .rby, .row .rdate, .row.head > :nth-child(n+4) { display: none; }
}
@media (max-width: 600px) {
  .top-upload span { display: none; }
  .top-upload { width: 44px; padding: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cinfo { padding: 10px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 14px; }
  .stat b { font-size: 22px; }
  .grid2 { grid-template-columns: 1fr; }
  .up-steps { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: end; }
  .modal-card { border-radius: 24px 24px 0 0; padding: 24px 18px; max-height: 92svh; }
  .fav { opacity: 1; }
  .masonry { columns: 2; column-gap: 10px; }
  .pin { margin-bottom: 12px; }
  .pin-over { opacity: 1; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.65)); }
  .pin-bottom .kinds { display: none; }
  .pin-bottom .btn { margin-left: auto; height: 30px; padding: 0 10px; font-size: 12px; }
  .filters .tools { width: 100%; }
  .filters .tools select { flex: 1; }
}
@media (max-width: 360px) {
  .top { gap: 8px; padding-inline: 10px; }
  .menu-btn, .top-upload { flex: 0 0 38px; width: 38px; }
  .search { gap: 7px; padding-inline: 10px; }
  .search input { font-size: 12px; }
  .view { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
