/* ============================================================
   kids-reader.css — 달빛 서재 (Moonlit Library)
   미취학~초1 동화 리더. 밤/낮 두 모드, 곰돌이 루나 마스코트.
   채도 절제·단일 호박 강조·톤온톤 프리미엄. 유치함 금지.
   본문 순검정(#000/#1a1a1a) 금지 — ink/ink-mid/ink-muted 위계.
   ============================================================ */

/* ---- 토큰: 기본 = 밤모드 ---- */
:root,
:root[data-mode="night"] {
  --bg:            #1C1B2E;
  --bg-2:          #221F36;
  --surface:       #252438;
  --card-bg:       #2E2C45;
  --card-border:   #3D3A5C;
  --primary:       #F5A623;
  --primary-700:   #E0902A;
  --accent:        #E07B39;
  --ink:           #F0EDE6;
  --ink-mid:       #A09CBF;
  --ink-muted:     #6E6A86;
  --card-title:    #FFF8EC;
  --star:          #FFD166;
  --moon-cream:    #FFF8EC;
  --success:       #5DCEA0;
  --error:         #F26C6C;
  --hl-word:       #FFD166;
  --hl-sent:       rgba(245,166,35,0.16);
  --word-shadow:   0 0 12px rgba(255,209,102,0.55);
  --card-shadow:   0 14px 38px rgba(0,0,0,0.45);
  --card-shadow-sm:0 8px 22px rgba(0,0,0,0.38);
  --scrim:         rgba(20,19,34,0.86);
  --hero-glow:     radial-gradient(ellipse 60% 80% at 78% -10%, rgba(245,166,35,0.20) 0%, transparent 62%);
  /* 루나 곰돌이 — 따뜻한 플러시 마스코트(글로시 눈·머즐·볼터치) */
  --mate-body:     #9B6B4A;
  --mate-body-dark:#7A4F36;
  --mate-muzzle:   #E7CDAE;
  --mate-belly:    #EAD3B8;
  --mate-inner:    #E7CDAE;
  --mate-nose:     #3F2A1E;
  --mate-eye:      #2E1E14;
  --mate-blush:    rgba(232,138,116,0.55);
  --mate-book:     var(--primary);
  --mate-book-page:#FFF3DC;
  --mate-moon:     var(--primary);
}

:root[data-mode="day"] {
  --bg:            #FAF8F4;
  --bg-2:          #F4F0E8;
  --surface:       #FFFFFF;
  --card-bg:       #FFFFFF;
  --card-border:   #ECE7DF;
  --primary:       #E8924A;
  --primary-700:   #D77E33;
  --accent:        #6B8FAB;
  --ink:           #3A3530;
  --ink-mid:       #7A746E;
  --ink-muted:     #B0A89E;
  --card-title:    #3A3530;
  --star:          #F2C94C;
  --moon-cream:    #463F38;
  --success:       #5FA985;
  --error:         #D97B6C;
  --hl-word:       #D77E33;
  --hl-sent:       rgba(232,146,74,0.16);
  --word-shadow:   0 0 10px rgba(232,146,74,0.35);
  --card-shadow:   0 14px 38px rgba(120,90,50,0.14);
  --card-shadow-sm:0 8px 22px rgba(120,90,50,0.10);
  --scrim:         rgba(58,53,48,0.55);
  --hero-glow:     radial-gradient(ellipse 60% 80% at 78% -10%, rgba(232,146,74,0.18) 0%, transparent 62%);
  --mate-body:     #9B6B4A;
  --mate-body-dark:#7A4F36;
  --mate-muzzle:   #EAD3B8;
  --mate-belly:    #F0DCC4;
  --mate-inner:    #EAD3B8;
  --mate-nose:     #3F2A1E;
  --mate-eye:      #2E1E14;
  --mate-blush:    rgba(232,138,116,0.50);
  --mate-book:     var(--primary);
  --mate-book-page:#FFF3DC;
  --mate-moon:     var(--primary);
}

/* ---- 전역 폰트 강제: 프리텐다드(Pretendard) 완벽 통일 ---- */
html, body, .kids-page,
button, input, select, textarea,
nav, header, section, article, div, p, span, a, h1, h2, h3, h4, strong,
.kids-page * {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif !important;
}

.kids-page {
  color: var(--ink);
  background:
    var(--hero-glow),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 65px !important;
  transition: background-color .4s ease, color .4s ease;
}
.kids-page * { transition-property: background-color, border-color, color, box-shadow; transition-duration: .3s; }
.word-keep { word-break: keep-all; word-wrap: break-word; }
.kids-wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---- 헤더 / 히어로 ---- */
.kids-hero { padding: 30px 0 8px; position: relative; }
.kids-hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.kids-back {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink); text-decoration: none;
  font-size: 0.88rem; font-weight: 800;
}
.kids-back:hover { color: var(--primary); }
.kids-back i { line-height: 1; font-size: 1.05em; color: var(--primary); }

.mode-toggle {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: 999px; color: var(--ink);
  font-size: 0.86rem; font-weight: 800; cursor: pointer;
}
.mode-toggle:hover { color: var(--primary); border-color: var(--primary); }
.mode-toggle i { font-size: 1.1em; line-height: 1; color: var(--primary); }

.kids-hero h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 900; letter-spacing: -0.035em; line-height: 1.18;
  margin: 0; color: var(--ink);
}
.kids-hero h1 .gold { color: var(--primary); }
.kids-hero .sub { margin: 10px 0 0; font-size: 0.98rem; color: var(--ink-mid); line-height: 1.6; }
.kids-hero .sub strong { color: var(--primary); }

/* ---- 도장판 (연속 출석 7칸) ---- */
.streak-board {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 22px 0 4px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: 18px; box-shadow: var(--card-shadow-sm);
}
.streak-info { display: flex; flex-direction: column; gap: 2px; }
.streak-info .n { font-size: 1.45rem; font-weight: 900; color: var(--primary); line-height: 1; }
.streak-info .n small { font-size: 0.8rem; font-weight: 800; color: var(--ink-mid); margin-left: 2px; }
.streak-info .lbl { font-size: 0.78rem; font-weight: 700; color: var(--ink-mid); }
.streak-cells { display: flex; gap: 10px; margin-left: auto; }
.stamp {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--card-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: 1.15rem;
  background: transparent;
}
.stamp .dow { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 0.62rem; font-weight: 700; color: var(--ink-muted); }
.stamp.filled {
  background: var(--star); border-color: var(--star); color: var(--bg);
}
.stamp.today { box-shadow: 0 0 0 3px var(--bg), 0 0 12px var(--primary); border-color: var(--primary); }
.stamp.filled.today { box-shadow: 0 0 0 3px var(--bg), 0 0 14px var(--star); }
.stamp.pop { animation: stampPop .42s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes stampPop { 0%{transform:scale(0)} 60%{transform:scale(1.2)} 100%{transform:scale(1)} }
.streak-cells.celebrate .stamp { animation: stampGlow 1.4s ease-in-out; }
.streak-cells.celebrate .stamp:nth-child(2){animation-delay:.1s}
.streak-cells.celebrate .stamp:nth-child(3){animation-delay:.2s}
.streak-cells.celebrate .stamp:nth-child(4){animation-delay:.3s}
.streak-cells.celebrate .stamp:nth-child(5){animation-delay:.4s}
.streak-cells.celebrate .stamp:nth-child(6){animation-delay:.5s}
.streak-cells.celebrate .stamp:nth-child(7){animation-delay:.6s}
@keyframes stampGlow { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 16px var(--star)} }

/* ============================================================
   라이브러리 화면 — 표지 카드 그리드
   ============================================================ */
