/*
 * omr.smart.css
 * ============================================================
 * 스마트 AI 가채점 메인 화면 전용 디자인 v2
 * ------------------------------------------------------------
 * 요청 반영:
 * 1) 로고: https://nesin.com/images/logo.svg
 * 2) smart-hero + smart-banner 통합
 * 3) 배경: #f6f9ff 단색
 * 4) 기본 글씨 16px, 전체 글씨 12~21px 범위 중심
 * 5) 모바일 카드형 UI 최적화
 */

:root {
	--smart-bg: #f6f9ff;
	--smart-surface: #ffffff;
	--smart-surface-2: #fbfdff;
	--smart-text: #152942;
	--smart-strong: #10243f;
	--smart-muted: #66778d;
	--smart-subtle: #8a98aa;
	--smart-line: #dbe6f3;
	--smart-line-2: #e8eef7;
	--smart-blue: #2f6ed8;
	--smart-blue-2: #1f5fc6;
	--smart-navy: #132a4f;
	--smart-sky: #eef6ff;
	--smart-green-bg: #edf9f4;
	--smart-green: #2f8a6d;
	--smart-yellow: #fff8dc;
	--smart-yellow-line: #eadb77;
	--smart-shadow: 0 14px 34px rgba(36, 71, 125, 0.10);
	--smart-shadow-soft: 0 8px 22px rgba(36, 71, 125, 0.07);
	--smart-radius: 15px;
}

html,
body {
	background: var(--smart-bg) !important;
	color: var(--smart-text);
	font-size: 16px;
}

body,
button,
input,
select,
textarea {
	font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 16px;
	letter-spacing: -0.035em;
}

button,
select,
input,
label {
	-webkit-tap-highlight-color: transparent;
}

button {
	cursor: pointer;
}

button:disabled {
	cursor: not-allowed;
	opacity: 0.62;
}

.smart-shell {
	width: min(880px, calc(100% - 28px));
	margin: 0 auto;
	padding: 18px 0 32px;
}

/* ============================================================
 * 상단 통합 헤더
 * ============================================================ */
.smart-hero {
	margin: 0 0 10px;
	padding: 14px 16px;
	border: 1px solid rgba(210, 221, 238, 0.95);
	border-radius: 15px;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 12px 30px rgba(33, 64, 112, 0.08);
}

.smart-hero-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
}

.smart-logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 124px;
	min-width: 74px;
	height: 36px;
	border-radius: 12px;
	background: #ffffff;
	text-decoration: none;
}

.smart-logo-img {
	display: block;
	width: 122px;
	height: auto;
	max-height: 28px;
	object-fit: contain;
}

.smart-brand-copy {
	min-width: 0;
}

.smart-brand-copy h1 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.04em;
	color: #10233f;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.smart-brand-copy p {
	margin: 4px 0 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.03em;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.smart-share {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	min-width: 58px;
	padding: 0 14px;
	border: 1px solid #cfe0f6;
	border-radius: 999px;
	background: #eef6ff;
	color: #2563eb;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: -0.03em;
	cursor: pointer;
	box-shadow: 0 6px 14px rgba(37, 99, 235, 0.08);
}

.smart-share:active {
	transform: translateY(1px);
}



/* 좁은 모바일 */
@media (max-width: 420px) {
	.smart-hero {
		margin-bottom: 12px;
		padding: 12px 13px;
		border-radius: 18px;
	}

	.smart-hero-head {
		gap: 9px;
	}

	.smart-logo-link {
		width: 60px;
		min-width: 60px;
		height: 32px;
	}

	.smart-logo-img {
		width: 158px;
		max-height: 24px;
	}

	.smart-brand-copy h1 {
		font-size: 16px;
	}

	.smart-brand-copy p {
		font-size: 12px;
	}

	.smart-share {
		height: 31px;
		min-width: 48px;
		padding: 0 11px;
		font-size: 12px;
	}
}














