/* 춤추는 급수한자: 과 목록 · 퀴즈 · HANJA METEOR 게임 */
.hj { --hanja: "Noto Serif KR", "Batang", serif; }
.hj-loading { padding: 40px 0; text-align: center; color: var(--muted); }
.hj-hero { padding: 26px 0 8px; }
.hj-hero h1 { font-family: "Jua", sans-serif; font-weight: 400; font-size: 32px; line-height: 1.25; margin: 0 0 8px; }
.hj-hero h1 em { font-style: normal; color: var(--accent); }
.hj-hero p { margin: 0; color: var(--muted); }
.hj-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 40px; }
.hj-unit { display: block; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); text-decoration: none; color: var(--ink); }
.hj-unit:hover { border-color: var(--accent); }
.hj-unit b { font-family: "Jua", sans-serif; font-weight: 400; font-size: 20px; }
.hj-unit .lv { font-size: 12px; color: var(--muted); margin-left: 6px; }
.hj-unit .hz { display: block; font-family: var(--hanja); font-weight: 900; font-size: 22px; letter-spacing: 2px; margin-top: 4px; word-break: keep-all; }
.hj-stage { font-family: "Jua", sans-serif; font-size: 20px; margin: 26px 0 0; }

.hj-words { display: grid; gap: 10px; margin: 16px 0; }
.hj-word { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); }
.hj-word .hw { font-family: var(--hanja); font-weight: 900; font-size: 40px; line-height: 1; letter-spacing: 2px; }
.hj-word .rd { font-family: "Jua", sans-serif; font-size: 22px; }
.hj-word .en { color: var(--accent); font-weight: 800; }
.hj-word .hun { font-size: 13px; color: var(--muted); }
.hj-go { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 8px 0 40px; }
.hj-go a { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 6px; border-radius: var(--radius); text-decoration: none; font-family: "Jua", sans-serif; font-size: 22px; color: #fff; }
.hj-go a small { font-family: "Noto Sans KR", sans-serif; font-size: 12px; opacity: .85; }
.hj-go .q { background: var(--accent); }
.hj-go .w { background: linear-gradient(160deg, #e63946, #ff8a3d); }
.hj-go .g { background: linear-gradient(160deg, #2a1d6e, #7b2f8f); }

/* 퀴즈 */
.hjq { padding: 14px 0 30px; }
.hjq-top { display: flex; justify-content: space-between; align-items: center; font-family: "Jua", sans-serif; font-size: 18px; }
.hjq-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.hjq-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.hjq-time { height: 6px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.hjq-time i { display: block; height: 100%; background: var(--gold); }
.hjq-card { margin: 16px 0; padding: 22px 16px 18px; border-radius: 22px; background: linear-gradient(160deg, #fffbf0, #f4e8cd); border: 3px solid #1f1b3a; text-align: center; box-shadow: 0 8px 0 rgba(31, 27, 58, .15); }
.hjq-card .hw { font-family: var(--hanja); font-weight: 900; font-size: 92px; line-height: 1.05; letter-spacing: 6px; color: #1f1b3a; }
.hjq-card .ask { font-family: "Jua", sans-serif; font-size: 22px; color: var(--accent); margin-top: 6px; }
.hjq-card .hun { min-height: 24px; font-size: 15px; color: var(--muted); margin-top: 4px; }
.hjq-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hjq-choices button { position: relative; padding: 16px 8px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font-family: "Jua", sans-serif; font-size: 22px; color: var(--ink); cursor: pointer; }
.hjq-choices button.ok { background: var(--good); border-color: var(--good); color: #fff; }
.hjq-choices button.no { background: var(--bad); border-color: var(--bad); color: #fff; }
.hjq-msg { min-height: 30px; text-align: center; font-family: "Jua", sans-serif; font-size: 22px; margin-top: 12px; }
.hjq-msg.ok { color: var(--good); }
.hjq-msg.no { color: var(--bad); }
.hj-hand { position: absolute; right: 10px; bottom: -14px; font-size: 40px; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)); }
.hjq-end { text-align: center; padding: 26px 0; }
.hjq-end .score { font-family: "Jua", sans-serif; font-size: 54px; color: var(--accent); }
.hj-btns { display: grid; gap: 10px; margin-top: 16px; }
.hj-btns a, .hj-btns button { display: block; padding: 14px; border-radius: 14px; border: 2px solid var(--accent); background: var(--surface); color: var(--accent); font-family: "Jua", sans-serif; font-size: 20px; text-decoration: none; cursor: pointer; }
.hj-btns .main { background: var(--accent); color: #fff; }

/* HANJA METEOR */
.hjg { position: relative; margin: 10px auto 24px; max-width: 480px; border-radius: 20px; overflow: hidden; background: #140f3a; user-select: none; -webkit-user-select: none; }
.hjg canvas { display: block; width: 100%; touch-action: manipulation; }
.hjg-hud { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.hjg-hud span { padding: 3px 10px; border-radius: 99px; background: rgba(10, 8, 40, .6); border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: 13px; font-weight: 700; }
.hjg-hud .fever { border-color: #2ee6ff; color: #7ff3ff; }
.hjg-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px; background: #0b0828; }
.hjg-btns button { position: relative; min-height: 58px; padding: 6px 4px; border-radius: 12px; border: 2px solid #2b6fd6; background: linear-gradient(180deg, #13245f, #0d1640); color: #fff; font-family: "Jua", sans-serif; font-size: 17px; line-height: 1.15; cursor: pointer; word-break: keep-all; }
.hjg-btns button small { position: absolute; left: 6px; top: 3px; font-size: 10px; opacity: .6; font-family: "Noto Sans KR", sans-serif; }
.hjg-btns button.no { border-color: #ff4d6d; background: #4a0f22; }
.hjg-btns button.ok { border-color: #2ee6a0; background: #0e4a37; }
.hjg-btns .hj-hand { right: 4px; bottom: -18px; font-size: 34px; }
.hjg-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(8, 6, 30, .78); color: #fff; text-align: center; padding: 20px; }
.hjg-over h2 { font-family: "Jua", sans-serif; font-weight: 400; font-size: 40px; margin: 0; }
.hjg-over .hj-btns { width: 100%; max-width: 300px; }
.hjg-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(8, 6, 30, .55); color: #fff; text-align: center; padding: 20px; }
.hjg-start h2 { font-family: "Jua", sans-serif; font-weight: 400; font-size: 38px; margin: 0; letter-spacing: 1px; }
.hjg-start button { padding: 14px 36px; border-radius: 99px; border: 0; background: linear-gradient(90deg, #ff4fa3, #7b5cff); color: #fff; font-family: "Jua", sans-serif; font-size: 24px; cursor: pointer; }

/* 영상 녹화용 데모: 머리말만 남기고 화면을 꽉 채운다 */
.hj-demo .wrap { max-width: 520px; }
.hj-demo .hjg { margin-top: 8px; }

/* 소리 버튼 */
.hj-mute { pointer-events: auto; margin-left: 6px; padding: 2px 8px; border-radius: 99px; border: 1px solid rgba(127,127,160,.4); background: rgba(255,255,255,.12); font-size: 14px; line-height: 1.4; cursor: pointer; }
.hjg-hud .hj-mute { background: rgba(10,8,40,.6); color: #fff; border-color: rgba(255,255,255,.25); }
/* 퀴즈 정답·오답 튀기 */
.hjq-card.pop-ok { animation: hjPop .45s ease-out; border-color: var(--good); }
.hjq-card.pop-no { animation: hjShake .4s ease-out; border-color: var(--bad); }
@keyframes hjPop { 0% { transform: scale(.94); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes hjShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.hj-demo .hjq-card.pop-ok, .hj-demo .hjq-card.pop-no { animation: none; }
/* 게임 1 필순 디펜스 */
.hjw canvas { touch-action: none; }
.hjw-hand { position: absolute; font-size: 40px; pointer-events: none; }
.hj-btns .main2 { background: linear-gradient(90deg, #ff4fa3, #7b5cff); color: #fff; border-color: transparent; }
