/* Карточки — только специфика сервиса; база в plan.css + test.css */

.ii-c-mode-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.ii-c-mode-tab {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 6px 12px;
	border: 1px solid rgba(0, 96, 137, 0.22);
	border-radius: 999px;
	font-size: .85rem;
	font-weight: 600;
	line-height: 1.2;
	color: #006089;
	background: rgba(0, 96, 137, 0.05);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ii-c-mode-tab input {
	display: none;
}

.ii-c-mode-tab:hover {
	background: rgba(0, 96, 137, 0.1);
	border-color: rgba(0, 96, 137, 0.35);
}

.ii-c-mode-tab:has(input:checked) {
	background: #006089;
	border-color: #006089;
	color: #ffeded;
}

.ii-c-mode-panel {
	display: none;
}

.ii-c-mode-panel.is-active {
	display: block;
}

.ii-c #iic-topic,
.ii-c .ii-test-params select,
.ii-c .ii-test-params input[type="number"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d7de;
	border-radius: 8px;
	font: inherit;
	box-sizing: border-box;
	background: #fff;
	line-height: 1.4;
}

.ii-c #iic-topic:disabled,
.ii-c .ii-test-params select:disabled,
.ii-c .ii-test-params input[type="number"]:disabled {
	background: #f3f4f6;
	color: #9ca3af;
	cursor: not-allowed;
}

.ii-c #iic-notes {
	min-height: 180px;
}

.ii-c-word-counter {
	color: #666;
	font-size: .85rem;
	margin: 6px 0 0;
	text-align: right;
}

.ii-c-word-counter.over {
	color: #b91c1c;
	font-weight: 600;
}

.ii-c-pdf-hint {
	margin: 0 0 16px;
}

.ii-c-study {
	margin: 0 0 18px;
	padding: 16px 0;
	border-top: 1px solid #e5e7eb;
	border-bottom: 1px solid #e5e7eb;
}

.ii-c-study__top {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.ii-c-study__progress {
	color: #5a6474;
	font-size: .95rem;
}

.ii-c-study__stats {
	display: flex;
	gap: 12px;
	font-size: .875rem;
}

.ii-c-study__knew span {
	font-weight: 700;
	color: #065f46;
}

.ii-c-study__unknown span {
	font-weight: 700;
	color: #b91c1c;
}

.ii-c-flashcard-scene {
	perspective: 1200px;
	margin-bottom: 14px;
}

.ii-c-flashcard {
	position: relative;
	min-height: 200px;
	transform-style: preserve-3d;
	transition: transform 0.45s ease;
	cursor: pointer;
}

.ii-c-flashcard.is-flipped {
	transform: rotateY(180deg);
}

.ii-c-flashcard__face {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 22px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafa;
	backface-visibility: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.ii-c-flashcard__face--back {
	transform: rotateY(180deg);
	background: rgba(0, 96, 137, 0.04);
	border-color: rgba(0, 96, 137, 0.22);
}

.ii-c-flashcard__label {
	position: absolute;
	top: 12px;
	left: 14px;
	font-size: .72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #006089;
}

.ii-c-flashcard__text {
	margin: 0;
	padding-top: 10px;
	font-size: 1.1rem;
	line-height: 1.45;
	text-align: center;
	color: #111827;
}

.ii-c-flashcard__hint {
	margin: 12px 0 0;
	font-size: .9rem;
	color: #5b6475;
	text-align: center;
}

.ii-c-study__controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}

.ii-c-study__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
}

.ii-c-study__feedback-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 38px;
}