.lib-head {
  display: flex; align-items: baseline; gap: 12px;
  margin: 30px 0 16px;
}
.lib-head h2 { margin: 0; font-size: 1.18rem; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.lib-head h2 i { color: var(--primary); margin-right: 6px; }
.lib-head .count { font-size: 0.82rem; font-weight: 800; color: var(--primary); }
.lib-head .legend { margin-left: auto; display: flex; gap: 14px; font-size: 0.74rem; font-weight: 700; color: var(--ink-mid); }
.lib-head .legend span { display: inline-flex; align-items: center; gap: 5px; }
.lib-head .legend i { font-size: 0.95em; }
.lib-head .legend .ic-done { color: var(--star); }
.lib-head .legend .ic-reading { color: var(--primary); }
.lib-head .legend .ic-new { color: var(--ink-muted); }

.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 20px;
}

.cover-card {
  position: relative;
  border-radius: 16px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow-sm);
  cursor: pointer;
  display: flex; flex-direction: column;
  text-align: left;
  font-family: inherit;
  transition: transform .2s cubic-bezier(0.16,1,0.3,1), box-shadow .2s, border-color .2s;
}
.cover-card:hover { transform: translateY(-5px); box-shadow: var(--card-shadow); border-color: var(--primary); }
.cover-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.cover-card:active { transform: translateY(-2px) scale(0.99); }

/* 상단 삽화 영역 (삽화 없으면 serif 이니셜) */
.cc-art {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, var(--card-bg) 0%, var(--bg) 130%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.cc-art .initial {
  font-family: 'Pretendard', sans-serif;
  font-size: 5.4rem; font-weight: 800; line-height: 1;
  color: rgba(240,237,230,0.085);
  user-select: none;
}
:root[data-mode="day"] .cc-art .initial { color: rgba(58,53,48,0.08); }
.cc-art::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.18));
}
:root[data-mode="day"] .cc-art::after { background: linear-gradient(180deg, transparent, rgba(120,90,50,0.06)); }

/* 진행바 (읽는 중) */
.cc-progress {
  position: absolute; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--primary);
  transition: width .5s ease-out;
}
.cover-card.is-done .cc-progress { background: var(--star); box-shadow: 0 0 6px var(--star); width: 100% !important; }

/* 상태 배지 */
.cc-badge {
  position: absolute; top: 8px; right: 9px;
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.92rem; color: var(--ink-muted);
  background: var(--scrim); backdrop-filter: blur(3px);
}
.cover-card.is-reading .cc-badge { color: var(--primary); }
.cover-card.is-done .cc-badge { color: var(--star); }

/* 완독 리본 */
.cc-ribbon {
  position: absolute; top: 8px; left: 8px;
  display: none; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--star); color: var(--bg);
  font-size: 0.68rem; font-weight: 900; letter-spacing: -0.01em;
}
.cover-card.is-done .cc-ribbon { display: inline-flex; }
.cover-card.is-done { border-color: var(--star); }

/* 하단 정보 */
.cc-info { padding: 11px 13px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-title {
  font-size: 0.9rem; font-weight: 700; color: var(--card-title);
  line-height: 1.38; letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  min-height: 2.5em;
}
.cc-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.cc-no { font-size: 0.72rem; font-weight: 800; color: var(--ink-muted); }
.cc-stars { display: inline-flex; gap: 2px; margin-left: auto; }
.cc-stars i { font-size: 0.74rem; color: var(--ink-muted); }
.cc-stars i.on { color: var(--star); }

/* 페이지네이션 */
.kids-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 28px 0 8px; }
.kids-pg {
  min-width: 38px; height: 38px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--card-border); border-radius: 11px; background: var(--surface);
  color: var(--ink-mid); font-size: 0.86rem; font-weight: 800; line-height: 1;
  cursor: pointer;
}
.kids-pg:hover { border-color: var(--primary); color: var(--ink); }
.kids-pg.active { background: var(--primary); border-color: var(--primary); color: var(--bg); }
.kids-pg:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.kids-pg[disabled] { opacity: .38; cursor: default; }
.kids-pg.nav i { line-height: 1; }

/* ============================================================
   리더 화면
   ============================================================ */
.screen { display: none; }
.screen.active { display: block; animation: screenIn .3s ease-out; }
@keyframes screenIn { from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none} }

.reader-top { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; }
.reader-top .back-lib {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 18px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--card-border);
  color: var(--ink); font-size: 0.9rem; font-weight: 800; cursor: pointer;
}
.reader-top .back-lib:hover { border-color: var(--primary); }
.reader-top .back-lib:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.reader-top .rt-no { margin-left: auto; font-size: 0.82rem; font-weight: 800; color: var(--ink-muted); }

/* 컨트롤 바 */
.control-bar {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: 18px; box-shadow: var(--card-shadow-sm);
  padding: 16px 18px; margin-bottom: 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px;
}
.ctrl-field { display: flex; align-items: center; gap: 8px; }
.ctrl-field > label { font-size: 0.82rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.ctrl-field select {
  height: 42px; padding: 0 34px 0 14px;
  border: 1.5px solid var(--card-border); border-radius: 11px;
  font-family: inherit; font-size: 0.9rem; font-weight: 700; color: var(--ink);
  background-color: var(--card-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23F5A623' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  -webkit-appearance: none; appearance: none; outline: none; cursor: pointer;
}
.ctrl-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--hl-sent); }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }

/* 버튼 (아이콘·글씨 세로 정확 중앙) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 13px;
  font-family: inherit; font-size: 0.96rem; font-weight: 800; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .1s, box-shadow .15s, background .15s, border-color .15s, color .15s;
}
.btn > i { font-size: 1.18em; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn-play { background: var(--primary); color: #1c1b2e; font-weight: 900; box-shadow: 0 8px 18px -8px var(--primary); }
.btn-play:hover { background: var(--primary-700); }
.btn-stop { background: var(--error); color: #fff; font-weight: 900; }
.btn-stop:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--card-bg); color: var(--ink); border-color: var(--card-border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-bgm { background: var(--card-bg); color: var(--ink); border-color: var(--card-border); height: 42px; padding: 0 15px; font-size: 0.86rem; font-weight: 800; }
.btn-bgm:hover { border-color: var(--primary); color: var(--primary); }
.btn-bgm.on { color: var(--primary); border-color: var(--primary); }

.loading-inline { display: none; align-items: center; gap: 7px; color: var(--ink-mid); font-size: 0.84rem; font-weight: 700; }
.loading-inline.show { display: inline-flex; }
.loading-inline .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: rdPulse 1.2s ease-in-out infinite; }
.loading-inline .dot:nth-child(2){ animation-delay:.15s } .loading-inline .dot:nth-child(3){ animation-delay:.3s }
@keyframes rdPulse { 0%,80%,100%{opacity:.3;transform:scale(.8)} 40%{opacity:1;transform:scale(1.1)} }

/* 동화 카드 */
.story-card {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: 26px; box-shadow: var(--card-shadow);
  padding: 42px 48px;
}
.story-card .st-title {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 900; letter-spacing: -0.025em; color: var(--ink);
  margin: 0 0 24px; padding-bottom: 18px; border-bottom: 2px dashed var(--card-border);
}
#story-content { font-size: clamp(1.32rem, 1.9vw, 1.6rem); line-height: 1.85; color: var(--ink); letter-spacing: -0.01em; font-weight: 500; }

/* 문장 단위 */
.sentence {
  display: block; cursor: pointer;
  padding: 12px 16px; margin: 0 -6px 10px;
  border-radius: 14px; border: 1px solid transparent;
}
.sentence:hover { background: var(--hl-sent); }
.sentence:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sentence.sent-active { background: var(--hl-sent); border-color: var(--card-border); }
/* 낱말(카라오케) */
.kw { transition: color .08s ease-out, text-shadow .08s; }
.kw.word-active { color: var(--hl-word); font-weight: 800; text-shadow: var(--word-shadow); }

