@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

/* ═══════════════════════════════════════════════════
   quiz-theory.css — 정보처리기사 실기 이론 퀴즈
   모든 클래스는 qt- 접두사 또는 페이지별 스코프 사용
   ═══════════════════════════════════════════════════ */

/* ───────── 공통 변수 ───────── */
:root {
  --qt-bg:       #F7F5F0;
  --qt-surface:  #FFFFFF;
  --qt-border:   #E8E4DC;
  --qt-border2:  #D6D0C4;
  --qt-text:     #1C1A16;
  --qt-text2:    #6B6456;
  --qt-text3:    #A09589;
  --qt-accent:   #8B2635;
  --qt-accent-l: #F2E8EA;
  --qt-accent-m: #C4616E;
  --qt-green:    #1B7A5A;
  --qt-green-l:  #E3F4EE;
  --qt-purple:   #4A3FA0;
  --qt-purple-l: #ECEAFA;
  --qt-orange:   #C05C1A;
  --qt-orange-l: #FEF0E6;
  --qt-tag-sw:   #5B3A8C;  --qt-tag-sw-l: #EDE8F7;
  --qt-tag-db:   #1A5F9E;  --qt-tag-db-l: #E4EEF8;
  --qt-tag-os:   #2E6B3A;  --qt-tag-os-l: #E5F2E7;
  --qt-tag-net:  #915E10;  --qt-tag-net-l:#FBF0DC;
  --qt-tag-sec:  #8B2635;  --qt-tag-sec-l:#F5E8EA;
  --qt-tag-sql:  #186460;  --qt-tag-sql-l:#E3F2F1;
  --qt-tag-etc:  #4E4840;  --qt-tag-etc-l:#EFECEA;
  --qt-r:    10px;
  --qt-r-sm: 6px;
  --qt-r-md: 12px;
  --qt-r-lg: 18px;
  --qt-shadow: 0 2px 12px rgba(28,26,22,.07);
  --qt-sh-sm: 0 1px 4px rgba(0,0,0,.06);
  --qt-sh-lg: 0 12px 40px rgba(0,0,0,.12);
}

/* ───────── 공통 리셋 (qt-page 스코프) ───────── */
.qt-page { background: var(--qt-bg); min-height: 100vh; }
.qt-page * { box-sizing: border-box; }

/* ───────── Pretendard 폰트 (문제/풀이 텍스트만) ───────── */
/* 실기 이론 문제 본문 */
.qt-page .q-text,
.qt-page .q-text *,
.qt-page .qp-question,
.qt-page .qp-desc,
/* 실기 이론 정답/풀이 내용 */
.qt-page .answer-val,
.qt-page .keyword-detail,
.qt-page .keyword-detail *,
.qt-page .qp-answer-box,
.qt-page .qp-hint-box,
.qt-page .qp-hint-box *,
/* 실기 이론 변형문제 본문/정답 */
.qt-page .variant-q,
.qt-page .variant-q *,
.qt-page .variant-ans-val,
/* 실기 이론 DB 테이블 */
.qt-page table.db-table,
.qt-page table.db-table *,
/* 필기 4지선다 본문/보기/해설 */
.qt-page .qwp-stem,
.qt-page .qwp-stem *,
.qt-page .qwp-choice,
.qt-page .qwp-choice *,
.qt-page .qwp-explain,
.qt-page .qwp-explain *,
.qt-page .qwp-keyword,
.qt-page .qwp-keywords {
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", sans-serif !important;
}
/* 코드 블록은 monospace 유지 (자식 span 포함) */
.qt-page .sql-box,
.qt-page .sql-box *,
.qt-page .qp-code,
.qt-page .qp-code *,
/* 필기 코드 블록 */
.qt-page .qwp-code,
.qt-page .qwp-code * {
  font-family: 'JetBrains Mono', Consolas, 'D2Coding', 'Courier New', monospace !important;
}

