/* 문제 태그에서 열리는 이론 퀵뷰 모달 */
body.tqv-modal-open {overflow: hidden; overscroll-behavior: none;}
#theory-quickview-modal {position: fixed; inset: 0; z-index: 30000; display: grid; place-items: center; padding: 28px; visibility: hidden; opacity: 0; pointer-events: none; font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; transition: opacity .2s ease, visibility .2s ease;}
#theory-quickview-modal.is-open {visibility: visible; opacity: 1; pointer-events: auto;}
#theory-quickview-modal .tqv-backdrop {position: absolute; inset: 0; background: rgba(8, 15, 31, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);}
#theory-quickview-modal .tqv-dialog {position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; width: min(920px, calc(100vw - 56px)); height: min(880px, calc(100dvh - 56px)); overflow: hidden; border: 1px solid rgba(255, 255, 255, .55); border-radius: 26px; background: #fff; box-shadow: 0 30px 90px rgba(2, 8, 23, .36); transform: translateY(18px) scale(.985); transition: transform .24s cubic-bezier(.2, .8, .2, 1);}
#theory-quickview-modal.is-open .tqv-dialog {transform: translateY(0) scale(1);}
#theory-quickview-modal .tqv-progress-track {position: absolute; top: 0; right: 0; left: 0; z-index: 5; height: 4px; overflow: hidden; background: rgba(226, 232, 240, .8);}
#theory-quickview-modal .tqv-progress-bar {display: block; width: 0; height: 100%; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, #2097ff, #16c4d9); transition: width .1s linear;}
#theory-quickview-modal .tqv-close {position: absolute; top: 20px; right: 20px; z-index: 7; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(148, 163, 184, .24); border-radius: 14px; background: rgba(255, 255, 255, .88); box-shadow: 0 8px 24px rgba(15, 23, 42, .1); color: #334155; font-size: 0; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .15s ease, color .15s ease, transform .15s ease;}
#theory-quickview-modal .tqv-close::before, #theory-quickview-modal .tqv-close::after {position: absolute; width: 18px; height: 2px; border-radius: 2px; background: currentColor; content: "";}
#theory-quickview-modal .tqv-close::before {transform: rotate(45deg);}
#theory-quickview-modal .tqv-close::after {transform: rotate(-45deg);}
#theory-quickview-modal .tqv-close:hover {background: #fff; color: #0f172a; transform: translateY(-1px);}
#theory-quickview-modal .tqv-close:focus-visible, #theory-quickview-modal .tqv-footer-btn:focus-visible, #theory-quickview-modal .tqv-full-link:focus-visible {outline: 3px solid rgba(32, 151, 255, .32); outline-offset: 2px;}
#theory-quickview-modal .tqv-scroll {min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; background: #fff;}
#theory-quickview-modal .tqv-scroll::-webkit-scrollbar {width: 8px;}
#theory-quickview-modal .tqv-scroll::-webkit-scrollbar-thumb {border: 2px solid #fff; border-radius: 10px; background: #cbd5e1;}
#theory-quickview-modal .tqv-content {min-height: 100%;}
#theory-quickview-modal #theory-quickview {min-height: 100%; color: #243043; word-break: keep-all; overflow-wrap: break-word;}
#theory-quickview-modal #theory-quickview .tqv-hero {position: relative; padding: 52px clamp(32px, 6vw, 72px) 38px; overflow: hidden; border-bottom: 1px solid #e8eef6; background: linear-gradient(145deg, #f7fbff 0%, #eef8ff 55%, #f3fcfb 100%);}
#theory-quickview-modal #theory-quickview .tqv-hero::after {position: absolute; top: -90px; right: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(32, 151, 255, .16), rgba(32, 151, 255, 0) 68%); content: ""; pointer-events: none;}
#theory-quickview-modal #theory-quickview .tqv-eyebrow {position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 0 56px 16px 0; color: #1376c5; font-size: 13px; font-weight: 800; letter-spacing: -.01em;}
#theory-quickview-modal #theory-quickview .tqv-eyebrow::before {display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: linear-gradient(135deg, #2097ff, #1bc5cf); box-shadow: 0 0 0 5px rgba(32, 151, 255, .1); content: "";}
#theory-quickview-modal #theory-quickview .tqv-title {position: relative; z-index: 1; margin: 0; max-width: 720px; color: #0f172a; font-size: clamp(28px, 4vw, 40px); font-weight: 850; line-height: 1.24; letter-spacing: -.045em;}
#theory-quickview-modal #theory-quickview .tqv-subtitle {position: relative; z-index: 1; margin: 14px 0 0; color: #64748b; font-size: 15px; font-weight: 550; line-height: 1.55;}
#theory-quickview-modal #theory-quickview .tqv-meta {position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px;}
#theory-quickview-modal #theory-quickview .tqv-chip {display: inline-flex; align-items: center; min-height: 31px; padding: 6px 11px; border: 1px solid rgba(32, 151, 255, .18); border-radius: 999px; background: rgba(255, 255, 255, .78); color: #27648f; font-size: 12px; font-weight: 750; line-height: 1.25;}
#theory-quickview-modal #theory-quickview .tqv-chip--time {border-color: rgba(100, 116, 139, .15); color: #64748b;}
#theory-quickview-modal #theory-quickview .tqv-article {width: min(100%, 780px); margin: 0 auto; padding: 44px clamp(28px, 6vw, 64px) 64px; color: #283548; font-size: 16.5px; font-weight: 430; line-height: 1.85; letter-spacing: -.012em;}
#theory-quickview-modal #theory-quickview .tqv-article > :first-child {margin-top: 0 !important;}
#theory-quickview-modal #theory-quickview .tqv-article > :last-child {margin-bottom: 0 !important;}
#theory-quickview-modal #theory-quickview .tqv-article h1, #theory-quickview-modal #theory-quickview .tqv-article h2, #theory-quickview-modal #theory-quickview .tqv-article h3, #theory-quickview-modal #theory-quickview .tqv-article h4 {font-family: inherit !important; color: #101c2f !important; font-style: normal !important; text-align: left !important; word-break: keep-all;}
#theory-quickview-modal #theory-quickview .tqv-article h1 {margin: 48px 0 17px !important; padding: 0 0 13px !important; border-bottom: 2px solid #dbeafe !important; background: none !important; font-size: 25px !important; font-weight: 850 !important; line-height: 1.35 !important; letter-spacing: -.035em !important;}
#theory-quickview-modal #theory-quickview .tqv-article h2 {margin: 38px 0 15px !important; padding: 0 !important; border: 0 !important; background: none !important; font-size: 21px !important; font-weight: 800 !important; line-height: 1.4 !important; letter-spacing: -.03em !important;}
#theory-quickview-modal #theory-quickview .tqv-article h3 {margin: 28px 0 11px !important; padding: 0 !important; border: 0 !important; background: none !important; color: #1e5f8f !important; font-size: 17px !important; font-weight: 800 !important; line-height: 1.5 !important;}
#theory-quickview-modal #theory-quickview .tqv-article h4 {margin: 24px 0 9px !important; padding: 0 !important; font-size: 16px !important; font-weight: 800 !important; line-height: 1.5 !important;}
#theory-quickview-modal #theory-quickview .tqv-article p {margin: 0 0 16px !important; padding: 0 !important; color: #334155 !important; font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; text-align: left !important;}
#theory-quickview-modal #theory-quickview .tqv-article strong {color: #14243b; font-weight: 800;}
#theory-quickview-modal #theory-quickview .tqv-article a {color: #1479c9; text-decoration: underline; text-underline-offset: 3px;}
#theory-quickview-modal #theory-quickview .tqv-article ul, #theory-quickview-modal #theory-quickview .tqv-article ol {margin: 18px 0 22px !important; padding: 18px 22px 18px 44px !important; border: 1px solid #e3edf8 !important; border-radius: 16px !important; background: #f8fbff !important; list-style-position: outside !important;}
#theory-quickview-modal #theory-quickview .tqv-article ul {list-style-type: disc !important;}
#theory-quickview-modal #theory-quickview .tqv-article ol {list-style-type: decimal !important;}
#theory-quickview-modal #theory-quickview .tqv-article li {display: list-item !important; margin: 0 !important; padding: 3px 0 !important; color: #334155 !important; font-family: inherit !important; font-size: inherit !important; line-height: 1.75 !important; list-style: inherit !important;}
#theory-quickview-modal #theory-quickview .tqv-article li + li {margin-top: 7px !important;}
#theory-quickview-modal #theory-quickview .tqv-article blockquote {margin: 22px 0 !important; padding: 18px 20px 18px 22px !important; border: 0 !important; border-left: 4px solid #29a7e8 !important; border-radius: 0 14px 14px 0 !important; background: linear-gradient(90deg, #edf8ff, #f8fcff) !important; color: #24455f !important;}
#theory-quickview-modal #theory-quickview .tqv-article blockquote p {margin: 0 !important; color: inherit !important; font-weight: 650 !important;}
#theory-quickview-modal #theory-quickview .tqv-article hr {height: 1px !important; margin: 38px 0 !important; border: 0 !important; background: linear-gradient(90deg, transparent, #dbe4ef 12%, #dbe4ef 88%, transparent) !important;}
#theory-quickview-modal #theory-quickview .tqv-article table {width: 100% !important; min-width: 560px; margin: 0 !important; border: 0 !important; border-collapse: separate !important; border-spacing: 0 !important; background: #fff !important; color: #334155 !important; font-size: 14px !important; line-height: 1.55 !important;}
#theory-quickview-modal #theory-quickview .tqv-article table th {padding: 12px 14px !important; border: 0 !important; border-bottom: 1px solid #cfe0f2 !important; background: #eef6ff !important; color: #163a57 !important; font-weight: 800 !important; text-align: left !important;}
#theory-quickview-modal #theory-quickview .tqv-article table td {padding: 12px 14px !important; border: 0 !important; border-bottom: 1px solid #e8eef5 !important; background: #fff !important; color: #334155 !important; text-align: left !important; vertical-align: top !important;}
#theory-quickview-modal #theory-quickview .tqv-article table tr:last-child td {border-bottom: 0 !important;}
#theory-quickview-modal #theory-quickview .tqv-article .TyagGW_tableContainer, #theory-quickview-modal #theory-quickview .tqv-article .table-container, #theory-quickview-modal #theory-quickview .tqv-article .table-wrapper {display: block !important; max-width: 100%; margin: 20px 0 24px !important; overflow-x: auto !important; border: 1px solid #dbe6f2; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .05);}
#theory-quickview-modal #theory-quickview .tqv-article .TyagGW_tableWrapper {display: block !important; width: max-content !important; min-width: 100% !important; max-width: none !important;}
#theory-quickview-modal #theory-quickview .tqv-article img {display: block !important; max-width: 100% !important; height: auto !important; margin: 24px auto !important; border-radius: 14px; box-shadow: 0 10px 28px rgba(15, 23, 42, .1); object-fit: contain;}
#theory-quickview-modal #theory-quickview .tqv-article iframe, #theory-quickview-modal #theory-quickview .tqv-article video {display: block; width: 100% !important; max-width: 100% !important; aspect-ratio: 16 / 9; height: auto !important; margin: 24px auto; border: 0; border-radius: 14px; background: #0f172a;}
#theory-quickview-modal #theory-quickview .tqv-article pre {max-width: 100%; margin: 20px 0; padding: 16px; overflow-x: auto; border-radius: 13px; background: #0f172a; color: #e2e8f0; font-size: 13px; line-height: 1.65;}
#theory-quickview-modal #theory-quickview .tqv-article code {padding: 2px 5px; border-radius: 5px; background: #eef2f7; color: #be185d; font-size: .9em;}
#theory-quickview-modal #theory-quickview .tqv-article pre code {padding: 0; background: none; color: inherit;}
#theory-quickview-modal .tqv-footer {display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 78px; padding: 14px 22px; border-top: 1px solid #e7edf4; background: rgba(255, 255, 255, .96); box-shadow: 0 -12px 30px rgba(15, 23, 42, .045);}
#theory-quickview-modal .tqv-footer-btn, #theory-quickview-modal .tqv-full-link {display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 14px; font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;}
#theory-quickview-modal .tqv-footer-btn {border: 1px solid #dbe4ee; background: #fff; color: #475569;}
#theory-quickview-modal .tqv-full-link {border: 1px solid #2097ff; background: linear-gradient(135deg, #2097ff, #1688e6); box-shadow: 0 8px 20px rgba(32, 151, 255, .24); color: #fff;}
#theory-quickview-modal .tqv-footer-btn:hover, #theory-quickview-modal .tqv-full-link:hover {transform: translateY(-1px);}
#theory-quickview-modal .tqv-full-link:hover {box-shadow: 0 11px 24px rgba(32, 151, 255, .3); color: #fff; text-decoration: none;}
#theory-quickview-modal .tqv-state {display: flex; min-height: 520px; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; color: #64748b; text-align: center;}
#theory-quickview-modal .tqv-loader {width: 44px; height: 44px; margin-bottom: 18px; border: 4px solid #dbeafe; border-top-color: #2097ff; border-radius: 50%; animation: tqv-spin .8s linear infinite;}
#theory-quickview-modal .tqv-state-title {margin: 0 0 7px; color: #1e293b; font-size: 17px; font-weight: 800;}
#theory-quickview-modal .tqv-state-copy {margin: 0; color: #64748b; font-size: 14px; line-height: 1.6;}
#theory-quickview-modal .tqv-state--error .tqv-state-title {color: #b42318;}
@keyframes tqv-spin {to {transform: rotate(360deg);}}
@media (max-width: 720px) { #theory-quickview-modal {padding: 0; place-items: stretch;}
    #theory-quickview-modal .tqv-dialog {width: 100%; height: 100dvh; border: 0; border-radius: 0; transform: translateY(24px);}
    #theory-quickview-modal #theory-quickview .tqv-hero {padding: calc(36px + env(safe-area-inset-top)) 22px 28px;}
    #theory-quickview-modal #theory-quickview .tqv-eyebrow {margin-right: 50px; font-size: 12px;}
    #theory-quickview-modal #theory-quickview .tqv-title {font-size: 28px; line-height: 1.28;}
    #theory-quickview-modal #theory-quickview .tqv-subtitle {font-size: 14px;}
    #theory-quickview-modal #theory-quickview .tqv-meta {margin-top: 18px;}
    #theory-quickview-modal #theory-quickview .tqv-article {padding: 32px 20px 52px; font-size: 16px; line-height: 1.82;}
    #theory-quickview-modal #theory-quickview .tqv-article h1 {margin-top: 40px !important; font-size: 22px !important;}
    #theory-quickview-modal #theory-quickview .tqv-article h2 {margin-top: 32px !important; font-size: 19px !important;}
    #theory-quickview-modal #theory-quickview .tqv-article ul, #theory-quickview-modal #theory-quickview .tqv-article ol {padding: 16px 16px 16px 38px !important; border-radius: 14px !important;}
    #theory-quickview-modal .tqv-close {top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 40px; height: 40px;}
    #theory-quickview-modal .tqv-footer {min-height: calc(72px + env(safe-area-inset-bottom)); padding: 11px 14px calc(11px + env(safe-area-inset-bottom));}
    #theory-quickview-modal .tqv-footer-btn {min-width: 86px; padding: 0 15px;}
    #theory-quickview-modal .tqv-full-link {flex: 1; padding: 0 15px;} }
@media (prefers-reduced-motion: reduce) { #theory-quickview-modal, #theory-quickview-modal .tqv-dialog, #theory-quickview-modal .tqv-progress-bar {transition: none;}
    #theory-quickview-modal .tqv-loader {animation-duration: 1.4s;} }
