/* Black + purple/pink theme (default). Light mode is opt-in via the sun button. */
:root {
  --bg: #07070a; --surface: #111116; --surface-2: #1a1a22; --line: #26232f; --text: #f1eef8; --muted: #9c95ad;
  --accent: #a855f7; --accent-2: #ec4899; --accent-ink: #ffffff; --accent-soft: #241334;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #c026d3 55%, #ec4899 100%);
  --glow: 0 6px 24px rgba(192, 38, 211, .35);
  --ok: #34d399; --ok-soft: #0c2a20; --warn: #fbbf24; --warn-soft: #2e2410; --bad: #fb7185; --bad-soft: #35121b;
  --model: #b98cff; --litho: #f3efe6; --grid: #24212d; --grid-strong: #3d3750;
  --stage: radial-gradient(circle at 50% 30%, #1f1a2c, #08080b 75%);
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
  --font: 'Inter', system-ui, sans-serif; --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #faf8ff; --surface: #ffffff; --surface-2: #f2eefb; --line: #e4ddf3; --text: #1a1325; --muted: #6e6680;
  --accent: #9333ea; --accent-2: #db2777; --accent-soft: #f3e8ff;
  --glow: 0 6px 20px rgba(147, 51, 234, .25);
  --ok: #15803d; --ok-soft: #e7f7ee; --warn: #a16207; --warn-soft: #fdf4e1; --bad: #e11d48; --bad-soft: #ffe4ea;
  --model: #9b5cf6; --grid: #e2dcef; --grid-strong: #c4b9dc;
  --stage: radial-gradient(circle at 50% 30%, #ffffff, #ece6f8);
  --shadow: 0 1px 2px rgba(40,20,80,.05), 0 6px 24px rgba(40,20,80,.08); color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; outline: none; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; justify-content: center; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.err { color: var(--bad); margin: 0; min-height: 1em; }
.row { display: flex; align-items: center; } .gap { gap: 10px; } .wrap { flex-wrap: wrap; }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ico { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* header */
.hdr { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 24px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font: 700 1.2rem var(--display); text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.nav { display: flex; gap: 2px; }
.nav a { padding: 7px 11px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.search { flex: 1; max-width: 380px; margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; color: var(--muted); }
.search input.search-in, .search input { border: 0 !important; outline: 0 !important; background: none; width: 100%; color: var(--text); padding: 0 !important; }
.search:focus-within { border-color: var(--accent); }
.hdr-right { display: flex; align-items: center; gap: 8px; }
.acct { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; }
.menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.acct.open .menu { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .08s, background .15s; }
.btn:hover { background: var(--surface-2); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); border-color: transparent; color: var(--accent-ink); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.12); }
.btn-ghost { background: none; border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 1rem; } .btn-sm { height: 32px; padding: 0 11px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.liked { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 50%, var(--line)); background: color-mix(in srgb, var(--accent-2) 14%, var(--surface)); }
.btn.liked .ico { fill: currentColor; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; font-size: .8rem; }
.link, .link-like { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.link { color: var(--muted); text-decoration: underline; }

.avatar { --h: 20; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; font: 700 .85rem var(--display); color: #fff; background: hsl(var(--h) 55% 48%); }
.avatar.big { width: 84px; height: 84px; font-size: 2rem; }

/* layout */
.page { max-width: 1280px; margin: 0 auto; padding: 28px 24px 56px; }
.page-wide { max-width: 1500px; }
.page-full { max-width: none; padding: 0; position: relative; }
.narrow { max-width: 820px; }
.center-page { text-align: center; padding-top: 70px; }
.center-page .row { justify-content: center; }
.big-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-size: 2rem; margin-bottom: 16px; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 60ch; }
.center-page .lead { margin-inline: auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.ftr { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding: 18px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 26px 0 34px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
.hero-art { height: 240px; display: grid; place-items: center; }
.hero-stack { position: relative; width: 210px; height: 210px; transform: rotateX(58deg) rotateZ(45deg); transform-style: preserve-3d; }
.hero-stack i { position: absolute; inset: 0; border-radius: 26px; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); animation: layer 3.2s ease-in-out infinite; box-shadow: 0 0 24px rgba(168, 85, 247, .25); }
.hero-stack i:nth-child(2) { animation-delay: .25s; inset: 16px; border-color: #b84bea; } .hero-stack i:nth-child(3) { animation-delay: .5s; inset: 32px; border-color: #c93ed8; }
.hero-stack i:nth-child(4) { animation-delay: .75s; inset: 48px; border-color: #dc43b4; } .hero-stack i:nth-child(5) { animation-delay: 1s; inset: 64px; background: var(--grad); border-color: transparent; }
@keyframes layer { 0%, 100% { transform: translateZ(0); } 50% { transform: translateZ(46px); } }

/* filters & chips */
.filters { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 2px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .85rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.chip:not(.on):not(.chip-float):hover { border-color: var(--accent); }
.chip-float { position: absolute; top: 10px; left: 10px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); cursor: default; font-size: .75rem; padding: 3px 9px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 11px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-sm button { padding: 5px 10px; font-size: .85rem; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 10px 34px rgba(168, 85, 247, .18); }
.card.skeleton { aspect-ratio: 4 / 4.4; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.cover { aspect-ratio: 4 / 3; background: var(--stage); overflow: hidden; display: grid; place-items: center; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-render img { object-fit: contain; }
.cover-ph { color: var(--grid-strong); font-size: 2.6rem; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 1rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.by { display: flex; align-items: center; gap: 7px; min-width: 0; } .by .avatar { width: 22px; height: 22px; font-size: .7rem; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.counts { display: flex; gap: 10px; flex: none; } .counts span { display: inline-flex; align-items: center; gap: 3px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--muted); }

/* model page */
.model-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--stage); border: 1px solid var(--line); }
.stage > img { width: 100%; height: 100%; object-fit: contain; }
.viewer { position: absolute; inset: 0; }
.stage-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: .75rem; color: var(--muted); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 3px 10px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.stage-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); padding: 20px; text-align: center; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumb { flex: none; width: 76px; height: 58px; border-radius: 10px; border: 2px solid transparent; overflow: hidden; padding: 0; background: var(--surface-2); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-selected="true"] { border-color: var(--accent); }
.thumb-3d { display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: .75rem; gap: 2px; }
.model-side { display: flex; flex-direction: column; gap: 14px; }
.model-side > .chip { align-self: flex-start; }
.model-title { margin: 0; overflow-wrap: anywhere; }
.maker { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.maker > span:not(.avatar) { display: flex; flex-direction: column; }
.kpis { display: flex; gap: 22px; }
.kpis div { display: flex; flex-direction: column; } .kpis strong { font: 700 1.35rem var(--display); }
.kpis span { font-size: .8rem; }
.scan-box { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.scan-box summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; }
.scan-box summary::-webkit-details-marker { display: none; }
.scan-box summary > span { display: flex; flex-direction: column; } .scan-box summary small { color: var(--muted); }
.scan-box.ok summary .ico { color: var(--ok); } .scan-box.warn summary .ico { color: var(--warn); }
.scan-box.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, var(--line)); }
.scan-box.warn { background: var(--warn-soft); }
.scan-file { padding: 0 14px 10px; } .scan-box > .checks { padding: 0 14px 12px; }
.checks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 9px; align-items: flex-start; font-size: .85rem; }
.checks li > span:last-child { display: flex; flex-direction: column; } .checks small { color: var(--muted); overflow-wrap: anywhere; }
.ck-mark { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .72rem; font-weight: 700; color: #fff; background: var(--muted); }
.ck-pass .ck-mark { background: var(--ok); } .ck-warn .ck-mark { background: var(--warn); } .ck-fail .ck-mark { background: var(--bad); }
.ck-fail strong { color: var(--bad); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: .9rem; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .82rem; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: color-mix(in srgb, var(--accent-2) 70%, var(--text)); text-decoration: none; }
.tag:hover { color: var(--text); }
.avatar { line-height: 1; }
.owner { padding-top: 10px; border-top: 1px dashed var(--line); }
.model-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.span2 { grid-column: 1 / -1; }
table.kv { border-collapse: collapse; width: 100%; font-size: .92rem; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 12px 6px 0; width: 40%; }
.kv td { padding: 6px 0; } .kv tr + tr { border-top: 1px solid var(--line); }
.files { list-style: none; padding: 0; margin: 0; }
.files li, .upl-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.files li + li { border-top: 1px solid var(--line); }
.ftype { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--surface-2); font: 700 .75rem var(--display); color: var(--accent); }
.fname { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.comment-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
textarea, input:not([type=checkbox]):not([type=range]):not([type=file]), select { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); resize: vertical; }
textarea:focus, input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; border-color: var(--accent); }
.comments { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 12px; } .comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 10px; } .comment-head a { text-decoration: none; }
.comment p { margin: 2px 0 0; }

/* forms & dialogs */
.form { display: flex; flex-direction: column; gap: 13px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: .9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; }
legend { font-weight: 600; padding: 0 6px; }
.dlg { border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.dlg-wide { width: min(760px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(10,10,14,.55); backdrop-filter: blur(3px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; } .dlg-head h2 { margin: 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* upload */
.upl { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 24px; align-items: start; margin-top: 18px; }
.upl-left { display: flex; flex-direction: column; gap: 20px; }
.sticky { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 12px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop .ico { width: 30px; height: 30px; color: var(--accent); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-sm { padding: 18px 12px; }
.upl-files { list-style: none; padding: 0; margin: 12px 0 0; }
.upl-file + .upl-file { border-top: 1px solid var(--line); }
.upl-report { margin: 0 0 12px 58px; font-size: .88rem; } .upl-report summary { cursor: pointer; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); }
.b-clean { background: var(--ok-soft); color: var(--ok); } .b-warn { background: var(--warn-soft); color: var(--warn); }
.b-rejected, .b-error { background: var(--bad-soft); color: var(--bad); } .b-idle { color: var(--muted); }
.spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.upl-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.upl-img { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.upl-img.first { outline: 2px solid var(--accent); outline-offset: 1px; }
.upl-img img { width: 100%; height: 100%; object-fit: cover; }
.upl-img-act { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.upl-add { aspect-ratio: 4 / 3; border-radius: 10px; border: 2px dashed var(--line); background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--muted); }
.upl-add small { font-size: .8rem; } .upl-add:hover { border-color: var(--accent); color: var(--accent); }

/* profile */
.profile { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 28px; }
.profile-info { flex: 1; min-width: 220px; } .profile-info h1 { display: flex; align-items: center; gap: 10px; margin: 0; }

/* tools */
.tool-head { margin-bottom: 16px; }
.tool { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px; align-items: start; }
.tool-side { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.tool-side .seg { display: grid; grid-template-columns: 1fr 1fr; }
.ctl-group { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.ctl-group h4 { margin: 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ctl-group[hidden], .rng[hidden], .chk[hidden] { display: none; }
.rng { display: flex; flex-direction: column; gap: 3px; font-size: .88rem; }
.rng-top { display: flex; justify-content: space-between; } .rng-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.rng input { width: 100%; accent-color: var(--accent); }
.chk { display: flex; gap: 8px; align-items: center; font-size: .88rem; cursor: pointer; } .chk input { accent-color: var(--accent); width: 16px; height: 16px; }
.tool-stage { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--stage); border: 1px solid var(--line); }
.tool-viewer { position: absolute; inset: 0; }
.empty-tool { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); padding: 20px; pointer-events: none; }
.empty-tool[hidden] { display: none; }
.empty-icon { font-size: 3rem; color: var(--accent); }
.busy { position: absolute; top: 12px; right: 12px; background: var(--surface); padding: 5px 12px; border-radius: 999px; font-size: .8rem; box-shadow: var(--shadow); }
.busy[hidden] { display: none; }
.tool-under { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; margin-top: 18px; }
.light-fig { margin: 0; background: #0c0c0e; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.light-preview { width: 100%; max-height: 260px; object-fit: contain; image-rendering: auto; }
.light-fig .cap { color: #9a9890; font-size: .78rem; text-align: center; }
.tool-out { display: flex; flex-direction: column; gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; font-size: .82rem; }
.stat strong { font: 600 1.05rem var(--display); }

/* vase */
.vase-frame { width: 100%; height: calc(100vh - 59px); border: 0; display: block; background: var(--bg); }
.vase-banner { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 16px 50px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.vase-banner[hidden] { display: none; } .vase-banner > .ico { color: var(--ok); }

/* security page */
.engine-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 22px; }
.layers { padding: 0; margin: 0 0 20px; list-style: none; counter-reset: l; display: grid; gap: 12px; }
.layers li { counter-increment: l; position: relative; padding: 14px 16px 6px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.layers li::before { content: counter(l); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 700 .9rem var(--display); }
.layers p { color: var(--muted); margin: 4px 0 8px; }

/* ---------- motion ---------- */
body::before, body::after { content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: .55; }
body::before { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: radial-gradient(circle, rgba(139, 92, 246, .55), transparent 65%); animation: drift1 22s ease-in-out infinite alternate; }
body::after { width: 40vmax; height: 40vmax; right: -12vmax; bottom: -16vmax; background: radial-gradient(circle, rgba(236, 72, 153, .45), transparent 65%); animation: drift2 26s ease-in-out infinite alternate; }
:root[data-theme="light"] body::before, :root[data-theme="light"] body::after { opacity: .25; }
@keyframes drift1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18vw, 12vh) scale(1.15); } 100% { transform: translate(6vw, 34vh) scale(.95); } }
@keyframes drift2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-20vw, -10vh) scale(1.1); } 100% { transform: translate(-8vw, -36vh) scale(1.2); } }
body { isolation: isolate; }

.page { animation: pageIn .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.grid > .card:not(.skeleton) { animation: cardIn .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
.card { transform-style: preserve-3d; will-change: transform; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; }
.card.tilting { transition: transform .08s linear, box-shadow .25s, border-color .25s; }
.cover img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .cover img { transform: scale(1.06); }
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .12), transparent 45%); }
.card:hover::after { opacity: 1; }

.btn-primary { background-size: 200% 200%; animation: gradShift 6s ease infinite; position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); }
.btn-primary:hover::after { animation: shine .8s ease; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(192, 38, 211, .5); }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes shine { to { left: 130%; } }
.accent { background-size: 200% auto; animation: gradShift 5s ease infinite; }
.brand-mark { animation: glowPulse 3.5s ease-in-out infinite; }
.brand:hover .brand-mark .ico { animation: spinOnce .8s cubic-bezier(.2, .8, .2, 1); }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 rgba(192, 38, 211, 0); } 50% { box-shadow: 0 0 22px rgba(192, 38, 211, .65); } }
@keyframes spinOnce { to { transform: rotate(360deg); } }
.hero-art { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.chip, .seg button, .thumb, .icon-btn, .tag { transition: all .2s ease; }
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.icon-btn:hover .ico { transform: rotate(25deg); transition: transform .3s; }
.btn.liked .ico { animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.drop.over { animation: dropPulse 1s ease-in-out infinite; }
@keyframes dropPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, .4); } 50% { box-shadow: 0 0 0 8px rgba(168, 85, 247, 0); } }
.dlg[open] { animation: dlgIn .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.toast { animation: toastIn .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
.panel, .model-side > *, .layers li { animation: pageIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.model-side > *:nth-child(2) { animation-delay: .04s; } .model-side > *:nth-child(3) { animation-delay: .08s; } .model-side > *:nth-child(4) { animation-delay: .12s; }
.model-side > *:nth-child(5) { animation-delay: .16s; } .model-side > *:nth-child(6) { animation-delay: .2s; } .model-side > *:nth-child(n+7) { animation-delay: .24s; }
.layers li:nth-child(n) { animation-delay: calc(.04s * var(--i, 0)); }
.badge.b-clean { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.nav a { position: relative; }
.nav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .25s; }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.light-fig[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* toasts */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); transition: opacity .3s, transform .3s; }
.toast.ok { background: var(--ok); color: #fff; } .toast.bad { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* responsive */
@media (max-width: 1100px) {
  .nav { display: none; }
  .tool { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .model-top, .upl, .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .model-cols, .tool-under { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 640px) {
  .hdr { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  .hide-sm { display: none; }
  .page { padding: 20px 16px 44px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-meta .counts span:last-child { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .upl-report { margin-left: 0; }
  .files li { flex-wrap: wrap; }
  .vase-frame { height: calc(100vh - 106px); }
}

/* =====================================================================
   Layout v2 — sidebar shell, featured carousel, big-cover cards, admin
   ===================================================================== */
.shell { display: flex; min-height: 100vh; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-col > main { flex: 1; }

/* sidebar */
.side { position: sticky; top: 0; height: 100vh; width: 248px; flex: none; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; overflow-y: auto; scrollbar-width: thin;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border-right: 1px solid var(--line); backdrop-filter: blur(14px); transition: width .25s cubic-bezier(.2, .8, .2, 1); z-index: 30; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 12px; }
.side-head .brand { gap: 10px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-title { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; white-space: nowrap; }
.side-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; transition: background .2s, color .2s; }
.side-link .ico { width: 1.25em; height: 1.25em; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--surface-2); color: var(--text); }
.side-link.active::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--grad); }
.side-link.active .ico { color: var(--accent); }
.pill-new { margin-left: auto; font-size: .6rem; font-weight: 800; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; background: var(--grad); color: #fff; }
.side-dot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; } .side-dot.bad { background: var(--bad); box-shadow: 0 0 10px var(--bad); } .side-dot.warn { background: var(--warn); }
.side-dot[hidden] { display: none; }
.icon-btn.ghost { border-color: transparent; background: none; }
.icon-btn.ghost:hover { background: var(--surface-2); }
body.side-mini .side { width: 76px; }
body.side-mini .side-label, body.side-mini .side-title, body.side-mini .pill-new { display: none; }
body.side-mini .side-head { flex-direction: column; gap: 10px; }
body.side-mini .side-link { justify-content: center; padding: 11px; }
body.side-mini .side-dot { position: absolute; top: 6px; right: 8px; }
.scrim { position: fixed; inset: 0; background: rgba(5, 4, 10, .6); backdrop-filter: blur(3px); z-index: 25; }
.scrim[hidden] { display: none; }
.menu-btn { display: none; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); }
.top .search { flex: 1; max-width: 760px; margin: 0; height: 46px; border-radius: 999px; padding: 0 18px; background: var(--surface); }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn-upload { height: 42px; border-radius: 999px; padding: 0 18px; border: 1.5px solid transparent; color: var(--text);
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box; }
.btn-upload .ico { color: var(--accent-2); }
.btn-upload:hover { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; box-shadow: var(--glow); }
.btn-outline { border-color: var(--accent); color: var(--text); }
.acct-btn { padding: 2px; border-radius: 50%; }
.acct-btn .avatar { width: 36px; height: 36px; }
.menu-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* pills row */
.pills-wrap { position: relative; margin: 2px 0 22px; }
.pills { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; padding: 2px 44px 2px 0; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: 9px 18px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; transition: background .2s, transform .2s; }
.pill:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); transform: translateY(-1px); }
.pill.on { background: var(--text); color: var(--bg); }
.pills-more { position: absolute; right: 0; top: 0; bottom: 0; width: 48px; border: 0; color: var(--text); cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(90deg, transparent, var(--bg) 45%); }

/* hero: carousel + feature cards */
.hero-grid { display: grid; grid-template-columns: minmax(0, 2.06fr) minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-bottom: 34px; }
.carousel, .feature { border-radius: 18px; overflow: hidden; position: relative; }
.carousel { aspect-ratio: 16 / 7.4; background: var(--surface); }
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; min-height: 220px; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; text-decoration: none; color: #fff; }
.slide.on { opacity: 1; visibility: visible; }
.slide-img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 6s ease-out; }
.slide.on .slide-img { transform: scale(1); }
.slide-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 56px 28px 26px;
  background: linear-gradient(transparent, rgba(6, 4, 12, .85)); }
.slide-cap h2 { font-size: clamp(1.2rem, 2.4vw, 1.9rem); margin: 0 0 4px; color: #fff; }
.slide-cap p { margin: 0; color: rgba(255, 255, 255, .78); }
.slide.on .slide-cap > div { animation: capIn .7s .15s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes capIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.slide-art { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(circle at 70% 40%, #3b1d63, #0b0912 70%); }
.slide-art i { position: absolute; border-radius: 50%; filter: blur(2px); }
.art-litho { background: radial-gradient(circle at 65% 45%, #fff3d6 0%, #f5b25a 18%, #6b2a76 46%, #0b0912 75%); }
.art-litho i { border: 2px solid rgba(255, 220, 170, .5); border-radius: 18px; filter: none; animation: floaty 7s ease-in-out infinite; }
.art-litho i:nth-child(1) { width: 34%; height: 58%; left: 54%; top: 12%; transform: rotate(-8deg); background: rgba(255, 236, 200, .12); }
.art-litho i:nth-child(2) { width: 22%; height: 40%; left: 30%; top: 26%; transform: rotate(10deg); animation-delay: -2s; background: rgba(255, 236, 200, .08); }
.art-litho i:nth-child(3), .art-litho i:nth-child(4) { display: none; }
.art-vase { background: radial-gradient(circle at 68% 50%, #c026d3 0%, #5b21b6 35%, #0b0912 72%); }
.art-vase i { left: 62%; width: 18%; border: 2px solid rgba(255, 255, 255, .55); border-radius: 40% 40% 30% 30% / 60% 60% 25% 25%; filter: none; animation: spinY 6s linear infinite; }
.art-vase i:nth-child(1) { top: 10%; height: 72%; } .art-vase i:nth-child(2) { top: 18%; height: 60%; left: 64%; width: 14%; animation-delay: -1.5s; opacity: .6; }
.art-vase i:nth-child(3) { top: 26%; height: 48%; left: 66%; width: 10%; animation-delay: -3s; opacity: .4; } .art-vase i:nth-child(4) { display: none; }
.art-upload { background: radial-gradient(circle at 70% 45%, #ec4899 0%, #7c3aed 38%, #0b0912 74%); }
.art-upload i { width: 14%; aspect-ratio: 1; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .08); filter: none; animation: rise 5s ease-in-out infinite; }
.art-upload i:nth-child(1) { left: 58%; top: 40%; } .art-upload i:nth-child(2) { left: 72%; top: 22%; animation-delay: -1.2s; width: 10%; }
.art-upload i:nth-child(3) { left: 80%; top: 52%; animation-delay: -2.4s; width: 8%; } .art-upload i:nth-child(4) { left: 66%; top: 64%; animation-delay: -3.6s; width: 6%; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes spinY { 0% { transform: scaleX(1); } 50% { transform: scaleX(.35); } 100% { transform: scaleX(1); } }
@keyframes rise { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -22px; rotate: 12deg; } }
.dots { position: absolute; right: 26px; top: 22px; display: flex; gap: 6px; z-index: 2; }
.dot { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255, 255, 255, .45); cursor: pointer; transition: width .3s, background .3s; }
.dot[aria-current="true"] { width: 26px; background: #fff; }
.car-nav { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff;
  background: rgba(10, 8, 18, .45); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; z-index: 2; }
.car-nav.prev { left: 14px; } .car-nav.prev .ico { transform: rotate(180deg); } .car-nav.next { right: 14px; }
.carousel:hover .car-nav, .car-nav:focus-visible { opacity: 1; }
.feature { display: flex; flex-direction: column; text-decoration: none; background: none; }
.feature-cover { flex: 1; aspect-ratio: auto; min-height: 0; border-radius: 18px; }
.feature-body { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 6px; }
.feature-body h3 { margin: 0; font-size: 1.02rem; }
.feature-body.row { flex-direction: row; align-items: center; justify-content: space-between; }
.go { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: var(--glow); transition: transform .25s; }
.feature:hover .go { transform: translateX(4px) rotate(-8deg); }
.promo-art { position: relative; background: radial-gradient(circle at 50% 40%, #2b1745, #0c0a12 70%); }
.promo-art i { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 2px solid; translate: -50% -50%; animation: pulseRing 3.6s ease-out infinite; }
.promo-art i:nth-child(1) { width: 30%; aspect-ratio: 1; border-color: #a855f7; } .promo-art i:nth-child(2) { width: 30%; aspect-ratio: 1; border-color: #d946ef; animation-delay: 1.2s; }
.promo-art i:nth-child(3) { width: 30%; aspect-ratio: 1; border-color: #ec4899; animation-delay: 2.4s; }
@keyframes pulseRing { 0% { scale: .4; opacity: 1; } 100% { scale: 2.6; opacity: 0; } }

/* cards: big rounded cover, text underneath (no box) */
.grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 22px; }
.card { background: none; border: 0; box-shadow: none; overflow: visible; border-radius: 0; }
.card:hover { box-shadow: none; }
.card::after { display: none; }
.card .cover, .feature .cover { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); transform-style: preserve-3d; transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s; }
.card:hover .cover, .feature:hover .cover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 14px 40px rgba(168, 85, 247, .22); }
.cover.tilting { transition: transform .08s linear, box-shadow .3s, border-color .3s; }
.cover::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .14), transparent 45%); }
.card:hover .cover::after, .feature:hover .cover::after { opacity: 1; }
.cover-badge { position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; z-index: 1;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); color: var(--accent); }
.cover-badge.ok { color: var(--ok); }
.card-body { padding: 12px 2px 0; gap: 6px; }
.card-title { font-size: 1rem; font-weight: 700; }
.card.skeleton { aspect-ratio: auto; background: none; animation: none; }
.card.skeleton .cover { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-line { height: 12px; border-radius: 6px; background: var(--surface-2); margin-top: 12px; width: 80%; } .sk-line.short { width: 45%; margin-top: 8px; }

/* sections */
.home-sec { margin-bottom: 40px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 1.3rem; }
.see-all { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.see-all:hover { color: var(--accent); }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.list-head h1 { margin: 0; }
.more-from { margin-top: 36px; } .more-from[hidden] { display: none; }

/* back to top */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font: 700 .58rem var(--font); color: var(--text);
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(8px); box-shadow: var(--shadow); animation: toastIn .3s; }
.to-top[hidden] { display: none; } .to-top:hover { border-color: var(--accent); }

/* admin */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; }
.tile strong { font: 700 1.6rem var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page > .panel + .panel { margin-top: 20px; }
.spark { display: flex; gap: 3px; align-items: flex-end; height: 26px; margin: 4px 0 18px; }
.spark i { flex: 1; max-width: 10px; height: 100%; border-radius: 3px; background: var(--ok); opacity: .85; }
.spark i.warn { background: var(--warn); } .spark i.bad { background: var(--bad); }
.check-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.check-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 6px; }
.errlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.errlist summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stack { white-space: pre-wrap; font-size: .78rem; background: var(--surface-2); padding: 10px; border-radius: 10px; overflow-x: auto; max-height: 260px; }
.vase-frame { height: calc(100vh - 70px); }

/* responsive (v2) */
@media (max-width: 1250px) { .hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .hero-grid > :nth-child(3) { display: none; } }
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); width: 264px !important; box-shadow: 20px 0 60px rgba(0, 0, 0, .5); background: var(--surface); }
  body.drawer-open .side { transform: none; }
  body.side-mini .side-label, body.side-mini .side-title, body.side-mini .pill-new { display: revert; }
  body.side-mini .side-link { justify-content: flex-start; padding: 10px 12px; }
  .side-collapse { display: none; }
  .menu-btn { display: inline-grid; }
  .top { padding: 10px 16px; }
  .hero-grid { grid-template-columns: 1fr; } .hero-grid > .feature { display: none; }
  .carousel { aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .top { flex-wrap: nowrap; gap: 8px; }
  .top .search { height: 40px; padding: 0 12px; order: 0; flex-basis: auto; }
  .btn-upload { width: 40px; padding: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .slide-cap { padding: 40px 16px 16px; } .slide-cap .btn { display: none; }
  .dots { right: 14px; top: 14px; }
  .vase-frame { height: calc(100vh - 62px); }
}

.main-col .page { max-width: 1640px; }
.main-col .page.narrow { max-width: 860px; }
.main-col .page-full { max-width: none; }

/* brand tagline */
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-tag { font: 600 .66rem var(--font); letter-spacing: .04em; text-transform: lowercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: gradShift 6s ease infinite; }
.brand-tag:first-of-type { margin-top: 3px; }

/* profile pictures + edit (pencil) icon */
.avatar { position: relative; overflow: hidden; }
.avatar.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pic-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.pic-btn .avatar { transition: filter .2s, transform .2s; }
.pic-btn:hover .avatar { filter: brightness(.8); transform: scale(1.03); }
.edit-badge { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; border: 3px solid var(--bg); box-shadow: var(--glow); transition: transform .25s cubic-bezier(.2, 1.4, .4, 1); }
.edit-badge .ico { width: 15px; height: 15px; }
.pic-btn:hover .edit-badge { transform: scale(1.12) rotate(-12deg); }
.pic-edit { display: flex; align-items: center; gap: 18px; padding-bottom: 6px; }
.pic-edit .edit-badge { border-color: var(--surface); }
.pic-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.busy-pic { opacity: .55; pointer-events: none; }
.menu-ico { display: flex !important; align-items: center; gap: 8px; }
.menu-ico .ico { color: var(--accent); }

/* plugins */
.safe-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 22px; }
.safe-pt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, var(--line)); }
.safe-pt > .ico { color: var(--ok); width: 22px; height: 22px; margin-top: 2px; }
.safe-pt span { display: flex; flex-direction: column; } .safe-pt small { color: var(--muted); }
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-bottom: 22px; }
.plugin-card { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s; animation: cardIn .5s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
.plugin-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: 0 14px 40px rgba(168, 85, 247, .22); }
.plugin-ico { flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.plugin-ico .ico { width: 30px; height: 30px; }
.plugin-card:hover .plugin-ico .ico { animation: spinOnce 1s cubic-bezier(.2, .8, .2, 1); }
.plugin-body { flex: 1; min-width: 0; } .plugin-body h3 { margin: 0; } .plugin-body p { margin: 6px 0; font-size: .9rem; }
.ok-text { color: var(--ok); display: inline-flex; align-items: center; gap: 3px; } .ok-text .ico { width: .95em; height: .95em; }
.plugin-page { display: flex; flex-direction: column; }
.plugin-bar { display: flex; align-items: center; gap: 12px; padding: 8px 20px; border-bottom: 1px solid var(--line); }
.plugin-bar .badge .ico { width: 1em; height: 1em; }
.plugin-frame { width: 100%; height: calc(100vh - 122px); border: 0; display: block; background: var(--bg); }

/* the hidden attribute must always win over component display rules */
[hidden] { display: none !important; }

/* feature cards: never clip their text — the card grows instead (overflow:hidden made the grid squash it) */
.hero-grid > .feature { overflow: visible; min-height: 0; }
.feature-cover { min-height: 140px; }
.feature-body { flex: none; }
.feature-body.row > div { min-width: 0; }
.feature-body h3 { overflow-wrap: anywhere; }
.slide-cap > div { flex: 1; min-width: 0; }
.slide-cap .btn { flex: none; }

/* rendered model pictures are full studio scenes now */
.cover-render img { object-fit: cover; }

/* print-profile inputs with automatic units */
.unit-input { position: relative; display: block; }
.unit-input input { padding-right: 46px; }
.unit-input .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: .85rem; pointer-events: none; }
.unit-input input::-webkit-inner-spin-button { margin-right: 26px; }
.fld-wrap { display: block; }
.time-field { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: .9rem; }
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-grid .time-field { grid-column: span 2; }

/* ModMoon logo: half moon + M */
.brand-logo { flex: none; width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(192, 38, 211, .55)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .brand-logo { transform: rotate(-20deg) scale(1.06); }
.brand-text { font-family: 'Orbitron', var(--display); letter-spacing: .02em; }

/* ---------------- ModMoon: printers, vote, legal ---------------- */
.mm-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 6px 0 22px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), var(--surface) 60%); }
.mm-hero > div:nth-child(2) { flex: 1; min-width: 240px; } .mm-hero h1 { margin-bottom: .2em; } .mm-hero p { margin: 0; max-width: 62ch; }
.mm-hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.mm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.mm-card:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.mm-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: #0b0812; }
.mm-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mm-body p { margin: 0; flex: 1; }
.mm-title { display: flex; align-items: center; gap: 12px; } .mm-title h3 { margin: 0; }
.mm-actions { display: flex; gap: 8px; margin-top: 6px; }
.moon-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #120d1c; box-shadow: inset 0 0 0 2px #8b5cf6; position: relative; overflow: hidden; display: inline-block; }
.moon-ico::after { content: ''; position: absolute; inset: 0; background: var(--grad); }
.moon-ico.ph-new::after { display: none; }
.moon-ico.ph-crescent::after { clip-path: circle(50% at 92% 50%); -webkit-mask: radial-gradient(circle at 18% 50%, transparent 49%, #000 50%); mask: radial-gradient(circle at 18% 50%, transparent 49%, #000 50%); clip-path: none; }
.moon-ico.ph-half::after { clip-path: inset(0 0 0 50%); }
.moon-ico.ph-eclipse { box-shadow: 0 0 0 2px #ec4899, 0 0 12px 3px rgba(236, 72, 153, .7); } .moon-ico.ph-eclipse::after { display: none; }
.moon-ico.ph-orbit { background: transparent; box-shadow: inset 0 0 0 2px #ec4899; } .moon-ico.ph-orbit::after { inset: 8px; border-radius: 50%; }
.vote-page { max-width: 860px; }
.vote-list { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.vote-row { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.vote-row.mine { border-color: var(--accent); box-shadow: var(--glow); }
.vote-img { width: 84px; height: 105px; object-fit: cover; border-radius: 10px; flex: none; background: #0b0812; }
.vote-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.vote-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .vote-head .moon-ico { width: 22px; height: 22px; }
.vote-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.vote-bar > i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.vote-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.legal { max-width: 760px; } .legal h3 { margin-top: 1.4em; }
.todo { background: #fde68a; color: #1a1325; padding: 0 4px; border-radius: 4px; font-weight: 600; }
@media (max-width: 560px) { .vote-img { width: 60px; height: 75px; } .vote-foot { flex-direction: column; align-items: flex-start; } }

/* sign-up consent checkbox */
.form label.check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.form label.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }

