:root {
	--primary: #7343ff;
	--primary-light: #9b6dff;
	--surface: #ffffff;
	--surface-muted: #f8f7fc;
	--border-soft: #ececf5;
	--text-muted: #8b8b9a;
}

.ticket_header {
	background-color: #fff;
	border-radius: 20px 20px 0 0;
	padding: 2.4rem 0 2rem;
	text-align: center;
	position: relative;
	z-index: 2;
}

.ticket_header_title {
	font-size: 3.2rem;
	font-weight: 1000;
	color: #222;
	letter-spacing: 0.1rem;
}

/* 단계 표시 스테퍼 */
.step_indicator {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 0;
	margin: 1.5rem 0 2rem;
}

.step_indicator_item {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	flex: 1;
	max-width: 8rem;
}

.step_indicator_circle {
	width: 3.2rem;
	height: 3.2rem;
	border-radius: 50%;
	background: var(--surface);
	border: 2px solid var(--border-soft);
	color: var(--text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.6rem;
	z-index: 1;
}

.step_indicator_item.active .step_indicator_circle {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

.step_indicator_item.done .step_indicator_circle {
	background: var(--surface);
	border-color: var(--primary);
	color: var(--primary);
}

.step_indicator_label {
	font-size: 1.3rem;
	color: var(--text-muted);
	margin-top: 0.6rem;
	white-space: nowrap;
}

.step_indicator_item.active .step_indicator_label {
	color: #222;
	font-size: 1.5rem;
	font-weight: 700;
}

.step_indicator_line {
	position: absolute;
	top: 1.6rem;
	left: -50%;
	width: 100%;
	height: 2px;
	background: var(--border-soft);
	z-index: 0;
}

.step_indicator_item.done .step_indicator_line,
.step_indicator_item.active .step_indicator_line {
	background: var(--primary);
}

.step_indicator_item:first-child .step_indicator_line {
	display: none;
}

.step2 .btn__group {
	padding-bottom: 5rem;
}

/* 카드 공통 스타일 */
.info_card {
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: 16px;
	padding: 1.4rem 1.6rem;
	margin: 0 1rem 1.2rem;
}

.info_card_title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 2rem;
	font-weight: 1000;
	margin-bottom: 1.2rem;
}

.info_card_title .subtitle {
	display: inline;
	gap: 0.6rem;
	font-size: 2rem;
	font-weight: 1000;
	margin: 0;
}

.info_card_title .icon {
	width: 2.5rem;
	height: 2.5rem;
	color: var(--primary);
	flex-shrink: 0;
}

/* 설명 아이콘 버튼 */
.info_help_btn {
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: none;
	background: none;
	color: #b0b0c0;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
}
.info_help_btn svg {
	width: 100%;
	height: 100%;
}

/* 초기화 버튼 (제목 오른쪽 끝으로) */
.info_reset_btn {
	margin-left: auto;
	background: #f2f0fb;
	color: #7343ff;
	border: none;
	border-radius: 999px;
	font-size: 1.5rem;
	font-weight: 600;
	padding: 0.5rem 1rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
}

/* 그라데이션 CTA 버튼 */
.btn-gradient {
	display: block;
	width: calc(100% - 2rem);
	margin: 1.5rem auto;
	padding: 1.4rem 0;
	text-align: center;
	background: linear-gradient(135deg, var(--primary), var(--primary-light));
	color: #fff;
	font-size: 1.7rem;
	font-weight: 700;
	border-radius: 14px;
	border: none;
}

.ticket_header_date {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.8rem;
	margin : 0.5rem 0 1.5rem;
}

.ticket_header_date .today_text {
	color: #7343ff;
	font-size: 3rem;
	font-weight: 1000;
	letter-spacing: 0.05rem;
}

.ticket_header_date .today_badge {
	background-color: #ede8ff;
	color: #7343ff;
	font-size: 1.5rem;
	font-weight: 700;
	padding: 0.4rem 1rem;
	border-radius: 999px;
}

.inner {
	position: relative;
}

.selectbox_wrap {
	position: relative;
	width:20rem;
	user-select: none;
	margin: 3rem 2rem 0 auto;
}

.selectbox-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	height: 40px;
	border: 1px solid #ccc;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
}
.selectbox-trigger:hover {
	border: 2px solid #7343ff;
}
.selectbox-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 10px;
	overflow: hidden;
	display: none;
	z-index: 100;
}
.selectbox-dropdown.visible {
	display: block;
}
.selectbox-option {
	padding: 9px 12px;
	cursor: pointer;
	font-size: 14px;
}
.selectbox-option::before {
	content: '\2714';
	margin-right: 5px;
	color: transparent;
	width: 15px;
	display: inline-block;
}
.selectbox-option:hover {
	background: #f2f2ff;
}
.selectbox-option.selected {
	color: #7343ff;
	font-weight: bold;
}
.selectbox-option.selected::before {
	color: #7343ff;
	-webkit-text-fill-color: #7343ff;
}
.selectbox-arrow {
	display: inline-block;
	transition: transform 0.3s ease;
}
.selectbox-trigger.open .selectbox-arrow {
	transform: rotate(180deg);
}
.step1, .step2, .step3, .step4 {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(30px);
	transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.step1.is-active, .step2.is-active, .step3.is-active, .step4.is-active {
	position: relative;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	
	transform: translateX(0);
}

#contents {
	text-align: center;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
}
.contents__content {
	margin-top: 8.5rem;
}

