/* ==========================================================================
   Norius Mail · «Void» design system
   Абсолютно чёрная база, один живой акцент, волосяные линии и мягкий свет.
   ========================================================================== */

:root {
	color-scheme: dark;
	--accent: #c8ff3d;
	--accent-ink: #0b0f00;
	--accent-2: #3dd8ff;
	--accent-3: #8f85ff;
	--accent-text: var(--accent);
	--accent-soft: color-mix(in oklab, var(--accent) 13%, transparent);
	--accent-softer: color-mix(in oklab, var(--accent) 7%, transparent);
	--accent-line: color-mix(in oklab, var(--accent) 42%, transparent);
	--accent-glow: 0 0 0 1px color-mix(in oklab, var(--accent) 50%, transparent), 0 8px 30px -6px color-mix(in oklab, var(--accent) 55%, transparent);

	--bg: #000;
	--bg-raise: #0a0a0c;
	--bg-float: #121215;
	--bg-well: #070708;
	--bg-hover: rgba(255, 255, 255, 0.045);
	--bg-active: rgba(255, 255, 255, 0.085);
	--line: rgba(255, 255, 255, 0.075);
	--line-strong: rgba(255, 255, 255, 0.14);
	--rim: linear-gradient(165deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 38%, rgba(255, 255, 255, 0.015) 62%, color-mix(in oklab, var(--accent) 22%, transparent));
	--glass: rgba(12, 12, 15, 0.74);
	--scrim: rgba(0, 0, 0, 0.62);

	--text: #f4f1ea;
	--text-2: #aaa7b2;
	--text-3: #6f6c79;
	--text-4: #45434c;

	--danger: #ff5a6e;
	--warn: #ffc93d;
	--ok: #5ceb8a;
	--info: #4fa8ff;

	--f-ui: 'Onest', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--f-display: 'Unbounded', 'Onest', system-ui, sans-serif;
	--f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

	--r-1: 8px;
	--r-2: 12px;
	--r-3: 16px;
	--r-4: 22px;
	--r-5: 30px;
	--r-pill: 999px;

	--e-out: cubic-bezier(0.16, 1, 0.3, 1);
	--e-io: cubic-bezier(0.65, 0, 0.35, 1);
	--e-snap: cubic-bezier(0.2, 0.9, 0.25, 1);
	--e-spring: linear(0, 0.008, 0.032 2%, 0.128 4.1%, 0.5 9.6%, 0.736 13.3%, 0.906 17.2%, 1.02 21.6%, 1.066 24.5%, 1.087 27.5%, 1.088 30.2%, 1.068 34%, 1.013 43.2%, 0.996 48.9%, 0.99 55.2%, 0.998 71.3%, 1);
	--e-pop: linear(0, 0.22 5%, 0.63 12%, 0.94 20%, 1.08 28%, 1.1 33%, 1.05 42%, 0.99 55%, 1);

	--shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.9);
	--shadow-float: 0 30px 90px -24px rgba(0, 0, 0, 0.95), 0 12px 32px -12px rgba(0, 0, 0, 0.8);
	--grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");

	--rail-w: 256px;
	--top-h: 64px;
	--gap: 10px;
	--row-pad: 14px;
	--nori-a: var(--accent);
	--nori-b: color-mix(in oklab, var(--accent) 55%, var(--accent-2));
}

