/* Autoškola – testy. Barvy podle dopravního značení: beton, asfalt, modrá informativních značek,
   jantar signalizace. Zelená/červená jen pro správně/špatně, vždy s textem. */

:root {
	--paper: #eef2f4;
	--surface: #ffffff;
	--ink: #1f2a30;
	--muted: #56656d;
	--line: #cdd7dc;
	--blue: #0b5aa6;
	--blue-ink: #ffffff;
	--blue-soft: #dde9f5;
	--amber: #c98f00;
	--amber-soft: #fbefcc;
	--ok: #17703f;
	--ok-soft: #dcf0e3;
	--bad: #c4122f;
	--bad-soft: #fbe0e4;
	--lane: #3a464d;
	--lane-mark: #f4f6f7;
	--seq-1: #dbe8f5;
	--seq-2: #9ec2e6;
	--seq-3: #5a95d0;
	--seq-4: #1f68b0;
	--seq-5: #0d4580;
	--ui: 'Overpass', system-ui, sans-serif;
	--read: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
	--radius: 6px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #12181b;
		--surface: #1a2226;
		--ink: #e4eaed;
		--muted: #9aa9b0;
		--line: #2f3b41;
		--blue: #5aa2ea;
		--blue-ink: #0b1a28;
		--blue-soft: #1b3047;
		--amber: #f0c040;
		--amber-soft: #3a3014;
		--ok: #52c98c;
		--ok-soft: #173326;
		--bad: #ff7084;
		--bad-soft: #3d1a20;
		--lane: #2a3439;
		--lane-mark: #c9d3d8;
		--seq-1: #1d3247;
		--seq-2: #24507a;
		--seq-3: #2f74b5;
		--seq-4: #5aa2ea;
		--seq-5: #a9d0f5;
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--paper: #12181b;
	--surface: #1a2226;
	--ink: #e4eaed;
	--muted: #9aa9b0;
	--line: #2f3b41;
	--blue: #5aa2ea;
	--blue-ink: #0b1a28;
	--blue-soft: #1b3047;
	--amber: #f0c040;
	--amber-soft: #3a3014;
	--ok: #52c98c;
	--ok-soft: #173326;
	--bad: #ff7084;
	--bad-soft: #3d1a20;
	--lane: #2a3439;
	--lane-mark: #c9d3d8;
	--seq-1: #1d3247;
	--seq-2: #24507a;
	--seq-3: #2f74b5;
	--seq-4: #5aa2ea;
	--seq-5: #a9d0f5;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1rem/1.5 var(--ui);
	min-height: 100vh;
}

a {
	color: var(--blue);
}

button, input, select {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 3px solid var(--blue);
	outline-offset: 2px;
}

h1, h2, h3 {
	font-family: var(--ui);
	line-height: 1.15;
	margin: 0;
}

h1 {
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

h2 {
	font-size: 1.35rem;
	font-weight: 800;
}

h3 {
	font-size: 1rem;
	font-weight: 700;
}

.muted {
	color: var(--muted);
}

.small {
	font-size: 0.875rem;
}

/* ---------- záhlaví ---------- */

.bar {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 0 max(16px, env(safe-area-inset-left));
	height: 56px;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 10;
}

.brand {
	font-weight: 800;
	font-size: 1.1rem;
	color: var(--ink);
	text-decoration: none;
	padding-left: 12px;
	border-left: 6px solid var(--blue);
}

.bar nav {
	display: flex;
	gap: 4px;
	flex: 1;
}

.bar nav a {
	color: var(--muted);
	text-decoration: none;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: var(--radius);
}

.bar nav a:hover {
	color: var(--ink);
}

.bar nav a[aria-current="page"] {
	color: var(--ink);
	background: var(--blue-soft);
}

.who {
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
	white-space: nowrap;
}

.who small {
	color: var(--muted);
	font-weight: 400;
}

@media (max-width: 720px) {
	.bar {
		gap: 8px;
		height: auto;
		flex-wrap: wrap;
		padding: 8px 16px;
	}

	.bar nav {
		order: 3;
		flex-basis: 100%;
		overflow-x: auto;
	}

	.brand {
		flex: 1;
	}
}

main {
	padding: 24px 16px 64px;
}

.page {
	max-width: 760px;
	margin: 0 auto;
}

.page.wide {
	max-width: 1120px;
}

/* ---------- tlačítka ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 18px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--surface);
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	color: var(--ink);
}

.btn:hover {
	border-color: var(--muted);
}

.btn.primary {
	background: var(--blue);
	border-color: var(--blue);
	color: var(--blue-ink);
}

.btn.primary:hover {
	filter: brightness(1.08);
}

.btn.quiet {
	background: transparent;
	border-color: transparent;
	color: var(--blue);
	padding-inline: 8px;
}

.btn:disabled {
	opacity: 0.5;
	cursor: default;
}

kbd {
	font: 600 0.75rem/1 var(--ui);
	border: 1px solid currentColor;
	border-radius: 4px;
	padding: 3px 5px 1px;
	opacity: 0.7;
}

/* nápovědy kláves nemají smysl na dotykových zařízeních bez klávesnice */
@media (hover: none) and (pointer: coarse) {
	kbd {
		display: none;
	}
}

/* ---------- průběžný stav nad otázkou ---------- */

.status {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 8px;
	font-size: 0.9rem;
	color: var(--muted);
}

.status b {
	color: var(--ink);
	font-weight: 700;
}

.status a {
	white-space: nowrap;
}

.progress {
	height: 6px;
	background: var(--line);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 28px;
}

.progress span {
	display: block;
	height: 100%;
	background: var(--blue);
	transition: width 0.3s;
}

.focus-banner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	margin-bottom: 20px;
	border-left: 4px solid var(--blue);
	background: var(--blue-soft);
	border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- otázka ---------- */

.question-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
	min-height: 38px;
}

