/* 공통 스타일: 색상 토큰, 페이지 공통 요소, 모바일 가변 레이아웃
   무지개 척도 색(라디오 버튼)은 style2.css 에 있으며 변경하지 않는다. */

:root{
	--bg:#27415f;
	--title:#a7b6c9;
	--title-shadow:#1d3149;
	--sub:#eef2f7;
	--sub-shadow:#9fb0c4;
	--muted:#b3c1d3;
	--card:#ecf0f1;
	--card-border:rgba(180,180,180,.5);
}

body{
	background:var(--bg);
	font-family:'Noto Sans KR','Malgun Gothic','Apple SD Gothic Neo',sans-serif;
	-webkit-font-smoothing:antialiased;
}
button, select, textarea, input, .button, .button2{
	font-family:inherit;
}
.cover{
	width:100%;
	height:100%;
	display:block;
	z-index:1000;
	background:var(--bg);
}
.page-title{
	font-size:25px;
	text-align:center;
	color:var(--title);
	font-weight:700;
	letter-spacing:-.01em;
	margin-top:15px;
	margin-bottom:20px;
}
.page-sub{
	font-size:20px;
	text-align:center;
	color:var(--sub);
	font-weight:500;
	letter-spacing:-.01em;
}
.progress-text{
	font-size:12px;
	text-align:center;
	color:var(--muted);
}
.question-text{
	font-size:14px;
}
.btn-row{
	text-align:center;
	margin:10px 0 20px 0;
}
.copyright{
	color:var(--muted);
	text-align:center;
	width:100%;
	font-size:12px;
	letter-spacing:.02em;
	padding:6px 0 18px;
	opacity:.85;
}
.class-card{
	margin:10px 0 20px 0;
	font-size:14px;
	text-align:center;
	color:#000;
	background:var(--card);
	border:1px solid var(--card-border);
	border-radius:15px;
	padding:15px;
}
.class-card:last-child{
	margin-bottom:0;
}
/* 척도 라벨 (무지개 색 유지) */
.scale-low{ color:#e74c3c; font-weight:700; font-size:13px; }
.scale-mid{ color:#1abc9c; font-weight:700; font-size:13px; }
.scale-high{ color:#9b59b6; font-weight:700; font-size:13px; }

/* ---- 모바일 가변 레이아웃 ---- */
.test{
	width:auto;
	max-width:460px;
	margin:0 auto;
	padding:0 10px;
	box-sizing:border-box;
}
.wrap{
	padding-left:10px;
	padding-right:10px;
	box-sizing:border-box;
}
.button{
	max-width:100%;
	box-sizing:border-box;
}
.scale{
	display:flex;
	justify-content:space-between;
	margin-bottom:14px;
	font-size:14px;
}
ul{
	display:flex;
	justify-content:space-between;
	padding:0 14px 0 10px;
	box-sizing:border-box;
	overflow:visible;
}
ul li{
	float:none;
	margin-left:0;
	flex:0 0 40px;
}
.q_box, .q_box1{
	box-sizing:border-box;
}
textarea.result, #result{
	max-width:100%;
	box-sizing:border-box;
}
#result{
	width:calc(100% - 30px) !important;
}
@media (max-width:420px){
	.question-text{
		padding:12px;
	}
}


/* ---- 추천 게임 카드 (자체 홍보) ---- */
.promo{
	display:block;
	position:relative;
	margin:4px 0 14px;
	padding:0;
	overflow:hidden;
	border-radius:15px;
	border:1px solid rgba(167,139,250,.35);
	background:linear-gradient(135deg,#1b1740 0%,#2d1f5e 60%,#3a2670 100%);
	color:#fff;
	text-decoration:none;
	box-shadow:0 8px 20px rgba(0,0,0,.22);
	transition:transform .15s ease, box-shadow .15s ease;
}
.promo:hover{
	transform:translateY(-2px);
	box-shadow:0 12px 26px rgba(0,0,0,.3);
}
.promo-tag{
	position:absolute;
	top:10px;
	left:10px;
	z-index:1;
	font-size:11px;
	font-weight:500;
	letter-spacing:.04em;
	color:#fff;
	background:rgba(20,16,48,.72);
	border:1px solid rgba(201,184,255,.5);
	border-radius:999px;
	padding:2px 9px;
}
.promo-img{
	display:block;
	width:100%;
	height:auto;
	aspect-ratio:800/461;
	background:#1b1740;
}
.promo-body{
	padding:12px 16px 14px;
}
.promo-desc{
	font-size:13px;
	line-height:1.5;
	color:#ddd4f7;
	margin-bottom:10px;
}
.promo-cta{
	display:inline-block;
	font-size:13px;
	font-weight:700;
	color:#1b1740;
	background:#e6dcff;
	border-radius:999px;
	padding:6px 14px;
}


/* ---- 결과 이미지 저장: 길게 눌러 저장 화면 ---- */
.bri-overlay{
	position:fixed;
	inset:0;
	z-index:10000;
	display:flex;
	align-items:center;
	justify-content:center;
	background:rgba(10,18,30,.82);
	padding:16px;
	box-sizing:border-box;
}
.bri-box{
	width:100%;
	max-width:420px;
	max-height:100%;
	overflow:auto;
	background:#fff;
	border-radius:15px;
	padding:14px;
	box-sizing:border-box;
	text-align:center;
}
.bri-msg{
	font-size:13px;
	color:#2c3e50;
	margin-bottom:10px;
	line-height:1.5;
}
.bri-box img{
	display:block;
	width:100%;
	height:auto;
	border-radius:8px;
	-webkit-touch-callout:default;
	-webkit-user-select:auto;
	user-select:auto;
}
.bri-close{
	margin-top:12px;
	border:0;
	background:#3498db;
	color:#fff;
	border-radius:10px;
	padding:10px 22px;
	font-size:14px;
	cursor:pointer;
}

/* ---- 문항 진행률 막대 / 미응답 표시 ---- */
.prog-wrap{
	text-align:center;
}
.prog-label{
	font-size:12px;
	color:var(--muted);
	margin-bottom:6px;
}
.prog-track{
	height:8px;
	border-radius:4px;
	background:rgba(255,255,255,.18);
	overflow:hidden;
}
.prog-fill{
	height:100%;
	width:0;
	border-radius:4px;
	background:#3498db;
	transition:width .35s ease;
}
.q_box, .q_box1{
	border:2px solid transparent;
	transition:border-color .2s;
}
.q_box.unanswered, .q_box1.unanswered{
	border-color:#e74c3c;
}

/* ---- 리터치: 기존 색/구성 유지, 질감만 현대적으로 ---- */
html{
	background:#223a56 linear-gradient(180deg,#2b4666 0%,#27415f 40%,#223a56 100%) fixed;
	min-height:100%;
}
body{
	background:transparent;
	line-height:1.5;
}
.page-title{
	font-size:26px;
	letter-spacing:-.02em;
}
.page-sub{
	font-size:18px;
	opacity:.92;
}
.q_box, .q_box1, .class-card{
	border-radius:18px;
	background:#fff;
	box-shadow:0 1px 2px rgba(10,20,40,.08), 0 8px 24px -12px rgba(10,20,40,.35);
}
.q_box, .q_box1{
	margin-bottom:18px;
}
.question-text{
	font-size:15px;
	line-height:1.6;
	letter-spacing:-.01em;
	color:#1f2d3d;
	padding:18px 18px 12px;
}
.button, .button2{
	border-radius:14px;
	font-weight:600;
	letter-spacing:-.01em;
	box-shadow:none;
	transition:background-color .2s ease, box-shadow .2s ease, transform .12s ease;
}
.button2{
	box-shadow:none;
}
.button:hover{
	box-shadow:none;
}
.button2:hover{
	box-shadow:none;
}
.button:active, .button2:active{
	top:0;
	transform:scale(.98);
	box-shadow:none;
}
.button:focus-visible, .button2:focus-visible,
select:focus-visible, input[type=checkbox]:focus-visible{
	outline:3px solid rgba(255,255,255,.75);
	outline-offset:2px;
}
select{
	border-radius:10px;
	border:1px solid #c9d3df;
	background-color:#fff;
	padding:8px 10px;
	transition:border-color .2s ease, box-shadow .2s ease;
}
select:focus{
	outline:none;
	border-color:#3498db;
	box-shadow:0 0 0 3px rgba(52,152,219,.25);
}
.scale-low, .scale-mid, .scale-high{
	letter-spacing:-.01em;
}
.prog-track{
	height:10px;
	border-radius:999px;
	background:rgba(255,255,255,.14);
}
.prog-fill{
	border-radius:999px;
	background:#e74c3c;
	transition:width .35s ease, background-color .35s ease;
}
/* 리커트 척도 7색: 진행률 구간(1/7씩)마다 한 단계씩 바뀐다 */
.prog-fill[data-step="1"]{ background:#e74c3c; }
.prog-fill[data-step="2"]{ background:#e67e22; }
.prog-fill[data-step="3"]{ background:#f1c40f; }
.prog-fill[data-step="4"]{ background:#1abc9c; }
.prog-fill[data-step="5"]{ background:#2ecc71; }
.prog-fill[data-step="6"]{ background:#3498db; }
.prog-fill[data-step="7"]{ background:#9b59b6; }
.scale{
	padding:0 4px;
}
.scale-low, .scale-mid, .scale-high{
	font-size:12px;
	opacity:.95;
}
.copyright{
	letter-spacing:.03em;
}
ul li .check1, ul li .check2, ul li .check3, ul li .check4, ul li .check5, ul li .check6, ul li .check7{
	transition:border-color .2s ease, transform .15s ease;
}
ul li:active .check1, ul li:active .check2, ul li:active .check3, ul li:active .check4, ul li:active .check5, ul li:active .check6, ul li:active .check7{
	transform:scale(.92);
}
.prog-label{
	font-weight:500;
	letter-spacing:.01em;
}
.q_box.unanswered, .q_box1.unanswered{
	box-shadow:0 1px 2px rgba(10,20,40,.08);
}
@media (prefers-reduced-motion:reduce){
	*{ transition:none !important; }
}

/* ---- 키보드 조작 ---- */
.q_box:focus, .q_box1:focus{
	outline:none;
}
.q_box:focus-visible, .q_box1:focus-visible,
.q_box.unanswered:focus-visible, .q_box1.unanswered:focus-visible{
	/* 현재 문항: 보라색 굵은 테두리(2px 테두리 + 2px 링 = 4px, 레이아웃 이동 없음) */
	border-color:#9b59b6;
	box-shadow:0 0 0 2px #9b59b6;
}
.key-hint{
	display:none;
	text-align:center;
	font-size:12px;
	color:var(--muted);
	margin:-6px 0 12px;
}
@media (hover:hover) and (pointer:fine){
	.key-hint{ display:block; }
}

/* ---- 결과 페이지: 복사용 텍스트 칸을 넓게 ---- */
#result{
	display:block;
	width:100% !important;
	height:190px;
	margin:12px 0 0;
	padding:14px 16px;
	border:1px solid rgba(255,255,255,.12);
	border-radius:12px;
	font-size:14px;
	line-height:1.6;
	color:#fff;
	background-color:var(--bg);
	text-align:left;
	resize:vertical;
}
#result:focus{
	outline:none;
	border-color:#3498db;
	box-shadow:0 0 0 3px rgba(52,152,219,.25);
}

/* 좁은 화면에서 한글이 글자 단위로 끊기지 않게 어절 단위 줄바꿈 */
.wrap{
	word-break:keep-all;
	overflow-wrap:break-word;
}