.ii-c-study__feedback {
	display: flex;
	gap: 10px;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.ii-c-study__feedback.is-visible {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.ii-c-study__feedback-slot.is-retry-mode .ii-c-study__feedback {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

#iic-study-knew {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
	border-radius: 4px;
	padding: 4px 14px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

#iic-study-unknown {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	border-radius: 4px;
	padding: 4px 14px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.ii-c-preview-item__side .ii-test-editable {
	display: block;
	margin-top: 4px;
	line-height: 1.45;
	min-height: 1.2em;
}

.ii-c-result .ii-test-result__title.ii-test-editable {
	display: block;
	margin: 0 0 8px;
}

.ii-c-result__meta {
	margin: 0 0 18px;
}

.ii-c-preview-list {
	display: grid;
	gap: 10px;
}

.ii-c-preview-item {
	display: grid;
	grid-template-columns: 36px 1fr 1fr;
	gap: 10px;
	align-items: start;
	padding: 14px 40px 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafa;
	position: relative;
}

.ii-c-preview-item__delete {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid #fecaca;
	border-radius: 4px;
	background: #fef2f2;
	color: #b91c1c;
	font: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.ii-c-preview-item__delete:hover {
	background: #fee2e2;
	border-color: #fca5a5;
}

.ii-c-preview-item__num {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: .8rem;
	font-weight: 700;
	color: #006089;
	background: rgba(0, 96, 137, 0.08);
}

.ii-c-preview-item__side strong {
	display: block;
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #006089;
	margin-bottom: 4px;
}

.ii-c-preview-item__meta {
	grid-column: 2 / -1;
	font-size: .8rem;
	color: #6b7280;
	line-height: 1.45;
}

.ii-c-preview-item__meta-value {
	display: inline;
	min-width: 2ch;
}

.ii-c-preview-item__meta .ii-test-editable:focus {
	background: rgba(0, 96, 137, 0.06);
	box-shadow: 0 0 0 2px rgba(0, 96, 137, 0.18);
	border-radius: 4px;
}

.ii-c-preview-empty {
	margin: 0;
	color: #9ca3af;
}

#iic-pdf-root {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 2147483647;
	width: 794px;
	margin: 0;
	padding: 0;
	pointer-events: none;
	visibility: hidden;
}

#iic-pdf-root.is-capturing {
	visibility: visible;
}

#iic-pdf-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483646;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.92);
	font-weight: 600;
	color: #5b6475;
}

#iic-pdf-overlay.is-visible {
	display: flex;
}

#iic-pdf-root .pdf-page {
	width: 794px;
	height: 1123px;
	padding: 26px 30px 30px;
	box-sizing: border-box;
	background: #fff;
	color: #1a1f2b;
	font-family: Arial, system-ui, sans-serif;
	overflow: hidden;
}

#iic-pdf-root .pdf-page + .pdf-page {
	margin-top: 0;
}

#iic-pdf-root .pdf-page__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid #c5cdd8;
	font-size: 12px;
	color: #5b6475;
}

#iic-pdf-root .pdf-page__head strong {
	color: #1a1f2b;
	font-size: 13px;
}

#iic-pdf-root .pdf-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: repeat(4, 1fr);
	gap: 10px;
	height: 1000px;
}

#iic-pdf-root .pdf-cell {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 0;
	padding: 14px;
	border: 1px dashed #8a96a8;
	background: #fff;
	overflow: hidden;
}

#iic-pdf-root .pdf-page--back .pdf-cell {
	background: rgba(0, 96, 137, 0.04);
}

#iic-pdf-root .pdf-cell__n {
	position: absolute;
	top: 8px;
	right: 10px;
	font-size: 11px;
	font-weight: 700;
	color: #006089;
}

#iic-pdf-root .pdf-cell__label {
	position: absolute;
	top: 8px;
	left: 10px;
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	color: #8a96a8;
}

#iic-pdf-root .pdf-cell__text {
	margin: 0;
	padding-top: 14px;
	font-size: 15px;
	line-height: 1.35;
	text-align: center;
	word-break: break-word;
}

#iic-pdf-root .pdf-cell__hint {
	margin: 8px 0 0;
	font-size: 11px;
	color: #5b6475;
	text-align: center;
}

#iic-pdf-root .pdf-cell--empty {
	background: #f8fafc;
	border-style: dotted;
}

@media print {
	.ii-c-mode-tabs,
	.ii-test-params,
	#iic-form,
	#iic-history,
	.ii-c-study,
	.ii-test-result-actions,
	.ii-c-pdf-hint,
	.ii-plan__back,
	.ii-payment-wrap {
		display: none !important;
	}
}

@media (max-width: 720px) {
	.ii-c-preview-item {
		grid-template-columns: 1fr;
	}

	.ii-c-preview-item__meta {
		grid-column: 1;
	}
}

.ii-c-share {
	margin: 0 0 12px;
	padding: 12px 14px;
	border: 1px solid #d8e3ea;
	border-radius: 10px;
	background: #f7fbfd;
}

.ii-c-share__label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #006089;
}

.ii-c-share__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.ii-c-share__input {
	flex: 1 1 220px;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #c5d5df;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
}

.ii-c-share__hint {
	margin-top: 8px;
}

.ii-c-view__badge {
	display: inline-block;
	margin: 0 0 8px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 13px;
	background: #e8f4f8;
	color: #006089;
}

.ii-c-view__meta {
	margin-top: 0;
}

.ii-c-view__author {
	color: #5a6474;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ii-c-view__author:hover {
	color: #006089;
}

.ii-c-view__cta {
	margin: 20px 0 8px;
}