.topic-label {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--muted);
	margin: 0;
}

/* bodová hodnota otázky: 1/2/4 b */
.points {
	flex: none;
	padding: 3px 7px 2px;
	border-radius: 4px;
	background: var(--blue-soft);
	color: var(--blue);
	font-weight: 800;
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
}

/* čtení nahlas: ikona + malá nabídka */
.read-controls {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-left: auto;
}

.icon-btn {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	list-style: none;
}

.icon-btn::-webkit-details-marker {
	display: none;
}

.icon-btn:hover {
	color: var(--ink);
	background: var(--surface);
	border-color: var(--line);
}

.icon-btn.read {
	color: var(--blue);
}

.icon-btn.read[aria-pressed="true"] {
	background: var(--amber-soft);
	border-color: var(--amber);
	color: var(--ink);
}

.read-menu {
	position: relative;
}

/* automatické čtení zapnuté: tečka u šipky nabídky */
.read-menu.is-auto summary {
	position: relative;
}

.read-menu.is-auto summary::after {
	content: '';
	position: absolute;
	top: 7px;
	right: 7px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--blue);
}

.read-menu[open] summary {
	background: var(--surface);
	border-color: var(--line);
	color: var(--ink);
}

.menu-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 5;
	width: max-content;
	max-width: calc(100vw - 32px);
	display: grid;
	gap: 10px;
	padding: 14px 16px 16px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.14);
}

.menu-label {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--muted);
}

.segmented {
	display: flex;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}

.segmented button {
	flex: 1;
	min-width: 52px;
	min-height: 36px;
	border: 0;
	border-left: 1px solid var(--line);
	background: var(--surface);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

.segmented button:first-child {
	border-left: 0;
}

.segmented button[aria-checked="true"] {
	background: var(--blue);
	color: var(--blue-ink);
}

.switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
	font-size: 0.9rem;
	cursor: pointer;
	user-select: none;
}

.switch input {
	flex: none;
	appearance: none;
	width: 34px;
	height: 20px;
	margin: 0;
	border-radius: 10px;
	background: var(--line);
	position: relative;
	cursor: pointer;
	transition: background 0.15s;
}

.switch input::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--surface);
	transition: transform 0.15s;
}

.switch input:checked {
	background: var(--blue);
}

.switch input:checked::after {
	transform: translateX(14px);
}

.question-text.is-reading {
	box-shadow: -12px 0 0 -6px var(--amber);
}

.answer.is-reading {
	outline: 3px solid var(--amber);
	outline-offset: 2px;
}

.reason {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--amber);
	margin: 0 0 8px;
}

.question-text {
	font: 400 1.3rem/1.45 var(--read);
	margin: 0 0 20px;
	max-width: 68ch;
}

.media {
	margin: 0 0 20px;
}

.media img, .media video {
	display: block;
	max-width: 100%;
	max-height: 46vh;
	border-radius: var(--radius);
	background: var(--surface);
}

