	/*body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans KR",sans-serif;background:#f6f8fb;margin:12px}*/
	.app{display:grid;grid-template-columns:minmax(680px,1fr) 260px;gap:10px;min-height:90vh;max-width:1280px;margin:0 auto;}
	.stage-col,.side-col{background:#fff;border:1px solid #e5e7eb;border-radius:12px}
	.stage-col{padding:12px;overflow:auto}
	.side-col{padding:12px;max-height:calc(100vh - 140px);overflow:auto}
	
	/* 오른쪽: 큰 옵션만(타일/아코디언 헤더 느낌의 버튼) */
	.opt-heads{display:grid;gap:8px}
	.opt-btn{
	width:100%; text-align:left; padding:12px; border:1px solid #dbe3eb; border-radius:12px;
	background:#f8fafc; cursor:pointer; display:flex; flex-direction:column; gap:2px;
	}
	.opt-btn strong{font-size:14px}
	.opt-btn span{font-size:12px;color:#6b7280}
	
	/* 캔버스/표 */
	#wrap{display:inline-block;border:1px solid #dbe3eb;}
	.paper-view-hint{
		display:inline-flex;
		align-items:center;
		margin-left:6px;
		padding:2px 7px;
		border:1px solid #dbe3eb;
		border-radius:999px;
		background:#f8fafc;
		color:#475569;
		font-size:12px;
		font-weight:600;
		vertical-align:middle;
	}
	#wrap.paper-actual{
		box-shadow:0 10px 28px rgba(15,23,42,.12);
	}
	.list-wrap{margin-top:10px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;padding:10px}
	table{width:100%;border-collapse:collapse}
	th,td{border:1px solid #e5e7eb;padding:6px 8px;font-size:12px}
	th{background:#f8fafc;text-align:left}
	
	/* 모달 */
	.modal-backdrop{
		position:fixed;inset:0;background:rgba(2,6,23,.5);display:none;
		align-items:center;
		justify-content:right;
		z-index:999
	}
	/* 모달을 오른쪽에 띄우기용 */
	.modal-backdrop.right {
		display: flex;              /* 보이게 할 때 flex 유지 */
		justify-content: flex-end;  /* 가로 방향: 오른쪽 */
		align-items: center;        /* 세로 방향: 중앙 */
		padding-right: 16px;        /* 오른쪽 여백 */
	}

	.modal{width:660px;max-width:calc(100% - 32px);background:#fff;border-radius:14px;box-shadow:0 10px 30px rgba(2,6,23,.25);overflow:hidden}
	.modal header{padding:10px 12px;border-bottom:1px solid #e5e7eb;font-weight:600}
	.modal .content{padding:12px;max-height:70vh;overflow:auto;
	padding:0px;margin:0px;width:100%;
	}
	.modal .actions{display:flex;justify-content:flex-end;gap:8px;padding:10px 12px;border-top:1px solid #e5e7eb}
	
	/*.btn{padding:8px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;cursor:pointer}
	.btn.primary{background:#0A76C8;color:#fff;border-color:#0A76C8}*/
	.quick{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
	.file{display:inline-flex;align-items:center;gap:6px;border:1px dashed #cbd5e1;border-radius:10px;padding:8px 10px;color:#475569;cursor:pointer}
	.file input{display:none}
  
  
	/* === Button System === */
	:root{
	  --brand:#0A76C8;           /* 테마색 */
	  --brand-600:#0a6ab4;
	  --text:#0f172a;
	  --bg:#fff;
	  --border:#e5e7eb;
	}
	
	.btn{
	  appearance:none; border:1px solid var(--border); background:var(--bg); color:var(--text);
	  padding:10px 14px; border-radius:12px; font-weight:600; line-height:1;
	  display:inline-flex; align-items:center; gap:8px; cursor:pointer;
	  transition:box-shadow .2s, transform .05s, background-color .2s, border-color .2s;
	  box-shadow:0 1px 2px rgba(2,6,23,.06);
	}
	.btn:hover{ background:#f8fafc; }
	.btn:active{ transform:translateY(1px); }
	.btn:focus-visible{
	  outline:none;
	  box-shadow:0 0 0 3px color-mix(in srgb, var(--brand) 28%, transparent);
	  border-color:color-mix(in srgb, var(--brand) 55%, var(--border));
	}
	.btn[disabled]{ opacity:.55; cursor:not-allowed; box-shadow:none; }
	
	/* Variants */
	.btn--primary{ background:var(--brand); border-color:var(--brand); color:#fff; }
	.btn--primary:hover{ background:var(--brand-600); border-color:var(--brand-600); }
	
	.btn--outline{ background:#fff; color:var(--brand); border-color:var(--brand); }
	.btn--outline:hover{ background:color-mix(in srgb, var(--brand) 10%, #fff); }
	
	.btn--ghost{ background:transparent; border-color:transparent; color:var(--text); }
	.btn--ghost:hover{ background:#f3f4f6; }
	
	.btn--danger{ background:#ef4444; border-color:#ef4444; color:#fff; }
	.btn--danger:hover{ background:#dc2626; border-color:#dc2626; }
	
	/* Sizes */
	.btn--sm{ padding:6px 10px; border-radius:10px; font-size:12px; }
	.btn--lg{ padding:12px 16px; border-radius:14px; font-size:15px; }
	
	/* Icon button */
	.btn--icon{ padding:8px; width:36px; height:36px; justify-content:center; }
	.btn .icon{ width:1.1em; height:1.1em; display:inline-block; }
	
	/* Button group (간격 유지) */
	.btn-group{ display:inline-flex; gap:8px; }
	
	/* Loading (선택사항) */
	.btn[aria-busy="true"]{ pointer-events:none; opacity:.9; }
	.btn .spinner{
	  width:1em; height:1em; border:2px solid currentColor; border-left-color:transparent;
	  border-radius:50%; display:none; animation:spin 1s linear infinite;
	}
	.btn[aria-busy="true"] .spinner{ display:inline-block; }
	@keyframes spin{ to{ transform:rotate(360deg); } }
  


	/* ==========================================================
	 * 옵션 모달 UX 개선
	 * - 모달이 떠도 캔버스 클릭/선택 가능(배경 클릭-스루)
	 * - 모달 드래그 이동(헤더 드래그)
	 * ========================================================== */
	#optModal{ pointer-events:none; }
	#optModal.modal-backdrop{ background:rgba(2,6,23,.22); }
	#optModal .modal{
		pointer-events:auto;
		position:fixed;
		right:16px;
		top:50%;
		transform:translateY(-50%);
	}
	#optModal .modal header{ cursor:move; user-select:none; }

 /* 
*
*	상단 전역바 
*
*/
/* 상단 전역바 */
.global-bar{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:10px;margin-bottom:10px}
.global-bar .row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.spacer{flex:1}

/* 세그먼트(세로/가로) */
.seg{position:relative;display:inline-flex;border:1px solid #cbd5e1;border-radius:10px;overflow:hidden}
.seg button{padding:8px 12px;background:#fff;border:0;cursor:pointer}
.seg button.on{background:#0A76C8;color:#fff;font-weight:600}

/* 미니 컨트롤 묶음 */
.mini{display:flex;align-items:center;gap:6px;background:#f8fafc;border:1px solid #dbe3eb;border-radius:10px;padding:6px 8px}
.mini > span{font-size:12px;color:#475569}

/* 버튼 느낌 select/input */
.select-like,.input-like{
  border:1px solid #cbd5e1;border-radius:8px;padding:6px 10px;background:#fff;min-width:110px
}
.input-like{min-width:68px}

/* 체크 */
.chk{display:inline-flex;align-items:center;gap:6px;color:#334155}

/* 버튼/파일 */
.btn{padding:8px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;cursor:pointer}
.btn.primary{background:#0A76C8;color:#fff;border-color:#0A76C8}
.file{display:inline-flex;align-items:center;gap:6px;border:1px dashed #cbd5e1;border-radius:10px;padding:8px 10px;color:#475569;cursor:pointer}
.file input{display:none}

/* A4 가이드 토글용: #wrap 배경을 끄고 켜기 */
#wrap.grid-off{background:#fff !important}


/* 접근성용 숨김 */
.visually-hidden{position:absolute; inset:0; opacity:0; pointer-events:none; width:0; height:0}

/* 공통 래퍼 */
.ctrl{display:inline-flex; align-items:center; gap:1px; background:#f8fafc; border:1px solid #e5e7eb;
      border-radius:12px; padding:3px 5px}
.ctrl-label{font-size:12px; color:#475569; font-weight:600;}

/* 테마 스와치 */
.swatches{display:inline-flex; gap:6px}
.swatch{width:18px; height:18px; border-radius:999px; border:2px solid transparent; cursor:pointer; position:relative}
.swatch::after{content:""; position:absolute; inset:-4px; border-radius:999px; border:2px solid transparent; transition: .15s}
.swatch:hover::after{border-color:#cbd5e1}
.swatch.is-active{outline:2px solid #0a76c8; outline-offset:2px}
.swatch.blue{background:#0A76C8}
.swatch.green{background:#118B50}
.swatch.magenta{background:#D3128E}

/* 세그먼트 (작게) */
.seg-ui.small{display:inline-grid; grid-template-columns:repeat(2,1fr); border:1px solid #cbd5e1; border-radius:10px; overflow:hidden}
.seg-ui.small button{padding:6px 10px; background:#fff; border:0; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px}
.seg-ui.small button.active{background:#0A76C8; color:#fff; font-weight:600}

/* 간단 아이콘 */
.ico{width:16px; height:16px; display:inline-block; position:relative}
.ico-square{border-radius:3px; background:#1f2937}
.ico-circle{border-radius:999px; background:#1f2937}
.ico-bull::before,.ico-bull::after{content:""; position:absolute; inset:0; border-radius:999px}
.ico-bull::before{background:#1f2937}
.ico-bull::after{inset:4px; background:#fff; border-radius:999px}

/* 넘버 인풋 */
.input-stepped{width:45px !important; 
      border:1px solid #cbd5e1; border-radius:8px; padding:3px 0px; background:#fff;
      text-align:center;
      height:28px !important;}

/* 스위치 */
.switch{--h:24px; --w:46px; position:relative; display:inline-flex; align-items:center}
.switch input{position:absolute; opacity:0; inset:0}
.switch .track{width:var(--w); height:var(--h); background:#e5e7eb; border-radius:999px; position:relative; transition:.18s}
.switch .thumb{position:absolute; top:2px; left:2px; width:calc(var(--h) - 4px); height:calc(var(--h) - 4px);
               background:#fff; border-radius:999px; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:.18s}
.switch input:checked + .track{background:#0A76C8}
.switch input:checked + .track .thumb{left:calc(100% - var(--h) + 2px)}



  
  
/* 캔버스 컨테이너는 기준 박스여야 함 */
#wrap{
  position: relative;         /* ★ 꼭 필요 */
  display: inline-block;
  background:#fff;            /* A4 흰 배경 */
  border:1px solid #dbe3eb;
  border-radius:8px;
}
#cv{ display:block; }         /* 캔버스 주변 여백 제거 */

/* 그리드 켜짐: 오버레이로 캔버스 '위'에 얹기 */
#wrap.grid-on::after{
  content:"";
  position:absolute; inset:0;
  pointer-events:none;        /* 클릭 방해 X */
  z-index:5;                  /* ★ 캔버스보다 위 */
  border-radius:8px;
  /* 진하게(디버그): 보조 5px, 굵은 25px */
  background:
    linear-gradient(to right, rgba(0,0,0,.14) 1px, transparent 1px) 0 0 / 5px 5px,
    linear-gradient(to bottom, rgba(0,0,0,.14) 1px, transparent 1px) 0 0 / 5px 5px,
    linear-gradient(to right, rgba(0,0,0,.25) 1px, transparent 1px) 0 0 / 25px 25px,
    linear-gradient(to bottom, rgba(0,0,0,.25) 1px, transparent 1px) 0 0 / 25px 25px;
}

/* 인쇄 시엔 강제 숨김 */
@media print{
  #wrap::after{ display:none !important; }
}


/*
툴바에 잘 어울리는 미니 셀렉터
툴바 스타일과 톤을 맞춘 작고 심플한 셀렉터
*/
.global-bar .inline-select select{
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 4px 24px 4px 8px;
  border-radius: 8px;
  line-height: 1.2;
  cursor: pointer;
}
.global-bar .inline-select{
  position: relative;
  margin-left: 8px;
}
.global-bar .inline-select::after{
  content: "▾";
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: #6b7280; pointer-events: none;
}




/* ========= Form UI: OMR Template Editor ========= */
:root{
  --bg: #ffffff;
  --panel-bg: #f9fafb;
  --panel-border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --primary: #0A76C8;
  --primary-600: #0a6ab3;
  --ring: rgba(10,118,200,.35);
  --radius: 12px;
  --gap: 12px;
  --label-w: 120px;
  --input-h: 36px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 12px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-in: inset 0 1px 0 rgba(255,255,255,.5);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }
html,body { /*font-family: var(--font);background: var(--bg);*/ color: var(--text);  }

/* ===== Panels ===== */
.panel{
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}
.panel .btns{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
}

/* ===== Field rows ===== */
.fld{
  display: grid;
  grid-template-columns: var(--label-w) 1fr;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 10px;
}
.fld > label{
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}

/* 내부 flex span(이미 인라인 스타일도 있지만 공통 보정) */
.fld > span{
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ===== Inputs / Selects / Textareas ===== */
input[type="text"],
input[type="number"],
input[type="color"],
input[type="file"],
select,
textarea{
  width: 100%;
  height: var(--input-h);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 10px;
  line-height: var(--input-h);
  outline: none;
  box-shadow: var(--shadow-in);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea{
  min-height: calc(var(--input-h) * 2);
  padding: 8px 10px;
  line-height: 1.5;
  resize: vertical;
}

input[type="color"]{
  padding: 0;
  width: 48px;
  min-width: 48px;
  height: var(--input-h);
  border-radius: 8px;
}

/* File input: 버튼 톤 통일 */
input[type="file"]{
  padding: 0;
}
input[type="file"]::file-selector-button{
  margin: 0 8px 0 0;
  padding: 0 12px;
  height: calc(var(--input-h) - 6px);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: all .15s ease;
}
input[type="file"]::file-selector-button:hover{
  background: #f3f4f6;
}

/* Select: 기본 화살표 개선(크롬/엣지/사파리) */
select{
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%),
    linear-gradient(to right, #d1d5db, #d1d5db);
  background-position:
    calc(100% - 16px) 14px,
    calc(100% - 11px) 14px,
    calc(100% - 32px) 50%;
  background-size: 5px 5px, 5px 5px, 1px 60%;
  background-repeat: no-repeat;
  padding-right: 36px;
}

/* Focus ring */
input:focus,
select:focus,
textarea:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

/* Disabled */
input:disabled,
select:disabled,
textarea:disabled{
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* ===== Buttons ===== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform .04s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  user-select: none;
}
.btn:active{ transform: translateY(1px); }

.btn--lg{ height: 40px; padding: 0 16px; }
.btn.primary{
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn.primary:hover{ background: var(--primary-600); }
.btn--outline{
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}
.btn--outline:hover{
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Add/Edit 전환(컨테이너에 .mode-edit 추가하면 스위칭) */
.addOnly{ display: inline-flex; }
.editOnly{ /*display: none;*/ }
.mode-edit .addOnly{ display: none; }
.mode-edit .editOnly{ display: inline-flex; }

/* ===== Small hint & HR ===== */
.hint{
  color: #6b7280;
  font-size: 12px;
}
.panel hr{
  border: none;
  border-top: 1px dashed #e5e7eb;
  margin: 8px 0;
}

/* ===== Utilities for narrow numbers ===== */
input[type="number"][id^="mcNumW"],
input[type="number"][id^="mcHeaderGap"],
#lnAngle, #lnLen, #lnSW{ max-width: 120px; }

/* ===== Panel-specific micro tweaks (선택적) ===== */
#panel-logo .fld:last-child,
#textPanel .fld:last-child,
#panel-examid .fld:last-child,
#panel-score .fld:last-child,
#panel-etc .fld:last-child,
#mcPanel .fld:last-child{
  margin-bottom: 4px;
}

/* 라인 스타일 미리보기 느낌(선택 상자 옆 라인) — 필요시 클래스 부여해 사용 */
.line-preview{
  width: 100%;
  height: 6px;
  background: currentColor;
  border-radius: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 720px){
  .fld{ grid-template-columns: 1fr; }
  .panel{ padding: 14px; }
  .panel .btns{ flex-wrap: wrap; justify-content: stretch; }
  .panel .btns .btn{ flex: 1 1 auto; }
  :root{ --label-w: 1fr; }
}

/* ===== Dark mode (자동) ===== */
@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --panel-bg: #0f172a;
    --panel-border: #1f2a44;
    --text: #e5e7eb;
    --muted: #9aa4b2;
    --ring: rgba(10,118,200,.45);
  }
  input[type="text"],
  input[type="number"],
  input[type="color"],
  input[type="file"],
  select,
  textarea{
    background: #0b1220;
    color: var(--text);
    border-color: #243150;
  }
  select{
    background-image:
      linear-gradient(45deg, transparent 50%, #a6b0bf 50%),
      linear-gradient(135deg, #a6b0bf 50%, transparent 50%),
      linear-gradient(to right, #243150, #243150);
  }
  .btn--outline{ background:#0b1220; color:#e5e7eb; border-color:#2b3a5e; }
  .btn--outline:hover{ background:#0c1528; border-color:#3a4d7b; }
  .panel{ box-shadow: none; }
}

.btnStyle{
	background:#F2F8FC !important;
	border-radius:5px;
	border:1px solid #2080D0;
	
	padding:5px 7px;
	text-align:center;
}
input::number{border:1px solid #ddd !important;}

	  .panel .grid.compact {
	    display: grid;
	    grid-template-columns: 110px 1fr 110px 1fr; /* 4열 그리드로 높이 절감 */
	    gap: 6px 8px;
	    align-items: center;
	  }
	  details.adv { margin-top: 6px; }
	  details.adv > summary { cursor: pointer; color: #177; font-weight: 600; }
	  
	  
	  /* 팝업/패널 내부 스크롤 제거 */
	  .panel, .popup-body, .dialog-body { max-height: none !important; overflow: visible !important; }
	  /* 옵션을 더 촘촘히 (이미 있다면 유지) */
	  .panel .grid.compact { grid-template-columns: 110px 1fr 110px 1fr; gap: 6px 8px; }
	  

/*
 * 디자이너 안정화 패치
 * ============================================================
 * 기존 CSS/inline style을 크게 갈아엎지 않고 마지막에서 보정합니다.
 * - 모달 폭/높이/스크롤 안정화
 * - 모바일에서 모달이 화면 밖으로 나가지 않게 보정
 * - export 버튼을 일반 버튼 시스템과 맞춤
 * - 구형 브라우저에 약한 :has() 의존 제거
 */
.designer-hidden-field {
	display: none !important;
}

.export-btn {
	width: 100%;
	min-height: 42px;
	border-radius: 10px !important;
	justify-content: center;
	text-align: center;
}

.modal-backdrop {
	padding: 12px;
}

.modal-backdrop .modal {
	width: min(660px, calc(100vw - 24px)) !important;
	max-height: calc(100svh - 24px);
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	border: 1px solid #d9e2ec;
}

.modal-backdrop .modal header {
	min-height: 44px;
	display: flex;
	align-items: center;
	font-size: 15px;
	font-weight: 600 !important;
	color: #1f3a5f;
	background: #f8fafc;
}

.modal-backdrop .modal .content,
#modalBody,
#aeBody {
	min-height: 0;
	max-height: min(70svh, 680px);
	overflow: auto;
	padding: 12px !important;
}

.modal-backdrop .modal .actions {
	background: #ffffff;
}

#optModal {
	background: transparent !important;
}

#optModal .modal {
	right: 12px;
	width: min(620px, calc(100vw - 24px)) !important;
}

#areaModal {
	justify-content: center !important;
	padding: 12px !important;
}

#advModal {
	justify-content: center;
	align-items: center;
	padding: 12px;
}

#advModal .modal,
#areaModal .modal {
	width: min(540px, calc(100vw - 24px)) !important;
}

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

	.global-bar .row {
		align-items: stretch;
	}

	.global-bar .ctrl,
	.global-bar .mini,
	.global-bar .seg {
		max-width: 100%;
	}

	#optModal .modal {
		left: 8px !important;
		right: 8px !important;
		top: 8px !important;
		width: calc(100vw - 16px) !important;
		max-height: calc(100svh - 16px);
		transform: none !important;
	}

	.modal-backdrop .modal .content,
	#modalBody,
	#aeBody {
		max-height: calc(100svh - 120px);
	}
}

.omr-save-box{display:grid;gap:7px;padding:10px;border:1px solid #dbe3eb;border-radius:12px;background:#f8fafc}
.omr-save-label{font-size:12px;font-weight:600;color:#475569}
.omr-save-name{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:8px 9px;font-size:13px}
.omr-save-check{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:#334155;cursor:pointer}
.omr-save-check input{width:16px;height:16px}
.omr-save-status{font-size:11px;line-height:1.45;color:#64748b;word-break:break-all}


/* 기본 고사정보 패널 */
.exam-info-guide {
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f7fbff;
  color: #40566d;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}
.exam-info-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.exam-info-fields label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #d9e4ef;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
}
.exam-info-fields input {
  width: 16px;
  height: 16px;
}

/* ==========================================================
 * 오른쪽 옵션 패널
 * - workspace.php 구조는 변경하지 않습니다.
 * - 옵션은 읽기 쉬운 한 줄형 버튼으로 유지합니다.
 * - 저장/내보내기 영역은 패널 하단 전용 행에 고정합니다.
 * ========================================================== */
@media (min-width: 721px) {
  .side-col {
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 654px;
    max-height: 654px;
    padding: 12px;
    overflow: hidden;
  }

  .side-col > h3 {
    margin: 0 0 8px !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
  }

  .side-col > .opt-heads {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows:
      repeat(11, minmax(34px, 1fr))
      2px
      auto
      42px;
    gap: 5px;
    overflow: hidden;
  }

  /* 옵션 버튼은 세로 카드가 아니라 한 줄 메뉴처럼 보여줍니다. */
  .side-col > .opt-heads > .opt-btn {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    max-height: none;
    margin: 0;
    padding: 5px 9px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    background: #fbfdff;
    text-align: left;
    box-shadow: none;
  }

  .side-col > .opt-heads > .opt-btn:hover {
    border-color: #b9d4ea;
    background: #f4f9fd;
  }

  .side-col > .opt-heads > .opt-btn strong {
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: #25384a;
    white-space: nowrap;
  }

  .side-col > .opt-heads > .opt-btn span {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    color: #718096;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 기존 br 자리를 옵션과 저장 영역 사이 구분선으로 사용합니다. */
  .side-col > .opt-heads > br {
    display: block;
    grid-row: 12;
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: #e7edf3;
  }

  .side-col > .opt-heads > .omr-save-box {
    grid-row: 13;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 5px 7px;
    margin: 0;
    padding: 8px;
    border: 1px solid #dbe5ef;
    border-radius: 9px;
    background: #f7fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  }

  .side-col > .opt-heads > .omr-save-box .omr-save-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #475569;
  }

  .side-col > .opt-heads > .omr-save-box .omr-save-name {
    width: 100%;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 12px;
  }

  .side-col > .opt-heads > .omr-save-box .omr-save-check {
    grid-column: 1 / -1;
    min-height: 20px;
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
  }

  .side-col > .opt-heads > .omr-save-box .omr-save-status {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .side-col > .opt-heads > .export-btn {
    grid-row: 14;
    width: 100%;
    min-height: 42px;
    height: 42px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 9px !important;
    font-size: 15px;
    font-weight: 600;
  }
}

@media (max-width: 720px) {
  .side-col {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .side-col > .opt-heads {
    display: grid;
    gap: 8px;
    overflow: visible;
  }
}