/* 낱말 공부 칩 모드 */
.word {
  display: inline-block; margin: 6px 5px; padding: 11px 18px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 13px; font-weight: 700; color: var(--ink);
  font-size: clamp(1.18rem, 1.7vw, 1.42rem); cursor: pointer;
}
.word:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.word:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.word.active { background: var(--primary); color: var(--bg); border-color: var(--primary); }

/* 다 읽었어요 행 */
.finish-row { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--card-border); display: flex; justify-content: center; }
.btn-finish {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 52px; padding: 0 30px; border: none; border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--bg); font-family: inherit; font-size: 1.02rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 10px 24px -10px var(--primary);
}
:root[data-mode="day"] .btn-finish { color: #fff; }
.btn-finish:hover { filter: brightness(1.05); transform: translateY(-2px); }
.btn-finish:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn-finish i { font-size: 1.2em; }

/* ---- 어휘 보물상자 (플립 카드) ---- */
.activity { margin-top: 24px; }
.activity-head { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; font-size: 1.1rem; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.activity-head i { color: var(--primary); font-size: 1.15em; }
.activity-head .hint { margin-left: auto; font-size: 0.76rem; font-weight: 700; color: var(--ink-mid); }

.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.vocab-card { perspective: 800px; height: 130px; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.vocab-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 16px; }
.vc-inner { position: relative; width: 100%; height: 100%; transition: transform .5s cubic-bezier(0.16,1,0.3,1); transform-style: preserve-3d; }
.vocab-card.flipped .vc-inner { transform: rotateY(180deg); }
.vc-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 16px; border: 1px solid var(--card-border); background: var(--card-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 14px; text-align: center;
}
.vc-front .w { font-size: 1.3rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.vc-front .tap { font-size: 0.72rem; font-weight: 700; color: var(--ink-muted); display: inline-flex; align-items: center; gap: 4px; }
.vc-back { transform: rotateY(180deg); background: var(--surface); }
.vc-back .m { font-size: 0.92rem; font-weight: 600; color: var(--ink); line-height: 1.5; }

/* ---- 3지선다 퀴즈 ---- */
.quiz-block { margin-top: 20px; padding: 24px 26px; background: var(--surface); border: 1px solid var(--card-border); border-radius: 22px; box-shadow: var(--card-shadow-sm); }
.quiz-q { margin-bottom: 26px; }
.quiz-q:last-child { margin-bottom: 0; }
.quiz-q .qno { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--primary); color: var(--bg); font-size: 0.82rem; font-weight: 900; margin-right: 9px; }
.quiz-q .qtext { font-size: 1.1rem; font-weight: 800; color: var(--ink); line-height: 1.5; margin: 0 0 14px; letter-spacing: -0.01em; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 13px;
  border: 1.5px solid var(--card-border); background: var(--card-bg);
  color: var(--ink); font-family: inherit; font-size: 1rem; font-weight: 600; text-align: left; cursor: pointer;
}
.choice:hover:not(.locked) { border-color: var(--primary); }
.choice:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.choice .mark { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--card-border); display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.choice.locked { cursor: default; }
.choice.correct { border-color: var(--success); background: color-mix(in srgb, var(--success) 16%, var(--card-bg)); }
.choice.correct .mark { border-color: var(--success); background: var(--success); color: #fff; }
.choice.wrong { border-color: var(--error); background: color-mix(in srgb, var(--error) 12%, var(--card-bg)); animation: shake .4s; }
.choice.wrong .mark { border-color: var(--error); color: var(--error); }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

/* ---- 듣기(낭독) 버튼 ---- */
.spk {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--card-border); background: var(--card-bg); color: var(--primary);
  cursor: pointer; padding: 0;
}
.spk:hover { border-color: var(--primary); }
.spk:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.spk i { font-size: 0.92rem; line-height: 1; }
.spk.playing { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.q-spk { width: 28px; height: 28px; margin-left: 9px; vertical-align: middle; }
.vc-spk { position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; z-index: 3; }
.vocab-card { position: relative; }
.qtext .qno { vertical-align: middle; }

/* ============================================================
   곰돌이 루나 마스코트 위젯
   ============================================================ */
.mate-widget {
  position: fixed; right: 22px; bottom: 22px; z-index: 180;
  width: 88px; height: 99px; cursor: pointer;
}
.mate-widget svg { width: 100%; height: 100%; overflow: visible; display: block; }
.mate-bob { transform-origin: 50% 100%; animation: mateBob 3s ease-in-out infinite; }
@keyframes mateBob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }

/* 책: idle/reading 에서만 */
#mate-book { transition: opacity .2s; }
.mate-widget[data-state="complete"] #mate-book,
.mate-widget[data-state="correct"] #mate-book,
.mate-widget[data-state="wrong"] #mate-book,
.mate-widget[data-state="sleep"] #mate-book { opacity: 0; }

/* 눈: 평소 vs 취침(호) */
.eye-sleep { display: none; }
.mate-widget[data-state="sleep"] .eye-open { display: none; }
.mate-widget[data-state="sleep"] .eye-sleep { display: inline; }

/* 말풍선 - 1줄 고정 보장 (2줄 줄바꿈 방지) */
.mate-bubble {
  position: absolute; right: 82px; bottom: 52px;
  white-space: nowrap;
  max-width: calc(100vw - 110px);
  background: var(--surface); border: 1.5px solid var(--card-border);
  border-radius: 14px; padding: 8px 15px;
  font-size: 0.86rem; font-weight: 700; color: var(--ink); line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .2s ease-out, transform .2s ease-out;
  overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
  z-index: 185;
}
.mate-bubble.show { opacity: 1; transform: translateY(0); }
.mate-bubble::after {
  content: ''; position: absolute; right: -7px; bottom: 12px;
  width: 12px; height: 12px; background: var(--surface);
  border-right: 1.5px solid var(--card-border); border-bottom: 1.5px solid var(--card-border);
  transform: rotate(-45deg);
}

/* ============================================================
   완독 축하 연출
   ============================================================ */
.celebrate-overlay {
  position: fixed; inset: 0; z-index: 240;
  background: var(--scrim); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 18px;
  text-align: center; padding: 24px;
}
.celebrate-overlay.show { display: flex; }
.celebrate-mate { width: 168px; height: 189px; animation: celebPop .35s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes celebPop { 0%{transform:scale(.6);opacity:0} 100%{transform:scale(1);opacity:1} }
.celebrate-overlay .co-title { font-size: 1.6rem; font-weight: 900; color: var(--moon-cream); letter-spacing: -0.02em; }
.celebrate-overlay .co-sub { font-size: 1rem; font-weight: 600; color: var(--ink-mid); }
.celebrate-overlay .co-btn {
  margin-top: 6px; height: 50px; padding: 0 30px; border: none; border-radius: 14px;
  background: var(--primary); color: #1c1b2e; font-family: inherit; font-size: 1rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
  transition: transform .15s, box-shadow .15s;
}
.celebrate-overlay .co-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.5);
}
.celebrate-overlay .co-btn[disabled] { opacity: .5; cursor: default; }

.celebrate-overlay .co-btn-alt {
  margin-top: 4px; height: 48px; padding: 0 26px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #ffffff !important;
  font-family: inherit; font-size: 0.98rem; font-weight: 900; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4);
  transition: transform .15s, box-shadow .15s;
}
.celebrate-overlay .co-btn-alt:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.55);
}