/* ───────── 헤더 ───────── */
.qt-header {
  background: var(--qt-surface);
  border-bottom: 1.5px solid var(--qt-border);
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
}
.qt-header-inner {
  max-width: 880px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.qt-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700;
  color: var(--qt-text); text-decoration: none;
}
.qt-logo-badge {
  background: var(--qt-accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing:.05em;
  padding: 2px 8px; border-radius: 20px;
}
.qt-header-nav { display: flex; gap: 1.5rem; }
.qt-header-nav a {
  font-size: 13px; color: var(--qt-text2); text-decoration: none;
  transition: color .15s;
}
.qt-header-nav a:hover { color: var(--qt-accent); }

/* 서브 페이지 헤더 */
.qt-sub-header {
  width: 100%; padding: 1.1rem 1.5rem;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--qt-border);
  background: var(--qt-surface);
  position: sticky; top: 0; z-index: 10;
}
.qt-back-btn {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 13px; font-weight: 500;
  color: var(--qt-text2); padding: 6px 12px;
  border: 1px solid var(--qt-border); border-radius: 8px;
  background: var(--qt-surface); transition: all .15s; flex-shrink: 0;
}
.qt-back-btn:hover { color: var(--qt-text); border-color: #ccc; }
.qt-header-title { font-size: 15px; font-weight: 600; color: var(--qt-text); }
.qt-header-badge {
  margin-left: auto; font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: 20px;
}
.qt-header-badge-green { color: var(--qt-green); background: var(--qt-green-l); }
.qt-header-badge-purple { color: var(--qt-purple); background: var(--qt-purple-l); }

/* ───────── 메인 래퍼 ───────── */
.qt-main { max-width: 880px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.qt-main-narrow { max-width: 680px; margin: 0 auto; padding: 2.5rem 1.5rem 6rem; }

/* ───────── 히어로 ───────── */
.qt-hero {
  background: var(--qt-surface);
  border-bottom: 1.5px solid var(--qt-border);
  padding: 3rem 1.5rem 2.5rem;
}
.qt-hero-inner { max-width: 880px; margin: 0 auto; }
.qt-hero-chip {
  display: inline-block;
  background: var(--qt-accent-l); color: var(--qt-accent);
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 12px; border-radius: 20px;
  margin-bottom: 1rem;
}
.qt-hero h1 {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700; line-height: 1.35;
  margin-bottom: .6rem;
}
.qt-hero h1 em { color: var(--qt-accent); font-style: normal; }
.qt-hero-desc { font-size: 14px; color: var(--qt-text2); margin-bottom: 2rem; }

/* ───────── 통계 칩 ───────── */
.qt-stats-row { display: flex; flex-wrap: wrap; gap: 10px; }
.qt-stat-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--qt-bg); border: 1.5px solid var(--qt-border);
  border-radius: 8px; padding: 10px 18px;
}
.qt-stat-chip .num { font-size: 22px; font-weight: 700; color: var(--qt-accent); }
.qt-stat-chip .lbl { font-size: 12px; color: var(--qt-text2); line-height: 1.3; }
.qt-stat-chip .lbl span { display: block; font-size: 10px; color: var(--qt-text3); }

/* ───────── 필터 ───────── */
.qt-filter-section { margin-bottom: 1.5rem; }
.qt-filter-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--qt-text3); text-transform: uppercase; margin-bottom: .5rem;
}
.qt-filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .75rem; }
.qt-tag {
  font-size: 12px; font-weight: 500;
  padding: 5px 13px; border-radius: 20px;
  border: 1.5px solid var(--qt-border2);
  color: var(--qt-text2); background: var(--qt-surface);
  cursor: pointer; transition: all .15s; user-select: none;
}
.qt-tag:hover { border-color: var(--qt-accent-m); color: var(--qt-accent); }
.qt-tag.active {
  background: var(--qt-accent); color: #fff; border-color: var(--qt-accent);
}

