/* NIHSS Scorer — giao diện. Token màu và kiểu chữ dùng chung với newbieneuro.com
   (website/public/styles.css, cong-cu-lam-sang/css/app.css). */

:root {
  --bg: #E7EAE7; --panel: #F1F3F0; --sunk: #DBE0DC; --rowHover: #EFF2EF;
  --ink: #12191A; --ink2: #3C4745; --meta: #5B6764;
  --hair: #BFC7C1; --strong: #12191A; --dash: #8E9A94;
  --core: #A8114F; --coreH: #78093A; --coreOn: #FFFFFF; --coreBg: #F3DCE6;
  --pen: #1B6655; --penOn: #FFFFFF; --penBg: #D3E6DE;
  --amber: #8A5A00; --amberBg: #F3E5C4;
  --inv: #12191A; --invInk: #E7EAE7; --invInk2: #C3CCC8; --invMeta: #9DA9A4; --invHair: #3A4548;
  --invCore: #FF7FAE; --invPen: #6ED3B4; --invAmber: #F2C46B;
  --shadow: rgba(12, 18, 20, 0.16);
  --scrim: rgba(12, 18, 20, 0.45);

  --nihss-skin: #EBC6A6;
  --nihss-skin-line: #C99A74;
  --nihss-hair: #3A2A22;
  --nihss-shirt: #F1F3F0;
  --nihss-shirt-line: #BFC7C1;
  --nihss-shorts: #3C4745;
  --nihss-ink: #8C6C4C;
  --nihss-hl: var(--core);

  --display: 'Archivo', 'Be Vietnam Pro', system-ui, sans-serif;
  --body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #12191B; --panel: #1B2326; --sunk: #283236; --rowHover: #222B2F;
  --ink: #E3E9E5; --ink2: #B2BDB8; --meta: #8B9793;
  --hair: #2F3A3D; --strong: #5A686D; --dash: #4A585C;
  --core: #FF74A8; --coreH: #FFA3C6; --coreOn: #24050F; --coreBg: #3A1024;
  --pen: #63CCAB; --penOn: #05261D; --penBg: #16352C;
  --amber: #EFC478; --amberBg: #3A2A13;
  --inv: #28343A; --invInk: #EDF2EF; --invInk2: #C0CBC6; --invMeta: #94A09B; --invHair: #435256;
  --invCore: #FF8FBB; --invPen: #7FDCBE; --invAmber: #F5CE82;
  --shadow: rgba(0, 0, 0, 0.55);
  --scrim: rgba(0, 0, 0, 0.6);

  --nihss-skin: #C99D7B;
  --nihss-skin-line: #9C7352;
  --nihss-hair: #20160F;
  --nihss-shirt: #C3CCC8;
  --nihss-shirt-line: #8E9A94;
  --nihss-shorts: #28343A;
  --nihss-ink: #6E5238;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.nihss-root [hidden] { display: none !important; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  /* Cột dọc: thanh điều hướng chung của website (nếu có) ở trên, app chiếm phần còn lại. */
  display: flex; flex-direction: column;
}
#nihss-host { flex: 1 1 auto; min-height: 0; }
:where(.nihss-root) :where(button, input) { font: inherit; color: inherit; }
.nihss-root :focus-visible { outline: 2px solid var(--core); outline-offset: 2px; }

/* Toàn bộ app gói gọn trong một màn hình — không cuộn trang. */
.nihss-root {
  height: 100%;
  display: flex; flex-direction: column;
  padding: 0 18px;
  overflow: hidden;
}

/* ---------------- thanh trên ---------------- */
.ni-top {
  flex: 0 0 auto; z-index: 40;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 12px 4px;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
}
.ni-brand { display: flex; flex-direction: column; gap: 2px; }
.ni-brand-mark {
  font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 730;
  font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink);
}
.ni-brand-sub { font-size: 13px; color: var(--meta); }