input[type="radio"] + label:before, input[type="radio"]:checked + label:before,
input[type="checkbox"] + label:before, input[type="checkbox"]:checked + label:before {
	content: none;
	display: none;
}
input[type="radio"]:checked + label,
input[type="checkbox"]:checked + label {
	outline: none;
}
#tab_2, #tab_3 {
	display: none;
}

input[type="radio"] + .tabButton,
input[type="checkbox"] + .tabButton {
	font-size: 2.5rem;
}
input[type="radio"]:checked + .tabButton,
input[type="checkbox"]:checked + .tabButton {
	font-weight: bold;
}

.radioBtn {
	padding: 10px 0;
	border: 2px solid #ccc;
	border-radius: 10px;
	background-color: white;
}
input[type="radio"]:checked + .radioBtn,
input[type="checkbox"]:checked + .radioBtn {
	background-color: #7343ff;
	color: white;
	border-color: #7343ff;
}
input[type="radio"]:disabled + label,
input[type="checkbox"]:disabled + label {
	background-color: #eeeeee;
	border-color: #cccccc;
	color: #aaaaaa;
	position: relative;
}

.divider {
	border-bottom: 1px solid #ccc;
	margin: 10px 0;
}

/* =======================
         QR생성화면 CSS 
   ======================= */
#qrModal .modal__wrap {
	height: auto;
	max-height: 85vh;
	width: 90%;
	max-width: 40rem;
	overflow: hidden;
	margin: auto;
}

#qrModal .inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 2rem;
	box-sizing: border-box;
}

#qrModal .betting_contents {
	margin: 1rem 0;
	padding: 1.6rem;
	font-size: 2rem;
	background-color: #f2f2ff;
	border-radius: 16px;
}

#qrModal .betting_contents .finalBettingInfo {
	display: grid;
	margin: 1rem 0 0;
	grid-template-columns: auto 1fr;
	gap: 10px 16px;
	align-items: center;
}

#qrModal .betting_contents .finalBettingInfo p:nth-child(odd) {
	color: #7343ff;
	text-align: left;
	margin: 0;
}

#qrModal .betting_contents .finalBettingInfo p:nth-child(even) {
	text-align: right;
	margin: 0;
}

#qrModal .modal_dot_divider {
	border: 1px dashed #ccc;
	margin: 0.5rem 0;
}

#qrModal .qrGuide {
	text-align: center;
	font-size: 1.4rem;
	margin: 0.5rem 0;
	color: #ccc;
}

#qrModal .qr_contents {
	border: 1px solid #ccc;
	border-radius: 16px;
	padding: 1.5rem;
	display: flex;
	justify-content: center;
	align-items: center;
	width: fit-content;
	margin: auto;
	flex: none;
}

#qrCode {
	display: block;
	margin: 0 auto;
}

#qrModal .divider {
	border-bottom: 3px solid #7343ff;
	border-radius: 15px;
	margin: 1rem 0;
}

.qrTabInfo {
	margin: 1rem 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.qrTabInfo_row {
	font-size: 1.5rem;
	padding: 0.8rem 1rem;
	color: #333;
}

.qrSectionTitle {
	font-weight: bold;
	font-size: 1.7rem;
	margin: 1.5rem 0 0.5rem;
	color: #333;
}

#alertModal .contents_text {
	font-size: 1.9rem;
}
body.modal-open {
	position: fixed;
	height: 100%;
}
/* 요일 경마장 경주번호 선택 CSS */
.bookTicket_list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
	width: 100%;
	box-sizing: border-box;
}

.raceCourse_list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.5rem;
	width: 100%;
	box-sizing: border-box;
}

.raceNumber_list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.5rem;
	width: 100%;
	box-sizing: border-box;
}


.bookTicket_list label.radioBtn,
.raceCourse_list label.radioBtn,
.raceNumber_list label.radioBtn{
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	text-align: center;
	font-size: 2rem;
	min-height: 7rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	
	grid-template-columns: repeat(4, 1fr);
	gap: 0.8rem;
}

.deadline {
	font-size: 1.5rem;
}