.answers {
	display: grid;
	gap: 10px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.answer {
	display: grid;
	grid-template-columns: 36px 1fr auto;
	align-items: center;
	gap: 14px;
	width: 100%;
	text-align: left;
	padding: 14px 16px;
	border: 2px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	cursor: pointer;
	font: 400 1.05rem/1.45 var(--read);
}

.answer:hover:not(:disabled) {
	border-color: var(--blue);
}

.answer .key {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid var(--line);
	font: 700 0.95rem/1 var(--ui);
}

.answer img {
	max-width: 100%;
	max-height: 160px;
	display: block;
}

.answer .verdict {
	font: 700 0.875rem/1 var(--ui);
	white-space: nowrap;
}

.answer:disabled {
	cursor: default;
	color: inherit;
}

.answer.is-correct {
	border-color: var(--ok);
	background: var(--ok-soft);
}

.answer.is-correct .key {
	border-color: var(--ok);
	background: var(--ok);
	color: var(--surface);
}

.answer.is-correct .verdict {
	color: var(--ok);
}

.answer.is-wrong {
	border-color: var(--bad);
	background: var(--bad-soft);
}

.answer.is-wrong .key {
	border-color: var(--bad);
	background: var(--bad);
	color: var(--surface);
}

.answer.is-wrong .verdict {
	color: var(--bad);
}

.answer.is-chosen {
	border-color: var(--blue);
	background: var(--blue-soft);
}

.answer.is-chosen .key {
	border-color: var(--blue);
	background: var(--blue);
	color: var(--blue-ink);
}

.controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

/* přepínač „tipuju“ */
.guess {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px 8px 10px;
	min-height: 44px;
	border-radius: var(--radius);
	border: 2px dashed var(--line);
	cursor: pointer;
	font-weight: 600;
	user-select: none;
}

.guess input {
	width: 20px;
	height: 20px;
	accent-color: var(--amber);
	margin: 0;
}

.guess:has(input:checked) {
	border-style: solid;
	border-color: var(--amber);
	background: var(--amber-soft);
}

.feedback {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	padding: 14px 16px;
	border-radius: var(--radius);
	border-left: 6px solid var(--muted);
	background: var(--surface);
}

.feedback.ok {
	border-left-color: var(--ok);
}

.feedback.bad {
	border-left-color: var(--bad);
}

.feedback strong {
	display: block;
	font-size: 1.1rem;
}

.feedback .ok-text {
	color: var(--ok);
}

.feedback .bad-text {
	color: var(--bad);
}

.empty {
	padding: 48px 0;
}

.empty p {
	max-width: 52ch;
}

/* ---------- statistiky ---------- */

.hero {
	display: grid;
	grid-template-columns: minmax(200px, 280px) 1fr;
	gap: 16px 48px;
	align-items: end;
	padding-bottom: 28px;
	margin-bottom: 36px;
	border-bottom: 1px solid var(--line);
}

.hero .chance {
	font-size: 0.95rem;
	color: var(--muted);
}

.hero .chance b {
	display: block;
	font-size: 4.5rem;
	line-height: 1;
	font-weight: 800;
	color: var(--ink);
	letter-spacing: -0.03em;
}

.hero .note {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: center;
	justify-content: space-between;
}

.hero .note p {
	margin: 0;
	max-width: 60ch;
}

@media (max-width: 720px) {
	.hero {
		grid-template-columns: 1fr;
	}
}

/* jízdní pruh se skóre */
.road {
	width: 100%;
	height: auto;
	display: block;
	overflow: visible;
}

.road .asphalt {
	fill: var(--lane);
}

.road .edge {
	stroke: var(--lane-mark);
	stroke-width: 2;
}

.road .center {
	stroke: var(--lane-mark);
	stroke-width: 2;
	stroke-dasharray: 12 10;
	opacity: 0.5;
}

.road .band {
	fill: var(--blue);
	opacity: 0.55;
}

.road .stop {
	stroke: var(--lane-mark);
	stroke-width: 6;
}

.road .pass-zone {
	fill: var(--ok);
	opacity: 0.25;
}

.road .marker {
	fill: var(--surface);
	stroke: var(--blue);
	stroke-width: 3;
}

.road text {
	fill: var(--muted);
	font: 600 12px var(--ui);
}

.road text.strong {
	fill: var(--ink);
	font-weight: 700;
	font-size: 13px;
}

.grid2 {
	display: grid;
	grid-template-columns: 3fr 2fr;
	gap: 48px;
	margin-bottom: 44px;
}

@media (max-width: 900px) {
	.grid2 {
		grid-template-columns: 1fr;
	}
}

.section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 6px;
}

