/* NbEditor — редактор для textarea (www/js/modules/editor.js). Только переменные темы. */

.nbed {
	position: relative;
	display: flex; flex-direction: column;
	border: 1px solid var(--input); border-radius: var(--radius);
	background: var(--card-solid); color: var(--foreground);
	transition: border-color .15s, box-shadow .15s;
	min-width: 0;
}
.nbed:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 18%, transparent); }
.nbed.is-over { border-color: var(--destructive); }

/* панель */
.nbed-bar {
	display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
	padding: 5px 6px; border-bottom: 1px solid var(--border);
	background: var(--muted); border-radius: var(--radius) var(--radius) 0 0;
}
.nbed-tabs { display: inline-flex; padding: 2px; border-radius: var(--radius); background: var(--secondary); margin-right: 4px; }
.nbed-tab {
	border: 0; background: transparent; color: var(--muted-foreground);
	font: 550 12px/1 var(--font-sans); padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer;
}
.nbed-tab:hover { color: var(--foreground); }
.nbed-tab.on { background: var(--card-solid); color: var(--foreground); box-shadow: var(--elev-1); }
.nbed-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nbed-group { display: inline-flex; align-items: center; gap: 1px; }
.nbed-group + .nbed-group { padding-left: 5px; margin-left: 1px; border-left: 1px solid var(--border); }
.nbed-spacer { flex: 1; }
.nbed-btn {
	display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
	border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted-foreground);
	cursor: pointer; line-height: 1; box-shadow: none;
}
.nbed-btn:hover { background: var(--accent); color: var(--foreground); }
.nbed-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.nbed-btn.on { background: var(--primary); color: var(--primary-foreground); }
.nbed-btn svg { display: block; }
.nbed-glyph { font: 600 15px/1 var(--font-serif); letter-spacing: 0; }

/* поле ввода */
.nbed-body { position: relative; display: flex; flex-direction: column; min-height: 0; }
.nbed textarea.nbed-input, .nbed textarea.nbed-input:focus {
	display: block; width: 100% !important; max-width: none; margin: 0; box-sizing: border-box;
	border: 0 !important; border-radius: 0; box-shadow: none !important; outline: none !important;
	background: transparent; color: var(--foreground);
	padding: 12px 14px; resize: vertical;
	font: 400 15px/1.65 var(--font-sans);
}
.nbed--html textarea.nbed-input { font-family: var(--font-sans); }
.nbed-preview {
	padding: 12px 14px; font-size: 15.5px; line-height: 1.7; overflow: auto; word-wrap: break-word;
}
.nbed-preview blockquote { margin: 8px 0; }
.nbed-preview ul, .nbed-preview ol { margin: 6px 0 6px 22px; }
.nbed-empty { color: var(--muted-foreground); font-style: italic; margin: 0; }

/* подвал */
.nbed-foot {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	padding: 5px 12px 6px; border-top: 1px solid var(--border);
	font-size: 11.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums;
}
.nbed-count b { font-weight: 600; color: var(--foreground); }
.nbed-cmp.is-warn, .nbed-limit.is-over { color: var(--destructive); font-weight: 600; }
.nbed-status { opacity: 0; transition: opacity .2s; color: var(--success); }
.nbed-status.on { opacity: 1; }
.nbed-hint { margin-left: auto; opacity: .75; }