.bettingType .btn_wrap {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.5rem;
	width: 100%;
	box-sizing: border-box;
	border-bottom: 1px solid #ddd;
	padding-bottom: 1.2rem;
	margin-bottom: 1.2rem;
}

.costDiv .btn_wrap {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.5rem;
	width: 100%;
	box-sizing: border-box;
}

/* 마번선택 영역 */
[id^="selectNum"] {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 0.5rem;
	width: 100%;
	box-sizing: border-box;
}

[id^="selectNum"][id$="_2"], [id^="selectNum"][id$="_3"] {
	display: none;
} 

[id^="selectNum"]:not(:last-child) {
	border-bottom: 1px solid #ddd;
	padding-bottom: 1.2rem;
	margin-bottom: 1.2rem;
}

.ticket_summary {
	display: flex;
	font-size: 2rem;
	font-weight: 500;
}
.ticket_summary_total {
	width: 50%;
	text-align: left;
}
.ticket_summary_total #total{
	font-weight: 700;
	text-align: left;
}
.ticket_summary_limit {
	width: 50%;
	text-align: right;
}

.bettingType .btn_wrap label.radioBtn,
.costDiv .btn_wrap label.radioBtn {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	min-height: 6rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.7rem;
	padding: 0.5rem 0.2rem;
}

[id^="selectNum"] label.radioBtn {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	min-height: 5.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	padding: 0.5rem 0.2rem;
}

#alertModal .contents_text {
	font-size: 2rem;
	white-space: pre-line;
	text-align: left;
}

.summary_card {
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid var(--border-soft);
	border-radius: 16px;
	padding: 1.4rem 1rem;
	margin: 0 1rem 1.5rem;
}

.summary_item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
}

.summary_label {
	font-size: 2rem;
	color: var(--text-muted);
}

.summary_value {
	font-size: 1.7rem;
	font-weight: 700;
	color: #333;
}

.summary_divider {
	width: 1px;
	height: 3rem;
	background: var(--border-soft);
}

.summary_selectbox {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
}

.summary_arrow {
	font-size: 1rem;
	color: var(--primary);
}

.summary_dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 50%;
	transform: translateX(-50%);
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 10px;
	overflow: hidden;
	z-index: 100;
	min-width: 12rem;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.summary_dropdown_option {
	padding: 1rem 1.4rem;
	font-size: 1.5rem;
	cursor: pointer;
	white-space: nowrap;
}

.summary_dropdown_option:hover {
	background: #f2f2ff;
	color: var(--primary);
}

/* 구매검토 CSS */
.review_card {
	background: #f4f2fe;
	border-radius: 20px;
	padding: 1.6rem;
	margin: 0 1rem 1.2rem;
}
.review_card_head {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.4rem;
}

.review_head_title {
	 font-size: 2rem; 
	 font-weight: 800;
	 text-align: left; 
	 color: #7343ff; 
	 margin: 0;
 }
 
.review_head_desc { 
	font-size: 1.6rem; 
	color: #888; 
	margin: 0.3rem 0 0;
	text-align: left;
}

.review_head_icon {
	width: 5rem;
	height: 5rem;
	border-radius: 14px;
	background: linear-gradient(135deg, #7343ff, #9b6dff);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.review_head_icon svg { width: 2.4rem; height: 2.4rem; }

.review_body {
	background: #fff;
	border-radius: 14px;
	padding: 0.5rem 1.4rem;
}
.review_row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.2rem 0;
	border-bottom: 1px solid #f0f0f5;
}

.review_row:last-child { border-bottom: none; }

.review_label { 
	font-size: 1.8rem;
	font-weight: 700; 
	color: #666; 
}

.review_value { 
	font-size: 2rem; 
	font-weight: 700; 
	color: #222; 
}

.review_tab_row {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 1rem 0;
	border-bottom: 1px solid #f0f0f5;
}
.review_tab_row:last-child { border-bottom: none; }

.review_tab_badge {
	background: #ede8ff;
	color: #7343ff;
	font-size: 1.8rem;
	font-weight: 700;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	flex-shrink: 0;
}
.review_tab_info { 
	flex: 1; 
	font-size: 2rem;
	font-weight: 700;
	color: #222; 
}
.review_tab_amount { 
	font-size: 1.8rem; 
	font-weight: 700; 
	color:#7343ff; 
	flex-shrink: 0; }

.limit_card, .notice_card {
	background: #fff;
	border: 1px solid #ececf5;
	border-radius: 16px;
	padding: 1.4rem 1.6rem;
	margin: 0 1rem 1.2rem;
}

.review_row--top {
	align-items: flex-start;
}

#reviewTabList {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	flex: 1;
}

.review_bet_line {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	justify-content: flex-end;
}

.review_bet_no {
	background: #ede8ff;
	color: #7343ff;
	font-size: 1.8rem;
	font-weight: 700;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	flex-shrink: 0;
}