/* 날아가는 별 */
.fly-star {
  position: fixed; z-index: 260; font-size: 1.4rem; color: var(--star); pointer-events: none;
  --dx: 0px; --dy: 0px; --dxp: 0px; --dyp: -120px;
  animation: starFly .8s cubic-bezier(0.4,0,0.6,1) forwards;
}
@keyframes starFly {
  0%   { transform: translate(0,0) scale(0); opacity: 0; }
  20%  { opacity: 1; }
  45%  { transform: translate(var(--dxp), var(--dyp)) scale(1.25); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.7); opacity: 0; }
}

/* ---- 토스트 ---- */
.kids-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(16px);
  background: var(--card-bg); color: var(--ink); border: 1px solid var(--card-border);
  padding: 12px 22px; border-radius: 999px; font-size: 0.9rem; font-weight: 700;
  opacity: 0; transition: opacity .22s, transform .22s; z-index: 300; pointer-events: none;
  box-shadow: var(--card-shadow);
}
.kids-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 반응형 ---- */
@media (max-width: 880px) {
  .kids-wrap { padding: 0 16px; }
  .streak-board { padding: 14px 16px; }
  .streak-cells { gap: 7px; }
  .stamp { width: 34px; height: 34px; font-size: 1rem; }
  .cover-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .story-card { padding: 26px 20px; border-radius: 20px; }
  #story-content { font-size: 1.26rem; line-height: 1.8; }
  .control-bar { padding: 14px; }
  .action-row { margin-left: 0; width: 100%; }
  .quiz-block { padding: 18px 16px; }
  .mate-widget { width: 64px; height: 74px; right: 14px; bottom: 14px; }
  .mate-bubble { right: 68px; bottom: 44px; white-space: nowrap; max-width: calc(100vw - 90px); font-size: 0.8rem; padding: 7px 12px; }
}
@media (max-width: 520px) {
  .cover-grid { grid-template-columns: repeat(2, 1fr); }
  .streak-info .n { font-size: 1.25rem; }
}

/* ---- 모션 최소화 ---- */
@media (prefers-reduced-motion: reduce) {
  .kids-page *, .mate-bob, .stamp.pop, .fly-star,
  .celebrate-mate, .screen.active, .choice.wrong, .loading-inline .dot {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  .fly-star { display: none !important; }
  .mate-bubble { transition: opacity .15s !important; }
  .shelf-mine-spines .spine.arriving { animation: none !important; opacity: 1 !important; }
  .cover-card.transferring { animation: mateFadeOut .2s linear forwards !important; }
}

/* ============================================================
   서재지기 부엉이 이미지 마스코트(2026-07-05: 곰돌이 루나 대체)
   .mate-widget 은 fixed 위젯, .mate-img 는 원형 컨테이너.
   원본 luna svg 는 제거되어 CSS 커스텀 프로퍼티 --mate-* 는 미사용 잔여로 무해.
   ============================================================ */
.mate-widget {
  position: fixed; right: 22px; bottom: 22px; z-index: 180;
  width: 88px; height: 88px; cursor: pointer;
  transition: transform .2s ease;
}
.mate-widget:hover { transform: translateY(-2px); }
.mate-img {
  width: 100%; height: 100%; display: block; object-fit: contain;
  border-radius: 50%; background: var(--surface);
  box-shadow: var(--card-shadow-sm);
  animation: mateBob 3s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.mate-widget[data-state="reading"] .mate-img,
.mate-widget[data-state="complete"] .mate-img,
.mate-widget[data-state="correct"] .mate-img,
.mate-widget[data-state="wrong"] .mate-img,
.mate-widget[data-state="sleep"] .mate-img { /* src 를 JS 로 교체하므로 여기서는 상태 클래스만 유지 */ }

.celebrate-mate {
  width: 180px; height: 180px; border-radius: 50%;
  background: var(--surface); object-fit: contain;
  box-shadow: var(--card-shadow);
  animation: celebPop .35s cubic-bezier(0.34,1.56,0.64,1);
}
@media (max-width: 880px) {
  .mate-widget { width: 68px; height: 68px; right: 14px; bottom: 14px; }
  .mate-bubble { right: 72px; bottom: 42px; white-space: nowrap; max-width: calc(100vw - 90px); font-size: 0.8rem; padding: 7px 12px; }
  .celebrate-mate { width: 140px; height: 140px; }
}

/* 마스코트 클릭 시 귀여운 반응 모션 */
.mate-widget.poke .mate-img {
  animation: matePoke .42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes matePoke {
  0% { transform: scale(1) rotate(0); }
  25% { transform: scale(0.92) rotate(-8deg); }
  60% { transform: scale(1.08) rotate(6deg); }
  85% { transform: scale(0.98) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ============================================================
   내 책장(spine 선반) — 서버 임베드 이력을 원목 톤 옅게 표시.
   회색 5단계 주도 · Azul 밑줄은 최근 재열람 1권만 · 이모지 금지.
   ============================================================ */
.shelf-mine {
  margin: 10px 0 22px; padding: 14px 16px 18px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 16px; position: relative;
}
.shelf-mine[hidden] { display: none; }
.shelf-mine::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 10px;
  height: 3px; background: linear-gradient(180deg, #c9b89a 0%, #a78c67 100%);
  border-radius: 2px; box-shadow: 0 2px 3px -1px rgba(120,80,40,.22);
}
.shelf-mine-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.shelf-mine-head h2 {
  font-size: 1rem; font-weight: 900; margin: 0;
  color: var(--card-title); letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 8px;
}
.shelf-mine-head h2 i { color: var(--primary); font-size: 1.05rem; }
.shelf-mine-head .count {
  font-size: 0.78rem; font-weight: 800; color: var(--ink-mid);
  background: var(--surface); border: 1px solid var(--card-border);
  padding: 3px 10px; border-radius: 999px;
}
.shelf-mine-spines {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 4px 4px 16px; position: relative; z-index: 1;
}
.shelf-mine .spine {
  width: 54px; height: 140px; flex: none;
  border-radius: 6px 6px 3px 3px; overflow: hidden; position: relative;
  cursor: pointer; background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 8px -5px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform .18s ease, box-shadow .18s ease;
}
.shelf-mine .spine:hover { transform: translateY(-3px); box-shadow: 0 10px 16px -8px rgba(0,0,0,0.45); }
.shelf-mine .spine .spine-cov {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: grid; place-items: center;
  background: var(--card-bg); color: var(--ink-mid);
  font-size: 1.6rem; font-weight: 900; letter-spacing: -0.02em;
}
.shelf-mine .spine .spine-band {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 4px;
  background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,0));
  color: #fff; font-size: 10px; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.2; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
  text-align: center;
}
.shelf-mine .spine.recent { outline: 2px solid #2563eb; outline-offset: 1px; }
.shelf-mine .spine .spine-resume {
  position: absolute; top: 5px; right: 5px;
  font-size: 9px; font-weight: 900;
  background: #ea580c; color: #fff;
  padding: 2px 5px; border-radius: 999px; letter-spacing: -0.02em;
}
.shelf-mine .spine.arriving { animation: mateSlideIn .5s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes mateSlideIn { from { opacity: 0; transform: translateY(38px); } to { opacity: 1; transform: translateY(0); } }
.shelf-mine-empty { padding: 20px 12px; text-align: center; color: var(--ink-mid); font-size: 0.85rem; font-weight: 700; }
@media (max-width: 520px) {
  .shelf-mine .spine { width: 46px; height: 124px; }
}

/* 이관 애니메이션 — 미읽음 카드가 spine 으로 이동한다는 감각 부여 */
.cover-card.transferring {
  animation: mateFadeOut .3s ease forwards;
  pointer-events: none;
}
@keyframes mateFadeOut { to { opacity: 0; transform: translateY(6px) scale(.96); } }

/* ============================================================
   [고도화 2026-09] 검색/필터, 가독성 조절기, 낭독 녹음, 독후 일기, 보상
   ============================================================ */
/* 상단 펫 코인 배지 */
.kids-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hub-coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hub-coin-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.25);
}
.hub-coin-pill i {
  font-size: 1.15em;
  color: #ffc107;
  animation: coinGlow 2.5s infinite ease-in-out;
}
.hub-coin-pill small {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-mid);
}
@keyframes coinGlow {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(15deg) scale(1.15); }
}

/* 검색 & 카테고리 필터 영역 */
.lib-filter-container {
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lib-search-box {
  position: relative;
  width: 100%;
}
.lib-search-box i.bi-search {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mid);
  font-size: 1.1rem;
  pointer-events: none;
}
.lib-search-box input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 48px;
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  color: var(--ink);
  font-size: 0.96rem;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.lib-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.22);
}
.lib-search-box input::placeholder {
  color: var(--ink-muted);
  font-weight: 500;
}
.btn-clear-search {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}
.btn-clear-search:hover {
  color: var(--ink);
}