/* всплывающие полоски: ссылка, черновик */
.nbed-linkbar, .nbed-draft {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.nbed-linkbar[hidden], .nbed-draft[hidden] { display: none; }
.nbed-linkbar input { flex: 1; min-width: 160px; min-height: 30px; height: 30px; margin: 0; font-size: 13px; }
.nbed-draft { background: color-mix(in oklab, var(--warning) 12%, var(--card-solid)); color: var(--foreground); }
.nbed-draft span { flex: 1; min-width: 180px; }
.nbed-mini {
	height: 26px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
	background: var(--card-solid); color: var(--foreground); font: 550 12px/1 var(--font-sans); cursor: pointer;
}
.nbed-mini:hover { background: var(--muted); }
.nbed-mini.is-primary { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
.nbed-mini.is-primary:hover { opacity: .88; }

/* компактный вид — внутри таблицы перевода */
.nbed--compact { border-radius: var(--radius); }
.nbed--compact .nbed-bar { padding: 3px 4px; gap: 2px; border-radius: var(--radius) var(--radius) 0 0; }
.nbed--compact .nbed-btn { width: 24px; height: 24px; }
.nbed--compact .nbed-glyph { font-size: 13.5px; }
.nbed--compact textarea.nbed-input { padding: 8px 10px; font-size: 14px; line-height: 1.55; }
.nbed--compact .nbed-foot { padding: 3px 10px 4px; font-size: 11px; }

/* во весь экран */
.nbed.is-fullscreen {
	position: fixed; inset: 0; z-index: 3000; border-radius: 0; border: 0;
	background: var(--background); box-shadow: none;
}
.nbed.is-fullscreen .nbed-bar { border-radius: 0; padding: 8px max(12px, calc((100vw - 900px) / 2)); }
.nbed.is-fullscreen .nbed-body { flex: 1; overflow: auto; }
.nbed.is-fullscreen textarea.nbed-input, .nbed.is-fullscreen .nbed-preview {
	flex: 1; height: auto !important; max-width: 860px; width: 100% !important; margin: 0 auto;
	padding: 28px 30px; font-size: 18px; line-height: 1.75; resize: none; overflow: auto;
	font-family: var(--font-serif);
}
.nbed.is-fullscreen .nbed-foot { padding: 8px max(12px, calc((100vw - 900px) / 2)); }
html.nbed-noscroll, html.nbed-noscroll body { overflow: hidden; }

@media (max-width: 600px) {
	.nbed-hint { display: none; }
	.nbed-tools { gap: 2px; }
}
.nbed textarea.nbed-input[hidden], .nbed-preview[hidden] { display: none !important; }

/* ==================================================================================================================
 * NbRichEditor (www/js/modules/editor.js, второй модуль): визуальная правка версии перевода — contenteditable,
 * всплывающие панели ссылки/примечания/картинки, меню «Ещё», окно загрузки изображений. Только токены темы.
 * ================================================================================================================== */
.nbre { position: relative; }
.nbre textarea.nbre-source { display: none !important; }
.nbre-bar { flex-wrap: nowrap; gap: 4px; }
.nbre-tools { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.nbre-tools .nbed-group { flex: none; }
.nbre-tools .nbed-group[hidden] { display: none; }
.nbre .nbed-btn.on { background: var(--accent); color: var(--foreground); box-shadow: inset 0 0 0 1px var(--border); }
.nbre .nbre-btn-fullscreen.on { background: var(--primary); color: var(--primary-foreground); box-shadow: none; }
.nbre .nbed-btn[aria-expanded="true"] { background: var(--accent); color: var(--foreground); }
.nbre .nbre-btn-wide { width: auto; padding: 0 3px 0 6px; display: inline-flex; align-items: center; gap: 1px; }
.nbre .nbre-btn-more, .nbre .nbre-btn-fullscreen { flex: none; }
.nbre .nbed-btn[hidden] { display: none; }
.nbre .nbed-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: -1px; }
.nbre.is-focused { border-color: var(--ring); }

/* editing surface — looks like the old textarea */
.nbre-body { position: relative; }
.nbre-surface {
	position: relative; box-sizing: border-box; padding: 12px 14px; outline: none; overflow-y: auto;
	white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; cursor: text;
	font: 400 15px/1.65 var(--font-sans); color: var(--foreground); caret-color: var(--foreground);
}
/* focus is shown by the editor frame (.nbed:focus-within), not by the global :focus-visible outline */
.nbre-surface:focus, .nbre-surface:focus-visible { outline: none; }
.nbed--compact .nbre-surface { padding: 8px 10px; font-size: 14px; line-height: 1.6; }
.nbre-surface.is-empty::before {
	content: attr(data-placeholder); position: absolute; left: 14px; right: 14px; top: 12px;
	color: var(--muted-foreground); opacity: .85; pointer-events: none; white-space: normal;
}
.nbed--compact .nbre-surface.is-empty::before { left: 10px; right: 10px; top: 8px; }
.nbre-surface b, .nbre-surface strong { font-weight: 700; }
.nbre-surface sup, .nbre-surface sub { font-size: .74em; line-height: 0; }
.nbre-surface a { color: var(--link); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.nbre-surface .nb-tn {
	text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: .22em;
	text-decoration-color: var(--rating-text); background: color-mix(in oklab, var(--rating) 13%, transparent);
	border-radius: var(--radius-sm); cursor: text;
}
.nbre-surface .nb-tn::after {
	content: "\2022"; margin-left: .06em; font-size: .78em; line-height: 0; vertical-align: .42em; color: var(--rating-text);
}
.nbre-surface img {
	max-width: 100%; max-height: 220px; width: auto; height: auto; vertical-align: middle; margin: 4px 2px;
	border-radius: var(--radius); box-shadow: 0 0 0 1px var(--border); cursor: pointer; background: var(--muted);
}
.nbed--compact .nbre-surface img { max-height: 160px; }
.nbre-surface img.is-selected { outline: 2px solid var(--ring); outline-offset: 2px; }

/* inline upload placeholder */
.nbre-upload {
	display: inline-flex; align-items: center; gap: 8px; max-width: 100%; box-sizing: border-box; vertical-align: middle;
	margin: 2px; padding: 6px 10px; border: 1px dashed var(--input); border-radius: var(--radius);
	background: var(--muted); color: var(--muted-foreground); font: 500 12px/1.2 var(--font-sans); user-select: none; white-space: nowrap;
}
.nbre-upload-bar { display: block; flex: none; width: 72px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.nbre-upload-bar i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.nbre-upload-name { min-width: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.nbre.is-drop { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 20%, transparent); }
.nbre.is-drop .nbre-surface { background: color-mix(in oklab, var(--ring) 6%, transparent); }

/* status bar */
.nbre-foot { min-height: 16px; }
.nbre-chip {
	display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: var(--radius-sm);
	background: color-mix(in oklab, var(--translator) 15%, transparent); color: var(--translator);
	font: 650 10.5px/1 var(--font-sans); letter-spacing: .02em;
}
.nbre-chip[hidden], .nbre-prog[hidden] { display: none; }
.nbre-prog { color: var(--foreground); font-weight: 550; }
.nbed-status.is-warn { color: var(--destructive); }
.nbre-confirm { background: color-mix(in oklab, var(--destructive) 9%, var(--card-solid)); }
.nbre-confirm[hidden] { display: none; }
.nbed-mini.is-danger { background: var(--destructive); color: #fff; border-color: transparent; }
.nbed-mini.is-danger:hover { opacity: .88; background: var(--destructive); }

/* popovers: bubble (link / note / image) and menus */
.nbre-pop {
	position: absolute; z-index: 40; box-sizing: border-box; max-width: calc(100% - 8px);
	padding: 5px; border: 1px solid var(--border); border-radius: var(--radius);
	background: var(--popover); color: var(--foreground); box-shadow: var(--elev-3);
	font: 400 13px/1.45 var(--font-sans);
}
.nbre-pop[hidden] { display: none; }
.nbre-bubble { display: flex; align-items: center; gap: 2px; }
.nbre-ib {
	display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0;
	border-radius: var(--radius-sm); background: transparent; color: var(--muted-foreground); cursor: pointer;
}
.nbre-ib:hover, .nbre-ib:focus-visible { background: var(--accent); color: var(--foreground); outline: none; }
.nbre-bubble-url {
	display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 300px; padding: 4px 6px;
	color: var(--link); font-size: 12.5px; border-radius: var(--radius-sm);
}
.nbre-bubble-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbre-bubble-url svg { flex: none; }
.nbre-bubble-note { display: grid; gap: 2px; min-width: 0; max-width: 320px; padding: 3px 8px 4px 6px; }
.nbre-bubble-note b { font: 650 10px/1.3 var(--font-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted-foreground); }
.nbre-bubble-note span { overflow-wrap: anywhere; }
.nbre-bubble--image { padding: 6px 6px 6px 10px; gap: 8px; width: min(380px, calc(100% - 8px)); }
.nbre-bubble-alt { display: grid; gap: 3px; flex: 1; min-width: 0; margin: 0; }
.nbre-bubble-alt span { font: 600 10.5px/1.2 var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted-foreground); }
.nbre-bubble-alt input { width: 100%; box-sizing: border-box; height: 30px; min-height: 30px; margin: 0; font-size: 13px; }
.nbre-bubble--edit { width: min(430px, calc(100% - 8px)); padding: 8px; }
.nbre-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.nbre-edit input { flex: 1 1 180px; min-width: 0; height: 30px; min-height: 30px; margin: 0; font-size: 13px; box-sizing: border-box; }
.nbre-edit .nbed-mini { height: 30px; }
.nbre-err { flex-basis: 100%; margin: 0; color: var(--destructive); font-size: 12px; }
.nbre-err[hidden] { display: none; }
.nbre-edit--note { display: grid; gap: 8px; }
.nbre-edit--note label { display: grid; gap: 5px; margin: 0; }
.nbre-edit--note label span { font: 650 10.5px/1.2 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-foreground); }
.nbre-edit--note textarea { width: 100%; box-sizing: border-box; min-height: 64px; margin: 0; resize: vertical; font-size: 13.5px; line-height: 1.5; }
.nbre-edit-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.nbre-menu { min-width: 210px; padding: 5px; }
.nbre-menu hr { margin: 4px 2px; border: 0; border-top: 1px solid var(--border); }
.nbre-mi {
	display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 12px 0 6px; box-sizing: border-box;
	border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--foreground);
	font: 500 13px/1 var(--font-sans); text-align: left; white-space: nowrap; cursor: pointer;
}
.nbre-mi:hover, .nbre-mi:focus-visible { background: var(--accent); outline: none; }
.nbre-mi:disabled { opacity: .4; cursor: default; background: transparent; }
.nbre-mi-ic { display: inline-grid; place-items: center; width: 22px; flex: none; color: var(--muted-foreground); }
.nbre-mi-ic .nbed-glyph { font-size: 14px; }
.nbre-menu[data-kind="special"] { min-width: 0; }
.nbre-chars { display: grid; grid-template-columns: repeat(7, 34px); gap: 2px; }
.nbre-chars button {
	width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent;
	color: var(--foreground); font: 500 17px/1 var(--font-serif); cursor: pointer;
}
.nbre-chars button:hover, .nbre-chars button:focus-visible { background: var(--accent); outline: none; }

/* image dialog */
html.nbre-modal-open { overflow: hidden; }
.nbre-modal {
	position: fixed; inset: 0; z-index: 3100; display: grid; place-items: center; padding: 16px; box-sizing: border-box;
	background: color-mix(in oklab, oklch(0 0 0) 48%, transparent);
}
.nbre-modal[hidden] { display: none; }
.nbre-dialog {
	display: grid; gap: 14px; width: min(580px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	overflow: auto; box-sizing: border-box; padding: 18px 20px 16px;
	background: var(--popover); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-lg);
	box-shadow: var(--elev-3); font: 400 13.5px/1.5 var(--font-sans);
}
.nbre-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nbre-dialog-head h3 { margin: 0; font-size: 17px; }
.nbre-tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius); background: var(--secondary); }
.nbre-tabs button {
	flex: 1 1 0; min-width: 0; height: 32px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: transparent;
	color: var(--muted-foreground); font: 550 13px/1 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.nbre-tabs button:hover { color: var(--foreground); }
.nbre-tabs button.on { background: var(--card-solid); color: var(--foreground); box-shadow: var(--elev-1); }
.nbre-pane[hidden] { display: none; }
.nbre-pane { display: grid; gap: 10px; }
.nbre-drop {
	display: grid; justify-items: center; gap: 8px; margin: 0; padding: 30px 18px; box-sizing: border-box;
	border: 1.5px dashed var(--input); border-radius: var(--radius); background: var(--muted);
	color: var(--muted-foreground); text-align: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.nbre-drop[hidden] { display: none; }
.nbre-drop b { color: var(--foreground); font-weight: 550; font-size: 14px; }
.nbre-drop u { text-underline-offset: 3px; }
.nbre-drop small { max-width: 400px; font-size: 12px; line-height: 1.45; }
.nbre-drop:hover, .nbre-drop.is-over, .nbre-drop:focus-visible {
	border-color: var(--ring); background: color-mix(in oklab, var(--ring) 7%, transparent); color: var(--foreground); outline: none;
}
.nbre-picked { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.nbre-picked[hidden] { display: none; }
.nbre-picked img { flex: none; width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); background: var(--muted); }
.nbre-picked-info { display: grid; gap: 6px; flex: 1; min-width: 0; }
.nbre-picked-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbre-picked .nbre-upload-bar { width: 100%; }
.nbre-picked:not(.is-busy) .nbre-upload-bar { display: none; }
.nbre-picked-status { font-size: 12.5px; color: var(--muted-foreground); }
.nbre-picked-status.is-warn { color: var(--destructive); }
.nbre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 290px; overflow: auto; padding: 3px; }
.nbre-grid:empty { display: none; }
.nbre-grid button {
	height: 76px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
	background: var(--muted); cursor: pointer;
}
.nbre-grid button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nbre-grid button:hover { border-color: var(--input); }
.nbre-grid button.on { outline: 2px solid var(--ring); outline-offset: 2px; border-color: transparent; }
.nbre-grid button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.nbre-empty-note { margin: 0; padding: 22px 8px; text-align: center; color: var(--muted-foreground); font-size: 13px; }
.nbre-empty-note[hidden] { display: none; }
.nbre-field { display: grid; gap: 6px; margin: 0; }
.nbre-field span { font-size: 12.5px; font-weight: 550; color: var(--muted-foreground); }
.nbre-field input { width: 100%; box-sizing: border-box; height: 36px; margin: 0; }
.nbre-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* fullscreen */
.nbre.is-fullscreen .nbre-body { overflow: auto; }
.nbed.is-fullscreen .nbed-draft { padding-left: max(12px, calc((100vw - 900px) / 2)); padding-right: max(12px, calc((100vw - 900px) / 2)); }
.nbre.is-fullscreen .nbre-surface {
	flex: 1 0 auto; max-height: none !important; overflow: visible; width: 100%; max-width: 860px; margin: 0 auto;
	padding: 28px 30px; font: 400 18px/1.75 var(--font-serif);
}
.nbre.is-fullscreen .nbre-surface.is-empty::before { left: 30px; right: 30px; top: 28px; }
.nbre.is-fullscreen .nbre-surface img { max-height: 420px; }

@media (max-width: 600px) {
	.nbre-surface { font-size: 16px; }
	.nbre-dialog { padding: 14px 14px 12px; gap: 12px; }
	.nbre-drop { padding: 22px 12px; }
	.nbre-tabs button { font-size: 12.5px; }
}

/* iOS Safari zooms the page into any field whose text is under 16 px: phones and touch screens get 16 px text in every
   editor field (plain textarea, rich surface, link / note / alt inputs); desktop sizes stay as they are */
@media (max-width: 760px), (pointer: coarse) {
	.nbed textarea.nbed-input, .nbed--compact textarea.nbed-input, .nbre-surface, .nbed--compact .nbre-surface,
	.nbed-linkbar input, .nbre-edit input, .nbre-edit--note textarea, .nbre-bubble-alt input, .nbre-field input { font-size: 16px; }
}

/* ------------------------------------------------------------ touch screens and phones
   1. The 16 px rule above lost to nb.css (loaded later, input[type="text"] has the same specificity): the image dialog's
      alt field and the link / note inputs were 13-14 px, so iOS zoomed the page when they got focus.
   2. Toolbar buttons 24-28 px -> 36 px (the rich editor moves groups that no longer fit into "More" by itself),
      menu items 32 -> 40 px and wrap instead of being cut, dialog tabs / close / fields / buttons 40 px. */
@media (max-width: 760px), (pointer: coarse) {
	.nbre-dialog .nbre-field input, .nbre .nbre-edit input, .nbre .nbre-bubble-alt input, .nbed .nbed-linkbar input,
	.nbre .nbre-edit--note textarea { font-size: 16px; }

	.nbed-btn, .nbed--compact .nbed-btn { width: 36px; height: 36px; }
	.nbre .nbre-btn-wide { width: auto; padding: 0 4px 0 8px; }
	.nbed-bar, .nbed--compact .nbed-bar { gap: 2px; padding: 3px 4px; }
	.nbed-tab { min-height: 32px; }
	.nbed-mini, .nbre-edit .nbed-mini { height: 36px; padding: 0 12px; }
	.nbed-linkbar input, .nbre-edit input, .nbre-bubble-alt input { height: 40px; min-height: 40px; }
	.nbre-ib { width: 36px; height: 36px; }

	/* "More" had 13 items (~580 px) and ran under the tab bar: capped between the sticky header and the tab bar,
	   scrolls inside; editor.js scrolls it into view, the scroll-margin keeps it clear of both bars */
	.nbre-menu {
		max-width: min(320px, calc(100% - 8px)); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px);
		overflow-y: auto; overscroll-behavior: contain; scroll-margin: 72px 0 68px;
	}
	.nbre-mi { height: auto; min-height: 40px; padding: 6px 12px 6px 6px; white-space: normal; line-height: 1.3; }
	.nbre-chars { grid-template-columns: repeat(7, minmax(30px, 40px)); }
	.nbre-chars button { width: 100%; height: 40px; }

	.nbre-dialog-head .nbre-ib { width: 40px; height: 40px; margin: -6px -8px -6px 0; }
	.nbre-tabs button { height: 40px; }
	.nbre-dialog .nbre-field input { height: 40px; }
	.nbre-dialog-foot .nb-btn { height: 40px; }
	.nbre-grid button { height: 84px; }
}
