/* =========================================================
 * P4 나의 강의실(인강) · 마이페이지(학원) 전용 스타일
 * 모든 클래스는 p4- 접두사. 색은 토큰 변수(그라데이션은 site.css 패스 카드와 같은 값).
 * ========================================================= */

/* ---------- 공통 ---------- */
.p4-demo { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: var(--s-5); border: 1px dashed var(--slate-300); border-radius: var(--radius); background: #fffdf5; font-size: var(--fs-sm); color: var(--slate-600); }
.p4-demo > b { color: var(--navy); font-weight: 800; }
.p4-demo .chip { height: 30px; padding: 0 12px; }
.p4-demo.is-inline { margin: 0; padding: 6px 10px; }
.p4-demo.is-inline .seg button { padding: 4px 10px; font-size: 12px; }
.p4-sec { margin-top: var(--s-10); }
.p4-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: var(--s-4); }
.p4-sec-head h3 { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p4-sec-head h3 .p4-cnt { color: var(--red); }
.p4-sec-head p { font-size: var(--fs-sm); color: var(--slate-500); margin-top: 4px; }
.p4-sec-head p b { color: var(--navy); }
.p4-link { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-sm); font-weight: 600; color: var(--blue); }
.p4-link:hover { text-decoration: underline; }
.p4-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: var(--s-5); }
.p4-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-4); }
.p4-panel-head h3 { font-size: var(--fs-md); font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p4-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: var(--fs-sm); color: var(--slate-600); }

/* ---------- 내 수강권 카드 ---------- */
.p4-pass { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; padding: 26px 28px; border-radius: var(--radius-lg); color: #fff; position: relative; overflow: hidden; background: linear-gradient(135deg, #b0191e, #cd1e24 60%, #e0443a); }
.p4-pass.is-blue { background: linear-gradient(135deg, #1c467f, #2456a6); }
.p4-pass.is-navy { background: linear-gradient(135deg, #0f1b38, #22345f); }
.p4-pass::after { content: ""; position: absolute; right: 200px; bottom: -120px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.06); pointer-events: none; }
.p4-pass > * { position: relative; z-index: 1; min-width: 0; }
.p4-pass-name { font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1.25; }
.p4-pass-name small { font-size: 15px; font-weight: 600; opacity: .8; margin-left: 4px; letter-spacing: 0; }
.p4-pass-scope { margin-top: 6px; font-size: 14px; color: rgba(255,255,255,.85); }
.p4-pass-points { margin-top: 12px; display: grid; gap: 4px; font-size: 14px; }
.p4-pass-points li { position: relative; padding-left: 12px; }
.p4-pass-points li::before { content: ""; position: absolute; left: 0; top: .7em; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.6); }
.p4-pass-prof { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 14px 8px 8px; border-radius: var(--radius); background: rgba(255,255,255,.12); }
.p4-pass-prof .ph { width: 40px; border-radius: 50%; flex-shrink: 0; }
.p4-pass-prof b { display: block; font-size: 15px; }
.p4-pass-prof span { font-size: 12px; color: rgba(255,255,255,.8); }
.p4-pass-period { margin-top: 18px; }
.p4-pass-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.22); overflow: hidden; }
.p4-pass-bar span { display: block; height: 100%; background: #fff; border-radius: inherit; }
.p4-pass-dates { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.8); }
.p4-pass-side { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding-left: 24px; border-left: 1px solid rgba(255,255,255,.2); }
.p4-pass-k { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.8); }
.p4-pass-dday { font-size: 52px; font-weight: 800; letter-spacing: -2px; line-height: 1.05; }
.p4-pass-dday small { font-size: 20px; margin-left: 2px; letter-spacing: 0; }
.p4-pass-exp { font-size: 13px; color: rgba(255,255,255,.85); }
.p4-pass-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.p4-pass .note-tag.is-vendor { background: rgba(255,249,219,.95); }

/* ---------- 요약 카드 ---------- */
.p4-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.p4-stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.p4-stat-k { font-size: var(--fs-sm); font-weight: 700; color: var(--slate-600); }
.p4-stat strong { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.2; }
.p4-stat strong small { font-size: 14px; font-weight: 700; margin-left: 2px; }
.p4-stat-s { font-size: 12px; color: var(--slate-500); }

/* ---------- 수강 중 강좌 ---------- */
.p4-mine { display: grid; gap: var(--s-3); }
.p4-course { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .15s; }
.p4-course:hover { border-color: var(--slate-300); }
.p4-course.is-new { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); animation: p4Pop .5s var(--ease); }
@keyframes p4Pop { from { transform: translateY(-6px); opacity: .4; } to { transform: none; opacity: 1; } }
.p4-course-thumb { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); }
.p4-thumb-sub { position: absolute; left: 8px; top: 7px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; background: rgba(0,0,0,.25); color: #fff; }
.p4-thumb-play { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--navy); display: grid; place-items: center; padding-left: 2px; }
.p4-course-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.p4-course-title { font-size: var(--fs-md); font-weight: 800; line-height: 1.4; }
.p4-course-title a:hover { text-decoration: underline; }
.p4-course-meta { font-size: var(--fs-sm); color: var(--slate-500); }
.p4-course-body .progress-row { max-width: 420px; }
.p4-course-last { font-size: var(--fs-sm); color: var(--slate-600); }
.p4-course-last b { color: var(--navy); font-weight: 700; }
.p4-course-last span { color: var(--slate-500); }
.p4-course-actions { display: flex; flex-direction: column; gap: 6px; }
.p4-course-actions .btn { min-width: 112px; }