/* 카테고리 탭 */
.lib-cat-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.lib-cat-tabs::-webkit-scrollbar {
  height: 4px;
}
.lib-cat-tabs::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 999px;
}
.cat-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
}
.cat-tab:hover {
  color: #fff;
  border-color: var(--primary);
  background: var(--card-bg);
}
.cat-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  border-color: var(--primary);
  color: #1c1b2e;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(245,166,35,0.35);
}

/* 서브 필터 (난이도 칩 & 건수) */
.lib-sub-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 2px 2px;
}
.diff-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.diff-lbl {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.diff-chip {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s ease;
}
.diff-chip:hover {
  border-color: var(--primary);
  color: #fff;
  background: rgba(245, 166, 35, 0.12);
}
.diff-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #1c1b2e;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(245,166,35,0.3);
}
.filter-count-badge {
  font-size: 0.86rem;
  color: var(--ink);
  font-weight: 700;
}
.filter-count-badge strong {
  color: var(--primary);
  font-weight: 900;
}

/* 검색 결과 없을 때 */
.lib-empty {
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border: 1px dashed var(--card-border);
  border-radius: 18px;
  margin: 16px 0 28px;
}
.lib-empty i {
  font-size: 2.8rem;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 12px;
}
.lib-empty p {
  color: var(--ink-mid);
  font-size: 0.96rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.btn-reset-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--primary);
  color: #1c1b2e;
  border: none;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

/* 리더 상단 메타 */
.reader-meta-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rt-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(245,166,35,0.15);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
}

/* 글자 크기 조절기 & 집중 룰러 */
.font-ctrl {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.font-size-group {
  display: inline-flex;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
}
.btn-fsize {
  background: var(--surface);
  border: none;
  border-right: 1px solid var(--card-border);
  padding: 6px 14px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
}
.btn-fsize:last-child {
  border-right: none;
}
.btn-fsize:hover {
  color: #fff;
  background: var(--card-bg);
}
.btn-fsize.active {
  background: var(--primary);
  color: #1c1b2e;
  font-weight: 900;
}
.btn-ruler {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 9px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s;
}
.btn-ruler:hover {
  border-color: var(--primary);
  color: #fff;
  background: var(--card-bg);
}
.btn-ruler.active,
.btn-ruler.on {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #1c1b2e !important;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.35);
}

/* 글자 크기 모드 */
.story-card.font-size-sm #story-content {
  font-size: 1.05rem;
  line-height: 1.85;
}
.story-card.font-size-md #story-content {
  font-size: 1.25rem;
  line-height: 2.05;
}
.story-card.font-size-lg #story-content {
  font-size: 1.5rem;
  line-height: 2.25;
}

/* 집중 룰러 효과 */
.story-card.ruler-active .sentence:not(.sent-active) {
  opacity: 0.32;
  transition: opacity .25s ease;
}
.story-card.ruler-active .sentence.sent-active {
  opacity: 1;
  background: rgba(245,166,35,0.22);
  box-shadow: 0 0 14px rgba(245,166,35,0.3);
  border-radius: 6px;
}

/* 낭독 녹음 버튼 & 패널 */
.btn-record {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
  font-weight: 800 !important;
}
.btn-record:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}
.btn-record.recording {
  background: #ef4444 !important;
  color: #fff !important;
  animation: recPulse 1.2s infinite ease-in-out;
}
@keyframes recPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.record-drawer {
  margin: 16px 0 24px;
  background: var(--surface);
  border: 2px solid rgba(239,68,68,0.35);
  border-radius: 18px;
  padding: 18px 22px;
  box-shadow: var(--card-shadow-sm);
  animation: drawerSlideDown .25s ease forwards;
}
@keyframes drawerSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.rd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.rd-title {
  font-size: 1.05rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rd-close {
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
}
.rd-close:hover {
  color: #fff;
}
.rd-desc {
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.5;
}
.rd-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-rec-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239,68,68,0.35);
  transition: all .18s;
}
.btn-rec-action.stop {
  background: #dc2626;
  animation: recPulse 1s infinite;
}
.rec-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 900;
  color: #ef4444;
}
.rec-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulseDot 1s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}
.rec-playback-area {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--card-border);
}
.rec-playback-area audio {
  height: 40px;
  border-radius: 999px;
}
.rec-praise-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(245,166,35,0.14);
  padding: 6px 14px;
  border-radius: 999px;
}

/* 독서 감상평 & 칭찬 코칭 */
.review-box {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.rv-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.rv-field label i {
  color: var(--primary);
  margin-right: 4px;
}
.rv-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.rv-field input:focus {
  border-color: var(--primary);
}
.rv-field input::placeholder {
  color: var(--ink-muted);
  font-size: 0.86rem;
}
.rv-actions {
  display: flex;
  justify-content: flex-end;
}
.btn-rv-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  background: var(--primary);
  color: #1c1b2e;
  border: none;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245,166,35,0.3);
  transition: all .2s;
}
.btn-rv-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245,166,35,0.45);
}

.rv-letter {
  margin-top: 10px;
  background: var(--card-bg);
  border: 1.5px solid var(--primary);
  border-radius: 14px;
  padding: 16px 18px;
  animation: letterPop .3s ease;
}
@keyframes letterPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.rv-letter-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.rv-owl-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.rv-letter-head strong {
  font-size: 0.94rem;
  color: var(--primary);
}
.rv-time {
  font-size: 0.76rem;
  color: var(--ink-muted);
}
.rv-letter-content {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.6;
}

/* 완독 축하 보상 칩 */
.co-rewards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}
.co-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

/* ============================================================
   일일 3대 독서 퀘스트 위젯 (.daily-quests-bar)
   밤하늘 모드 & 낮 모드 완벽 고대비 듀얼 테마 지원
   ============================================================ */
.daily-quests-bar {
  margin: 16px auto 0;
  max-width: 640px;
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: var(--card-shadow-sm);
  transition: all .2s ease;
}
.dq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.dq-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.dq-title i {
  color: #f59e0b;
  font-size: 1.15em;
}
.dq-progress {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dq-progress strong, .dq-progress span#dq-score {
  color: #f59e0b;
  font-weight: 900;
  font-size: 1.05em;
}
.dq-badge {
  font-size: 0.78rem;
  font-weight: 900;
  padding: 4px 11px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  color: #78350f !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}
.dq-badge.all-done {
  background: #10b981;
  border-color: #059669;
  color: #ffffff !important;
}
.dq-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 600px) {
  .dq-items {
    grid-template-columns: 1fr;
  }
}
.dq-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
  transition: all 0.2s ease;
}
.dq-item .dq-ic {
  font-size: 1.1rem;
  color: var(--ink-mid);
  flex-shrink: 0;
}
.dq-item.done {
  background: rgba(16, 185, 129, 0.14);
  border-color: #10b981;
  color: #059669;
  font-weight: 900;
}
.dq-item.done .dq-ic {
  color: #10b981;
}