.section-lead {
	margin: 0 0 18px;
	color: var(--muted);
	max-width: 62ch;
}

.todo {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: todo;
}

.todo li {
	display: grid;
	grid-template-columns: 28px 1fr auto;
	gap: 4px 12px;
	align-items: center;
	padding: 12px 0;
	border-top: 1px solid var(--line);
	counter-increment: todo;
}

.todo li::before {
	content: counter(todo);
	font-weight: 800;
	font-size: 1.1rem;
	color: var(--muted);
	grid-row: span 2;
	align-self: start;
}

.todo .name {
	font-weight: 700;
}

.todo .meta {
	grid-column: 2;
	font-size: 0.875rem;
	color: var(--muted);
}

.todo .btn {
	grid-row: 1 / span 2;
	grid-column: 3;
	min-height: 38px;
	padding: 6px 14px;
}

/* oblasti */
.areas {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.areas th {
	text-align: left;
	font-weight: 600;
	color: var(--muted);
	font-size: 0.8rem;
	padding: 0 0 6px;
}

.areas td {
	padding: 8px 0;
	border-top: 1px solid var(--line);
	vertical-align: middle;
}

.areas td.num {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	padding-left: 12px;
}

.meter {
	position: relative;
	height: 10px;
	border-radius: 2px;
	background: var(--line);
	margin-top: 6px;
}

.meter span {
	position: absolute;
	inset: 0 auto 0 0;
	border-radius: 2px 4px 4px 2px;
	background: var(--seq-4);
}

/* mapa podtémat */
.topic-map {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 28px 40px;
	margin-bottom: 44px;
}

.topic-map h3 {
	margin-bottom: 8px;
}

.topic-map h3 small {
	font-weight: 400;
	color: var(--muted);
}

.topic-row {
	display: grid;
	grid-template-columns: 1fr 120px;
	gap: 10px;
	align-items: center;
	padding: 5px 6px;
	margin: 0 -6px;
	font-size: 0.9rem;
	border: 0;
	background: none;
	width: calc(100% + 12px);
	text-align: left;
	border-radius: 4px;
	cursor: pointer;
}

.topic-row:hover {
	background: var(--blue-soft);
}

.topic-bar {
	position: relative;
	height: 14px;
	background: var(--line);
	border-radius: 2px;
}

.topic-bar .fill {
	position: absolute;
	inset: 0 auto 0 0;
	border-radius: 2px 4px 4px 2px;
}

.topic-bar .whisker {
	position: absolute;
	top: 6px;
	height: 2px;
	background: var(--ink);
	opacity: 0.55;
}

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	font-size: 0.85rem;
	color: var(--muted);
	margin-bottom: 18px;
}

.legend i {
	display: inline-block;
	width: 22px;
	height: 10px;
	border-radius: 2px;
	vertical-align: middle;
	margin-right: 6px;
}

/* vývoj */
.chart {
	width: 100%;
	height: auto;
	display: block;
}

.chart .grid {
	stroke: var(--line);
	stroke-width: 1;
}

.chart .axis {
	fill: var(--muted);
	font: 400 11px var(--ui);
}

.chart .line {
	fill: none;
	stroke: var(--seq-4);
	stroke-width: 2;
}

.chart .dot {
	fill: var(--seq-4);
	stroke: var(--surface);
	stroke-width: 2;
}

.chart .exam-pass {
	fill: var(--ok);
}

.chart .exam-fail {
	fill: var(--bad);
}

.chart .threshold {
	stroke: var(--muted);
	stroke-dasharray: 4 4;
}

.chart-wrap {
	position: relative;
}

.tooltip {
	position: absolute;
	pointer-events: none;
	background: var(--ink);
	color: var(--paper);
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 0.8rem;
	white-space: nowrap;
	transform: translate(-50%, calc(-100% - 10px));
}

.traps {
	list-style: none;
	padding: 0;
	margin: 0;
}

.traps li {
	border-top: 1px solid var(--line);
}

.traps button {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	width: 100%;
	text-align: left;
	padding: 10px 0;
	border: 0;
	background: none;
	cursor: pointer;
	font: 400 0.95rem/1.4 var(--read);
}

.traps button:hover .q {
	color: var(--blue);
}