.smart-hero-panel {
	margin-top: 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 17px 20px;
	border-radius: 20px;
	background: linear-gradient(135deg, #132a4f 0%, #102646 100%);
	color: #ffffff;
	box-shadow: 0 14px 28px rgba(19, 42, 79, 0.16);
}

.smart-hero-panel p {
	margin: 0 0 5px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
	color: #b9cce4;
}

.smart-hero-panel strong {
	display: block;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.055em;
}

.smart-hero-panel span {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 116px;
	height: 38px;
	padding: 0 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.96);
	color: #7f91a5;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

/* ============================================================
 * 진행 단계
 * ============================================================ */
.smart-steps {
	display: grid;
	grid-template-columns: auto 1fr auto 1fr auto;
	align-items: start;
	gap: 0;
	padding: 20px 68px 18px;
}

.step {
	display: grid;
	justify-items: center;
	gap: 7px;
	min-width: 72px;
	color: var(--smart-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.25;
}

.step i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 43px;
	height: 43px;
	border-radius: 999px;
	border: 3px solid #ffffff;
	background: #ffffff;
	box-shadow: 0 0 0 2px #d6e1ef;
	color: #6e7d90;
	font-style: normal;
	font-size: 18px;
	font-weight: 700;
}

.step.is-active {
	color: var(--smart-blue);
}

.step.is-active i {
	background: var(--smart-blue);
	box-shadow: 0 0 0 2px var(--smart-blue);
	color: #ffffff;
}

.step-line {
	height: 3px;
	margin-top: 21px;
	background: #d3dfed;
}

/* ============================================================
 * 카드 레이아웃
 * ============================================================ */
.smart-main,
.scanner-layout.smart-main {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	align-items: start;
}

.smart-card,
.camera-card,
.preview-panel,
.result-panel {
	padding: 22px;
	border: 1px solid rgba(216, 226, 239, 0.95);
	border-radius: var(--smart-radius);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: var(--smart-shadow);
	overflow: hidden;
}



.smart-section-title {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 14px;
	margin-bottom: 5px;
}

.smart-section-title.row-title {
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between;
	gap: 10px;
}

.smart-section-title.no-badge {
	margin-bottom: 5px;
}

.smart-section-title h2 {
	margin: 0;
	color: var(--smart-strong);
	font-size: 18px !important;
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.055em;
}

.smart-section-title > span:not(.score-mode) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 0 22px;
	border-radius: 999px;
	border: 1px solid #d3ecdf;
	background: var(--smart-green-bg);
	color: var(--smart-green);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.score-mode {
	color: var(--smart-subtle);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.smart-form-grid {
	display: grid;
	gap: 13px;
}

.smart-form-grid.two-col {
	grid-template-columns: 1fr 1fr;
}

.smart-form-grid.one-col {
	grid-template-columns: 1fr;
}

.smart-field {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.smart-field > span {
	color: var(--smart-muted);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.smart-field.inline-label {
	grid-template-columns: 132px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	min-height: 48px;
}

.smart-field select,
.smart-field input {
	width: 100%;
	height: 50px;
	padding: 0 42px 0 16px;
	border: 1px solid #d5e0ed;
	border-radius: 15px;
	background: #f9fbfe;
	color: #263a53;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	outline: none;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.smart-field select:focus,
.smart-field input:focus {
	border-color: #9fc2f2;
	box-shadow: 0 0 0 3px rgba(47, 110, 216, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.smart-help {
	margin: 12px 0 0;
	color: #78879a;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
}

.smart-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	padding-left: 144px;
}

.smart-tags span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 29px;
	padding: 0 14px;
	border-radius: 999px;
	border: 1px solid #dbe5ef;
	background: #f0f5fb;
	color: #6c7d91;
	font-size: 12px;
	font-weight: 700;
}

/* ============================================================
 * 촬영 카드
 * ============================================================ */
.smart-action-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 12px;
	margin-bottom: 14px;
}

.smart-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	border: 1px solid #d6e0ed;
	border-radius: 999px;
	background: #f2f6fb;
	color: #68788c;
	font-size: 16px;
	font-weight: 700;
	overflow: hidden;
}

.smart-tab.is-primary {
	border-color: var(--smart-blue);
	background: var(--smart-blue);
	color: #ffffff;
	box-shadow: 0 10px 22px rgba(47, 110, 216, 0.23);
}

.smart-tab input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.smart-warn {
	margin: 0 0 16px;
	padding: 11px 14px;
	border: 1px solid var(--smart-yellow-line);
	border-radius: 14px;
	background: var(--smart-yellow);
	color: #865f1e;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.45;
}

.smart-warn.soft {
	margin: 14px 0 0;
	background: #fffaf0;
}

.smart-shell .camera-frame {
	position: relative;
	min-height: 210px;
	aspect-ratio: 4 / 1.02;
	border: 0;
	border-radius: 15px;
	background: #122945;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
	overflow: hidden;
}

.smart-shell .camera-frame video,
.smart-shell .camera-frame canvas {
	border-radius: 15x;
}

.smart-shell .scan-guide {
	inset: 26px;
	opacity: 1;
	z-index: 12;
}

.smart-shell .scan-guide span {
	width: 70px;
	height: 50px;
	border-color: #67e9d4;
}

.smart-shell .scan-guide span:nth-child(1) { border-width: 5px 0 0 5px; }
.smart-shell .scan-guide span:nth-child(2) { border-width: 5px 5px 0 0; }
.smart-shell .scan-guide span:nth-child(3) { border-width: 0 5px 5px 0; }
.smart-shell .scan-guide span:nth-child(4) { border-width: 0 0 5px 5px; }

.smart-shell .empty-camera {
	z-index: 20;
	background: transparent !important;
	pointer-events: none;
	text-align: center;
}

.smart-shell .empty-camera strong {
	position: relative;
	z-index: 24;
	display: block;
	color: #ffffff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.smart-shell .empty-camera p {
	position: relative;
	z-index: 24;
	margin-top: 6px;
	color: rgba(226, 235, 246, 0.78);
	font-size: 12px;
	font-weight: 650;
	line-height: 1.45;
}

.smart-shell .lens-mark {
	width: 64px;
	height: 64px;
	border-color: rgba(215, 231, 250, 0.72);
	box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.05), 0 0 0 9px rgba(255, 255, 255, 0.03);
}

.smart-shell .camera-float-actions {
	z-index: 28;
}

.smart-hidden {
	display: none !important;
}

/* ============================================================
 * 미리보기 / 결과
 * ============================================================ */
.smart-mini-btn,
.link-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 100px;
	/* height: 40px; */
	padding: 5px 16px;
	border: 1px solid #dbe5f1;
	border-radius: 999px;
	background: #f5f8fc;
	color: #5d6e83;
	font-size: 14px;
	font-weight: 700;
	box-sizing: border-box;
}

.smart-mini-btn:not(:disabled) {
	border-color: #cfe1fb;
	background: #eff6ff;
	color: var(--smart-blue);
}

.smart-shell .preview-box {
	/* min-height: 98px;  이거 왜 필요할까요?*/
	padding: 10px;
	border: 1px solid #d9e4f0;
	border-radius: 16px;
	background: #f7faff;
}

.smart-shell .preview-box img {
	max-height: 148px;
	object-fit: contain;
}

.smart-shell .result-view {
	/* min-height: 92px; 이거 왜 필요할까요?*/
	border: 0;
	background: transparent;
	padding: 0;
}

.smart-shell .empty-result {
	margin: 0;
	padding: 26px 14px;
	border: 1px solid #d9e4f0;
	border-radius: 16px;
	background: #f8fbff;
	color: #758397;
	font-size: 15px;
	font-weight:650;
	text-align: center;
}

.smart-json {
	margin-top: 12px;
	color: #315375;
	font-size: 14px;
	font-weight: 700;
}

.smart-json summary {
	cursor: pointer;
}

.smart-json pre {
	max-height: 280px;
	overflow: auto;
	padding: 12px;
	border-radius: 12px;
	background: #0f172a;
	color: #dbeafe;
	font-size: 12px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-all;
}

.smart-bottom-actions {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-top: 18px;
}

.smart-bottom {
	height: 48px;
	border: 1px solid #d6e0ed;
	border-radius: 999px;
	background: #f3f7fc;
	color: #6b788a;
	font-size: 15px;
	font-weight: 700;
}

.smart-bottom.yellow {
	border-color: #ecd944;
	background: #fff05b;
	color: #243144;
}

.smart-bottom.blue {
	border-color: var(--smart-blue);
	background: var(--smart-blue);
	color: #ffffff;
}

/* 결과 테이블 보정 */
.result-view table,
.result-table,
.answer-table,
.check-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 8px;
}