/* ───────── 툴바 ───────── */
.qt-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding: 12px 16px; background: var(--qt-surface);
  border: 1.5px solid var(--qt-border); border-radius: var(--qt-r);
  margin-bottom: 1.25rem;
}
.qt-toolbar-left { font-size: 13px; color: var(--qt-text2); }
.qt-toolbar-left strong { color: var(--qt-text); font-weight: 700; }
.qt-progress-bar {
  width: 120px; height: 5px; background: var(--qt-border);
  border-radius: 3px; overflow: hidden;
  display: inline-block; vertical-align: middle; margin: 0 8px;
}
.qt-progress-fill {
  height: 100%; background: var(--qt-accent);
  border-radius: 3px; transition: width .3s; width: 0%;
}
.qt-btn-all {
  font-size: 12px; font-weight: 600;
  padding: 6px 16px; border-radius: 6px;
  border: 1.5px solid var(--qt-accent);
  color: var(--qt-accent); background: transparent;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.qt-btn-all:hover, .qt-btn-all.open { background: var(--qt-accent); color: #fff; }

/* ───────── 카드 (문제) ───────── */
.qt-card {
  background: var(--qt-surface);
  border: 1.5px solid var(--qt-border);
  border-radius: var(--qt-r);
  padding: 1.25rem 1.4rem; margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.qt-card:hover { border-color: var(--qt-border2); box-shadow: var(--qt-shadow); }
.qt-card.revealed { border-color: var(--qt-accent-m); }
.qt-card-meta {
  display: flex; align-items: center; gap: 7px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.qt-badge-year {
  font-size: 11px; font-weight: 700;
  color: var(--qt-accent); background: var(--qt-accent-l);
  border-radius: var(--qt-r-sm); padding: 2px 9px; white-space: nowrap;
}
.qt-badge-round {
  font-size: 11px; color: var(--qt-text3);
  background: var(--qt-bg); border-radius: var(--qt-r-sm);
  padding: 2px 7px; white-space: nowrap;
}
.qt-badge-cat {
  font-size: 11px; font-weight: 600;
  border-radius: var(--qt-r-sm); padding: 2px 9px; white-space: nowrap;
}
.qt-cat-sw  { color: var(--qt-tag-sw);  background: var(--qt-tag-sw-l); }
.qt-cat-db  { color: var(--qt-tag-db);  background: var(--qt-tag-db-l); }
.qt-cat-os  { color: var(--qt-tag-os);  background: var(--qt-tag-os-l); }
.qt-cat-net { color: var(--qt-tag-net); background: var(--qt-tag-net-l); }
.qt-cat-sec { color: var(--qt-tag-sec); background: var(--qt-tag-sec-l); }
.qt-cat-sql { color: var(--qt-tag-sql); background: var(--qt-tag-sql-l); }
.qt-cat-etc { color: var(--qt-tag-etc); background: var(--qt-tag-etc-l); }

/* ───────── 문제 본문 ───────── */
.qt-card .q-text { font-size: 14px; color: var(--qt-text); line-height: 1.85; }
.qt-card .sql-box {
  font-family: 'Consolas','D2Coding','Courier New',monospace;
  font-size: 12.5px; background: #F4F0EA;
  border-left: 3px solid var(--qt-accent);
  border-radius: 0 6px 6px 0; padding: 12px 16px;
  margin: 10px 0; color: var(--qt-text); white-space: pre; overflow-x: auto;
}
.qt-card .tbl-wrap { overflow-x: auto; margin: 10px 0; }
.qt-card .tables-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin: 10px 0; }
.qt-card table.db-table { border-collapse: collapse; font-size: 13px; }
.qt-card table.db-table th {
  background: var(--qt-bg); color: var(--qt-text2);
  font-weight: 600; padding: 6px 14px;
  border: 1px solid var(--qt-border2); text-align: center;
}
.qt-card table.db-table td {
  padding: 5px 14px; border: 1px solid var(--qt-border);
  text-align: center; color: var(--qt-text);
}
.qt-card table.db-table .highlight-row td { background: #FCEEF0; color: var(--qt-accent); font-weight: 600; }

/* ───────── 정답 ───────── */
.qt-answer-wrap {
  display: none; margin-top: 1rem; padding-top: 1rem;
  border-top: 1.5px dashed var(--qt-border2);
}
.qt-answer-wrap.open { display: block; }
.qt-answer-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--qt-accent); text-transform: uppercase;
  margin-bottom: 6px; display: flex; align-items: center; gap: 5px;
}
.qt-answer-label::before {
  content: ''; display: inline-block; width: 14px; height: 14px;
  background: var(--qt-accent); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: cover;
}
.qt-card .answer-val {
  font-size: 15px; font-weight: 700; color: var(--qt-accent);
  line-height: 1.75; background: var(--qt-accent-l);
  border-radius: var(--qt-r-sm); padding: 10px 14px;
}
.qt-card .keyword-detail {
  font-size: 12.5px; color: var(--qt-text2);
  margin-top: 8px; line-height: 1.8; padding: 8px 14px;
  background: var(--qt-bg); border-radius: var(--qt-r-sm);
}
.qt-toggle-hint {
  font-size: 12px; color: var(--qt-text3);
  user-select: none;
}
.qt-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* ───────── 변형 문제 ───────── */
.qt-variant-btn-wrap {
  margin-top: 14px; padding-top: 14px;
  border-top: 1.5px dashed var(--qt-border2);
}
.qt-btn-variant {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .02em;
  padding: 8px 18px; border-radius: 20px;
  border: 1.5px solid #186460; color: #186460; background: #E3F2F1;
  cursor: pointer; transition: all .18s; user-select: none;
}
.qt-btn-variant:hover { background: #186460; color: #fff; }
.qt-btn-variant .v-icon { font-size: 15px; transition: transform .2s; }
.qt-btn-variant.open .v-icon { transform: rotate(45deg); }
.qt-variant-section {
  display: none; margin-top: 12px;
  background: linear-gradient(135deg, #f0faf9 0%, #e8f7f6 100%);
  border: 1.5px solid #b2dfdb; border-radius: 10px;
  padding: 1rem 1.2rem; animation: qtFadeInV .25s ease;
}
.qt-variant-section.open { display: block; }
@keyframes qtFadeInV {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.qt-variant-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.qt-variant-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  background: #186460; color: #fff; padding: 2px 9px; border-radius: 20px;
}
.qt-variant-title { font-size: 12px; color: #186460; font-weight: 600; }
.qt-variant-q,
.variant-q { font-size: 14px; color: var(--qt-text); line-height: 1.85; margin-bottom: 10px; }
.qt-variant-ans-wrap {
  display: none; margin-top: 10px; padding-top: 10px;
  border-top: 1.5px dashed #b2dfdb;
}
.qt-variant-ans-wrap.open { display: block; }
.qt-variant-ans-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: #186460; text-transform: uppercase; margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
}
.qt-variant-ans-label::before {
  content: ''; display: inline-block; width: 14px; height: 14px;
  background: #186460; border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: cover;
}
.qt-card .variant-ans-val {
  font-size: 14px; font-weight: 700; color: #186460;
  background: #c8eeec; border-radius: 6px;
  padding: 9px 13px; margin-bottom: 7px; line-height: 1.65;
}
.qt-card .variant-keyword {
  font-size: 12px; color: var(--qt-text2);
  background: #f5fcfb; border-radius: 6px;
  padding: 8px 12px; line-height: 1.75;
}
.qt-btn-variant-ans {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 11.5px; font-weight: 600;
  padding: 5px 14px; border-radius: 16px;
  border: 1.5px solid #186460; color: #186460; background: transparent;
  cursor: pointer; transition: all .15s;
}
.qt-btn-variant-ans:hover { background: #186460; color: #fff; }

/* ───────── 빈 상태 ───────── */
.qt-empty { text-align: center; padding: 4rem 0; color: var(--qt-text3); font-size: 14px; }
.qt-empty-icon { font-size: 40px; margin-bottom: 10px; }

/* ───────── 푸터 ───────── */
.qt-footer {
  text-align: center; padding: 2rem 1rem;
  font-size: 12px; color: var(--qt-text3);
  border-top: 1px solid var(--qt-border);
}
.qt-footer a { color: var(--qt-accent); text-decoration: none; }

/* ═══════════════════════════════════════════════════
   인덱스 페이지 전용
   ═══════════════════════════════════════════════════ */
.qt-idx-back {
  display: inline-block; margin-bottom: 1.5rem;
  color: var(--qt-text3); font-size: 13px; text-decoration: none;
}
.qt-idx-back:hover { color: var(--qt-accent); }
.qt-idx-hero {
  text-align: center; margin-bottom: 3.5rem;
  animation: qtFadeUp .6s ease both;
}
.qt-idx-hero-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--qt-green); background: var(--qt-green-l);
  padding: 5px 14px; border-radius: 20px; margin-bottom: 1.2rem;
}
.qt-idx-hero h1 {
  font-size: clamp(26px,5vw,36px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.3; margin-bottom: .9rem;
}
.qt-idx-hero h1 em { color: var(--qt-green); font-style: normal; }
.qt-idx-hero p { font-size: 15px; color: var(--qt-text2); line-height: 1.75; }
.qt-idx-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 2.5rem;
  animation: qtFadeUp .6s .1s ease both;
}
.qt-idx-stat {
  background: var(--qt-surface); border: 1px solid var(--qt-border);
  border-radius: var(--qt-r-md); padding: 1.1rem 1rem; text-align: center;
}
.qt-idx-stat-num {
  font-size: 26px; font-weight: 700; color: var(--qt-text);
  letter-spacing: -.03em; line-height: 1;
}
.qt-idx-stat-num sub { font-size: 14px; font-weight: 500; vertical-align: baseline; }
.qt-idx-stat-label { font-size: 11px; color: var(--qt-text3); margin-top: 5px; font-weight: 500; }
.qt-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--qt-text3); margin-bottom: 1rem;
}
.qt-main-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 2rem;
}
.qt-main-card {
  background: var(--qt-surface); border: 1px solid var(--qt-border);
  border-radius: 20px; padding: 2rem 1.6rem 1.8rem;
  cursor: pointer; text-decoration: none;
  display: flex; flex-direction: column; gap: 14px;
  transition: all .2s ease; position: relative; overflow: hidden;
  box-shadow: var(--qt-sh-sm);
}
.qt-main-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 3px 3px 0 0; opacity: 0; transition: opacity .2s;
}
.qt-main-card:hover {
  box-shadow: var(--qt-sh-lg); transform: translateY(-3px); border-color: transparent;
}
.qt-main-card:hover::before { opacity: 1; }
.qt-card-round { animation: qtFadeUp .6s .15s ease both; }
.qt-card-round::before { background: var(--qt-green); }
.qt-card-round:hover { border-color: var(--qt-green-l); }
.qt-card-keyword { animation: qtFadeUp .6s .22s ease both; }
.qt-card-keyword::before { background: var(--qt-purple); }
.qt-card-keyword:hover { border-color: var(--qt-purple-l); }
.qt-card-variant { animation: qtFadeUp .6s .29s ease both; }
.qt-card-variant::before { background: var(--qt-orange); }
.qt-card-variant:hover { border-color: var(--qt-orange-l); }
.qt-card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.qt-card-round   .qt-card-icon { background: var(--qt-green-l); }
.qt-card-keyword .qt-card-icon { background: var(--qt-purple-l); }
.qt-card-variant .qt-card-icon { background: var(--qt-orange-l); }
.qt-card-body { flex: 1; }
.qt-card-title {
  font-size: 16px; font-weight: 700; color: var(--qt-text);
  letter-spacing: -.02em; margin-bottom: 6px; line-height: 1.4;
}
.qt-card-desc { font-size: 12px; color: var(--qt-text2); line-height: 1.6; }
.qt-card-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.qt-chip { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.qt-chip-g { background: var(--qt-green-l); color: var(--qt-green); }
.qt-chip-p { background: var(--qt-purple-l); color: var(--qt-purple); }
.qt-chip-o { background: var(--qt-orange-l); color: var(--qt-orange); }
.qt-card-arrow {
  align-self: flex-end; font-size: 18px; color: var(--qt-text3);
  transition: transform .2s, color .2s;
}
.qt-main-card:hover .qt-card-arrow { transform: translate(3px,-3px); }
.qt-card-round:hover   .qt-card-arrow { color: var(--qt-green); }
.qt-card-keyword:hover .qt-card-arrow { color: var(--qt-purple); }
.qt-card-variant:hover .qt-card-arrow { color: var(--qt-orange); }
.qt-notice {
  background: var(--qt-surface); border: 1px solid var(--qt-border);
  border-radius: var(--qt-r-md); padding: 1.1rem 1.4rem;
  display: flex; gap: 12px; align-items: flex-start;
  animation: qtFadeUp .6s .36s ease both;
}
.qt-notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.qt-notice-text { font-size: 12px; color: var(--qt-text2); line-height: 1.65; }
.qt-notice-text strong { color: var(--qt-text); font-weight: 600; }

/* ───────── PDF 버튼 ───────── */
.qt-pdf-btn-wrap {
  display: flex; justify-content: center; margin-bottom: 2rem;
  animation: qtFadeUp .6s .12s ease both;
}
.qt-pdf-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; border-radius: 50px;
  background: linear-gradient(135deg,#1B7A5A 0%,#145C43 100%);
  color: #fff; font-size: 15px; font-weight: 700; text-decoration: none;
  letter-spacing: -.02em;
  box-shadow: 0 4px 18px rgba(27,122,90,.38);
  transition: all .22s ease; white-space: nowrap;
}
.qt-pdf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(27,122,90,.50);
  filter: brightness(1.07);
}
.qt-pdf-btn-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════
   회차별 페이지
   ═══════════════════════════════════════════════════ */