/* ---------- 내 수강권으로 들을 수 있는 강좌 ---------- */
.p4-avail-tools { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: var(--s-4); }
.p4-avail-tools:empty { display: none; }
.p4-f-prof { width: auto; min-width: 180px; }
.p4-avail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.p4-ac { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.p4-ac.is-mine { background: #fafcfb; }
.p4-ac.is-locked { background: #fafbfc; }
.p4-ac.is-locked .p4-ac-title { color: var(--slate-600); }
.p4-ac-title { font-weight: 800; line-height: 1.4; }
.p4-ac-meta { font-size: var(--fs-sm); color: var(--slate-500); }
.p4-ac-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.p4-ac-link { font-size: var(--fs-sm); color: var(--slate-500); text-decoration: underline; }
.p4-ac-mine { display: inline-flex; align-items: center; gap: 4px; height: 34px; font-size: var(--fs-sm); font-weight: 700; color: var(--green); }
.p4-ac-lock { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; color: var(--slate-500); background: var(--line-soft); }
.p4-upsell { grid-column: 1 / -1; }
.p4-upsell .row { flex-wrap: wrap; }

/* ---------- 접속 장소 ---------- */
.p4-place-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.p4-place { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.p4-place.is-empty { border-style: dashed; background: transparent; color: var(--slate-500); }
.p4-place-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex-shrink: 0; }
.p4-place.is-empty .p4-place-ico { background: var(--bg); color: var(--slate-400); }
.p4-place-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.p4-place-txt b { font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p4-place-txt span { font-size: 12px; color: var(--slate-500); }
.p4-place-list.is-compact .p4-place { padding: 12px 14px; }
.p4-places-box { padding: 18px 20px; border-radius: var(--radius); background: var(--bg); }
.p4-places-box .p4-place-list { margin-top: 12px; }
.p4-count-line { font-size: var(--fs-md); font-weight: 700; }
.p4-count-line b { font-size: 22px; color: var(--red); }
.p4-places-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- 강좌 차시 목록 ---------- */
.p4-ch { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.p4-ch-thumb { border-radius: var(--radius-sm); }
.p4-ch-thumb .ph-text { font-size: 16px; }
.p4-ch-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.p4-ch-body h3 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.6px; line-height: 1.3; }
.p4-ch-actions { display: flex; flex-direction: column; gap: 8px; }
.p4-cc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: var(--s-6); align-items: start; margin-top: var(--s-6); }
.p4-unit + .p4-unit { margin-top: var(--s-5); }
.p4-unit-head { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 2px solid var(--navy); }
.p4-unit-no { font-size: 12px; font-weight: 800; color: var(--red); }
.p4-unit-head h4 { font-size: var(--fs-md); font-weight: 800; flex: 1; min-width: 0; }
.p4-unit-cnt { font-size: 12px; color: var(--slate-500); white-space: nowrap; }
.p4-lesson { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.p4-lesson.is-cur { background: #fffafa; }
.p4-ls-st { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--slate-500); border: 1px solid var(--line); background: #fff; }
.p4-ls-st.is-done { background: var(--green); border-color: var(--green); color: #fff; }
.p4-ls-st.is-cur { background: var(--red); border-color: var(--red); color: #fff; }
.p4-lesson-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.p4-lesson-title { font-size: 15px; font-weight: 600; line-height: 1.45; }
.p4-lesson-title b { color: var(--slate-500); font-weight: 700; margin-right: 2px; }
.p4-lesson-title:hover { text-decoration: underline; }
.p4-lesson.is-done .p4-lesson-title { color: var(--slate-600); }
.p4-lesson-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--slate-500); }
.p4-lesson .progress { max-width: 240px; }
.p4-lesson-act { display: flex; gap: 4px; align-items: center; }
.p4-aside { display: grid; gap: var(--s-4); position: sticky; top: calc(var(--header-h) + 16px); }
.p4-aside .kv { grid-template-columns: 84px minmax(0, 1fr); font-size: 13px; }
.p4-aside .kv dt, .p4-aside .kv dd { padding: 10px; }
.p4-cinfo-desc { margin-top: 12px; font-size: 13px; color: var(--slate-600); line-height: 1.65; }
.p4-cprof { display: flex; gap: 12px; align-items: flex-start; }
.p4-cprof .ph { width: 56px; border-radius: 50%; flex-shrink: 0; }
.p4-cprof b { display: block; }
.p4-cprof span { display: block; font-size: 13px; color: var(--slate-600); margin: 2px 0 6px; }
.p4-qbox { padding: 18px; border-radius: var(--radius); background: var(--navy); color: #fff; }
.p4-qbox b { display: block; font-size: var(--fs-md); }
.p4-qbox p { font-size: 13px; color: var(--slate-300); margin: 4px 0 12px; }

/* ---------- 플레이어 ---------- */
.p4-pl-page { background: var(--bg); }
.p4-pl-band { background: var(--navy); background: linear-gradient(180deg, #0f1b38 0%, #16254a 100%); color: #fff; padding: 18px 0 28px; }
.p4-pl-top { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.p4-pl-back { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 8px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.2); font-size: var(--fs-sm); font-weight: 600; color: var(--slate-300); flex-shrink: 0; }
.p4-pl-back:hover { color: #fff; border-color: rgba(255,255,255,.5); }
.p4-pl-heading { flex: 1; min-width: 0; }
.p4-pl-heading span { display: block; font-size: 12px; color: var(--slate-400); }
.p4-pl-heading h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.35; }
.p4-pl-demo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px 6px 12px; border: 1px dashed rgba(255,255,255,.3); border-radius: var(--radius); font-size: 12px; color: var(--slate-300); }
.p4-pl-demo b { color: #fff; }
.p4-pl-demo .btn { height: 28px; padding: 0 10px; font-size: 12px; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.p4-pl-demo .btn:hover { background: rgba(255,255,255,.16); }
.p4-pl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: stretch; }
.p4-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #05091a; user-select: none; outline: none; }
.p4-video:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
.p4-video:fullscreen { aspect-ratio: auto; border-radius: 0; }
.p4-screen { position: absolute; inset: 0; display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; background: radial-gradient(circle at 70% 30%, #2d4a8a 0%, transparent 55%), linear-gradient(135deg, #22345f, #0f1b38); }
.p4-board { align-self: center; margin-left: 7%; padding: 5% 6%; border-radius: 6px; background: #1e3a33; border: 6px solid #6b4f34; color: #e9f2ee; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.p4-board small { display: block; font-size: clamp(9px, 1.3vw, 13px); opacity: .75; }
.p4-board strong { display: block; font-size: clamp(13px, 2.4vw, 26px); font-weight: 800; line-height: 1.3; margin-top: 4px; }
.p4-board em { display: block; margin-top: 8px; font-style: normal; font-size: clamp(9px, 1.2vw, 13px); opacity: .7; }
.p4-teacher { height: 82%; justify-self: center; aspect-ratio: 3 / 4; border-radius: 0; background-size: 92% auto, cover; }
.p4-video-label { position: absolute; left: 12px; top: 10px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 3px; background: rgba(0,0,0,.4); color: rgba(255,255,255,.85); z-index: 2; }
.p4-wm { position: absolute; z-index: 3; left: 30%; top: 30%; display: flex; flex-direction: column; font-size: clamp(10px, 1.3vw, 14px); line-height: 1.35; color: rgba(255,255,255,.28); text-shadow: 0 0 2px rgba(0,0,0,.3); pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.p4-wm b { font-weight: 800; font-size: 1.15em; }
.p4-wm.is-fade { opacity: 0; }
.p4-bigplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; width: 72px; height: 72px; border-radius: 50%; background: rgba(205,30,36,.92); color: #fff; display: grid; place-items: center; padding-left: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: opacity .2s, transform .2s; }
.p4-bigplay:hover { transform: translate(-50%, -50%) scale(1.06); }
.p4-video.is-playing .p4-bigplay { opacity: 0; pointer-events: none; }
.p4-ctrl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 26px 12px 8px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); }
.p4-seek { position: relative; height: 16px; cursor: pointer; display: flex; align-items: center; }
.p4-seek::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); }
.p4-seek-fill { position: absolute; left: 0; height: 4px; border-radius: 2px; background: var(--red); }
.p4-seek-knob { position: absolute; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.p4-ctrl-row { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.p4-cbtn { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.p4-cbtn:hover { background: rgba(255,255,255,.12); }
.p4-cbtn.is-muted { opacity: .45; }
.p4-time { font-size: 13px; color: rgba(255,255,255,.8); margin-left: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.p4-time b { color: #fff; font-weight: 600; }
.p4-ctrl-sp { flex: 1; }
.p4-pop { position: relative; }
.p4-txtbtn { height: 30px; min-width: 46px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 12px; font-weight: 700; margin: 0 2px; }
.p4-txtbtn:hover { background: rgba(255,255,255,.12); }
.p4-menu { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 120px; padding: 6px; border-radius: var(--radius); background: rgba(15,27,56,.97); box-shadow: var(--shadow-pop); display: none; z-index: 6; }
.p4-menu.is-open { display: block; }
.p4-menu li + li { margin-top: 1px; }
.p4-menu .p4-menu-k { padding: 4px 10px 6px; font-size: 11px; color: var(--slate-400); }
.p4-menu button { width: 100%; text-align: left; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px; color: var(--slate-300); }
.p4-menu button:hover { background: rgba(255,255,255,.08); color: #fff; }
.p4-menu button.is-active { color: #fff; font-weight: 700; background: rgba(255,255,255,.12); }
.p4-video.is-blocked .p4-screen { filter: blur(6px) grayscale(.6); }
.p4-pl-side { position: relative; min-height: 0; }
.p4-pl-side-in { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: var(--radius); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); overflow: hidden; }
.p4-pl-side-head { padding: 14px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.p4-pl-side-head b { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; }
.p4-pl-side-head b span { font-size: 12px; font-weight: 600; color: var(--slate-400); }
.p4-pl-side-head .progress { margin-top: 8px; background: rgba(255,255,255,.15); }
.p4-pl-list { flex: 1; overflow-y: auto; padding: 4px 0 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.p4-ls-unit { padding: 12px 16px 6px; font-size: 11px; font-weight: 800; color: var(--slate-400); letter-spacing: .3px; }
.p4-ls { display: flex; align-items: center; gap: 4px; padding-right: 10px; }
.p4-ls a { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px 9px 16px; color: var(--slate-300); }
.p4-ls a:hover { color: #fff; }
.p4-ls.is-now { background: rgba(205,30,36,.18); box-shadow: inset 3px 0 0 var(--red); }
.p4-ls.is-now a { color: #fff; }
.p4-ls-ck { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.p4-ls.is-done .p4-ls-ck { background: var(--green); border-color: var(--green); color: #fff; }
.p4-ls.is-now .p4-ls-ck { background: var(--red); border-color: var(--red); color: #fff; }
.p4-ls-t { font-size: 13px; line-height: 1.45; min-width: 0; }
.p4-ls-t b { font-weight: 700; }
.p4-ls-t small { display: block; font-size: 11px; color: var(--slate-400); }
.p4-ls-pdf { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,.18); font-size: 10.5px; font-weight: 700; color: var(--slate-300); flex-shrink: 0; }
.p4-ls-pdf:hover { color: #fff; border-color: rgba(255,255,255,.5); }
.p4-pl-below { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-5); align-items: start; }
.p4-pl-prof { display: flex; gap: 14px; align-items: center; margin-bottom: var(--s-4); }
.p4-pl-prof .ph { width: 64px; border-radius: 50%; flex-shrink: 0; }
.p4-pl-prof b { display: block; font-size: var(--fs-lg); font-weight: 800; }
.p4-pl-prof div > span:last-child { font-size: 13px; color: var(--slate-600); }
.p4-pl-desc { margin: var(--s-4) 0; font-size: 14px; color: var(--slate-600); line-height: 1.7; }
.p4-ask-target { font-size: 12px; color: var(--slate-500); margin-bottom: 8px; }
.p4-ask-list { margin-top: var(--s-4); border-top: 1px solid var(--line); }
.p4-ask-list li { border-bottom: 1px solid var(--line-soft); }
.p4-ask-list a { display: flex; align-items: center; gap: 8px; padding: 10px 2px; font-size: 13px; }
.p4-ask-list a span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p4-ask-list li.muted { padding: 10px 2px; }
.p4-block-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: var(--red-soft); color: var(--red); }
.p4-block-title { text-align: center; font-size: var(--fs-lg); font-weight: 800; }
.p4-block-desc { text-align: center; font-size: 14px; color: var(--slate-600); margin-top: 6px; }
.p4-block-dev { display: flex; gap: 12px; align-items: center; margin-top: var(--s-4); padding: 14px 16px; border-radius: var(--radius); background: var(--bg); }
.p4-block-dev b { display: block; font-size: 14px; }
.p4-block-dev span { font-size: 12px; color: var(--slate-500); }
.p4-block-places { margin-top: var(--s-4); }
.p4-block-places .p4-place-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.p4-block-opts { margin-top: var(--s-4); display: grid; gap: 8px; }
.p4-block-opts > div { font-size: 13px; color: var(--slate-600); }
.p4-block-opts b { color: var(--navy); }
.modal-foot.p4-wrap-foot { flex-wrap: wrap; }

/* ---------- 학습 Q&A ---------- */
.p4-q-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: var(--s-4); }
.p4-q-tools .select { width: auto; min-width: 200px; }
.p4-q-tools .chip b { margin-left: 4px; color: inherit; }
.p4-q .acc-head { gap: 10px; }
.p4-q .acc-head .badge { flex-shrink: 0; }
.p4-q-course { display: block; font-size: 12px; font-weight: 600; color: var(--slate-500); }
.p4-q-date { font-size: 13px; color: var(--slate-500); font-weight: 400; flex-shrink: 0; }
.p4-q .acc-body { padding: 18px 20px 20px; }
.p4-q-text { color: var(--navy); }
.p4-q-text b { color: var(--red); margin-right: 4px; }
.p4-answer { margin-top: 14px; padding: 16px; border-radius: var(--radius); background: #fff; border-left: 3px solid var(--navy); }
.p4-answer-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 14px; }
.p4-answer-head span:last-child { font-size: 12px; color: var(--slate-500); }
.p4-answer.is-wait { border-left-color: var(--orange); font-size: 14px; }
.p4-q-actions { display: flex; gap: 6px; margin-top: 12px; }

/* ---------- 주문 ---------- */
.p4-orders { display: grid; gap: var(--s-4); }
.p4-order { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.p4-order-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 12px 18px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.p4-order-head b { margin-right: 10px; }
.p4-order-head span { font-size: var(--fs-sm); color: var(--slate-500); }
.p4-order-items li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.p4-order-items li + li { border-top: 1px solid var(--line-soft); }
.p4-oi-ico { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; flex-shrink: 0; background: var(--blue-soft); color: var(--blue); }
.p4-oi-ico.is-book { background: var(--orange-soft); color: var(--orange); }
.p4-oi-txt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p4-oi-txt b { font-weight: 700; }
.p4-oi-price { font-weight: 700; white-space: nowrap; }
.p4-order-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); }
.p4-order-st { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p4-ship { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--slate-600); }
.p4-order-sum { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-sm); color: var(--slate-500); }
.p4-order-sum b { font-size: var(--fs-lg); font-weight: 800; color: var(--navy); }
.p4-od-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg); }
.p4-od-head > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.p4-od-head > div:last-child { flex-direction: row; flex-wrap: wrap; align-items: center; }
.p4-od-head > div:last-child .p4-od-k { width: 100%; }
.p4-od-k { font-size: 12px; color: var(--slate-500); }
.p4-od-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p4-od-total { font-size: var(--fs-lg); color: var(--red); }
.p4-od-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.p4-od-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: var(--s-8); }
.p4-od-sec h3 { font-size: var(--fs-md); font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.p4-policy { margin-top: var(--s-8); padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: #fafbfc; }
.p4-policy h3 { font-size: var(--fs-md); font-weight: 800; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.p4-policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.p4-policy h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.p4-refund-tbl th { text-align: left; background: #fafbfc; width: 46%; }
.p4-refund-tbl tr.is-total th, .p4-refund-tbl tr.is-total td { color: var(--navy); }
.p4-refund-tbl tr.is-total b { color: var(--red); font-size: var(--fs-lg); }
.p4-track-log { margin-top: var(--s-4); display: grid; gap: 0; border-left: 2px solid var(--line); padding-left: 16px; }
.p4-track-log li { position: relative; padding: 6px 0; }
.p4-track-log li::before { content: ""; position: absolute; left: -22px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--slate-300); }
.p4-track-log li:first-child::before { background: var(--red); }
.p4-track-log b { display: block; font-size: 14px; }
.p4-track-log span { font-size: 12px; color: var(--slate-500); }
.p4-receipt { border: 1px dashed var(--slate-300); border-radius: var(--radius); padding: 20px; }
.p4-rc-logo { display: flex; justify-content: center; }
.p4-rc-logo .logo-img { height: 30px; }
.p4-rc-title { text-align: center; font-weight: 800; margin: 8px 0 14px; }
.p4-rc-kv { font-size: 13px; gap: 6px 14px; }
.p4-rc-kv dt { color: var(--slate-500); }
.p4-rc-items { margin-top: 14px; border-top: 1px dashed var(--slate-300); padding-top: 10px; font-size: 13px; }
.p4-rc-items li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.p4-rc-items li.is-total { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--slate-300); font-weight: 800; font-size: 15px; }

/* ---------- 회원정보·기기관리 ---------- */
.p4-jump { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s-5); }
.p4-jump a { padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 600; color: var(--slate-600); background: #fff; }
.p4-jump a:hover { border-color: var(--navy); color: var(--navy); }
.p4-pf .form-section { scroll-margin-top: calc(var(--header-h) + 16px); }
.p4-pf .form-actions { margin-top: var(--s-5); justify-content: flex-end; }
.p4-pf-card { margin-top: var(--s-5); scroll-margin-top: calc(var(--header-h) + 16px); }
.p4-pf-head { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: var(--s-4); }
.p4-pf-head h3 { font-size: var(--fs-lg); font-weight: 800; }
.p4-agree { display: grid; gap: 0; border-top: 1px solid var(--line); }
.p4-agree-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.p4-agree-row b { display: block; font-size: 15px; }
.p4-agree-row span { font-size: 13px; color: var(--slate-500); }
.p4-agree .hint { margin-top: 10px; }
.p4-reset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: var(--s-4) 0; }
.p4-reset-opt { padding: 16px 18px; border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.p4-reset-opt > b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.p4-reset-opt p { font-size: 13px; color: var(--slate-600); }
.p4-reset-opt .btn { margin-top: 4px; }
.p4-social li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.p4-social li + li { border-top: 1px solid var(--line-soft); }
.p4-social li > div { flex: 1; min-width: 0; }
.p4-social b { display: block; }
.p4-social span { font-size: 13px; color: var(--slate-500); }
.p4-sns { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 900; }
.p4-sns.is-kakao { background: var(--kakao); color: #3a1d1d; }
.p4-sns.is-naver { background: #03c75a; color: #fff; }

/* ---------- 마이페이지 수강현황 ---------- */
.p4-class { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 24px 26px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #0f1b38, #22345f); color: #fff; position: relative; overflow: hidden; }
.p4-class::after { content: ""; position: absolute; right: -60px; top: -90px; width: 240px; height: 240px; border-radius: 50%; border: 40px solid rgba(255,255,255,.05); pointer-events: none; }
.p4-class > * { position: relative; z-index: 1; min-width: 0; }
.p4-class-k { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.p4-class h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; margin-top: 8px; }
.p4-class-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 14px; color: var(--slate-300); }
.p4-class-meta span { display: inline-flex; align-items: center; gap: 6px; }
.p4-class-meta b { color: #fff; font-weight: 700; }
.p4-class-actions { display: flex; flex-direction: column; gap: 8px; }
.p4-mstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-5); }
.p4-mstats .p4-stat strong { font-size: 22px; }
a.p4-stat:hover { border-color: var(--navy); }
.p4-stat.is-alert { border-color: var(--red); background: var(--red-soft); }
.p4-tt { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 4px; font-size: 13px; }
.p4-tt th { font-weight: 700; color: var(--slate-600); padding: 8px 4px; background: var(--bg); border-radius: var(--radius-sm); }
.p4-tt th small { display: block; font-size: 11px; font-weight: 500; color: var(--slate-500); }
.p4-tt thead th.is-today { background: var(--navy); color: #fff; }
.p4-tt thead th.is-today small { color: var(--slate-300); }
.p4-tt tbody th { width: 92px; }
.p4-tt td { padding: 9px 6px; text-align: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; vertical-align: middle; }
.p4-tt td b { display: block; font-weight: 700; color: var(--navy); line-height: 1.35; }
.p4-tt td span { display: block; font-size: 11px; color: var(--slate-500); }
.p4-tt td.is-class { background: var(--blue-soft); border-color: transparent; }
.p4-tt td.is-test { background: var(--red-soft); border-color: transparent; }
.p4-tt td.is-test b { color: var(--red); }
.p4-tt td.is-care { background: var(--green-soft); border-color: transparent; }
.p4-tt td.is-self { background: var(--bg); border-color: transparent; }
.p4-tt td.is-empty { border-style: dashed; }
.p4-tt td.is-today { box-shadow: inset 0 0 0 2px var(--navy); }
.p4-tt-legend { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--slate-500); }
.p4-tt-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.p4-tt-legend .is-class { background: var(--blue-soft); } .p4-tt-legend .is-test { background: var(--red-soft); } .p4-tt-legend .is-care { background: var(--green-soft); } .p4-tt-legend .is-self { background: var(--line); }
.p4-mgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-5); margin-top: var(--s-5); }
.p4-chart { width: 100%; height: auto; display: block; }
.p4-ch-grid { stroke: var(--line); stroke-width: 1; }
.p4-ch-ax { font-size: 11px; fill: var(--slate-500); font-family: var(--font); }
.p4-ln-eng, .p4-ln-math { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.p4-ln-eng { stroke: var(--navy); } .p4-ln-math { stroke: var(--blue); stroke-dasharray: 6 4; }
.p4-ln-eng-dot { fill: var(--navy); } .p4-ln-math-dot { fill: #fff; stroke: var(--blue); stroke-width: 2.5; }
.p4-ch-val { font-size: 13px; font-weight: 800; font-family: var(--font); }
.p4-ln-eng-t { fill: var(--navy); } .p4-ln-math-t { fill: var(--blue); }
.p4-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--slate-600); }
.p4-legend span { display: inline-flex; align-items: center; gap: 6px; }
.p4-legend i { width: 18px; height: 0; border-top: 2.5px solid var(--navy); }
.p4-legend i.is-math { border-top: 2.5px dashed var(--blue); }
.p4-score-note { margin-top: 10px; font-size: 13px; color: var(--slate-600); }
.p4-score-note b { color: var(--navy); }
.p4-att-big { font-size: 40px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
.p4-att-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin-top: 12px; background: var(--line-soft); }
.p4-att-bar span { display: block; min-width: 0; }
.p4-att-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--slate-600); }
.p4-att-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.is-present.p4-dot, .p4-att-bar .is-present, .p4-att-legend .is-present { background: var(--green); }
.p4-att-bar .is-late, .p4-att-legend .is-late { background: var(--amber); }
.p4-att-bar .is-early, .p4-att-legend .is-early { background: var(--blue); }
.p4-att-bar .is-absent, .p4-att-legend .is-absent { background: var(--red); }
.p4-link-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .15s; }
.p4-link-card:hover { border-color: var(--navy); }
.p4-link-card > div { flex: 1; min-width: 0; }
.p4-link-card b { display: block; font-size: var(--fs-md); }
.p4-link-card span { font-size: 13px; color: var(--slate-500); }

/* ---------- 마이페이지 공지·1:1 메시지 ---------- */
.p4-n-by { font-size: 12px; color: var(--slate-500); margin-bottom: 6px; }
.p4-msg { display: grid; grid-template-columns: 280px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; height: 560px; }
.p4-th-list { border-right: 1px solid var(--line); overflow-y: auto; background: #fafbfc; }
.p4-th { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.p4-th:hover { background: #fff; }
.p4-th.is-active { background: #fff; box-shadow: inset 3px 0 0 var(--red); }
.p4-th-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p4-th-txt b { font-size: 14px; display: flex; align-items: baseline; gap: 6px; }
.p4-th-txt b small { font-size: 11px; font-weight: 500; color: var(--slate-500); }
.p4-th-txt > span { font-size: 12px; color: var(--slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p4-th-time { font-size: 11px; color: var(--slate-400); flex-shrink: 0; }
.p4-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.p4-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--navy); flex-shrink: 0; }
.p4-avatar.is-red { background: var(--red); } .p4-avatar.is-blue { background: var(--blue); }
.p4-conv-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.p4-conv-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.p4-conv-head b { display: block; }
.p4-conv-head span { font-size: 12px; color: var(--slate-500); }
.p4-conv { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.p4-bubble { max-width: 76%; align-self: flex-start; }
.p4-bubble p { padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: #fff; border: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.p4-bubble span { display: block; margin-top: 3px; font-size: 11px; color: var(--slate-400); }
.p4-bubble.is-me { align-self: flex-end; text-align: right; }
.p4-bubble.is-me p { background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 14px 4px 14px 14px; text-align: left; }
.p4-reply { display: flex; gap: 6px; padding: 12px; border-top: 1px solid var(--line); }
.p4-reply .input { flex: 1; }
.tab .p4-tab-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; vertical-align: 1px; }

/* ---------- 출석현황 ---------- */
.p4-att { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s-5); align-items: start; }
.p4-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.p4-cal-head h3 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.5px; }
.p4-cal-nav { display: flex; gap: 6px; }
.p4-cal-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--input-line); background: #fff; display: grid; place-items: center; color: var(--navy); }
.p4-cal-nav button:disabled { opacity: .35; cursor: default; }
.p4-cal-dow, .p4-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.p4-cal-dow span { text-align: center; font-size: 12px; font-weight: 700; color: var(--slate-500); padding: 6px 0; }
.p4-cal-dow span:first-child { color: var(--red); } .p4-cal-dow span:last-child { color: var(--blue); }
.p4-cal-cell { min-height: 78px; padding: 6px 7px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p4-cal-cell.is-blank { border: 0; background: transparent; }
.p4-cal-cell.is-off { background: #fafbfc; }
.p4-cal-d { font-size: 13px; font-weight: 700; }
.p4-cal-cell.is-sun .p4-cal-d { color: var(--red); }
.p4-cal-cell.is-sat .p4-cal-d { color: var(--blue); }
.p4-cal-st { align-self: flex-start; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 3px; }
.p4-cal-t { font-size: 11px; color: var(--slate-500); }
.p4-cal-cell.is-present .p4-cal-st { background: var(--green-soft); color: var(--green); }
.p4-cal-cell.is-late { background: var(--amber-soft); border-color: transparent; }
.p4-cal-cell.is-late .p4-cal-st { background: var(--amber); color: #fff; }
.p4-cal-cell.is-absent { background: var(--red-soft); border-color: transparent; }
.p4-cal-cell.is-absent .p4-cal-st { background: var(--red); color: #fff; }
.p4-cal-cell.is-early { background: var(--blue-soft); border-color: transparent; }
.p4-cal-cell.is-early .p4-cal-st { background: var(--blue); color: #fff; }
.p4-cal-cell.is-holiday .p4-cal-st { color: var(--slate-500); background: var(--line-soft); }
.p4-cal-cell.is-plan .p4-cal-st { color: var(--slate-400); background: transparent; border: 1px dashed var(--slate-300); }
.p4-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--navy); }
.p4-att-rate { padding: 20px; border-radius: var(--radius); background: var(--navy); color: #fff; }
.p4-att-rate span { font-size: 13px; font-weight: 700; color: var(--slate-300); }
.p4-att-rate strong { display: block; font-size: 44px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-top: 4px; }
.p4-att-rate small { display: block; font-size: 12px; color: var(--slate-300); margin: 4px 0 12px; }
.p4-att-rate .progress { background: rgba(255,255,255,.15); }
.p4-att-rate .progress.is-navy > span { background: #fff; }
.p4-att-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.p4-att-nums li { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; display: flex; justify-content: space-between; align-items: baseline; }
.p4-att-nums span { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.p4-att-nums span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.p4-att-nums .is-present span::before { background: var(--green); } .p4-att-nums .is-late span::before { background: var(--amber); }
.p4-att-nums .is-early span::before { background: var(--blue); } .p4-att-nums .is-absent span::before { background: var(--red); }
.p4-att-nums b { font-size: 22px; font-weight: 800; }
.p4-st { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 700; }
.p4-st.is-present { background: var(--green-soft); color: var(--green); }
.p4-st.is-late { background: var(--amber-soft); color: var(--amber); }
.p4-st.is-absent { background: var(--red-soft); color: var(--red); }
.p4-st.is-early { background: var(--blue-soft); color: var(--blue); }
.p4-st.is-holiday { background: var(--line-soft); color: var(--slate-500); }

/* ---------- 학원 수강료 결제 ---------- */
.p4-inv { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border: 2px solid var(--navy); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.p4-inv.is-paid { border-color: var(--line); }
.p4-inv-main { padding: 22px 24px; min-width: 0; }
.p4-inv-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p4-inv-top > b { font-size: var(--fs-lg); font-weight: 800; }
.p4-inv-kv { margin-top: 14px; font-size: 14px; }
.p4-inv-kv dt { color: var(--slate-500); }
.p4-biz { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--blue-soft); }
.p4-biz span { display: block; font-size: 12px; font-weight: 700; color: var(--blue); }
.p4-biz b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-md); }
.p4-biz small { display: block; font-size: 12px; color: var(--slate-600); margin-top: 2px; }
.p4-inv-pay { padding: 22px 24px; background: #fafbfc; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.p4-inv-pay > span { font-size: 13px; font-weight: 700; color: var(--slate-600); }
.p4-inv-pay strong { font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1.2; }
.p4-inv-pay small { font-size: 12px; color: var(--slate-500); margin-bottom: 12px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.p4-pay-biz { padding: 12px 14px; border-radius: var(--radius); background: var(--blue-soft); font-size: 14px; }
.p4-pay-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.p4-pay-sum strong { font-size: 24px; font-weight: 800; color: var(--red); }

/* ---------- 반응형 ---------- */
@media (max-width: 1199px) {
  .p4-cc-grid, .p4-pl-below { grid-template-columns: minmax(0, 1fr); }
  .p4-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .p4-avail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p4-pl-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .p4-mgrid { grid-template-columns: minmax(0, 1fr); }
  .p4-att { grid-template-columns: minmax(0, 1fr); }
  .p4-att-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); }
  .p4-att-side .p4-att-nums { margin-top: 0; }
}
@media (max-width: 1023px) {
  .p4-pl-grid { grid-template-columns: minmax(0, 1fr); }
  .p4-pl-side-in { position: static; max-height: 420px; }
  .p4-mstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p4-ch { grid-template-columns: 180px minmax(0, 1fr); }
  .p4-ch-actions { grid-column: 1 / -1; flex-direction: row; }
  .p4-ch-actions .btn { flex: 1; }
  .p4-inv { grid-template-columns: minmax(0, 1fr); }
  .p4-inv-pay { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 767px) {
  .p4-pass { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; gap: 18px; }
  .p4-pass::after { right: -80px; }
  .p4-pass-side { padding: 16px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.2); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .p4-pass-k { grid-column: 1 / -1; }
  .p4-pass-dday { font-size: 40px; }
  .p4-pass-actions { grid-column: 1 / -1; }
  .p4-pass-actions .btn { flex: 1; }
  .p4-pass-name { font-size: 24px; }
  .p4-stats { gap: 8px; }
  .p4-stat { padding: 12px; }
  .p4-stat-k { font-size: 12px; }
  .p4-stat strong { font-size: 18px; letter-spacing: -0.5px; }
  .p4-stat strong small { font-size: 12px; }
  .p4-stat-s { font-size: 11px; }
  .p4-mstats .p4-stat strong { font-size: 18px; }
  .p4-course { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 12px; align-items: start; }
  .p4-course-actions { grid-column: 1 / -1; flex-direction: row; }
  .p4-course-actions .btn { flex: 1; min-width: 0; }
  .p4-thumb-play { width: 30px; height: 30px; }
  .p4-course-title { font-size: 15px; }
  .p4-course-meta, .p4-course-last { font-size: 12px; }
  .p4-avail, .p4-place-list, .p4-reset, .p4-od-grid, .p4-policy-grid, .p4-aside { grid-template-columns: minmax(0, 1fr); }
  .p4-f-prof { flex: 1; min-width: 0; }
  .p4-ch { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 14px; }
  .p4-ch-thumb { display: none; }
  .p4-ch-body h3 { font-size: var(--fs-lg); }
  .p4-lesson { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .p4-lesson-act { grid-column: 2; }
  .p4-pl-band { padding: 12px 0 20px; }
  .p4-pl-heading h1 { font-size: 17px; }
  .p4-pl-demo { width: 100%; }
  .p4-video { margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
  .p4-ctrl { padding: 18px 6px 4px; }
  .p4-cbtn { width: 32px; height: 32px; }
  .p4-cbtn[data-act="vol"] { display: none; }
  .p4-time { font-size: 11px; margin-left: 2px; }
  .p4-txtbtn { min-width: 40px; padding: 0 5px; font-size: 11px; height: 28px; }
  .p4-bigplay { width: 56px; height: 56px; }
  .p4-screen { grid-template-columns: 1.3fr 1fr; }
  .p4-board { border-width: 4px; }
  .p4-q-tools .select { flex: 1; min-width: 0; }
  .p4-q .acc-head { flex-wrap: wrap; padding: 14px 4px; }
  .p4-q .acc-head .acc-label { flex-basis: calc(100% - 30px); order: 3; }
  .p4-q-date { margin-left: auto; font-size: 12px; }
  .p4-q .acc-body { padding: 14px; }
  .p4-order-items li, .p4-order-head, .p4-order-foot { padding-left: 14px; padding-right: 14px; }
  .p4-oi-price { font-size: 14px; }
  .p4-od-head { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .p4-class { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .p4-class h3 { font-size: 22px; }
  .p4-class-actions { flex-direction: row; }
  .p4-class-actions .btn { flex: 1; }
  .p4-msg { grid-template-columns: minmax(0, 1fr); height: auto; }
  .p4-th-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .p4-th-list::-webkit-scrollbar { display: none; }
  .p4-th { flex: 0 0 auto; width: auto; max-width: 210px; padding: 10px 12px; border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .p4-th.is-active { box-shadow: inset 0 -3px 0 var(--red); }
  .p4-th-txt > span { display: none; }
  .p4-th-time { display: none; }
  .p4-avatar { width: 32px; height: 32px; font-size: 13px; }
  .p4-conv { height: 380px; flex: none; padding: 14px; }
  .p4-bubble { max-width: 88%; }
  .p4-cal-cell { min-height: 56px; padding: 4px; gap: 1px; }
  .p4-cal-d { font-size: 12px; }
  .p4-cal-st { font-size: 10px; padding: 0 3px; }
  .p4-cal-t { display: none; }
  .p4-cal-dow, .p4-cal-grid { gap: 2px; }
  .p4-att-side { grid-template-columns: minmax(0, 1fr); }
  .p4-att-rate strong { font-size: 36px; }
  .p4-inv-main, .p4-inv-pay { padding: 18px 16px; }
  .p4-agree-row span { font-size: 12px; }
  .p4-jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .p4-jump::-webkit-scrollbar { display: none; }
  .p4-jump a { white-space: nowrap; }
}

@media print {
  .topbar, .site-header, .mnav, #page-hero, .side-nav, .site-footer, .float-kakao, .float-top, .demo-tool { display: none !important; }
}

/* 모달 안의 form 이 modal-dialog 의 세로 스크롤 구조를 유지하도록 */
.modal-dialog > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.p4-od-sec .tbl td.t-right, .p4-od-sec .tbl td:last-child, .p4-od-sec .tbl td:nth-child(2) { white-space: nowrap; }
@media (max-width: 767px) { .p4-od-sec .tbl th, .p4-od-sec .tbl td { padding-left: 8px; padding-right: 8px; } }

/* F1: 납부 이력 표 — 모바일은 카드형(금액·날짜 줄바꿈 없음) */
.p4-tuition-tbl td { white-space: nowrap; }
.p4-tuition-tbl td[data-label="결제받은 사업자"] { white-space: normal; word-break: keep-all; }
@media (max-width: 767px) {
  .p4-tuition-tbl { border-top: 2px solid var(--navy); }
  .p4-tuition-tbl thead { display: none; }
  .p4-tuition-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .p4-tuition-tbl tbody td { display: flex; justify-content: space-between; gap: 12px; padding: 0; border: 0; text-align: left; font-size: 14px; grid-column: 1 / -1; }
  .p4-tuition-tbl tbody td::before { content: attr(data-label); color: var(--slate-500); font-size: 13px; flex-shrink: 0; }
  .p4-tuition-tbl tbody td.p4-tu-month { grid-column: 1; font-size: 15px; color: var(--navy); }
  .p4-tuition-tbl tbody td.p4-tu-rc { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .p4-tuition-tbl tbody td.p4-tu-month::before, .p4-tuition-tbl tbody td.p4-tu-rc::before { content: none; }
  .p4-tuition-tbl tbody td.p4-tu-amount { color: var(--navy); font-weight: 700; }
  .p4-tuition-tbl tbody td[data-label="결제받은 사업자"] { text-align: right; }
}
/* F1: 출석 일자별 표 — 날짜·시각은 한 줄로 */
.p4-att-tbl td:not(:last-child), .p4-att-tbl th { white-space: nowrap; }
@media (max-width: 767px) { .p4-att-tbl th, .p4-att-tbl td { padding-left: 6px; padding-right: 6px; } }

/* ---------- F3 보정 ---------- */
/* 마이페이지 공지 390: 배지·날짜를 윗줄로, 제목을 아랫줄 전체 폭으로(제목이 3줄로 접히던 것). 학습 Q&A(.p4-q)와 같은 배치 */
@media (max-width: 767px) {
  #p4-cn-list .acc-head { flex-wrap: wrap; gap: 6px 8px; padding: 14px 4px; }
  #p4-cn-list .acc-head .badge { flex-shrink: 0; }
  #p4-cn-list .acc-head .acc-label { flex-basis: calc(100% - 30px); order: 3; }
  #p4-cn-list .acc-head .p4-q-date { margin-left: auto; font-size: 12px; }
}

/* ---------- B3 실데이터 대입 (2026-11-19): 교수 사진·교재 표지·긴 반 이름 ---------- */
.p4-prof-img { display: block; aspect-ratio: 1 / 1; object-fit: cover; object-position: center top; border-radius: 50%; flex-shrink: 0; background: var(--bg); }
.p4-pass-prof .p4-prof-img { width: 40px; }
.p4-cprof .p4-prof-img { width: 56px; }
.p4-pl-prof .p4-prof-img { width: 64px; }
.p4-book-cell { display: inline-flex; align-items: flex-start; gap: 10px; min-width: 0; }
.p4-book-cover { width: 44px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex-shrink: 0; background: var(--bg); }
.p4-book-cell > span { min-width: 0; overflow-wrap: anywhere; }
.p4-oi-cover { width: 36px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex-shrink: 0; background: var(--bg); }
.p4-class-sub { display: block; margin-top: 4px; font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; opacity: .8; }
.p4-course-title, .p4-ac-title, .p4-oi-txt b, .p4-od-item b, #p4-q-course, .p4-q-course { overflow-wrap: anywhere; }
#p4-q-course, #p4-ask-course, #p4-ask-lesson { max-width: 100%; }