.review_bet_type {
	font-size: 1.6rem;
	font-weight: 700;
	color: #333;
	flex-shrink: 0;
}

.review_bet_combo {
	font-size: 1.6rem;
	color: #666;
}

.review_bet_amount {
	font-size: 1.6rem;
	font-weight: 700;
	color: #7343ff;
	flex-shrink: 0;
}

.limit_title { 
	font-size: 2rem; 
	font-weight: 700; 
	margin: 0 0 1.2rem; 
}
.limit_row { 
	display: flex; 
	justify-content: space-between; 
	margin-bottom: 1rem; 
}
.limit_item { 
	display: flex; 
	flex-direction: column; 
	align-items: center; 
	flex: 1; gap: 
	0.3rem; 
}
.limit_label { 
	font-size: 1.5rem; 
	color: #999; 
}
.limit_value { 
	font-size: 1.6rem; 
	font-weight: 700; 
	color: #333; }
	
.limit_item:nth-child(2) .limit_value { color: #7343ff; }

.limit_bar { 
	height: 8px; 
	background: #ececf5; 
	border-radius: 999px; 
	overflow: hidden; 
	margin-bottom: 0.6rem; }
.limit_bar_fill { 
	height: 100%; 
	background: linear-gradient(90deg, #7343ff, #9b6dff); 
	border-radius: 999px; 
	width: 0; 
}
.limit_footer { 
	display: flex; 
	justify-content: space-between; 
	font-size: 1.5rem; 
	color: #999; 
}

.notice_card { 
	display: flex; 
	gap: 1rem; 
	background: #f4f2fe; 
	border: none;
	padding-top: 1rem; 
}

.notice_card svg { 
	width: 2.5rem; 
	height: 2.5rem; 
	color: #7343ff; 
	flex-shrink: 0; 
}
.notice_title { 
	text-align: left;
	font-size: 1.5rem; 
	font-weight: 700; 
	margin: 0 0 0.4rem; 
}
.notice_desc { 
	text-align: left;
	font-size: 1.5rem; 
	color: #888; 
	line-height: 1.5; 
	margin: 0; 
}

.review_total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f4f2fe;
	border-radius: 16px;
	padding: 1.6rem;
	margin: 0 1rem 1.2rem;
}
.review_total_label { font-size: 2.2rem; font-weight: 800; }
.review_total_value { font-size: 2.8rem; font-weight: 800; color: #7343ff; }

/* QR구매표 화면 CSS */
.issue_done_badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	background: #ede8ff;
	border-radius: 999px;
	padding: 1.2rem 2rem;
	margin: 0 1rem 1.5rem;
}

.issue_done_check {
	width: 3.2rem;
	height: 3.2rem;
	border-radius: 50%;
	background: #7343ff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.issue_done_check svg {
	width: 1.8rem;
	height: 1.8rem;
}

.issue_done_badge span {
	font-size: 2rem;
	font-weight: 800;
	color: #7343ff;
}

.qr_ticket {
	background: #fff;
	border: 1px solid #ececf5;
	border-radius: 20px;
	margin: 0 1rem 1.5rem;
	padding: 2rem 1.6rem;
	box-shadow: 0 4px 16px rgba(115, 67, 255, 0.08);
}

/* 티켓 상단 제목 */
.qr_ticket_head {
	text-align: center;
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px dashed #e4e1ff;
}
.qr_ticket_title {
	display: block;
	font-size: 2.2rem;
	font-weight: 800;
	color: #7343ff;
}
.qr_ticket_sub {
	display: block;
	font-size: 1.3rem;
	letter-spacing: 0.2rem;
	color: #b0b0c0;
	margin-top: 0.3rem;
}

/* 정보 행 */
.qr_ticket_body {
	margin-bottom: 1.5rem;
}
.qr_ticket_row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.4rem 0;
}
.qr_ticket_label {
	font-size: 1.8rem;
	color: #888;
}
.qr_ticket_value {
	font-size: 1.7rem;
	font-weight: 700;
	color: #222;
}
.qr_ticket_divider {
	height: 1px;
	background: #f0f0f5;
	margin: 0.5rem 0;
}

.qr_ticket_row--top {
	align-items: flex-start;
}

#step4TabList {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	flex: 1;
}

.qr_ticket_code {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 1.5rem 0;
}
.qr_ticket_code #qrCode {
	display: flex;
	justify-content: center;
	border: 5px solid #7343ff;
}

.betting_guide {
	font-size: 1.4rem;
	color: #888;
	white-space: pre-line;
	margin: 1rem 0 0;
	padding: 0.8rem 1rem;
	background: #f7f5ff;
	border-radius: 8px;
	line-height: 1.4;
}

.betting_guide:empty {
	display: none;
}