.result-view th,
.result-view td {
	padding: 10px 12px;
	border-top: 1px solid #dce7f2;
	border-bottom: 1px solid #dce7f2;
	background: #f8fbff;
	font-size: 14px;
	font-weight: 650;
}

.result-view tr > *:first-child {
	border-left: 1px solid #dce7f2;
	border-radius: 12px 0 0 12px;
}

.result-view tr > *:last-child {
	border-right: 1px solid #dce7f2;
	border-radius: 0 12px 12px 0;
}

/* ============================================================
 * 옵션 모달
 * ============================================================ */
.option-modal {
	position: fixed;
	inset: 0;
	z-index: 10020;
	display: none;
	align-items: flex-end;
	justify-content: center;
	padding: 18px;
	background: rgba(15, 23, 42, 0.48);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.option-modal.is-open {
	display: flex;
}

.option-modal-card {
	width: min(720px, 100%);
	max-height: min(86vh, 820px);
	overflow: auto;
	border: 1px solid rgba(164, 180, 199, 0.42);
	border-radius: 26px;
	background: #ffffff;
	box-shadow: 0 30px 80px rgba(15, 23, 42, 0.30);
}

.option-modal-head {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px 13px;
	border-bottom: 1px solid rgba(212, 222, 233, 0.78);
	background: rgba(255, 255, 255, 0.93);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.option-modal-head h2 {
	margin: 0;
	color: #18365a;
	font-size: 20px;
	font-weight: 700;
}

.option-close-btn {
	width: 40px;
	height: 40px;
	border: 1px solid rgba(96, 121, 149, 0.28);
	border-radius: 999px;
	background: #f8fafc;
	color: #284767;
	font-size: 21px;
	line-height: 1;
}

.option-modal-body {
	padding: 17px 20px 22px;
}

.option-block {
	margin-bottom: 15px;
	padding: 17px;
	border: 1px solid rgba(210, 222, 235, 0.90);
	border-radius: 20px;
	background: #fbfdff;
}

.option-block-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 13px;
}

.option-block-title strong {
	color: #18365a;
	font-size: 17px;
	font-weight: 700;
}

.option-help {
	margin: 8px 0 0;
	color: #6b7d91;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.55;
}

.advanced-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.mini-toggle,
.field-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid #dce7f2;
	border-radius: 14px;
	background: #ffffff;
	color: #243b5a;
	font-size: 14px;
	font-weight: 650;
}