[data-skin='midnight'] {
	--bg: #03040b;
	--bg-raise: #080a17;
	--bg-float: #0e1124;
	--bg-well: #05060f;
	--line: rgba(160, 170, 255, 0.085);
	--line-strong: rgba(160, 170, 255, 0.16);
	--glass: rgba(8, 10, 23, 0.76);
	--text-2: #a5a9c6;
	--text-3: #6a6e8e;
}
[data-skin='ember'] {
	--bg: #070403;
	--bg-raise: #100a08;
	--bg-float: #18100c;
	--bg-well: #0b0605;
	--line: rgba(255, 200, 170, 0.08);
	--line-strong: rgba(255, 200, 170, 0.15);
	--glass: rgba(16, 10, 8, 0.78);
	--text: #f8efe6;
	--text-2: #b8a89d;
	--text-3: #7d6c62;
}
[data-theme='light'] {
	color-scheme: light;
	--bg: #eeebe3;
	--bg-raise: #f8f6f0;
	--bg-float: #ffffff;
	--bg-well: #e6e2d8;
	--bg-hover: rgba(30, 24, 10, 0.045);
	--bg-active: rgba(30, 24, 10, 0.08);
	--line: rgba(30, 24, 10, 0.085);
	--line-strong: rgba(30, 24, 10, 0.16);
	--rim: linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.2) 40%, rgba(30, 24, 10, 0.06));
	--glass: rgba(250, 248, 242, 0.8);
	--scrim: rgba(30, 26, 18, 0.32);
	--text: #16140f;
	--text-2: #5b5750;
	--text-3: #8d897f;
	--text-4: #bbb6aa;
	--accent-text: color-mix(in oklab, var(--accent) 48%, #000);
	--accent-soft: color-mix(in oklab, var(--accent) 26%, transparent);
	--accent-softer: color-mix(in oklab, var(--accent) 14%, transparent);
	--shadow-1: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 10px 30px -14px rgba(60, 50, 20, 0.35);
	--shadow-float: 0 30px 80px -26px rgba(60, 50, 20, 0.4), 0 10px 28px -12px rgba(60, 50, 20, 0.22);
	--danger: #e0304a;
	--ok: #1f9e52;
	--warn: #b88700;
}

/* ——— Reset ——— */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
	background: var(--bg);
	color: var(--text);
	font: 450 14.5px/1.5 var(--f-ui);
	font-feature-settings: 'ss01', 'cv11';
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.5s var(--e-out), color 0.3s;
}
body::after {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 9999;
	background-image: var(--grain);
	opacity: 0.035;
	mix-blend-mode: overlay;
}
[data-theme='light'] body::after { opacity: 0.06; mix-blend-mode: multiply; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; }
::selection { background: color-mix(in oklab, var(--accent) 38%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-1); }
[hidden] { display: none !important; }
.ico { flex: none; }
.ico-in { animation: ico-in 0.38s var(--e-pop); }
@keyframes ico-in { from { transform: scale(0.4) rotate(-30deg); opacity: 0; } }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-3); }

