:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --side: #eceef2;
  --ink: #1d2230;
  --muted: #667085;
  --line: #d6d9e0;
  --accent: #3b5bdb;
  --accent-ink: #ffffff;
  --accent-soft: #e5eaff;
  --danger: #c92a2a;
  --cell: #ffffff;
  --cell-alt: #fafbfc;
  --head: #f0f2f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
button {
  font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover { filter: brightness(1.08); }
button.small { padding: 3px 8px; font-size: 12px; }
button.danger { color: var(--danger); }
input, select, textarea { font: inherit; color: var(--ink); }

.topbar {
  display: flex; align-items: center; gap: 16px; padding: 8px 16px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.logo { width: 32px; height: 28px; display: inline-flex; }
.logo svg { width: 100%; height: 100%; display: block; }
.toolbar { display: flex; gap: 14px; flex-wrap: wrap; }
.toolbar .group { display: flex; gap: 6px; }
.save-state { margin-left: auto; color: var(--muted); font-size: 12px; }

.layout { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 250px; flex-shrink: 0; background: var(--side); border-right: 1px solid var(--line);
  overflow-y: auto; padding: 10px 8px;
}
.sidebar h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  margin: 14px 8px 6px; display: flex; justify-content: space-between; align-items: center;
}
.sidebar h3 button { padding: 0 6px; font-size: 13px; border: none; background: none; color: var(--accent); }
.nav-item {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px;
  cursor: pointer; user-select: none;
}
.nav-item:hover { background: rgba(0,0,0,.05); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 16px; text-align: center; opacity: .8; }
.nav-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .x { visibility: hidden; border: none; background: none; padding: 0 4px; color: var(--muted); }
.nav-item:hover .x { visibility: visible; }
.nav-item .x:hover { color: var(--danger); }
.nav-empty { color: var(--muted); font-size: 12px; padding: 2px 8px 4px; }

.main { flex: 1; overflow: auto; padding: 18px 22px; min-width: 0; }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.view-head h2 { margin: 0; font-size: 19px; }
.view-head .sub { color: var(--muted); font-size: 13px; }
.view-head .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

/* Data table */
.grid-wrap { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-height: calc(100vh - 170px); }
table.grid { border-collapse: separate; border-spacing: 0; }
table.grid th, table.grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; }
table.grid thead th { position: sticky; top: 0; background: var(--head); z-index: 2; }
table.grid th.rownum, table.grid td.rownum {
  position: sticky; left: 0; background: var(--head); color: var(--muted); font-size: 12px;
  width: 44px; min-width: 44px; text-align: center; z-index: 1;
}
table.grid thead th.rownum { z-index: 3; }
table.grid th .colhead { display: flex; align-items: center; }
table.grid th input {
  width: 120px; border: none; background: transparent; padding: 7px 8px; font-weight: 600; text-align: center;
}
table.grid th .del { border: none; background: none; color: var(--muted); padding: 0 6px; visibility: hidden; }
table.grid th:hover .del { visibility: visible; }
table.grid th .del:hover { color: var(--danger); }
table.grid th.xcol, table.grid td.xcol { background: #f7f3e8; }
table.grid.grouped thead tr:first-child th { height: 33px; }
table.grid.grouped thead tr.subhead th { top: 33px; font-size: 11px; color: var(--muted); font-weight: 500; padding: 3px 0; }
table.grid.grouped th.dshead input { width: 100%; }
table.grid td.dsstart, table.grid.grouped thead tr.subhead th:nth-child(1) { border-left: 2px solid #b8bdc8; }
table.grid.grouped td input { width: 84px; }
table.grid.grouped td.xcol input { width: 110px; }
table.grid td input {
  width: 128px; border: none; padding: 6px 8px; text-align: right; background: var(--cell);
}
table.grid td.textcell input { text-align: left; }
table.grid tr:nth-child(even) td input { background: var(--cell-alt); }
table.grid td.xcol input { background: #fbf8ef; }
table.grid td input:focus, table.grid th input:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff; }
table.grid td input.bad { color: var(--danger); }
.grid-tools { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.hint { color: var(--muted); font-size: 12px; }

/* Results */
.result-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.result-card h4 { margin: 0; padding: 9px 14px; background: var(--head); border-bottom: 1px solid var(--line); font-size: 13px; }
table.res { border-collapse: collapse; width: 100%; }
table.res td, table.res th { padding: 6px 14px; border-bottom: 1px solid #eef0f4; text-align: left; font-variant-numeric: tabular-nums; }
table.res th { font-size: 12px; color: var(--muted); font-weight: 600; }
table.res tr:last-child td { border-bottom: none; }
table.res td:first-child { color: #344054; }
table.res td.num, table.res th.num { text-align: right; }
.res-note { padding: 8px 14px; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.badge.yes { background: #d3f9d8; color: #2b8a3e; }
.badge.no { background: #f1f3f5; color: #495057; }
.error-box { background: #fff5f5; border: 1px solid #ffc9c9; color: var(--danger); padding: 12px 14px; border-radius: 8px; }

/* Graph */
.graph-layout { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.graph-opts {
  width: 270px; flex-shrink: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
}
.graph-opts label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 3px; }
.graph-opts label.check { display: flex; gap: 6px; align-items: center; color: var(--ink); font-size: 13px; }
.graph-opts input[type=text], .graph-opts input[type=number], .graph-opts select { width: 100%; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.graph-opts .row2 { display: flex; gap: 8px; }
.graph-opts .row2 > div { flex: 1; }
.graph-opts h5 { margin: 14px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.graph-opts h5:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.graph-canvas { flex: 1; min-width: 0; max-width: 100%; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }

/* Start page */
.welcome { max-width: 720px; margin: 30px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px 32px; }
.welcome h1 { margin-top: 0; }
.welcome .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 18px 0; }
.welcome .card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; }
.welcome .card:hover { border-color: var(--accent); background: var(--accent-soft); }
.welcome .card b { display: block; margin-bottom: 4px; }
.welcome .card span { color: var(--muted); font-size: 13px; }

/* Dialog */
dialog { border: none; border-radius: 12px; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(20,24,35,.35); }
dialog form { padding: 20px 22px; }
dialog h3 { margin: 0 0 14px; }
dialog .field { margin-bottom: 12px; }
dialog .field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
dialog select, dialog input[type=text], dialog input[type=number] { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }
dialog .choices { display: grid; gap: 8px; }
dialog .choice { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; align-items: flex-start; }
dialog .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
dialog .choice small { display: block; color: var(--muted); }
dialog .choice-group { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 0; }
dialog .row2-dlg { display: flex; gap: 10px; }
dialog .row2-dlg > .field { flex: 1; }
dialog form { max-height: calc(100vh - 60px); overflow-y: auto; }
dialog .buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
dialog .checks label { display: flex; gap: 6px; align-items: center; margin: 4px 0; }

@media (max-width: 760px) {
  body { height: auto; overflow: auto; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); max-height: 220px; }
  .main { padding: 14px 16px; }
  .graph-opts { width: 100%; }
}

button:disabled { opacity: .45; cursor: default; border-color: var(--line); }

/* Navigator: search and family */
#navSearch { width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin-bottom: 2px; }
.nav-empty a { color: var(--muted); font-style: italic; text-decoration: none; }
.nav-empty a:hover { color: var(--accent); }
.family { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 4px; }
.nav-item[draggable=true] { cursor: grab; }

/* Info sheet */
.info-sheet { max-width: 760px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.info-table td { padding: 4px 6px; }
.info-table input { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; }
.info-table td:first-child { width: 36%; }
.info-table td:last-child { width: 40px; }
.notes-label { display: block; font-size: 12px; color: var(--muted); margin: 16px 0 4px; }
#infoNotes { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; resize: vertical; }

/* Layouts */
.layout-tools { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.layout-tools select, .layout-tools input { margin-left: 6px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); }
.layout-page-wrap { background: #d9dce2; border-radius: 8px; padding: 22px; overflow: auto; }
.layout-page { position: relative; background: #fff; width: 100%; max-width: 1100px; margin: 0 auto; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.layout-title { position: absolute; display: flex; align-items: center; font: bold 18px Arial, Helvetica, sans-serif; }
.lcell { position: absolute; display: flex; align-items: center; justify-content: center; }
.lcell.empty { background: #c9ccd2; color: #4a5060; font-size: 12px; padding: 10px; }
.lcell.empty select { display: block; margin-top: 8px; max-width: 100%; padding: 4px; border-radius: 4px; border: 1px solid #aaa; background: #fff; }
.lcell.filled img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lcell.filled:hover { outline: 1px dashed #9aa3b5; }
.lcell-bar { position: absolute; top: 2px; right: 2px; display: none; gap: 4px; align-items: center; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; font-size: 11px; }
.lcell-bar span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.lcell:hover .lcell-bar { display: flex; }
.lcell.drop { outline: 3px solid var(--accent); outline-offset: -3px; background: var(--accent-soft); }

/* Linked tables */
.derived-note { background: #eef3ff; border: 1px solid #c9d6ff; color: #2c3e7a; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid-wrap.readonly td input { color: #3d4a66; cursor: default; }
.grid-wrap.readonly th input { pointer-events: none; }
.grid-wrap.readonly .del { display: none; }

/* Sample size */
.power-result { margin: 6px 0 8px; }
.power-n { font-size: 30px; font-weight: 700; color: var(--accent); }
.power-n span { font-size: 14px; font-weight: 500; color: var(--muted); }
.power-result tr.hl td { background: var(--accent-soft); font-weight: 600; }

.calc-result { background: var(--accent-soft); border-radius: 8px; padding: 12px 14px; margin-top: 6px; line-height: 1.5; }

/* Analyze dialog with categories (as Prism) */
dialog { width: min(720px, calc(100vw - 32px)); }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cat-tab { font-size: 12px; padding: 5px 9px; border-radius: 14px; background: #f3f4f7; }
.cat-tab span { margin-left: 5px; font-size: 10px; color: var(--muted); background: #fff; border-radius: 8px; padding: 0 5px; }
.cat-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.cat-tab.active span { color: var(--accent); }
.cat-pane { max-height: 320px; overflow-y: auto; padding-right: 4px; margin-bottom: 8px; }
dialog .choice.disabled { opacity: .45; cursor: default; }

.cat-pane[hidden], [hidden] { display: none !important; }

#fileState { color: var(--ink); font-weight: 500; margin-right: 8px; }
#fileState.dirty { color: #b35806; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #1d2230; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 1000; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Free-form layout editor */
.lay-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; align-items: center; }
.lay-group { display: flex; gap: 4px; }
.lay-tools button { padding: 5px 10px; font-size: 13px; }
.lay-tools select { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; max-width: 200px; }
.lay-wrap { display: flex; gap: 14px; align-items: flex-start; }
.lay-stage { flex: 1; min-width: 0; background: #d9dce2; border-radius: 8px; padding: 18px; overflow: auto; }
.lay-page { position: relative; background: #fff; margin: 0 auto; box-shadow: 0 4px 18px rgba(0,0,0,.18); user-select: none; touch-action: none; }
.lay-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa1ae; font-size: 13px; padding: 20px; text-align: center; }
.lo { position: absolute; cursor: move; }
.lo img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.lo svg { display: block; pointer-events: none; }
.lo-line svg .hit { pointer-events: stroke; }
.lo-line { pointer-events: none; }
.lo-line svg { pointer-events: none; }
.lo-line .hit, .lo-line .lh { pointer-events: auto; }
.lo-text { position: absolute; inset: 0; white-space: pre-wrap; line-height: 1.2; font-family: Arial, Helvetica, sans-serif; overflow: visible; word-break: break-word; }
.lo-text.lo-center { display: flex; align-items: center; justify-content: center; text-align: center; }
.lo-text[contenteditable=true] { outline: 2px solid var(--accent); background: rgba(255,255,255,.9); cursor: text; z-index: 5; }
.lo-missing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #f6e7e7; color: #a33; font-size: 11px; }
.lo:hover:not(.sel) { outline: 1px dashed #9aa3b5; }
.lo-line:hover:not(.sel) { outline: none; }
.lo.sel:not(.lo-line) { outline: 1.5px solid var(--accent); }
.lh { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid var(--accent); border-radius: 2px; z-index: 10; }
.lh-nw { left: -5px; top: -5px; cursor: nwse-resize; } .lh-n { left: calc(50% - 5px); top: -5px; cursor: ns-resize; } .lh-ne { right: -5px; top: -5px; cursor: nesw-resize; }
.lh-e { right: -5px; top: calc(50% - 5px); cursor: ew-resize; } .lh-se { right: -5px; bottom: -5px; cursor: nwse-resize; } .lh-s { left: calc(50% - 5px); bottom: -5px; cursor: ns-resize; }
.lh-sw { left: -5px; bottom: -5px; cursor: nesw-resize; } .lh-w { left: -5px; top: calc(50% - 5px); cursor: ew-resize; }
.lh-pt { border-radius: 50%; cursor: crosshair; }
.lay-props { width: 240px; flex-shrink: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.lay-props h5 { margin: 10px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lay-props h5:first-child { margin-top: 0; }
.lay-props label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.lay-props label.check { display: flex; gap: 6px; align-items: center; color: var(--ink); }
.lay-props input[type=number], .lay-props input[type=text], .lay-props select, .lay-props textarea { width: 100%; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; font: inherit; margin-top: 2px; }
.lay-props input[type=color] { width: 100%; height: 28px; padding: 1px; border: 1px solid var(--line); border-radius: 5px; margin-top: 2px; }
.lay-props .row2 { display: flex; gap: 8px; } .lay-props .row2 > * { flex: 1; }
.lay-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
@media (max-width: 900px) { .lay-wrap { flex-direction: column; } .lay-props { width: 100%; } }

/* ---- New data table dialog (Prism style) ---- */
dialog:has(.nt-wrap) { width: min(900px, calc(100vw - 32px)); }
.nt-wrap { display: flex; gap: 16px; align-items: stretch; }
.nt-types { flex: 0 0 190px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 12px; }
.nt-type { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.nt-type input { position: absolute; opacity: 0; pointer-events: none; }
.nt-type .ic { width: 22px; text-align: center; font-size: 16px; color: var(--muted); }
.nt-type:hover { background: var(--head); }
.nt-type:has(input:checked) { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nt-type:has(input:checked) .ic { color: var(--accent-ink); }
.nt-type:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.nt-main { flex: 1; min-width: 0; }
.nt-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.nt-top .hint { flex: 1; margin: 0; }
.nt-preview { flex: 0 0 auto; max-width: 62%; overflow: hidden; }
table.nt-grid { border-collapse: collapse; font-size: 10px; color: var(--muted); }
table.nt-grid th, table.nt-grid td { border: 1px solid var(--line); padding: 2px 6px; min-width: 22px; height: 16px; font-weight: 500; white-space: nowrap; }
table.nt-grid thead th { background: var(--head); color: var(--ink); }
table.nt-grid tbody th { background: var(--head); text-align: left; }
table.nt-grid td { background: #fff; }
.nt-start { display: flex; align-items: center; gap: 6px; margin: 10px 0 6px; cursor: pointer; }
.nt-sub { margin-left: 24px; }
.nt-wrap:not(:has(input[name=start][value=empty]:checked)) .nt-sub[data-for=empty] { opacity: .5; }
.nt-wrap:not(:has(input[name=start][value=tutorial]:checked)) .nt-sub[data-for=tutorial] { opacity: .6; }
.nt-entry { display: grid; gap: 4px; }
.nt-entry label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.nt-reps input { width: 80px !important; }
.nt-tuts { max-height: 230px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px 8px; }
.nt-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 2px; }
.nt-tut { display: flex; gap: 8px; align-items: flex-start; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.nt-tut:has(input:checked) { background: var(--accent-soft); }
.nt-tut small { display: block; color: var(--muted); }
@media (max-width: 640px) { .nt-wrap { flex-direction: column; } .nt-types { flex: none; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 8px; } .nt-top { flex-direction: column; } .nt-preview { max-width: 100%; } }
.nt-sub:has(input[name=entry]:not([value=raw]):checked) .nt-reps { display: none; }
.lay-band { position: absolute; border: 1px dashed var(--accent); background: rgba(59,91,219,.08); pointer-events: none; z-index: 20; }
.lo.locked { cursor: default; }
.lo-lock { position: absolute; right: 2px; top: 2px; font-size: 11px; background: #fff; border-radius: 3px; padding: 0 2px; }
.lay-align { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; }
.lay-align > span { width: 100%; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.crop-wrap { display: flex; justify-content: center; background: var(--head); border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.crop-box { position: relative; display: inline-block; max-width: 100%; }
.crop-box img { display: block; max-width: 100%; max-height: 320px; }
.crop-shade { position: absolute; outline: 2px solid var(--accent); box-shadow: 0 0 0 2000px rgba(20,24,35,.45); pointer-events: none; }
.crop-box { overflow: hidden; }

/* ---- Export dialog ---- */
.ex-grid { display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; align-items: center; }
.ex-grid > label { font-size: 13px; color: var(--muted); text-align: right; }
.ex-name { display: flex; align-items: center; gap: 4px; }
.ex-name span { color: var(--muted); white-space: nowrap; }
.ex-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ex-row label { display: flex; align-items: center; gap: 5px; font-size: 13px; }
dialog .ex-row select { width: auto; }
.ex-hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.ex-off { opacity: .4; pointer-events: none; }
.ex-check { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 6px; }
.ex-check small { color: var(--muted); }
.ex-info { background: var(--head); border-radius: 6px; padding: 7px 10px; font-size: 12.5px; margin: 14px 0 6px; min-height: 18px; }
[data-multi][hidden] { display: none !important; }
@media (max-width: 560px) { .ex-grid { grid-template-columns: 1fr; } .ex-grid > label { text-align: left; } }
