/* 북퀴즈 학생 화면 — FT_lucent 레이아웃 톤 (흰 카드 · 인디고/보라 강조 · Pretendard) */
.qz {
  --qz-ac: var(--color-accent, #6366f1);
  --qz-ac2: var(--color-accent-2, #8b5cf6);
  --qz-ink: var(--text, #1f2430);
  --qz-sub: var(--text-muted, #5b6373);
  --qz-line: rgba(31, 36, 48, .08);
  --qz-soft: #f4f5fb;
  --qz-ok: #16a34a;
  --qz-ng: #dc2626;
  --qz-r: 22px;
  max-width: 1180px; margin: 0 auto; padding: 8px 0 40px; color: var(--qz-ink); box-sizing: border-box;
}
.qz *, .qz *::before, .qz *::after { box-sizing: border-box; }
.qz-card { background: #fff; border: 1px solid var(--qz-line); border-radius: var(--qz-r); box-shadow: 0 2px 12px rgba(17,24,39,.06); padding: clamp(18px, 3vw, 30px); }
.qz-card + .qz-card { margin-top: 18px; }
.qz-card-title { margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.qz-muted { color: var(--qz-sub); }
.qz-empty { text-align: center; color: var(--qz-sub); padding: 36px 10px; font-size: .95rem; }
.qz-notice { margin: 0 0 14px; padding: 10px 16px; border-radius: 12px; font-size: .9rem; background: #eef2ff; color: #4338ca; }
.qz-notice.warn { background: #fef2f2; color: var(--qz-ng); }

/* 버튼 */
.qz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: none; border-radius: 12px; font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; }
.qz-btn.primary { background: linear-gradient(135deg, var(--qz-ac), var(--qz-ac2)); color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,.28); }
.qz-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(99,102,241,.36); }
.qz-btn.ghost { background: var(--qz-soft); color: var(--qz-ink); }
.qz-btn.ghost:hover { background: #e9ebf6; }
.qz-btn.lg { min-height: 52px; padding: 0 28px; font-size: 1.05rem; border-radius: 14px; }
.qz-btn:disabled, .qz-btn.off { background: #eceef3 !important; color: #a3a9b6 !important; box-shadow: none !important; transform: none !important; cursor: default; }

/* 상단: 제목 + 학생 칩 */
.qz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.qz-head h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.qz-head .sp { flex: 1; }
.qz-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--qz-line); font-size: .9rem; }
.qz-chip b { color: var(--qz-ac); }

/* 검색 */
.qz-search { display: flex; gap: 10px; }
.qz-search .box { flex: 1; position: relative; }
.qz-search .box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--qz-sub); }
.qz-search input[type=text] { width: 100%; height: 54px; padding: 0 18px 0 48px; font: inherit; font-size: 1.05rem; border: 1px solid var(--qz-line); border-radius: 14px; background: var(--qz-soft); outline: none; }
.qz-search input[type=text]:focus { background: #fff; border-color: var(--qz-ac); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }

/* 2단 */
.qz-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: stretch; }
/* 2단 안에서는 "카드 사이 위 여백" 규칙을 끄고, 같은 줄 카드 높이를 맞춘다 */
.qz-cols > .qz-card { margin-top: 0; }
.qz-cols + .qz-card, .qz-card + .qz-cols { margin-top: 18px; }

/* 검색 결과 목록 */
.qz-list { display: flex; flex-direction: column; gap: 6px; }
.qz-item { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid transparent; border-radius: 14px; background: none; font: inherit; color: inherit; cursor: pointer; }
.qz-item:hover { background: var(--qz-soft); }
.qz-item.sel { background: #eef2ff; border-color: #c7d2fe; }
.qz-item .code { font-size: .85rem; color: var(--qz-sub); font-variant-numeric: tabular-nums; }
.qz-item .t { font-weight: 600; }
.qz-item .lv { font-size: .8rem; color: var(--qz-sub); white-space: nowrap; }
.qz-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; font-size: .9rem; color: var(--qz-sub); }
.qz-pager a, .qz-pager span.dis { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--qz-soft); color: var(--qz-ink); text-decoration: none; }
.qz-pager span.dis { opacity: .35; }

/* 도서 정보 */
.qz-book { display: flex; gap: 22px; align-items: flex-start; }
.qz-book .cover { width: 150px; flex: 0 0 150px; aspect-ratio: 3 / 4; border-radius: 12px; background: var(--qz-soft); overflow: hidden; box-shadow: 0 6px 18px rgba(17,24,39,.12); }
.qz-book .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qz-book h2 { margin: 2px 0 6px; font-size: 1.35rem; font-weight: 800; line-height: 1.3; }
.qz-book .series { font-size: .85rem; color: var(--qz-ac); font-weight: 700; }
.qz-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.qz-tag { padding: 3px 10px; border-radius: 999px; background: var(--qz-soft); font-size: .8rem; color: var(--qz-sub); }
.qz-meta { font-size: .9rem; color: var(--qz-sub); line-height: 1.8; }
.qz-summary { margin-top: 14px; font-size: .9rem; color: var(--qz-sub); line-height: 1.6; }

/* 학습 메뉴 */
.qz-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.qz-menu .qz-btn { min-height: 56px; justify-content: flex-start; padding: 0 16px; }

/* 북퀴즈 페이지 */
.qz-actions { display: flex; flex-direction: column; gap: 10px; }
.qz-actions .qz-btn { width: 100%; }
.qz-status { margin-top: 12px; font-size: .9rem; color: var(--qz-sub); text-align: center; }
.qz-status.warn { color: var(--qz-ng); }

/* 시작 안내 */
.qz-intro { text-align: center; padding: 20px 10px 6px; }
.qz-intro .badge { display: inline-flex; width: 64px; height: 64px; border-radius: 20px; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--qz-ac), var(--qz-ac2)); color: #fff; margin-bottom: 14px; }
.qz-intro h2 { margin: 0 0 6px; font-size: 1.4rem; font-weight: 800; }
.qz-intro p { margin: 0 0 6px; color: var(--qz-sub); }
.qz-intro ul { display: inline-block; text-align: left; margin: 14px 0 22px; padding-left: 18px; color: var(--qz-sub); font-size: .92rem; line-height: 1.9; }

/* 문항 */
.qz-progress { height: 8px; border-radius: 99px; background: var(--qz-soft); overflow: hidden; margin: 6px 0 18px; }
.qz-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--qz-ac), var(--qz-ac2)); transition: width .3s; }
.qz-qtop { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; color: var(--qz-sub); }
.qz-qtop b { color: var(--qz-ink); }
.qz-question { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.qz-question .q { flex: 1; font-size: 1.3rem; font-weight: 700; line-height: 1.45; }
.qz-listen { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; border: none; background: var(--qz-soft); color: var(--qz-ac); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.qz-listen:hover { background: #e9ebf6; }
.qz-choices { display: flex; flex-direction: column; gap: 10px; }
.qz-choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border: 2px solid var(--qz-line); border-radius: 14px; background: #fff; font: inherit; font-size: 1.05rem; color: inherit; cursor: pointer; transition: border-color .12s, background .12s; }
.qz-choice:hover { border-color: #c7d2fe; background: #fafbff; }
.qz-choice .n { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--qz-soft); color: var(--qz-sub); display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700; }
.qz-choice.on { border-color: var(--qz-ac); background: #eef2ff; }
.qz-choice.on .n { background: linear-gradient(135deg, var(--qz-ac), var(--qz-ac2)); color: #fff; }
.qz-qfoot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }

/* 결과 */
.qz-result { text-align: center; padding: 10px 0; }
.qz-score { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(var(--qz-ac) calc(var(--p, 0) * 1%), var(--qz-soft) 0); position: relative; margin: 6px 0 16px; }
.qz-score::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; }
.qz-score b, .qz-score span { position: relative; }
.qz-score b { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.qz-score span { font-size: .85rem; color: var(--qz-sub); }
.qz-result h3 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; }
.qz-result .sum { color: var(--qz-sub); margin-bottom: 16px; }
.qz-marks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 20px; }
.qz-mark { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.qz-mark.ok { background: #dcfce7; color: var(--qz-ok); }
.qz-mark.ng { background: #fee2e2; color: var(--qz-ng); }

/* 내 기록 */
.qz-recent-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.qz-recent-table th { text-align: left; color: var(--qz-sub); font-weight: 600; font-size: .8rem; padding: 8px 10px; border-bottom: 1px solid var(--qz-line); }
.qz-recent-table td { padding: 10px; border-bottom: 1px solid var(--qz-line); }
.qz-recent-table tr:last-child td { border-bottom: none; }
.qz-recent-table a { color: inherit; font-weight: 600; text-decoration: none; }
.qz-recent-table a:hover { color: var(--qz-ac); }
.qz-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eef2ff; color: var(--qz-ac); }
.qz-pill.prog { background: #fef3c7; color: #b45309; }

/*
 * 모바일(991px 이하): 레이아웃의 white-glass-section 과 같은 방식 (DT_lucent 에서 가져옴)
 * 배경 → 글래스 셸 → 흰 카드 3단계를 2단계로 — 셸 안쪽 여백을 없애고 카드는 투명 + 구분선.
 * 좁은 화면에서 내용 폭을 최대한 넓게 쓰기 위함.
 */
@media (max-width: 991px) {
  .lucent-content:has(.qz) { padding: 0; overflow: hidden; }
  .qz { padding: 0 0 12px; }
  .qz-head { padding: 18px 18px 0; margin-bottom: 18px; }
  .qz-cols:has(> .qz-card) { gap: 0; margin-top: 0; }
  .qz-card {
    background: transparent; border: none; box-shadow: none; border-radius: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .qz-card + .qz-card, .qz-cols > .qz-card + .qz-card,
  .qz-cols + .qz-card, .qz-card + .qz-cols, .qz-cols + .qz-cols {
    margin-top: 0; border-top: 1px solid rgba(31, 36, 48, .1);
  }
  .qz-notice { margin: 0 18px 12px; }
}

/* 휴대폰 세로: 상단 "내 포트폴리오"·"도서 검색" 버튼은 숨김 (자리가 좁아 줄이 밀림 — 메뉴로 이동) */
@media (max-width: 767px) and (orientation: portrait) {
  .qz-pf-link { display: none; }
}

/* 긴 책 제목이 칸 밖으로 밀려나지 않게 */
.qz-item .t { min-width: 0; overflow-wrap: anywhere; }

/* 휴대폰 세로: 검색창은 한 줄 전체, 검색 버튼은 다음 줄 가운데 */
@media (max-width: 600px) {
  .qz-search { flex-direction: column; align-items: center; }
  .qz-search .box { width: 100%; flex: none; }
  .qz-search .qz-btn { min-width: 160px; }
}

@media (max-width: 860px) {
  .qz-cols { grid-template-columns: 1fr; }
  .qz-book { flex-direction: column; align-items: center; text-align: center; }
  .qz-tags { justify-content: center; }
  .qz-question .q { font-size: 1.12rem; }
}

/* 풀이 중 잠금 — 글자 선택·복사 방지 (JS 에서 오른쪽 클릭·복사 이벤트도 막음) */
.qz.qz-lock .qz-view { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* 음성 재생 중 이퀄라이저 */
.qz-eq { flex: 0 0 auto; align-self: center; display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; opacity: .25; transition: opacity .2s; }
.qz-eq i { display: block; width: 4px; height: 6px; border-radius: 2px; background: linear-gradient(180deg, var(--qz-ac2), var(--qz-ac)); }
.qz-eq.on { opacity: 1; }
.qz-eq.on i { animation: qz-eq .9s ease-in-out infinite; }
.qz-eq.on i:nth-child(2) { animation-delay: -.6s; }
.qz-eq.on i:nth-child(3) { animation-delay: -.3s; }
.qz-eq.on i:nth-child(4) { animation-delay: -.75s; }
@keyframes qz-eq { 0%, 100% { height: 5px; } 50% { height: 20px; } }
@media (prefers-reduced-motion: reduce) { .qz-eq.on i { animation: none; height: 14px; } }

/* 리포트 팝업 (report.blade.php) */
body.qz-report-body { margin: 0; background: #f4f5fb; font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif; }
.qz-report { max-width: 760px; margin: 24px auto; background: #fff; border-radius: 22px; box-shadow: 0 2px 12px rgba(17,24,39,.08); padding: 32px 36px; color: #1f2430; }
.qz-report .top { display: flex; gap: 20px; align-items: center; border-bottom: 1px solid rgba(31,36,48,.08); padding-bottom: 20px; margin-bottom: 20px; }
.qz-report .top img { width: 90px; height: 120px; object-fit: cover; border-radius: 10px; background: #f4f5fb; }
.qz-report .top .series { color: #6366f1; font-size: 13px; font-weight: 700; }
.qz-report .top h1 { margin: 2px 0 6px; font-size: 22px; }
.qz-report .top .meta { color: #5b6373; font-size: 13px; line-height: 1.7; }
.qz-report .top .score { margin-left: auto; text-align: center; }
.qz-report .top .score b { display: block; font-size: 40px; color: #6366f1; line-height: 1; }
.qz-report table { width: 100%; border-collapse: collapse; font-size: 14px; }
.qz-report th { text-align: left; color: #5b6373; font-weight: 600; font-size: 12px; padding: 8px; border-bottom: 1px solid rgba(31,36,48,.08); }
.qz-report td { padding: 10px 8px; border-bottom: 1px solid rgba(31,36,48,.06); vertical-align: top; }
.qz-report .foot { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
@media print { body.qz-report-body { background: #fff; } .qz-report { box-shadow: none; margin: 0; } .qz-report .foot { display: none; } }

/* 안내 대화상자 */
.qz-dialog {
  /* 북퀴즈 영역(.qz) 밖(body)에 붙으므로 버튼 색 변수를 여기서도 정의 */
  --qz-ac: var(--color-accent, #6366f1); --qz-ac2: var(--color-accent-2, #8b5cf6); --qz-ink: #1f2430; --qz-soft: #f4f5fb;
  position: fixed; inset: 0; z-index: 9999; background: rgba(17,24,39,.4); display: flex; align-items: center; justify-content: center; padding: 16px;
  font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif;
}
.qz-dialog-box { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; box-shadow: 0 24px 60px rgba(17,24,39,.28); padding: 30px 26px 24px; text-align: center; animation: qz-pop .18s ease-out; }
.qz-dialog-box .badge { display: inline-flex; width: 60px; height: 60px; border-radius: 18px; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--qz-ac), var(--qz-ac2)); color: #fff; margin-bottom: 14px; box-shadow: 0 8px 20px rgba(99,102,241,.3); }
.qz-dialog-box p { margin: 0 0 20px; line-height: 1.6; color: var(--qz-ink); font-size: 1.05rem; font-weight: 600; word-break: keep-all; }
.qz-dialog-box .qz-btn { min-width: 140px; }
@keyframes qz-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qz-dialog-box { animation: none; } }

/* 전체화면 보기 버튼 (quiz.fullscreen.js) — 브레드크럼 줄 오른쪽 끝, 디트레이더 2.0 방식 */
.lu-fs-toggle { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; margin-left: auto; padding: 0; border: 1px solid rgba(31, 36, 48, .12); border-radius: 8px; background: #fff; color: #5b6373; cursor: pointer; }
.lu-fs-toggle:hover { color: #1f2430; border-color: #6366f1; }

/* 전체화면 학습 모드 껍데기 (quiz.fullscreen.js) — 사이트를 iframe 으로 띄워 페이지를 이동해도 전체화면 유지 */
#lu-app { position: fixed; inset: 0; z-index: 2147483000; background: #f4f5fb; }
#lu-app iframe { display: block; width: 100%; height: 100%; border: 0; }

/* 모바일 세로: 레이아웃이 브레드크럼 줄을 세로로 쌓아 전체화면 버튼이 다음 줄로 밀림 → 같은 줄 오른쪽 끝에 */
.lucent-breadcrumb-bar__inner:has(#lu-fs-toggle) { flex-direction: row !important; align-items: center !important; flex-wrap: nowrap; }
.lucent-breadcrumb-bar__inner:has(#lu-fs-toggle) .lucent-breadcrumb { flex: 1 1 auto; width: auto; min-width: 0; }

/* 버튼 글자가 두 줄로 꺾이지 않게 (모든 학습 화면 공통) — 좁은 화면에서는 큰 버튼 좌우 여백을 줄임 */
.qz-btn, .qz-dialog .qz-btn { white-space: nowrap; }
@media (max-width: 600px) {
  .qz-btn.lg { padding: 0 18px; }
  .qz-intro .qz-btn.lg, .vc-result-btns .qz-btn.lg, .qz-qfoot .qz-btn.lg { flex: 1 1 0; min-width: 0; }
}

/* 주의 안내(.qz-notice.warn)에 삼각형 느낌표 아이콘 — 아이콘 + 문장 왼쪽 정렬 */
.qz-notice.warn { display: flex; align-items: flex-start; gap: 10px; text-align: left; line-height: 1.6; }
.qz-notice.warn::before {
  content: ""; flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 휴대폰 세로: 큰 버튼 글자를 조금 작게 ("이어서 하기 (2 / 8)" 같은 긴 버튼이 칸을 넘지 않게) */
@media (max-width: 600px) {
  .qz-btn.lg { font-size: .95rem; padding: 0 12px; }
}

/* 휴대폰 세로: 북퀴즈 문제 문장은 한 줄 전체, 이퀄라이저·스피커는 다음 줄 가운데 (단어 공부와 같은 배치) */
@media (max-width: 600px) {
  .qz-question { flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 10px; }
  .qz-question .q { flex: 0 0 100%; }
}

/* 문제 문장과 이퀄라이저·스피커 버튼 세로 가운데 맞춤 (PC·가로 화면) */
.qz-question { align-items: center; }

/* 휴대폰 세로: 결과 요약의 포인트 부분은 다음 줄로 (북퀴즈·단어 공부) */
@media (max-width: 600px) {
  .qz-sum-sep { display: none; }
  .qz-sum-pts { display: block; margin-top: 2px; }
}

/* ---- 2026-11-13 모바일 일괄 점검 ---- */
/* 리포트 팝업은 .qz 밖이라 버튼 색 변수를 여기서도 정의 (없으면 인쇄 버튼 글자가 안 보임) */
.qz-report { --qz-ac: #6366f1; --qz-ac2: #8b5cf6; --qz-ink: #1f2430; --qz-soft: #f4f5fb; --qz-ok: #16a34a; --qz-ng: #dc2626; }
/* 긴 단어·제목이 칸 밖으로 넘치지 않게 */
.qz-recent-table td, .qz-report td, .qz-book h2 { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  /* 나의 퀴즈 기록: 도서번호 칸 숨기고 글자 조금 작게 */
  .qz-recent-table { font-size: .85rem; }
  .qz-recent-table th:nth-child(2), .qz-recent-table td:nth-child(2) { display: none; }
  .qz-recent-table th:first-child { width: auto !important; }
  .qz-recent-table td { padding: 10px 6px; }
  .qz-recent-table td:first-child { white-space: nowrap; }
  /* 리포트 팝업: 화면 꽉 채우고, 위쪽(표지·제목·점수)은 줄바꿈 */
  .qz-report { margin: 0; padding: 20px 16px; border-radius: 0; box-shadow: none; }
  .qz-report .top { flex-wrap: wrap; gap: 14px; }
  .qz-report .top > div:nth-child(2) { flex: 1 1 0; min-width: 0; }
  .qz-report .top .score { margin-left: 0; width: 100%; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
  .qz-report table { font-size: 13px; }
  .qz-report th, .qz-report td { padding: 8px 4px; }
}

/* 음원을 못 받아 브라우저 TTS 로 읽었을 때 듣기 버튼 오른쪽 아래 작은 t */
#qz-listen { position: relative; }
#qz-listen.is-tts::after { content: "t"; position: absolute; right: 8px; bottom: 6px; font-size: 11px; font-weight: 700; line-height: 1; color: currentColor; opacity: .8; }

/* 학습 화면 홈 버튼 (제목 왼쪽, 메인 메뉴 숨김 대신) */
.qz-home { width: 44px; padding: 0; flex: 0 0 auto; }

/* 도서검색 오른쪽 카드: [공부하기] 하나 / 도서 페이지: 단어 공부·북퀴즈·워크시트·유튜브 2x2 */
.qz-menu.qz-menu-one { grid-template-columns: 1fr; }
.qz-menu.qz-menu-one .qz-btn { justify-content: center; }
.qz-menu.qz-book-menu { margin-top: 0; }

/* 북퀴즈 안내: 문구가 단어 중간에서 끊기지 않게 */
.qz-intro ul { word-break: keep-all; }

/* 도서 페이지(공부하기) 버튼: 공부 순서대로 세 개 + 아래 유튜브·내 결과 반반 */
.qz-study-menu { display: flex; flex-direction: column; gap: 10px; }
.qz-study-menu > .qz-btn { width: 100%; justify-content: flex-start; padding: 0 22px; }
.qz-study-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz-study-sub .qz-btn { width: 100%; }

/* 책 하나 "내 결과" 팝업 */
.qz-result .qz-result-h { font-size: 1.05rem; font-weight: 800; margin: 22px 0 10px; display: flex; gap: 8px; align-items: baseline; }
.qz-result .qz-result-h .qz-muted { font-size: .85rem; font-weight: 600; }
.qz-result table { width: 100%; }
.qz-result .qz-result-step { text-align: center; font-size: .82rem; line-height: 1.5; }
.qz-result .score .qz-muted { display: block; }
.qz-result a { color: var(--qz-ac, #6366f1); font-weight: 700; text-decoration: none; }
.qz-result .qz-result-h small { font-size: .8rem; font-weight: 600; color: #5b6373; margin-left: 2px; }
/* 버튼 안 작은 보조 글씨 (예: 단어 공부(선행학습)) */
.qz-btn .qz-btn-sub { font-size: .78em; font-weight: 600; opacity: .85; margin-left: -4px; }
.qz-result .qz-result-step .qz-muted { white-space: nowrap; }
.qz-result table { table-layout: fixed; }
.qz-result .qz-result-step div { white-space: nowrap; }
/* 리포트 표: 머리글·칸 모두 가운데 정렬 */
.qz-result th, .qz-result td { text-align: center; }

/* 공부하기(도서 카드): 책 정보와 버튼 사이 구분선 — 넓은 화면은 세로선, 한 줄로 쌓이면(860px 이하) 가로선 */
#qz-view-book .qz-cols { column-gap: 0; }
#qz-view-book .qz-cols > div:first-child { padding-right: 28px; }
#qz-view-book .qz-cols > div + div { padding-left: 28px; border-left: 1px solid rgba(31,36,48,.1); }
@media (max-width: 860px) {
  #qz-view-book .qz-cols > div:first-child { padding-right: 0; }
  #qz-view-book .qz-cols > div + div { padding-left: 0; border-left: 0; border-top: 1px solid rgba(31,36,48,.1); padding-top: 18px; }
}

/* 전체화면 버튼: 제목 줄 오른쪽 끝, 홈·뒤로 버튼과 같은 모양 (44px 회색) */
.qz-head .lu-fs-toggle { width: 44px; height: 44px; margin-left: 0; border: none; border-radius: 12px; background: var(--qz-soft); color: var(--qz-ink); }
.qz-head .lu-fs-toggle:hover { background: #e9ebf6; color: var(--qz-ink); }
.qz-head .lu-fs-toggle svg { width: 20px; height: 20px; }

/* [잠시 멈춤] 확인 모달 */
.qz-dialog-box .qz-dialog-sub { margin: -8px 0 20px; color: #5b6373; font-size: .95rem; line-height: 1.6; word-break: keep-all; }
.qz-dialog-box .qz-dialog-sub b { color: #1f2430; }
.qz-dialog-box .qz-dialog-btns { display: flex; gap: 10px; justify-content: center; }
.qz-dialog-box .qz-dialog-btns .qz-btn { min-width: 130px; }