/* ô tổng điểm: khối đảo màu như kết quả của các công cụ lâm sàng khác */
.ni-total {
  margin-left: auto;
  display: flex; align-items: center; gap: 16px;
  padding: 8px 18px 9px;
  background: var(--inv); color: var(--invInk);
  border-radius: 2px;
  border-top: 4px solid var(--invMeta);
}
.ni-total:has(.sev-0) { border-top-color: var(--invPen); }
.ni-total:has(.sev-1) { border-top-color: var(--invInk2); }
.ni-total:has(.sev-2) { border-top-color: var(--invAmber); }
.ni-total:has(.sev-3), .ni-total:has(.sev-4) { border-top-color: var(--invCore); }
.ni-total.is-partial { outline: 1px dashed var(--invMeta); outline-offset: -5px; }
.ni-total-num {
  font-family: var(--mono); font-weight: 500; font-size: 36px; line-height: 1;
  letter-spacing: -0.02em; color: var(--invInk);
}
.ni-total-num small { font-size: 14px; font-weight: 400; color: var(--invMeta); margin-left: 4px; letter-spacing: 0; }
.ni-total-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.ni-sev { font-weight: 600; font-size: 14px; color: var(--invInk2); width: max-content; }
.ni-sev.sev-0 { color: var(--invPen); }
.ni-sev.sev-1 { color: var(--invInk); }
.ni-sev.sev-2 { color: var(--invAmber); }
.ni-sev.sev-3, .ni-sev.sev-4 { color: var(--invCore); }
.ni-prog { color: var(--invMeta); font-family: var(--mono); font-size: 12px; }

.ni-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ni-btn {
  min-height: 40px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--body); font-size: 14px; font-weight: 500; line-height: 1.2;
  border-radius: 2px; cursor: pointer; white-space: nowrap;
  background: var(--inv); color: var(--invInk); border: 1px solid var(--inv);
  transition: background .15s, border-color .15s, color .15s;
}
.ni-btn:hover { background: var(--ink2); border-color: var(--ink2); }
.ni-btn--ghost { background: var(--panel); color: var(--ink); border-color: var(--hair); }
.ni-btn--ghost:hover { background: var(--sunk); border-color: var(--dash); }
.ni-btn--sm { min-height: 34px; padding: 0 11px; font-size: 13px; }
.ni-btn--icon { width: 40px; padding: 0; }
.ni-btn--danger, .ni-btn--ghost.ni-btn--danger {
  background: var(--core); border-color: var(--core); color: var(--coreOn);
  animation: ni-pulse 1s ease-in-out infinite;
}
.ni-btn--danger:hover, .ni-btn--ghost.ni-btn--danger:hover { background: var(--coreH); border-color: var(--coreH); }
@keyframes ni-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
@media (prefers-reduced-motion: reduce) { .ni-btn--danger { animation: none; } }
/* Trên newbieneuro.com thanh điều hướng chung đã có nút sáng/tối. */
body:has(.nn-header) [data-act="theme"] { display: none; }