.qt-page-hero { margin-bottom: 2rem; animation: qtFadeUp .5s ease both; }
.qt-page-hero h1 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 5px; }
.qt-page-hero p { font-size: 13px; color: var(--qt-text2); }
.qt-year-group { margin-bottom: 2rem; animation: qtFadeUp .5s ease both; }
.qt-year-label {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--qt-text3); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.qt-year-label::after { content: ''; flex: 1; height: 1px; background: var(--qt-border); }
.qt-rounds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.qt-round-card {
  background: var(--qt-surface); border: 1px solid var(--qt-border);
  border-radius: var(--qt-r-md); padding: 1.2rem 1.1rem 1rem;
  text-decoration: none; display: flex; flex-direction: column; gap: 8px;
  transition: all .18s ease; position: relative; overflow: hidden;
  box-shadow: var(--qt-sh-sm); cursor: pointer;
}
.qt-round-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--qt-green);
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.qt-round-card:hover { border-color: var(--qt-green-l); box-shadow: 0 4px 20px rgba(0,0,0,.09); transform: translateY(-2px); }
.qt-round-card:hover::after { transform: scaleX(1); }
.qt-round-badge {
  font-size: 10px; font-weight: 600; color: var(--qt-green);
  background: var(--qt-green-l); padding: 2px 8px; border-radius: 6px;
  display: inline-block; width: fit-content;
}
.qt-round-title { font-size: 14px; font-weight: 700; color: var(--qt-text); letter-spacing: -.02em; line-height: 1.3; }
.qt-round-count { font-size: 11px; font-weight: 600; color: var(--qt-text2); display: flex; align-items: center; gap: 4px; }
.qt-round-arrow {
  position: absolute; bottom: 12px; right: 14px;
  font-size: 14px; color: var(--qt-text3);
  transition: transform .18s, color .18s;
}
.qt-round-card:hover .qt-round-arrow { transform: translate(2px,-2px); color: var(--qt-green); }

