/* reservation-guide 전용 스타일 (피그마 스타일 감성) */

/* 변수는 섹션 범위 내로 한정하여 전역 영향 최소화 */
.reservation-guide {
    --rg-bg: #ffffff;
    --rg-card: #ffffff;
    --rg-primary: #f97316;
    --rg-primary-600: #ea580c;
    --rg-accent-600: #ea6b21;
    --rg-text: #111827;
    --rg-subtext: #4b5563;
    --rg-border: #e5e7eb;
    --rg-kakao: #fee500;
    --rg-success-600: #16a34a;
    --rg-danger-600: #ef4444;
    --rg-muted-600: #64748b;
}

.reservation-guide {
    background: #ffffff;
    padding: 72px 0 96px;
    position: relative;
    overflow: hidden;
}

.reservation-guide .inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero */
.reservation-guide .rg-hero {
    text-align: center;
    color: #ea6b21;
    margin-bottom: 40px;
}
.reservation-guide .rg-hero h2 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}
.reservation-guide .rg-hero .rg-sub {
    color: var(--rg-subtext);
    font-size: 16px;
    margin: 0 0 24px;
}
.reservation-guide .rg-cta {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.reservation-guide .rg-cta.flow { gap: 10px; }
.reservation-guide .rg-cta .chip {
    background: #f3f4f6;
    border: 1px solid var(--rg-border);
    color: var(--rg-text);
    padding: 10px 14px;
    border-radius: 9999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}
.reservation-guide .rg-cta .arrow {
    color: var(--rg-subtext);
    font-weight: 700;
}
.reservation-guide .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    transition: all .2s ease;
    text-decoration: none;
}
.reservation-guide .btn.primary {
    background: var(--rg-primary);
    color: #111827;
    box-shadow: 0 6px 16px rgba(249,115,22,.25);
}
.reservation-guide .btn.primary:hover { background: var(--rg-primary-600); }

.reservation-guide .btn.kakao {
    background: var(--rg-kakao);
    color: #111827;
}

.reservation-guide .btn.outline {
    background: transparent;
    border-color: #334155;
    color: var(--rg-text);
}
.reservation-guide .btn.outline:hover {
    border-color: #475569;
    background: rgba(15,23,42,.35);
}

/* Content */
.reservation-guide .rg-content {
    display: grid;
    grid-template-columns: 1fr;
    /* grid-template-columns: 1.2fr .8fr; */
    gap: 20px;
    border-radius: 14px;
}
.chk_btn{
}
/* Form */
.reservation-guide .rg-form { margin-top: 18px; overflow: hidden;}
.reservation-guide .rg-form h3 {    color: var(--rg-primary-600);     font-weight: 800;}
.reservation-guide .rg-form .form_wrap{ width: 65%;min-width: 500px; }
.reservation-guide .rg-form .first_section{ width: 35%;}
.reservation-guide .rg-form-body { display: flex; gap: 16px; background: #fff; border: 1px solid var(--rg-border); border-radius: 14px; padding: 20px; box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06); box-sizing: border-box; margin-bottom: 40px;border: 1px solid rgba(234, 88, 12, 0.25);}
@media (max-width: 900px) {
    .reservation-guide .rg-form-body{
        flex-direction: column;
    }
    .reservation-guide .rg-form .form_wrap{ width: 100%;min-width: 0;}
    .reservation-guide .rg-form-body .first_section{width: 100%;}
}
.reservation-guide .rg-form-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: center; gap: 16px; margin-bottom: 35px;}
.reservation-guide .rg-form-row:first-child {flex: 1; }