.field-row select {
	max-width: 160px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid #d5dfeb;
	border-radius: 10px;
	font-size: 13px;
}

.device-info-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

.device-info-row {
	display: grid;
	grid-template-columns: 94px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	padding: 11px 12px;
	border: 1px solid rgba(218, 228, 238, 0.92);
	border-radius: 15px;
	background: #ffffff;
}

.device-info-row span {
	color: #6b7d91;
	font-size: 12px;
	font-weight: 700;
}

.device-info-row code,
.device-info-row strong {
	min-width: 0;
	color: #18365a;
	font-size: 13px;
	font-weight: 700;
	word-break: break-all;
}

/* ============================================================
 * 모바일 최적화
 * ============================================================ */
@media (min-width: 721px) {
	.option-modal {
		align-items: center;
	}
}

@media (max-width: 720px) {
	body,
	button,
	input,
	select,
	textarea {
		font-size: 16px;
	}

	.smart-shell {
		width: min(100% - 22px, 560px);
		padding: 12px 0 26px;
	}

	.smart-hero {
		padding: 15px;
		border-radius: 15px;
	}

	.smart-hero-head {
		gap: 11px;
	}

	.smart-logo-link {
		width: 132px;
		min-width: 112px;
		height: 40px;
	}

	.smart-logo-img {
		max-height: 36px;
	}

	.smart-brand-copy h1 {
		font-size: 18px;
	}

	.smart-brand-copy p {
		font-size: 12px;
	}

	.smart-share {
		min-width: 78px;
		height: 36px;
		padding: 0 12px;
		font-size: 13px;
	}

	.smart-hero-panel {
		margin-top: 13px;
		padding: 15px 16px;
		border-radius: 18px;
	}

	.smart-hero-panel strong {
		font-size: 19px;
	}

	.smart-hero-panel span {
		min-width: 94px;
		height: 34px;
		padding: 0 12px;
	}

	.smart-steps {
		padding: 19px 34px 17px;
	}

	.step i {
		width: 40px;
		height: 40px;
		font-size: 17px;
	}

	.step-line {
		margin-top: 20px;
	}

	.smart-main,
	.scanner-layout.smart-main {
		gap: 10px;
	}

	.smart-card,
	.camera-card,
	.preview-panel,
	.result-panel {
		padding: 17px;
		border-radius: 18px;
	}

	.smart-section-title h2 {
		font-size: 20px;
	}

	.smart-section-title > span:not(.score-mode) {
		min-height: 28px;
		padding: 0 14px;
		font-size: 12px;
	}

	.smart-field.inline-label {
		grid-template-columns: 118px minmax(0, 1fr);
		gap: 10px;
	}

	.smart-field select,
	.smart-field input {
		height: 48px;
		padding-left: 14px;
		font-size: 16px;
	}

	.smart-tags {
		padding-left: 0;
	}

	.smart-action-tabs {
		gap: 9px;
	}

	.smart-tab {
		height: 44px;
		font-size: 14px;
	}

	.smart-shell .camera-frame {
		min-height: 176px;
		aspect-ratio: 3.9 / 1;
		border-radius: 16px;
	}

	.smart-shell .scan-guide {
		inset: 20px;
	}

	.smart-shell .scan-guide span {
		width: 56px;
		height: 42px;
	}

	.smart-shell .lens-mark {
		width: 56px;
		height: 56px;
	}

	.smart-shell .empty-camera strong {
		font-size: 17px;
	}

	.smart-shell .preview-box img {
		max-height: 118px;
	}

	.smart-bottom-actions {
		position: sticky;
		bottom: 0;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 8px;
		padding-top: 8px;
		background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%);
	}

	.smart-bottom {
		height: 44px;
		font-size: 13px;
	}

	.advanced-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.smart-shell {
		width: min(100% - 16px, 430px);
	}

	.smart-hero-head {
		grid-template-columns: 1fr auto;
		flex-wrap: wrap;
	}

	.smart-logo-link {
		width: 124px;
		min-width: 104px;
	}

	.smart-brand-copy {
		order: 3;
		flex: 1 1 100%;
		padding-top: 3px;
	}

	.smart-brand-copy h1 {
		font-size: 17px;
	}

	.smart-share {
		margin-left: auto;
	}

	.smart-hero-panel span {
		display: none;
	}

	.smart-steps {
		padding-left: 16px;
		padding-right: 16px;
	}

	.smart-form-grid.two-col {
		/*grid-template-columns: 1fr;*/
		grid-template-columns: 1fr 1fr;
	}

	.smart-field.inline-label {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.smart-action-tabs {
		grid-template-columns: 1fr 1fr 1fr;
	}

	.smart-tab {
		font-size: 13px;
	}

	.smart-warn {
		font-size: 13px;
	}
}