/* ---------------- thanh chế độ + thông tin BN ---------------- */
.ni-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 4px;
}
.ni-tabs { display: flex; border: 1px solid var(--hair); border-radius: 2px; overflow: hidden; }
.ni-tab {
  min-height: 38px; padding: 0 16px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.ni-tab + .ni-tab { border-left: 1px solid var(--hair); }
.ni-tab:not(.is-on):hover { background: var(--sunk); }
.ni-tab.is-on { background: var(--inv); color: var(--invInk); }

.ni-patient { display: flex; gap: 8px; flex-wrap: wrap; }
.ni-patient input {
  min-height: 38px; font-size: 13.5px;
  padding: 0 10px; border: 1px solid var(--hair); border-radius: 2px;
  background: var(--panel); color: var(--ink);
}
.ni-patient input::placeholder { color: var(--meta); }
.ni-patient input:hover { border-color: var(--dash); }
.ni-patient input:focus { border-color: var(--strong); outline: none; }
.ni-patient input[type='date'], .ni-patient input[type='time'] { font-family: var(--mono); font-size: 12.5px; }
.ni-patient input[data-pt='name'] { min-width: 190px; }
.ni-patient input[data-pt='id'] { width: 110px; font-family: var(--mono); font-size: 12.5px; }
.ni-modelacts { margin-left: auto; display: flex; gap: 8px; }

.ni-warn {
  flex: 0 0 auto;
  margin: 0 4px 8px; padding: 8px 12px; border-radius: 2px;
  background: var(--amberBg); color: var(--amber); border-left: 3px solid var(--amber);
  font-size: 13px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ni-warn b { color: var(--ink); }

/* ---------------- sân khấu mô hình ---------------- */
.ni-main { flex: 1 1 auto; min-height: 0; position: relative; }
.ni-stage { position: absolute; inset: 0; overflow: hidden; }

.ni-figure {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ni-figure svg {
  /* chỉ giới hạn theo chiều cao — giới hạn bề rộng sẽ làm lệch toạ độ neo */
  height: 100%; max-height: 760px; width: auto; display: block;
  overflow: visible; pointer-events: auto;
}
.ni-leaders { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* hai cột hộp bám sát hai bên mô hình, chỉ cuộn trong cột khi quá nhiều mục */
.ni-col {
  position: absolute; top: 0; bottom: 0; z-index: 3;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--dash) transparent;
}
.ni-col--left { left: 4px; }
.ni-col--right { right: 4px; }
.ni-col::-webkit-scrollbar { width: 6px; }
.ni-col::-webkit-scrollbar-thumb { background: var(--dash); border-radius: 2px; }
.ni-col-inner { position: relative; }
.ni-box { position: absolute; left: 0; right: 0; }
.ni-lead { fill: none; stroke: var(--core); stroke-width: 1.3; opacity: .6; }
.ni-lead-dot { fill: var(--core); }

.ni-hint {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  z-index: 4; pointer-events: none; white-space: nowrap;
  font-size: 13px; color: var(--meta); background: var(--panel);
  border: 1px dashed var(--dash); border-radius: 2px; padding: 7px 14px;
}

/* --- mô hình cơ thể --- */
.nb-art { pointer-events: none; }
.nb-skin { fill: var(--nihss-skin); stroke: var(--nihss-skin-line); stroke-width: 1.2; }
.nb-skin-stroke { fill: none; stroke: var(--nihss-skin); stroke-linecap: round; stroke-linejoin: round; }
.nb-hair { fill: var(--nihss-hair); }
.nb-shirt { fill: var(--nihss-shirt); stroke: var(--nihss-shirt-line); stroke-width: 1.2; }
.nb-shorts { fill: var(--nihss-shorts); }
.nb-line { fill: none; stroke: var(--nihss-ink); stroke-width: 1.3; stroke-linecap: round; opacity: .75; }
.nb-mouth { fill: none; stroke: #A5575A; stroke-width: 2; stroke-linecap: round; }
.nb-eye-white { fill: #F7F8F6; stroke: var(--nihss-ink); stroke-width: 1; }
.nb-pupil { fill: #2A2118; }
.nb-side {
  font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  font-size: 13px; font-weight: 700; fill: var(--meta); letter-spacing: .08em;
}
.nb-side-sub { font-family: var(--body); font-size: 9.5px; fill: var(--meta); }

.nb-hit { cursor: pointer; transition: fill .15s, stroke .15s; }
.nb-hit--fill { fill: transparent; stroke: none; }
.nb-hit--stroke { fill: none; stroke: transparent; stroke-linecap: round; pointer-events: stroke; }
.nb-hit--fill:hover, .nb-hit--fill.is-hover { fill: color-mix(in srgb, var(--nihss-hl) 20%, transparent); }
.nb-hit--stroke:hover, .nb-hit--stroke.is-hover { stroke: color-mix(in srgb, var(--nihss-hl) 20%, transparent); }
.nb-hit--fill.is-on { fill: color-mix(in srgb, var(--nihss-hl) 32%, transparent); }
.nb-hit--stroke.is-on { stroke: color-mix(in srgb, var(--nihss-hl) 32%, transparent); }
.nb-hit.is-on { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--nihss-hl) 60%, transparent)); }

/* ---------------- hộp chấm điểm ---------------- */
.ni-card {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--core);
  border-radius: 2px;
  padding: 10px 12px;
}
.ni-card-h { display: flex; align-items: baseline; gap: 8px; }
.ni-no {
  font-family: var(--mono); font-weight: 500; font-size: 12.5px;
  color: var(--core); background: var(--coreBg); border-radius: 2px; padding: 1px 6px;
  white-space: nowrap;
}
.ni-name {
  font-family: var(--display); font-variation-settings: 'wdth' 108, 'wght' 660;
  font-size: 15px; letter-spacing: -0.01em; line-height: 1.25; flex: 1;
}
.ni-name em {
  display: block; font-family: var(--body); font-variation-settings: normal; font-style: normal;
  font-weight: 400; font-size: 11.5px; letter-spacing: 0; color: var(--meta);
}
.ni-badge {
  min-width: 28px; text-align: center; font-family: var(--mono); font-weight: 500; font-size: 14px;
  border-radius: 2px; padding: 1px 6px; background: var(--sunk); color: var(--meta);
}
.ni-badge.is-set { background: var(--core); color: var(--coreOn); }
.ni-badge.is-un { background: var(--amberBg); color: var(--amber); }
.ni-clear {
  border: 0; background: transparent; color: var(--meta); cursor: pointer;
  font-size: 13px; padding: 0 3px; border-radius: 2px;
}
.ni-clear:hover { color: var(--core); }
.ni-meta { font-size: 11.5px; color: var(--meta); margin: 2px 0 8px; }

/* hộp gọn cạnh mô hình */
.ni-card--box { padding: 7px 9px; }
.ni-quick { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.ni-q {
  flex: 0 0 auto; min-width: 30px; height: 30px; padding: 0 7px;
  font-family: var(--mono); font-weight: 500; font-size: 13.5px;
  border-radius: 2px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--hair); color: var(--ink);
}
.ni-q:hover { border-color: var(--dash); background: var(--rowHover); }
.ni-q.is-on { background: var(--core); border-color: var(--core); color: var(--coreOn); }
.ni-q--un { font-size: 11px; letter-spacing: .02em; }
.ni-q--un.is-on { background: var(--amberBg); border-color: var(--amber); color: var(--amber); }
.ni-chosen {
  margin-top: 5px; font-size: 11.5px; line-height: 1.35;
  color: var(--meta); font-style: italic;
}
.ni-chosen.is-set { color: var(--ink2); font-style: normal; }
/* hộp cạnh mô hình: chưa chấm thì bỏ dòng gợi ý cho thấp bớt */
.ni-card--box .ni-chosen:not(.is-set) { display: none; }
.ni-card--box .ni-opts { margin-top: 8px; }
.ni-card--box .ni-help { margin-top: 5px; padding-top: 4px; }
.ni-card--box .ni-card-h { gap: 6px; }
.ni-card--box .ni-name { font-size: 13.5px; }

/* các lựa chọn: một khối viền mảnh, dòng được chọn tô nền --coreBg như công cụ lâm sàng */
.ni-opts {
  display: flex; flex-direction: column;
  border: 1px solid var(--hair); border-radius: 2px; background: var(--bg); overflow: hidden;
}
.ni-opt {
  display: flex; align-items: flex-start; gap: 9px; text-align: left;
  font-size: 13px; line-height: 1.4;
  padding: 7px 9px; cursor: pointer;
  background: transparent; border: 0; color: var(--ink);
}
.ni-opt + .ni-opt { border-top: 1px solid var(--hair); }
.ni-opt:hover { background: var(--rowHover); }
.ni-opt.is-on { background: var(--coreBg); color: var(--ink); }
.ni-opt-v {
  flex: 0 0 22px; text-align: center; font-family: var(--mono); font-weight: 500; font-size: 12.5px;
  border-radius: 2px; color: var(--meta); padding: 0;
}
.ni-opt.is-on .ni-opt-v { background: var(--core); color: var(--coreOn); }
.ni-opt--un .ni-opt-v { color: var(--amber); }
.ni-opt--un.is-on .ni-opt-v { background: var(--amber); color: var(--panel); }

.ni-coupling {
  margin-top: 8px; padding: 7px 9px; border-radius: 2px;
  background: var(--amberBg); color: var(--amber); border-left: 3px solid var(--amber);
  font-size: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.ni-coupling b { color: var(--ink); }
.ni-note { margin-top: 8px; }
.ni-note label { display: block; font-size: 11.5px; color: var(--meta); margin-bottom: 3px; }
.ni-note input {
  width: 100%; font-size: 13px;
  padding: 6px 8px; border-radius: 2px; border: 1px solid var(--amber);
  background: var(--bg); color: var(--ink);
}

.ni-help { margin-top: 8px; border-top: 1px dashed var(--dash); padding-top: 6px; }
.ni-help summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--core); }
.ni-help summary:hover { color: var(--coreH); }
.ni-howto { font-size: 12.5px; margin: 6px 0; color: var(--ink2); }
.ni-pearls { margin: 0 0 2px 16px; font-size: 12px; color: var(--meta); }
.ni-pearls li { margin-bottom: 3px; }

/* ---------------- danh sách đầy đủ ---------------- */
.ni-list { position: absolute; inset: 0; overflow-y: auto; padding: 6px 4px 28px; }
.ni-group { margin-bottom: 28px; padding-top: 14px; border-top: 2px solid var(--strong); }
.ni-group h3 {
  font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 700;
  font-size: 20px; letter-spacing: -0.015em; line-height: 1.2; color: var(--ink);
  margin-bottom: 14px;
}
.ni-group-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }

