@font-face { font-family: Manrope; src: url(../vendor/fonts/manrope-latin.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
[hidden] { display: none !important; }
:root {
  --bg: #0c1018; --bg2: #121826; --bg3: #1a2234; --line: #263049; --fg: #e8ecf4; --muted: #8d97ad;
  --accent: #4f8cff; --accent2: #7fb0ff; --warn: #ffb347; --ok: #3ddc97;
  --r: 10px; font-family: Manrope, system-ui, sans-serif; color: var(--fg); background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; }
button, select, input { font: inherit; color: inherit; }
button { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--accent2); padding: 0; }
select, input[type=date] { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; width: 100%; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 12px; }

.top { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .mark { font-weight: 800; letter-spacing: .22em; font-size: 18px; }
.brand .sub { color: var(--muted); font-size: 13px; }
.crumb { flex: 1; color: var(--muted); font-size: 14px; }
.device { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }

.home { flex: 1; overflow: auto; padding: 28px clamp(16px, 5vw, 64px); }
.hero h1 { font-size: clamp(26px, 4vw, 40px); margin: 8px 0 6px; font-weight: 700; letter-spacing: -.01em; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.home h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin: 24px 0 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 16/9; background: var(--bg3) center/cover; }
.card .meta { padding: 12px 14px 14px; }
.card .meta b { display: block; font-size: 15px; }
.card .meta span { color: var(--muted); font-size: 13px; }
.drop { display: block; border: 1.5px dashed var(--line); border-radius: 14px; padding: 26px; cursor: pointer; line-height: 1.6; max-width: 720px; }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(79,140,255,.05); }
.drop .muted { display: block; font-size: 13px; }

.view { flex: 1; display: flex; min-height: 0; }
.stage { position: relative; flex: 1; min-width: 0; background: #000; }
.viewer-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud { z-index: 3; position: absolute; left: 14px; top: 12px; right: 14px; pointer-events: none; font-size: 13px; color: #fff; text-shadow: 0 1px 3px #000a; }
.navbar { z-index: 3; position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 4px; background: rgba(12,16,24,.82); border: 1px solid var(--line); border-radius: 12px; padding: 4px; backdrop-filter: blur(8px); }
.navbar button { border: 0; background: none; }
.navbar button.on { background: var(--accent); color: #fff; }
.loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; background: rgba(8,10,16,.88); text-align: center; z-index: 2; }
.loading .bar { width: 280px; height: 4px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.loading .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.panel { width: 340px; flex: none; overflow: auto; background: var(--bg2); border-left: 1px solid var(--line); padding: 6px 14px 30px; }
.panel details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.panel summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.panel summary::-webkit-details-marker { display: none; }
.panel summary::after { content: '▾'; float: right; color: var(--muted); }
.panel details:not([open]) summary::after { content: '▸'; }
.panel label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.panel label select, .panel label input { margin-top: 4px; color: var(--fg); }
.panel .val { float: right; color: var(--fg); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.toggle { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; }
.toggle input { width: auto; margin: 0 !important; }

.xp { display: grid; gap: 8px; margin-top: 10px; }
.xpcard { display: grid; grid-template-columns: 36px 1fr; gap: 2px 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; }
.xpcard .ic { grid-row: span 2; font-size: 22px; text-align: center; }
.xpcard b { font-size: 14px; }
.xpcard small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.xpcard.primary { border-color: var(--accent); background: linear-gradient(135deg, rgba(79,140,255,.18), rgba(79,140,255,.04)); }
.xpsub { display: flex; gap: 6px; margin: -2px 0 2px 46px; }
.xpsub button { font-size: 12px; padding: 5px 9px; }

.info table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.info td { padding: 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.info td:first-child { color: var(--muted); width: 42%; padding-right: 8px; }
.info h3 { margin: 4px 0 2px; font-size: 15px; color: var(--fg); }
.inteditor { background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 8px 0; font-size: 13px; }
.inteditor .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.inteditor label { margin: 4px 0 0; }
.intlist { list-style: none; padding: 0; margin: 8px 0; font-size: 13px; max-height: 220px; overflow: auto; }
.intlist li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.intlist li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intlist li em { color: var(--muted); font-style: normal; flex: none; }

@media (max-width: 860px) {
  .view { flex-direction: column; }
  .panel { width: auto; max-height: 42vh; border-left: 0; border-top: 1px solid var(--line); }
  .top .sub { display: none; }
}

.vps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.vps button { font-size: 12.5px; padding: 6px 10px; border-radius: 99px; }
.vps button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
