/* =========================
   플듀 언어 진단소 LANGUAGE LAB — iq.css + know.css 위에 덮어씀
   검사 언어별 테마: 🇰🇷 HANGUL CIRCUIT(청록·블루) · 🇯🇵 KANJI MATRIX(보라·핑크) · 🇺🇸 WORD GRID(블루·골드)
   ========================= */
body.lingo { --lc1: #3ee6f0; --lc2: #2f8cff; --lfont: "Galmuri11", "Noto Sans KR", "Malgun Gothic", sans-serif; background: #070b1c; }
body.lingo[data-qlang="ja"] { --lc1: #c77dff; --lc2: #ff5fd2; --lfont: "Noto Sans JP", "Hiragino Sans", "Galmuri11", sans-serif; }
body.lingo[data-qlang="en"] { --lc1: #5aa9ff; --lc2: #ffd35a; --lfont: "Galmuri11", "Noto Sans KR", system-ui, sans-serif; }
body.lingo [lang="ja"] { font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; }

/* ---------- 메인 ---------- */
.lt { position: relative; min-height: calc(100vh - 52px); padding: clamp(12px, 3vh, 34px) clamp(12px, 2.5vw, 30px); overflow: hidden; }
.lt-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.lt > *:not(.lt-bg) { position: relative; z-index: 1; }
.lt-head { text-align: center; margin: 4px 0 14px; }
.lt-head small { color: var(--lc1); letter-spacing: .2em; font-size: 12px; }
.lt-head h1 { margin: 4px 0; font-size: clamp(34px, 6vw, 62px); line-height: 1.05; text-shadow: 0 0 18px color-mix(in srgb, var(--lc1) 60%, transparent); }
.lt-head h1 span { color: var(--lc1); }
.lt-head p { margin: 0; color: #c9d6ff; }
.ll-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 980px; margin: 0 auto 18px; }
.ll-card { --c1: #3ee6f0; --c2: #2f8cff; position: relative; display: grid; justify-items: start; gap: 2px; padding: 14px 16px 16px; min-height: 120px; overflow: hidden; color: #fff; font: inherit; text-align: left; border: 0; border-radius: 14px; cursor: pointer; touch-action: manipulation;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c1) 22%, #0b1026), rgba(10,14,34,.92) 60%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c1) 45%, transparent), 0 8px 24px rgba(0,0,0,.35); backdrop-filter: blur(6px); transition: transform .18s, box-shadow .18s, filter .18s; }
.ll-card[data-l="ja"] { --c1: #c77dff; --c2: #ff5fd2; } .ll-card[data-l="en"] { --c1: #5aa9ff; --c2: #ffd35a; }
.ll-card:hover { transform: translateY(-3px); filter: brightness(1.12); }
.ll-card:focus-visible { outline: 3px solid var(--c2); outline-offset: 3px; }
.ll-card.on { box-shadow: inset 0 0 0 3px var(--c1), 0 0 0 2px var(--c2), 0 0 28px color-mix(in srgb, var(--c1) 55%, transparent); transform: translateY(-4px); }
.ll-card.on::before { content: "✔ 선택됨"; position: absolute; right: 12px; top: 10px; font-size: 12px; color: var(--c2); }
html:lang(ja) .ll-card.on::before { content: "✔ 選択中"; }
html:lang(en) .ll-card.on::before { content: "✔ Selected"; }
.ll-card.soon { opacity: .6; } .ll-card.soon .ll-n { color: #ffd35a; }
.ll-flag { font-style: normal; font-size: 30px; line-height: 1; }
.ll-card b { font-size: 19px; } .ll-card small { color: var(--c1); letter-spacing: .12em; font-size: 11px; }
.ll-glyph { position: absolute; right: 10px; bottom: -8px; font-size: 58px; font-weight: 800; color: var(--c1); opacity: .16; pointer-events: none; animation: llFloat 5s ease-in-out infinite; }
.ll-n { font-style: normal; font-size: 12px; color: #c9d6ff; }
@keyframes llFloat { 50% { transform: translateY(-6px); } }
body.lang-swap .lt-head h1, body.lang-swap .lt-lab { animation: llSwap .5s ease-out; }
@keyframes llSwap { from { opacity: .2; transform: translateY(8px) scale(.98); filter: blur(3px); } }
.lt-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 440px); gap: 22px; max-width: 1100px; margin: 0 auto; align-items: start; }
.lt-left { display: grid; gap: 12px; }
.lt-right { display: grid; gap: 8px; }
.lt-lab { margin: 0; font-size: 20px; font-weight: 700; color: var(--lc1); text-align: center; }
.diff-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 12px; background: rgba(11,16,36,.85); box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); }
.diff-pick button { min-height: 44px; border: 0; border-radius: 9px; font: inherit; font-weight: 700; color: #c9d6ff; background: transparent; cursor: pointer; touch-action: manipulation; }
.diff-pick button.on { color: #071022; background: linear-gradient(135deg, var(--lc1), var(--lc2)); }
.diff-pick button:focus-visible { outline: 2px solid var(--lc2); }
body.lingo .km.big b { font-size: 21px; }
@media (max-width: 760px) {
  .ll-cards { grid-template-columns: 1fr; gap: 8px; } .ll-card { min-height: 78px; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; } .ll-flag { grid-row: span 3; } .ll-glyph { font-size: 44px; }
  .lt-grid { grid-template-columns: 1fr; } .lt-right { order: -1; } .km-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 등급 배지 ---------- */
.grade-badge, i[class^="g-"], em[class^="g-"] { font-style: normal; font-weight: 800; }
i.g-SSS, em.g-SSS { color: #ffe27a; } i.g-SS, em.g-SS { color: #ffc95a; } i.g-S, em.g-S { color: #9fd4ff; } i.g-A, em.g-A { color: #7ee0ff; } i.g-B, em.g-B { color: #46e08a; } i.g-C, em.g-C { color: #b9c2d8; } i.g-D, em.g-D { color: #8a93a8; }
.grade-badge { display: inline-grid; place-items: center; min-width: 96px; height: 96px; padding: 0 10px; border-radius: 50%; font-size: 44px; color: #10142a; background: radial-gradient(circle at 40% 30%, #fff, #b9c2d8); box-shadow: 0 0 0 4px rgba(255,255,255,.25), 0 0 26px rgba(255,255,255,.25); }
.grade-badge.g-SSS { background: conic-gradient(from 0deg, #fff2a8, #ff9ee8, #9fe8ff, #fff2a8); animation: gPrism 4s linear infinite; font-size: 36px; }
.grade-badge.g-SS { background: radial-gradient(circle at 40% 30%, #ffe8a8, #b98cff); }
.grade-badge.g-S { background: radial-gradient(circle at 40% 30%, #ffffff, #9fd4ff); }
.grade-badge.g-A { background: radial-gradient(circle at 40% 30%, #e6fbff, #3ee6f0); }
.grade-badge.g-B { background: radial-gradient(circle at 40% 30%, #e9fff1, #46e08a); }
.grade-badge.g-C { background: radial-gradient(circle at 40% 30%, #f3f5fa, #8f98b2); }
.grade-badge.g-D { background: radial-gradient(circle at 40% 30%, #d8dce8, #5d6a85); }
@keyframes gPrism { to { filter: hue-rotate(360deg); } }
body.reduce .grade-badge.g-SSS { animation: none; }
.rv-level { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------- 문장 배열 ---------- */
.la-arr, .la-spot, .la-type { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; font-family: var(--lfont); }
.la-cap { margin: 4px 0 0; font-size: 13px; color: #9fb0e0; }
.la-slots { display: flex; flex-wrap: wrap; gap: 8px; min-height: 64px; padding: 10px; border-radius: 12px; background: rgba(8,12,30,.85); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--lc1) 40%, transparent); }
.la-slot { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 46px; border-radius: 9px; border: 2px dashed rgba(255,255,255,.18); color: #56628f; }
.la-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px; }
.la-card { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 8px 14px; border: 0; border-radius: 10px; font: inherit; font-size: 17px; color: #fff; cursor: pointer; touch-action: manipulation;
  background: linear-gradient(180deg, color-mix(in srgb, var(--lc1) 30%, #18204a), #121a3c); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--lc1) 55%, transparent), 0 3px 0 #000; transition: transform .12s; }
.la-card:hover { transform: translateY(-2px); } .la-card:focus-visible { outline: 3px solid var(--lc2); }
.la-card small { font-size: 11px; color: var(--lc2); }
.la-card.in { background: linear-gradient(180deg, color-mix(in srgb, var(--lc2) 26%, #18204a), #121a3c); }
.la-card.pop { animation: laPop .25s ease-out; }
.la-card.good { box-shadow: inset 0 0 0 3px #46e08a, 0 3px 0 #000; } .la-card.bad { box-shadow: inset 0 0 0 3px #ff6b6b, 0 3px 0 #000; }
.la-card i { font-style: normal; font-size: 12px; margin-left: 2px; }
.la-ctrl { display: flex; gap: 8px; justify-content: flex-end; }
.la-hint { margin: 0; color: #9fb0e0; font-size: 13px; }
.la-answer { margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(70,224,138,.1); box-shadow: inset 0 0 0 2px rgba(70,224,138,.4); }
@keyframes laPop { from { transform: scale(.85); } }

/* ---------- 오류 찾기 ---------- */
.la-line { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border-radius: 12px; background: rgba(8,12,30,.85); box-shadow: inset 0 0 0 2px rgba(255,107,107,.35); }
.la-tok { position: relative; min-height: 46px; padding: 8px 12px; border: 0; border-radius: 9px; font: inherit; font-size: 19px; color: #fff; background: rgba(255,255,255,.06); box-shadow: inset 0 -3px 0 rgba(255,255,255,.12); cursor: pointer; touch-action: manipulation; }
.la-tok:hover { background: rgba(255,107,107,.18); } .la-tok:focus-visible { outline: 3px solid #ff6b6b; }
.la-tok.sel { box-shadow: inset 0 0 0 2px #ffd35a; }
.la-tok.bad-word { background: rgba(255,107,107,.22); box-shadow: inset 0 0 0 3px #ff6b6b; text-decoration: line-through wavy #ff6b6b; }
.la-tok.bad-word em { display: inline-block; margin-left: 6px; font-style: normal; color: #46e08a; text-decoration: none; }
.la-tok.wrong-pick { box-shadow: inset 0 0 0 2px #ffd35a; opacity: .85; }
.la-tok.wrong-pick::after { content: " ✖"; color: #ffd35a; font-size: 13px; }

/* ---------- 타자 ---------- */
.la-target { margin: 0; padding: 16px; border-radius: 12px; font-size: clamp(19px, 3.2vw, 26px); line-height: 1.7; letter-spacing: .02em; word-break: keep-all; background: rgba(8,12,30,.88); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--lc1) 45%, transparent); user-select: none; -webkit-user-select: none; }
.la-target span { color: #8e9ac4; transition: color .08s; }
.la-target span.ok { color: #fff; } .la-target span.no { color: #ff6b6b; text-decoration: underline; } .la-target span.comp { color: var(--lc2); } .la-target span.cur { box-shadow: inset 0 -3px 0 var(--lc1); color: #fff; }
.la-input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 0; border-radius: 10px; font: inherit; font-size: 20px; color: #fff; background: #0e1430; box-shadow: inset 0 0 0 2px var(--lc1); resize: none; scroll-margin-bottom: 40vh; }
.la-input:focus { outline: 2px solid var(--lc2); }
.la-meter { display: grid; grid-template-columns: auto auto 1fr; gap: 14px; align-items: center; }
.la-meter span { display: grid; } .la-meter b { font-size: 22px; color: var(--lc1); } .la-meter small { font-size: 11px; color: #9fb0e0; }
.la-meter .bar { height: 10px; border-radius: 5px; background: #1e2654; overflow: hidden; } .la-meter .bar em { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lc1), var(--lc2)); transition: width .1s; }

/* ---------- 해설 ---------- */
.rv-flag { padding: 2px 8px; border-radius: 6px; font-size: 12px; color: #ffd35a; background: rgba(255,211,90,.12); }
.ap-ic { font-size: 34px; line-height: 1; }
.ap-b:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 진단서 ---------- */
.lcert h2 { color: var(--tc); }
.lcert .lc-grade { display: grid; justify-items: center; gap: 6px; }
.lc-mid { display: grid; grid-template-columns: 220px 1fr; gap: 12px; align-items: center; }
.lc-radar { width: 100%; height: auto; }
.lc-radar .rg { fill: none; stroke: rgba(255,255,255,.14); } .lc-radar .rl { stroke: rgba(255,255,255,.1); }
.lc-radar .rp { fill: color-mix(in srgb, var(--tc) 35%, transparent); stroke: var(--tc); stroke-width: 2.5; }
.lc-radar text { font-size: 15px; }
.lcert .cb.none b { color: #6f7896; font-size: 12px; }
@media (max-width: 640px) { .lc-mid { grid-template-columns: 1fr; } .lc-radar { max-width: 240px; margin: 0 auto; } }
.hs-best { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; } .hs-best span { padding: 6px 10px; border-radius: 8px; background: rgba(21,30,56,.9); font-size: 13px; }

/* ---------- 스트리머 방송 ---------- */
.mk-cap { margin: 10px 0 4px; font-size: 13px; color: #9fb0e0; }
.mk-mine { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,211,90,.08); box-shadow: inset 0 0 0 2px rgba(255,211,90,.35); }
.mk-mine h3 { margin: 0 0 6px; font-size: 15px; color: #ffd35a; } .mk-row { display: grid; gap: 4px; padding: 6px 0; } .mk-row small { color: #c9d6ff; }
body.kb.lingo .kb-stage .la-arr, body.kb.lingo .kb-stage .la-spot { max-width: 100%; }

/* ---------- 언어 대결 대기실 ---------- */
.lb-cond { margin: 6px 0 10px; text-align: center; font-weight: 700; color: var(--lc1); }
.lg-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: end; }
.lg-opts small { display: block; margin-bottom: 4px; color: #9fb0e0; font-size: 12px; }
.lg-opts.ro button:not(.on) { opacity: .45; } .lg-opts.ro { pointer-events: none; }
.lg-opts .chk { grid-column: 1 / -1; }
#lbCode.blur { filter: blur(7px); user-select: none; }

/* ---------- 토너먼트·파티·관전 ---------- */
.lg-opts .wide { grid-column: 1 / -1; }
.party-opts { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 10px; border-radius: 10px; background: rgba(255,95,210,.08); box-shadow: inset 0 0 0 2px rgba(255,95,210,.3); }
.party-opts small { width: 100%; }
.lb-rules { margin: 8px 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.6; background: rgba(62,230,240,.07); box-shadow: inset 0 0 0 1px rgba(62,230,240,.3); }
.watch-bar { margin: 6px 0; padding: 8px 12px; border-radius: 10px; text-align: center; background: rgba(255,211,90,.1); box-shadow: inset 0 0 0 2px rgba(255,211,90,.4); }
.watch-count { display: block; text-align: right; font-size: 12px; color: #9fb0e0; }
.match-bar { margin: 4px auto; max-width: 820px; padding: 6px 10px; border-radius: 8px; text-align: center; font-weight: 700; color: #9be15d; background: rgba(155,225,93,.08); }
.who.out { opacity: .5; text-decoration: line-through; }
body.lg-watch #btnReady, body.lg-watch #btnStart { display: none; }
.bk-box { overflow-x: auto; margin: 10px 0; }
.bk { display: flex; gap: 14px; min-width: max-content; padding: 6px 2px; }
.bk-col { display: grid; gap: 10px; align-content: space-around; min-width: 150px; }
.bk-col > small { text-align: center; color: #9fb0e0; font-size: 12px; }
.bk-m { display: grid; gap: 2px; padding: 6px 8px; border-radius: 9px; background: rgba(12,18,40,.9); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); font-size: 13px; }
.bk-m.me { box-shadow: inset 0 0 0 2px var(--lc1); } .bk-m.champ { box-shadow: inset 0 0 0 2px #ffd35a; }
.bk-m span { display: flex; justify-content: space-between; gap: 8px; } .bk-m .win { color: #46e08a; font-weight: 700; } .bk-m .lose { color: #6f7896; text-decoration: line-through; }
.bk-h { margin: 12px 0 4px; font-size: 15px; }

/* =========================
   4차 연출 (PREMIUM) — 검사별 무대 · 검사 이름표 띠 · 등급 도장 · 등급별 진단서 테두리 · 메인 로고 · 대결 순위 변동
   움직임 줄이기(body.reduce · prefers-reduced-motion)면 iq.css 규칙으로 애니메이션이 사실상 꺼짐
   ========================= */
/* 메인 로고: 처음 한 번 빛줄기가 지나가며 켜짐 */
.lt-head h1 { position: relative; animation: ltOn .9s ease-out both; }
.lt-head h1::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); background-size: 250% 100%; background-position: 120% 0; mix-blend-mode: overlay; pointer-events: none; animation: ltSweep 1.6s .5s ease-out both; }
@keyframes ltOn { from { opacity: 0; letter-spacing: .25em; filter: blur(6px); } }
@keyframes ltSweep { to { background-position: -120% 0; } }

/* 검사 이름표 띠 (문제 위로 잠깐 지나감, 누르기 안 막음) */
#scTest .gm { position: relative; }
.la-banner { position: absolute; left: 50%; top: 150px; z-index: 30; display: grid; justify-items: center; gap: 2px; padding: 10px 28px; border-radius: 12px; pointer-events: none; white-space: nowrap; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(7,11,28,.94) 18%, rgba(7,11,28,.94) 82%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--lc1) 50%, transparent); animation: laBanner 1.7s ease-in-out both; }
.la-banner small { font-size: 12px; letter-spacing: .3em; color: var(--lc1); }
.la-banner b { font-size: clamp(18px, 3vw, 26px); color: #fff; text-shadow: 0 0 14px color-mix(in srgb, var(--lc1) 70%, transparent); }
@keyframes laBanner { 0% { opacity: 0; transform: translate(-40%, 0) skewX(-12deg); } 18% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-60%, 0) skewX(12deg); } }

/* 검사별 무대 — 검사 색(--ga)으로 테두리, 검사마다 다른 장식 */
body.lingo .gm-stage { --ga: var(--lc1); position: relative; }
body.lingo .gm-stage.g-spell .kopt span, body.lingo .gm-stage.g-spell .sort-item { font-family: var(--lfont); }
/* SPELL MASTER: 교정지 — 빨간 펜 여백선 */
body.lingo[data-game="spell"] .ask { padding-left: 16px; box-shadow: inset 4px 0 0 #ff5fd2; }
body.lingo .gm-stage.g-spell::before { content: "✍️"; position: absolute; right: 6px; top: -30px; font-size: 26px; opacity: .55; transform: rotate(-12deg); pointer-events: none; }
/* WORD HUNTER: 낱말 카드가 한 장씩 뒤집혀 나옴 */
body.lingo .gm-stage.g-vocab .kopt { animation: lvFlip .45s ease-out both; }
body.lingo .gm-stage.g-vocab .kopt:nth-child(2) { animation-delay: .07s; } body.lingo .gm-stage.g-vocab .kopt:nth-child(3) { animation-delay: .14s; } body.lingo .gm-stage.g-vocab .kopt:nth-child(4) { animation-delay: .21s; }
@keyframes lvFlip { from { opacity: 0; transform: perspective(600px) rotateY(70deg); } }
/* CONTEXT DETECTIVE: 문제가 대화창 말풍선 */
body.lingo[data-game="context"] .ask { position: relative; max-width: 860px; margin-left: auto; margin-right: auto; padding: 14px 18px; border-radius: 16px 16px 16px 4px; background: rgba(122,184,255,.12); box-shadow: inset 0 0 0 2px rgba(122,184,255,.5); text-align: left; }
body.lingo[data-game="context"] .ask::before { content: "💬"; position: absolute; left: -10px; top: -14px; font-size: 22px; }
/* PHRASE BUILDER: 빈칸(___)이 든 문제를 두루마리처럼 */
body.lingo[data-game="idiom"] .ask { max-width: 860px; margin-left: auto; margin-right: auto; padding: 12px 18px; border-radius: 6px; background: linear-gradient(180deg, rgba(255,179,71,.14), rgba(255,179,71,.05)); box-shadow: inset 0 3px 0 rgba(255,179,71,.6), inset 0 -3px 0 rgba(255,179,71,.6); }
/* PRONUNCIATION LAB: 스피커 울림 고리 (장식일 뿐 소리 분석 아님) */
body.lingo .gm-stage.g-read::before { content: "🔊"; position: absolute; right: 8px; top: -32px; font-size: 24px; opacity: .6; pointer-events: none; }
body.lingo .gm-stage.g-read::after { content: ""; position: absolute; right: 2px; top: -38px; width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(62,230,240,.5); pointer-events: none; animation: lrRing 1.8s ease-out infinite; }
@keyframes lrRing { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
/* TREND RADAR: 레이더가 돌며 훑음 */
body.lingo .gm-stage.g-trend::before { content: ""; position: absolute; right: 4px; top: -44px; width: 40px; height: 40px; border-radius: 50%; pointer-events: none; background: conic-gradient(from 0deg, rgba(255,211,90,.75), transparent 30%); box-shadow: inset 0 0 0 2px rgba(255,211,90,.5); animation: ltRadar 2.4s linear infinite; }
@keyframes ltRadar { to { transform: rotate(360deg); } }
/* SENTENCE ARCHITECT: 설계도 모눈 위에 블록 조립 */
body.lingo .gm-stage.g-arrange .la-slots { background-color: rgba(8,16,40,.9); background-image: linear-gradient(rgba(155,225,93,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(155,225,93,.08) 1px, transparent 1px); background-size: 16px 16px; box-shadow: inset 0 0 0 2px rgba(155,225,93,.45); }
body.lingo .gm-stage.g-arrange .la-card.in { box-shadow: inset 0 0 0 2px rgba(155,225,93,.7), 0 3px 0 #000; }
/* ERROR DETECTIVE: 스캐너 빛줄기가 한 번 훑고 지나감 */
body.lingo .gm-stage.g-errfind .la-line { position: relative; overflow: hidden; }
body.lingo .gm-stage.g-errfind .la-line::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,107,107,.35), transparent); animation: leScan 1.4s .2s ease-in-out 2; }
@keyframes leScan { to { left: calc(100% + 20px); } }
/* TYPE RUSH: 속도 계기 — 입력 중에 계기판이 빛남 */
body.lingo .gm-stage.g-typing .la-meter b { font-variant-numeric: tabular-nums; text-shadow: 0 0 10px color-mix(in srgb, var(--lc1) 70%, transparent); }
body.lingo .gm-stage.g-typing .la-input:focus ~ .la-meter .bar { box-shadow: 0 0 12px color-mix(in srgb, var(--lc2) 60%, transparent); }

/* 등급 도장 + 고리 */
.rv-level { position: relative; }
.grade-badge.stamp { animation: gStamp .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.grade-badge.g-SSS.stamp { animation: gStamp .55s cubic-bezier(.2, 1.6, .4, 1) both, gPrism 4s .6s linear infinite; }
@keyframes gStamp { 0% { transform: scale(2.6) rotate(-14deg); opacity: 0; } 60% { transform: scale(.92) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.g-ring { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 4px #c9d6ff; animation: gRing 1.2s .35s ease-out both; }
.rv-level:has(> span) .g-ring { left: calc(50% - 60px); }
.g-ring.g-SSS { box-shadow: 0 0 0 5px #fff2a8, 0 0 30px #ff9ee8; } .g-ring.g-SS { box-shadow: 0 0 0 5px #ffe8a8, 0 0 24px #b98cff; } .g-ring.g-S { box-shadow: 0 0 0 4px #9fd4ff; } .g-ring.g-A { box-shadow: 0 0 0 4px #3ee6f0; } .g-ring.g-B { box-shadow: 0 0 0 3px #46e08a; } .g-ring.g-C, .g-ring.g-D { box-shadow: 0 0 0 2px #8f98b2; }
@keyframes gRing { from { transform: scale(.8); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }

/* 등급별 진단서 테두리 */
.lcert.g-SSS { box-shadow: inset 0 0 0 4px #fff2a8, inset 0 0 0 8px #0B1020, inset 0 0 0 11px #ff9ee8, 0 0 34px rgba(255,158,232,.45), 0 12px 40px #000; }
.lcert.g-SSS::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,242,168,.16) 45%, rgba(159,232,255,.16) 55%, transparent 70%); background-size: 300% 100%; animation: lcShine 5s linear infinite; }
@keyframes lcShine { from { background-position: 150% 0; } to { background-position: -150% 0; } }
.lcert.g-SS { box-shadow: inset 0 0 0 4px #ffd35a, inset 0 0 0 8px #0B1020, inset 0 0 0 11px #b98cff, 0 0 26px rgba(185,140,255,.35), 0 12px 40px #000; }
.lcert.g-S { box-shadow: inset 0 0 0 4px #e6f2ff, inset 0 0 0 8px #0B1020, inset 0 0 0 11px #9fd4ff, 0 0 20px rgba(159,212,255,.3), 0 12px 40px #000; }
.lcert > * { position: relative; }

/* 대결 순위 변동: 오르면 초록, 내리면 빨강 + 올라간 줄 반짝 */
.rb-rank .mv.up { color: #46e08a; } .rb-rank .mv.down { color: #ff6b6b; }
.rb-rank li:has(.mv.up) { animation: rkUp .8s ease-out; }
@keyframes rkUp { from { background: rgba(70,224,138,.25); transform: translateY(6px); } }

@media (max-width: 760px) { .la-banner { top: 120px; padding: 8px 18px; } }
