/* Плашка демо: строка сетки страницы, не fixed (на iPhone закреплённая панель сбивается после клавиатуры). Один селектор — одна строка. */
html, body { height: 100%; }
body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100dvh; }
#app { --safe-t: 0px; height: 100%; min-height: 0; }
.login { min-height: 100%; }
.login--demo { grid-template-rows: minmax(190px, 38vh) auto; }
.login--demo .login__box { max-width: 460px; margin-inline: auto; width: 100%; }
.login--demo .login__brand { right: auto; padding: 8px 14px 8px 8px; border-radius: 16px; background: oklch(98% 0.004 85 / .86); }
.login__why { margin: 0; font-size: 14px; color: var(--ink-3); text-align: center; }

.db { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'note want' 'roles roles'; align-items: center; gap: 8px 12px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px; background: oklch(24.5% 0.008 75); color: oklch(96% 0.006 85); font-size: 13.5px; line-height: 1.25; }
.db__note { grid-area: note; min-width: 0; }
.db__note b { display: block; font-weight: 700; }
.db__note span { display: none; color: oklch(78% 0.01 80); }
.db__ctl { grid-area: roles; display: flex; align-items: center; gap: 8px; min-width: 0; }
html:not([data-role]) .db { grid-template-areas: 'note want'; }
html:not([data-role]) .db__ctl { display: none; }
.db__seg { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 10px; background: oklch(34% 0.01 75); }
.db__seg button { min-height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: oklch(86% 0.008 82); white-space: nowrap; transition: background .25s ease-out, color .25s ease-out; }
.db__seg button[aria-pressed='true'] { background: oklch(96% 0.006 85); color: oklch(24.5% 0.008 75); }
.db__reset { flex: none; min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: oklch(86% 0.008 82); box-shadow: inset 0 0 0 1px oklch(44% 0.012 75); transition: background .25s ease-out; }
.db__reset:hover { background: oklch(34% 0.01 75); }
.db__want { grid-area: want; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 10px; background: var(--amber); color: oklch(22% 0.02 70); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .2s ease-out, filter .2s ease-out; }
.db__want:hover { filter: brightness(1.07); }
.db__want:active { transform: scale(.97); }

@media (min-width: 900px) {
	.login--demo { grid-template-rows: none; height: 100%; }
}
@media (min-width: 720px) {
	.db { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 'note roles want'; padding-inline: 16px; }
	html:not([data-role]) .db { grid-template-areas: 'note note want'; }
	.db__note span { display: block; }
	.db__seg { flex: none; min-width: 250px; }
}
@media (prefers-reduced-motion: reduce) {
	.db__seg button, .db__reset, .db__want { transition: none; }
}