.mono { font-family: var(--f-mono); font-size: 0.92em; letter-spacing: -0.01em; }
.display { font-family: var(--f-display); letter-spacing: -0.02em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.grad-text {
	background: linear-gradient(100deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
kbd {
	font: 600 10.5px/1 var(--f-mono);
	padding: 3px 5px;
	border-radius: 5px;
	background: var(--bg-active);
	border: 1px solid var(--line);
	border-bottom-width: 2px;
	color: var(--text-2);
}

/* ——— Поверхности с «ободком света» ——— */
.surface {
	background: var(--bg-raise);
	border: 1px solid var(--line);
	border-radius: var(--r-4);
}
.rim {
	border: 1px solid transparent;
	background: linear-gradient(var(--bg-float), var(--bg-float)) padding-box, var(--rim) border-box;
}

/* ——— Кнопки ——— */
.btn {
	--b-bg: var(--bg-active);
	--b-fg: var(--text);
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 18px;
	border-radius: var(--r-pill);
	background: var(--b-bg);
	color: var(--b-fg);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: -0.005em;
	white-space: nowrap;
	overflow: hidden;
	isolation: isolate;
	transition: transform 0.25s var(--e-spring), background-color 0.2s, box-shadow 0.3s, opacity 0.2s;
	user-select: none;
}
.btn:hover { --b-bg: color-mix(in oklab, var(--text) 13%, transparent); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); box-shadow: 0 6px 24px -8px color-mix(in oklab, var(--accent) 70%, transparent); }
.btn-primary:hover { --b-bg: color-mix(in oklab, var(--accent) 88%, #fff); box-shadow: var(--accent-glow); }
.btn-danger { --b-bg: color-mix(in oklab, var(--danger) 16%, transparent); --b-fg: var(--danger); }
.btn-danger:hover { --b-bg: var(--danger); --b-fg: #fff; }
.btn-ghost { --b-bg: transparent; --b-fg: var(--text-2); }
.btn-ghost:hover { --b-bg: var(--bg-hover); --b-fg: var(--text); }
.btn-outline { --b-bg: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-outline:hover { --b-bg: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--text-3); }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; gap: 6px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15.5px; border-radius: var(--r-pill); }
.btn-block { width: 100%; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid var(--b-fg);
	border-right-color: transparent;
	animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ibtn {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: var(--r-pill);
	color: var(--text-2);
	flex: none;
	overflow: hidden;
	transition: background-color 0.18s, color 0.18s, transform 0.25s var(--e-spring);
}
.ibtn:hover { background: var(--bg-hover); color: var(--text); }
.ibtn:active { transform: scale(0.88); }
.ibtn.is-on { color: var(--accent-text); background: var(--accent-soft); }
.ibtn.is-danger:hover { color: var(--danger); background: color-mix(in oklab, var(--danger) 12%, transparent); }
.ibtn-sm { width: 32px; height: 32px; }
.ibtn:disabled { opacity: 0.35; pointer-events: none; }

.ripple {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	background: radial-gradient(circle, currentColor 0%, transparent 70%);
	opacity: 0.22;
	transform: scale(0);
	animation: ripple 0.6s var(--e-out) forwards;
	z-index: -1;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ——— Поля ——— */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0.01em; }
.field-help { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.input, .textarea, .select {
	width: 100%;
	height: 46px;
	padding: 0 16px;
	border-radius: var(--r-3);
	background: var(--bg-well);
	border: 1px solid var(--line);
	color: var(--text);
	outline: none;
	transition: border-color 0.2s, box-shadow 0.25s, background-color 0.2s;
}
.textarea { height: auto; min-height: 110px; padding: 13px 16px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-softer); background: var(--bg-raise); }
.input.is-error { border-color: color-mix(in oklab, var(--danger) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--danger) 12%, transparent); }

/* Переключатель */
.switch { position: relative; width: 46px; height: 28px; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; border-radius: 99px; background: var(--bg-active); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color 0.25s, box-shadow 0.25s; }
.switch-thumb { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform 0.4s var(--e-spring), background-color 0.25s, width 0.2s; }
.switch input:checked ~ .switch-track { background: var(--accent); box-shadow: 0 0 18px -4px var(--accent); }
.switch input:checked ~ .switch-thumb { transform: translateX(18px); background: var(--accent-ink); }
.switch input:active ~ .switch-thumb { width: 24px; }
.switch input:checked:active ~ .switch-thumb { transform: translateX(14px); }
.switch input:focus-visible ~ .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled ~ * { opacity: 0.4; }

/* Чекбокс */
.check { position: relative; width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; }
.check input { position: absolute; inset: -6px; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.check-box { width: 20px; height: 20px; border-radius: 7px; box-shadow: inset 0 0 0 1.6px var(--text-3); display: grid; place-items: center; color: var(--accent-ink); transition: background-color 0.2s, box-shadow 0.2s, transform 0.3s var(--e-spring); }
.check-box svg { transform: scale(0); transition: transform 0.3s var(--e-pop); }
.check input:checked + .check-box { background: var(--accent); box-shadow: none; transform: scale(1.06); }
.check input:checked + .check-box svg { transform: scale(1); }

/* Сегменты */
.segs { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill); background: var(--bg-well); border: 1px solid var(--line); position: relative; }
.seg { position: relative; z-index: 1; height: 34px; padding: 0 15px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 600; font-size: 13px; display: inline-flex; gap: 7px; align-items: center; transition: color 0.2s; }
.seg:hover { color: var(--text); }
.seg.is-on { color: var(--accent-ink); }
.segs-pill { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: var(--r-pill); background: var(--accent); transition: transform 0.45s var(--e-spring), width 0.45s var(--e-spring); box-shadow: 0 4px 20px -6px var(--accent); }

/* Чипы */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; background: var(--bg-active); color: var(--text-2); white-space: nowrap; transition: background-color 0.2s, color 0.2s, transform 0.2s var(--e-spring); }
button.chip:hover { color: var(--text); background: color-mix(in oklab, var(--text) 12%, transparent); }
button.chip:active { transform: scale(0.95); }
.chip.is-on { background: var(--accent-soft); color: var(--accent-text); }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.01em; background: color-mix(in oklab, var(--c, var(--text-3)) 16%, transparent); color: color-mix(in oklab, var(--c, var(--text-2)) 85%, var(--text)); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* Орб-аватар */
.orb {
	--s: 40px;
	position: relative;
	width: var(--s);
	height: var(--s);
	flex: none;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font: 700 calc(var(--s) * 0.36) / 1 var(--f-ui);
	letter-spacing: -0.02em;
	color: rgba(0, 0, 0, 0.72);
	background: radial-gradient(120% 120% at 28% 22%, var(--oa) 0%, var(--ob) 70%, color-mix(in oklab, var(--ob) 60%, #000) 100%);
	box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.25), inset 0 2px 3px rgba(255, 255, 255, 0.35);
	overflow: hidden;
	user-select: none;
}
.orb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; opacity: 0; transition: opacity 0.3s; }
.orb img.is-ready { opacity: 1; }
.orb-sm { --s: 28px; }
.orb-lg { --s: 52px; }
.orb-xl { --s: 88px; }

/* Прогресс/скелет */
.skel { position: relative; overflow: hidden; background: var(--bg-hover); border-radius: 6px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }

/* ——— Слой оверлеев ——— */
.layer { position: fixed; inset: 0; pointer-events: none; z-index: 1000; }
.layer > * { pointer-events: auto; }

.scrim {
	position: fixed;
	inset: 0;
	background: var(--scrim);
	backdrop-filter: blur(6px) saturate(120%);
	-webkit-backdrop-filter: blur(6px) saturate(120%);
	display: grid;
	place-items: center;
	padding: 20px;
	animation: fade-in 0.25s var(--e-out);
}
.scrim.is-out { animation: fade-out 0.25s var(--e-out) forwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.dialog {
	position: relative;
	width: min(440px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 28px;
	border-radius: var(--r-5);
	border: 1px solid transparent;
	background: linear-gradient(var(--bg-float), var(--bg-float)) padding-box, var(--rim) border-box;
	box-shadow: var(--shadow-float);
	animation: dialog-in 0.5s var(--e-spring);
}
.dialog.is-wide { width: min(640px, 100%); }
.scrim.is-out .dialog { animation: dialog-out 0.22s var(--e-out) forwards; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(24px) scale(0.94); } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(10px) scale(0.97); } }
.dialog-ico { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 18px; color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.dialog.tone-danger .dialog-ico { color: var(--danger); background: color-mix(in oklab, var(--danger) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--danger) 40%, transparent); }
.dialog-title { margin: 0 0 8px; font: 600 20px/1.25 var(--f-display); letter-spacing: -0.025em; }
.dialog-body { color: var(--text-2); font-size: 14.5px; }
.dialog-body > * + * { margin-top: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 26px; flex-wrap: wrap; }

/* Меню */
.menu {
	position: fixed;
	min-width: 220px;
	max-width: 320px;
	max-height: min(70vh, 520px);
	overflow: auto;
	padding: 6px;
	border-radius: var(--r-3);
	border: 1px solid transparent;
	background: linear-gradient(var(--bg-float), var(--bg-float)) padding-box, var(--rim) border-box;
	box-shadow: var(--shadow-float);
	animation: menu-in 0.32s var(--e-spring);
	z-index: 5;
}
.menu.is-out { animation: menu-out 0.16s var(--e-out) forwards; }
@keyframes menu-in { from { opacity: 0; transform: scale(0.92) translateY(-6px); } }
@keyframes menu-out { to { opacity: 0; transform: scale(0.96); } }
.menu-item { width: 100%; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--text); font-size: 13.5px; font-weight: 500; text-align: left; transition: background-color 0.12s; }
.menu-item svg { color: var(--text-2); }
.menu-item:hover, .menu-item:focus-visible { background: var(--bg-active); outline: none; }
.menu-item:hover svg { color: var(--text); }
.menu-item.is-danger, .menu-item.is-danger svg { color: var(--danger); }
.menu-item:disabled { opacity: 0.4; }
.menu-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-hint { margin-left: auto; }
.menu-check { color: var(--accent-text) !important; }
.menu-dot { width: 10px; height: 10px; border-radius: 50%; margin: 0 4px; flex: none; }
.menu-gap { width: 18px; }
.menu-sep { height: 1px; margin: 6px 8px; background: var(--line); }
.menu-head { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }

/* Подсказка */
.tip {
	position: fixed;
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 6px 10px;
	border-radius: 9px;
	background: var(--text);
	color: var(--bg);
	font-size: 12px;
	font-weight: 600;
	pointer-events: none !important;
	animation: tip-in 0.22s var(--e-out);
	white-space: nowrap;
	z-index: 20;
}
.tip kbd { background: color-mix(in oklab, var(--bg) 15%, transparent); color: var(--bg); border-color: transparent; }
@keyframes tip-in { from { opacity: 0; transform: translateY(-4px) scale(0.96); } }
.tip.from-right { animation-name: tip-in-r; }
@keyframes tip-in-r { from { opacity: 0; transform: translateX(-4px); } }

/* Тосты */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; width: min(520px, calc(100vw - 24px)); pointer-events: none !important; }
.toast {
	position: relative;
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 8px 8px 8px 14px;
	border-radius: 18px;
	background: color-mix(in oklab, var(--bg-float) 88%, transparent);
	backdrop-filter: blur(18px) saturate(140%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	border: 1px solid var(--line-strong);
	box-shadow: var(--shadow-float);
	overflow: hidden;
	animation: toast-in 0.55s var(--e-spring);
	max-width: 100%;
}
.toast.is-out { animation: toast-out 0.3s var(--e-out) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(26px) scale(0.9); filter: blur(4px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px) scale(0.94); filter: blur(3px); } }
.toast-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--accent-text); background: var(--accent-soft); }
.toast.is-error .toast-ico { color: var(--danger); background: color-mix(in oklab, var(--danger) 16%, transparent); }
.toast.is-ok .toast-ico { color: var(--ok); background: color-mix(in oklab, var(--ok) 16%, transparent); }
.toast-text { flex: 1; font-size: 13.5px; font-weight: 500; min-width: 0; padding-right: 4px; }
.toast-act { height: 34px; padding: 0 14px; border-radius: 12px; font-weight: 700; font-size: 13px; color: var(--accent-text); background: var(--accent-soft); flex: none; transition: background-color 0.2s; }
.toast-act:hover { background: color-mix(in oklab, var(--accent) 24%, transparent); }
.toast-x { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--text-3); flex: none; }
.toast-x:hover { color: var(--text); background: var(--bg-hover); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: bar var(--ttl) linear forwards; opacity: 0.8; }
.toast.is-paused .toast-bar { animation-play-state: paused; }
@keyframes bar { to { transform: scaleX(0); } }