/* ═══════════════════════════════════════════════════
   카테고리별 페이지
   ═══════════════════════════════════════════════════ */
.qt-total-bar {
  background: var(--qt-surface); border: 1px solid var(--qt-border);
  border-radius: var(--qt-r-md); padding: 1rem 1.3rem; margin-bottom: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  animation: qtFadeUp .5s .05s ease both;
}
.qt-total-bar-label { font-size: 12px; color: var(--qt-text2); font-weight: 500; }
.qt-total-bar-val { font-size: 13px; font-weight: 700; color: var(--qt-text); }
.qt-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qt-cat-card {
  background: var(--qt-surface); border: 1px solid var(--qt-border);
  border-radius: var(--qt-r-lg); padding: 1.5rem 1.4rem 1.3rem;
  text-decoration: none; display: flex; flex-direction: column; gap: 10px;
  transition: all .2s ease; position: relative; overflow: hidden;
  box-shadow: var(--qt-sh-sm); cursor: pointer;
}
.qt-cat-card:hover { box-shadow: var(--qt-sh-lg); transform: translateY(-3px); }
.qt-cat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--c, #888);
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.qt-cat-card:hover::before { transform: scaleX(1); }
.qt-cat-card:hover { border-color: var(--cl, #eee); }
.qt-cat-emoji { font-size: 28px; line-height: 1; }
.qt-cat-name { font-size: 15px; font-weight: 700; color: var(--qt-text); letter-spacing: -.02em; }
.qt-cat-stats { display: flex; flex-direction: column; gap: 4px; }
.qt-cat-stat-row { display: flex; align-items: center; justify-content: space-between; }
.qt-cat-stat-label { font-size: 11px; color: var(--qt-text3); }
.qt-cat-stat-val { font-size: 12px; font-weight: 600; color: var(--c, #888); }
.qt-cat-progress-wrap { height: 5px; background: var(--qt-border); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.qt-cat-progress-bar { height: 100%; background: var(--c, #888); border-radius: 3px; transition: width .6s ease; }
.qt-cat-arrow {
  position: absolute; bottom: 14px; right: 16px;
  font-size: 16px; color: var(--qt-text3);
  transition: transform .2s, color .2s;
}
.qt-cat-card:hover .qt-cat-arrow { transform: translate(2px,-2px); color: var(--c, #888); }
.qt-cat-card.wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 20px; padding: 1.3rem 1.6rem; }
.qt-cat-card.wide .qt-cat-stats { flex: 1; }

/* ═══════════════════════════════════════════════════
   랜덤 퀴즈 페이지
   ═══════════════════════════════════════════════════ */
.qt-ctrl-panel {
  background: var(--qt-surface); border: 1.5px solid var(--qt-border);
  border-radius: var(--qt-r); padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem; display: flex; flex-wrap: wrap;
  gap: 1rem; align-items: flex-end; box-shadow: var(--qt-shadow);
}
.qt-ctrl-group { display: flex; flex-direction: column; gap: 6px; }
.qt-ctrl-label {
  font-size: 11px; font-weight: 700; color: var(--qt-text3);
  letter-spacing: .08em; text-transform: uppercase;
}
.qt-ctrl-sep { width: 1px; background: var(--qt-border); align-self: stretch; }
.qt-variant-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.qt-variant-toggle input { display: none; }
.qt-toggle-track {
  width: 40px; height: 22px; background: var(--qt-border2);
  border-radius: 11px; position: relative; transition: background .2s; flex-shrink: 0;
}
.qt-toggle-track::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; top: 3px; left: 3px;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.qt-variant-toggle input:checked + .qt-toggle-track { background: var(--qt-accent); }
.qt-variant-toggle input:checked + .qt-toggle-track::after { transform: translateX(18px); }
.qt-toggle-text { font-size: 13px; font-weight: 500; color: var(--qt-text2); }
.qt-progress-bar-wrap {
  background: var(--qt-surface); border: 1.5px solid var(--qt-border);
  border-radius: var(--qt-r); padding: 1rem 1.5rem;
  margin-bottom: 1.5rem; box-shadow: var(--qt-shadow);
}
.qt-progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.qt-progress-label { font-size: 13px; font-weight: 600; color: var(--qt-text2); }
.qt-progress-count { font-size: 20px; font-weight: 700; color: var(--qt-accent); }
.qt-progress-count span { font-size: 13px; font-weight: 400; color: var(--qt-text3); }
.qt-progress-track { height: 6px; background: var(--qt-border); border-radius: 3px; overflow: hidden; }
.qt-stat-badge {
  font-size: 11px; font-weight: 600; color: var(--qt-text2);
  background: var(--qt-bg); padding: 3px 10px; border-radius: 10px;
}
/* 랜덤 퀴즈 카드 */
.qt-quiz-card {
  background: var(--qt-surface); border: 1.5px solid var(--qt-border);
  border-radius: var(--qt-r); box-shadow: var(--qt-shadow);
  overflow: hidden; transition: box-shadow .2s;
}
.qt-quiz-card:hover { box-shadow: 0 4px 24px rgba(28,26,22,.11); }
.qt-quiz-card .qt-card-meta { padding: 12px 1.5rem 0; }
.qt-quiz-card .qt-card-body { padding: 1rem 1.5rem; }
.qt-quiz-card .qt-card-actions { display: flex; gap: 8px; padding: 0 1.5rem 1rem; flex-wrap: wrap; }
.qt-btn-reveal {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--qwp-confirm-accent, #0F766E);
  border: 1px solid var(--qwp-confirm-accent, #0F766E);
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: opacity .15s, transform .15s, box-shadow .15s;
}
.qt-btn-reveal:hover, .qt-btn-reveal.revealed {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15,118,110,.18);
  background: var(--qwp-confirm-accent, #0F766E);
  color: #fff;
}
.qt-btn-next {
  padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--qt-border2); color: var(--qt-text2);
  background: transparent; cursor: pointer; transition: all .15s;
}
.qt-btn-next:hover { border-color: var(--qt-text2); color: var(--qt-text); }
.qt-btn-skip {
  padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 500;
  border: none; color: var(--qt-text3); background: transparent;
  cursor: pointer; transition: color .15s;
}
.qt-btn-skip:hover { color: var(--qt-text2); }
.qt-ans-wrap { display: none; padding: 1rem 1.5rem; border-top: 1.5px dashed var(--qt-border2); }
.qt-ans-wrap.open { display: block; }
.qt-variant-badge-sm {
  font-size: 10px; font-weight: 700; color: #186460;
  background: #E3F2F1; padding: 2px 8px; border-radius: 10px;
}
.qt-done-card {
  display: none; text-align: center;
  background: var(--qt-surface); border: 1.5px solid var(--qt-border);
  border-radius: var(--qt-r); padding: 3rem 2rem;
  box-shadow: var(--qt-shadow);
}
.qt-done-card.show { display: block; }
.qt-done-emoji { font-size: 48px; margin-bottom: 12px; }
.qt-done-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.qt-done-desc { font-size: 14px; color: var(--qt-text2); margin-bottom: 1.5rem; }
.qt-btn-restart {
  padding: 10px 28px; border-radius: 8px; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--qt-accent); color: #fff; background: var(--qt-accent);
  cursor: pointer; transition: all .15s;
}
.qt-btn-restart:hover { filter: brightness(1.1); }
.qt-empty-msg {
  display: none; text-align: center; padding: 3rem 1rem;
  font-size: 14px; color: var(--qt-text3);
}
.qt-empty-msg.show { display: block; }
.qt-cat-tag {
  display: inline-block; padding: 2px 9px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
}

/* ───────── 공통 애니메이션 ───────── */
@keyframes qtFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ───────── 반응형 ───────── */
@media (max-width: 600px) {
  .qt-stats-row { gap: 8px; }
  .qt-stat-chip { padding: 8px 14px; }
  .qt-stat-chip .num { font-size: 18px; }
  .qt-toolbar { flex-direction: column; align-items: flex-start; }
  .qt-header-nav { gap: 0.7rem; flex-wrap: wrap; }
  .qt-header-nav a { font-size: 12px; }
}
@media (max-width: 720px) {
  .qt-main-cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .qt-idx-stats { gap: 8px; }
  .qt-idx-stat-num { font-size: 22px; }
  .qt-rounds-grid { grid-template-columns: repeat(2, 1fr); }
  .qt-cat-grid { grid-template-columns: 1fr; }
  .qt-cat-card.wide { grid-column: span 1; flex-direction: column; }
}

/* ───────── 공통 코드 블록 + syntax highlight ───────── */
.qp-code-wrap {
  margin: 10px 0 0;
  border-radius: 8px;
  background: #1e1e2e;
  overflow-x: auto;
  position: relative;
}
.qp-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #cdd6f4;
  padding: 14px 16px;
  white-space: pre;
  display: block;
  tab-size: 4;
}
.qp-code-lang-label {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  color: #6c7086;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hl-kw { color: #cba6f7; font-weight: 600; }
.hl-fn { color: #89b4fa; font-weight: 600; }
.hl-bi { color: #89b4fa; }
.hl-st { color: #a6e3a1; }
.hl-nu { color: #fab387; }
.hl-cm { color: #6c7086; font-style: italic; }
.hl-op { color: #89dceb; }
.hl-type { color: #f9e2af; }
.hl-pre { color: #cba6f7; }
.hl-anno { color: #f9e2af; font-style: italic; }
.hl-se { color: #f38ba8; font-style: italic; }
.hl-cl { color: #f9e2af; font-weight: 600; }

/* 카카오 신고 블록 스타일은 quiz-kakao.css로 이전됨 */