/* 밤 모드 전용 세밀 조정 */
:root[data-mode="night"] .daily-quests-bar {
  background: rgba(37, 36, 56, 0.85);
  border-color: #3D3A5C;
}
:root[data-mode="night"] .dq-title {
  color: #F0EDE6;
}
:root[data-mode="night"] .dq-progress {
  color: #CBD5E1;
}
:root[data-mode="night"] .dq-badge {
  background: rgba(245, 158, 11, 0.2);
  border-color: #F5A623;
  color: #FFD166 !important;
}
:root[data-mode="night"] .dq-item {
  background: #2E2C45;
  border-color: #3D3A5C;
  color: #F0EDE6;
}
:root[data-mode="night"] .dq-item .dq-ic {
  color: #A09CBF;
}
:root[data-mode="night"] .dq-item.done {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34D399;
}
:root[data-mode="night"] .dq-item.done .dq-ic {
  color: #34D399;
}

/* 낮 모드 전용 세밀 조정 (밝은 화면에서 초고대비 보장) */
:root[data-mode="day"] .daily-quests-bar {
  background: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06) !important;
}
:root[data-mode="day"] .dq-title {
  color: #0F172A !important;
}
:root[data-mode="day"] .dq-progress {
  color: #1E293B !important;
}
:root[data-mode="day"] .dq-progress strong,
:root[data-mode="day"] .dq-progress span#dq-score {
  color: #D97706 !important;
}
:root[data-mode="day"] .dq-badge {
  background: #FEF3C7 !important;
  border-color: #F59E0B !important;
  color: #78350F !important;
}
:root[data-mode="day"] .dq-item {
  background: #F8FAFC !important;
  border: 1.5px solid #CBD5E1 !important;
  color: #0F172A !important;
}
:root[data-mode="day"] .dq-item .dq-ic {
  color: #475569 !important;
}
:root[data-mode="day"] .dq-item.done {
  background: #ECFDF5 !important;
  border: 1.5px solid #059669 !important;
  color: #064E3B !important;
}
:root[data-mode="day"] .dq-item.done .dq-ic {
  color: #059669 !important;
}

/* 독서 일기 내 학부모 칭찬 카드 발급 버튼 */
.btn-share-card-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-share-card-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.4);
}

/* ============================================================
   학부모 공유용 모바일 독서 칭찬 카드 모달 (.parent-modal-overlay)
   ============================================================ */
.parent-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.parent-card-dialog {
  background: #ffffff;
  border-radius: 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: pcdIn 0.25s ease-out;
}
@keyframes pcdIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.pcd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}
.pcd-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pcd-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s;
}
.pcd-close:hover {
  background: #f1f5f9;
  color: #334155;
}

/* 카드 본체 캔버스 영역 */
.parent-card-canvas {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 40%, #ffffff 100%);
  border: 3px double #f59e0b;
  margin: 18px;
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}
.pcc-stars {
  color: #f59e0b;
  font-size: 1.3rem;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.pcc-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #b45309;
  background: #fde68a;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.pcc-title {
  font-size: 1.28rem;
  font-weight: 900;
  color: #78350f;
  margin-bottom: 6px;
  word-break: keep-all;
}
.pcc-meta {
  font-size: 0.88rem;
  color: #92400e;
  margin-bottom: 14px;
  font-weight: 600;
}
.pcc-quote {
  font-size: 0.92rem;
  font-style: italic;
  color: #475569;
  background: rgba(255, 255, 255, 0.75);
  border-left: 3px solid #f59e0b;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
  line-height: 1.5;
  text-align: left;
}
.pcc-review-box {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pcc-review-item strong {
  color: #c2410c;
  display: block;
  font-size: 0.8rem;
  margin-bottom: 2px;
}
.pcc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #fcd34d;
  padding-top: 12px;
}
.pcc-owl-stamp {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 800;
}
.pcc-owl-stamp img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.pcc-date {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

/* 모달 하단 액션 버튼 */
.pcd-actions {
  display: flex;
  gap: 10px;
  padding: 0 18px 18px;
}
.btn-share-kakao, .btn-print-card {
  flex: 1;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-share-kakao {
  background: #fee500;
  color: #191919;
  box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
}
.btn-share-kakao:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(254, 229, 0, 0.5);
}
.btn-print-card {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.btn-print-card:hover {
  background: #e2e8f0;
}

/* ============================================================
   A4 인쇄 전용 스타일 (@media print)
   ============================================================ */
@media print {
  body * {
    visibility: hidden;
  }
  .parent-modal-overlay,
  .parent-modal-overlay * {
    visibility: visible;
  }
  .parent-modal-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    padding: 0;
    display: block !important;
  }
  .parent-card-dialog {
    box-shadow: none;
    border: none;
    max-width: 100%;
    margin: 0 auto;
  }
  .pcd-head, .pcd-actions {
    display: none !important;
  }
  .parent-card-canvas {
    margin: 0 auto;
    border: 2px solid #333;
    page-break-inside: avoid;
    box-shadow: none;
    width: 90%;
    max-width: 600px;
  }
}

/* ============================================================
   [추가 고도화] 상단 툴바 버튼 & 코인 인터랙션
   ============================================================ */
.hub-btn-pill {
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--card-shadow-sm);
}
.hub-btn-pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--card-bg);
}
.vocab-cnt-badge {
  font-size: 0.72rem;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-weight: 900;
}
.hub-coin-pill.clickable {
  cursor: pointer;
  transition: all .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hub-coin-pill.clickable:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}



/* ============================================================
   [추가 고도화] 완독 통계 리포트 카드
   ============================================================ */
.co-stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 400px;
  margin: 4px 0 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 12px 14px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.co-stat-item .cs-label {
  font-size: 0.76rem;
  color: var(--ink-mid);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.co-stat-item .cs-val {
  font-size: 1.18rem;
  font-weight: 900;
  color: #f59e0b;
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.co-reward-chip.clickable {
  cursor: pointer;
  transition: all .2s ease;
}
.co-reward-chip.clickable:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(255, 255, 255, 0.22);
}

/* ============================================================
   [추가 고도화] 부엉이 마스코트 스킨 레이어
   ============================================================ */
.mate-skin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.mate-skin-hat {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.85rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}
.mate-skin-crown {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.95rem;
  filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.5));
}
.mate-skin-glasses {
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.55rem;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}
.mate-skin-wand {
  position: absolute;
  bottom: 6px;
  right: -8px;
  font-size: 1.65rem;
  transform: rotate(15deg);
  filter: drop-shadow(0 2px 5px rgba(168, 85, 247, 0.4));
}

/* ============================================================
   [추가 고도화] 신규 공통 모달 시스템
   ============================================================ */
.kids-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal .2s ease-out;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}
.kids-modal-dialog {
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  animation: modalPop .3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.kmd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card-bg);
}
.kmd-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.kmd-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--ink);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all .15s;
}
.kmd-close:hover {
  color: #fff;
  background: var(--surface);
}

/* 1. 달빛 서재 부엉이 상점 */
.shop-balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid var(--card-border);
  font-size: 0.88rem;
  font-weight: 700;
}
.shop-balance-bar .shop-tip {
  font-size: 0.78rem;
  color: var(--ink-mid);
  font-weight: normal;
}
.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 20px;
  overflow-y: auto;
}
.shop-item-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}
.shop-item-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.shop-item-card.equipped {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}
.sic-icon {
  font-size: 2.4rem;
  margin-bottom: 2px;
}
.sic-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}
.sic-desc {
  font-size: 0.78rem;
  color: var(--ink-mid);
  line-height: 1.35;
}
.sic-btn {
  margin-top: 6px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
}
.sic-btn.buy {
  background: #f59e0b;
  color: #1c1b2e;
  font-weight: 900;
}
.sic-btn.buy:hover {
  background: #d97706;
}
.sic-btn.equip {
  background: var(--primary);
  color: #1c1b2e;
  font-weight: 900;
}
.sic-btn.equipped {
  background: #10b981;
  color: #fff;
  cursor: default;
}
.sic-btn.unequip {
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  color: var(--ink);
  font-weight: 800;
}
.sic-btn.unequip:hover {
  background: var(--card-bg);
  border-color: var(--primary);
  color: #fff;
}

