:root {
  --bg: #0a0a0a;
  --panel: #121212;
  --panel-2: #1a1a1a;
  --line: #262626;
  --line-2: #333;
  --text: #f3f3f1;
  --muted: #9a9a96;
  --dim: #6c6c68;
  --accent: #ff5500;
  --accent-2: #ff7a00;
  --blue: #036e9f;
  --canvas: #e7e6e2;
  --tile: #efeeea;
  --radius: 10px;
  --display: "Montserrat", "Arial Black", system-ui, sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 var(--ui);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
svg { display: block; }
.icon-btn svg, .btn svg, .zoombar svg, .mini-btn svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; gap: 14px;
  height: 58px; padding: 0 14px 0 18px;
  background: #000;
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 22px; width: auto; display: block; }
.product {
  font: 900 11px/1 var(--display); letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line-2);
  white-space: nowrap; flex: none;
}
.title-wrap { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; gap: 8px; }
.crumb {
  color: var(--muted); text-decoration: none; font: 800 12px/1 var(--display); text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30%;
}
.crumb:hover { color: var(--text); }
.crumb::after { content: " /"; color: var(--dim); }
.folder-back { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
.folder-back:hover { color: var(--text); }
.guest-badge { font-size: 11px; font-weight: 600; color: #ffb000; border: 1px solid rgba(255,176,0,.4); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.sync { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a6ce45; }
.sync[data-state="pending"]::before { background: #ffb000; }
.sync[data-state="err"] { color: #ff8a8a; }
.sync[data-state="err"]::before { background: #ff3b3b; }
body.view .sync { position: absolute; right: 14px; top: 70px; z-index: 5; background: rgba(10,10,10,.85); padding: 5px 10px; border-radius: 999px; }
body.embed .sync { top: 12px; }
.gone {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px;
  background: rgba(231,230,226,.92); color: #111; font-size: 14px;
}
.gone b { font: 900 18px/1.2 var(--display); text-transform: uppercase; }
.share-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 6px; align-items: center; margin: 10px 0; }
.share-row .inp { font-size: 12px; color: #cfcfcb; min-width: 0; }
.badge { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 4px 8px; white-space: nowrap; }
.badge.view { background: rgba(3,110,159,.25); color: #7cc7ea; }
.badge.edit { background: rgba(255,85,0,.2); color: #ff9a5c; }
@media (max-width: 600px) { .share-row { grid-template-columns: auto 1fr; } .share-row .inp { grid-column: 1 / -1; order: -1; } }
.plan-name {
  width: min(320px, 100%); min-width: 80px; background: transparent; border: 1px solid transparent;
  border-radius: 8px; padding: 7px 10px; text-align: center;
  font: 800 15px/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em;
  text-overflow: ellipsis;
}
.plan-name:hover { border-color: var(--line-2); }
.plan-name:focus { outline: none; border-color: var(--accent); background: var(--panel); }
.view-title { text-align: center; min-width: 0; }
.vt-name { font: 900 16px/1.15 var(--display); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-meta { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions { display: flex; align-items: center; gap: 6px; flex: none; }
.sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer;
  font-weight: 600; white-space: nowrap;
}
.btn:hover { border-color: #555; }
.btn.ghost { background: transparent; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #ff6a1f; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.danger { color: #ff6b6b; }
.btn.block { width: 100%; justify-content: center; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

.spectrum {
  height: 3px;
  background: linear-gradient(90deg, #ff0000 0 14%, #ff5500 14% 28%, #ff7a00 28% 42%, #ffb000 42% 56%, #ffd400 56% 70%, #a6ce45 70% 85%, #036e9f 85% 100%);
}

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr 288px; min-height: 0; }
.panel { background: var(--panel); min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
#palette { border-right: 1px solid var(--line); padding-bottom: 24px; touch-action: pan-y; }
#props { border-left: 1px solid var(--line); padding: 16px 16px 32px; }

.search { position: sticky; top: 0; z-index: 2; padding: 12px; background: var(--panel); }
.search input {
  width: 100%; height: 34px; padding: 0 12px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line-2);
}
.search input:focus { outline: none; border-color: var(--accent); }
.group-h {
  font: 900 10px/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); padding: 14px 14px 8px;
}
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 12px; }
.tile {
  border: 1px solid transparent; border-radius: 9px; background: transparent; padding: 0 0 6px;
  cursor: grab; text-align: center; user-select: none; -webkit-user-select: none;
}
.tile:hover { border-color: var(--line-2); background: var(--panel-2); }
.tile:active { cursor: grabbing; }
.tile .ic { height: 60px; border-radius: 8px 8px 0 0; background: var(--tile); display: grid; place-items: center; padding: 8px; }
.tile:not(:hover) .ic { border-radius: 8px; }
.tile .ic svg { width: 100%; height: 100%; }
.tile .nm { font-size: 11.5px; font-weight: 500; margin-top: 6px; color: #d9d9d5; line-height: 1.2; padding: 0 2px; }
.ghost-drag {
  position: fixed; z-index: 50; pointer-events: none; width: 88px; height: 64px; padding: 8px;
  border-radius: 10px; background: rgba(239,238,234,.92); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transform: translate(-50%, -50%);
}
.ghost-drag svg { width: 100%; height: 100%; }

/* ---------- canvas ---------- */
#canvasWrap { position: relative; background: var(--canvas); overflow: hidden; min-width: 0; }
#stage { width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; }
#stage.pan-ready, body.view #stage { cursor: grab; }
#stage.panning { cursor: grabbing; }
.item { cursor: move; }
body.view .item { cursor: inherit; }
.item.locked { cursor: default; }
.o { vector-effect: non-scaling-stroke; stroke-width: 1.25px; }
.thin { vector-effect: non-scaling-stroke; stroke-width: .8px; }
.wallline { vector-effect: non-scaling-stroke; stroke-width: 3px; }
.lbl { font-family: var(--ui); font-weight: 700; pointer-events: none; }
.dim { font-family: var(--ui); font-weight: 600; fill: #7d7d78; }
.dimline { vector-effect: non-scaling-stroke; stroke-width: 1px; stroke: #a9a8a3; fill: none; }
#overlay { pointer-events: none; }
.selbox { fill: none; stroke: var(--accent); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.hline { stroke: var(--accent); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.handle { fill: #fff; stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; pointer-events: all; }
.handle.rot { cursor: grab; }
.handle.res { cursor: nwse-resize; }
.guide { stroke: var(--accent); stroke-width: 1px; stroke-opacity: .55; vector-effect: non-scaling-stroke; }
.guide-t { font-family: var(--ui); font-weight: 600; fill: #d44700; }
.marq { fill: rgba(255,85,0,.08); stroke: var(--accent); stroke-width: 1px; vector-effect: non-scaling-stroke; }

.zoombar {
  position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center;
  background: #111; border-radius: 999px; padding: 3px; box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.zoombar button { height: 30px; min-width: 30px; border: 0; background: transparent; border-radius: 999px; cursor: pointer; display: grid; place-items: center; color: #fff; }
.zoombar button:hover { background: #2a2a2a; }
.zoombar .pct { font-size: 12px; font-weight: 600; min-width: 54px; font-variant-numeric: tabular-nums; }

.tip {
  position: fixed; z-index: 40; pointer-events: none; display: none;
  background: #111; color: #fff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px;
  transform: translate(14px, 14px); white-space: pre-line; max-width: 280px; font-variant-numeric: tabular-nums;
}

/* ---------- properties ---------- */
.ph { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ph .ic { width: 52px; height: 44px; border-radius: 8px; background: var(--tile); padding: 5px; flex: none; }
.ph .ic svg { width: 100%; height: 100%; }
.pt { font: 900 14px/1.15 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.ps { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sec { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.sec:first-child { border-top: 0; padding-top: 0; }
.sec h3 { font: 900 10px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field input, .field select, .inp {
  width: 100%; height: 32px; padding: 0 10px; border-radius: 7px;
  background: var(--panel-2); border: 1px solid var(--line-2);
}
.field input:focus, .field select:focus, .inp:focus { outline: none; border-color: var(--accent); }
.field input[type=date] { color-scheme: dark; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.with-btns { display: flex; gap: 6px; }
.with-btns input { flex: 1; min-width: 0; }
.mini-btn {
  height: 32px; min-width: 32px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--panel-2); cursor: pointer; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600;
}
.mini-btn:hover { border-color: #555; }
.mini-btn svg { width: 16px; height: 16px; }
.btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.btn-grid.two { grid-template-columns: 1fr 1fr; }
.btn-grid.four { grid-template-columns: repeat(4, 1fr); }
.btn.on, .mini-btn.on { border-color: var(--accent); color: var(--accent-2); }
textarea.inp { height: auto; min-height: 52px; padding: 8px 10px; resize: vertical; line-height: 1.4; }
.inv em.per { font-style: normal; color: var(--dim); font-size: 11px; margin-left: 4px; }
.smart { display: grid; gap: 6px; padding: 0 12px 4px; }
.smart button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 9px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer;
}
.smart button:hover, .smart button:first-child { border-color: var(--accent); }
.smart .ic { width: 46px; height: 36px; border-radius: 6px; background: var(--tile); padding: 3px; flex: none; }
.smart .ic svg { width: 100%; height: 100%; }
.smart .st { min-width: 0; flex: 1; }
.smart b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smart .st span { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.smart kbd { flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sw {
  width: 24px; height: 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); padding: 0;
}
.sw.on { border-color: #fff; }
.sw.def { background: conic-gradient(#ff0000, #ffb000, #a6ce45, #036e9f, #ff0000); }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.hint { color: var(--dim); font-size: 11.5px; margin: -4px 0 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.stat { background: var(--panel-2); border-radius: 8px; padding: 10px; }
.stat b { display: block; font: 900 20px/1 var(--display); }
.stat span { color: var(--muted); font-size: 11px; }
.inv { list-style: none; padding: 0; margin: 0 0 8px; }
.inv li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.inv li b { font-variant-numeric: tabular-nums; }
.keys { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 12px; }
.keys li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
kbd { font: 600 11px var(--ui); color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }

/* ---------- status ---------- */
.status {
  display: flex; align-items: center; gap: 16px; height: 32px; padding: 0 14px;
  background: #000; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.status .grow { flex: 1; }
#cursor { font-variant-numeric: tabular-nums; min-width: 140px; text-align: right; }
.toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; color: #cfcfcb; }
.toggle input { accent-color: var(--accent); }

/* ---------- dialog ---------- */
dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--text);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0 20px; }
.dlg-head h2 { margin: 0; font: 900 16px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
#dlgBody { padding: 16px 20px 20px; overflow-y: auto; max-height: calc(100vh - 120px); }
.copy-row { display: flex; gap: 8px; margin-bottom: 4px; }
.copy-row input { flex: 1; min-width: 0; font-size: 12px; color: #cfcfcb; }
.note { color: var(--muted); font-size: 12px; margin: 8px 0 14px; }
.note.warn { color: #ffb000; }
.plan-list { list-style: none; padding: 0; margin: 0 0 18px; }
.plan-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-list li.cur .pl-name::after { content: "OPEN"; font: 800 9px var(--display); letter-spacing: .12em; color: var(--accent); margin-left: 8px; }
.pl-main { flex: 1; min-width: 0; }
.pl-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meta { color: var(--muted); font-size: 11.5px; }
.tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tpl { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; background: var(--panel-2); cursor: pointer; text-align: left; }
.tpl.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tpl b { display: block; font-size: 13px; }
.tpl span { color: var(--muted); font-size: 11.5px; }

/* ---------- toast / view ---------- */
#toast {
  position: fixed; left: 50%; bottom: 52px; transform: translate(-50%, 20px); opacity: 0;
  background: #fff; color: #111; font-weight: 600; padding: 9px 16px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: .2s; pointer-events: none; z-index: 60;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.view-only, .embed-badge, .mobile-only { display: none; }
body.view .view-only { display: block; }
body.view .edit-only { display: none !important; }
body.view .app { grid-template-columns: 1fr; }
body.view { grid-template-rows: auto auto 1fr; }
.view-card {
  position: absolute; left: 14px; bottom: 14px; width: 260px; max-height: calc(100% - 28px); overflow: auto;
  background: rgba(10,10,10,.94); border-radius: 12px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.view-card .stats { margin-bottom: 10px; }
.view-card details summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; list-style: none; }
.view-card details summary::-webkit-details-marker { display: none; }
.view-card details summary::after { content: " ▾"; }
.view-card details[open] summary::after { content: " ▴"; }
.view-card .inv { margin-top: 8px; }
.view-card .credit { margin-top: 10px; font-size: 11px; color: var(--dim); }
.view-card .credit a { color: var(--muted); }

body.embed { grid-template-rows: 1fr; }
body.embed .top, body.embed .spectrum, body.embed .view-card { display: none !important; }
body.embed .embed-badge {
  display: flex; align-items: center; gap: 8px; position: absolute; left: 10px; top: 10px;
  background: #000; color: #fff; text-decoration: none; border-radius: 999px; padding: 5px 12px 5px 5px; font-weight: 600; font-size: 12px;
}
.embed-badge img { width: 24px; height: 24px; border-radius: 999px; background: #fff; padding: 2px; }
.embed-badge em { font-style: normal; color: var(--accent-2); margin-left: 4px; }
#scrim { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .app { grid-template-columns: 210px 1fr 260px; }
  .product { display: none; }
}
@media (max-width: 860px) {
  .mobile-only { display: inline-grid; }
  body.view .mobile-only { display: none; }
  .desk-only { display: none !important; }
  .top { gap: 8px; padding: 0 8px; }
  .brand img { height: 16px; }
  .btn span { display: none; }
  .btn { padding: 0 9px; }
  .app { grid-template-columns: 1fr; position: relative; }
  #palette, #props {
    position: absolute; top: 0; bottom: 0; z-index: 20; width: min(300px, 86vw);
    transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.4);
  }
  #palette { left: 0; transform: translateX(-105%); }
  #props { right: 0; transform: translateX(105%); }
  body.show-palette #palette, body.show-props #props { transform: none; }
  body.show-palette #scrim, body.show-props #scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.35); }
  .status label.toggle:last-child { display: none; }
  body.view .top { padding: 0 12px; }
  body.view .product { display: none; }
  .view-card { left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 40%; }
  .zoombar { bottom: auto; top: 10px; right: 10px; }
}

/* ---------- project folders (home.html) ---------- */
body.home { display: block; overflow: auto; min-height: 100vh; }
body.home .top { position: sticky; top: 0; z-index: 10; }
.who { color: var(--muted); font-size: 12px; font-weight: 600; margin-right: 4px; }
.dash { max-width: 1040px; margin: 0 auto; padding: 36px 20px 80px; }
.dash h1 { font: 900 30px/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; margin: 0 0 8px; }
.dash .sub { color: var(--muted); margin: 0; }
.dash .sub b, .mono { color: var(--text); font-weight: 600; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 12px; margin-bottom: 14px; }
.back:hover { color: var(--text); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card {
  display: block; text-decoration: none; color: inherit; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; position: relative; overflow: hidden; transition: border-color .15s, transform .15s;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #ff0000, #ff5500, #ff7a00, #ffb000, #ffd400, #a6ce45, #036e9f); opacity: 0; transition: opacity .15s; }
.card:hover { border-color: #3a3a3a; transform: translateY(-1px); }
.card:hover::before { opacity: 1; }
.card-name { font: 900 17px/1.15 var(--display); text-transform: uppercase; margin-bottom: 4px; }
.card-client { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.card-link { font-size: 12px; font-weight: 600; color: var(--accent-2); margin-bottom: 4px; word-break: break-all; }
.card-meta { color: var(--dim); font-size: 12px; }
.empty { display: grid; gap: 6px; place-items: center; text-align: center; padding: 70px 20px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--muted); }
.empty b { color: var(--text); font: 900 16px/1.2 var(--display); text-transform: uppercase; }
.empty a { color: var(--accent-2); }
.versions { display: grid; gap: 8px; }
.version { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.version:hover { border-color: #3a3a3a; }
.v-main { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.v-name { font: 900 16px/1.2 var(--display); text-transform: uppercase; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.latest { font: 700 9.5px/1 var(--ui); letter-spacing: .08em; color: #a6ce45; border: 1px solid rgba(166,206,69,.45); border-radius: 999px; padding: 3px 7px; }
.v-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.v-meta .links { color: var(--accent-2); }
.v-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.v-actions a.btn { text-decoration: none; }
.slug-field { display: flex; align-items: center; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 7px; padding-left: 10px; }
.slug-field span { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.slug-field .inp { border: 0; background: transparent; padding-left: 1px; }
.slug-field:focus-within { border-color: var(--accent); }
a.btn { text-decoration: none; color: inherit; }
@media (max-width: 700px) {
  .version { flex-direction: column; align-items: stretch; }
  .v-actions { justify-content: flex-start; }
  .dash h1 { font-size: 24px; }
}

.perm { margin: 0 0 14px; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.perm li { margin: 4px 0; }
.perm b { color: var(--text); }
.dash .sub .badge { vertical-align: 1px; }

.stat.total { background: rgba(255,85,0,.14); box-shadow: inset 0 0 0 1px rgba(255,85,0,.35); }
.stat.total b { color: #ff9a5c; }
.btn .per { font-size: 10px; color: var(--muted); font-weight: 500; }
.btn-grid.four .btn { height: auto; padding: 6px 4px; line-height: 1.2; flex-direction: column; gap: 1px; }
