/* QR Builder — dark aesthetic matching onthehunt-app */
:root {
  --bg: #0b1220;
  --panel: #111827;
  --panel-2: #0f1726;
  --line: #243044;
  --accent: #f4d35e;
  --accent-dim: #c9ad48;
  --text: #e5e7eb;
  --muted: #93a4bd;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent); }

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.3px;
}
.topbar .brand .dot {
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 3px;
  display: inline-block;
}
.topbar .status {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  align-items: center;
}
.topbar .status .pill {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.pill.ok { color: var(--good); border-color: rgba(74,222,128,.4); }
.pill.off { color: var(--bad); border-color: rgba(248,113,113,.4); }

/* ---- Layout ---- */
.layout {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: flex-start;
  max-width: 1500px;
  margin: 0 auto;
}
.left { flex: 0 0 56%; max-width: 56%; position: sticky; top: 76px; }
.right { flex: 1 1 44%; min-width: 0; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .left, .right { flex: 1 1 100%; max-width: 100%; position: static; }
}

/* ---- Cards / sections ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.card > .card-head {
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

/* Collapsible sections */
details.section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
details.section > summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after {
  content: "▾";
  color: var(--muted);
  transition: transform .15s ease;
}
details.section[open] > summary::after { transform: rotate(180deg); }
.section-body { padding: 4px 16px 16px; }

/* ---- Preview ---- */
.preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  min-height: 340px;
  background:
    linear-gradient(45deg, #0e1626 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(-45deg, #0e1626 25%, transparent 25%) 0 0 / 24px 24px;
  background-color: #0a111f;
}
#qr-preview {
  background: transparent;
  border-radius: 8px;
  max-width: 100%;
}
#qr-preview svg, #qr-preview canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Frame around the QR (label) */
.frame-box {
  display: inline-block;
  text-align: center;
  background: var(--frame-bg, #fff);
  padding: 14px 14px 0;
}
.frame-box.rounded { border-radius: 16px; }
.frame-box.badge { border-radius: 16px; border: 4px solid var(--frame-fg, #000); }
.frame-label {
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 6px;
  color: var(--frame-fg, #000);
  text-transform: uppercase;
}

/* ---- Warnings ---- */
.warnings { padding: 0 16px 14px; }
.warn-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  border: 1px solid var(--line);
}
.warn-item.warn { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.06); }
.warn-item.bad { color: var(--bad); border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.06); }
.warn-item.good { color: var(--good); border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.06); }
.warn-item.info { color: var(--muted); border-color: var(--line); background: rgba(147,164,189,.06); }

/* ---- Forms ---- */
label.field { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=url], input[type=email], input[type=tel],
input[type=number], textarea, select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 70px; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline input[type=checkbox] { width: auto; }