/* ---------------- lịch sử ---------------- */
.ni-history {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 8px 4px; border-top: 1px solid var(--hair); overflow-x: auto;
}
.ni-history h3 { font-size: 13px; font-weight: 500; color: var(--meta); white-space: nowrap; }
.ni-hist-row { display: flex; gap: 8px; }
.ni-hist {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--hair);
  border-radius: 2px; padding: 5px 10px; font-size: 12.5px;
}
.ni-hist-n { font-family: var(--mono); font-weight: 500; font-size: 17px; color: var(--core); }
.ni-hist-load, .ni-hist-del { border: 0; background: transparent; cursor: pointer; color: var(--meta); font-size: 12.5px; }
.ni-hist-load:hover { color: var(--core); text-decoration: underline; }
.ni-hist-del:hover { color: var(--core); }

/* ---------------- chân trang ---------------- */
.ni-foot {
  flex: 0 0 auto; padding: 6px 4px; border-top: 1px solid var(--hair);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 11.5px; color: var(--meta); white-space: nowrap; overflow: hidden;
}
.ni-foot a { color: var(--core); text-decoration: none; }
.ni-foot a:hover { color: var(--coreH); text-decoration: underline; }

/* ---------------- ngăn kéo quy tắc ---------------- */
.ni-drawer { position: fixed; inset: 0; z-index: 100; background: var(--scrim); display: flex; justify-content: flex-end; }
.ni-drawer-panel {
  width: min(560px, 100%); height: 100%; overflow-y: auto;
  background: var(--bg); color: var(--ink);
  border-left: 4px solid var(--core);
  padding: 22px 26px 44px;
  box-shadow: 0 14px 30px var(--shadow);
}
.ni-drawer-panel header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--strong);
}
.ni-drawer-panel h2 {
  font-family: var(--display); font-variation-settings: 'wdth' 112, 'wght' 720;
  font-size: 24px; letter-spacing: -0.02em; line-height: 1.15;
}
.ni-drawer-panel h3 {
  font-family: var(--display); font-variation-settings: 'wdth' 110, 'wght' 680;
  font-size: 16px; letter-spacing: -0.01em; margin: 22px 0 8px; color: var(--ink);
}
.ni-rules { margin-left: 18px; font-size: 14px; color: var(--ink2); }
.ni-rules li { margin-bottom: 9px; }
.ni-rules li::marker { color: var(--core); font-family: var(--mono); }
.ni-rules-sub { margin-left: 18px; font-size: 13px; color: var(--meta); }
.ni-rules-sub li { margin-bottom: 4px; }
.ni-src { margin-top: 22px; font-size: 12px; color: var(--meta); border-top: 1px solid var(--hair); padding-top: 10px; }