/* ——— Нори ——— */
.nori { --size: var(--nori-size, 120px); width: var(--size); height: calc(var(--size) * 1.033); position: relative; flex: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nori-svg { width: 100%; height: 100%; overflow: visible; }
.nori-halo { opacity: 0.5; animation: nori-halo 5s ease-in-out infinite; transform-origin: 60px 70px; }
@keyframes nori-halo { 50% { opacity: 0.85; transform: scale(1.06); } }
.nori-shadow { fill: #000; opacity: 0.55; transform-origin: 60px 114px; animation: nori-shadow 3.2s ease-in-out infinite; }
[data-theme='light'] .nori-shadow { opacity: 0.14; }
.nori-body { transform-origin: 60px 98px; animation: nori-bob 3.2s ease-in-out infinite; transform-box: view-box; }
.nori-svg > .nori-body { rotate: var(--tilt, 0deg); transition: rotate 0.6s var(--e-out); }
@keyframes nori-bob { 50% { transform: translateY(-5px); } }
@keyframes nori-shadow { 50% { transform: scaleX(0.82); opacity: 0.35; } }
.nori-env { filter: drop-shadow(0 0 14px color-mix(in oklab, var(--accent) 55%, transparent)); }
.nori-fold { fill: none; stroke: rgba(0, 0, 0, 0.18); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nori-shine { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 2.4; stroke-linecap: round; }
.nori-feet ellipse { fill: color-mix(in oklab, var(--nori-b) 70%, #000); }
.nori-arm path { fill: none; stroke: color-mix(in oklab, var(--nori-b) 80%, #000); stroke-width: 5; stroke-linecap: round; }
.nori-arm { transform-box: view-box; transition: transform 0.5s var(--e-spring); }
.nori-arm-l { transform-origin: 24px 70px; }
.nori-arm-r { transform-origin: 96px 70px; }
.nori-eyes { transition: transform 0.18s var(--e-out); }
.nori-eye { transform-box: fill-box; transform-origin: center; transition: transform 0.12s; }
.nori-eye ellipse { fill: #0a0a0a; }
.nori-glint { fill: #fff; }
.nori-happy, .nori-closed { fill: none; stroke: #0a0a0a; stroke-width: 3; stroke-linecap: round; opacity: 0; }
.nori-cheek { fill: #ff6fb1; opacity: 0.55; }
.nori-mouth { fill: none; stroke: #0a0a0a; stroke-width: 2.6; stroke-linecap: round; transition: d 0.3s; }
.nori-flap { transform-box: view-box; transform-origin: 60px 43px; transform: scaleY(-0.62); transition: transform 0.55s var(--e-spring); }
.nori-flap path { stroke: rgba(0, 0, 0, 0.12); stroke-width: 1.5; }
.nori-seal { fill: #ff4d8d; filter: drop-shadow(0 0 6px #ff4d8d); }
.nori-seal-mark { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nori-zz { opacity: 0; font: 800 14px var(--f-display); fill: var(--text-2); }
.nori.is-blink .nori-eye { transform: scaleY(0.08); }
.nori.is-shy .nori-flap { transform: scaleY(1); }
.nori.is-shy .nori-eye { transform: scaleY(0.12); }
.nori.is-shy .nori-arm-l { transform: rotate(-70deg) translate(4px, -6px); }
.nori.is-shy .nori-arm-r { transform: rotate(70deg) translate(-4px, -6px); }
.nori.is-peek .nori-flap { transform: scaleY(0.55); }
.nori.is-happy .nori-eye { opacity: 0; }
.nori.is-happy .nori-happy { opacity: 1; }
.nori.is-happy .nori-body { animation: nori-hop 0.7s var(--e-out) infinite; }
.nori.is-happy .nori-arm-l { transform: rotate(-120deg); }
.nori.is-happy .nori-arm-r { transform: rotate(120deg); }
@keyframes nori-hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-14px) scale(0.96, 1.05); } 60% { transform: translateY(0) scale(1.06, 0.93); } }
.nori.is-sleep .nori-eye { opacity: 0; }
.nori.is-sleep .nori-closed { opacity: 1; }
.nori.is-sleep .nori-zz { animation: nori-zz 3s ease-in-out infinite; }
.nori.is-sleep .nori-body { animation-duration: 5s; }
.nori.is-sleep .nori-flap { transform: scaleY(-0.4); }
@keyframes nori-zz { 0% { opacity: 0; transform: translate(0, 6px); } 30%, 70% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -8px); } }
.nori.is-sad .nori-mouth { d: path('M55 79 q5 -5 10 0'); }
.nori.is-sad .nori-flap { transform: scaleY(-0.35); }
.nori.is-error .nori-body { animation: nori-shake 0.5s var(--e-out); }
.nori.is-error .nori-mouth { d: path('M55 79 q5 -5 10 0'); }
@keyframes nori-shake { 20% { transform: translateX(-7px) rotate(-4deg); } 40% { transform: translateX(6px) rotate(3deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.nori.is-think .nori-eyes { transform: translate(3px, -3px) !important; }
.nori.is-fly .nori-body { animation: nori-fly 1.2s var(--e-io) forwards; }
.nori.is-fly .nori-arm-l { animation: flap-l 0.18s ease-in-out infinite alternate; }
.nori.is-fly .nori-arm-r { animation: flap-r 0.18s ease-in-out infinite alternate; }
@keyframes flap-l { from { transform: rotate(-40deg); } to { transform: rotate(-150deg); } }
@keyframes flap-r { from { transform: rotate(40deg); } to { transform: rotate(150deg); } }
@keyframes nori-fly { 30% { transform: translateY(6px) scale(1.05, 0.92); } 100% { transform: translate(40px, -160px) rotate(18deg) scale(0.7); opacity: 0; } }
.nori.is-poked .nori-body { animation: nori-poke 0.6s var(--e-spring); }
@keyframes nori-poke { 25% { transform: scale(1.12, 0.86) translateY(4px); } 55% { transform: scale(0.94, 1.08) translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
[data-motion='reduced'] *, [data-motion='reduced'] *::before, [data-motion='reduced'] *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