/* ============================================================
 * v3 요청 반영 보정
 * ------------------------------------------------------------
 * - 로고는 index.php에서 https://nesin.com/images/logo.svg 사용
 * - smart-hero / smart-banner 통합 상태 유지
 * - 배경은 #f6f9ff 단색 유지
 * - 기본 글씨 16px, UI 글씨 12~21px 범위 유지
 * - 선택과목 3개는 한 줄 배치
 * ============================================================ */
.smart-subject-card .subject-line {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	align-items: end;
}

.smart-subject-card .subject-field {
	min-width: 0;
}

.smart-subject-card .subject-field > span {
	display: block;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 700;
	color: var(--smart-muted);
}

.smart-subject-card .subject-field select {
	padding-left: 13px;
	padding-right: 34px;
	font-size: 15px;
}

.smart-tags.compact {
	padding-left: 0;
	margin-top: 12px;
}

/* 헤더 통합 영역을 조금 더 정돈 */
.smart-hero {
	background:
		linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.94));
}

.smart-hero-panel {
	background:
		linear-gradient(135deg, #112a50 0%, #122b4d 54%, #173763 100%);
}

.smart-brand-copy h1,
.smart-hero-panel strong,
.smart-section-title h2 {
	font-size: min(21px, 5.2vw);
}

/* 모바일에서도 선택과목 3개는 한 줄 유지 */
@media (max-width: 720px) {
	.smart-subject-card .subject-line {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}

	.smart-subject-card .subject-field > span {
		font-size: 12px;
	}

	.smart-subject-card .subject-field select {
		height: 46px;
		padding-left: 9px;
		padding-right: 26px;
		font-size: 14px;
		border-radius: 13px;
	}
}

@media (max-width: 480px) {
	/* 기존 모바일 규칙에서 inline-label만 1열로 바꾸고, subject-line은 3열 유지 */
	.smart-subject-card .subject-line {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 7px;
	}

	.smart-subject-card .subject-field {
		gap: 5px;
	}

	.smart-subject-card .subject-field > span {
		font-size: 12px;
		letter-spacing: -0.05em;
	}

	.smart-subject-card .subject-field select {
		height: 44px;
		padding-left: 7px;
		padding-right: 21px;
		font-size: 13px;
	}
}

@media (max-width: 380px) {
	/* 극단적으로 좁은 화면에서는 3열을 유지하되 가로 스크롤로 깨짐 방지 */
	.smart-subject-card .subject-line {
		grid-template-columns: repeat(3, minmax(104px, 1fr));
		overflow-x: auto;
		padding-bottom: 2px;
		-webkit-overflow-scrolling: touch;
	}
}
























/* ============================================================
 * 카메라 전체화면 모드 - smart 디자인 호환 패치
 * ------------------------------------------------------------
 * 기존 카메라 스크립트는 카메라 실행 시 body에 is-camera-on을 붙입니다.
 * 그런데 이번 index.php 디자인 수정으로
 * smart-hero, smart-steps, smart-exam-card, smart-subject-card,
 * preview-panel, result-panel 같은 새 섹션이 생겼습니다.
 *
 * 기존 app.css는 예전 구조 기준으로 일부 패널만 숨기기 때문에,
 * 새로 만든 OCR 인식 이미지(#screenView)가 카메라 화면 위에
 * 같이 보이는 문제가 발생합니다.
 *
 * 해결:
 * - 카메라 실행 중에는 camera-card만 남김
 * - OCR 인식 이미지 / 가채점 현황 / 시험정보 / 선택과목은 숨김
 * - 카메라 카드 안의 제목/버튼/안내문도 숨기고 실제 cameraFrame만 표시
 * ============================================================ */

body.is-camera-on .smart-hero,
body.is-camera-on .smart-steps {
	display: none !important;
}

/*
 * 카메라 실행 중에는 smart-main 안에서 camera-card만 보이게 합니다.
 * 이 한 줄이 핵심입니다.
 *
 * 숨겨지는 것:
 * - 시험 정보
 * - 선택 과목
 * - OCR 인식 이미지
 * - 가채점 현황
 */
body.is-camera-on .smart-main > section:not(.camera-card) {
	display: none !important;
}

/*
 * 전체화면 카메라 모드에서는 바깥 여백 제거
 */
body.is-camera-on .smart-shell {
	width: 100vw !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/*
 * smart-main도 카드 레이아웃이 아니라 카메라 전용 화면처럼 처리
 */
body.is-camera-on .smart-main,
body.is-camera-on .scanner-layout.smart-main {
	display: block !important;
	width: 100vw !important;
	height: 100dvh !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
	background: #000 !important;
}

/*
 * 카메라 카드 자체는 전체화면 컨테이너로 사용
 */
body.is-camera-on .camera-card {
	display: block !important;
	width: 100vw !important;
	height: 100dvh !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #000 !important;
	box-shadow: none !important;
	overflow: visible !important;
}

/*
 * 카메라 실행 중에는 카드 안의 제목/상단 버튼/노란 안내문 숨김
 * 실제 카메라 화면과 플로팅 촬영/닫기 버튼만 남깁니다.
 */
body.is-camera-on .camera-card > .smart-section-title,
body.is-camera-on .camera-card > .smart-action-tabs,
body.is-camera-on .camera-card > .smart-warn {
	display: none !important;
}

/*
 * OCR 인식 이미지 영역은 카메라 실행 중 절대 보이면 안 됨
 */
body.is-camera-on #screenView,
body.is-camera-on .preview-panel,
body.is-camera-on .result-panel {
	display: none !important;
}

/*
 * smart CSS가 camera-frame 크기를 줄여놓은 것을
 * 카메라 전체화면 모드에서는 다시 전체화면으로 보정
 */
body.is-camera-on .smart-shell .camera-frame {
	width: 100vw !important;
	height: 100dvh !important;
	min-height: 100dvh !important;
	max-height: none !important;
	aspect-ratio: auto !important;
	margin: 0 !important;
	border-radius: 0 !important;
	background: #000 !important;
}

/*
 * 카메라 내부 video/canvas도 둥근 모서리 제거
 */
body.is-camera-on .smart-shell .camera-frame video,
body.is-camera-on .smart-shell .camera-frame canvas {
	border-radius: 0 !important;
}








/* ============================================================
 * 상단 공유 / 설정 버튼
 * ------------------------------------------------------------
 * 기기정보, AI설정, 이미지보정 옵션은 화면에 항상 보이지 않고
 * 설정 버튼을 눌렀을 때 optionModal로 보여주는 구조가 가장 깔끔함.
 * ============================================================ */

.smart-hero-actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 7px;
	white-space: nowrap;
}

.smart-option-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	min-width: 58px;
	padding: 0 14px;
	border: 1px solid #dbe5f1;
	border-radius: 999px;
	background: #ffffff;
	color: #52657b;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: -0.03em;
	cursor: pointer;
	box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.smart-option-btn:active {
	transform: translateY(1px);
}

@media (max-width: 420px) {
	.smart-hero-actions {
		gap: 5px;
	}

	.smart-share,
	.smart-option-btn {
		height: 31px;
		min-width: 47px;
		padding: 0 10px;
		font-size: 12px;
	}
}