.reservation-guide .rg-label { color: #334155; font-weight: 700; font-size: 18px; }
.reservation-guide .rg-fields { display: grid; grid-template-columns: 1fr; gap: 10px;}
.reservation-guide .rg-fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reservation-guide .rg-fields-2 i {position:relative; left:200%;top:-35px;color:#ea580c}
.reservation-guide .rg-fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reservation-guide .rg-fields-phone { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; }
.reservation-guide .rg-fields-rrn { grid-template-columns: 1fr auto 1fr; align-items: center; }
.reservation-guide .rg-sep { padding: 0 6px; color: #b9b9b9; font-weight: 700; }
.reservation-guide .rg-input { height: 48px; width: 100%; min-width: 0; border: 1px solid #b9b9b9; border-radius: 12px; padding: 0 14px; font-size: 24px; background: #f9fafb; transition: border-color .15s ease, box-shadow .15s ease; box-sizing: border-box; }
.reservation-guide .rg-input:hover { border-color: #cbd5e1; }
.reservation-guide .rg-input:focus { outline: none; border-color: var(--rg-primary-600); box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14); background: #fff; }

@media (max-width: 640px) {
    .reservation-guide .rg-form-row { grid-template-columns: 1fr; }
    .reservation-guide .rg-fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .reservation-guide .rg-fields-phone { grid-template-columns: 1fr auto 1fr auto 1fr; }
    .reservation-guide .rg-fields-rrn { grid-template-columns: 1fr auto 1fr; }
}

/* Steps */
.reservation-guide .rg-steps {
    /* background: linear-gradient(180deg, rgba(234, 88, 12, 0.08) 0%, rgba(234, 88, 12, 0.02) 100%); */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid rgba(234, 88, 12, 0.25);
    border-radius: 14px;
    padding: 22px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* box-shadow: 0 6px 16px rgba(234, 88, 12, 0.12); */
}
.reservation-guide .step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--rg-subtext);
}
.reservation-guide .step .num {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--rg-border);
    color: var(--rg-subtext);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.reservation-guide .step.active .num {
    background: var(--rg-primary-600);
    color: #fff;
    border-color: transparent;
}
.reservation-guide .step .label { font-weight: 700; color: var(--rg-text); }

.reservation-guide .connector {
    flex: 1 1 auto;
    height: 2px;
    margin: 0 8px;
    background: linear-gradient(90deg, rgba(234, 88, 12, 0.55), rgba(234, 88, 12, 0));
}

/* Notice */
.reservation-guide .rg-notice {
    /* background: linear-gradient(180deg, rgba(234, 88, 12, 0.07) 0%, rgba(234, 88, 12, 0.015) 100%); */
    border: 1px solid rgba(234, 88, 12, 0.22);
    border-radius: 14px;
    padding: 22px 20px;
    color: var(--rg-text);
    /* box-shadow: 0 8px 20px rgba(234, 88, 12, 0.10); */
}
.reservation-guide .rg-notice h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    color: var(--rg-primary-600);
}
.reservation-guide .rg-notice ol { margin: 0; padding-left: 18px; }
.reservation-guide .rg-notice li { margin: 8px 0; color: var(--rg-subtext); }
.reservation-guide .rg-notice b { color: var(--rg-text); }

/* Responsive */
@media (max-width: 1024px) {
    .reservation-guide .rg-content { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .reservation-guide .rg-hero h2 { font-size: 32px; }
    .reservation-guide .btn { height: 42px; border-radius: 9px; }

    /* rg-steps: 모바일 최적화 */
    .reservation-guide .rg-steps {
        flex-wrap: wrap;
        row-gap: 10px;
        column-gap: 12px;
        justify-content: center;
        padding: 16px;
    }
    .reservation-guide .connector { display: none; }
    .reservation-guide .step { gap: 6px; }
    .reservation-guide .step .num {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        font-size: 13px;
    }
    .reservation-guide .step .label {
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Consent card (트렌디 스타일) */
.first_section .inner { background: #fff; border: 1px solid var(--rg-border); border-radius: 14px; padding: 20px; box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06); }
@media (max-width: 600px) {
    .first_section .inner .first_top {
        flex-direction: column;
        align-items: start;
    }
}
.first_top{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}

.first_top h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--rg-primary-600); }

/* container spacing hook (kept for potential overrides) */
.first_section { margin-top: 0; }
.input_chk { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 10px; }
.input_chk input[type="checkbox"]{ position: absolute; opacity: 0; width: 1px; height: 1px; }
.input_chk label{ position: relative; padding-left: 30px; font-weight: 700; color: #0f172a; cursor: pointer; }
.input_chk label:before{ content: ""; position: absolute; left: 0; top: 50%; transform: translateY(calc(-50% + 3px)); width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 6px; background: #fff; transition: all .15s ease; }
.input_chk input:checked + label:before{ background: var(--rg-primary-600); border-color: var(--rg-primary-600); box-shadow: 0 6px 12px rgba(234, 88, 12, .25) }
.input_chk input:checked + label:after{ content: ""; position: absolute; left: 7px; top: 7px; width: 6px; height: 10px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }

.first_bot p{
    width: 100%;
    height: 300px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 16px;
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    color: #334155;
    overflow-y: auto;
}
.first_bot p::-webkit-scrollbar{ width: 8px; }
.first_bot p::-webkit-scrollbar-thumb{ background: #cbd5e1; border-radius: 9999px; }
.first_bot p::-webkit-scrollbar-track{ background: #f1f5f9; border-radius: 9999px; }

.summit_btn {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 10px;
}
.summit_btn button {
    height: 48px;
    min-width: 150px;
    padding: 0 18px;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid var(--rg-primary-600);
    background: linear-gradient(180deg, #ff8a3b 0%, #ea580c 100%);
    box-shadow: 0 10px 20px rgba(234, 88, 12, .25);
    transition: transform 0.12s ease, filter 0.12s ease;
}
.summit_btn button.before_btn {
    color: #000;
    background: linear-gradient(180deg, #e7e7e7 0%, #d1d1d1 100%);
    box-shadow: 0 10px 20px rgba(184, 184, 184, 0.25);
    border: none;

}
.summit_btn button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}
.summit_btn button:disabled {
    background: #e5e7eb;
    color: #94a3b8;
    border-color: #e5e7eb;
    box-shadow: none;
    cursor: not-allowed;
}

/* Reservation Summary */
.reserve-summary { margin-top: 20px; }
.reserve-summary .inner { display: grid; gap: 16px; }
.reserve-summary .rs-card { background: #fff; border: 1px solid var(--rg-border); border-radius: 14px; padding: 16px; box-shadow: 0 10px 30px rgba(2,6,23,.06); }
.reserve-summary .rs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.reserve-summary .rs-header h3 { margin: 0; font-size: 18px; font-weight: 800; color: #0f172a; }
.reserve-summary .cancel-btn { height: 28px; padding: 0 10px; border-radius: 10px; border: 1px solid #0f172a; background: #fff; font-weight: 800; }
.reserve-summary .cancel-btn:hover { background: #0f172a; color: #fff; }
.reserve-summary .rs-current{
    display: flex;
    /* justify-content: space-between; */
    gap: 20px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}
.reserve-summary .rs-current p { margin: 0; color: #334155; font-weight: 700; width: 243px;}
.reserve-summary .rs-list { margin: 0; padding-left: 18px; color: #334155; }
.reserve-summary .rs-list li { margin: 6px 0; font-size: 14px;}
.reserve-summary .rs-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.reserve-summary .btn.primary {
    border: 1px solid var(--rg-primary-600);
    background: linear-gradient(180deg, #ff8a3b 0%, #ea580c 100%);
    box-shadow: 0 10px 20px rgba(234, 88, 12, .25);
    transition: transform 0.12s ease, filter 0.12s ease;}
.reserve-summary .btn.outline { background: transparent; border: 1px solid #cbd5e1; color: #0f172a; }

@media (max-width: 640px) {
    .reserve-summary .inner { gap: 12px; }
    .reserve-summary .rs-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .reserve-summary .rs-actions { justify-content: stretch; }
    .reserve-summary .rs-actions .btn { flex: 1; }
}

.three_section{margin-top: 20px;}
.three_section .rs-card { background: #fff; border: 1px solid var(--rg-border); border-radius: 14px; padding: 16px; box-shadow: 0 10px 30px rgba(2,6,23,.06); text-align: center;}
.three_section .rs-card h3 {margin:30px 0;color: #ea580c;}
.three_section .rs-card p {color: #575757;word-break: keep-all;word-wrap: break-word;margin-bottom: 70px;}

/* Reservation history table */
.rs-table-wrap{ overflow-x: auto; }
.rs-table{ width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; }
.rs-table thead th{
    background: linear-gradient(180deg, #ff9a6d 0%, var(--rg-accent-600) 100%);
	color: #fff;
	text-align: center;
	font-weight: 900;
	padding: 14px 12px;
	border-right: 1px solid rgba(255,255,255,.2);
	letter-spacing: -.01em;
}
.rs-table td .rs-badge.danger{
    cursor: pointer;
}

.rs-table thead th:first-child{ border-top-left-radius: 8px; }
.rs-table thead th:last-child{ border-top-right-radius: 8px; border-right: none; }
.rs-table tbody td{
	padding: 14px 12px;
	text-align: center;
	border-bottom: 1px solid #e5e7eb;
	color: #0f172a;
}
.rs-table tbody tr:nth-child(even){ background: #f8fafc; }
.rs-table tbody tr:hover{ background: #fff7ed; }

/* status badge */
.rs-badge{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 28px;
	padding: 0 10px;
	border-radius: 9999px;
	font-weight: 900;
	font-size: 12px;
	letter-spacing: .02em;
	border: 1px solid transparent;
}
.rs-badge.success{ background: rgba(22,163,74,.10); color: var(--rg-success-600); border-color: rgba(22,163,74,.22); }
.rs-badge.danger{     background: var(--rg-danger-600);
    color: #fff; border-color: rgba(239,68,68,.22); }
.rs-badge.muted{ background: rgba(100,116,139,.10); color: var(--rg-muted-600); border-color: rgba(100,116,139,.22); }

/* use accent color for success state in reservation context */
/* .rs-badge.success{ background: rgba(234,107,33,.10); color: var(--rg-accent-600); border-color: rgba(234,107,33,.22); } */

/* Responsive table (<=760px): stack rows as cards with inline labels */
@media (max-width: 760px){
	.rs-table-wrap{ overflow-x: visible; }
	.rs-table{ min-width: 0; width: 100%; }
	.rs-table thead{ display: none; }
    .rs-table tbody{ display: block; }
	.rs-table tbody tr{ display: block; position: relative; background: linear-gradient(180deg, #ffffff 0%, #fffaf6 100%); border: 1px solid rgba(234,107,33,.18); border-radius: 14px; padding: 14px 14px 12px 16px; box-shadow: 0 10px 26px rgba(234,107,33,.08), 0 6px 14px rgba(2,6,23,.05); }
    .rs-table tbody tr::before{ content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 6px; border-radius: 14px 0 0 14px; background: linear-gradient(180deg, rgba(234,107,33,.9) 0%, rgba(234,107,33,.6) 100%); }
    .rs-table tbody tr:nth-child(even){background: linear-gradient(180deg, #ffffff 0%, #fffaf6 100%); }

    .rs-table tbody tr:hover{         background: linear-gradient(180deg, #ffffff 0%, #fffaf6 100%);}
	.rs-table tbody tr + tr{ margin-top: 10px; }
	.rs-table tbody td{ display: block; width: 100%; text-align: left; border: none; padding: 8px 0; }
	.rs-table tbody td::before{ display: block; font-size: 12px; color: #64748b; font-weight: 700; margin-bottom: 4px; content: ""; }
	.rs-table tbody td:nth-child(1)::before{ content: "번호"; }
	.rs-table tbody td:nth-child(2)::before{ content: "예약일자"; }
	.rs-table tbody td:nth-child(3)::before{ content: "진료과"; }
	.rs-table tbody td:nth-child(4)::before{ content: "의료진"; }
	.rs-table tbody td:nth-child(5)::before{ content: "상태"; }
    .rs-table tbody td:first-child{ display: inline-flex; width: auto; align-items: center; gap: 8px; background: rgba(234,107,33,.08); color: var(--rg-accent-600); border: 1px solid rgba(234,107,33,.22); border-radius: 9999px; padding: 6px 10px; font-weight: 900; margin-bottom: 8px; }
    .rs-table tbody td:first-child::before{ display: none; }
    .rs-table tbody td:nth-child(2){ font-size: 16px; font-weight: 900; color: #0f172a; }

	/* Combine dept(3) + doctor(4) into one line */
	.rs-table tbody td:nth-child(3),
	.rs-table tbody td:nth-child(4){ display: inline; padding-right: 0; font-size: 17px; font-weight: 700;}
	.rs-table tbody td:nth-child(3)::before,
	.rs-table tbody td:nth-child(4)::before{ display: none; }
	/* .rs-table tbody td:nth-child(3)::after{ content: " · "; color: #cbd5e1; margin: 0 6px; } */

	/* Position status badge top-right */
	.rs-table tbody td:nth-child(5){ position: absolute; top: 10px; right: 12px; padding: 0; width: auto; }
	.rs-table tbody td:nth-child(5)::before{ display: none; }
}

/* Dept Tabs */
.dept-tabs { margin: 24px 0; }
.dept-tabs .inner { max-width: 1200px; margin: 0 auto; }
.dept-tabs .tab-card { background: #fff; border: 1px solid var(--rg-border); border-radius: 14px; padding: 16px; box-shadow: 0 10px 30px rgba(2,6,23,.06);}
.dept-tabs .tab-header h3 { margin: 0 0 12px; font-size: 20px; font-weight: 900; color: #0f172a; letter-spacing: -.01em; }
.dept-tabs .rg-hero { text-align: center; margin: 8px 0 18px; }
.dept-tabs .rg-hero h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(90deg, #ea580c 0%, #fb923c 40%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dept-tabs .rg-hero h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin: 12px auto 0;
  border-radius: 9999px;
  background: rgba(234, 88, 12, 0.85);
}
@media (max-width: 640px) {
  .dept-tabs .rg-hero h2 { font-size: 18px; }
}
.dept-tabs .tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dept-tabs .tab { height: 44px; border-radius: 12px; border: 1px solid #e5e7eb; background: #f8fafc; color: #0f172a; font-weight: 800; letter-spacing: .01em; cursor: pointer; font-size: 17px;}
.dept-tabs .tab.is-active { border-color: var(--rg-primary-600); background: linear-gradient(180deg, #ff8a3b 0%, #ea580c 100%); color: #fff; box-shadow: 0 10px 20px rgba(234, 88, 12, .25); }
.dept-tabs .tab:hover { filter: brightness(1.02); }

@media (max-width: 720px) {
  .dept-tabs .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Calendar & Time selector */
.calendar-section { margin: 24px 0; }
.calendar-section .inner { max-width: 1200px; margin: 0 auto; }
.cal-card { position: relative; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; box-shadow: 0 4px 12px rgba(2,6,23,.04); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cal-left { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; }
.cal-right { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.cal-nav { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; font-weight: 900; font-size: 26px;position: relative;cursor: pointer;}
.cal-nav::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; }
.cal-nav.prev::after { transform: translate(calc(-50% + 2px), -50%) rotate(-135deg); border-top: 2px solid #0f172a; border-right: 2px solid #0f172a;}
.cal-nav.next::after { transform: translate(calc(-50% - 2px), -50%) rotate(45deg); border-top: 2px solid #0f172a; border-right: 2px solid #0f172a;}
.cal-grid { display: grid; gap: 6px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; color: #64748b; font-weight: 700; }
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day { height: 40px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; color: #0f172a; cursor: pointer; transition: border-color .12s ease, background .12s ease; font-size: 18px;}
.cal-day:hover { background: #f8fafc; border-color: #cbd5e1; }
.cal-day.muted { background: #f8fafc; color: #a1a1aa; cursor: default; }
.cal-day.off { background: #f8fafc; color: #b0b8c4; cursor: default; }
.cal-day.selected { border-color: #fb923c; box-shadow: 0 0 0 2px rgba(251,146,60,.25); outline: none; }
.cal-legend { display: flex; gap: 12px; margin-top: 8px; }
.cal-legend .key { display: inline-flex; align-items: center; gap: 6px; color: #475569; font-size: 13px; }
.cal-legend .key::before { content: ""; width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: #e5e7eb; border: 1px solid #cbd5e1; }
.cal-legend .key.key-on::before { background: #fff; border-color: var(--rg-primary-600); }

.time-title { margin: 0 0 10px; font-size: 15px; font-weight: 800; text-align: center; color: #0f172a; }
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.time-slot { height: 36px; border-radius: 10px; border: 1px solid #e5e7eb; background: #fff; font-weight: 800; color: #0f172a; transition: border-color .12s ease, background .12s ease; font-size: 18px;}
.time-slot:hover { background: #fff7ed; border-color: #fdba74; }
.time-slot:focus { outline: none; box-shadow: 0 0 0 2px rgba(251,146,60,.25); }
.time-slot.selected { background: #ffedd5; border-color: #fb923c; color: #7c2d12; box-shadow: none; }
.time-slot.disabled, .time-slot.off, .time-slot[disabled] { background: #f8fafc; color: #a1a1aa; border-color: #e5e7eb; cursor: not-allowed; }
.time-slot.off:hover, .time-slot.disabled:hover, .time-slot[disabled]:hover { background: #f8fafc; border-color: #e5e7eb; }
.time-summary { margin-top: 10px; text-align: center; color: #334155; font-weight: 700; }

@media (max-width: 800px){ .cal-card { grid-template-columns: 1fr; } }

/* Calendar loading overlay */
.cal-loading { position: absolute; inset: 0; background: rgba(255,255,255,.75); display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); border-radius: 12px; z-index: 1;    flex-direction: column;}
.cal-loading.show { display: flex; }
.cal-loading .spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #e5e7eb; border-top-color: var(--rg-primary-600); animation: calspin 0.9s linear infinite; }
.cal-loading .cal-loading-text { margin-top: 10px; font-weight: 800; color: #0f172a; }
@keyframes calspin { to { transform: rotate(360deg); } }

/* Doctor grid (step 2) */
.doctor-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.doc-card { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; text-align: center; transition: transform .12s ease, box-shadow .12s ease; }
.doc-card.is-active,
.doc-card:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(2,6,23,.06); }
.doc-card.is-active,
.doc-card:hover { background: #ea580c; border-color: #ea580c; color: #fff; }
.doc-photo { width: 120px; height: 120px; border-radius: 9999px; background: #e2e8f0; margin: 0 auto 10px; overflow: hidden; }
.doc-name { margin: 0 0 6px; font-size: 19px; font-weight: 900; color: #0f172a; }
.doc-card.is-active .doc-name,
.doc-card:hover .doc-name { color: #fff; }
.doc-meta { margin: 0; font-size: 17px; color: #475569; }
.doc-card.is-active .doc-meta,
.doc-card:hover .doc-meta { color: #fff; opacity: .9; }
.doc-divider { height: 1px; background: #e5e7eb; margin: 12px 0; }
.doc-card.is-active .doc-divider,
.doc-card:hover .doc-divider { background: rgba(255,255,255,.35); }
.btn-slim { height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; font-weight: 800; }
.doc-card.is-active .btn-slim,
.doc-card:hover .btn-slim { border-color: #fff; color: #000;}
.btn-slim.inverse { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }

@media (max-width: 900px) {
  .doctor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .doctor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reservation End (완료 화면) */
.reservation-end { padding: 40px 0 80px; }
.reservation-end .inner { max-width: 800px; margin: 0 auto; }
.end-card { position: relative; background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%); border: 1px solid rgba(233,85,21,.18); border-radius: 16px; padding: 32px; text-align: center; box-shadow: 0 14px 34px rgba(233,85,21,.08), 0 8px 22px rgba(2,6,23,.05); }
.end-card::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 16px 16px 0 0; background: linear-gradient(90deg, rgba(233,85,21,.35) 0%, rgba(233,85,21,.15) 100%); }
.end-title { position: relative; margin: 0 0 14px; font-size: 24px; font-weight: 900; letter-spacing: -.01em; background: linear-gradient(180deg, #ff9a6d 0%, #e95515 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.end-title::before { content: ""; display: block; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 9999px; background: radial-gradient(80% 80% at 50% 30%, rgba(233,85,21,.22) 0%, rgba(233,85,21,.12) 100%); border: 1px solid rgba(233,85,21,.28); box-shadow: inset 0 2px 6px rgba(233,85,21,.12), 0 6px 14px rgba(233,85,21,.12); position: relative; }
.end-title::after { content: ""; position: absolute; left: 50%; top: 17px;width: 21px;height: 14px; transform: translateX(-50%) rotate(-45deg); border-left: 3px solid #e95515; border-bottom: 3px solid #e95515; }
.end-meta { margin: 0 0 22px; font-size: 18px; font-weight: 800; color: #334155; }
.end-meta .end-date, .end-meta .end-time { color: #e95515; background: rgba(233,85,21,.08); padding: 2px 8px; border-radius: 8px; border: 1px solid rgba(233,85,21,.18); }
.end-meta .end-doctor { color: #0f172a; font-weight: 900; }
.end-actions { display: flex; justify-content: center; }
.end-btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: 12px; font-weight: 900; }
.reservation-end .summit_btn { min-width: 168px; background: linear-gradient(180deg, rgba(233,85,21,.10) 0%, rgba(233,85,21,.18) 100%); color: #e95515; border-color: rgba(233,85,21,.35); }
.reservation-end .summit_btn:hover { background: linear-gradient(180deg, rgba(233,85,21,.16) 0%, rgba(233,85,21,.26) 100%); box-shadow: 0 10px 22px rgba(233,85,21,.18); }
.reservation-end .summit_btn:active { transform: translateY(1px); }

@media (max-width: 600px){
	.end-card { padding: 24px; }
	.end-title { font-size: 22px; }
	.end-meta { font-size: 16px; }
}

/* iOS 포커스 시 확대 방지(선택) */
@supports (-webkit-touch-callout: none) {
  input:focus, textarea:focus { font-size: 16px !important; }
}

/* Mobile compact reservation table overrides */
@media (max-width: 760px){
	/* hide numbering column */
	.rs-table tbody td:first-child{ display: none !important; }
	/* slim row card */
	.rs-table tbody tr{ padding: 8px 10px; border-radius: 10px; background: #fff; box-shadow: none; border: 1px solid rgba(234,107,33,.14); }
	.rs-table tbody tr::before{ display: none; }
	.rs-table tbody tr + tr{ margin-top: 6px; }
    .rs-table tbody tr:nth-of-type(n+4){ display: none;}
	/* compact cell spacing */
	.rs-table tbody td{ padding: 6px 0; }
	/* primary text a bit smaller */
	.rs-table tbody td:nth-child(2){ font-size: 18px; font-weight: 800; }
	/* slimmer badge */
	.rs-badge{ height: 28px;        padding: 4px 12px;
        font-size: 14px; }
    
}

/* Anchor offset for in-page navigation */
#reservation_time{ scroll-margin-top: 130px; }
@supports not (scroll-margin-top: 1px){
	#reservation_time:target::before{ content:""; display:block; height:130px; margin-top:-130px; }
}