input[type=color] {
  width: 44px; height: 34px; padding: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.color-row { display: flex; align-items: center; gap: 10px; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.seg {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.seg button {
  flex: 1 0 auto;
  min-width: 60px;
}

/* ---- Buttons ---- */
button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
button:hover { border-color: var(--accent); }
button.active { background: var(--accent); color: #1a1505; border-color: var(--accent); }
button.primary { background: var(--accent); color: #1a1505; border-color: var(--accent); }
button.primary:hover { background: var(--accent-dim); }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button:disabled { opacity: .45; cursor: not-allowed; }
button:disabled:hover { border-color: var(--line); }

.input-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.input-types button { flex: 0 0 auto; padding: 7px 11px; font-size: 13px; }

.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---- Export grid ---- */
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.export-grid button { width: 100%; }

/* ---- Projects / history thumbnails ---- */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.thumb {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px;
  background: var(--panel-2);
  cursor: pointer;
  text-align: center;
  position: relative;
}
.thumb:hover { border-color: var(--accent); }
.thumb .thumb-img {
  width: 100%; aspect-ratio: 1; background: #fff;
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.thumb .thumb-img svg, .thumb .thumb-img img { width: 100%; height: 100%; }
.thumb .thumb-name {
  font-size: 11px; color: var(--muted); margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb .thumb-del {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; line-height: 1;
  padding: 0; border-radius: 50%; font-size: 12px;
  background: rgba(0,0,0,.6); color: var(--bad); border: none;
  display: none;
}
.thumb:hover .thumb-del { display: block; }
.thumb .thumb-dup {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; line-height: 1;
  padding: 0; border-radius: 50%; font-size: 11px;
  background: rgba(0,0,0,.6); color: var(--accent); border: none;
  display: none;
}
.thumb:hover .thumb-dup { display: block; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: none; align-items: center; justify-content: center; z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: 460px; width: 100%;
  padding: 20px;
}
.modal h3 { margin-top: 0; }
.modal .modal-head { display: flex; justify-content: space-between; align-items: center; }
#scanner-region { width: 100%; margin: 14px 0; border-radius: var(--radius-sm); overflow: hidden; }
.scan-result {
  margin-top: 14px; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-size: 14px; word-break: break-all;
}
.scan-result.match { border-color: rgba(74,222,128,.5); background: rgba(74,222,128,.08); }
.scan-result.nomatch { border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.08); }

/* ---- Toast ---- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--accent);
  color: var(--text); padding: 11px 18px; border-radius: 999px;
  font-size: 14px; z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

.muted { color: var(--muted); }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; }

button.small { padding: 5px 10px; font-size: 12px; }

/* ---- Templates & Presets ---- */
.template-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}
.tpl-card {
  flex: 0 0 auto;
  width: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 8px 6px;
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: border-color .12s, transform .08s;
}
.tpl-card:hover { border-color: var(--accent); }
.tpl-card:active { transform: scale(.97); }
.tpl-card .tpl-thumb {
  width: 100%; aspect-ratio: 1; background: #fff;
  border-radius: 4px; overflow: hidden; display: flex;
  align-items: center; justify-content: center;
}
.tpl-card .tpl-thumb svg, .tpl-card .tpl-thumb canvas { width: 100%; height: 100%; }
.tpl-card .tpl-icon { font-size: 18px; }
.tpl-card .tpl-label {
  font-size: 11px; color: var(--muted); margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tpl-card .tpl-swatch {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: 4px; vertical-align: middle;
  border: 1px solid rgba(255,255,255,.2);
}
.tpl-card .tpl-del {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; line-height: 1; padding: 0;
  border-radius: 50%; font-size: 11px;
  background: rgba(0,0,0,.6); color: var(--bad); border: none;
  display: none;
}
.tpl-card:hover .tpl-del { display: block; }
.presets-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
}
.presets-title { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---- Print guidance ---- */
.print-guidance {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  line-height: 1.6;
}
.print-guidance .pg-line { display: block; }
.print-guidance .pg-tip { color: var(--accent); margin-top: 4px; }

/* ---- History controls ---- */
.history-controls { display: flex; gap: 8px; margin-bottom: 12px; }
.history-controls input { flex: 1; }
.thumb .thumb-img.has-content { cursor: pointer; }

/* ---- CSV batch ---- */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color .12s, background .12s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(244,211,94,.05);
}
.dropzone .dropzone-icon { font-size: 28px; margin-bottom: 6px; }
.dropzone .link { color: var(--accent); text-decoration: underline; }
.table-scroll { overflow-x: auto; margin: 8px 0 4px; }
.csv-preview { border-collapse: collapse; font-size: 12px; width: 100%; }
.csv-preview th, .csv-preview td {
  border: 1px solid var(--line);
  padding: 5px 8px;
  text-align: left;
  white-space: nowrap;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
.csv-preview th { background: var(--panel-2); color: var(--text); font-weight: 600; }
.csv-preview td { color: var(--muted); }
code {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px; font-size: 12px;
}
.progress-wrap { margin-top: 12px; }
.progress-bar {
  height: 8px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 0%;
  background: var(--accent); transition: width .2s ease;
}

/* ---- UTM builder ---- */
details.utm {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  margin-top: 12px;
}
details.utm > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: flex; align-items: center; justify-content: space-between;
  user-select: none;
}
details.utm > summary::-webkit-details-marker { display: none; }
details.utm > summary::after { content: "▾"; color: var(--muted); }
details.utm[open] > summary::after { transform: rotate(180deg); }
.utm-body { padding: 4px 12px 12px; }
.utm-final {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; min-height: 54px;
}

/* ---- Dynamic links ---- */
.dyn-create {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 12px 14px 16px;
  margin-bottom: 16px;
}
.dyn-list { display: flex; flex-direction: column; gap: 10px; }
.dyn-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 12px;
}
.dyn-card.inactive { opacity: .6; }
.dyn-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dyn-slug {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; font-size: 14px; color: var(--text);
}
.dyn-short {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12px; color: var(--muted);
}
.dyn-short code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.dyn-dest {
  font-size: 12.5px; color: var(--muted); margin-top: 7px;
  word-break: break-all;
}
.dyn-dest strong { color: var(--text); font-weight: 600; }
.dyn-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  white-space: nowrap;
}
.badge.scans { color: var(--accent); border-color: rgba(244,211,94,.4); }
.badge.expiry { color: var(--warn); border-color: rgba(251,191,36,.35); }
.badge.limit { color: var(--warn); border-color: rgba(251,191,36,.35); }
.badge.pw { color: var(--muted); }
.badge.off { color: var(--bad); border-color: rgba(248,113,113,.35); }
.dyn-actions {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px;
}
.dyn-actions button { padding: 5px 9px; font-size: 12px; }
.dyn-actions .spacer { flex: 1; }

/* Active/inactive toggle switch */
.switch {
  position: relative; display: inline-block;
  width: 38px; height: 22px; flex: 0 0 auto;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--line); border-radius: 999px; transition: background .15s;
}
.switch .slider::before {
  content: ""; position: absolute; height: 16px; width: 16px;
  left: 3px; top: 3px; background: var(--muted);
  border-radius: 50%; transition: transform .15s, background .15s;
}
.switch input:checked + .slider { background: rgba(74,222,128,.4); }
.switch input:checked + .slider::before { transform: translateX(16px); background: var(--good); }

/* Inline edit form */
.dyn-edit {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}

/* ---- Analytics ---- */
.analytics-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.stat-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); padding: 12px;
}
.stat-card .stat-num { font-size: 24px; font-weight: 800; color: var(--accent); }
.stat-card .stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.analytics-block { margin-top: 16px; }
.analytics-block h4 {
  margin: 0 0 8px; font-size: 13px; color: var(--text); font-weight: 600;
}
.bar-chart { width: 100%; height: auto; display: block; }
.bar-chart rect { transition: opacity .12s; }
.bar-chart rect:hover { opacity: .7; }
.stat-bars { display: flex; flex-direction: column; gap: 6px; }
.stat-bar-row {
  display: grid; grid-template-columns: 70px 1fr 34px; gap: 8px;
  align-items: center; font-size: 12px;
}
.stat-bar-row .stat-bar-label { color: var(--muted); }
.stat-bar-row .stat-bar-track {
  height: 8px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
}
.stat-bar-row .stat-bar-fill { height: 100%; background: var(--accent); }
.stat-bar-row .stat-bar-val { text-align: right; color: var(--text); }
.recent-list { display: flex; flex-direction: column; gap: 4px; }
.recent-item {
  font-size: 12px; color: var(--muted); padding: 6px 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2);
  display: flex; justify-content: space-between; gap: 10px;
}
.recent-item .recent-time { color: var(--text); white-space: nowrap; }
.top-link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--panel-2); margin-bottom: 6px;
  cursor: pointer;
}
.top-link-row:hover { border-color: var(--accent); }
.top-link-row .tl-slug {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
}
.top-link-row .tl-count { color: var(--accent); font-weight: 700; font-size: 13px; }