.tag {
	font: 600 0.75rem/1 var(--ui);
	padding: 4px 7px 3px;
	border-radius: 4px;
	white-space: nowrap;
	align-self: start;
}

.tag.bad {
	background: var(--bad-soft);
	color: var(--bad);
}

.tag.amber {
	background: var(--amber-soft);
	color: var(--amber);
}

/* ---------- zkouška ---------- */

.exam-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.timer {
	font: 800 1.6rem/1 var(--ui);
	font-variant-numeric: tabular-nums;
}

.timer.low {
	color: var(--bad);
}

.navgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
	gap: 6px;
	margin-bottom: 24px;
}

.navgrid button {
	height: 40px;
	border: 2px solid var(--line);
	border-radius: 4px;
	background: var(--surface);
	font-weight: 700;
	cursor: pointer;
}

.navgrid button.done {
	background: var(--blue-soft);
	border-color: var(--blue-soft);
}

.navgrid button[aria-current="true"] {
	border-color: var(--blue);
}

.navgrid button.ok {
	background: var(--ok-soft);
	border-color: var(--ok);
}

.navgrid button.bad {
	background: var(--bad-soft);
	border-color: var(--bad);
}

.result-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 20px;
	margin-bottom: 20px;
}

.result-head .points {
	font: 800 3.5rem/1 var(--ui);
}

/* ---------- nevratné akce ---------- */

.danger-zone {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	max-width: 640px;
}

.danger-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px 24px;
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}

.danger-row p {
	margin: 4px 0 0;
}

.btn.danger {
	color: var(--bad);
	border-color: var(--bad);
	white-space: nowrap;
	flex: none;
}

.btn.danger:hover:not(:disabled) {
	background: var(--bad-soft);
}

.btn.danger-solid {
	background: var(--bad);
	border-color: var(--bad);
	color: var(--surface);
}

.confirm {
	max-width: 460px;
}

@media (max-width: 560px) {
	.danger-row {
		flex-direction: column;
		align-items: stretch;
	}
}

/* ---------- zámek ---------- */

.lock {
	max-width: 360px;
	margin: 18vh auto 0;
	display: grid;
	gap: 20px;
}

.lock h1 {
	padding-left: 14px;
	border-left: 8px solid var(--blue);
}

.lock-row {
	display: flex;
	gap: 8px;
}

.lock input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

/* ---------- formuláře, profily ---------- */

.form {
	display: grid;
	gap: 16px;
	max-width: 420px;
}

.form label {
	display: grid;
	gap: 6px;
	font-weight: 600;
}

.form input, .form select {
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	font-weight: 400;
}

.form .hint {
	font-weight: 400;
	font-size: 0.85rem;
	color: var(--muted);
}

.chooser {
	max-width: 520px;
	margin-top: 6vh;
}

.chooser h1 {
	margin-bottom: 24px;
}

.chooser .form {
	max-width: none;
}

.chooser .lead {
	margin: -8px 0 24px;
}

.profiles {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
	display: grid;
	gap: 10px;
}

.profiles li {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

.profiles li:has(.profile:hover) {
	border-color: var(--blue);
}

.profile {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	border: 0;
	background: none;
	text-align: left;
	cursor: pointer;
	border-radius: var(--radius);
}

.avatar {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--blue-soft);
	color: var(--blue);
	font-weight: 800;
	font-size: 1.2rem;
}

.who-text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.profile .name {
	font-weight: 700;
	font-size: 1.1rem;
}

.profile .info {
	font-size: 0.875rem;
	color: var(--muted);
}

.lock-tag {
	font: 600 0.7rem/1 var(--ui);
	padding: 3px 6px 2px;
	margin-left: 8px;
	border-radius: 4px;
	border: 1px solid var(--line);
	color: var(--muted);
	vertical-align: middle;
}

.pin-row {
	display: flex;
	gap: 8px;
	padding: 0 16px 14px 74px;
}

.pin-row input {
	width: 9em;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
}

.btn.add {
	width: 100%;
	border-style: dashed;
	color: var(--blue);
}

.actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.error {
	color: var(--bad);
	font-weight: 600;
}

dialog {
	border: 0;
	border-radius: var(--radius);
	padding: 24px;
	max-width: min(680px, calc(100vw - 32px));
	background: var(--paper);
	color: var(--ink);
	box-shadow: 0 10px 40px rgb(0 0 0 / 0.3);
}

dialog::backdrop {
	background: rgb(10 15 18 / 0.5);
}

.stack > * + * {
	margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}