/* 2. 낱말 보물 수첩 & 플래시카드 */
.vocab-book-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.88rem;
  font-weight: 700;
}
.vocab-mode-tabs {
  display: flex;
  gap: 6px;
}
.v-tab {
  border: 1.5px solid var(--card-border);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
}
.v-tab:hover {
  color: #fff;
  background: var(--card-bg);
  border-color: var(--primary);
}
.v-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #1c1b2e;
  font-weight: 900;
}
.vocab-book-content {
  padding: 18px 22px;
  overflow-y: auto;
  max-height: 60vh;
}
.vocab-list-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vocab-item-row {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.vir-word {
  font-size: 1rem;
  font-weight: 900;
  color: var(--primary);
}
.vir-mean {
  font-size: 0.85rem;
  color: var(--ink);
  margin-top: 3px;
  line-height: 1.4;
}
.vir-source {
  font-size: 0.74rem;
  color: var(--ink-mid);
  margin-top: 4px;
}
.vir-del {
  background: transparent;
  border: none;
  color: var(--ink-mid);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.vir-del:hover {
  color: #ef4444;
}
/* 플래시카드 */
.flashcard-container {
  perspective: 1000px;
  width: 100%;
  max-width: 380px;
  height: 220px;
  margin: 10px auto;
  cursor: pointer;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
}
.flashcard-container.is-flipped .flashcard-inner {
  transform: rotateY(180deg);
}
.flashcard-front, .flashcard-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 20px;
  border: 2px solid var(--card-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-shadow: var(--card-shadow-sm);
}
.flashcard-front {
  background: var(--surface);
}
.flashcard-back {
  background: var(--card-bg);
  transform: rotateY(180deg);
  border-color: var(--primary);
}
.fc-badge {
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.fc-badge.answer {
  background: #10b981;
}
.fc-word {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
}
.fc-hint {
  font-size: 0.8rem;
  color: var(--ink-mid);
  margin-top: 14px;
}
.fc-mean {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
}
.fc-source {
  font-size: 0.76rem;
  color: var(--ink-mid);
  margin-top: 12px;
}
.fc-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
.fc-btn {
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
}
.fc-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.fc-page-num {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink-mid);
}

/* 3. 독서 여권 (Reading Passport) 모달 */
.passport-sheet {
  padding: 22px;
  overflow-y: auto;
  max-height: 65vh;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.05) 0%, rgba(241, 245, 249, 0.02) 100%);
}
.passport-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 2px dashed var(--card-border);
  margin-bottom: 20px;
}
.ph-emblem {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 0.04em;
}
.ph-owner {
  font-size: 0.88rem;
  color: var(--ink);
}
.ph-stamp-count {
  font-size: 0.85rem;
  font-weight: 800;
  color: #f59e0b;
}
.passport-stamps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}
.passport-stamp-cell {
  background: var(--card-bg);
  border: 1.5px dashed var(--card-border);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: all .2s;
}
.passport-stamp-cell.stamped {
  border: 2px solid #3b82f6;
  background: rgba(59, 130, 246, 0.06);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: rotate(-1.5deg);
}
.psc-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.psc-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 4px;
}
.psc-date {
  font-size: 0.68rem;
  color: #3b82f6;
  font-weight: 700;
}
.psc-empty-tip {
  font-size: 0.74rem;
  color: var(--ink-mid);
}

/* 낱말 보물상자 '수첩 담기' 버튼 */
.btn-save-vocab {
  margin-top: 8px;
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
}
.btn-save-vocab:hover, .btn-save-vocab.saved {
  background: var(--primary);
  border-color: var(--primary);
  color: #1c1b2e;
  font-weight: 900;
}

/* ============================================================
   [다음 단계 고도화] 행운 동화 추천, 집중 룰러 빔, 스탬프 팝
   ============================================================ */
.btn-lucky-dice {
  background: var(--surface);
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  padding: 6px 16px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}
.btn-lucky-dice:hover {
  transform: translateY(-2px) scale(1.03);
  background: #fef3c7;
  border-color: #d97706;
  color: #78350f !important;
}
.btn-lucky-dice:hover span {
  color: #78350f !important;
}
.btn-lucky-dice:hover i {
  transform: rotate(20deg) scale(1.15);
  display: inline-block;
  transition: transform .2s ease;
}

/* 집중 룰러(Focus Ruler) 빔 */
.btn-ruler.on {
  background: #f59e0b !important;
  color: #fff !important;
  border-color: #d97706 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.story-card {
  position: relative;
}
.focus-ruler-beam {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 48px;
  pointer-events: none;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.06) 0%, rgba(245, 158, 11, 0.16) 50%, rgba(245, 158, 11, 0.06) 100%);
  border-top: 2px solid #f59e0b;
  border-bottom: 2px solid #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
  transition: top .12s cubic-bezier(0.2, 0.8, 0.4, 1), height .12s ease;
  z-index: 3;
}
.story-card.ruler-mode #story-content .sentence {
  transition: background-color .15s ease;
  border-radius: 6px;
  padding: 2px 4px;
}
.story-card.ruler-mode #story-content .sentence.ruler-focused {
  background: rgba(245, 158, 11, 0.15);
}

/* 독서 여권 스탬프 '쿵!' 팝업 모션 */
.passport-stamp-cell.just-stamped {
  animation: stampPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes stampPop {
  0% { transform: scale(3.5) rotate(-25deg); opacity: 0; filter: blur(4px); }
  50% { transform: scale(0.85) rotate(-1deg); opacity: 1; filter: blur(0); }
  75% { transform: scale(1.12) rotate(-2.5deg); }
  100% { transform: scale(1) rotate(-1.5deg); opacity: 1; }
}

/* ============================================================
   [시인성 고도화] 전역 버튼 텍스트 고대비 보장 규칙
   ============================================================ */
:root[data-mode="night"] button {
  color: var(--ink);
}
:root[data-mode="night"] button:not(.btn-play):not(.btn-stop):not(.btn-record):not(.btn-finish):not(.cat-tab.active):not(.diff-chip.active):not(.btn-fsize.active):not(.btn-ffamily.active):not(.btn-ruler.active):not(.btn-ruler.on):not(.v-tab.active):not(.co-btn):not(.btn-reset-filter):not(.btn-rv-save):not(.btn-share-kakao):not(.btn-share-card-trigger):not(.sic-btn.buy):not(.sic-btn.equip) {
  color: #F0EDE6 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

:root[data-mode="day"] button {
  color: var(--ink);
}
:root[data-mode="day"] button:not(.btn-play):not(.btn-stop):not(.btn-record):not(.btn-finish):not(.cat-tab.active):not(.diff-chip.active):not(.btn-fsize.active):not(.btn-ffamily.active):not(.btn-ruler.active):not(.btn-ruler.on):not(.v-tab.active):not(.co-btn):not(.btn-reset-filter):not(.btn-rv-save):not(.btn-share-kakao):not(.btn-share-card-trigger):not(.sic-btn.buy):not(.sic-btn.equip) {
  color: #1E293B !important;
}
:root[data-mode="day"] .cat-tab {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #1E293B !important;
}
:root[data-mode="day"] .diff-chip {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
}
:root[data-mode="day"] .diff-lbl {
  color: #0F172A !important;
}
:root[data-mode="day"] .filter-count-badge {
  color: #334155 !important;
}
:root[data-mode="day"] .btn-fsize {
  background: #FFFFFF !important;
  color: #1E293B !important;
}
:root[data-mode="day"] .btn-ffamily {
  color: #1E293B !important;
}
:root[data-mode="day"] .btn-ruler {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #1E293B !important;
}
:root[data-mode="day"] .ctrl-field > label {
  color: #0F172A !important;
}
:root[data-mode="day"] .ctrl-field select {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}
:root[data-mode="day"] .btn-bgm {
  background: #FFFFFF !important;
  color: #1E293B !important;
  border-color: #CBD5E1 !important;
}
:root[data-mode="day"] .hub-btn-pill {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}
:root[data-mode="day"] .mode-toggle {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}
:root[data-mode="day"] .btn-lucky-dice {
  background: #FFFBEB !important;
  border-color: #F59E0B !important;
  color: #78350F !important;
}

/* ============================================================
   [추가 고도화] 동화 카드 골든 글로우 & 완독 황금 리본
   ============================================================ */
.cover-card {
  position: relative;
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .25s ease, border-color .25s ease;
}
.cover-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(245, 166, 35, 0.6) !important;
  box-shadow: 0 12px 28px rgba(245, 166, 35, 0.25), 0 0 0 1px rgba(245, 166, 35, 0.4);
}
.cover-card.done::before {
  content: '⭐ 완독';
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1c1b2e;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  animation: badgeTwinkle 2.5s infinite ease-in-out;
}
@keyframes badgeTwinkle {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.08); filter: brightness(1.2); }
}