/* ---- Login wall ---- */
.login-screen {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px;
}
.login-card {
  width: 100%; max-width: 360px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
}
.login-card .login-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; margin-bottom: 6px;
}
.login-card .login-brand .dot {
  width: 14px; height: 14px; background: var(--accent);
  border-radius: 3px; display: inline-block;
}
.login-card h2 { margin: 4px 0 16px; font-size: 16px; color: var(--muted); font-weight: 600; }
.login-error { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 10px; }

/* ---- Header user pill ---- */
.pill.user-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.pill.user-pill .pill-sep { color: var(--line); }
.pill.user-pill a { color: var(--accent); text-decoration: none; cursor: pointer; }
.pill.user-pill a:hover { text-decoration: underline; }

/* ---- localhost banner ---- */
.localhost-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1500px; margin: 14px auto 0; padding: 10px 16px;
  background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.4);
  border-radius: var(--radius-sm); color: var(--warn); font-size: 13.5px;
}
.localhost-banner button { flex: 0 0 auto; color: var(--warn); }

/* ---- Logo upload / picker ---- */
.logo-upload-row { display: flex; gap: 8px; margin-top: 4px; }
.logo-upload-row button { flex: 1; }
.logo-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.logo-chip {
  position: relative; width: 56px; height: 56px;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; overflow: hidden; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.logo-chip:hover { border-color: var(--accent); }
.logo-chip.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(244,211,94,.35); }
.logo-chip img { width: 100%; height: 100%; object-fit: contain; }
.logo-chip .logo-del {
  position: absolute; top: 1px; right: 1px;
  width: 18px; height: 18px; line-height: 1; padding: 0;
  border-radius: 50%; font-size: 11px;
  background: rgba(0,0,0,.65); color: var(--bad); border: none;
  display: none;
}
.logo-chip:hover .logo-del { display: block; }

/* ---- QR scan-verification badge (improvement H) ---------------------- */
.verify-wrap { display: flex; justify-content: center; padding: 0 16px 4px; }
.verify-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted); max-width: 100%;
}
.verify-badge.pending { color: var(--muted); }
.verify-badge.ok { color: var(--good); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.verify-badge.warn { color: var(--warn); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.verify-badge.bad { color: var(--bad); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }

/* ---- Print Sheet modal (improvement F) ------------------------------- */
.layout-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.layout-opt {
  display: flex; gap: 10px; align-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 10px; background: var(--panel-2);
}
.layout-opt:hover { border-color: var(--accent); }
.layout-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(244,211,94,.3); }
.layout-opt input { display: none; }
.layout-opt .diagram {
  display: grid; gap: 1px; flex: 0 0 auto;
  width: 28px; height: 34px; padding: 2px;
  border: 1px solid var(--line); border-radius: 3px; background: var(--bg);
}
.layout-opt .diagram span { background: var(--accent); border-radius: 1px; }
.layout-opt .lo-text { font-size: 11px; line-height: 1.25; }
.layout-opt .lo-name { font-weight: 600; color: var(--text); }
.layout-opt .lo-dim { color: var(--muted); }
.ps-items-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; margin-bottom: 6px;
}
.ps-items { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.ps-item { display: flex; gap: 6px; align-items: center; }
.ps-item input { flex: 1 1 auto; }
.ps-item .ps-del {
  flex: 0 0 auto; width: 30px; padding: 0; color: var(--bad);
}