/* ---- cửa sổ hẹp hoặc thấp: nén phần đầu để dành chiều cao cho mô hình ---- */
@media (max-width: 1000px), (max-height: 780px) {
  .nihss-root { padding: 0 12px; }
  .ni-brand-sub { display: none; }
  .ni-brand-mark { font-size: 22px; }
  .ni-top { padding: 7px 4px; gap: 12px; }
  .ni-total { padding: 5px 12px 6px; gap: 10px; border-top-width: 3px; }
  .ni-total-num { font-size: 27px; }
  .ni-btn { min-height: 34px; padding: 0 10px; font-size: 13px; }
  .ni-btn--icon { width: 34px; padding: 0; }
  .ni-bar { padding: 6px 4px; gap: 10px; }
  .ni-tab { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
  .ni-patient input { min-height: 32px; padding: 0 8px; font-size: 12.5px; }
  .ni-patient input[data-pt='name'] { min-width: 130px; }
  .ni-patient input[data-pt='id'] { width: 88px; }
  .ni-foot { display: none; }
}

/* ---------------- màn hình rất hẹp: xếp dọc, cho phép cuộn trang ---------------- */
@media (max-width: 600px) {
  html, body { overflow: auto; overflow-x: hidden; }
  body { display: block; }
  #nihss-host { min-width: 0; }
  .nihss-root { height: auto; display: block; padding: 0 16px 30px; min-width: 0; }
  .ni-top > *, .ni-bar > * { min-width: 0; }
  .ni-patient { width: 100%; }
  .ni-patient input, .ni-patient input[data-pt='name'], .ni-patient input[data-pt='id'] { flex: 1 1 140px; min-width: 0; width: auto; }
  .ni-patient input[data-pt='name'] { flex-basis: 100%; }
  .ni-modelacts { margin-left: 0; }
  .ni-main { position: static; }
  .ni-stage { position: static; overflow: visible; }
  .ni-leaders { display: none; }
  .ni-figure { position: static; display: block; }
  .ni-figure svg { height: auto; width: 240px; margin: 0 auto 16px; }
  .ni-col {
    position: static !important; width: auto !important;
    overflow: visible; display: block;
  }
  .ni-col-inner { height: auto !important; }
  .ni-box { position: static !important; top: auto !important; margin-bottom: 10px; }
  .ni-hint { position: static; transform: none; white-space: normal; display: block; width: auto; margin: 0 0 14px; text-align: center; }
  .ni-list { position: static; }
  .ni-total { margin-left: 0; }
  .ni-group-body { grid-template-columns: minmax(0, 1fr); }
  .ni-btn, .ni-q { min-height: 44px; }
  .ni-q { height: 44px; min-width: 44px; }
  .ni-tab { min-height: 44px; }
}

/* ---------------- in ---------------- */
@media print {
  html, body { overflow: visible; height: auto; }
  .nihss-root { height: auto; display: block; overflow: visible; }
  .ni-main { position: static; }
  .ni-actions, .ni-tabs, .ni-modelacts, .ni-drawer, .ni-hint, .ni-help, .ni-clear { display: none !important; }
  .ni-stage { display: none !important; }
  .ni-list { position: static; display: block !important; overflow: visible; }
  .ni-list[hidden] { display: block !important; }
  .ni-card { break-inside: avoid; }
  body { background: #fff; }
}