/* 낭독 진행 바 (Reading Progress Pill) */
.reader-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--card-border);
  border-radius: 999px;
  margin-top: 12px;
  overflow: hidden;
  position: relative;
}
.reader-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width .25s ease;
}

/* ============================================================
   [신규 고도화 1] 나만의 독서 레벨 & 경험치 위젯 (.hub-level-pill)
   ============================================================ */
.hub-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 999px;
  padding: 5px 14px;
  box-shadow: var(--card-shadow-sm);
  transition: all .2s ease;
}
.hl-badge {
  font-size: 0.82rem;
  font-weight: 900;
  color: #10b981;
  white-space: nowrap;
}
.hl-progress-wrap {
  width: 54px;
  height: 6px;
  background: var(--card-border);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.hl-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 999px;
  transition: width .4s ease;
}
.hl-exp-text {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink-mid);
  white-space: nowrap;
}
:root[data-mode="day"] .hub-level-pill {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
}
:root[data-mode="day"] .hl-badge {
  color: #059669 !important;
}
:root[data-mode="day"] .hl-exp-text {
  color: #475569 !important;
}

/* ============================================================
   [신규 고도화 2] 동화 북마크 찜하기 버튼 & 뱃지
   ============================================================ */
.btn-bookmark-reader {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.btn-bookmark-reader i {
  color: #f43f5e;
  font-size: 1.05em;
  transition: transform .2s ease;
}
.btn-bookmark-reader.bookmarked {
  background: rgba(244, 63, 94, 0.12);
  border-color: #f43f5e;
  color: #f43f5e !important;
}
.btn-bookmark-reader.bookmarked i {
  color: #f43f5e;
  transform: scale(1.15);
}
:root[data-mode="day"] .btn-bookmark-reader {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #1E293B;
}

/* 카드 내 찜 버튼 */
.cc-bookmark-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  backdrop-filter: blur(4px);
  transition: all .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cc-bookmark-btn:hover {
  transform: scale(1.18);
  background: rgba(0, 0, 0, 0.7);
}
.cc-bookmark-btn.active {
  background: #f43f5e;
  border-color: #f43f5e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
}
.cc-bookmark-btn.active i {
  transform: scale(1.1);
}

/* ============================================================
   [신규 고도화 3] 동화 미리보기 팝업 모달 (.preview-dialog)
   ============================================================ */
.preview-dialog {
  max-width: 540px;
  width: 90%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: pcdSlideUp .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.preview-body {
  padding: 22px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pv-top-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pv-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.pv-badge.cat { background: rgba(245, 166, 35, 0.16); color: #f59e0b; border-color: rgba(245, 166, 35, 0.3); }
.pv-badge.diff { background: rgba(59, 130, 246, 0.16); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.pv-badge.time { background: rgba(16, 185, 129, 0.16); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.pv-badge.state { background: rgba(255, 255, 255, 0.08); color: var(--ink); border-color: var(--card-border); }

.pv-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 0;
}
.pv-box {
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
}
.pv-box-lbl {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.pv-text {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}
.pv-lesson-box {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.35);
}
.pv-lesson-box .pv-text {
  font-weight: 700;
  color: #f59e0b;
}

.pv-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.btn-pv-bookmark {
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s ease;
}
.btn-pv-bookmark i { color: #f43f5e; font-size: 1.1em; }
.btn-pv-bookmark.bookmarked {
  background: rgba(244, 63, 94, 0.15);
  border-color: #f43f5e;
  color: #f43f5e !important;
}
.btn-pv-start {
  flex: 1;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #e07b39);
  color: #1c1b2e !important;
  border: none;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-pv-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(245, 166, 35, 0.55);
}

/* 낮 모드 미리보기 팝업 */
:root[data-mode="day"] .preview-dialog {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}
:root[data-mode="day"] .pv-title {
  color: #0F172A;
}
:root[data-mode="day"] .pv-box {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
:root[data-mode="day"] .pv-box-lbl {
  color: #0F172A;
}
:root[data-mode="day"] .pv-text {
  color: #1E293B;
}
:root[data-mode="day"] .pv-lesson-box {
  background: #FEF3C7;
  border-color: #F59E0B;
}
:root[data-mode="day"] .pv-lesson-box .pv-text {
  color: #78350F;
}
:root[data-mode="day"] .btn-pv-bookmark {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #0F172A;
}
:root[data-mode="day"] .btn-pv-start {
  color: #FFFFFF !important;
}

/* ============================================================
   [신규 고도화 4] 낱말 수첩 미니 퀴즈 게임 (.vocab-quiz-view)
   ============================================================ */
.vocab-quiz-view {
  padding: 18px 22px;
}
.vq-card {
  background: var(--surface);
  border: 1.5px solid var(--card-border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vq-badge {
  font-size: 0.82rem;
  font-weight: 900;
  color: #f59e0b;
}
.vq-score {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink-mid);
}
.vq-sub {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.vq-meaning-box {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.6;
}
.vq-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 540px) {
  .vq-choices {
    grid-template-columns: 1fr;
  }
}
.vq-choice {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: all .15s ease;
}
.vq-choice:hover:not(.locked) {
  border-color: var(--primary);
  background: rgba(245, 166, 35, 0.1);
  transform: translateY(-2px);
}
.vq-choice.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
  font-weight: 900;
}
.vq-choice.wrong {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}
.vq-feedback {
  padding: 12px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 900;
  animation: letterPop .25s ease;
}
.vq-feedback.correct {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid #10b981;
}
.vq-feedback.wrong {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid #ef4444;
}

/* 낮 모드 낱말 퀴즈 */
:root[data-mode="day"] .vq-card {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
:root[data-mode="day"] .vq-meaning-box {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #0F172A;
}
:root[data-mode="day"] .vq-choice {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #0F172A;
}
:root[data-mode="day"] .vq-choice.correct {
  background: #ECFDF5 !important;
  border-color: #059669 !important;
  color: #064E3B !important;
}
:root[data-mode="day"] .vq-choice.wrong {
  background: #FEF2F2 !important;
  border-color: #DC2626 !important;
  color: #991B1B !important;
}


